"use strict";function _array_like_to_array(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i=0)continue;if(!Object.prototype.propertyIsEnumerable.call(source,key))continue;target[key]=source[key]}return target}target=_object_without_properties_loose(source,excluded);if(Object.getOwnPropertySymbols){sourceKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0)continue;if(!Object.prototype.propertyIsEnumerable.call(source,key))continue;target[key]=source[key]}}return target}function _object_without_properties_loose(source,excluded){if(source==null)return{};var target={},sourceKeys=Object.getOwnPropertyNames(source),key,i;for(i=0;i=0)continue;if(!Object.prototype.propertyIsEnumerable.call(source,key))continue;target[key]=source[key]}return target}function _overload_yield(value,kind){this.v=value;this.k=kind}function _possible_constructor_return(self1,call){if(call&&(_type_of(call)==="object"||typeof call==="function")){return call}return _assert_this_initialized(self1)}function _set_prototype_of(o,p){_set_prototype_of=Object.setPrototypeOf||function setPrototypeOf(o,p){o.__proto__=p;return o};return _set_prototype_of(o,p)}function _sliced_to_array(arr,i){return _array_with_holes(arr)||_iterable_to_array_limit(arr,i)||_unsupported_iterable_to_array(arr,i)||_non_iterable_rest()}function _super_prop_base(object,property){while(!Object.prototype.hasOwnProperty.call(object,property)){object=_get_prototype_of(object);if(object===null)break}return object}function _tagged_template_literal(strings,raw){if(!raw){raw=strings.slice(0)}return Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}function _to_array(arr){return _array_with_holes(arr)||_iterable_to_array(arr)||_unsupported_iterable_to_array(arr)||_non_iterable_rest()}function _to_consumable_array(arr){return _array_without_holes(arr)||_iterable_to_array(arr)||_unsupported_iterable_to_array(arr)||_non_iterable_spread()}function _to_primitive(input,hint){if(_type_of(input)!=="object"||input===null)return input;var prim=input[Symbol.toPrimitive];if(prim!==undefined){var res=prim.call(input,hint||"default");if(_type_of(res)!=="object")return res;throw new TypeError("@@toPrimitive must return a primitive value.")}return(hint==="string"?String:Number)(input)}function _to_property_key(arg){var key=_to_primitive(arg,"string");return _type_of(key)==="symbol"?key:String(key)}function _type_of(obj){"@swc/helpers - typeof";return obj&&typeof Symbol!=="undefined"&&obj.constructor===Symbol?"symbol":typeof obj}function _unsupported_iterable_to_array(o,minLen){if(!o)return;if(typeof o==="string")return _array_like_to_array(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(n);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _array_like_to_array(o,minLen)}function _wrap_async_generator(fn1){return function(){return new _async_generator(fn1.apply(this,arguments))}}function _wrap_native_super(Class){var _cache=typeof Map==="function"?new Map:undefined;_wrap_native_super=function wrapNativeSuper(Class){if(Class===null||!_is_native_function(Class))return Class;if(typeof Class!=="function"){throw new TypeError("Super expression must either be null or a function")}if(typeof _cache!=="undefined"){if(_cache.has(Class))return _cache.get(Class);_cache.set(Class,Wrapper)}function Wrapper(){return _construct(Class,arguments,_get_prototype_of(this).constructor)}Wrapper.prototype=Object.create(Class.prototype,{constructor:{value:Wrapper,enumerable:false,writable:true,configurable:true}});return _set_prototype_of(Wrapper,Class)};return _wrap_native_super(Class)}function _is_native_reflect_construct(){try{var result=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(_){}return(_is_native_reflect_construct=function(){return!!result})()}function _ts_generator(thisArg,body){var f3,y,t,_={label:0,sent:function(){if(t[0]&1)throw t[1];return t[1]},trys:[],ops:[]},g=Object.create((typeof Iterator==="function"?Iterator:Object).prototype),d=Object.defineProperty;return d(g,"next",{value:verb(0)}),d(g,"throw",{value:verb(1)}),d(g,"return",{value:verb(2)}),typeof Symbol==="function"&&d(g,Symbol.iterator,{value:function(){return this}}),g;function verb(n){return function(v){return step([n,v])}}function step(op1){if(f3)throw new TypeError("Generator is already executing.");while(g&&(g=0,op1[0]&&(_=0)),_)try{if(f3=1,y&&(t=op1[0]&2?y["return"]:op1[0]?y["throw"]||((t=y["return"])&&t.call(y),0):y.next)&&!(t=t.call(y,op1[1])).done)return t;if(y=0,t)op1=[op1[0]&2,t.value];switch(op1[0]){case 0:case 1:t=op1;break;case 4:_.label++;return{value:op1[1],done:false};case 5:_.label++;y=op1[1];op1=[0];continue;case 7:op1=_.ops.pop();_.trys.pop();continue;default:if(!(t=_.trys,t=t.length>0&&t[t.length-1])&&(op1[0]===6||op1[0]===2)){_=0;continue}if(op1[0]===3&&(!t||op1[1]>t[0]&&op1[1]=o.length)o=void 0;return{value:o&&o[i++],done:!o}}};throw new TypeError(s?"Object is not iterable.":"Symbol.iterator is not defined.")}function _templateObject(){var data=_tagged_template_literal(["","",""]);_templateObject=function _templateObject1(){return data};return data}function _templateObject1(){var data=_tagged_template_literal(["[","]"]);_templateObject1=function _templateObject1(){return data};return data}function _templateObject2(){var data=_tagged_template_literal([".","[","]"]);_templateObject2=function _templateObject1(){return data};return data}function _templateObject3(){var data=_tagged_template_literal(["\n"],["\\n"]);_templateObject3=function _templateObject1(){return data};return data}function _templateObject4(){var data=_tagged_template_literal(["","",""]);_templateObject4=function _templateObject1(){return data};return data}function _templateObject5(){var data=_tagged_template_literal(["",""," "," = ",";",""]);_templateObject5=function _templateObject1(){return data};return data}function _templateObject6(){var data=_tagged_template_literal(["","","",""]);_templateObject6=function _templateObject1(){return data};return data}function _templateObject7(){var data=_tagged_template_literal(["!",""]);_templateObject7=function _templateObject1(){return data};return data}function _templateObject8(){var data=_tagged_template_literal([""," "," ",""]);_templateObject8=function _templateObject1(){return data};return data}function _templateObject9(){var data=_tagged_template_literal(["(",")"]);_templateObject9=function _templateObject1(){return data};return data}function _templateObject10(){var data=_tagged_template_literal(["",".length"]);_templateObject10=function _templateObject1(){return data};return data}function _templateObject11(){var data=_tagged_template_literal(["","[","]"]);_templateObject11=function _templateObject1(){return data};return data}function _templateObject12(){var data=_tagged_template_literal(["Object.keys(",")"]);_templateObject12=function _templateObject1(){return data};return data}function _templateObject13(){var data=_tagged_template_literal(["",""]);_templateObject13=function _templateObject1(){return data};return data}function _templateObject14(){var data=_tagged_template_literal(["","","",""]);_templateObject14=function _templateObject1(){return data};return data}function _templateObject15(){var data=_tagged_template_literal(["{}"]);_templateObject15=function _templateObject1(){return data};return data}function _templateObject16(){var data=_tagged_template_literal(["","",""]);_templateObject16=function _templateObject1(){return data};return data}function _templateObject17(){var data=_tagged_template_literal(['"[" + ',' + "]"']);_templateObject17=function _templateObject1(){return data};return data}function _templateObject18(){var data=_tagged_template_literal(['"[\'" + ',' + "\']"']);_templateObject18=function _templateObject1(){return data};return data}function _templateObject19(){var data=_tagged_template_literal(['"/" + ',""]);_templateObject19=function _templateObject1(){return data};return data}function _templateObject20(){var data=_tagged_template_literal(['"/" + ','.replace(/~/g, "~0").replace(/\\//g, "~1")'],['"/" + ','.replace(/~/g, "~0").replace(/\\\\//g, "~1")']);_templateObject20=function _templateObject1(){return data};return data}function _templateObject21(){var data=_tagged_template_literal([""," !== true && "," !== undefined"]);_templateObject21=function _templateObject1(){return data};return data}function _templateObject22(){var data=_tagged_template_literal([""," === true"]);_templateObject22=function _templateObject1(){return data};return data}function _templateObject23(){var data=_tagged_template_literal([""," || {}"]);_templateObject23=function _templateObject1(){return data};return data}function _templateObject24(){var data=_tagged_template_literal(["Object.assign(",", ",")"]);_templateObject24=function _templateObject1(){return data};return data}function _templateObject25(){var data=_tagged_template_literal([""," !== true"]);_templateObject25=function _templateObject1(){return data};return data}function _templateObject26(){var data=_tagged_template_literal([""," || {}"]);_templateObject26=function _templateObject1(){return data};return data}function _templateObject27(){var data=_tagged_template_literal([""," !== true && "," !== undefined"]);_templateObject27=function _templateObject1(){return data};return data}function _templateObject28(){var data=_tagged_template_literal([""," === true ? true : "," > "," ? "," : ",""]);_templateObject28=function _templateObject1(){return data};return data}function _templateObject29(){var data=_tagged_template_literal([""," !== true"]);_templateObject29=function _templateObject1(){return data};return data}function _templateObject30(){var data=_tagged_template_literal([""," > "," ? "," : ",""]);_templateObject30=function _templateObject1(){return data};return data}function _templateObject31(){var data=_tagged_template_literal(["[","]"]);_templateObject31=function _templateObject1(){return data};return data}function _templateObject32(){var data=_tagged_template_literal([""," !== null"]);_templateObject32=function _templateObject1(){return data};return data}function _templateObject33(){var data=_tagged_template_literal(["",".length"]);_templateObject33=function _templateObject1(){return data};return data}function _templateObject34(){var data=_tagged_template_literal(["","[","]"]);_templateObject34=function _templateObject1(){return data};return data}function _templateObject35(){var data=_tagged_template_literal(["",".instancePath === undefined"]);_templateObject35=function _templateObject1(){return data};return data}function _templateObject36(){var data=_tagged_template_literal(["",".instancePath"]);_templateObject36=function _templateObject1(){return data};return data}function _templateObject37(){var data=_tagged_template_literal(["",".schemaPath"]);_templateObject37=function _templateObject1(){return data};return data}function _templateObject38(){var data=_tagged_template_literal(["","/",""]);_templateObject38=function _templateObject1(){return data};return data}function _templateObject39(){var data=_tagged_template_literal(["",".schema"]);_templateObject39=function _templateObject1(){return data};return data}function _templateObject40(){var data=_tagged_template_literal(["",".data"]);_templateObject40=function _templateObject1(){return data};return data}function _templateObject41(){var data=_tagged_template_literal([""," === null"]);_templateObject41=function _templateObject1(){return data};return data}function _templateObject42(){var data=_tagged_template_literal(["[","]"]);_templateObject42=function _templateObject1(){return data};return data}function _templateObject43(){var data=_tagged_template_literal(["",".push(",")"]);_templateObject43=function _templateObject1(){return data};return data}function _templateObject44(){var data=_tagged_template_literal(["","++"]);_templateObject44=function _templateObject1(){return data};return data}function _templateObject45(){var data=_tagged_template_literal(["new ","(",")"]);_templateObject45=function _templateObject1(){return data};return data}function _templateObject46(){var data=_tagged_template_literal(["",".errors"]);_templateObject46=function _templateObject1(){return data};return data}function _templateObject47(){var data=_tagged_template_literal(["{}"]);_templateObject47=function _templateObject1(){return data};return data}function _templateObject48(){var data=_tagged_template_literal(["","",""]);_templateObject48=function _templateObject1(){return data};return data}function _templateObject49(){var data=_tagged_template_literal(["","/",""]);_templateObject49=function _templateObject1(){return data};return data}function _templateObject50(){var data=_tagged_template_literal(["","",""]);_templateObject50=function _templateObject1(){return data};return data}function _templateObject51(){var data=_tagged_template_literal(["{}"]);_templateObject51=function _templateObject1(){return data};return data}function _templateObject52(){var data=_tagged_template_literal(["","",""]);_templateObject52=function _templateObject1(){return data};return data}function _templateObject53(){var data=_tagged_template_literal(['must pass "','" keyword validation']);_templateObject53=function _templateObject1(){return data};return data}function _templateObject54(){var data=_tagged_template_literal(['"','" keyword must be '," ($data)"]);_templateObject54=function _templateObject1(){return data};return data}function _templateObject55(){var data=_tagged_template_literal(['"','" keyword is invalid ($data)']);_templateObject55=function _templateObject1(){return data};return data}function _templateObject56(){var data=_tagged_template_literal(["",".errors"]);_templateObject56=function _templateObject1(){return data};return data}function _templateObject57(){var data=_tagged_template_literal(["typeof ",""]);_templateObject57=function _templateObject1(){return data};return data}function _templateObject58(){var data=_tagged_template_literal(["undefined"]);_templateObject58=function _templateObject1(){return data};return data}function _templateObject59(){var data=_tagged_template_literal([""," == 'object' && Array.isArray(",") && ",".length == 1"]);_templateObject59=function _templateObject1(){return data};return data}function _templateObject60(){var data=_tagged_template_literal(["","[0]"]);_templateObject60=function _templateObject1(){return data};return data}function _templateObject61(){var data=_tagged_template_literal(["typeof ",""]);_templateObject61=function _templateObject1(){return data};return data}function _templateObject62(){var data=_tagged_template_literal([""," !== undefined"]);_templateObject62=function _templateObject1(){return data};return data}function _templateObject63(){var data=_tagged_template_literal([""," !== undefined"]);_templateObject63=function _templateObject1(){return data};return data}function _templateObject64(){var data=_tagged_template_literal(["",' == "number" || ',' == "boolean"']);_templateObject64=function _templateObject1(){return data};return data}function _templateObject65(){var data=_tagged_template_literal(['"" + ',""]);_templateObject65=function _templateObject1(){return data};return data}function _templateObject66(){var data=_tagged_template_literal([""," === null"]);_templateObject66=function _templateObject1(){return data};return data}function _templateObject67(){var data=_tagged_template_literal(['""']);_templateObject67=function _templateObject1(){return data};return data}function _templateObject68(){var data=_tagged_template_literal(["",' == "boolean" || '," === null\n || (",' == "string" && '," && "," == +",")"]);_templateObject68=function _templateObject1(){return data};return data}function _templateObject69(){var data=_tagged_template_literal(["+",""]);_templateObject69=function _templateObject1(){return data};return data}function _templateObject70(){var data=_tagged_template_literal(["",' === "boolean" || '," === null\n || (",' === "string" && '," && "," == +"," && !("," % 1))"]);_templateObject70=function _templateObject1(){return data};return data}function _templateObject71(){var data=_tagged_template_literal(["+",""]);_templateObject71=function _templateObject1(){return data};return data}function _templateObject72(){var data=_tagged_template_literal(["",' === "false" || '," === 0 || "," === null"]);_templateObject72=function _templateObject1(){return data};return data}function _templateObject73(){var data=_tagged_template_literal(["",' === "true" || '," === 1"]);_templateObject73=function _templateObject1(){return data};return data}function _templateObject74(){var data=_tagged_template_literal(["",' === "" || '," === 0 || "," === false"]);_templateObject74=function _templateObject1(){return data};return data}function _templateObject75(){var data=_tagged_template_literal(["",' === "string" || ',' === "number"\n || ',' === "boolean" || '," === null"]);_templateObject75=function _templateObject1(){return data};return data}function _templateObject76(){var data=_tagged_template_literal(["[","]"]);_templateObject76=function _templateObject1(){return data};return data}function _templateObject77(){var data=_tagged_template_literal([""," !== undefined"]);_templateObject77=function _templateObject1(){return data};return data}function _templateObject78(){var data=_tagged_template_literal(["","[","]"]);_templateObject78=function _templateObject1(){return data};return data}function _templateObject79(){var data=_tagged_template_literal([""," "," null"]);_templateObject79=function _templateObject1(){return data};return data}function _templateObject80(){var data=_tagged_template_literal(["Array.isArray(",")"]);_templateObject80=function _templateObject1(){return data};return data}function _templateObject81(){var data=_tagged_template_literal([""," && typeof ",' == "object" && !Array.isArray(',")"]);_templateObject81=function _templateObject1(){return data};return data}function _templateObject82(){var data=_tagged_template_literal(["!("," % 1) && !isNaN(",")"]);_templateObject82=function _templateObject1(){return data};return data}function _templateObject83(){var data=_tagged_template_literal(["typeof "," "," ",""]);_templateObject83=function _templateObject1(){return data};return data}function _templateObject84(){var data=_tagged_template_literal(["typeof ",' == "number"']);_templateObject84=function _templateObject1(){return data};return data}function _templateObject85(){var data=_tagged_template_literal(["isFinite(",")"]);_templateObject85=function _templateObject1(){return data};return data}function _templateObject86(){var data=_tagged_template_literal(["typeof ",' != "object"']);_templateObject86=function _templateObject1(){return data};return data}function _templateObject87(){var data=_tagged_template_literal(["!"," || ",""]);_templateObject87=function _templateObject1(){return data};return data}function _templateObject88(){var data=_tagged_template_literal(["{type: ","}"]);_templateObject88=function _templateObject1(){return data};return data}function _templateObject89(){var data=_tagged_template_literal(["{type: ","}"]);_templateObject89=function _templateObject1(){return data};return data}function _templateObject90(){var data=_tagged_template_literal(["","",""]);_templateObject90=function _templateObject1(){return data};return data}function _templateObject91(){var data=_tagged_template_literal([""," === undefined"]);_templateObject91=function _templateObject1(){return data};return data}function _templateObject92(){var data=_tagged_template_literal([""," || "," === null || ",' === ""']);_templateObject92=function _templateObject1(){return data};return data}function _templateObject93(){var data=_tagged_template_literal([""," = ",""]);_templateObject93=function _templateObject1(){return data};return data}function _templateObject94(){var data=_tagged_template_literal(["",""]);_templateObject94=function _templateObject1(){return data};return data}function _templateObject95(){var data=_tagged_template_literal([""," = ",""]);_templateObject95=function _templateObject1(){return data};return data}function _templateObject96(){var data=_tagged_template_literal(["Object.prototype.hasOwnProperty"]);_templateObject96=function _templateObject1(){return data};return data}function _templateObject97(){var data=_tagged_template_literal(["",".call(",", ",")"]);_templateObject97=function _templateObject1(){return data};return data}function _templateObject98(){var data=_tagged_template_literal(["",""," !== undefined"]);_templateObject98=function _templateObject1(){return data};return data}function _templateObject99(){var data=_tagged_template_literal([""," && ",""]);_templateObject99=function _templateObject1(){return data};return data}function _templateObject100(){var data=_tagged_template_literal(["",""," === undefined"]);_templateObject100=function _templateObject1(){return data};return data}function _templateObject101(){var data=_tagged_template_literal(["",", ",", ","",""]);_templateObject101=function _templateObject1(){return data};return data}function _templateObject102(){var data=_tagged_template_literal(["",", ",""]);_templateObject102=function _templateObject1(){return data};return data}function _templateObject103(){var data=_tagged_template_literal(["",".call(",", ",")"]);_templateObject103=function _templateObject1(){return data};return data}function _templateObject104(){var data=_tagged_template_literal(["","(",")"]);_templateObject104=function _templateObject1(){return data};return data}function _templateObject105(){var data=_tagged_template_literal(["","(",", ",")"]);_templateObject105=function _templateObject1(){return data};return data}function _templateObject106(){var data=_tagged_template_literal(["",".length"]);_templateObject106=function _templateObject1(){return data};return data}function _templateObject107(){var data=_tagged_template_literal([""," || ",""]);_templateObject107=function _templateObject1(){return data};return data}function _templateObject108(){var data=_tagged_template_literal(["new RegExp"]);_templateObject108=function _templateObject1(){return data};return data}function _templateObject109(){var data=_tagged_template_literal(["await "]);_templateObject109=function _templateObject1(){return data};return data}function _templateObject110(){var data=_tagged_template_literal([""," instanceof ",""]);_templateObject110=function _templateObject1(){return data};return data}function _templateObject111(){var data=_tagged_template_literal(["",".errors"]);_templateObject111=function _templateObject1(){return data};return data}function _templateObject112(){var data=_tagged_template_literal(["",".errors"]);_templateObject112=function _templateObject1(){return data};return data}function _templateObject113(){var data=_tagged_template_literal(["await "]);_templateObject113=function _templateObject1(){return data};return data}function _templateObject114(){var data=_tagged_template_literal(["","",""]);_templateObject114=function _templateObject1(){return data};return data}function _templateObject115(){var data=_tagged_template_literal(["","[","]"]);_templateObject115=function _templateObject1(){return data};return data}function _templateObject116(){var data=_tagged_template_literal(["Array.isArray(",")"]);_templateObject116=function _templateObject1(){return data};return data}function _templateObject117(){var data=_tagged_template_literal([""," === null ? "," : ",".concat(",")"]);_templateObject117=function _templateObject1(){return data};return data}function _templateObject118(){var data=_tagged_template_literal(["",".length"]);_templateObject118=function _templateObject1(){return data};return data}function _templateObject119(){var data=_tagged_template_literal(["","",""]);_templateObject119=function _templateObject1(){return data};return data}function _templateObject120(){var data=_tagged_template_literal(["","","",""]);_templateObject120=function _templateObject1(){return data};return data}function _templateObject121(){var data=_tagged_template_literal(["","",""]);_templateObject121=function _templateObject1(){return data};return data}function _templateObject122(){var data=_tagged_template_literal(["","",""]);_templateObject122=function _templateObject1(){return data};return data}function _templateObject123(){var data=_tagged_template_literal(["",""]);_templateObject123=function _templateObject1(){return data};return data}function _templateObject124(){var data=_tagged_template_literal(["",", ",""]);_templateObject124=function _templateObject1(){return data};return data}function _templateObject125(){var data=_tagged_template_literal(['"use strict"; ',""]);_templateObject125=function _templateObject1(){return data};return data}function _templateObject126(){var data=_tagged_template_literal(["",", ",""]);_templateObject126=function _templateObject1(){return data};return data}function _templateObject127(){var data=_tagged_template_literal([", ","={}"]);_templateObject127=function _templateObject1(){return data};return data}function _templateObject128(){var data=_tagged_template_literal(["{",'="", ',", ",", ","=","","}={}"]);_templateObject128=function _templateObject1(){return data};return data}function _templateObject129(){var data=_tagged_template_literal(["",".",""]);_templateObject129=function _templateObject1(){return data};return data}function _templateObject130(){var data=_tagged_template_literal(["",".",""]);_templateObject130=function _templateObject1(){return data};return data}function _templateObject131(){var data=_tagged_template_literal(["",".",""]);_templateObject131=function _templateObject1(){return data};return data}function _templateObject132(){var data=_tagged_template_literal(["",".",""]);_templateObject132=function _templateObject1(){return data};return data}function _templateObject133(){var data=_tagged_template_literal(["",".",""]);_templateObject133=function _templateObject1(){return data};return data}function _templateObject134(){var data=_tagged_template_literal(['""']);_templateObject134=function _templateObject1(){return data};return data}function _templateObject135(){var data=_tagged_template_literal(["undefined"]);_templateObject135=function _templateObject1(){return data};return data}function _templateObject136(){var data=_tagged_template_literal(["undefined"]);_templateObject136=function _templateObject1(){return data};return data}function _templateObject137(){var data=_tagged_template_literal(["{}"]);_templateObject137=function _templateObject1(){return data};return data}function _templateObject138(){var data=_tagged_template_literal(["",".evaluated"]);_templateObject138=function _templateObject1(){return data};return data}function _templateObject139(){var data=_tagged_template_literal(["",".dynamicProps"]);_templateObject139=function _templateObject1(){return data};return data}function _templateObject140(){var data=_tagged_template_literal(["",".props"]);_templateObject140=function _templateObject1(){return data};return data}function _templateObject141(){var data=_tagged_template_literal(["undefined"]);_templateObject141=function _templateObject1(){return data};return data}function _templateObject142(){var data=_tagged_template_literal(["",".dynamicItems"]);_templateObject142=function _templateObject1(){return data};return data}function _templateObject143(){var data=_tagged_template_literal(["",".items"]);_templateObject143=function _templateObject1(){return data};return data}function _templateObject144(){var data=_tagged_template_literal(["undefined"]);_templateObject144=function _templateObject1(){return data};return data}function _templateObject145(){var data=_tagged_template_literal(["/*# sourceURL="," */"]);_templateObject145=function _templateObject1(){return data};return data}function _templateObject146(){var data=_tagged_template_literal([""," === ",""]);_templateObject146=function _templateObject1(){return data};return data}function _templateObject147(){var data=_tagged_template_literal(["",".logger.log(",")"]);_templateObject147=function _templateObject1(){return data};return data}function _templateObject148(){var data=_tagged_template_literal(["","/$comment"]);_templateObject148=function _templateObject1(){return data};return data}function _templateObject149(){var data=_tagged_template_literal(["",".opts.$comment(",", ",", ",".schema)"]);_templateObject149=function _templateObject1(){return data};return data}function _templateObject150(){var data=_tagged_template_literal([""," === 0"]);_templateObject150=function _templateObject1(){return data};return data}function _templateObject151(){var data=_tagged_template_literal(["new ","(",")"]);_templateObject151=function _templateObject1(){return data};return data}function _templateObject152(){var data=_tagged_template_literal(["",".errors"]);_templateObject152=function _templateObject1(){return data};return data}function _templateObject153(){var data=_tagged_template_literal([""," === 0"]);_templateObject153=function _templateObject1(){return data};return data}function _templateObject154(){var data=_tagged_template_literal(["",".props"]);_templateObject154=function _templateObject1(){return data};return data}function _templateObject155(){var data=_tagged_template_literal(["",".items"]);_templateObject155=function _templateObject1(){return data};return data}function _templateObject156(){var data=_tagged_template_literal([""," === ",""]);_templateObject156=function _templateObject1(){return data};return data}function _templateObject157(){var data=_tagged_template_literal(["","",""]);_templateObject157=function _templateObject1(){return data};return data}function _templateObject158(){var data=_tagged_template_literal([""," && ",""]);_templateObject158=function _templateObject1(){return data};return data}function _templateObject159(){var data=_tagged_template_literal([""," !== undefined && (",")"]);_templateObject159=function _templateObject1(){return data};return data}function _templateObject160(){var data=_tagged_template_literal([""," === undefined"]);_templateObject160=function _templateObject1(){return data};return data}function _templateObject161(){var data=_tagged_template_literal(["",""]);_templateObject161=function _templateObject1(){return data};return data}function _templateObject162(){var data=_tagged_template_literal(["!","(",")"]);_templateObject162=function _templateObject1(){return data};return data}function _templateObject163(){var data=_tagged_template_literal(['require("ajv/dist/runtime/validation_error").default']);_templateObject163=function _templateObject1(){return data};return data}function _templateObject164(){var data=_tagged_template_literal(['""']);_templateObject164=function _templateObject1(){return data};return data}function _templateObject165(){var data=_tagged_template_literal(["",".validate"]);_templateObject165=function _templateObject1(){return data};return data}function _templateObject166(){var data=_tagged_template_literal(["await ",""]);_templateObject166=function _templateObject1(){return data};return data}function _templateObject167(){var data=_tagged_template_literal(["!("," instanceof ",")"]);_templateObject167=function _templateObject1(){return data};return data}function _templateObject168(){var data=_tagged_template_literal(["",".errors"]);_templateObject168=function _templateObject1(){return data};return data}function _templateObject169(){var data=_tagged_template_literal([""," === null ? "," : ",".concat(",")"]);_templateObject169=function _templateObject1(){return data};return data}function _templateObject170(){var data=_tagged_template_literal(["",".length"]);_templateObject170=function _templateObject1(){return data};return data}function _templateObject171(){var data=_tagged_template_literal(["",".evaluated.props"]);_templateObject171=function _templateObject1(){return data};return data}function _templateObject172(){var data=_tagged_template_literal(["",".evaluated.items"]);_templateObject172=function _templateObject1(){return data};return data}function _templateObject173(){var data=_tagged_template_literal(["",".validate"]);_templateObject173=function _templateObject1(){return data};return data}function _templateObject174(){var data=_tagged_template_literal(["must be "," ",""]);_templateObject174=function _templateObject1(){return data};return data}function _templateObject175(){var data=_tagged_template_literal(["{comparison: ",", limit: ","}"]);_templateObject175=function _templateObject1(){return data};return data}function _templateObject176(){var data=_tagged_template_literal([""," "," "," || isNaN(",")"]);_templateObject176=function _templateObject1(){return data};return data}function _templateObject177(){var data=_tagged_template_literal(["must be multiple of ",""]);_templateObject177=function _templateObject1(){return data};return data}function _templateObject178(){var data=_tagged_template_literal(["{multipleOf: ","}"]);_templateObject178=function _templateObject1(){return data};return data}function _templateObject179(){var data=_tagged_template_literal(["Math.abs(Math.round(",") - ",") > 1e-",""]);_templateObject179=function _templateObject1(){return data};return data}function _templateObject180(){var data=_tagged_template_literal([""," !== parseInt(",")"]);_templateObject180=function _templateObject1(){return data};return data}function _templateObject181(){var data=_tagged_template_literal(["("," === 0 || ("," = ","/",", ","))"]);_templateObject181=function _templateObject1(){return data};return data}function _templateObject182(){var data=_tagged_template_literal(["must NOT have "," than "," characters"]);_templateObject182=function _templateObject1(){return data};return data}function _templateObject183(){var data=_tagged_template_literal(["{limit: ","}"]);_templateObject183=function _templateObject1(){return data};return data}function _templateObject184(){var data=_tagged_template_literal(["",".length"]);_templateObject184=function _templateObject1(){return data};return data}function _templateObject185(){var data=_tagged_template_literal(["","(",")"]);_templateObject185=function _templateObject1(){return data};return data}function _templateObject186(){var data=_tagged_template_literal([""," "," ",""]);_templateObject186=function _templateObject1(){return data};return data}function _templateObject187(){var data=_tagged_template_literal(['must match pattern "','"']);_templateObject187=function _templateObject1(){return data};return data}function _templateObject188(){var data=_tagged_template_literal(["{pattern: ","}"]);_templateObject188=function _templateObject1(){return data};return data}function _templateObject189(){var data=_tagged_template_literal(["new RegExp"]);_templateObject189=function _templateObject1(){return data};return data}function _templateObject190(){var data=_tagged_template_literal(["","(",", ",").test(",")"]);_templateObject190=function _templateObject1(){return data};return data}function _templateObject191(){var data=_tagged_template_literal(["!",""]);_templateObject191=function _templateObject1(){return data};return data}function _templateObject192(){var data=_tagged_template_literal(["!",".test(",")"]);_templateObject192=function _templateObject1(){return data};return data}function _templateObject193(){var data=_tagged_template_literal(["must NOT have "," than "," properties"]);_templateObject193=function _templateObject1(){return data};return data}function _templateObject194(){var data=_tagged_template_literal(["{limit: ","}"]);_templateObject194=function _templateObject1(){return data};return data}function _templateObject195(){var data=_tagged_template_literal(["Object.keys(",").length "," ",""]);_templateObject195=function _templateObject1(){return data};return data}function _templateObject196(){var data=_tagged_template_literal(["must have required property '","'"]);_templateObject196=function _templateObject1(){return data};return data}function _templateObject197(){var data=_tagged_template_literal(["{missingProperty: ","}"]);_templateObject197=function _templateObject1(){return data};return data}function _templateObject198(){var data=_tagged_template_literal(["must NOT have "," than "," items"]);_templateObject198=function _templateObject1(){return data};return data}function _templateObject199(){var data=_tagged_template_literal(["{limit: ","}"]);_templateObject199=function _templateObject1(){return data};return data}function _templateObject200(){var data=_tagged_template_literal(["",".length "," ",""]);_templateObject200=function _templateObject1(){return data};return data}function _templateObject201(){var data=_tagged_template_literal(["must NOT have duplicate items (items ## "," and "," are identical)"]);_templateObject201=function _templateObject1(){return data};return data}function _templateObject202(){var data=_tagged_template_literal(["{i: ",", j: ","}"]);_templateObject202=function _templateObject1(){return data};return data}function _templateObject203(){var data=_tagged_template_literal([""," === false"]);_templateObject203=function _templateObject1(){return data};return data}function _templateObject204(){var data=_tagged_template_literal(["",".length"]);_templateObject204=function _templateObject1(){return data};return data}function _templateObject205(){var data=_tagged_template_literal([""," > 1"]);_templateObject205=function _templateObject1(){return data};return data}function _templateObject206(){var data=_tagged_template_literal(["{}"]);_templateObject206=function _templateObject1(){return data};return data}function _templateObject207(){var data=_tagged_template_literal([";","--;"]);_templateObject207=function _templateObject1(){return data};return data}function _templateObject208(){var data=_tagged_template_literal(["","[","]"]);_templateObject208=function _templateObject1(){return data};return data}function _templateObject209(){var data=_tagged_template_literal(["continue"]);_templateObject209=function _templateObject1(){return data};return data}function _templateObject210(){var data=_tagged_template_literal(["typeof ",' == "string"']);_templateObject210=function _templateObject1(){return data};return data}function _templateObject211(){var data=_tagged_template_literal(["",' += "_"']);_templateObject211=function _templateObject1(){return data};return data}function _templateObject212(){var data=_tagged_template_literal(["typeof ","[",'] == "number"']);_templateObject212=function _templateObject1(){return data};return data}function _templateObject213(){var data=_tagged_template_literal(["","[","]"]);_templateObject213=function _templateObject1(){return data};return data}function _templateObject214(){var data=_tagged_template_literal(["","[","] = ",""]);_templateObject214=function _templateObject1(){return data};return data}function _templateObject215(){var data=_tagged_template_literal([";","--;"]);_templateObject215=function _templateObject1(){return data};return data}function _templateObject216(){var data=_tagged_template_literal([""," = ","; ","--;"]);_templateObject216=function _templateObject1(){return data};return data}function _templateObject217(){var data=_tagged_template_literal(["","(","[","], ","[","])"]);_templateObject217=function _templateObject1(){return data};return data}function _templateObject218(){var data=_tagged_template_literal(["{allowedValue: ","}"]);_templateObject218=function _templateObject1(){return data};return data}function _templateObject219(){var data=_tagged_template_literal(["!","(",", ",")"]);_templateObject219=function _templateObject1(){return data};return data}function _templateObject220(){var data=_tagged_template_literal([""," !== ",""]);_templateObject220=function _templateObject1(){return data};return data}function _templateObject221(){var data=_tagged_template_literal(["{allowedValues: ","}"]);_templateObject221=function _templateObject1(){return data};return data}function _templateObject222(){var data=_tagged_template_literal(["","(",", ",")"]);_templateObject222=function _templateObject1(){return data};return data}function _templateObject223(){var data=_tagged_template_literal(["","(",", ","[","])"]);_templateObject223=function _templateObject1(){return data};return data}function _templateObject224(){var data=_tagged_template_literal([""," === ",""]);_templateObject224=function _templateObject1(){return data};return data}function _templateObject225(){var data=_tagged_template_literal(["",".length"]);_templateObject225=function _templateObject1(){return data};return data}function _templateObject226(){var data=_tagged_template_literal([""," <= ",""]);_templateObject226=function _templateObject1(){return data};return data}function _templateObject227(){var data=_tagged_template_literal([""," <= ",""]);_templateObject227=function _templateObject1(){return data};return data}function _templateObject228(){var data=_tagged_template_literal(["must NOT have more than "," items"]);_templateObject228=function _templateObject1(){return data};return data}function _templateObject229(){var data=_tagged_template_literal(["{limit: ","}"]);_templateObject229=function _templateObject1(){return data};return data}function _templateObject230(){var data=_tagged_template_literal(["",".length"]);_templateObject230=function _templateObject1(){return data};return data}function _templateObject231(){var data=_tagged_template_literal([""," > ",""]);_templateObject231=function _templateObject1(){return data};return data}function _templateObject232(){var data=_tagged_template_literal(["must NOT have more than "," items"]);_templateObject232=function _templateObject1(){return data};return data}function _templateObject233(){var data=_tagged_template_literal(["{limit: ","}"]);_templateObject233=function _templateObject1(){return data};return data}function _templateObject234(){var data=_tagged_template_literal(["must contain at least "," valid item(s)"]);_templateObject234=function _templateObject1(){return data};return data}function _templateObject235(){var data=_tagged_template_literal(["must contain at least "," and no more than "," valid item(s)"]);_templateObject235=function _templateObject1(){return data};return data}function _templateObject236(){var data=_tagged_template_literal(["{minContains: ","}"]);_templateObject236=function _templateObject1(){return data};return data}function _templateObject237(){var data=_tagged_template_literal(["{minContains: ",", maxContains: ","}"]);_templateObject237=function _templateObject1(){return data};return data}function _templateObject238(){var data=_tagged_template_literal(["",".length"]);_templateObject238=function _templateObject1(){return data};return data}function _templateObject239(){var data=_tagged_template_literal([""," >= ",""]);_templateObject239=function _templateObject1(){return data};return data}function _templateObject240(){var data=_tagged_template_literal([""," && "," <= ",""]);_templateObject240=function _templateObject1(){return data};return data}function _templateObject241(){var data=_tagged_template_literal(["",".length > 0"]);_templateObject241=function _templateObject1(){return data};return data}function _templateObject242(){var data=_tagged_template_literal(["","++"]);_templateObject242=function _templateObject1(){return data};return data}function _templateObject243(){var data=_tagged_template_literal([""," >= ",""]);_templateObject243=function _templateObject1(){return data};return data}function _templateObject244(){var data=_tagged_template_literal([""," > ",""]);_templateObject244=function _templateObject1(){return data};return data}function _templateObject245(){var data=_tagged_template_literal([""," >= ",""]);_templateObject245=function _templateObject1(){return data};return data}function _templateObject246(){var data=_tagged_template_literal([""," && (",")"]);_templateObject246=function _templateObject1(){return data};return data}function _templateObject247(){var data=_tagged_template_literal(["must have "," "," when property "," is present"]);_templateObject247=function _templateObject1(){return data};return data}function _templateObject248(){var data=_tagged_template_literal(["{property: ",",\n missingProperty: ",",\n depsCount: ",",\n deps: ","}"]);_templateObject248=function _templateObject1(){return data};return data}function _templateObject249(){var data=_tagged_template_literal(["{propertyName: ","}"]);_templateObject249=function _templateObject1(){return data};return data}function _templateObject250(){var data=_tagged_template_literal(["{additionalProperty: ","}"]);_templateObject250=function _templateObject1(){return data};return data}function _templateObject251(){var data=_tagged_template_literal([""," === ",""]);_templateObject251=function _templateObject1(){return data};return data}function _templateObject252(){var data=_tagged_template_literal([""," === ",""]);_templateObject252=function _templateObject1(){return data};return data}function _templateObject253(){var data=_tagged_template_literal(["",".test(",")"]);_templateObject253=function _templateObject1(){return data};return data}function _templateObject254(){var data=_tagged_template_literal(["delete ","[","]"]);_templateObject254=function _templateObject1(){return data};return data}function _templateObject255(){var data=_tagged_template_literal(["",".test(",")"]);_templateObject255=function _templateObject1(){return data};return data}function _templateObject256(){var data=_tagged_template_literal(["","[","]"]);_templateObject256=function _templateObject1(){return data};return data}function _templateObject257(){var data=_tagged_template_literal(["{passingSchemas: ","}"]);_templateObject257=function _templateObject1(){return data};return data}function _templateObject258(){var data=_tagged_template_literal([""," && ",""]);_templateObject258=function _templateObject1(){return data};return data}function _templateObject259(){var data=_tagged_template_literal(["[",", ","]"]);_templateObject259=function _templateObject1(){return data};return data}function _templateObject260(){var data=_tagged_template_literal(['must match "','" schema']);_templateObject260=function _templateObject1(){return data};return data}function _templateObject261(){var data=_tagged_template_literal(["{failingKeyword: ","}"]);_templateObject261=function _templateObject1(){return data};return data}function _templateObject262(){var data=_tagged_template_literal(["",""]);_templateObject262=function _templateObject1(){return data};return data}function _templateObject263(){var data=_tagged_template_literal(['must match format "','"']);_templateObject263=function _templateObject1(){return data};return data}function _templateObject264(){var data=_tagged_template_literal(["{format: ","}"]);_templateObject264=function _templateObject1(){return data};return data}function _templateObject265(){var data=_tagged_template_literal(["","[","]"]);_templateObject265=function _templateObject1(){return data};return data}function _templateObject266(){var data=_tagged_template_literal(["typeof ",' == "object" && !('," instanceof RegExp)"]);_templateObject266=function _templateObject1(){return data};return data}function _templateObject267(){var data=_tagged_template_literal(["",'.type || "string"']);_templateObject267=function _templateObject1(){return data};return data}function _templateObject268(){var data=_tagged_template_literal(["",".validate"]);_templateObject268=function _templateObject1(){return data};return data}function _templateObject269(){var data=_tagged_template_literal(['"string"']);_templateObject269=function _templateObject1(){return data};return data}function _templateObject270(){var data=_tagged_template_literal([""," && !",""]);_templateObject270=function _templateObject1(){return data};return data}function _templateObject271(){var data=_tagged_template_literal(["(",".async ? await ","(",") : ","(","))"]);_templateObject271=function _templateObject1(){return data};return data}function _templateObject272(){var data=_tagged_template_literal(["","(",")"]);_templateObject272=function _templateObject1(){return data};return data}function _templateObject273(){var data=_tagged_template_literal(["(typeof ",' == "function" ? '," : ",".test(","))"]);_templateObject273=function _templateObject1(){return data};return data}function _templateObject274(){var data=_tagged_template_literal([""," && "," !== true && "," === "," && !",""]);_templateObject274=function _templateObject1(){return data};return data}function _templateObject275(){var data=_tagged_template_literal(["","",""]);_templateObject275=function _templateObject1(){return data};return data}function _templateObject276(){var data=_tagged_template_literal(["",".validate"]);_templateObject276=function _templateObject1(){return data};return data}function _templateObject277(){var data=_tagged_template_literal(["await ","(",")"]);_templateObject277=function _templateObject1(){return data};return data}function _templateObject278(){var data=_tagged_template_literal(["","(",")"]);_templateObject278=function _templateObject1(){return data};return data}function _templateObject279(){var data=_tagged_template_literal(["",".test(",")"]);_templateObject279=function _templateObject1(){return data};return data}function _templateObject280(){var data=_tagged_template_literal(["{error: ",", tag: ",", tagValue: ","}"]);_templateObject280=function _templateObject1(){return data};return data}function _templateObject281(){var data=_tagged_template_literal(["","",""]);_templateObject281=function _templateObject1(){return data};return data}function _templateObject282(){var data=_tagged_template_literal(["typeof ",' == "string"']);_templateObject282=function _templateObject1(){return data};return data}function _templateObject283(){var data=_tagged_template_literal([""," === ",""]);_templateObject283=function _templateObject1(){return data};return data}function _templateObject284(){var data=_tagged_template_literal(["should be "," ",""]);_templateObject284=function _templateObject1(){return data};return data}function _templateObject285(){var data=_tagged_template_literal(["{comparison: ",", limit: ","}"]);_templateObject285=function _templateObject1(){return data};return data}function _templateObject286(){var data=_tagged_template_literal(["","[","]"]);_templateObject286=function _templateObject1(){return data};return data}function _templateObject287(){var data=_tagged_template_literal(["typeof ",' != "object"']);_templateObject287=function _templateObject1(){return data};return data}function _templateObject288(){var data=_tagged_template_literal([""," instanceof RegExp"]);_templateObject288=function _templateObject1(){return data};return data}function _templateObject289(){var data=_tagged_template_literal(["typeof ",'.compare != "function"']);_templateObject289=function _templateObject1(){return data};return data}function _templateObject290(){var data=_tagged_template_literal(["","",""]);_templateObject290=function _templateObject1(){return data};return data}function _templateObject291(){var data=_tagged_template_literal(["",".compare(",", ",") "," 0"]);_templateObject291=function _templateObject1(){return data};return data}function _templateObject292(){var data=_tagged_template_literal(['require("ajv-formats/dist/formats").',""]);_templateObject292=function _templateObject1(){return data};return data}var Bgt=Object.create;var q6=Object.defineProperty;var Wgt=Object.getOwnPropertyDescriptor;var Vgt=Object.getOwnPropertyNames;var Ggt=Object.getPrototypeOf,Hgt=Object.prototype.hasOwnProperty;var Zgt=function(e,t,r){return t in e?q6(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r};var P=function(e,t){return function(){return t||e((t={exports:{}}).exports,t),t.exports}},ku=function(e,t){for(var r in t)q6(e,r,{get:t[r],enumerable:!0})},Nde=function(e,t,r,n){var _iteratorNormalCompletion=true,_didIteratorError=false,_iteratorError=undefined;if(t&&(typeof t==="undefined"?"undefined":_type_of(t))=="object"||typeof t=="function")try{var _loop=function(){var i=_step.value;!Hgt.call(e,i)&&i!==r&&q6(e,i,{get:function(){return t[i]},enumerable:!(n=Wgt(t,i))||n.enumerable})};for(var _iterator=Vgt(t)[Symbol.iterator](),_step;!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=true)_loop()}catch(err){_didIteratorError=true;_iteratorError=err}finally{try{if(!_iteratorNormalCompletion&&_iterator.return!=null){_iterator.return()}}finally{if(_didIteratorError){throw _iteratorError}}}return e};var Yt=function(e,t,r){return r=e!=null?Bgt(Ggt(e)):{},Nde(t||!e||!e.__esModule?q6(r,"default",{value:e,enumerable:!0}):r,e)},Kgt=function(e){return Nde(q6({},"__esModule",{value:!0}),e)};var C=function(e,t,r){return Zgt(e,(typeof t==="undefined"?"undefined":_type_of(t))!="symbol"?t+"":t,r),r},Nz=function(e,t,r){if(!t.has(e))throw TypeError("Cannot "+r)};var _e=function(e,t,r){return Nz(e,t,"read from private field"),r?r.call(e):t.get(e)},Ir=function(e,t,r){if(t.has(e))throw TypeError("Cannot add the same private member more than once");_instanceof(t,WeakSet)?t.add(e):t.set(e,r)},dr=function(e,t,r,n){return Nz(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r};var Hr=function(e,t,r){return Nz(e,t,"access private method"),r};var qde=P(function(L6){var Dde=function Dde(e){for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",r=[],n=0;n>2,d=(i&3)<<4|o>>4,u=(o&15)<<2|l>>6,p=l&63;s||(p=64,a||(u=64)),r.push(t[c],t[d],t[u],t[p])}return r.join("")};(function(e){(function(t){typeof define=="function"&&define.amd?define(["exports"],t):(typeof L6==="undefined"?"undefined":_type_of(L6))=="object"&&typeof L6.nodeName!="string"?t(L6):t(e)})(function(t){"use strict";var r=e.BlobBuilder||e.WebKitBlobBuilder||e.MSBlobBuilder||e.MozBlobBuilder,n=e.URL||e.webkitURL||function(T,I){return I=document.createElement("a"),I.href=T,I},i=e.Blob,a=n.createObjectURL,o=n.revokeObjectURL,s=e.Symbol&&e.Symbol.toStringTag,l=!1,c=!1,d=r&&r.prototype.append&&r.prototype.getBlob;try{l=new Blob(["\xe4"]).size===2,c=new Blob([new Uint8Array([1,2])]).size===2}catch(T){}function u(T){return T.map(function(I){if(_instanceof(I.buffer,ArrayBuffer)){var A=I.buffer;if(I.byteLength!==A.byteLength){var O=new Uint8Array(I.byteLength);O.set(new Uint8Array(A,I.byteOffset,I.byteLength)),A=O.buffer}return A}return I})}function p(T,I){I=I||{};var A=new r;return u(T).forEach(function(O){A.append(O)}),I.type?A.getBlob(I.type):A.getBlob()}function m(T,I){return new i(u(T),I||{})}e.Blob&&(p.prototype=e.Blob.prototype,m.prototype=e.Blob.prototype);function h(T){for(var I=0,A=T.length,O=e.Uint8Array||Array,R=0,M=Math.max(32,A+(A>>1)+7),N=new O(M>>3<<3);I=55296&&q<=56319){if(I=55296&&q<=56319)continue}if(R+4>N.length){M+=8,M*=1+I/T.length*2,M=M>>3<<3;var F=new Uint8Array(M);F.set(N),N=F}if(q&0xffffff80)if(!(q&0xfffff800))N[R++]=q>>6&31|192;else if(!(q&0xffff0000))N[R++]=q>>12&15|224,N[R++]=q>>6&63|128;else if(!(q&0xffe00000))N[R++]=q>>18&7|240,N[R++]=q>>12&63|128,N[R++]=q>>6&63|128;else continue;else{N[R++]=q;continue}N[R++]=q&63|128}return N.slice(0,R)}function g(T){for(var I=T.length,A=[],O=0;O239?4:R>223?3:R>191?2:1;if(O+N<=I){var q,L,F,Q;switch(N){case 1:R<128&&(M=R);break;case 2:q=T[O+1],(q&192)===128&&(Q=(R&31)<<6|q&63,Q>127&&(M=Q));break;case 3:q=T[O+1],L=T[O+2],(q&192)===128&&(L&192)===128&&(Q=(R&15)<<12|(q&63)<<6|L&63,Q>2047&&(Q<55296||Q>57343)&&(M=Q));break;case 4:q=T[O+1],L=T[O+2],F=T[O+3],(q&192)===128&&(L&192)===128&&(F&192)===128&&(Q=(R&15)<<18|(q&63)<<12|(L&63)<<6|F&63,Q>65535&&Q<1114112&&(M=Q))}}M===null?(M=65533,N=1):M>65535&&(M-=65536,A.push(M>>>10&1023|55296),M=56320|M&1023),A.push(M),O+=N}for(var de=A.length,D="",j=0;j=A.size&&O.close()})}})}}catch(T){try{new ReadableStream({}),S=function S(A){var O=0;return new ReadableStream({pull:function pull(R){var M=A.slice(O,O+524288);return M.arrayBuffer().then(function(N){O+=N.byteLength;var q=new Uint8Array(N);R.enqueue(q),O==A.size&&R.close()})}})}}catch(I){try{new Response("").body.getReader().read(),S=function S(){return new Response(this).body}}catch(A){S=function S(){throw new Error("Include https://github.com/MattiasBuelens/web-streams-polyfill")}}}}function E(T){return new Promise(function(I,A){T.onload=T.onerror=function(O){T.onload=T.onerror=null,O.type==="load"?I(T.result||T):A(new Error("Failed to read the blob/file"))}})}w.arrayBuffer||(w.arrayBuffer=function(){var I=new t.FileReader;return I.readAsArrayBuffer(this),E(I)}),w.text||(w.text=function(){var I=new t.FileReader;return I.readAsText(this),E(I)}),w.stream||(w.stream=S)})})(typeof self!="undefined"&&self||typeof window!="undefined"&&window||typeof global!="undefined"&&global||L6)});var ut=P(function(Dz,Lde){"use strict";var F6=function F6(e){return e&&e.Math===Math&&e};Lde.exports=F6((typeof globalThis==="undefined"?"undefined":_type_of(globalThis))=="object"&&globalThis)||F6((typeof window==="undefined"?"undefined":_type_of(window))=="object"&&window)||F6((typeof self==="undefined"?"undefined":_type_of(self))=="object"&&self)||F6((typeof global==="undefined"?"undefined":_type_of(global))=="object"&&global)||F6((typeof Dz==="undefined"?"undefined":_type_of(Dz))=="object"&&Dz)||function(){return this}()||Function("return this")()});var We=P(function(nan,Fde){"use strict";Fde.exports=function(e){try{return!!e()}catch(t){return!0}}});var rr=P(function(ian,zde){"use strict";var Qgt=We();zde.exports=!Qgt(function(){return Object.defineProperty({},1,{get:function get1(){return 7}})[1]!==7})});var qy=P(function(aan,jde){"use strict";var Jgt=We();jde.exports=!Jgt(function(){var e=(function(){}).bind();return typeof e!="function"||e.hasOwnProperty("prototype")})});var Ft=P(function(oan,Ude){"use strict";var Ygt=qy(),_C=Function.prototype.call;Ude.exports=Ygt?_C.bind(_C):function(){return _C.apply(_C,arguments)}});var z6=P(function(Vde){"use strict";var Bde={}.propertyIsEnumerable,Wde=Object.getOwnPropertyDescriptor,Xgt=Wde&&!Bde.call({1:2},1);Vde.f=Xgt?function(t){var r=Wde(this,t);return!!r&&r.enumerable}:Bde});var Cl=P(function(lan,Gde){"use strict";Gde.exports=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}}});var Ze=P(function(uan,Kde){"use strict";var Hde=qy(),Zde=Function.prototype,qz=Zde.call,e1t=Hde&&Zde.bind.bind(qz,qz);Kde.exports=Hde?e1t:function(e){return function(){return qz.apply(e,arguments)}}});var as=P(function(can,Jde){"use strict";var Qde=Ze(),t1t=Qde({}.toString),r1t=Qde("".slice);Jde.exports=function(e){return r1t(t1t(e),8,-1)}});var P1=P(function(dan,Yde){"use strict";var n1t=Ze(),i1t=We(),a1t=as(),Lz=Object,o1t=n1t("".split);Yde.exports=i1t(function(){return!Lz("z").propertyIsEnumerable(0)})?function(e){return a1t(e)==="String"?o1t(e,""):Lz(e)}:Lz});var Pp=P(function(pan,Xde){"use strict";Xde.exports=function(e){return e==null}});var Wi=P(function(fan,epe){"use strict";var s1t=Pp(),l1t=TypeError;epe.exports=function(e){if(s1t(e))throw new l1t("Can't call method on "+e);return e}});var go=P(function(man,tpe){"use strict";var u1t=P1(),c1t=Wi();tpe.exports=function(e){return u1t(c1t(e))}});var fn=P(function(han,rpe){"use strict";var Fz=(typeof document==="undefined"?"undefined":_type_of(document))=="object"&&document.all;rpe.exports=typeof Fz=="undefined"&&Fz!==void 0?function(e){return typeof e=="function"||e===Fz}:function(e){return typeof e=="function"}});var pr=P(function(gan,npe){"use strict";var d1t=fn();npe.exports=function(e){return(typeof e==="undefined"?"undefined":_type_of(e))=="object"?e!==null:d1t(e)}});var Zr=P(function(xan,ipe){"use strict";var zz=ut(),p1t=fn(),f1t=function f1t(e){return p1t(e)?e:void 0};ipe.exports=function(e,t){return arguments.length<2?f1t(zz[e]):zz[e]&&zz[e][t]}});var Ps=P(function(van,ape){"use strict";var m1t=Ze();ape.exports=m1t({}.isPrototypeOf)});var _d=P(function(yan,lpe){"use strict";var h1t=ut(),ope=h1t.navigator,spe=ope&&ope.userAgent;lpe.exports=spe?String(spe):""});var wd=P(function(_an,mpe){"use strict";var fpe=ut(),jz=_d(),upe=fpe.process,cpe=fpe.Deno,dpe=upe&&upe.versions||cpe&&cpe.version,ppe=dpe&&dpe.v8,bd,bC;ppe&&(bd=ppe.split("."),bC=bd[0]>0&&bd[0]<4?1:+(bd[0]+bd[1]));!bC&&jz&&(bd=jz.match(/Edge\/(\d+)/),(!bd||bd[1]>=74)&&(bd=jz.match(/Chrome\/(\d+)/),bd&&(bC=+bd[1])));mpe.exports=bC});var Wh=P(function(ban,gpe){"use strict";var hpe=wd(),g1t=We(),x1t=ut(),v1t=x1t.String;gpe.exports=!!Object.getOwnPropertySymbols&&!g1t(function(){var e=Symbol("symbol detection");return!v1t(e)||!_instanceof(Object(e),Symbol)||!Symbol.sham&&hpe&&hpe<41})});var Uz=P(function(wan,xpe){"use strict";var y1t=Wh();xpe.exports=y1t&&!Symbol.sham&&_type_of(Symbol.iterator)=="symbol"});var Vh=P(function(San,vpe){"use strict";var _1t=Zr(),b1t=fn(),w1t=Ps(),S1t=Uz(),k1t=Object;vpe.exports=S1t?function(e){return(typeof e==="undefined"?"undefined":_type_of(e))=="symbol"}:function(e){var t=_1t("Symbol");return b1t(t)&&w1t(t.prototype,k1t(e))}});var Gh=P(function(kan,ype){"use strict";var E1t=String;ype.exports=function(e){try{return E1t(e)}catch(t){return"Object"}}});var tn=P(function(Ean,_pe){"use strict";var T1t=fn(),I1t=Gh(),C1t=TypeError;_pe.exports=function(e){if(T1t(e))return e;throw new C1t(I1t(e)+" is not a function")}});var Do=P(function(Tan,bpe){"use strict";var A1t=tn(),P1t=Pp();bpe.exports=function(e,t){var r=e[t];return P1t(r)?void 0:A1t(r)}});var Gz=P(function(Ian,wpe){"use strict";var Bz=Ft(),Wz=fn(),Vz=pr(),O1t=TypeError;wpe.exports=function(e,t){var r,n;if(t==="string"&&Wz(r=e.toString)&&!Vz(n=Bz(r,e))||Wz(r=e.valueOf)&&!Vz(n=Bz(r,e))||t!=="string"&&Wz(r=e.toString)&&!Vz(n=Bz(r,e)))return n;throw new O1t("Can't convert object to primitive value")}});var Un=P(function(Can,Spe){"use strict";Spe.exports=!1});var wC=P(function(Aan,Epe){"use strict";var kpe=ut(),R1t=Object.defineProperty;Epe.exports=function(e,t){try{R1t(kpe,e,{value:t,configurable:!0,writable:!0})}catch(r){kpe[e]=t}return t}});var j6=P(function(Pan,Cpe){"use strict";var M1t=Un(),$1t=ut(),N1t=wC(),Tpe="__core-js_shared__",Ipe=Cpe.exports=$1t[Tpe]||N1t(Tpe,{});(Ipe.versions||(Ipe.versions=[])).push({version:"3.47.0",mode:M1t?"pure":"global",copyright:"\xa9 2014-2025 Denis Pushkarev (zloirock.ru), 2025 CoreJS Company (core-js.io)",license:"https://github.com/zloirock/core-js/blob/v3.47.0/LICENSE",source:"https://github.com/zloirock/core-js"})});var O1=P(function(Oan,Ppe){"use strict";var Ape=j6();Ppe.exports=function(e,t){return Ape[e]||(Ape[e]=t||{})}});var qn=P(function(Ran,Ope){"use strict";var D1t=Wi(),q1t=Object;Ope.exports=function(e){return q1t(D1t(e))}});var Kr=P(function(Man,Rpe){"use strict";var L1t=Ze(),F1t=qn(),z1t=L1t({}.hasOwnProperty);Rpe.exports=Object.hasOwn||function(t,r){return z1t(F1t(t),r)}});var Hh=P(function($an,Mpe){"use strict";var j1t=Ze(),U1t=0,B1t=Math.random(),W1t=j1t(1.1.toString);Mpe.exports=function(e){return"Symbol("+(e===void 0?"":e)+")_"+W1t(++U1t+B1t,36)}});var _r=P(function(Nan,Npe){"use strict";var V1t=ut(),G1t=O1(),$pe=Kr(),H1t=Hh(),Z1t=Wh(),K1t=Uz(),Ly=V1t.Symbol,Hz=G1t("wks"),Q1t=K1t?Ly.for||Ly:Ly&&Ly.withoutSetter||H1t;Npe.exports=function(e){return $pe(Hz,e)||(Hz[e]=Z1t&&$pe(Ly,e)?Ly[e]:Q1t("Symbol."+e)),Hz[e]}});var U6=P(function(Dan,Lpe){"use strict";var J1t=Ft(),Dpe=pr(),qpe=Vh(),Y1t=Do(),X1t=Gz(),ext=_r(),txt=TypeError,rxt=ext("toPrimitive");Lpe.exports=function(e,t){if(!Dpe(e)||qpe(e))return e;var r=Y1t(e,rxt),n;if(r){if(t===void 0&&(t="default"),n=J1t(r,e,t),!Dpe(n)||qpe(n))return n;throw new txt("Can't convert object to primitive value")}return t===void 0&&(t="number"),X1t(e,t)}});var tm=P(function(qan,Fpe){"use strict";var nxt=U6(),ixt=Vh();Fpe.exports=function(e){var t=nxt(e,"string");return ixt(t)?t:t+""}});var B6=P(function(Lan,jpe){"use strict";var axt=ut(),zpe=pr(),Zz=axt.document,oxt=zpe(Zz)&&zpe(Zz.createElement);jpe.exports=function(e){return oxt?Zz.createElement(e):{}}});var Kz=P(function(Fan,Upe){"use strict";var sxt=rr(),lxt=We(),uxt=B6();Upe.exports=!sxt&&!lxt(function(){return Object.defineProperty(uxt("div"),"a",{get:function get1(){return 7}}).a!==7})});var qo=P(function(Wpe){"use strict";var cxt=rr(),dxt=Ft(),pxt=z6(),fxt=Cl(),mxt=go(),hxt=tm(),gxt=Kr(),xxt=Kz(),Bpe=Object.getOwnPropertyDescriptor;Wpe.f=cxt?Bpe:function(t,r){if(t=mxt(t),r=hxt(r),xxt)try{return Bpe(t,r)}catch(n){}if(gxt(t,r))return fxt(!dxt(pxt.f,t,r),t[r])}});var Qz=P(function(jan,Vpe){"use strict";var vxt=rr(),yxt=We();Vpe.exports=vxt&&yxt(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42})});var Ht=P(function(Uan,Gpe){"use strict";var _xt=pr(),bxt=String,wxt=TypeError;Gpe.exports=function(e){if(_xt(e))return e;throw new wxt(bxt(e)+" is not an object")}});var Ni=P(function(Zpe){"use strict";var Sxt=rr(),kxt=Kz(),Ext=Qz(),SC=Ht(),Hpe=tm(),Txt=TypeError,Jz=Object.defineProperty,Ixt=Object.getOwnPropertyDescriptor,Yz="enumerable",Xz="configurable",ej="writable";Zpe.f=Sxt?Ext?function(t,r,n){if(SC(t),r=Hpe(r),SC(n),typeof t=="function"&&r==="prototype"&&"value"in n&&ej in n&&!n[ej]){var i=Ixt(t,r);i&&i[ej]&&(t[r]=n.value,n={configurable:Xz in n?n[Xz]:i[Xz],enumerable:Yz in n?n[Yz]:i[Yz],writable:!1})}return Jz(t,r,n)}:Jz:function(t,r,n){if(SC(t),r=Hpe(r),SC(n),kxt)try{return Jz(t,r,n)}catch(i){}if("get"in n||"set"in n)throw new Txt("Accessors not supported");return"value"in n&&(t[r]=n.value),t}});var Lo=P(function(Wan,Kpe){"use strict";var Cxt=rr(),Axt=Ni(),Pxt=Cl();Kpe.exports=Cxt?function(e,t,r){return Axt.f(e,t,Pxt(1,r))}:function(e,t,r){return e[t]=r,e}});var R1=P(function(Van,Jpe){"use strict";var tj=rr(),Oxt=Kr(),Qpe=Function.prototype,Rxt=tj&&Object.getOwnPropertyDescriptor,rj=Oxt(Qpe,"name"),Mxt=rj&&(function(){}).name==="something",$xt=rj&&(!tj||tj&&Rxt(Qpe,"name").configurable);Jpe.exports={EXISTS:rj,PROPER:Mxt,CONFIGURABLE:$xt}});var kC=P(function(Gan,Ype){"use strict";var Nxt=Ze(),Dxt=fn(),nj=j6(),qxt=Nxt(Function.toString);Dxt(nj.inspectSource)||(nj.inspectSource=function(e){return qxt(e)});Ype.exports=nj.inspectSource});var ij=P(function(Han,efe){"use strict";var Lxt=ut(),Fxt=fn(),Xpe=Lxt.WeakMap;efe.exports=Fxt(Xpe)&&/native code/.test(String(Xpe))});var W6=P(function(Zan,rfe){"use strict";var zxt=O1(),jxt=Hh(),tfe=zxt("keys");rfe.exports=function(e){return tfe[e]||(tfe[e]=jxt(e))}});var Fy=P(function(Kan,nfe){"use strict";nfe.exports={}});var Di=P(function(Qan,ofe){"use strict";var Uxt=ij(),afe=ut(),Bxt=pr(),Wxt=Lo(),aj=Kr(),oj=j6(),Vxt=W6(),Gxt=Fy(),ife="Object already initialized",sj=afe.TypeError,Hxt=afe.WeakMap,EC,V6,TC,Zxt=function Zxt(e){return TC(e)?V6(e):EC(e,{})},Kxt=function Kxt(e){return function(t){var r;if(!Bxt(t)||(r=V6(t)).type!==e)throw new sj("Incompatible receiver, "+e+" required");return r}};Uxt||oj.state?(Sd=oj.state||(oj.state=new Hxt),Sd.get=Sd.get,Sd.has=Sd.has,Sd.set=Sd.set,EC=function EC(e,t){if(Sd.has(e))throw new sj(ife);return t.facade=e,Sd.set(e,t),t},V6=function V6(e){return Sd.get(e)||{}},TC=function TC(e){return Sd.has(e)}):(M1=Vxt("state"),Gxt[M1]=!0,EC=function EC(e,t){if(aj(e,M1))throw new sj(ife);return t.facade=e,Wxt(e,M1,t),t},V6=function V6(e){return aj(e,M1)?e[M1]:{}},TC=function TC(e){return aj(e,M1)});var Sd,M1;ofe.exports={set:EC,get:V6,has:TC,enforce:Zxt,getterFor:Kxt}});var AC=P(function(Jan,ufe){"use strict";var uj=Ze(),Qxt=We(),Jxt=fn(),IC=Kr(),lj=rr(),Yxt=R1().CONFIGURABLE,Xxt=kC(),lfe=Di(),evt=lfe.enforce,tvt=lfe.get,sfe=String,CC=Object.defineProperty,rvt=uj("".slice),nvt=uj("".replace),ivt=uj([].join),avt=lj&&!Qxt(function(){return CC(function(){},"length",{value:8}).length!==8}),ovt=String(String).split("String"),svt=ufe.exports=function svt(e,t,r){rvt(sfe(t),0,7)==="Symbol("&&(t="["+nvt(sfe(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),r&&r.getter&&(t="get "+t),r&&r.setter&&(t="set "+t),(!IC(e,"name")||Yxt&&e.name!==t)&&(lj?CC(e,"name",{value:t,configurable:!0}):e.name=t),avt&&r&&IC(r,"arity")&&e.length!==r.arity&&CC(e,"length",{value:r.arity});try{r&&IC(r,"constructor")&&r.constructor?lj&&CC(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(i){}var n=evt(e);return IC(n,"source")||(n.source=ivt(ovt,typeof t=="string"?t:"")),e};Function.prototype.toString=svt(function(){return Jxt(this)&&tvt(this).source||Xxt(this)},"toString")});var Xn=P(function(Yan,cfe){"use strict";var lvt=fn(),uvt=Ni(),cvt=AC(),dvt=wC();cfe.exports=function(e,t,r,n){n||(n={});var i=n.enumerable,a=n.name!==void 0?n.name:t;if(lvt(r)&&cvt(r,a,n),n.global)i?e[t]=r:dvt(t,r);else{try{n.unsafe?e[t]&&(i=!0):delete e[t]}catch(o){}i?e[t]=r:uvt.f(e,t,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return e}});var cj=P(function(Xan,dfe){"use strict";var pvt=Math.ceil,fvt=Math.floor;dfe.exports=Math.trunc||function(t){var r=+t;return(r>0?fvt:pvt)(r)}});var la=P(function(eon,pfe){"use strict";var mvt=cj();pfe.exports=function(e){var t=+e;return t!==t||t===0?0:mvt(t)}});var Op=P(function(ton,ffe){"use strict";var hvt=la(),gvt=Math.max,xvt=Math.min;ffe.exports=function(e,t){var r=hvt(e);return r<0?gvt(r+t,0):xvt(r,t)}});var Al=P(function(ron,mfe){"use strict";var vvt=la(),yvt=Math.min;mfe.exports=function(e){var t=vvt(e);return t>0?yvt(t,0x1fffffffffffff):0}});var ei=P(function(non,hfe){"use strict";var _vt=Al();hfe.exports=function(e){return _vt(e.length)}});var zy=P(function(ion,xfe){"use strict";var bvt=go(),wvt=Op(),Svt=ei(),gfe=function gfe(e){return function(t,r,n){var i=bvt(t),a=Svt(i);if(a===0)return!e&&-1;var o=wvt(n,a),s;if(e&&r!==r){for(;a>o;)if(s=i[o++],s!==s)return!0}else for(;a>o;o++)if((e||o in i)&&i[o]===r)return e||o||0;return!e&&-1}};xfe.exports={includes:gfe(!0),indexOf:gfe(!1)}});var pj=P(function(aon,yfe){"use strict";var kvt=Ze(),dj=Kr(),Evt=go(),Tvt=zy().indexOf,Ivt=Fy(),vfe=kvt([].push);yfe.exports=function(e,t){var r=Evt(e),n=0,i=[],a;for(a in r)!dj(Ivt,a)&&dj(r,a)&&vfe(i,a);for(;t.length>n;)dj(r,a=t[n++])&&(~Tvt(i,a)||vfe(i,a));return i}});var PC=P(function(oon,_fe){"use strict";_fe.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]});var Zh=P(function(bfe){"use strict";var Cvt=pj(),Avt=PC(),Pvt=Avt.concat("length","prototype");bfe.f=Object.getOwnPropertyNames||function(t){return Cvt(t,Pvt)}});var G6=P(function(wfe){"use strict";wfe.f=Object.getOwnPropertySymbols});var OC=P(function(uon,Sfe){"use strict";var Ovt=Zr(),Rvt=Ze(),Mvt=Zh(),$vt=G6(),Nvt=Ht(),Dvt=Rvt([].concat);Sfe.exports=Ovt("Reflect","ownKeys")||function(t){var r=Mvt.f(Nvt(t)),n=$vt.f;return n?Dvt(r,n(t)):r}});var $1=P(function(con,Efe){"use strict";var kfe=Kr(),qvt=OC(),Lvt=qo(),Fvt=Ni();Efe.exports=function(e,t,r){for(var n=qvt(t),i=Fvt.f,a=Lvt.f,o=0;oo;)myt.f(t,s=i[o++],n[s]);return t}});var fj=P(function(von,$fe){"use strict";var vyt=Zr();$fe.exports=vyt("document","documentElement")});var Fo=P(function(yon,jfe){"use strict";var yyt=Ht(),_yt=NC(),Nfe=PC(),byt=Fy(),wyt=fj(),Syt=B6(),kyt=W6(),Dfe=">",qfe="<",hj="prototype",gj="script",Ffe=kyt("IE_PROTO"),mj=function mj(){},zfe=function zfe(e){return qfe+gj+Dfe+e+qfe+"/"+gj+Dfe},Lfe=function Lfe(e){e.write(zfe("")),e.close();var t=e.parentWindow.Object;return e=null,t},Eyt=function Eyt(){var e=Syt("iframe"),t="java"+gj+":",r;return e.style.display="none",wyt.appendChild(e),e.src=String(t),r=e.contentWindow.document,r.open(),r.write(zfe("document.F=Object")),r.close(),r.F},DC,qC=function qC1(){try{DC=new ActiveXObject("htmlfile")}catch(t){}qC=typeof document!="undefined"?document.domain&&DC?Lfe(DC):Eyt():Lfe(DC);for(var e=Nfe.length;e--;)delete qC[hj][Nfe[e]];return qC()};byt[Ffe]=!0;jfe.exports=Object.create||function(t,r){var n;return t!==null?(mj[hj]=yyt(t),n=new mj,mj[hj]=null,n[Ffe]=t):n=qC(),r===void 0?n:_yt.f(n,r)}});var Eu=P(function(_on,Ufe){"use strict";var Tyt=Ze();Ufe.exports=Tyt([].slice)});var LC=P(function(bon,Vfe){"use strict";var Iyt=as(),Cyt=go(),Bfe=Zh().f,Ayt=Eu(),Wfe=(typeof window==="undefined"?"undefined":_type_of(window))=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],Pyt=function Pyt(e){try{return Bfe(e)}catch(t){return Ayt(Wfe)}};Vfe.exports.f=function(t){return Wfe&&Iyt(t)==="Window"?Pyt(t):Bfe(Cyt(t))}});var ya=P(function(won,Hfe){"use strict";var Gfe=AC(),Oyt=Ni();Hfe.exports=function(e,t,r){return r.get&&Gfe(r.get,t,{getter:!0}),r.set&&Gfe(r.set,t,{setter:!0}),Oyt.f(e,t,r)}});var xj=P(function(Zfe){"use strict";var Ryt=_r();Zfe.f=Ryt});var Z6=P(function(kon,Kfe){"use strict";var Myt=ut();Kfe.exports=Myt});var os=P(function(Eon,Jfe){"use strict";var Qfe=Z6(),$yt=Kr(),Nyt=xj(),Dyt=Ni().f;Jfe.exports=function(e){var t=Qfe.Symbol||(Qfe.Symbol={});$yt(t,e)||Dyt(t,e,{value:Nyt.f(e)})}});var vj=P(function(Ton,Yfe){"use strict";var qyt=Ft(),Lyt=Zr(),Fyt=_r(),zyt=Xn();Yfe.exports=function(){var e=Lyt("Symbol"),t=e&&e.prototype,r=t&&t.valueOf,n=Fyt("toPrimitive");t&&!t[n]&&zyt(t,n,function(i){return qyt(r,this)},{arity:1})}});var Js=P(function(Ion,eme){"use strict";var jyt=Ni().f,Uyt=Kr(),Byt=_r(),Xfe=Byt("toStringTag");eme.exports=function(e,t,r){e&&!r&&(e=e.prototype),e&&!Uyt(e,Xfe)&&jyt(e,Xfe,{configurable:!0,value:t})}});var Kh=P(function(Con,tme){"use strict";var Wyt=as(),Vyt=Ze();tme.exports=function(e){if(Wyt(e)==="Function")return Vyt(e)}});var Ol=P(function(Aon,nme){"use strict";var rme=Kh(),Gyt=tn(),Hyt=qy(),Zyt=rme(rme.bind);nme.exports=function(e,t){return Gyt(e),t===void 0?e:Hyt?Zyt(e,t):function(){return e.apply(t,arguments)}}});var Rp=P(function(Pon,ime){"use strict";var Kyt=as();ime.exports=Array.isArray||function(t){return Kyt(t)==="Array"}});var Qh=P(function(Oon,ume){"use strict";var Qyt=Ze(),Jyt=We(),ame=fn(),Yyt=Pl(),Xyt=Zr(),e2t=kC(),ome=function ome(){},sme=Xyt("Reflect","construct"),yj=/^\s*(?:class|function)\b/,t2t=Qyt(yj.exec),r2t=!yj.test(ome),K6=function K6(t){if(!ame(t))return!1;try{return sme(ome,[],t),!0}catch(r){return!1}},lme=function lme(t){if(!ame(t))return!1;switch(Yyt(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return r2t||!!t2t(yj,e2t(t))}catch(r){return!0}};lme.sham=!0;ume.exports=!sme||Jyt(function(){var e;return K6(K6.call)||!K6(Object)||!K6(function(){e=!0})||e})?lme:K6});var fme=P(function(Ron,pme){"use strict";var cme=Rp(),n2t=Qh(),i2t=pr(),a2t=_r(),o2t=a2t("species"),dme=Array;pme.exports=function(e){var t;return cme(e)&&(t=e.constructor,n2t(t)&&(t===dme||cme(t.prototype))?t=void 0:i2t(t)&&(t=t[o2t],t===null&&(t=void 0))),t===void 0?dme:t}});var By=P(function(Mon,mme){"use strict";var s2t=fme();mme.exports=function(e,t){return new(s2t(e))(t===0?0:t)}});var zo=P(function($on,gme){"use strict";var l2t=Ol(),u2t=Ze(),c2t=P1(),d2t=qn(),p2t=ei(),f2t=By(),hme=u2t([].push),Jh=function Jh(e){var t=e===1,r=e===2,n=e===3,i=e===4,a=e===6,o=e===7,s=e===5||a;return function(l,c,d,u){for(var p=d2t(l),m=c2t(p),h=p2t(m),g=l2t(c,d),x=0,y=u||f2t,v=t?y(l,h):r||o?y(l,0):void 0,_,b;h>x;x++)if((s||x in m)&&(_=m[x],b=g(_,x,p),e))if(t)v[x]=b;else if(b)switch(e){case 3:return!0;case 5:return _;case 6:return x;case 2:hme(v,_)}else switch(e){case 4:return!1;case 7:hme(v,_)}return a?-1:n||i?i:v}};gme.exports={forEach:Jh(0),map:Jh(1),filter:Jh(2),some:Jh(3),every:Jh(4),find:Jh(5),findIndex:Jh(6),filterReject:Jh(7)}});var Mme=P(function(){"use strict";var FC=ne(),Y6=ut(),Cj=Ft(),m2t=Ze(),h2t=Un(),Wy=rr(),Vy=Wh(),g2t=We(),jo=Kr(),x2t=Ps(),Sj=Ht(),zC=go(),Aj=tm(),v2t=Cr(),kj=Cl(),Gy=Fo(),yme=Uy(),y2t=Zh(),_me=LC(),_2t=G6(),bme=qo(),wme=Ni(),b2t=NC(),Sme=z6(),_j=Xn(),w2t=ya(),Pj=O1(),S2t=W6(),kme=Fy(),xme=Hh(),k2t=_r(),E2t=xj(),T2t=os(),I2t=vj(),C2t=Js(),Eme=Di(),jC=zo().forEach,Rl=S2t("hidden"),UC="Symbol",J6="prototype",A2t=Eme.set,vme=Eme.getterFor(UC),pc=Object[J6],N1=Y6.Symbol,Q6=N1&&N1[J6],P2t=Y6.RangeError,O2t=Y6.TypeError,bj=Y6.QObject,Tme=bme.f,D1=wme.f,Ime=_me.f,R2t=Sme.f,Cme=m2t([].push),rm=Pj("symbols"),X6=Pj("op-symbols"),M2t=Pj("wks"),Ej=!bj||!bj[J6]||!bj[J6].findChild,Ame=function Ame(e,t,r){var n=Tme(pc,t);n&&delete pc[t],D1(e,t,r),n&&e!==pc&&D1(pc,t,n)},Tj=Wy&&g2t(function(){return Gy(D1({},"a",{get:function get1(){return D1(this,"a",{value:7}).a}})).a!==7})?Ame:D1,wj=function wj(e,t){var r=rm[e]=Gy(Q6);return A2t(r,{type:UC,tag:e,description:t}),Wy||(r.description=t),r},BC=function BC1(t,r,n){t===pc&&BC(X6,r,n),Sj(t);var i=Aj(r);return Sj(n),jo(rm,i)?(n.enumerable?(jo(t,Rl)&&t[Rl][i]&&(t[Rl][i]=!1),n=Gy(n,{enumerable:kj(0,!1)})):(jo(t,Rl)||D1(t,Rl,kj(1,Gy(null))),t[Rl][i]=!0),Tj(t,i,n)):D1(t,i,n)},Oj=function Oj(t,r){Sj(t);var n=zC(r),i=yme(n).concat(Rme(n));return jC(i,function(a){(!Wy||Cj(Ij,n,a))&&BC(t,a,n[a])}),t},$2t=function $2t(t,r){return r===void 0?Gy(t):Oj(Gy(t),r)},Ij=function Ij(t){var r=Aj(t),n=Cj(R2t,this,r);return this===pc&&jo(rm,r)&&!jo(X6,r)?!1:n||!jo(this,r)||!jo(rm,r)||jo(this,Rl)&&this[Rl][r]?n:!0},Pme=function Pme(t,r){var n=zC(t),i=Aj(r);if(!(n===pc&&jo(rm,i)&&!jo(X6,i))){var a=Tme(n,i);return a&&jo(rm,i)&&!(jo(n,Rl)&&n[Rl][i])&&(a.enumerable=!0),a}},Ome=function Ome(t){var r=Ime(zC(t)),n=[];return jC(r,function(i){!jo(rm,i)&&!jo(kme,i)&&Cme(n,i)}),n},Rme=function Rme(e){var t=e===pc,r=Ime(t?X6:zC(e)),n=[];return jC(r,function(i){jo(rm,i)&&(!t||jo(pc,i))&&Cme(n,rm[i])}),n};Vy||(N1=function N1(){if(x2t(Q6,this))throw new O2t("Symbol is not a constructor");var t=!arguments.length||arguments[0]===void 0?void 0:v2t(arguments[0]),r=xme(t),n=function n3(i){var a=this===void 0?Y6:this;a===pc&&Cj(n,X6,i),jo(a,Rl)&&jo(a[Rl],r)&&(a[Rl][r]=!1);var o=kj(1,i);try{Tj(a,r,o)}catch(s){if(!_instanceof(s,P2t))throw s;Ame(a,r,o)}};return Wy&&Ej&&Tj(pc,r,{configurable:!0,set:n}),wj(r,t)},Q6=N1[J6],_j(Q6,"toString",function(){return vme(this).tag}),_j(N1,"withoutSetter",function(e){return wj(xme(e),e)}),Sme.f=Ij,wme.f=BC,b2t.f=Oj,bme.f=Pme,y2t.f=_me.f=Ome,_2t.f=Rme,E2t.f=function(e){return wj(k2t(e),e)},Wy&&(w2t(Q6,"description",{configurable:!0,get:function get1(){return vme(this).description}}),h2t||_j(pc,"propertyIsEnumerable",Ij,{unsafe:!0})));FC({global:!0,constructor:!0,wrap:!0,forced:!Vy,sham:!Vy},{Symbol:N1});jC(yme(M2t),function(e){T2t(e)});FC({target:UC,stat:!0,forced:!Vy},{useSetter:function useSetter(){Ej=!0},useSimple:function useSimple(){Ej=!1}});FC({target:"Object",stat:!0,forced:!Vy,sham:!Wy},{create:$2t,defineProperty:BC,defineProperties:Oj,getOwnPropertyDescriptor:Pme});FC({target:"Object",stat:!0,forced:!Vy},{getOwnPropertyNames:Ome});I2t();C2t(N1,UC);kme[Rl]=!0});var Rj=P(function(qon,$me){"use strict";var N2t=Wh();$me.exports=N2t&&!!Symbol.for&&!!Symbol.keyFor});var Dme=P(function(){"use strict";var D2t=ne(),q2t=Zr(),L2t=Kr(),F2t=Cr(),Nme=O1(),z2t=Rj(),Mj=Nme("string-to-symbol-registry"),j2t=Nme("symbol-to-string-registry");D2t({target:"Symbol",stat:!0,forced:!z2t},{for:function _for(e){var t=F2t(e);if(L2t(Mj,t))return Mj[t];var r=q2t("Symbol")(t);return Mj[t]=r,j2t[r]=t,r}})});var Lme=P(function(){"use strict";var U2t=ne(),B2t=Kr(),W2t=Vh(),V2t=Gh(),G2t=O1(),H2t=Rj(),qme=G2t("symbol-to-string-registry");U2t({target:"Symbol",stat:!0,forced:!H2t},{keyFor:function keyFor(t){if(!W2t(t))throw new TypeError(V2t(t)+" is not a symbol");if(B2t(qme,t))return qme[t]}})});var Ml=P(function(Uon,Ume){"use strict";var Z2t=qy(),jme=Function.prototype,Fme=jme.apply,zme=jme.call;Ume.exports=(typeof Reflect==="undefined"?"undefined":_type_of(Reflect))=="object"&&Reflect.apply||(Z2t?zme.bind(Fme):function(){return zme.apply(Fme,arguments)})});var $j=P(function(Bon,Bme){"use strict";var K2t=pr(),Q2t=Di().get;Bme.exports=function(t){if(!K2t(t))return!1;var r=Q2t(t);return!!r&&r.type==="RawJSON"}});var Dj=P(function(Won,Hme){"use strict";var Nj=Ze(),J2t=Kr(),WC=SyntaxError,Y2t=parseInt,X2t=String.fromCharCode,e_t=Nj("".charAt),Wme=Nj("".slice),Vme=Nj(/./.exec),Gme={'\\"':'"',"\\\\":"\\","\\/":"/","\\b":"\b","\\f":"\f","\\n":"\n","\\r":"\r","\\t":" "},t_t=/^[\da-f]{4}$/i,r_t=/^[\u0000-\u001F]$/;Hme.exports=function(e,t){for(var r=!0,n="";ta&&Obt(g,arguments[a]),g});if(u.prototype=c,s!=="Error"?Qhe?Qhe(u,d):Jhe(u,d,{name:!0}):Mbt&&i in l&&(Yhe(u,l,i),Yhe(u,l,"prepareStackTrace")),Jhe(u,l),!Xhe)try{c.name!==s&&Khe(c,"name",s),c.constructor=u}catch(p){}return u}}});var i0e=P(function(){"use strict";var r0e=ne(),$bt=ut(),Mp=Ml(),n0e=Jj(),Yj="WebAssembly",t0e=$bt[Yj],JC=new Error("e",{cause:7}).cause!==7,z1=function z1(e,t){var r={};r[e]=n0e(e,t,JC),r0e({global:!0,constructor:!0,arity:1,forced:JC},r)},Xj=function Xj(e,t){if(t0e&&t0e[e]){var r={};r[e]=n0e(Yj+"."+e,t,JC),r0e({target:Yj,stat:!0,constructor:!0,arity:1,forced:JC},r)}};z1("Error",function(e){return function(r){return Mp(e,this,arguments)}});z1("EvalError",function(e){return function(r){return Mp(e,this,arguments)}});z1("RangeError",function(e){return function(r){return Mp(e,this,arguments)}});z1("ReferenceError",function(e){return function(r){return Mp(e,this,arguments)}});z1("SyntaxError",function(e){return function(r){return Mp(e,this,arguments)}});z1("TypeError",function(e){return function(r){return Mp(e,this,arguments)}});z1("URIError",function(e){return function(r){return Mp(e,this,arguments)}});Xj("CompileError",function(e){return function(r){return Mp(e,this,arguments)}});Xj("LinkError",function(e){return function(r){return Mp(e,this,arguments)}});Xj("RuntimeError",function(e){return function(r){return Mp(e,this,arguments)}})});var l0e=P(function(){"use strict";var Nbt=ne(),o0e=Zr(),Dbt=pr(),qbt=Pl(),Lbt=We(),s0e="Error",tU="DOMException",Fbt=Object.setPrototypeOf||({}).__proto__,a0e=o0e(tU),eU=Error,YC=eU.isError,zbt=!YC||!Fbt||Lbt(function(){return a0e&&!YC(new a0e(tU))||!YC(new eU(s0e,{cause:function cause(){}}))||YC(o0e("Object","create")(eU.prototype))});Nbt({target:"Error",stat:!0,sham:!0,forced:zbt},{isError:function isError(t){if(!Dbt(t))return!1;var r=qbt(t);return r===s0e||r===tU}})});var rU=P(function(Gsn,c0e){"use strict";var jbt=rr(),Ubt=We(),Bbt=Ht(),u0e=F1(),XC=Error.prototype.toString,Wbt=Ubt(function(){if(jbt){var e=Object.create(Object.defineProperty({},"name",{get:function get1(){return this===e}}));if(XC.call(e)!=="true")return!0}return XC.call({message:1,name:2})!=="2: 1"||XC.call({})!=="Error"});c0e.exports=Wbt?function(){var t=Bbt(this),r=u0e(t.name,"Error"),n=u0e(t.message);return r?n?r+": "+n:r:n}:XC});var f0e=P(function(){"use strict";var Vbt=Xn(),d0e=rU(),p0e=Error.prototype;p0e.toString!==d0e&&Vbt(p0e,"toString",d0e)});var eA=P(function(Ksn,m0e){"use strict";var Gbt=We();m0e.exports=!Gbt(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})});var Os=P(function(Qsn,g0e){"use strict";var Hbt=Kr(),Zbt=fn(),Kbt=qn(),Qbt=W6(),Jbt=eA(),h0e=Qbt("IE_PROTO"),nU=Object,Ybt=nU.prototype;g0e.exports=Jbt?nU.getPrototypeOf:function(e){var t=Kbt(e);if(Hbt(t,h0e))return t[h0e];var r=t.constructor;return Zbt(r)&&_instanceof(t,r)?r.prototype:_instanceof(t,nU)?Ybt:null}});var Hy=P(function(Jsn,x0e){"use strict";x0e.exports={}});var tA=P(function(Ysn,v0e){"use strict";var Xbt=_r(),ewt=Hy(),twt=Xbt("iterator"),rwt=Array.prototype;v0e.exports=function(e){return e!==void 0&&(ewt.Array===e||rwt[twt]===e)}});var im=P(function(Xsn,_0e){"use strict";var nwt=Pl(),y0e=Do(),iwt=Pp(),awt=Hy(),owt=_r(),swt=owt("iterator");_0e.exports=function(e){if(!iwt(e))return y0e(e,swt)||y0e(e,"@@iterator")||awt[nwt(e)]}});var j1=P(function(eln,b0e){"use strict";var lwt=Ft(),uwt=tn(),cwt=Ht(),dwt=Gh(),pwt=im(),fwt=TypeError;b0e.exports=function(e,t){var r=arguments.length<2?pwt(e):t;if(uwt(r))return cwt(lwt(r,e));throw new fwt(dwt(e)+" is not iterable")}});var Uo=P(function(tln,S0e){"use strict";var mwt=Ft(),w0e=Ht(),hwt=Do();S0e.exports=function(e,t,r){var n,i;w0e(e);try{if(n=hwt(e,"return"),!n){if(t==="throw")throw r;return r}n=mwt(n,e)}catch(a){i=!0,n=a}if(t==="throw")throw r;if(i)throw n;return w0e(n),r}});var Za=P(function(rln,I0e){"use strict";var gwt=Ol(),xwt=Ft(),vwt=Ht(),ywt=Gh(),_wt=tA(),bwt=ei(),k0e=Ps(),wwt=j1(),Swt=im(),E0e=Uo(),kwt=TypeError,rA=function rA(e,t){this.stopped=e,this.result=t},T0e=rA.prototype;I0e.exports=function(e,t,r){var n=r&&r.that,i=!!(r&&r.AS_ENTRIES),a=!!(r&&r.IS_RECORD),o=!!(r&&r.IS_ITERATOR),s=!!(r&&r.INTERRUPTED),l=gwt(t,n),c,d,u,p,m,h,g,x=function x(v){return c&&E0e(c,"normal"),new rA(!0,v)},y=function y(v){return i?(vwt(v),s?l(v[0],v[1],x):l(v[0],v[1])):s?l(v,x):l(v)};if(a)c=e.iterator;else if(o)c=e;else{if(d=Swt(e),!d)throw new kwt(ywt(e)+" is not iterable");if(_wt(d)){for(u=0,p=bwt(e);p>u;u++)if(m=y(e[u]),m&&k0e(T0e,m))return m;return new rA(!1)}c=wwt(e,d)}for(h=a?e.next:c.next;!(g=xwt(h,c)).done;){try{m=y(g.value)}catch(v){E0e(c,"throw",v)}if((typeof m==="undefined"?"undefined":_type_of(m))=="object"&&m&&k0e(T0e,m))return m}return new rA(!1)}});var A0e=P(function(){"use strict";var Ewt=ne(),Twt=Ps(),Iwt=Os(),nA=fc(),Cwt=$1(),C0e=Fo(),iU=Lo(),aU=Cl(),Awt=Kj(),Pwt=QC(),Owt=Za(),Rwt=F1(),Mwt=_r(),$wt=Mwt("toStringTag"),iA=Error,Nwt=[].push,Zy=function Zy1(t,r){var n=Twt(oU,this),i;nA?i=nA(new iA,n?Iwt(this):oU):(i=n?this:C0e(oU),iU(i,$wt,"Error")),r!==void 0&&iU(i,"message",Rwt(r)),Pwt(i,Zy,i.stack,1),arguments.length>2&&Awt(i,arguments[2]);var a=[];return Owt(t,Nwt,{that:a}),iU(i,"errors",a),i};nA?nA(Zy,iA):Cwt(Zy,iA,{name:!0});var oU=Zy.prototype=C0e(iA.prototype,{constructor:aU(1,Zy),message:aU(1,""),name:aU(1,"AggregateError")});Ewt({global:!0,constructor:!0,arity:2},{AggregateError:Zy})});var P0e=P(function(){"use strict";A0e()});var $0e=P(function(){"use strict";var Dwt=ne(),qwt=Zr(),Lwt=Ml(),O0e=We(),Fwt=Jj(),sU="AggregateError",R0e=qwt(sU),M0e=!O0e(function(){return R0e([1]).errors[0]!==1})&&O0e(function(){return R0e([1],sU,{cause:7}).cause!==7});Dwt({global:!0,constructor:!0,arity:2,forced:M0e},{AggregateError:Fwt(sU,function(e){return function(r,n){return Lwt(e,this,arguments)}},M0e,!0)})});var q0e=P(function(){"use strict";var zwt=ne(),jwt=ut(),Uwt=Ps(),N0e=Os(),oA=fc(),Bwt=$1(),D0e=Fo(),aA=Lo(),lU=Cl(),Wwt=QC(),Vwt=F1(),Gwt=_r(),Hwt=We(),Zwt=Un(),Ky=jwt.SuppressedError,Kwt=Gwt("toStringTag"),sA=Error,Qwt=!!Ky&&Ky.length!==3,Jwt=!!Ky&&Hwt(function(){return new Ky(1,2,3,{cause:4}).cause===4}),lA=Qwt||Jwt,U1=function U11(t,r,n){var i=Uwt(iS,this),a;return oA?a=lA&&(!i||N0e(this)===iS)?new Ky:oA(new sA,i?N0e(this):iS):(a=i?this:D0e(iS),aA(a,Kwt,"Error")),n!==void 0&&aA(a,"message",Vwt(n)),Wwt(a,U1,a.stack,1),aA(a,"error",t),aA(a,"suppressed",r),a};oA?oA(U1,sA):Bwt(U1,sA,{name:!0});var iS=U1.prototype=lA?Ky.prototype:D0e(sA.prototype,{constructor:lU(1,U1),message:lU(1,""),name:lU(1,"SuppressedError")});lA&&!Zwt&&(iS.constructor=U1);zwt({global:!0,constructor:!0,arity:3,forced:lA},{SuppressedError:U1})});var Ys=P(function(dln,L0e){"use strict";var Ywt=_r(),Xwt=Fo(),e4t=Ni().f,uU=Ywt("unscopables"),cU=Array.prototype;cU[uU]===void 0&&e4t(cU,uU,{configurable:!0,value:Xwt(null)});L0e.exports=function(e){cU[uU][e]=!0}});var F0e=P(function(){"use strict";var t4t=ne(),r4t=qn(),n4t=ei(),i4t=la(),a4t=Ys();t4t({target:"Array",proto:!0},{at:function at(t){var r=r4t(this),n=n4t(r),i=i4t(t),a=i>=0?i:n+i;return a<0||a>=n?void 0:r[a]}});a4t("at")});var e0=P(function(mln,z0e){"use strict";var o4t=TypeError,s4t=0x1fffffffffffff;z0e.exports=function(e){if(e>s4t)throw o4t("Maximum allowed index exceeded");return e}});var Tu=P(function(hln,j0e){"use strict";var l4t=rr(),u4t=Ni(),c4t=Cl();j0e.exports=function(e,t,r){l4t?u4t.f(e,t,c4t(0,r)):e[t]=r}});var Qy=P(function(gln,U0e){"use strict";var d4t=We(),p4t=_r(),f4t=wd(),m4t=p4t("species");U0e.exports=function(e){return f4t>=51||!d4t(function(){var t=[],r=t.constructor={};return r[m4t]=function(){return{foo:1}},t[e](Boolean).foo!==1})}});var G0e=P(function(){"use strict";var h4t=ne(),g4t=We(),x4t=Rp(),v4t=pr(),y4t=qn(),_4t=ei(),B0e=e0(),W0e=Tu(),b4t=By(),w4t=Qy(),S4t=_r(),k4t=wd(),V0e=S4t("isConcatSpreadable"),E4t=k4t>=51||!g4t(function(){var e=[];return e[V0e]=!1,e.concat()[0]!==e}),T4t=function T4t(e){if(!v4t(e))return!1;var t=e[V0e];return t!==void 0?!!t:x4t(e)},I4t=!E4t||!w4t("concat");h4t({target:"Array",proto:!0,arity:1,forced:I4t},{concat:function concat(t){var r=y4t(this),n=b4t(r,0),i=0,a,o,s,l,c;for(a=-1,s=arguments.length;a2?arguments[2]:void 0,l=R4t((s===void 0?i:dU(s,i))-o,i-a),c=1;for(o0;)o in n?n[a]=n[o]:O4t(n,a),a+=c,o+=c;return n}});var Q0e=P(function(){"use strict";var M4t=ne(),$4t=pU(),N4t=Ys();M4t({target:"Array",proto:!0},{copyWithin:$4t});N4t("copyWithin")});var $p=P(function(Sln,J0e){"use strict";var D4t=We();J0e.exports=function(e,t){var r=[][e];return!!r&&D4t(function(){r.call(null,t||function(){return 1},1)})}});var Y0e=P(function(){"use strict";var q4t=ne(),L4t=zo().every,F4t=$p(),z4t=F4t("every");q4t({target:"Array",proto:!0,forced:!z4t},{every:function every(t){return L4t(this,t,arguments.length>1?arguments[1]:void 0)}})});var uA=P(function(Tln,ege){"use strict";var j4t=qn(),X0e=Op(),U4t=ei();ege.exports=function(t){for(var r=j4t(this),n=U4t(r),i=arguments.length,a=X0e(i>1?arguments[1]:void 0,n),o=i>2?arguments[2]:void 0,s=o===void 0?n:X0e(o,n);s>a;)r[a++]=t;return r}});var tge=P(function(){"use strict";var B4t=ne(),W4t=uA(),V4t=Ys();B4t({target:"Array",proto:!0},{fill:W4t});V4t("fill")});var rge=P(function(){"use strict";var G4t=ne(),H4t=zo().filter,Z4t=Qy(),K4t=Z4t("filter");G4t({target:"Array",proto:!0,forced:!K4t},{filter:function filter(t){return H4t(this,t,arguments.length>1?arguments[1]:void 0)}})});var ige=P(function(){"use strict";var Q4t=ne(),J4t=zo().find,Y4t=Ys(),fU="find",nge=!0;fU in[]&&Array(1)[fU](function(){nge=!1});Q4t({target:"Array",proto:!0,forced:nge},{find:function find(t){return J4t(this,t,arguments.length>1?arguments[1]:void 0)}});Y4t(fU)});var oge=P(function(){"use strict";var X4t=ne(),e6t=zo().findIndex,t6t=Ys(),mU="findIndex",age=!0;mU in[]&&Array(1)[mU](function(){age=!1});X4t({target:"Array",proto:!0,forced:age},{findIndex:function findIndex(t){return e6t(this,t,arguments.length>1?arguments[1]:void 0)}});t6t(mU)});var oS=P(function(Nln,lge){"use strict";var r6t=Ol(),n6t=P1(),i6t=qn(),a6t=ei(),sge=function sge(e){var t=e===1;return function(r,n,i){for(var a=i6t(r),o=n6t(a),s=a6t(o),l=r6t(n,i),c,d;s-- >0;)if(c=o[s],d=l(c,s,a),d)switch(e){case 0:return c;case 1:return s}return t?-1:void 0}};lge.exports={findLast:sge(0),findLastIndex:sge(1)}});var uge=P(function(){"use strict";var o6t=ne(),s6t=oS().findLast,l6t=Ys();o6t({target:"Array",proto:!0},{findLast:function findLast(t){return s6t(this,t,arguments.length>1?arguments[1]:void 0)}});l6t("findLast")});var cge=P(function(){"use strict";var u6t=ne(),c6t=oS().findLastIndex,d6t=Ys();u6t({target:"Array",proto:!0},{findLastIndex:function findLastIndex(t){return c6t(this,t,arguments.length>1?arguments[1]:void 0)}});d6t("findLastIndex")});var hU=P(function(zln,pge){"use strict";var p6t=Rp(),f6t=ei(),m6t=e0(),h6t=Ol(),dge=function dge1(e,t,r,n,i,a,o,s){for(var l=i,c=0,d=o?h6t(o,s):!1,u,p;c0&&p6t(u)?(p=f6t(u),l=dge(e,t,u,p,l,a-1)-1):(m6t(l+1),e[l]=u),l++),c++;return l};pge.exports=dge});var fge=P(function(){"use strict";var g6t=ne(),x6t=hU(),v6t=qn(),y6t=ei(),_6t=la(),b6t=By();g6t({target:"Array",proto:!0},{flat:function flat(){var t=arguments.length?arguments[0]:void 0,r=v6t(this),n=y6t(r),i=b6t(r,0);return i.length=x6t(i,r,r,n,0,t===void 0?1:_6t(t)),i}})});var mge=P(function(){"use strict";var w6t=ne(),S6t=hU(),k6t=tn(),E6t=qn(),T6t=ei(),I6t=By();w6t({target:"Array",proto:!0},{flatMap:function flatMap(t){var r=E6t(this),n=T6t(r),i;return k6t(t),i=I6t(r,0),i.length=S6t(i,r,r,n,0,1,t,arguments.length>1?arguments[1]:void 0),i}})});var gU=P(function(Vln,hge){"use strict";var C6t=zo().forEach,A6t=$p(),P6t=A6t("forEach");hge.exports=P6t?[].forEach:function(t){return C6t(this,t,arguments.length>1?arguments[1]:void 0)}});var xge=P(function(){"use strict";var O6t=ne(),gge=gU();O6t({target:"Array",proto:!0,forced:[].forEach!==gge},{forEach:gge})});var cA=P(function(Zln,vge){"use strict";var R6t=Ht(),M6t=Uo();vge.exports=function(e,t,r,n){try{return n?t(R6t(r)[0],r[1]):t(r)}catch(i){M6t(e,"throw",i)}}});var xU=P(function(Kln,bge){"use strict";var $6t=Ol(),N6t=Ft(),D6t=qn(),q6t=cA(),L6t=tA(),F6t=Qh(),z6t=ei(),yge=Tu(),j6t=j1(),U6t=im(),_ge=Array;bge.exports=function(t){var r=D6t(t),n=F6t(this),i=arguments.length,a=i>1?arguments[1]:void 0,o=a!==void 0;o&&(a=$6t(a,i>2?arguments[2]:void 0));var s=U6t(r),l=0,c,d,u,p,m,h;if(s&&!(this===_ge&&L6t(s)))for(d=n?new this:[],p=j6t(r,s),m=p.next;!(u=N6t(m,p)).done;l++)h=o?q6t(p,a,[u.value,l],!0):u.value,yge(d,l,h);else for(c=z6t(r),d=n?new this(c):_ge(c);c>l;l++)h=o?a(r[l],l):r[l],yge(d,l,h);return d.length=l,d}});var sS=P(function(Qln,Ege){"use strict";var B6t=_r(),Sge=B6t("iterator"),kge=!1;try{wge=0,vU={next:function next(){return{done:!!wge++}},return:function _return(){kge=!0}},vU[Sge]=function(){return this},Array.from(vU,function(){throw 2})}catch(e){}var wge,vU;Ege.exports=function(e,t){try{if(!t&&!kge)return!1}catch(i){return!1}var r=!1;try{var n={};n[Sge]=function(){return{next:function next(){return{done:r=!0}}}},e(n)}catch(i){}return r}});var Tge=P(function(){"use strict";var W6t=ne(),V6t=xU(),G6t=sS(),H6t=!G6t(function(e){Array.from(e)});W6t({target:"Array",stat:!0,forced:H6t},{from:V6t})});var Ige=P(function(){"use strict";var Z6t=ne(),K6t=zy().includes,Q6t=We(),J6t=Ys(),Y6t=Q6t(function(){return!Array(1).includes()});Z6t({target:"Array",proto:!0,forced:Y6t},{includes:function includes(t){return K6t(this,t,arguments.length>1?arguments[1]:void 0)}});J6t("includes")});var Age=P(function(){"use strict";var X6t=ne(),eSt=Kh(),tSt=zy().indexOf,rSt=$p(),yU=eSt([].indexOf),Cge=!!yU&&1/yU([1],1,-0)<0,nSt=Cge||!rSt("indexOf");X6t({target:"Array",proto:!0,forced:nSt},{indexOf:function indexOf(t){var r=arguments.length>1?arguments[1]:void 0;return Cge?yU(this,t,r)||0:tSt(this,t,r)}})});var Pge=P(function(){"use strict";var iSt=ne(),aSt=Rp();iSt({target:"Array",stat:!0},{isArray:aSt})});var B1=P(function(aun,Mge){"use strict";var oSt=We(),sSt=fn(),lSt=pr(),uSt=Fo(),Oge=Os(),cSt=Xn(),dSt=_r(),pSt=Un(),wU=dSt("iterator"),Rge=!1,am,_U,bU;[].keys&&(bU=[].keys(),"next"in bU?(_U=Oge(Oge(bU)),_U!==Object.prototype&&(am=_U)):Rge=!0);var fSt=!lSt(am)||oSt(function(){var e={};return am[wU].call(e)!==e});fSt?am={}:pSt&&(am=uSt(am));sSt(am[wU])||cSt(am,wU,function(){return this});Mge.exports={IteratorPrototype:am,BUGGY_SAFARI_ITERATORS:Rge}});var dA=P(function(oun,$ge){"use strict";var mSt=B1().IteratorPrototype,hSt=Fo(),gSt=Cl(),xSt=Js(),vSt=Hy(),ySt=function ySt(){return this};$ge.exports=function(e,t,r,n){var i=t+" Iterator";return e.prototype=hSt(mSt,{next:gSt(+!n,r)}),xSt(e,i,!1,!0),vSt[i]=ySt,e}});var mA=P(function(sun,Wge){"use strict";var _St=ne(),bSt=Ft(),pA=Un(),Uge=R1(),wSt=fn(),SSt=dA(),Nge=Os(),Dge=fc(),kSt=Js(),ESt=Lo(),SU=Xn(),TSt=_r(),qge=Hy(),Bge=B1(),ISt=Uge.PROPER,CSt=Uge.CONFIGURABLE,Lge=Bge.IteratorPrototype,fA=Bge.BUGGY_SAFARI_ITERATORS,lS=TSt("iterator"),Fge="keys",uS="values",zge="entries",jge=function jge(){return this};Wge.exports=function(e,t,r,n,i,a,o){SSt(r,t,n);var s=function s(y){if(y===i&&p)return p;if(!fA&&y&&y in d)return d[y];switch(y){case Fge:return function(){return new r(this,y)};case uS:return function(){return new r(this,y)};case zge:return function(){return new r(this,y)}}return function(){return new r(this)}},l=t+" Iterator",c=!1,d=e.prototype,u=d[lS]||d["@@iterator"]||i&&d[i],p=!fA&&u||s(i),m=t==="Array"&&d.entries||u,h,g,x;if(m&&(h=Nge(m.call(new e)),h!==Object.prototype&&h.next&&(!pA&&Nge(h)!==Lge&&(Dge?Dge(h,Lge):wSt(h[lS])||SU(h,lS,jge)),kSt(h,l,!0,!0),pA&&(qge[l]=jge))),ISt&&i===uS&&u&&u.name!==uS&&(!pA&&CSt?ESt(d,"name",uS):(c=!0,p=function p(){return bSt(u,this)})),i)if(g={values:s(uS),keys:a?p:s(Fge),entries:s(zge)},o)for(x in g)(fA||c||!(x in d))&&SU(d,x,g[x]);else _St({target:t,proto:!0,forced:fA||c},g);return(!pA||o)&&d[lS]!==p&&SU(d,lS,p,{name:i}),qge[t]=p,g}});var t0=P(function(lun,Vge){"use strict";Vge.exports=function(e,t){return{value:e,done:t}}});var cS=P(function(uun,Qge){"use strict";var ASt=go(),kU=Ys(),Gge=Hy(),Zge=Di(),PSt=Ni().f,OSt=mA(),hA=t0(),RSt=Un(),MSt=rr(),Kge="Array Iterator",$St=Zge.set,NSt=Zge.getterFor(Kge);Qge.exports=OSt(Array,"Array",function(e,t){$St(this,{type:Kge,target:ASt(e),index:0,kind:t})},function(){var e=NSt(this),t=e.target,r=e.index++;if(!t||r>=t.length)return e.target=null,hA(void 0,!0);switch(e.kind){case"keys":return hA(r,!1);case"values":return hA(t[r],!1)}return hA([r,t[r]],!1)},"values");var Hge=Gge.Arguments=Gge.Array;kU("keys");kU("values");kU("entries");if(!RSt&&MSt&&Hge.name!=="values")try{PSt(Hge,"name",{value:"values"})}catch(e){}});var Jge=P(function(){"use strict";var DSt=ne(),qSt=Ze(),LSt=P1(),FSt=go(),zSt=$p(),jSt=qSt([].join),USt=LSt!==Object,BSt=USt||!zSt("join",",");DSt({target:"Array",proto:!0,forced:BSt},{join:function join(t){return jSt(FSt(this),t===void 0?",":t)}})});var TU=P(function(pun,Xge){"use strict";var WSt=Ml(),VSt=go(),GSt=la(),HSt=ei(),ZSt=$p(),KSt=Math.min,EU=[].lastIndexOf,Yge=!!EU&&1/[1].lastIndexOf(1,-0)<0,QSt=ZSt("lastIndexOf"),JSt=Yge||!QSt;Xge.exports=JSt?function(t){if(Yge)return WSt(EU,this,arguments)||0;var r=VSt(this),n=HSt(r);if(n===0)return-1;var i=n-1;for(arguments.length>1&&(i=KSt(i,GSt(arguments[1]))),i<0&&(i=n+i);i>=0;i--)if(i in r&&r[i]===t)return i||0;return-1}:EU});var t1e=P(function(){"use strict";var YSt=ne(),e1e=TU();YSt({target:"Array",proto:!0,forced:e1e!==[].lastIndexOf},{lastIndexOf:e1e})});var r1e=P(function(){"use strict";var XSt=ne(),e3t=zo().map,t3t=Qy(),r3t=t3t("map");XSt({target:"Array",proto:!0,forced:!r3t},{map:function map(t){return e3t(this,t,arguments.length>1?arguments[1]:void 0)}})});var i1e=P(function(){"use strict";var n3t=ne(),i3t=We(),a3t=Qh(),o3t=Tu(),n1e=Array,s3t=i3t(function(){function e(){}return!_instanceof(n1e.of.call(e),e)});n3t({target:"Array",stat:!0,forced:s3t},{of:function of1(){for(var t=0,r=arguments.length,n=new(a3t(this)?this:n1e)(r);r>t;)o3t(n,t,arguments[t++]);return n.length=r,n}})});var gA=P(function(yun,a1e){"use strict";var l3t=rr(),u3t=Rp(),c3t=TypeError,d3t=Object.getOwnPropertyDescriptor,p3t=l3t&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return _instanceof(e,TypeError)}}();a1e.exports=p3t?function(e,t){if(u3t(e)&&!d3t(e,"length").writable)throw new c3t("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t}});var o1e=P(function(){"use strict";var f3t=ne(),m3t=qn(),h3t=ei(),g3t=gA(),x3t=e0(),v3t=We(),y3t=v3t(function(){return[].push.call({length:0x100000000},1)!==0x100000001}),_3t=function _3t(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return _instanceof(e,TypeError)}},b3t=y3t||!_3t();f3t({target:"Array",proto:!0,arity:1,forced:b3t},{push:function push(t){var r=m3t(this),n=h3t(r),i=arguments.length;x3t(n+i);for(var a=0;a=0:s>l;l+=c)l in o&&(i=r(i,o[l],l,a));return i}};c1e.exports={left:u1e(!1),right:u1e(!0)}});var fS=P(function(Sun,d1e){"use strict";var pS=ut(),T3t=_d(),I3t=as(),xA=function xA(e){return T3t.slice(0,e.length)===e};d1e.exports=function(){return xA("Bun/")?"BUN":xA("Cloudflare-Workers")?"CLOUDFLARE":xA("Deno/")?"DENO":xA("Node.js/")?"NODE":pS.Bun&&typeof Bun.version=="string"?"BUN":pS.Deno&&_type_of(Deno.version)=="object"?"DENO":I3t(pS.process)==="process"?"NODE":pS.window&&pS.document?"BROWSER":"REST"}()});var W1=P(function(kun,p1e){"use strict";var C3t=fS();p1e.exports=C3t==="NODE"});var m1e=P(function(){"use strict";var A3t=ne(),P3t=dS().left,O3t=$p(),f1e=wd(),R3t=W1(),M3t=!R3t&&f1e>79&&f1e<83,$3t=M3t||!O3t("reduce");A3t({target:"Array",proto:!0,forced:$3t},{reduce:function reduce(t){var r=arguments.length;return P3t(this,t,r,r>1?arguments[1]:void 0)}})});var g1e=P(function(){"use strict";var N3t=ne(),D3t=dS().right,q3t=$p(),h1e=wd(),L3t=W1(),F3t=!L3t&&h1e>79&&h1e<83,z3t=F3t||!q3t("reduceRight");N3t({target:"Array",proto:!0,forced:z3t},{reduceRight:function reduceRight(t){return D3t(this,t,arguments.length,arguments.length>1?arguments[1]:void 0)}})});var v1e=P(function(){"use strict";var j3t=ne(),U3t=Ze(),B3t=Rp(),W3t=U3t([].reverse),x1e=[1,2];j3t({target:"Array",proto:!0,forced:String(x1e)===String(x1e.reverse())},{reverse:function reverse(){return B3t(this)&&(this.length=this.length),W3t(this)}})});var b1e=P(function(){"use strict";var V3t=ne(),y1e=Rp(),G3t=Qh(),H3t=pr(),_1e=Op(),Z3t=ei(),K3t=go(),Q3t=Tu(),J3t=_r(),Y3t=Qy(),X3t=Eu(),e5t=Y3t("slice"),t5t=J3t("species"),IU=Array,r5t=Math.max;V3t({target:"Array",proto:!0,forced:!e5t},{slice:function slice(t,r){var n=K3t(this),i=Z3t(n),a=_1e(t,i),o=_1e(r===void 0?i:r,i),s,l,c;if(y1e(n)&&(s=n.constructor,G3t(s)&&(s===IU||y1e(s.prototype))?s=void 0:H3t(s)&&(s=s[t5t],s===null&&(s=void 0)),s===IU||s===void 0))return X3t(n,a,o);for(l=new(s===void 0?IU:s)(r5t(o-a,0)),c=0;a1?arguments[1]:void 0)}})});var vA=P(function(Nun,k1e){"use strict";var S1e=Eu(),s5t=Math.floor,CU=function CU1(e,t){var r=e.length;if(r<8)for(var n=1,i,a;n0;)e[a]=e[--a];a!==n++&&(e[a]=i)}else for(var o=s5t(r/2),s=CU(S1e(e,0,o),t),l=CU(S1e(e,o),t),c=s.length,d=l.length,u=0,p=0;u3)){if(x5t)return!0;if($1e)return $1e<603;var e="",t,r,n,i;for(t=65;t<76;t++){switch(r=String.fromCharCode(t),t){case 66:case 69:case 70:case 72:n=3;break;case 68:case 71:n=4;break;default:n=2}for(i=0;i<47;i++)r0.push({k:r+i,v:n})}for(r0.sort(function(a,o){return o.v-a.v}),i=0;iO1e(r)?1:-1}};d5t({target:"Array",proto:!0,forced:w5t},{sort:function sort(t){t!==void 0&&p5t(t);var r=f5t(this);if(q1e)return t===void 0?N1e(r):N1e(r,t);var n=[],i=P1e(r),a,o;for(o=0;oi-l+s;d--)RU(n,d-1)}else if(s>l)for(d=i-l;d>a;d--)u=d+l-1,p=d+s-1,u in n?n[p]=n[u]:RU(n,p);for(d=0;d2?r:Z5t(t),a=new e(i);i>n;)a[n]=t[n++];return a}});var $U=P(function(Jun,G1e){"use strict";var K5t=ut();G1e.exports=function(e,t){var r=K5t[e],n=r&&r.prototype;return n&&n[t]}});var H1e=P(function(){"use strict";var Q5t=ne(),J5t=Ze(),Y5t=tn(),X5t=go(),ekt=Jy(),tkt=$U(),rkt=Ys(),nkt=Array,ikt=J5t(tkt("Array","sort"));Q5t({target:"Array",proto:!0},{toSorted:function toSorted(t){t!==void 0&&Y5t(t);var r=X5t(this),n=ekt(nkt,r);return ikt(n,t)}});rkt("toSorted")});var Z1e=P(function(){"use strict";var akt=ne(),okt=Ys(),skt=e0(),lkt=ei(),ukt=Op(),ckt=go(),dkt=la(),pkt=Array,fkt=Math.max,mkt=Math.min;akt({target:"Array",proto:!0},{toSpliced:function toSpliced(t,r){var n=ckt(this),i=lkt(n),a=ukt(t,i),o=arguments.length,s=0,l,c,d,u;for(o===0?l=c=0:o===1?(l=0,c=i-a):(l=o-2,c=mkt(fkt(dkt(r),0),i-a)),d=skt(i+l-c),u=pkt(d);s=i||o<0)throw new Ckt("Incorrect index");for(var s=new t(i),l=0;lr||l!==l?o*(1/0):o*l}});var LU=P(function(vcn,lxe){"use strict";var Vkt=qU(),Gkt=11920928955078125e-23,Hkt=34028234663852886e22,Zkt=11754943508222875e-54;lxe.exports=Math.fround||function(t){return Vkt(t,Gkt,Hkt,Zkt)}});var cxe=P(function(ycn,uxe){"use strict";var Kkt=Array,Qkt=Math.abs,om=Math.pow,Jkt=Math.floor,Ykt=Math.log,Xkt=Math.LN2,eEt=function eEt(e,t,r){var n=Kkt(r),i=r*8-t-1,a=(1<>1,s=t===23?om(2,-24)-om(2,-77):0,l=e<0||e===0&&1/e<0?1:0,c=0,d,u,p;for(e=Qkt(e),e!==e||e===1/0?(u=e!==e?1:0,d=a):(d=Jkt(Ykt(e)/Xkt),p=om(2,-d),e*p<1&&(d--,p*=2),d+o>=1?e+=s/p:e+=s*om(2,1-o),e*p>=2&&(d++,p/=2),d+o>=a?(u=0,d=a):d+o>=1?(u=(e*p-1)*om(2,t),d+=o):(u=e*om(2,o-1)*om(2,t),d=0));t>=8;)n[c++]=u&255,u/=256,t-=8;for(d=d<0;)n[c++]=d&255,d/=256,i-=8;return n[c-1]|=l*128,n},tEt=function tEt(e,t){var r=e.length,n=r*8-t-1,i=(1<>1,o=n-7,s=r-1,l=e[s--],c=l&127,d;for(l>>=7;o>0;)c=c*256+e[s--],o-=8;for(d=c&(1<<-o)-1,c>>=-o,o+=t;o>0;)d=d*256+e[s--],o-=8;if(c===0)c=1-a;else{if(c===i)return d?NaN:l?-1/0:1/0;d+=om(2,t),c-=a}return(l?-1:1)*d*om(2,c-t)};uxe.exports={pack:eEt,unpack:tEt}});var vS=P(function(_cn,Ixe){"use strict";var EA=ut(),BU=Ze(),FU=rr(),rEt=mS(),wxe=R1(),nEt=Lo(),iEt=ya(),dxe=Np(),zU=We(),bA=$l(),aEt=la(),oEt=Al(),SA=hS(),sEt=LU(),Sxe=cxe(),lEt=Os(),pxe=fc(),uEt=uA(),cEt=Eu(),dEt=Xh(),pEt=$1(),kxe=Js(),WU=Di(),fEt=wxe.PROPER,fxe=wxe.CONFIGURABLE,Xy="ArrayBuffer",TA="DataView",e2="prototype",mEt="Wrong length",Exe="Wrong index",mxe=WU.getterFor(Xy),xS=WU.getterFor(TA),hxe=WU.set,kd=EA[Xy],Iu=kd,Yy=Iu&&Iu[e2],Dp=EA[TA],G1=Dp&&Dp[e2],gxe=Object.prototype,hEt=EA.Array,kA=EA.RangeError,gEt=BU(uEt),xEt=BU([].reverse),Txe=Sxe.pack,xxe=Sxe.unpack,vxe=function vxe(e){return[e&255]},yxe=function yxe(e){return[e&255,e>>8&255]},_xe=function _xe(e){return[e&255,e>>8&255,e>>16&255,e>>24&255]},bxe=function bxe(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},vEt=function vEt(e){return Txe(sEt(e),23,4)},yEt=function yEt(e){return Txe(e,52,8)},wA=function wA(e,t,r){iEt(e[e2],t,{configurable:!0,get:function get1(){return r(this)[t]}})},n0=function n0(e,t,r,n){var i=xS(e),a=SA(r),o=!!n;if(a+t>i.byteLength)throw new kA(Exe);var s=i.bytes,l=a+i.byteOffset,c=cEt(s,l,l+t);return o?c:xEt(c)},i0=function i0(e,t,r,n,i,a){var o=xS(e),s=SA(r),l=n(+i),c=!!a;if(s+t>o.byteLength)throw new kA(Exe);for(var d=o.bytes,u=s+o.byteOffset,p=0;p>24)},setUint8:function setUint8(t,r){UU(this,t,r<<24>>24)}},{unsafe:!0})):(Iu=function Iu(t){bA(this,Yy);var r=SA(t);hxe(this,{type:Xy,bytes:gEt(hEt(r),0),byteLength:r}),FU||(this.byteLength=r,this.detached=!1)},Yy=Iu[e2],Dp=function Dp(t,r,n){bA(this,G1),bA(t,Yy);var i=mxe(t),a=i.byteLength,o=aEt(r);if(o<0||o>a)throw new kA("Wrong offset");if(n=n===void 0?a-o:oEt(n),o+n>a)throw new kA(mEt);hxe(this,{type:TA,buffer:t,byteLength:n,byteOffset:o,bytes:i.bytes}),FU||(this.buffer=t,this.byteLength=n,this.byteOffset=o)},G1=Dp[e2],FU&&(wA(Iu,"byteLength",mxe),wA(Dp,"buffer",xS),wA(Dp,"byteLength",xS),wA(Dp,"byteOffset",xS)),dxe(G1,{getInt8:function getInt8(t){return n0(this,1,t)[0]<<24>>24},getUint8:function getUint8(t){return n0(this,1,t)[0]},getInt16:function getInt16(t){var r=n0(this,2,t,arguments.length>1?arguments[1]:!1);return(r[1]<<8|r[0])<<16>>16},getUint16:function getUint16(t){var r=n0(this,2,t,arguments.length>1?arguments[1]:!1);return r[1]<<8|r[0]},getInt32:function getInt32(t){return bxe(n0(this,4,t,arguments.length>1?arguments[1]:!1))},getUint32:function getUint32(t){return bxe(n0(this,4,t,arguments.length>1?arguments[1]:!1))>>>0},getFloat32:function getFloat32(t){return xxe(n0(this,4,t,arguments.length>1?arguments[1]:!1),23)},getFloat64:function getFloat64(t){return xxe(n0(this,8,t,arguments.length>1?arguments[1]:!1),52)},setInt8:function setInt8(t,r){i0(this,1,t,vxe,r)},setUint8:function setUint8(t,r){i0(this,1,t,vxe,r)},setInt16:function setInt16(t,r){i0(this,2,t,yxe,r,arguments.length>2?arguments[2]:!1)},setUint16:function setUint16(t,r){i0(this,2,t,yxe,r,arguments.length>2?arguments[2]:!1)},setInt32:function setInt32(t,r){i0(this,4,t,_xe,r,arguments.length>2?arguments[2]:!1)},setUint32:function setUint32(t,r){i0(this,4,t,_xe,r,arguments.length>2?arguments[2]:!1)},setFloat32:function setFloat32(t,r){i0(this,4,t,vEt,r,arguments.length>2?arguments[2]:!1)},setFloat64:function setFloat64(t,r){i0(this,8,t,yEt,r,arguments.length>2?arguments[2]:!1)}}));var jU,gS,UU;kxe(Iu,Xy);kxe(Dp,TA);Ixe.exports={ArrayBuffer:Iu,DataView:Dp}});var Axe=P(function(){"use strict";var _Et=ne(),bEt=ut(),wEt=vS(),SEt=V1(),VU="ArrayBuffer",Cxe=wEt[VU],kEt=bEt[VU];_Et({global:!0,constructor:!0,forced:kEt!==Cxe},{ArrayBuffer:Cxe});SEt(VU)});var mn=P(function(Scn,Fxe){"use strict";var EEt=mS(),KU=rr(),Xs=ut(),Mxe=fn(),AA=pr(),o0=Kr(),QU=Pl(),TEt=Gh(),IEt=Lo(),GU=Xn(),CEt=ya(),AEt=Ps(),PA=Os(),r2=fc(),PEt=_r(),OEt=Hh(),$xe=Di(),Nxe=$xe.enforce,REt=$xe.get,IA=Xs.Int8Array,HU=IA&&IA.prototype,Pxe=Xs.Uint8ClampedArray,Oxe=Pxe&&Pxe.prototype,qp=IA&&PA(IA),Ed=HU&&PA(HU),MEt=Object.prototype,JU=Xs.TypeError,Rxe=PEt("toStringTag"),ZU=OEt("TYPED_ARRAY_TAG"),CA="TypedArrayConstructor",sm=EEt&&!!r2&&QU(Xs.opera)!=="Opera",Dxe=!1,Nl,a0,t2,lm={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},YU={BigInt64Array:8,BigUint64Array:8},$Et=function $Et(t){if(!AA(t))return!1;var r=QU(t);return r==="DataView"||o0(lm,r)||o0(YU,r)},qxe=function qxe1(e){var t=PA(e);if(AA(t)){var r=REt(t);return r&&o0(r,CA)?r[CA]:qxe(t)}},Lxe=function Lxe(e){if(!AA(e))return!1;var t=QU(e);return o0(lm,t)||o0(YU,t)},NEt=function NEt(e){if(Lxe(e))return e;throw new JU("Target is not a typed array")},DEt=function DEt(e){if(Mxe(e)&&(!r2||AEt(qp,e)))return e;throw new JU(TEt(e)+" is not a typed array constructor")},qEt=function qEt(e,t,r,n){if(KU){if(r)for(var i in lm){var a=Xs[i];if(a&&o0(a.prototype,e))try{delete a.prototype[e]}catch(o){try{a.prototype[e]=t}catch(s){}}}(!Ed[e]||r)&&GU(Ed,e,r?t:sm&&HU[e]||t,n)}},LEt=function LEt(e,t,r){var n,i;if(KU){if(r2){if(r){for(n in lm)if(i=Xs[n],i&&o0(i,e))try{delete i[e]}catch(a){}}if(!qp[e]||r)try{return GU(qp,e,r?t:sm&&qp[e]||t)}catch(a){}else return}for(n in lm)i=Xs[n],i&&(!i[e]||r)&&GU(i,e,t)}};for(Nl in lm)a0=Xs[Nl],t2=a0&&a0.prototype,t2?Nxe(t2)[CA]=a0:sm=!1;for(Nl in YU)a0=Xs[Nl],t2=a0&&a0.prototype,t2&&(Nxe(t2)[CA]=a0);if((!sm||!Mxe(qp)||qp===Function.prototype)&&(qp=function qp(){throw new JU("Incorrect invocation")},sm))for(Nl in lm)Xs[Nl]&&r2(Xs[Nl],qp);if((!sm||!Ed||Ed===MEt)&&(Ed=qp.prototype,sm))for(Nl in lm)Xs[Nl]&&r2(Xs[Nl].prototype,Ed);sm&&PA(Oxe)!==Ed&&r2(Oxe,Ed);if(KU&&!o0(Ed,Rxe)){Dxe=!0,CEt(Ed,Rxe,{configurable:!0,get:function get1(){return AA(this)?this[ZU]:void 0}});for(Nl in lm)Xs[Nl]&&IEt(Xs[Nl],ZU,Nl)}Fxe.exports={NATIVE_ARRAY_BUFFER_VIEWS:sm,TYPED_ARRAY_TAG:Dxe&&ZU,aTypedArray:NEt,aTypedArrayConstructor:DEt,exportTypedArrayMethod:qEt,exportTypedArrayStaticMethod:LEt,getTypedArrayConstructor:qxe,isView:$Et,isTypedArray:Lxe,TypedArray:qp,TypedArrayPrototype:Ed}});var jxe=P(function(){"use strict";var FEt=ne(),zxe=mn(),zEt=zxe.NATIVE_ARRAY_BUFFER_VIEWS;FEt({target:"ArrayBuffer",stat:!0,forced:!zEt},{isView:zxe.isView})});var Hxe=P(function(){"use strict";var jEt=ne(),eB=Kh(),UEt=We(),Vxe=vS(),Uxe=Ht(),Bxe=Op(),BEt=Al(),tB=Vxe.ArrayBuffer,XU=Vxe.DataView,Gxe=XU.prototype,Wxe=eB(tB.prototype.slice),WEt=eB(Gxe.getUint8),VEt=eB(Gxe.setUint8),GEt=UEt(function(){return!new tB(2).slice(1,void 0).byteLength});jEt({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:GEt},{slice:function slice(t,r){if(Wxe&&r===void 0)return Wxe(Uxe(this),t);for(var n=Uxe(this).byteLength,i=Bxe(t,n),a=Bxe(r===void 0?n:r,n),o=new tB(BEt(a-i)),s=new XU(this),l=new XU(o),c=0;i>>15,r=e>>>10&Qxe,n=e&YEt;return r===Qxe?n===0?t===0?1/0:-1/0:NaN:r===0?n*(t===0?Jxe:-Jxe):Xxe(2,r-15)*(t===0?1+n*Yxe:-1-n*Yxe)},eTt=JEt(DataView.prototype.getUint16);QEt({target:"DataView",proto:!0},{getFloat16:function getFloat16(t){return XEt(eTt(this,t,arguments.length>1?arguments[1]:!1))}})});var rve=P(function($cn,tve){"use strict";var tTt=Pl(),rTt=TypeError;tve.exports=function(e){if(tTt(e)==="DataView")return e;throw new rTt("Argument is not a DataView")}});var rB=P(function(Ncn,nve){"use strict";var nTt=Math.log,iTt=Math.LN2;nve.exports=Math.log2||function(t){return nTt(t)/iTt}});var ave=P(function(){"use strict";var aTt=ne(),oTt=Ze(),sTt=rve(),lTt=hS(),uTt=rB(),ive=DU(),cTt=Math.pow,dTt=65520,pTt=61005353927612305e-21,fTt=0x1000000,nB=1024,mTt=function mTt(e){if(e!==e)return 32256;if(e===0)return(1/e===-1/0)<<15;var t=e<0;if(t&&(e=-e),e>=dTt)return t<<15|31744;if(e2?arguments[2]:!1)}})});var iB=P(function(Lcn,lve){"use strict";var sve=ut(),gTt=nS(),xTt=as(),ove=sve.ArrayBuffer,vTt=sve.TypeError;lve.exports=ove&&gTt(ove.prototype,"byteLength","get")||function(e){if(xTt(e)!=="ArrayBuffer")throw new vTt("ArrayBuffer expected");return e.byteLength}});var aB=P(function(Fcn,uve){"use strict";var yTt=ut(),_Tt=mS(),bTt=iB(),wTt=yTt.DataView;uve.exports=function(e){if(!_Tt||bTt(e)!==0)return!1;try{return new wTt(e),!1}catch(t){return!0}}});var dve=P(function(){"use strict";var STt=rr(),kTt=ya(),ETt=aB(),cve=ArrayBuffer.prototype;STt&&!("detached"in cve)&&kTt(cve,"detached",{configurable:!0,get:function get1(){return ETt(this)}})});var n2=P(function(Ucn,pve){"use strict";var TTt=aB(),ITt=TypeError;pve.exports=function(e){if(TTt(e))throw new ITt("ArrayBuffer is detached");return e}});var oB=P(function(Bcn,fve){"use strict";var CTt=ut(),ATt=W1();fve.exports=function(e){if(ATt){try{return CTt.process.getBuiltinModule(e)}catch(t){}try{return Function('return require("'+e+'")')()}catch(t){}}}});var OA=P(function(Wcn,hve){"use strict";var PTt=ut(),OTt=We(),sB=wd(),lB=fS(),mve=PTt.structuredClone;hve.exports=!!mve&&!OTt(function(){if(lB==="DENO"&&sB>92||lB==="NODE"&&sB>94||lB==="BROWSER"&&sB>97)return!1;var e=new ArrayBuffer(8),t=mve(e,{transfer:[e]});return e.byteLength!==0||t.byteLength!==8})});var fB=P(function(Vcn,vve){"use strict";var pB=ut(),RTt=oB(),MTt=OA(),$Tt=pB.structuredClone,gve=pB.ArrayBuffer,RA=pB.MessageChannel,dB=!1,uB,xve,MA,cB;if(MTt)dB=function dB(e){$Tt(e,{transfer:[e]})};else if(gve)try{RA||(uB=RTt("worker_threads"),uB&&(RA=uB.MessageChannel)),RA&&(xve=new RA,MA=new gve(2),cB=function cB(e){xve.port1.postMessage(null,[e])},MA.byteLength===2&&(cB(MA),MA.byteLength===0&&(dB=cB)))}catch(e){}vve.exports=dB});var yB=P(function(Gcn,Eve){"use strict";var gB=ut(),xB=Ze(),wve=nS(),NTt=hS(),DTt=n2(),qTt=iB(),yve=fB(),mB=OA(),LTt=gB.structuredClone,Sve=gB.ArrayBuffer,hB=gB.DataView,FTt=Math.min,vB=Sve.prototype,kve=hB.prototype,zTt=xB(vB.slice),_ve=wve(vB,"resizable","get"),bve=wve(vB,"maxByteLength","get"),jTt=xB(kve.getInt8),UTt=xB(kve.setInt8);Eve.exports=(mB||yve)&&function(e,t,r){var n=qTt(e),i=t===void 0?n:NTt(t),a=!_ve||!_ve(e),o;if(DTt(e),mB&&(e=LTt(e,{transfer:[e]}),n===i&&(r||a)))return e;if(n>=i&&(!r||a))o=zTt(e,0,i);else{var s=r&&!a&&bve?{maxByteLength:bve(e)}:void 0;o=new Sve(i,s);for(var l=new hB(e),c=new hB(o),d=FTt(i,n),u=0;u=0&&r<=99?r+1900:r;return rIt(this,n)}})});var Dve=P(function(){"use strict";var nIt=ne();nIt({target:"Date",proto:!0},{toGMTString:Date.prototype.toUTCString})});var yS=P(function(adn,qve){"use strict";var iIt=la(),aIt=Cr(),oIt=Wi(),sIt=RangeError;qve.exports=function(t){var r=aIt(oIt(this)),n="",i=iIt(t);if(i<0||i===1/0)throw new sIt("Wrong number of repetitions");for(;i>0;(i>>>=1)&&(r+=r))i&1&&(n+=r);return n}});var _S=P(function(odn,jve){"use strict";var zve=Ze(),lIt=Al(),Lve=Cr(),uIt=yS(),cIt=Wi(),dIt=zve(uIt),pIt=zve("".slice),fIt=Math.ceil,Fve=function Fve(e){return function(t,r,n){var i=Lve(cIt(t)),a=lIt(r),o=i.length,s=n===void 0?" ":Lve(n),l,c;return a<=o||s===""?i:(l=a-o,c=dIt(s,fIt(l/s.length)),c.length>l&&(c=pIt(c,0,l)),e?i+c:c+i)}};jve.exports={start:Fve(!1),end:Fve(!0)}});var Wve=P(function(sdn,Bve){"use strict";var s0=Ze(),Uve=We(),H1=_S().start,mIt=RangeError,hIt=isFinite,gIt=Math.abs,um=Date.prototype,_B=um.toISOString,xIt=s0(um.getTime),vIt=s0(um.getUTCDate),yIt=s0(um.getUTCFullYear),_It=s0(um.getUTCHours),bIt=s0(um.getUTCMilliseconds),wIt=s0(um.getUTCMinutes),SIt=s0(um.getUTCMonth),kIt=s0(um.getUTCSeconds);Bve.exports=Uve(function(){return _B.call(new Date(-5e13-1))!=="0385-07-25T07:06:39.999Z"})||!Uve(function(){_B.call(new Date(NaN))})?function(){if(!hIt(xIt(this)))throw new mIt("Invalid time value");var t=this,r=yIt(t),n=bIt(t),i=r<0?"-":r>9999?"+":"";return i+H1(gIt(r),i?6:4,0)+"-"+H1(SIt(t)+1,2,0)+"-"+H1(vIt(t),2,0)+"T"+H1(_It(t),2,0)+":"+H1(wIt(t),2,0)+":"+H1(kIt(t),2,0)+"."+H1(n,3,0)+"Z"}:_B});var Gve=P(function(){"use strict";var EIt=ne(),Vve=Wve();EIt({target:"Date",proto:!0,forced:Date.prototype.toISOString!==Vve},{toISOString:Vve})});var Hve=P(function(){"use strict";var TIt=ne(),IIt=We(),CIt=qn(),AIt=U6(),PIt=IIt(function(){return new Date(NaN).toJSON()!==null||Date.prototype.toJSON.call({toISOString:function toISOString(){return 1}})!==1});TIt({target:"Date",proto:!0,arity:1,forced:PIt},{toJSON:function toJSON(t){var r=CIt(this),n=AIt(r,"number");return typeof n=="number"&&!isFinite(n)?null:r.toISOString()}})});var Kve=P(function(pdn,Zve){"use strict";var OIt=Ht(),RIt=Gz(),MIt=TypeError;Zve.exports=function(e){if(OIt(this),e==="string"||e==="default")e="string";else if(e!=="number")throw new MIt("Incorrect hint");return RIt(this,e)}});var Yve=P(function(){"use strict";var $It=Kr(),NIt=Xn(),DIt=Kve(),qIt=_r(),Qve=qIt("toPrimitive"),Jve=Date.prototype;$It(Jve,Qve)||NIt(Jve,Qve,DIt)});var rye=P(function(){"use strict";var eye=Ze(),LIt=Xn(),bB=Date.prototype,Xve="Invalid Date",tye="toString",FIt=eye(bB[tye]),zIt=eye(bB.getTime);String(new Date(NaN))!==Xve&&LIt(bB,tye,function(){var t=zIt(this);return t===t?FIt(this):Xve})});var SB=P(function(xdn,sye){"use strict";var jIt=Zr(),UIt=Ft(),BIt=Ze(),WIt=Ol(),VIt=Ht(),GIt=tn(),aye=Pp(),wB=Do(),oye=_r(),HIt=oye("asyncDispose"),nye=oye("dispose"),ZIt=BIt([].push),KIt=function KIt(e,t){if(t==="async-dispose"){var r=wB(e,HIt);return r!==void 0||(r=wB(e,nye),r===void 0)?r:function(){var n=this,i=jIt("Promise");return new i(function(a){UIt(r,n),a(void 0)})}}return wB(e,nye)},iye=function iye(e,t,r){return arguments.length<3&&!aye(e)&&(r=GIt(KIt(VIt(e),t))),r===void 0?function(){}:WIt(r,e)};sye.exports=function(e,t,r,n){var i;if(arguments.length<4){if(aye(t)&&r==="sync-dispose")return;i=iye(t,r)}else i=iye(void 0,r,n);ZIt(e.stack,i)}});var pye=P(function(){"use strict";var QIt=ne(),NA=rr(),JIt=Zr(),lye=tn(),YIt=$l(),uye=Xn(),XIt=Np(),e8t=ya(),cye=_r(),dye=Di(),kB=SB(),t8t=JIt("SuppressedError"),r8t=ReferenceError,n8t=cye("dispose"),i8t=cye("toStringTag"),qA="DisposableStack",a8t=dye.set,DA=dye.getterFor(qA),EB="sync-dispose",bS="disposed",o8t="pending",$A=function $A(e){var t=DA(e);if(t.state===bS)throw new r8t(qA+" already disposed");return t},TB=function TB(){a8t(YIt(this,i2),{type:qA,state:o8t,stack:[]}),NA||(this.disposed=!1)},i2=TB.prototype;XIt(i2,{dispose:function dispose(){var t=DA(this);if(t.state!==bS){t.state=bS,NA||(this.disposed=!0);for(var r=t.stack,n=r.length,i=!1,a;n;){var o=r[--n];r[n]=null;try{o()}catch(s){i?a=new t8t(s,a):(i=!0,a=s)}}if(t.stack=null,i)throw a}},use:function use1(t){return kB($A(this),t,EB),t},adopt:function adopt(t,r){var n=$A(this);return lye(r),kB(n,void 0,EB,function(){r(t)}),t},defer:function defer(t){var r=$A(this);lye(t),kB(r,void 0,EB,t)},move:function move(){var t=$A(this),r=new TB;return DA(r).stack=t.stack,t.stack=[],t.state=bS,NA||(this.disposed=!0),r}});NA&&e8t(i2,"disposed",{configurable:!0,get:function get1(){return DA(this).state===bS}});uye(i2,n8t,i2.dispose,{name:"dispose"});uye(i2,i8t,qA,{nonWritable:!0});QIt({global:!0,constructor:!0},{DisposableStack:TB})});var mye=P(function(){"use strict";var s8t=ne(),wS=Ze(),l8t=Cr(),u8t=wS("".charAt),c8t=wS("".charCodeAt),d8t=wS(/./.exec),p8t=wS(1.1.toString),f8t=wS("".toUpperCase),m8t=/[\w*+\-./@]/,fye=function fye(e,t){for(var r=p8t(e,16);r.length=0;n--)if(e[n]!==void 0)try{r=H8t(e[n].iterator,t,r)}catch(i){t="throw",r=i}if(t==="throw")throw r;return r}});var l0=P(function($dn,Bye){"use strict";var Z8t=Ft(),K8t=Fo(),Q8t=Lo(),J8t=Np(),Y8t=_r(),Lye=Di(),X8t=Do(),e7t=B1().IteratorPrototype,LA=t0(),FA=Uo(),t7t=Dye(),r7t=Y8t("toStringTag"),Fye="IteratorHelper",zye="WrapForValidIterator",NB="normal",qye="throw",n7t=Lye.set,jye=function jye(e){var t=Lye.getterFor(e?zye:Fye);return J8t(K8t(e7t),{next:function next(){var n=t(this);if(e)return n.nextHandler();if(n.done)return LA(void 0,!0);try{var i=n.nextHandler();return n.returnHandlerResult?i:LA(i,n.done)}catch(a){throw n.done=!0,a}},return:function _return(){var r=t(this),n=r.iterator;if(r.done=!0,e){var i=X8t(n,"return");return i?Z8t(i,n):LA(void 0,!0)}if(r.inner)try{FA(r.inner.iterator,NB)}catch(a){return FA(n,qye,a)}if(r.openIters)try{t7t(r.openIters,NB)}catch(a){return FA(n,qye,a)}return n&&FA(n,NB),LA(void 0,!0)}})},i7t=jye(!0),Uye=jye(!1);Q8t(Uye,r7t,"Iterator Helper");Bye.exports=function(e,t,r){var n=function n(a,o){o?(o.iterator=a.iterator,o.next=a.next):o=a,o.type=t?zye:Fye,o.returnHandlerResult=!!r,o.nextHandler=e,o.counter=0,o.done=!1,n7t(this,o)};return n.prototype=t?i7t:Uye,n}});var Gye=P(function(){"use strict";var a7t=ne(),Wye=Ft(),o7t=tn(),Vye=Ht(),s7t=im(),l7t=l0(),u7t=Array,c7t=l7t(function(){for(;;){var e=this.iterator;if(!e){var t=this.nextIterableIndex++,r=this.iterables;if(t>=r.length){this.done=!0;return}var n=r[t];this.iterables[t]=null,e=this.iterator=Wye(n.method,n.iterable),this.next=e.next}var i=Vye(Wye(this.next,e));if(i.done){this.iterator=null,this.next=null;continue}return i.value}});a7t({target:"Iterator",stat:!0},{concat:function concat(){for(var t=arguments.length,r=u7t(t),n=0;n1?arguments[1]:void 0),m;m=m?m.next:u.first;)for(p(m.value,m.key,this);m&&m.removed;)m=m.previous},has:function has(d){return!!l(this,d)}}),e_e(a,r?{get:function get1(d){var u=l(this,d);return u&&u.value},set:function set1(d,u){return s(this,d===0?0:d,u)}}:{add:function add(d){return s(this,d=d===0?0:d,d)}}),TS&&A9t(a,"size",{configurable:!0,get:function get1(){return o(this).size}}),i},setStrong:function setStrong(e,t,r){var n=t+" Iterator",i=vW(t),a=vW(n);$9t(e,t,function(o,s){r_e(this,{type:n,target:o,state:i(o),kind:s,last:null})},function(){for(var o=a(this),s=o.kind,l=o.last;l&&l.removed;)l=l.previous;return!o.target||!(o.last=l=l?l.next:o.state.first)?(o.target=null,VA(void 0,!0)):VA(s==="keys"?l.key:s==="values"?l.value:[l.key,l.value],!1)},r?"entries":"values",!r,!0),N9t(t)}}});var a_e=P(function(){"use strict";var D9t=ES(),q9t=yW();D9t("Map",function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},q9t)});var o_e=P(function(){"use strict";a_e()});var _W=P(function(Mpn,s_e){"use strict";var GA=Ze(),IS=Map.prototype;s_e.exports={Map:Map,set:GA(IS.set),get:GA(IS.get),has:GA(IS.has),remove:GA(IS.delete),proto:IS}});var c_e=P(function(){"use strict";var L9t=ne(),F9t=Ze(),z9t=tn(),j9t=Wi(),U9t=Za(),HA=_W(),l_e=Un(),B9t=We(),u_e=HA.Map,W9t=HA.has,V9t=HA.get,G9t=HA.set,H9t=F9t([].push),Z9t=l_e||B9t(function(){return u_e.groupBy("ab",function(e){return e}).get("a").length!==1});L9t({target:"Map",stat:!0,forced:l_e||Z9t},{groupBy:function groupBy(t,r){j9t(t),z9t(r);var n=new u_e,i=0;return U9t(t,function(a){var o=r(a,i++);W9t(n,o)?H9t(V9t(n,o),a):G9t(n,o,[a])}),n}})});var bW=P(function(Dpn,d_e){"use strict";var K9t=Math.log;d_e.exports=Math.log1p||function(t){var r=+t;return r>-1e-8&&r<1e-8?r-r*r/2:K9t(1+r)}});var f_e=P(function(){"use strict";var Q9t=ne(),J9t=bW(),wW=Math.acosh,Y9t=Math.log,p_e=Math.sqrt,X9t=Math.LN2,ePt=!wW||Math.floor(wW(Number.MAX_VALUE))!==710||wW(1/0)!==1/0;Q9t({target:"Math",stat:!0,forced:ePt},{acosh:function acosh(t){var r=+t;return r<1?NaN:r>94906265.62425156?Y9t(r)+X9t:J9t(r-1+p_e(r-1)*p_e(r+1))}})});var g_e=P(function(){"use strict";var tPt=ne(),m_e=Math.asinh,rPt=Math.log,nPt=Math.sqrt;function h_e(e){var t=+e;return!isFinite(t)||t===0?t:t<0?-h_e(-t):rPt(t+nPt(t*t+1))}var iPt=!(m_e&&1/m_e(0)>0);tPt({target:"Math",stat:!0,forced:iPt},{asinh:h_e})});var v_e=P(function(){"use strict";var aPt=ne(),x_e=Math.atanh,oPt=Math.log,sPt=!(x_e&&1/x_e(-0)<0);aPt({target:"Math",stat:!0,forced:sPt},{atanh:function atanh(t){var r=+t;return r===0?r:oPt((1+r)/(1-r))/2}})});var y_e=P(function(){"use strict";var lPt=ne(),uPt=_A(),cPt=Math.abs,dPt=Math.pow;lPt({target:"Math",stat:!0},{cbrt:function cbrt(t){var r=+t;return uPt(r)*dPt(cPt(r),1/3)}})});var __e=P(function(){"use strict";var pPt=ne(),fPt=Math.floor,mPt=Math.log,hPt=Math.LOG2E;pPt({target:"Math",stat:!0},{clz32:function clz32(t){var r=t>>>0;return r?31-fPt(mPt(r+.5)*hPt):32}})});var AS=P(function(Hpn,b_e){"use strict";var CS=Math.expm1,gPt=Math.exp;b_e.exports=!CS||CS(10)>22025.465794806718||CS(10)<22025.465794806718||CS(-2e-17)!==-2e-17?function(t){var r=+t;return r===0?r:r>-1e-6&&r<1e-6?r+r*r/2:gPt(r)-1}:CS});var S_e=P(function(){"use strict";var xPt=ne(),vPt=AS(),w_e=Math.cosh,yPt=Math.abs,SW=Math.E,_Pt=!w_e||w_e(710)===1/0;xPt({target:"Math",stat:!0,forced:_Pt},{cosh:function cosh(t){var r=vPt(yPt(t)-1)+1;return(r+1/(r*SW*SW))*(SW/2)}})});var E_e=P(function(){"use strict";var bPt=ne(),k_e=AS();bPt({target:"Math",stat:!0,forced:k_e!==Math.expm1},{expm1:k_e})});var T_e=P(function(){"use strict";var wPt=ne(),SPt=LU();wPt({target:"Math",stat:!0},{fround:SPt})});var I_e=P(function(){"use strict";var kPt=ne(),EPt=qU(),TPt=9765625e-10,IPt=65504,CPt=6103515625e-14;kPt({target:"Math",stat:!0},{f16round:function f16round(t){return EPt(t,TPt,IPt,CPt)}})});var A_e=P(function(){"use strict";var APt=ne(),C_e=Math.hypot,PPt=Math.abs,OPt=Math.sqrt,RPt=!!C_e&&C_e(1/0,NaN)!==1/0;APt({target:"Math",stat:!0,arity:2,forced:RPt},{hypot:function hypot(t,r){for(var n=0,i=0,a=arguments.length,o=0,s,l;i0?(l=s/o,n+=l*l):n+=s;return o===1/0?1/0:o*OPt(n)}})});var O_e=P(function(){"use strict";var MPt=ne(),$Pt=We(),P_e=Math.imul,NPt=$Pt(function(){return P_e(0xffffffff,5)!==-5||P_e.length!==2});MPt({target:"Math",stat:!0,forced:NPt},{imul:function imul(t,r){var n=65535,i=+t,a=+r,o=n&i,s=n&a;return 0|o*s+((n&i>>>16)*s+o*(n&a>>>16)<<16>>>0)}})});var kW=P(function(ofn,R_e){"use strict";var DPt=Math.log,qPt=Math.LOG10E;R_e.exports=Math.log10||function(t){return DPt(t)*qPt}});var M_e=P(function(){"use strict";var LPt=ne(),FPt=kW();LPt({target:"Math",stat:!0},{log10:FPt})});var $_e=P(function(){"use strict";var zPt=ne(),jPt=bW();zPt({target:"Math",stat:!0},{log1p:jPt})});var N_e=P(function(){"use strict";var UPt=ne(),BPt=rB();UPt({target:"Math",stat:!0},{log2:BPt})});var D_e=P(function(){"use strict";var WPt=ne(),VPt=_A();WPt({target:"Math",stat:!0},{sign:VPt})});var F_e=P(function(){"use strict";var GPt=ne(),HPt=We(),q_e=AS(),ZPt=Math.abs,L_e=Math.exp,KPt=Math.E,QPt=HPt(function(){return Math.sinh(-2e-17)!==-2e-17});GPt({target:"Math",stat:!0,forced:QPt},{sinh:function sinh(t){var r=+t;return ZPt(r)<1?(q_e(r)-q_e(-r))/2:(L_e(r-1)-L_e(-r-1))*(KPt/2)}})});var W_e=P(function(){"use strict";var JPt=ne(),YPt=Ze(),XPt=Za(),eOt=RangeError,tOt=TypeError,mc=1/0,rOt=NaN,Z1=Math.abs,CW=Math.pow,z_e=YPt([].push),PS=CW(2,1023),nOt=CW(2,53)-1,j_e=Number.MAX_VALUE,U_e=CW(2,971),OS={},EW={},TW={},IW={},B_e={},ZA=function ZA(e,t){var r=e+t,n=t-(r-e);return{hi:r,lo:n}};JPt({target:"Math",stat:!0},{sumPrecise:function sumPrecise(t){var r=[],n=0,i=IW;switch(XPt(t,function(_){if(++n>=nOt)throw new eOt("Maximum allowed index exceeded");if(typeof _!="number")throw new tOt("Value is not a number");i!==OS&&(_!==_?i=OS:_===mc?i=i===EW?OS:TW:_===-mc?i=i===TW?OS:EW:(_!==0||1/_===mc)&&(i===IW||i===B_e)&&(i=B_e,z_e(r,_)))}),i){case OS:return rOt;case EW:return-mc;case TW:return mc;case IW:return-0}for(var a=[],o=0,s,l,c,d,u,p,m=0;m=0?a[y]:0;if(y--,Z1(o)>1||o>0&&v>0||o<0&&v<0)return o>0?mc:-mc;if(c=ZA(o*PS,v/2),d=c.hi,u=c.lo,u*=2,Z1(2*d)===mc)return d>0?d===PS&&u===-(U_e/2)&&y>=0&&a[y]<0?j_e:mc:d===-PS&&u===U_e/2&&y>=0&&a[y]>0?-j_e:-mc;u!==0&&(a[++y]=u,u=0),d*=2}for(;y>=0&&(c=ZA(d,a[y--]),d=c.hi,u=c.lo,u===0););return y>=0&&(u<0&&a[y]<0||u>0&&a[y]>0)&&(l=u*2,s=d+l,l===s-d&&(d=s)),d}})});var H_e=P(function(){"use strict";var iOt=ne(),V_e=AS(),G_e=Math.exp;iOt({target:"Math",stat:!0},{tanh:function tanh(t){var r=+t,n=V_e(r),i=V_e(-r);return n===1/0?1:i===1/0?-1:(n-i)/(G_e(r)+G_e(-r))}})});var Z_e=P(function(){"use strict";var aOt=Js();aOt(Math,"Math",!0)});var K_e=P(function(){"use strict";var oOt=ne(),sOt=cj();oOt({target:"Math",stat:!0},{trunc:sOt})});var RS=P(function(Efn,Q_e){"use strict";var lOt=Ze();Q_e.exports=lOt(1.1.valueOf)});var o2=P(function(Tfn,J_e){"use strict";J_e.exports=" \n\v\f\r \xa0               \u2028\u2029\uFEFF"});var K1=P(function(Ifn,X_e){"use strict";var uOt=Ze(),cOt=Wi(),dOt=Cr(),PW=o2(),Y_e=uOt("".replace),pOt=RegExp("^["+PW+"]+"),fOt=RegExp("(^|[^"+PW+"])["+PW+"]+$"),AW=function AW(e){return function(t){var r=dOt(cOt(t));return e&1&&(r=Y_e(r,pOt,"")),e&2&&(r=Y_e(r,fOt,"$1")),r}};X_e.exports={start:AW(1),end:AW(2),trim:AW(3)}});var obe=P(function(){"use strict";var mOt=ne(),OW=Un(),hOt=rr(),rbe=ut(),RW=Z6(),nbe=Ze(),gOt=jy(),ebe=Kr(),xOt=Xh(),vOt=Ps(),yOt=Vh(),ibe=U6(),_Ot=We(),bOt=Zh().f,wOt=qo().f,SOt=Ni().f,kOt=RS(),EOt=K1().trim,MS="Number",s2=rbe[MS],tbe=RW[MS],MW=s2.prototype,TOt=rbe.TypeError,IOt=nbe("".slice),KA=nbe("".charCodeAt),COt=function COt(e){var t=ibe(e,"number");return(typeof t==="undefined"?"undefined":_type_of(t))=="bigint"?t:AOt(t)},AOt=function AOt(e){var t=ibe(e,"number"),r,n,i,a,o,s,l,c;if(yOt(t))throw new TOt("Cannot convert a Symbol value to a number");if(typeof t=="string"&&t.length>2){if(t=EOt(t),r=KA(t,0),r===43||r===45){if(n=KA(t,2),n===88||n===120)return NaN}else if(r===48){switch(KA(t,1)){case 66:case 98:i=2,a=49;break;case 79:case 111:i=8,a=55;break;default:return+t}for(o=IOt(t,2),s=o.length,l=0;la)return NaN;return parseInt(o,i)}}return+t},$W=gOt(MS,!s2(" 0o1")||!s2("0b1")||s2("+0x1")),POt=function POt(e){return vOt(MW,e)&&_Ot(function(){kOt(e)})},QA=function QA1(t){var r=arguments.length<1?0:s2(COt(t));return POt(this)?xOt(Object(r),this,QA):r};QA.prototype=MW;$W&&!OW&&(MW.constructor=QA);mOt({global:!0,constructor:!0,wrap:!0,forced:$W},{Number:QA});var abe=function abe(e,t){for(var r=hOt?bOt(t):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),n=0,i;r.length>n;n++)ebe(t,i=r[n])&&!ebe(e,i)&&SOt(e,i,wOt(t,i))};OW&&tbe&&abe(RW[MS],tbe);($W||OW)&&abe(RW[MS],s2)});var sbe=P(function(){"use strict";var OOt=ne();OOt({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{EPSILON:Math.pow(2,-52)})});var ube=P(function(Rfn,lbe){"use strict";var ROt=ut(),MOt=ROt.isFinite;lbe.exports=Number.isFinite||function(t){return typeof t=="number"&&MOt(t)}});var cbe=P(function(){"use strict";var $Ot=ne(),NOt=ube();$Ot({target:"Number",stat:!0},{isFinite:NOt})});var JA=P(function(Nfn,dbe){"use strict";var DOt=pr(),qOt=Math.floor;dbe.exports=Number.isInteger||function(t){return!DOt(t)&&isFinite(t)&&qOt(t)===t}});var pbe=P(function(){"use strict";var LOt=ne(),FOt=JA();LOt({target:"Number",stat:!0},{isInteger:FOt})});var fbe=P(function(){"use strict";var zOt=ne();zOt({target:"Number",stat:!0},{isNaN:function isNaN1(t){return t!==t}})});var mbe=P(function(){"use strict";var jOt=ne(),UOt=JA(),BOt=Math.abs;jOt({target:"Number",stat:!0},{isSafeInteger:function isSafeInteger(t){return UOt(t)&&BOt(t)<=0x1fffffffffffff}})});var hbe=P(function(){"use strict";var WOt=ne();WOt({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{MAX_SAFE_INTEGER:0x1fffffffffffff})});var gbe=P(function(){"use strict";var VOt=ne();VOt({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{MIN_SAFE_INTEGER:-0x1fffffffffffff})});var NW=P(function(Gfn,_be){"use strict";var ybe=ut(),GOt=We(),HOt=Ze(),ZOt=Cr(),KOt=K1().trim,QOt=o2(),JOt=HOt("".charAt),YA=ybe.parseFloat,xbe=ybe.Symbol,vbe=xbe&&xbe.iterator,YOt=1/YA(QOt+"-0")!==-1/0||vbe&&!GOt(function(){YA(Object(vbe))});_be.exports=YOt?function(t){var r=KOt(ZOt(t)),n=YA(r);return n===0&&JOt(r,0)==="-"?-0:n}:YA});var wbe=P(function(){"use strict";var XOt=ne(),bbe=NW();XOt({target:"Number",stat:!0,forced:Number.parseFloat!==bbe},{parseFloat:bbe})});var DW=P(function(Kfn,Cbe){"use strict";var Tbe=ut(),eRt=We(),tRt=Ze(),rRt=Cr(),nRt=K1().trim,Sbe=o2(),$S=Tbe.parseInt,kbe=Tbe.Symbol,Ebe=kbe&&kbe.iterator,Ibe=/^[+-]?0x/i,iRt=tRt(Ibe.exec),aRt=$S(Sbe+"08")!==8||$S(Sbe+"0x16")!==22||Ebe&&!eRt(function(){$S(Object(Ebe))});Cbe.exports=aRt?function(t,r){var n=nRt(rRt(t));return $S(n,r>>>0||(iRt(Ibe,n)?16:10))}:$S});var Pbe=P(function(){"use strict";var oRt=ne(),Abe=DW();oRt({target:"Number",stat:!0,forced:Number.parseInt!==Abe},{parseInt:Abe})});var Nbe=P(function(){"use strict";var sRt=ne(),LW=Ze(),lRt=la(),uRt=RS(),cRt=yS(),dRt=kW(),qW=We(),pRt=RangeError,Obe=String,fRt=isFinite,mRt=Math.abs,hRt=Math.floor,Rbe=Math.pow,gRt=Math.round,Fp=LW(1.1.toExponential),xRt=LW(cRt),Mbe=LW("".slice),$be=Fp(-69e-12,4)==="-6.9000e-11"&&Fp(1.255,2)==="1.25e+0"&&Fp(12345,3)==="1.235e+4"&&Fp(25,0)==="3e+1",vRt=function vRt(){return qW(function(){Fp(1,1/0)})&&qW(function(){Fp(1,-1/0)})},yRt=function yRt(){return!qW(function(){Fp(1/0,1/0),Fp(NaN,1/0)})},_Rt=!$be||!vRt()||!yRt();sRt({target:"Number",proto:!0,forced:_Rt},{toExponential:function toExponential(t){var r=uRt(this);if(t===void 0)return Fp(r);var n=lRt(t);if(!fRt(r))return String(r);if(n<0||n>20)throw new pRt("Incorrect fraction digits");if($be)return Fp(r,n);var i="",a,o,s,l;if(r<0&&(i="-",r=-r),r===0)o=0,a=xRt("0",n+1);else{var c=dRt(r);o=hRt(c);var d=Rbe(10,o-n),u=gRt(r/d);2*r>=(2*u+1)*d&&(u+=1),u>=Rbe(10,n+1)&&(u/=10,o+=1),a=Obe(u)}return n!==0&&(a=Mbe(a,0,1)+"."+Mbe(a,1)),o===0?(s="+",l="0"):(s=o>0?"+":"-",l=Obe(mRt(o))),a+="e"+s+l,i+a}})});var jbe=P(function(){"use strict";var bRt=ne(),jW=Ze(),wRt=la(),SRt=RS(),kRt=yS(),Dbe=We(),ERt=RangeError,Fbe=String,zbe=Math.floor,zW=jW(kRt),qbe=jW("".slice),NS=jW(1.1.toFixed),u2=function u21(e,t,r){return t===0?r:t%2===1?u2(e,t-1,r*e):u2(e*e,t/2,r)},TRt=function TRt(e){for(var t=0,r=e;r>=4096;)t+=12,r/=4096;for(;r>=2;)t+=1,r/=2;return t},l2=function l2(e,t,r){for(var n=-1,i=r;++n<6;)i+=t*e[n],e[n]=i%1e7,i=zbe(i/1e7)},FW=function FW(e,t){for(var r=6,n=0;--r>=0;)n+=e[r],e[r]=zbe(n/t),n=n%t*1e7},Lbe=function Lbe(e){for(var t=6,r="";--t>=0;)if(r!==""||t===0||e[t]!==0){var n=Fbe(e[t]);r=r===""?n:r+zW("0",7-n.length)+n}return r},IRt=Dbe(function(){return NS(8e-5,3)!=="0.000"||NS(.9,0)!=="1"||NS(1.255,2)!=="1.25"||NS(0xde0b6b3a7640080,0)!=="1000000000000000128"})||!Dbe(function(){NS({})});bRt({target:"Number",proto:!0,forced:IRt},{toFixed:function toFixed(t){var r=SRt(this),n=wRt(t),i=[0,0,0,0,0,0],a="",o="0",s,l,c,d;if(n<0||n>20)throw new ERt("Incorrect fraction digits");if(r!==r)return"NaN";if(r<=-1e21||r>=1e21)return Fbe(r);if(r<0&&(a="-",r=-r),r>1e-21)if(s=TRt(r*u2(2,69,1))-69,l=s<0?r*u2(2,-s,1):r/u2(2,s,1),l*=0x10000000000000,s=52-s,s>0){for(l2(i,0,l),c=n;c>=7;)l2(i,1e7,0),c-=7;for(l2(i,u2(10,c,1),0),c=s-1;c>=23;)FW(i,1<<23),c-=23;FW(i,1<0?(d=o.length,o=a+(d<=n?"0."+zW("0",n-d)+o:qbe(o,0,d-n)+"."+qbe(o,d-n))):o=a+o,o}})});var Wbe=P(function(){"use strict";var CRt=ne(),ARt=Ze(),Ube=We(),Bbe=RS(),XA=ARt(1.1.toPrecision),PRt=Ube(function(){return XA(1,void 0)!=="1"})||!Ube(function(){XA({})});CRt({target:"Number",proto:!0,forced:PRt},{toPrecision:function toPrecision(t){return t===void 0?XA(Bbe(this)):XA(Bbe(this),t)}})});var BW=P(function(imn,Hbe){"use strict";var Vbe=rr(),ORt=Ze(),RRt=Ft(),MRt=We(),UW=Uy(),$Rt=G6(),NRt=z6(),DRt=qn(),qRt=P1(),c2=Object.assign,Gbe=Object.defineProperty,LRt=ORt([].concat);Hbe.exports=!c2||MRt(function(){if(Vbe&&c2({b:1},c2(Gbe({},"a",{enumerable:!0,get:function get1(){Gbe(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var e={},t={},r=Symbol("assign detection"),n="abcdefghijklmnopqrst";return e[r]=7,n.split("").forEach(function(i){t[i]=i}),c2({},e)[r]!==7||UW(c2({},t)).join("")!==n})?function(t,r){for(var n=DRt(t),i=arguments.length,a=1,o=$Rt.f,s=NRt.f;i>a;)for(var l=qRt(arguments[a++]),c=o?LRt(UW(l),o(l)):UW(l),d=c.length,u=0,p;d>u;)p=c[u++],(!Vbe||RRt(s,l,p))&&(n[p]=l[p]);return n}:c2});var Kbe=P(function(){"use strict";var FRt=ne(),Zbe=BW();FRt({target:"Object",stat:!0,arity:2,forced:Object.assign!==Zbe},{assign:Zbe})});var Qbe=P(function(){"use strict";var zRt=ne(),jRt=rr(),URt=Fo();zRt({target:"Object",stat:!0,sham:!jRt},{create:URt})});var DS=P(function(umn,Ybe){"use strict";var BRt=Un(),WRt=ut(),VRt=We(),Jbe=yA();Ybe.exports=BRt||!VRt(function(){if(!(Jbe&&Jbe<535)){var e=Math.random();__defineSetter__.call(null,e,function(){}),delete WRt[e]}})});var Xbe=P(function(){"use strict";var GRt=ne(),HRt=rr(),ZRt=DS(),KRt=tn(),QRt=qn(),JRt=Ni();HRt&&GRt({target:"Object",proto:!0,forced:ZRt},{__defineGetter__:function __defineGetter__(t,r){JRt.f(QRt(this),t,{get:KRt(r),enumerable:!0,configurable:!0})}})});var twe=P(function(){"use strict";var YRt=ne(),XRt=rr(),ewe=NC().f;YRt({target:"Object",stat:!0,forced:Object.defineProperties!==ewe,sham:!XRt},{defineProperties:ewe})});var nwe=P(function(){"use strict";var eMt=ne(),tMt=rr(),rwe=Ni().f;eMt({target:"Object",stat:!0,forced:Object.defineProperty!==rwe,sham:!tMt},{defineProperty:rwe})});var iwe=P(function(){"use strict";var rMt=ne(),nMt=rr(),iMt=DS(),aMt=tn(),oMt=qn(),sMt=Ni();nMt&&rMt({target:"Object",proto:!0,forced:iMt},{__defineSetter__:function __defineSetter__1(t,r){sMt.f(oMt(this),t,{set:aMt(r),enumerable:!0,configurable:!0})}})});var WW=P(function(vmn,uwe){"use strict";var owe=rr(),lMt=We(),swe=Ze(),uMt=Os(),cMt=Uy(),dMt=go(),pMt=z6().f,lwe=swe(pMt),fMt=swe([].push),mMt=owe&&lMt(function(){var e=Object.create(null);return e[2]=2,!lwe(e,2)}),awe=function awe(e){return function(t){for(var r=dMt(t),n=cMt(r),i=mMt&&uMt(r)===null,a=n.length,o=0,s=[],l;a>o;)l=n[o++],(!owe||(i?l in r:lwe(r,l)))&&fMt(s,e?[l,r[l]]:r[l]);return s}};uwe.exports={entries:awe(!0),values:awe(!1)}});var cwe=P(function(){"use strict";var hMt=ne(),gMt=WW().entries;hMt({target:"Object",stat:!0},{entries:function entries(t){return gMt(t)}})});var dwe=P(function(){"use strict";var xMt=ne(),vMt=u0(),yMt=We(),_Mt=pr(),bMt=c0().onFreeze,VW=Object.freeze,wMt=yMt(function(){VW(1)});xMt({target:"Object",stat:!0,forced:wMt,sham:!vMt},{freeze:function freeze(t){return VW&&_Mt(t)?VW(bMt(t)):t}})});var pwe=P(function(){"use strict";var SMt=ne(),kMt=Za(),EMt=Tu();SMt({target:"Object",stat:!0},{fromEntries:function fromEntries(t){var r={};return kMt(t,function(n,i){EMt(r,n,i)},{AS_ENTRIES:!0}),r}})});var hwe=P(function(){"use strict";var TMt=ne(),IMt=We(),CMt=go(),fwe=qo().f,mwe=rr(),AMt=!mwe||IMt(function(){fwe(1)});TMt({target:"Object",stat:!0,forced:AMt,sham:!mwe},{getOwnPropertyDescriptor:function getOwnPropertyDescriptor(t,r){return fwe(CMt(t),r)}})});var gwe=P(function(){"use strict";var PMt=ne(),OMt=rr(),RMt=OC(),MMt=go(),$Mt=qo(),NMt=Tu();PMt({target:"Object",stat:!0,sham:!OMt},{getOwnPropertyDescriptors:function getOwnPropertyDescriptors(t){for(var r=MMt(t),n=$Mt.f,i=RMt(r),a={},o=0,s,l;i.length>o;)l=n(r,s=i[o++]),l!==void 0&&NMt(a,s,l);return a}})});var xwe=P(function(){"use strict";var DMt=ne(),qMt=We(),LMt=LC().f,FMt=qMt(function(){return!Object.getOwnPropertyNames(1)});DMt({target:"Object",stat:!0,forced:FMt},{getOwnPropertyNames:LMt})});var ywe=P(function(){"use strict";var zMt=ne(),jMt=We(),UMt=qn(),vwe=Os(),BMt=eA(),WMt=jMt(function(){vwe(1)});zMt({target:"Object",stat:!0,forced:WMt,sham:!BMt},{getPrototypeOf:function getPrototypeOf(t){return vwe(UMt(t))}})});var bwe=P(function(){"use strict";var VMt=ne(),GMt=Tu(),HMt=Zr(),ZMt=Ze(),KMt=tn(),QMt=Wi(),JMt=tm(),YMt=Za(),XMt=We(),_we=Object.groupBy,e$t=HMt("Object","create"),t$t=ZMt([].push),r$t=!_we||XMt(function(){return _we("ab",function(e){return e}).a.length!==1});VMt({target:"Object",stat:!0,forced:r$t},{groupBy:function groupBy(t,r){QMt(t),KMt(r);var n=e$t(null),i=0;return YMt(t,function(a){var o=JMt(r(a,i++));o in n?t$t(n[o],a):GMt(n,o,[a])}),n}})});var wwe=P(function(){"use strict";var n$t=ne(),i$t=Kr();n$t({target:"Object",stat:!0},{hasOwn:i$t})});var GW=P(function(qmn,Swe){"use strict";Swe.exports=Object.is||function(t,r){return t===r?t!==0||1/t===1/r:t!==t&&r!==r}});var kwe=P(function(){"use strict";var a$t=ne(),o$t=GW();a$t({target:"Object",stat:!0},{is:o$t})});var Twe=P(function(){"use strict";var s$t=ne(),Ewe=WA();s$t({target:"Object",stat:!0,forced:Object.isExtensible!==Ewe},{isExtensible:Ewe})});var Cwe=P(function(){"use strict";var l$t=ne(),u$t=We(),c$t=pr(),d$t=as(),Iwe=UA(),HW=Object.isFrozen,p$t=Iwe||u$t(function(){HW(1)});l$t({target:"Object",stat:!0,forced:p$t},{isFrozen:function isFrozen(t){return!c$t(t)||Iwe&&d$t(t)==="ArrayBuffer"?!0:HW?HW(t):!1}})});var Pwe=P(function(){"use strict";var f$t=ne(),m$t=We(),h$t=pr(),g$t=as(),Awe=UA(),ZW=Object.isSealed,x$t=Awe||m$t(function(){ZW(1)});f$t({target:"Object",stat:!0,forced:x$t},{isSealed:function isSealed(t){return!h$t(t)||Awe&&g$t(t)==="ArrayBuffer"?!0:ZW?ZW(t):!1}})});var Rwe=P(function(){"use strict";var v$t=ne(),y$t=qn(),Owe=Uy(),_$t=We(),b$t=_$t(function(){Owe(1)});v$t({target:"Object",stat:!0,forced:b$t},{keys:function keys(t){return Owe(y$t(t))}})});var Mwe=P(function(){"use strict";var w$t=ne(),S$t=rr(),k$t=DS(),E$t=qn(),T$t=tm(),I$t=Os(),C$t=qo().f;S$t&&w$t({target:"Object",proto:!0,forced:k$t},{__lookupGetter__:function __lookupGetter__(t){var r=E$t(this),n=T$t(t),i;do if(i=C$t(r,n))return i.get;while(r=I$t(r))}})});var $we=P(function(){"use strict";var A$t=ne(),P$t=rr(),O$t=DS(),R$t=qn(),M$t=tm(),$$t=Os(),N$t=qo().f;P$t&&A$t({target:"Object",proto:!0,forced:O$t},{__lookupSetter__:function __lookupSetter__(t){var r=R$t(this),n=M$t(t),i;do if(i=N$t(r,n))return i.set;while(r=$$t(r))}})});var Nwe=P(function(){"use strict";var D$t=ne(),q$t=pr(),L$t=c0().onFreeze,F$t=u0(),z$t=We(),KW=Object.preventExtensions,j$t=z$t(function(){KW(1)});D$t({target:"Object",stat:!0,forced:j$t,sham:!F$t},{preventExtensions:function preventExtensions(t){return KW&&q$t(t)?KW(L$t(t)):t}})});var zwe=P(function(){"use strict";var U$t=rr(),B$t=ya(),W$t=pr(),V$t=Gj(),G$t=qn(),H$t=Wi(),Dwe=Object.getPrototypeOf,qwe=Object.setPrototypeOf,Lwe=Object.prototype,Fwe="__proto__";if(U$t&&Dwe&&qwe&&!(Fwe in Lwe))try{B$t(Lwe,Fwe,{configurable:!0,get:function get1(){return Dwe(G$t(this))},set:function set1(t){var r=H$t(this);V$t(t)&&W$t(r)&&qwe(r,t)}})}catch(e){}});var jwe=P(function(){"use strict";var Z$t=ne(),K$t=pr(),Q$t=c0().onFreeze,J$t=u0(),Y$t=We(),QW=Object.seal,X$t=Y$t(function(){QW(1)});Z$t({target:"Object",stat:!0,forced:X$t,sham:!J$t},{seal:function seal(t){return QW&&K$t(t)?QW(Q$t(t)):t}})});var Uwe=P(function(){"use strict";var eNt=ne(),tNt=fc();eNt({target:"Object",stat:!0},{setPrototypeOf:tNt})});var Wwe=P(function(ohn,Bwe){"use strict";var rNt=MC(),nNt=Pl();Bwe.exports=rNt?({}).toString:function(){return"[object "+nNt(this)+"]"}});var Vwe=P(function(){"use strict";var iNt=MC(),aNt=Xn(),oNt=Wwe();iNt||aNt(Object.prototype,"toString",oNt,{unsafe:!0})});var Gwe=P(function(){"use strict";var sNt=ne(),lNt=WW().values;sNt({target:"Object",stat:!0},{values:function values(t){return lNt(t)}})});var Zwe=P(function(){"use strict";var uNt=ne(),Hwe=NW();uNt({global:!0,forced:parseFloat!==Hwe},{parseFloat:Hwe})});var Qwe=P(function(){"use strict";var cNt=ne(),Kwe=DW();cNt({global:!0,forced:parseInt!==Kwe},{parseInt:Kwe})});var e9=P(function(hhn,Jwe){"use strict";var dNt=Qh(),pNt=Gh(),fNt=TypeError;Jwe.exports=function(e){if(dNt(e))return e;throw new fNt(pNt(e)+" is not a constructor")}});var qS=P(function(ghn,Xwe){"use strict";var Ywe=Ht(),mNt=e9(),hNt=Pp(),gNt=_r(),xNt=gNt("species");Xwe.exports=function(e,t){var r=Ywe(e).constructor,n;return r===void 0||hNt(n=Ywe(r)[xNt])?t:mNt(n)}});var Cu=P(function(xhn,e4e){"use strict";var vNt=TypeError;e4e.exports=function(e,t){if(e1?wqt(arguments,1):[],r=Sqt.f(this),n=_6e(function(){return bqt(kqt(e),void 0,t)});return(n.error?r.reject:r.resolve)(n.value),r.promise}})});var w6e=P(function(){"use strict";var Tqt=ne(),Iqt=zp();Tqt({target:"Promise",stat:!0},{withResolvers:function withResolvers(){var t=Iqt.f(this);return{promise:t.promise,resolve:t.resolve,reject:t.reject}}})});var OV=P(function(r0n,P6e){"use strict";var I6e=ut(),C6e=j6(),A6e=fn(),Cqt=Fo(),c9=Os(),Aqt=Xn(),Pqt=_r(),Oqt=Un(),S6e="USE_FUNCTION_CONSTRUCTOR",k6e=Pqt("asyncIterator"),E6e=I6e.AsyncIterator,T6e=C6e.AsyncIteratorPrototype,jp,PV;if(T6e)jp=T6e;else if(A6e(E6e))jp=E6e.prototype;else if(C6e[S6e]||I6e[S6e])try{PV=c9(c9(c9(Function("return async function*(){}()")()))),c9(PV)===Object.prototype&&(jp=PV)}catch(e){}jp?Oqt&&(jp=Cqt(jp)):jp={};A6e(jp[k6e])||Aqt(jp,k6e,function(){return this});P6e.exports=jp});var MV=P(function(n0n,F6e){"use strict";var O6e=Ft(),R6e=Ht(),Rqt=Fo(),Mqt=Do(),$qt=Np(),N6e=Di(),Nqt=Uo(),Dqt=Zr(),qqt=OV(),D6e=t0(),RV=Dqt("Promise"),q6e="AsyncFromSyncIterator",Lqt=N6e.set,M6e=N6e.getterFor(q6e),$6e=function $6e(e,t,r,n,i){var a=e.done;RV.resolve(e.value).then(function(o){t(D6e(o,a))},function(o){if(!a&&i)try{Nqt(n,"throw",o)}catch(s){o=s}r(o)})},L6e=function L6e(t){t.type=q6e,Lqt(this,t)};L6e.prototype=$qt(Rqt(qqt),{next:function next(){var t=M6e(this);return new RV(function(r,n){var i=R6e(O6e(t.next,t.iterator));$6e(i,r,n,t.iterator,!0)})},return:function _return(){var e=M6e(this).iterator;return new RV(function(t,r){var n=Mqt(e,"return");if(n===void 0)return t(D6e(void 0,!0));var i=R6e(O6e(n,e));$6e(i,t,r,e)})}});F6e.exports=L6e});var j6e=P(function(i0n,z6e){"use strict";var Fqt=Ft(),zqt=MV(),jqt=Ht(),Uqt=j1(),Bqt=ss(),Wqt=Do(),Vqt=_r(),Gqt=Vqt("asyncIterator");z6e.exports=function(e,t){var r=arguments.length<2?Wqt(e,Gqt):t;return r?jqt(Fqt(r,e)):new zqt(Bqt(Uqt(e)))}});var B6e=P(function(a0n,U6e){"use strict";var Hqt=Ft(),Zqt=Zr(),Kqt=Do();U6e.exports=function(e,t,r,n){try{var i=Kqt(e,"return");if(i)return Zqt("Promise").resolve(Hqt(i,e)).then(function(){t(r)},function(a){n(a)})}catch(a){return n(a)}t(r)}});var V6e=P(function(o0n,W6e){"use strict";var Qqt=Ft(),Jqt=tn(),$V=Ht(),Yqt=pr(),Xqt=e0(),eLt=Zr(),tLt=ss(),NV=B6e(),VS=function VS(e){var t=e===0,r=e===1,n=e===2,i=e===3;return function(a,o,s){$V(a);var l=o!==void 0;(l||!t)&&Jqt(o);var c=tLt(a),d=eLt("Promise"),u=c.iterator,p=c.next,m=0;return new d(function(h,g){var x=function x(v){NV(u,g,v,g)},y=function y1(){try{if(l)try{Xqt(m)}catch(v){x(v)}d.resolve($V(Qqt(p,u))).then(function(v){try{if($V(v).done)t?(s.length=m,h(s)):h(i?!1:n||void 0);else{var _=v.value;try{if(l){var b=o(_,m),k=function k(w){if(r)y();else if(n)w?y():NV(u,h,!1,g);else if(t)try{s[m++]=w,y()}catch(S){x(S)}else w?NV(u,h,i||_,g):y()};Yqt(b)?d.resolve(b).then(k,x):k(b)}else s[m++]=_,y()}catch(w){x(w)}}}catch(w){g(w)}},g)}catch(v){g(v)}};y()})}};W6e.exports={toArray:VS(0),forEach:VS(1),every:VS(2),some:VS(3),find:VS(4)}});var Q6e=P(function(s0n,K6e){"use strict";var rLt=Ol(),G6e=Ze(),nLt=qn(),iLt=Qh(),aLt=j6e(),oLt=j1(),sLt=ss(),lLt=im(),uLt=Do(),cLt=Zr(),dLt=$U(),pLt=_r(),fLt=MV(),mLt=V6e().toArray,hLt=pLt("asyncIterator"),H6e=G6e(dLt("Array","values")),gLt=G6e(H6e([]).next),xLt=function xLt(){return new Z6e(this)},Z6e=function Z6e(e){this.iterator=H6e(e)};Z6e.prototype.next=function(){return gLt(this.iterator)};K6e.exports=function(t){var r=this,n=arguments.length,i=n>1?arguments[1]:void 0,a=n>2?arguments[2]:void 0;return new(cLt("Promise"))(function(o){var s=nLt(t);i!==void 0&&(i=rLt(i,a));var l=uLt(s,hLt),c=l?void 0:lLt(s)||xLt,d=iLt(r)?new r:[],u=l?aLt(s,l):new fLt(sLt(oLt(s,c)));o(mLt(u,i,d))})}});var Y6e=P(function(){"use strict";var vLt=ne(),yLt=Q6e(),_Lt=We(),J6e=Array.fromAsync,bLt=!J6e||_Lt(function(){var e=0;return J6e.call(function(){return e++,[]},{length:0}),e!==1});vLt({target:"Array",stat:!0,forced:bLt},{fromAsync:yLt})});var oSe=P(function(){"use strict";var wLt=ne(),p9=rr(),rSe=Zr(),X6e=tn(),SLt=$l(),nSe=Xn(),kLt=Np(),ELt=ya(),iSe=_r(),aSe=Di(),DV=SB(),eSe=wd(),tSe=rSe("Promise"),TLt=rSe("SuppressedError"),ILt=ReferenceError,CLt=iSe("asyncDispose"),ALt=iSe("toStringTag"),m9="AsyncDisposableStack",PLt=aSe.set,f9=aSe.getterFor(m9),qV="async-dispose",GS="disposed",OLt="pending",d9=function d9(e){var t=f9(e);if(t.state===GS)throw new ILt(m9+" already disposed");return t},LV=function LV(){PLt(SLt(this,v2),{type:m9,state:OLt,stack:[]}),p9||(this.disposed=!1)},v2=LV.prototype;kLt(v2,{disposeAsync:function disposeAsync(){var t=this;return new tSe(function(r,n){var i=f9(t);if(i.state===GS)return r(void 0);i.state=GS,p9||(t.disposed=!0);var a=i.stack,o=a.length,s=!1,l,c=function c(u){s?l=new TLt(u,l):(s=!0,l=u),d()},d=function d2(){if(o){var u=a[--o];a[o]=null;try{tSe.resolve(u()).then(d,c)}catch(p){c(p)}}else i.stack=null,s?n(l):r(void 0)};d()})},use:function use1(t){return DV(d9(this),t,qV),t},adopt:function adopt(t,r){var n=d9(this);return X6e(r),DV(n,void 0,qV,function(){return r(t)}),t},defer:function defer(t){var r=d9(this);X6e(t),DV(r,void 0,qV,t)},move:function move(){var t=d9(this),r=new LV;return f9(r).stack=t.stack,t.stack=[],t.state=GS,p9||(this.disposed=!0),r}});p9&&ELt(v2,"disposed",{configurable:!0,get:function get1(){return f9(this).state===GS}});nSe(v2,CLt,v2.disposeAsync,{name:"disposeAsync"});nSe(v2,ALt,m9,{nonWritable:!0});var RLt=eSe&&eSe<136;wLt({global:!0,constructor:!0,forced:RLt},{AsyncDisposableStack:LV})});var cSe=P(function(){"use strict";var MLt=Ft(),$Lt=Xn(),NLt=Zr(),DLt=Do(),qLt=Kr(),LLt=_r(),sSe=OV(),lSe=LLt("asyncDispose"),uSe=NLt("Promise");qLt(sSe,lSe)||$Lt(sSe,lSe,function(){var e=this;return new uSe(function(t,r){var n=DLt(e,"return");n?uSe.resolve(MLt(n,e)).then(function(){t(void 0)},r):t(void 0)})})});var dSe=P(function(){"use strict";var FLt=ne(),zLt=Ml(),jLt=tn(),ULt=Ht(),BLt=We(),WLt=!BLt(function(){Reflect.apply(function(){})});FLt({target:"Reflect",stat:!0,forced:WLt},{apply:function apply(t,r,n){return zLt(jLt(t),r,ULt(n))}})});var vSe=P(function(){"use strict";var VLt=ne(),GLt=Zr(),FV=Ml(),HLt=CB(),pSe=e9(),ZLt=Ht(),fSe=pr(),KLt=Fo(),hSe=We(),zV=GLt("Reflect","construct"),QLt=Object.prototype,JLt=[].push,gSe=hSe(function(){function e(){}return!_instanceof(zV(function(){},[],e),e)}),xSe=!hSe(function(){zV(function(){})}),mSe=gSe||xSe;VLt({target:"Reflect",stat:!0,forced:mSe,sham:mSe},{construct:function construct(t,r){pSe(t),ZLt(r);var n=arguments.length<3?t:pSe(arguments[2]);if(xSe&&!gSe)return zV(t,r,n);if(t===n){switch(r.length){case 0:return new t;case 1:return new t(r[0]);case 2:return new t(r[0],r[1]);case 3:return new t(r[0],r[1],r[2]);case 4:return new t(r[0],r[1],r[2],r[3])}var i=[null];return FV(JLt,i,r),new(FV(HLt,t,i))}var a=n.prototype,o=KLt(fSe(a)?a:QLt),s=FV(t,o,r);return fSe(s)?s:o}})});var bSe=P(function(){"use strict";var YLt=ne(),XLt=rr(),ySe=Ht(),eFt=tm(),_Se=Ni(),tFt=We(),rFt=tFt(function(){Reflect.defineProperty(_Se.f({},1,{value:1}),1,{value:2})});YLt({target:"Reflect",stat:!0,forced:rFt,sham:!XLt},{defineProperty:function defineProperty(t,r,n){ySe(t);var i=eFt(r);ySe(n);try{return _Se.f(t,i,n),!0}catch(a){return!1}}})});var wSe=P(function(){"use strict";var nFt=ne(),iFt=Ht(),aFt=qo().f;nFt({target:"Reflect",stat:!0},{deleteProperty:function deleteProperty(t,r){var n=aFt(iFt(t),r);return n&&!n.configurable?!1:delete t[r]}})});var jV=P(function(w0n,kSe){"use strict";var SSe=Kr();kSe.exports=function(e){return e!==void 0&&(SSe(e,"value")||SSe(e,"writable"))}});var TSe=P(function(){"use strict";var oFt=ne(),sFt=Ft(),lFt=pr(),uFt=Ht(),cFt=jV(),dFt=qo(),pFt=Os();function ESe(e,t){var r=arguments.length<3?e:arguments[2],n,i;if(uFt(e)===r)return e[t];if(n=dFt.f(e,t),n)return cFt(n)?n.value:n.get===void 0?void 0:sFt(n.get,r);if(lFt(i=pFt(e)))return ESe(i,t,r)}oFt({target:"Reflect",stat:!0},{get:ESe})});var ISe=P(function(){"use strict";var fFt=ne(),mFt=rr(),hFt=Ht(),gFt=qo();fFt({target:"Reflect",stat:!0,sham:!mFt},{getOwnPropertyDescriptor:function getOwnPropertyDescriptor(t,r){return gFt.f(hFt(t),r)}})});var CSe=P(function(){"use strict";var xFt=ne(),vFt=Ht(),yFt=Os(),_Ft=eA();xFt({target:"Reflect",stat:!0,sham:!_Ft},{getPrototypeOf:function getPrototypeOf(t){return yFt(vFt(t))}})});var ASe=P(function(){"use strict";var bFt=ne();bFt({target:"Reflect",stat:!0},{has:function has(t,r){return r in t}})});var PSe=P(function(){"use strict";var wFt=ne(),SFt=Ht(),kFt=WA();wFt({target:"Reflect",stat:!0},{isExtensible:function isExtensible(t){return SFt(t),kFt(t)}})});var OSe=P(function(){"use strict";var EFt=ne(),TFt=OC();EFt({target:"Reflect",stat:!0},{ownKeys:TFt})});var RSe=P(function(){"use strict";var IFt=ne(),CFt=Zr(),AFt=Ht(),PFt=u0();IFt({target:"Reflect",stat:!0,sham:!PFt},{preventExtensions:function preventExtensions(t){AFt(t);try{var r=CFt("Object","preventExtensions");return r&&r(t),!0}catch(n){return!1}}})});var qSe=P(function(){"use strict";var OFt=ne(),RFt=Ft(),MFt=Ht(),MSe=pr(),$Ft=jV(),NFt=We(),UV=Ni(),$Se=qo(),DFt=Os(),NSe=Cl();function DSe(e,t,r){var n=arguments.length<4?e:arguments[3],i=$Se.f(MFt(e),t),a,o,s;if(!i){if(MSe(o=DFt(e)))return DSe(o,t,r,n);i=NSe(0)}if($Ft(i)){if(i.writable===!1||!MSe(n))return!1;if(a=$Se.f(n,t)){if(a.get||a.set||a.writable===!1)return!1;a.value=r,UV.f(n,t,a)}else UV.f(n,t,NSe(0,r))}else{if(s=i.set,s===void 0)return!1;RFt(s,n,r)}return!0}var qFt=NFt(function(){var e=function e(){},t=UV.f(new e,"a",{configurable:!0});return Reflect.set(e.prototype,"a",1,t)!==!1});OFt({target:"Reflect",stat:!0,forced:qFt},{set:DSe})});var FSe=P(function(){"use strict";var LFt=ne(),FFt=Ht(),zFt=Hj(),LSe=fc();LSe&&LFt({target:"Reflect",stat:!0},{setPrototypeOf:function setPrototypeOf(t,r){FFt(t),zFt(r);try{return LSe(t,r),!0}catch(n){return!1}}})});var zSe=P(function(){"use strict";var jFt=ne(),UFt=ut(),BFt=Js();jFt({global:!0},{Reflect:{}});BFt(UFt.Reflect,"Reflect",!0)});var HS=P(function(B0n,jSe){"use strict";var WFt=pr(),VFt=as(),GFt=_r(),HFt=GFt("match");jSe.exports=function(e){var t;return WFt(e)&&((t=e[HFt])!==void 0?!!t:VFt(e)==="RegExp")}});var BV=P(function(W0n,BSe){"use strict";var ZFt=ut(),KFt=We(),USe=ZFt.RegExp,QFt=!KFt(function(){var e=!0;try{USe(".","d")}catch(l){e=!1}var t={},r="",n=e?"dgimsy":"gimsy",i=function i(l,c){Object.defineProperty(t,l,{get:function get1(){return r+=c,!0}})},a={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};e&&(a.hasIndices="d");for(var o in a)i(o,a[o]);var s=Object.getOwnPropertyDescriptor(USe.prototype,"flags").get.call(t);return s!==n||r!==n});BSe.exports={correct:QFt}});var h9=P(function(V0n,WSe){"use strict";var JFt=Ht();WSe.exports=function(){var e=JFt(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t}});var p0=P(function(G0n,GSe){"use strict";var YFt=Ft(),XFt=Kr(),ezt=Ps(),VSe=BV(),tzt=h9(),rzt=RegExp.prototype;GSe.exports=VSe.correct?function(e){return e.flags}:function(e){return!VSe.correct&&ezt(rzt,e)&&!XFt(e,"flags")?YFt(tzt,e):e.flags}});var ZS=P(function(H0n,HSe){"use strict";var WV=We(),nzt=ut(),VV=nzt.RegExp,GV=WV(function(){var e=VV("a","y");return e.lastIndex=2,e.exec("abcd")!==null}),izt=GV||WV(function(){return!VV("a","y").sticky}),azt=GV||WV(function(){var e=VV("^r","gy");return e.lastIndex=2,e.exec("str")!==null});HSe.exports={BROKEN_CARET:azt,MISSED_STICKY:izt,UNSUPPORTED_Y:GV}});var g9=P(function(Z0n,ZSe){"use strict";var ozt=We(),szt=ut(),lzt=szt.RegExp;ZSe.exports=ozt(function(){var e=lzt(".","s");return!(e.dotAll&&e.test("\n")&&e.flags==="s")})});var HV=P(function(K0n,KSe){"use strict";var uzt=We(),czt=ut(),dzt=czt.RegExp;KSe.exports=uzt(function(){var e=dzt("(?b)","g");return e.exec("b").groups.a!=="b"||"b".replace(e,"$c")!=="bc"})});var a3e=P(function(){"use strict";var pzt=rr(),JV=ut(),KS=Ze(),fzt=jy(),mzt=Xh(),hzt=Lo(),gzt=Fo(),xzt=Zh().f,QSe=Ps(),vzt=HS(),JSe=Cr(),yzt=p0(),t3e=ZS(),_zt=Zj(),bzt=Xn(),wzt=We(),Szt=Kr(),kzt=Di().enforce,Ezt=V1(),Tzt=_r(),r3e=g9(),n3e=HV(),Izt=Tzt("match"),m0=JV.RegExp,y2=m0.prototype,Czt=JV.SyntaxError,Azt=KS(y2.exec),x9=KS("".charAt),YSe=KS("".replace),XSe=KS("".indexOf),e3e=KS("".slice),Pzt=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,ex=/a/g,ZV=/a/g,Ozt=new m0(ex)!==ex,i3e=t3e.MISSED_STICKY,Rzt=t3e.UNSUPPORTED_Y,Mzt=pzt&&(!Ozt||i3e||r3e||n3e||wzt(function(){return ZV[Izt]=!1,m0(ex)!==ex||m0(ZV)===ZV||String(m0(ex,"i"))!=="/a/i"})),$zt=function $zt(e){for(var t=e.length,r=0,n="",i=!1,a;r<=t;r++){if(a=x9(e,r),a==="\\"){n+=a+x9(e,++r);continue}!i&&a==="."?n+="[\\s\\S]":(a==="["?i=!0:a==="]"&&(i=!1),n+=a)}return n},Nzt=function Nzt(e){for(var t=e.length,r=0,n="",i=[],a=gzt(null),o=!1,s=!1,l=0,c="",d;r<=t;r++){if(d=x9(e,r),d==="\\")d+=x9(e,++r);else if(d==="]")o=!1;else if(!o)switch(!0){case d==="[":o=!0;break;case d==="(":if(n+=d,e3e(e,r+1,r+3)==="?:")continue;Azt(Pzt,e3e(e,r+1))&&(r+=2,s=!0),l++;continue;case d===">"&&s:if(c===""||Szt(a,c))throw new Czt("Invalid capture group name");a[c]=!0,i[i.length]=[c,l],s=!1,c="";continue}s?c+=d:n+=d}return[n,i]};if(fzt("RegExp",Mzt)){for(f0=function(t,r){var n=QSe(y2,this),i=vzt(t),a=r===void 0,o=[],s=t,l,c,d,u,p,m;if(!n&&i&&a&&t.constructor===f0)return t;if((i||QSe(y2,t))&&(t=t.source,a&&(r=yzt(s))),t=t===void 0?"":JSe(t),r=r===void 0?"":JSe(r),s=t,r3e&&"dotAll"in ex&&(c=!!r&&XSe(r,"s")>-1,c&&(r=YSe(r,/s/g,""))),l=r,i3e&&"sticky"in ex&&(d=!!r&&XSe(r,"y")>-1,d&&Rzt&&(r=YSe(r,/y/g,""))),n3e&&(u=Nzt(t),t=u[0],o=u[1]),p=mzt(m0(t,r),n?this:y2,f0),(c||d||o.length)&&(m=kzt(p),c&&(m.dotAll=!0,m.raw=f0($zt(t),l)),d&&(m.sticky=!0),o.length&&(m.groups=o)),t!==s)try{hzt(p,"source",s===""?"(?:)":s)}catch(h){}return p},KV=xzt(m0),QV=0;KV.length>QV;)_zt(f0,m0,KV[QV++]);y2.constructor=f0,f0.prototype=y2,bzt(JV,"RegExp",f0,{constructor:!0})}var f0,KV,QV;Ezt("RegExp")});var QS=P(function(Y0n,o3e){"use strict";var Dzt=TypeError;o3e.exports=function(e){if(typeof e=="string")return e;throw new Dzt("Argument is not a string")}});var p3e=P(function(){"use strict";var qzt=ne(),JS=Ze(),Lzt=QS(),Fzt=Kr(),s3e=_S().start,zzt=o2(),jzt=Array,l3e=RegExp.escape,u3e=JS("".charAt),eG=JS("".charCodeAt),Uzt=JS(1.1.toString),Bzt=JS([].join),d3e=/^[0-9a-z]/i,Wzt=/^[$()*+./?[\\\]^{|}]/,Vzt=RegExp("^[!\"#%&',\\-:;<=>@`~"+zzt+"]"),YV=JS(d3e.exec),c3e={" ":"t","\n":"n","\v":"v","\f":"f","\r":"r"},XV=function XV(e){var t=Uzt(eG(e,0),16);return t.length<3?"\\x"+s3e(t,2,"0"):"\\u"+s3e(t,4,"0")},Gzt=!l3e||l3e("ab")!=="\\x61b";qzt({target:"RegExp",stat:!0,forced:Gzt},{escape:function escape1(t){Lzt(t);for(var r=t.length,n=jzt(r),i=0;i=56320||i+1>=r||(eG(t,i+1)&64512)!==56320?n[i]=XV(a):(n[i]=a,n[++i]=u3e(t,i))}}return Bzt(n,"")}})});var m3e=P(function(){"use strict";var Hzt=rr(),Zzt=g9(),Kzt=as(),Qzt=ya(),Jzt=Di().get,f3e=RegExp.prototype,Yzt=TypeError;Hzt&&Zzt&&Qzt(f3e,"dotAll",{configurable:!0,get:function get1(){if(this!==f3e){if(Kzt(this)==="RegExp")return!!Jzt(this).dotAll;throw new Yzt("Incompatible receiver, RegExp required")}}})});var _9=P(function(ngn,g3e){"use strict";var _2=Ft(),y9=Ze(),Xzt=Cr(),ejt=h9(),tjt=ZS(),rjt=O1(),njt=Fo(),ijt=Di().get,ajt=g9(),ojt=HV(),sjt=rjt("native-string-replace",String.prototype.replace),v9=RegExp.prototype.exec,rG=v9,ljt=y9("".charAt),ujt=y9("".indexOf),cjt=y9("".replace),tG=y9("".slice),nG=function(){var e=/a/,t=/b*/g;return _2(v9,e,"a"),_2(v9,t,"a"),e.lastIndex!==0||t.lastIndex!==0}(),h3e=tjt.BROKEN_CARET,iG=/()??/.exec("")[1]!==void 0,djt=nG||iG||h3e||ajt||ojt;djt&&(rG=function(t){var r=this,n=ijt(r),i=Xzt(t),a=n.raw,o,s,l,c,d,u,p;if(a)return a.lastIndex=r.lastIndex,o=_2(rG,a,i),r.lastIndex=a.lastIndex,o;var m=n.groups,h=h3e&&r.sticky,g=_2(ejt,r),x=r.source,y=0,v=i;if(h&&(g=cjt(g,"y",""),ujt(g,"g")===-1&&(g+="g"),v=tG(i,r.lastIndex),r.lastIndex>0&&(!r.multiline||r.multiline&&ljt(i,r.lastIndex-1)!=="\n")&&(x="(?: "+x+")",v=" "+v,y++),s=new RegExp("^(?:"+x+")",g)),iG&&(s=new RegExp("^"+x+"$(?!\\s)",g)),nG&&(l=r.lastIndex),c=_2(v9,h?s:r,v),h?c?(c.input=tG(c.input,y),c[0]=tG(c[0],y),c.index=r.lastIndex,r.lastIndex+=c[0].length):r.lastIndex=0:nG&&c&&(r.lastIndex=r.global?c.index+c[0].length:l),iG&&c&&c.length>1&&_2(sjt,c[0],s,function(){for(d=1;d1;return t.has(1)&&t.clear(),{done:n,value:2}}}}},t=new Set([1,2,3,4]);return t.difference(e).size!==3});oUt({target:"Set",proto:!0,real:!0,forced:dUt},{difference:sUt})});var i5e=P(function(Agn,n5e){"use strict";var pUt=h0(),sG=hc(),fUt=b2(),mUt=x0(),hUt=tx(),gUt=g0(),xUt=sG.Set,r5e=sG.add,vUt=sG.has;n5e.exports=function(t){var r=pUt(this),n=mUt(t),i=new xUt;return fUt(r)>n.size?gUt(n.getIterator(),function(a){vUt(r,a)&&r5e(i,a)}):hUt(r,function(a){n.includes(a)&&r5e(i,a)}),i}});var a5e=P(function(){"use strict";var yUt=ne(),_Ut=We(),bUt=i5e(),wUt=v0(),SUt=!wUt("intersection",function(e){return e.size===2&&e.has(1)&&e.has(2)})||_Ut(function(){return String(Array.from(new Set([1,2,3]).intersection(new Set([3,2]))))!=="3,2"});yUt({target:"Set",proto:!0,real:!0,forced:SUt},{intersection:bUt})});var s5e=P(function(Rgn,o5e){"use strict";var kUt=h0(),EUt=hc().has,TUt=b2(),IUt=x0(),CUt=tx(),AUt=g0(),PUt=Uo();o5e.exports=function(t){var r=kUt(this),n=IUt(t);if(TUt(r)<=n.size)return CUt(r,function(a){if(n.includes(a))return!1},!0)!==!1;var i=n.getIterator();return AUt(i,function(a){if(EUt(r,a))return PUt(i,"normal",!1)})!==!1}});var l5e=P(function(){"use strict";var OUt=ne(),RUt=s5e(),MUt=v0(),$Ut=!MUt("isDisjointFrom",function(e){return!e});OUt({target:"Set",proto:!0,real:!0,forced:$Ut},{isDisjointFrom:RUt})});var c5e=P(function(Ngn,u5e){"use strict";var NUt=h0(),DUt=b2(),qUt=tx(),LUt=x0();u5e.exports=function(t){var r=NUt(this),n=LUt(t);return DUt(r)>n.size?!1:qUt(r,function(i){if(!n.includes(i))return!1},!0)!==!1}});var d5e=P(function(){"use strict";var FUt=ne(),zUt=c5e(),jUt=v0(),UUt=!jUt("isSubsetOf",function(e){return e});FUt({target:"Set",proto:!0,real:!0,forced:UUt},{isSubsetOf:zUt})});var f5e=P(function(Lgn,p5e){"use strict";var BUt=h0(),WUt=hc().has,VUt=b2(),GUt=x0(),HUt=g0(),ZUt=Uo();p5e.exports=function(t){var r=BUt(this),n=GUt(t);if(VUt(r)=0?i:n+i;return a<0||a>=n?void 0:IBt(r,a)}})});var YS=P(function(Qgn,E5e){"use strict";var cG=Ze(),ABt=la(),PBt=Cr(),OBt=Wi(),RBt=cG("".charAt),S5e=cG("".charCodeAt),MBt=cG("".slice),k5e=function k5e(e){return function(t,r){var n=PBt(OBt(t)),i=ABt(r),a=n.length,o,s;return i<0||i>=a?e?"":void 0:(o=S5e(n,i),o<55296||o>56319||i+1===a||(s=S5e(n,i+1))<56320||s>57343?e?RBt(n,i):o:e?MBt(n,i,i+2):(o-55296<<10)+(s-56320)+65536)}};E5e.exports={codeAt:k5e(!1),charAt:k5e(!0)}});var T5e=P(function(){"use strict";var $Bt=ne(),NBt=YS().codeAt;$Bt({target:"String",proto:!0},{codePointAt:function codePointAt(t){return NBt(this,t)}})});var k9=P(function(Xgn,I5e){"use strict";var DBt=HS(),qBt=TypeError;I5e.exports=function(e){if(DBt(e))throw new qBt("The method doesn't accept regular expressions");return e}});var E9=P(function(e1n,C5e){"use strict";var LBt=_r(),FBt=LBt("match");C5e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(r){try{return t[FBt]=!1,"/./"[e](t)}catch(n){}}return!1}});var O5e=P(function(){"use strict";var zBt=ne(),jBt=Kh(),UBt=qo().f,BBt=Al(),A5e=Cr(),WBt=k9(),VBt=Wi(),GBt=E9(),HBt=Un(),ZBt=jBt("".slice),KBt=Math.min,P5e=GBt("endsWith"),QBt=!HBt&&!P5e&&!!function(){var e=UBt(String.prototype,"endsWith");return e&&!e.writable}();zBt({target:"String",proto:!0,forced:!QBt&&!P5e},{endsWith:function endsWith(t){var r=A5e(VBt(this));WBt(t);var n=arguments.length>1?arguments[1]:void 0,i=r.length,a=n===void 0?i:KBt(BBt(n),i),o=A5e(t);return ZBt(r,a-o.length,a)===o}})});var dG=P(function(){"use strict";var JBt=ne(),YBt=Ze(),XBt=Op(),eWt=RangeError,R5e=String.fromCharCode,M5e=String.fromCodePoint,tWt=YBt([].join),rWt=!!M5e&&M5e.length!==1;JBt({target:"String",stat:!0,arity:1,forced:rWt},{fromCodePoint:function fromCodePoint(t){for(var r=[],n=arguments.length,i=0,a;n>i;){if(a=+arguments[i++],XBt(a,1114111)!==a)throw new eWt(a+" is not a valid code point");r[i]=a<65536?R5e(a):R5e(((a-=65536)>>10)+55296,a%1024+56320)}return tWt(r,"")}})});var N5e=P(function(){"use strict";var nWt=ne(),iWt=Ze(),aWt=k9(),oWt=Wi(),$5e=Cr(),sWt=E9(),lWt=iWt("".indexOf);nWt({target:"String",proto:!0,forced:!sWt("includes")},{includes:function includes(t){return!!~lWt($5e(oWt(this)),$5e(aWt(t)),arguments.length>1?arguments[1]:void 0)}})});var q5e=P(function(){"use strict";var uWt=ne(),cWt=Ze(),dWt=Wi(),pWt=Cr(),D5e=cWt("".charCodeAt);uWt({target:"String",proto:!0},{isWellFormed:function isWellFormed(){for(var t=pWt(dWt(this)),r=t.length,n=0;n=56320||++n>=r||(D5e(t,n)&64512)!==56320))return!1}return!0}})});var pG=P(function(){"use strict";var fWt=YS().charAt,mWt=Cr(),F5e=Di(),hWt=mA(),L5e=t0(),z5e="String Iterator",gWt=F5e.set,xWt=F5e.getterFor(z5e);hWt(String,"String",function(e){gWt(this,{type:z5e,string:mWt(e),index:0})},function(){var t=xWt(this),r=t.string,n=t.index,i;return n>=r.length?L5e(void 0,!0):(i=fWt(r,n),t.index+=i.length,L5e(i,!1))})});var XS=P(function(d1n,V5e){"use strict";b9();var j5e=Ft(),U5e=Xn(),vWt=_9(),B5e=We(),W5e=_r(),yWt=Lo(),_Wt=W5e("species"),fG=RegExp.prototype;V5e.exports=function(e,t,r,n){var i=W5e(e),a=!B5e(function(){var c={};return c[i]=function(){return 7},""[e](c)!==7}),o=a&&!B5e(function(){var c=!1,d=/a/;if(e==="split"){var u={};u[_Wt]=function(){return d},d={constructor:u,flags:""},d[i]=/./[i]}return d.exec=function(){return c=!0,null},d[i](""),!c});if(!a||!o||r){var s=/./[i],l=t(i,""[e],function(c,d,u,p,m){var h=d.exec;return h===vWt||h===fG.exec?a&&!m?{done:!0,value:j5e(s,d,u,p)}:{done:!0,value:j5e(c,u,d,p)}:{done:!1}});U5e(String.prototype,e,l[0]),U5e(fG,i,l[1])}n&&yWt(fG[i],"sham",!0)}});var e3=P(function(p1n,G5e){"use strict";var bWt=YS().charAt;G5e.exports=function(e,t,r){return t+(r?bWt(e,t).length:1)}});var w2=P(function(f1n,Z5e){"use strict";var H5e=Ft(),wWt=Ht(),SWt=fn(),kWt=as(),EWt=_9(),TWt=TypeError;Z5e.exports=function(e,t){var r=e.exec;if(SWt(r)){var n=H5e(r,e,t);return n!==null&&wWt(n),n}if(kWt(e)==="RegExp")return H5e(EWt,e,t);throw new TWt("RegExp#exec called on incompatible receiver")}});var J5e=P(function(){"use strict";var IWt=Ft(),CWt=Ze(),AWt=XS(),PWt=Ht(),OWt=pr(),RWt=Al(),T9=Cr(),MWt=Wi(),$Wt=Do(),NWt=e3(),DWt=p0(),K5e=w2(),Q5e=CWt("".indexOf);AWt("match",function(e,t,r){return[function(i){var a=MWt(this),o=OWt(i)?$Wt(i,e):void 0;return o?IWt(o,i,a):new RegExp(i)[e](T9(a))},function(n){var i=PWt(this),a=T9(n),o=r(t,i,a);if(o.done)return o.value;var s=T9(DWt(i));if(Q5e(s,"g")===-1)return K5e(i,a);var l=Q5e(s,"u")!==-1;i.lastIndex=0;for(var c=[],d=0,u;(u=K5e(i,a))!==null;){var p=T9(u[0]);c[d]=p,p===""&&(i.lastIndex=NWt(a,RWt(i.lastIndex),l)),d++}return d===0?null:c}]})});var ske=P(function(){"use strict";var qWt=ne(),Y5e=Ft(),tke=Kh(),LWt=dA(),I9=t0(),X5e=Wi(),rke=Al(),t3=Cr(),FWt=Ht(),zWt=pr(),jWt=as(),UWt=HS(),nke=p0(),BWt=Do(),WWt=Xn(),VWt=We(),GWt=_r(),HWt=qS(),ZWt=e3(),KWt=w2(),ike=Di(),hG=Un(),C9=GWt("matchAll"),ake="RegExp String",oke=ake+" Iterator",QWt=ike.set,JWt=ike.getterFor(oke),eke=RegExp.prototype,YWt=TypeError,gG=tke("".indexOf),A9=tke("".matchAll),mG=!!A9&&!VWt(function(){A9("a",/./)}),XWt=LWt(function(t,r,n,i){QWt(this,{type:oke,regexp:t,string:r,global:n,unicode:i,done:!1})},ake,function(){var t=JWt(this);if(t.done)return I9(void 0,!0);var r=t.regexp,n=t.string,i=KWt(r,n);return i===null?(t.done=!0,I9(void 0,!0)):t.global?(t3(i[0])===""&&(r.lastIndex=ZWt(n,rke(r.lastIndex),t.unicode)),I9(i,!1)):(t.done=!0,I9(i,!1))}),xG=function xG(e){var t=FWt(this),r=t3(e),n=HWt(t,RegExp),i=t3(nke(t)),a,o,s;return a=new n(n===RegExp?t.source:t,i),o=!!~gG(i,"g"),s=!!~gG(i,"u"),a.lastIndex=rke(t.lastIndex),new XWt(a,r,o,s)};qWt({target:"String",proto:!0,forced:mG},{matchAll:function matchAll(t){var r=X5e(this),n,i,a,o;if(zWt(t)){if(UWt(t)&&(n=t3(X5e(nke(t))),!~gG(n,"g")))throw new YWt("`.matchAll` does not allow non-global regexes");if(mG)return A9(r,t);if(a=BWt(t,C9),a===void 0&&hG&&jWt(t)==="RegExp"&&(a=xG),a)return Y5e(a,t,r)}else if(mG)return A9(r,t);return i=t3(r),o=new RegExp(t,"g"),hG?Y5e(xG,o,i):o[C9](i)}});hG||C9 in eke||WWt(eke,C9,xG)});var vG=P(function(v1n,lke){"use strict";var eVt=_d();lke.exports=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(eVt)});var uke=P(function(){"use strict";var tVt=ne(),rVt=_S().end,nVt=vG();tVt({target:"String",proto:!0,forced:nVt},{padEnd:function padEnd(t){return rVt(this,t,arguments.length>1?arguments[1]:void 0)}})});var cke=P(function(){"use strict";var iVt=ne(),aVt=_S().start,oVt=vG();iVt({target:"String",proto:!0,forced:oVt},{padStart:function padStart(t){return aVt(this,t,arguments.length>1?arguments[1]:void 0)}})});var mke=P(function(){"use strict";var sVt=ne(),fke=Ze(),lVt=go(),uVt=qn(),dke=Cr(),cVt=ei(),pke=fke([].push),dVt=fke([].join);sVt({target:"String",stat:!0},{raw:function raw(t){var r=lVt(uVt(t).raw),n=cVt(r);if(!n)return"";for(var i=arguments.length,a=[],o=0;;){if(pke(a,dke(r[o++])),o===n)return dVt(a,"");o]*>)/g,vVt=/\$([$&'`]|\d{1,2})/g;gke.exports=function(e,t,r,n,i,a){var o=r+e.length,s=n.length,l=vVt;return i!==void 0&&(i=mVt(i),l=xVt),gVt(a,l,function(c,d){var u;switch(yG(d,0)){case"$":return"$";case"&":return e;case"`":return _G(t,0,r);case"'":return _G(t,o);case"<":u=i[_G(d,1,-1)];break;default:var p=+d;if(p===0)return c;if(p>s){var m=hVt(p/10);return m===0?c:m<=s?n[m-1]===void 0?yG(d,1):n[m-1]+yG(d,1):c}u=n[p-1]}return u===void 0?"":u})}});var _ke=P(function(){"use strict";var yVt=Ml(),xke=Ft(),O9=Ze(),_Vt=XS(),bVt=We(),wVt=Ht(),SVt=fn(),kVt=pr(),EVt=la(),TVt=Al(),rx=Cr(),IVt=Wi(),CVt=e3(),AVt=Do(),PVt=wG(),OVt=p0(),RVt=w2(),MVt=_r(),kG=MVt("replace"),$Vt=Math.max,NVt=Math.min,DVt=O9([].concat),SG=O9([].push),P9=O9("".indexOf),vke=O9("".slice),qVt=function qVt(e){return e===void 0?e:String(e)},LVt=function(){return"a".replace(/./,"$0")==="$0"}(),yke=function(){return/./[kG]?/./[kG]("a","$0")==="":!1}(),FVt=!bVt(function(){var e=/./;return e.exec=function(){var t=[];return t.groups={a:"7"},t},"".replace(e,"$")!=="7"});_Vt("replace",function(e,t,r){var n=yke?"$":"$0";return[function(a,o){var s=IVt(this),l=kVt(a)?AVt(a,kG):void 0;return l?xke(l,a,s,o):xke(t,rx(s),a,o)},function(i,a){var o=wVt(this),s=rx(i);if(typeof a=="string"&&P9(a,n)===-1&&P9(a,"$<")===-1){var l=r(t,o,s,a);if(l.done)return l.value}var c=SVt(a);c||(a=rx(a));var d=rx(OVt(o)),u=P9(d,"g")!==-1,p;u&&(p=P9(d,"u")!==-1,o.lastIndex=0);for(var m=[],h;h=RVt(o,s),!(h===null||(SG(m,h),!u));){var g=rx(h[0]);g===""&&(o.lastIndex=CVt(s,TVt(o.lastIndex),p))}for(var x="",y=0,v=0;v=y&&(x+=vke(s,y,b)+w,y=b+_.length)}return x+vke(s,y)}]},!FVt||!LVt||yke)});var Ske=P(function(){"use strict";var zVt=ne(),jVt=Ft(),TG=Ze(),bke=Wi(),UVt=fn(),BVt=pr(),WVt=HS(),S2=Cr(),VVt=Do(),GVt=p0(),HVt=wG(),ZVt=_r(),KVt=Un(),QVt=ZVt("replace"),JVt=TypeError,EG=TG("".indexOf),YVt=TG("".replace),wke=TG("".slice),XVt=Math.max;zVt({target:"String",proto:!0},{replaceAll:function replaceAll(t,r){var n=bke(this),i,a,o,s,l,c,d,u,p,m,h=0,g="";if(BVt(t)){if(i=WVt(t),i&&(a=S2(bke(GVt(t))),!~EG(a,"g")))throw new JVt("`.replaceAll` does not allow non-global regexes");if(o=VVt(t,QVt),o)return jVt(o,t,n,r);if(KVt&&i)return YVt(S2(n),t,r)}for(s=S2(n),l=S2(t),c=UVt(r),c||(r=S2(r)),d=l.length,u=XVt(1,d),p=EG(s,l);p!==-1;)m=c?S2(r(l,p,s)):HVt(l,s,p,[],void 0,r),g+=wke(s,h,p)+m,h=p+d,p=p+u>s.length?-1:EG(s,l,p+u);return h1||"".split(/.?/).length;sGt("split",function(e,t,r){var n="0".split(void 0,0).length?function n(i,a){return i===void 0&&a===0?[]:IG(t,this,i,a)}:t;return[function(a,o){var s=cGt(this),l=uGt(a)?mGt(a,e):void 0;return l?IG(l,a,s,o):IG(n,Ike(s),a,o)},function(i,a){var o=lGt(this),s=Ike(i);if(!Ake){var l=r(n,o,s,a,n!==t);if(l.done)return l.value}var c=dGt(o,RegExp),d=o.unicode,u=(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.unicode?"u":"")+(k2?"g":"y"),p=new c(k2?"^(?:"+o.source+")":o,u),m=a===void 0?xGt:a>>>0;if(m===0)return[];if(s.length===0)return Cke(p,s)===null?[s]:[];for(var h=0,g=0,x=[];g1?arguments[1]:void 0,r.length)),i=Rke(t);return CGt(r,n,n+i.length)===i}})});var Dke=P(function(){"use strict";var OGt=ne(),RGt=Ze(),MGt=Wi(),Nke=la(),$Gt=Cr(),NGt=RGt("".slice),DGt=Math.max,qGt=Math.min,LGt=!"".substr||"ab".substr(-1)!=="b";OGt({target:"String",proto:!0,forced:LGt},{substr:function substr(t,r){var n=$Gt(MGt(this)),i=n.length,a=Nke(t),o,s;return a===1/0&&(a=0),a<0&&(a=DGt(i+a,0)),o=r===void 0?i:Nke(r),o<=0||o===1/0?"":(s=qGt(a+o,i),a>=s?"":NGt(n,a,s))}})});var zke=P(function(){"use strict";var FGt=ne(),Fke=Ft(),RG=Ze(),zGt=Wi(),jGt=Cr(),UGt=We(),BGt=Array,PG=RG("".charAt),qke=RG("".charCodeAt),WGt=RG([].join),OG="".toWellFormed,VGt="�",Lke=OG&&UGt(function(){return Fke(OG,1)!=="1"});FGt({target:"String",proto:!0,forced:Lke},{toWellFormed:function toWellFormed(){var t=jGt(zGt(this));if(Lke)return Fke(OG,t);for(var r=t.length,n=BGt(r),i=0;i=56320||i+1>=r||(qke(t,i+1)&64512)!==56320?n[i]=VGt:(n[i]=PG(t,i),n[++i]=PG(t,i))}return WGt(n,"")}})});var R9=P(function(U1n,Bke){"use strict";var GGt=R1().PROPER,HGt=We(),jke=o2(),Uke="​\x85᠎";Bke.exports=function(e){return HGt(function(){return!!jke[e]()||Uke[e]()!==Uke||GGt&&jke[e].name!==e})}});var Wke=P(function(){"use strict";var ZGt=ne(),KGt=K1().trim,QGt=R9();ZGt({target:"String",proto:!0,forced:QGt("trim")},{trim:function trim(){return KGt(this)}})});var MG=P(function(V1n,Vke){"use strict";var JGt=K1().end,YGt=R9();Vke.exports=YGt("trimEnd")?function(){return JGt(this)}:"".trimEnd});var Hke=P(function(){"use strict";var XGt=ne(),Gke=MG();XGt({target:"String",proto:!0,name:"trimEnd",forced:"".trimRight!==Gke},{trimRight:Gke})});var Kke=P(function(){"use strict";Hke();var eHt=ne(),Zke=MG();eHt({target:"String",proto:!0,name:"trimEnd",forced:"".trimEnd!==Zke},{trimEnd:Zke})});var $G=P(function(Q1n,Qke){"use strict";var tHt=K1().start,rHt=R9();Qke.exports=rHt("trimStart")?function(){return tHt(this)}:"".trimStart});var Yke=P(function(){"use strict";var nHt=ne(),Jke=$G();nHt({target:"String",proto:!0,name:"trimStart",forced:"".trimLeft!==Jke},{trimLeft:Jke})});var eEe=P(function(){"use strict";Yke();var iHt=ne(),Xke=$G();iHt({target:"String",proto:!0,name:"trimStart",forced:"".trimStart!==Xke},{trimStart:Xke})});var Dl=P(function(txn,rEe){"use strict";var aHt=Ze(),oHt=Wi(),tEe=Cr(),sHt=/"/g,lHt=aHt("".replace);rEe.exports=function(e,t,r,n){var i=tEe(oHt(e)),a="<"+t;return r!==""&&(a+=" "+r+'="'+lHt(tEe(n),sHt,""")+'"'),a+">"+i+""}});var ql=P(function(rxn,nEe){"use strict";var uHt=We();nEe.exports=function(e){return uHt(function(){var t=""[e]('"');return t!==t.toLowerCase()||t.split('"').length>3})}});var iEe=P(function(){"use strict";var cHt=ne(),dHt=Dl(),pHt=ql();cHt({target:"String",proto:!0,forced:pHt("anchor")},{anchor:function anchor(t){return dHt(this,"a","name",t)}})});var aEe=P(function(){"use strict";var fHt=ne(),mHt=Dl(),hHt=ql();fHt({target:"String",proto:!0,forced:hHt("big")},{big:function big(){return mHt(this,"big","","")}})});var oEe=P(function(){"use strict";var gHt=ne(),xHt=Dl(),vHt=ql();gHt({target:"String",proto:!0,forced:vHt("blink")},{blink:function blink(){return xHt(this,"blink","","")}})});var sEe=P(function(){"use strict";var yHt=ne(),_Ht=Dl(),bHt=ql();yHt({target:"String",proto:!0,forced:bHt("bold")},{bold:function bold(){return _Ht(this,"b","","")}})});var lEe=P(function(){"use strict";var wHt=ne(),SHt=Dl(),kHt=ql();wHt({target:"String",proto:!0,forced:kHt("fixed")},{fixed:function fixed(){return SHt(this,"tt","","")}})});var uEe=P(function(){"use strict";var EHt=ne(),THt=Dl(),IHt=ql();EHt({target:"String",proto:!0,forced:IHt("fontcolor")},{fontcolor:function fontcolor(t){return THt(this,"font","color",t)}})});var cEe=P(function(){"use strict";var CHt=ne(),AHt=Dl(),PHt=ql();CHt({target:"String",proto:!0,forced:PHt("fontsize")},{fontsize:function fontsize(t){return AHt(this,"font","size",t)}})});var dEe=P(function(){"use strict";var OHt=ne(),RHt=Dl(),MHt=ql();OHt({target:"String",proto:!0,forced:MHt("italics")},{italics:function italics(){return RHt(this,"i","","")}})});var pEe=P(function(){"use strict";var $Ht=ne(),NHt=Dl(),DHt=ql();$Ht({target:"String",proto:!0,forced:DHt("link")},{link:function link(t){return NHt(this,"a","href",t)}})});var fEe=P(function(){"use strict";var qHt=ne(),LHt=Dl(),FHt=ql();qHt({target:"String",proto:!0,forced:FHt("small")},{small:function small(){return LHt(this,"small","","")}})});var mEe=P(function(){"use strict";var zHt=ne(),jHt=Dl(),UHt=ql();zHt({target:"String",proto:!0,forced:UHt("strike")},{strike:function strike(){return jHt(this,"strike","","")}})});var hEe=P(function(){"use strict";var BHt=ne(),WHt=Dl(),VHt=ql();BHt({target:"String",proto:!0,forced:VHt("sub")},{sub:function sub(){return WHt(this,"sub","","")}})});var gEe=P(function(){"use strict";var GHt=ne(),HHt=Dl(),ZHt=ql();GHt({target:"String",proto:!0,forced:ZHt("sup")},{sup:function sup(){return HHt(this,"sup","","")}})});var M9=P(function(Axn,vEe){"use strict";var xEe=ut(),NG=We(),KHt=sS(),QHt=mn().NATIVE_ARRAY_BUFFER_VIEWS,JHt=xEe.ArrayBuffer,nx=xEe.Int8Array;vEe.exports=!QHt||!NG(function(){nx(1)})||!NG(function(){new nx(-1)})||!KHt(function(e){new nx,new nx(null),new nx(1.5),new nx(e)},!0)||NG(function(){return new nx(new JHt(2),1,void 0).length!==1})});var DG=P(function(Pxn,yEe){"use strict";var YHt=zA(),XHt=RangeError;yEe.exports=function(e,t){var r=YHt(e);if(r%t)throw new XHt("Wrong offset");return r}});var bEe=P(function(Oxn,_Ee){"use strict";var eZt=Math.round;_Ee.exports=function(e){var t=eZt(e);return t<0?0:t>255?255:t&255}});var qG=P(function(Rxn,wEe){"use strict";var tZt=Pl();wEe.exports=function(e){var t=tZt(e);return t==="BigInt64Array"||t==="BigUint64Array"}});var $9=P(function(Mxn,SEe){"use strict";var rZt=U6(),nZt=TypeError;SEe.exports=function(e){var t=rZt(e,"number");if(typeof t=="number")throw new nZt("Can't convert number to bigint");return BigInt(t)}});var LG=P(function($xn,kEe){"use strict";var iZt=Ol(),aZt=Ft(),oZt=e9(),sZt=qn(),lZt=ei(),uZt=j1(),cZt=im(),dZt=tA(),pZt=qG(),fZt=mn().aTypedArrayConstructor,mZt=$9();kEe.exports=function(t){var r=oZt(this),n=sZt(t),i=arguments.length,a=i>1?arguments[1]:void 0,o=a!==void 0,s=cZt(n),l,c,d,u,p,m,h,g;if(s&&!dZt(s))for(h=uZt(n,s),g=h.next,n=[];!(m=aZt(g,h)).done;)n.push(m.value);for(o&&i>2&&(a=iZt(a,arguments[2])),c=lZt(n),d=new(fZt(r))(c),u=pZt(d),l=0;c>l;l++)p=o?a(n[l],l):n[l],d[l]=u?mZt(p):+p;return d}});var Up=P(function(Nxn,VG){"use strict";var EEe=ne(),DEe=ut(),TEe=Ft(),hZt=rr(),gZt=M9(),a3=mn(),qEe=vS(),IEe=$l(),xZt=Cl(),r3=Lo(),vZt=JA(),yZt=Al(),CEe=hS(),FG=DG(),_Zt=bEe(),LEe=tm(),n3=Kr(),bZt=Pl(),UG=pr(),wZt=Vh(),SZt=Fo(),kZt=Ps(),N9=fc(),EZt=Zh().f,AEe=LG(),TZt=zo().forEach,IZt=V1(),CZt=ya(),FEe=Ni(),zEe=qo(),PEe=Jy(),GG=Di(),AZt=Xh(),BG=GG.get,PZt=GG.set,OZt=GG.enforce,jEe=FEe.f,RZt=zEe.f,zG=DEe.RangeError,UEe=qEe.ArrayBuffer,MZt=UEe.prototype,$Zt=qEe.DataView,D9=a3.NATIVE_ARRAY_BUFFER_VIEWS,OEe=a3.TYPED_ARRAY_TAG,REe=a3.TypedArray,i3=a3.TypedArrayPrototype,WG=a3.isTypedArray,q9="BYTES_PER_ELEMENT",jG="Wrong length",L9=function L9(e,t){CZt(e,t,{configurable:!0,get:function get1(){return BG(this)[t]}})},MEe=function MEe(e){var t;return kZt(MZt,e)||(t=bZt(e))==="ArrayBuffer"||t==="SharedArrayBuffer"},BEe=function BEe(e,t){return WG(e)&&!wZt(t)&&t in e&&vZt(+t)&&t>=0},$Ee=function $Ee(t,r){return r=LEe(r),BEe(t,r)?xZt(2,t[r]):RZt(t,r)},NEe=function NEe(t,r,n){return r=LEe(r),BEe(t,r)&&UG(n)&&n3(n,"value")&&!n3(n,"get")&&!n3(n,"set")&&!n.configurable&&(!n3(n,"writable")||n.writable)&&(!n3(n,"enumerable")||n.enumerable)?(t[r]=n.value,t):jEe(t,r,n)};hZt?(D9||(zEe.f=$Ee,FEe.f=NEe,L9(i3,"buffer"),L9(i3,"byteOffset"),L9(i3,"byteLength"),L9(i3,"length")),EEe({target:"Object",stat:!0,forced:!D9},{getOwnPropertyDescriptor:$Ee,defineProperty:NEe}),VG.exports=function(e,t,r){var n=e.match(/\d+/)[0]/8,i=e+(r?"Clamped":"")+"Array",a="get"+e,o="set"+e,s=DEe[i],l=s,c=l&&l.prototype,d={},u=function u(g,x){var y=BG(g);return y.view[a](x*n+y.byteOffset,!0)},p=function p(g,x,y){var v=BG(g);v.view[o](x*n+v.byteOffset,r?_Zt(y):y,!0)},m=function m(g,x){jEe(g,x,{get:function get1(){return u(this,x)},set:function set1(y){return p(this,x,y)},enumerable:!0})};D9?gZt&&(l=t(function(g,x,y,v){return IEe(g,c),AZt(function(){return UG(x)?MEe(x)?v!==void 0?new s(x,FG(y,n),v):y!==void 0?new s(x,FG(y,n)):new s(x):WG(x)?PEe(l,x):TEe(AEe,l,x):new s(CEe(x))}(),g,l)}),N9&&N9(l,REe),TZt(EZt(s),function(g){g in l||r3(l,g,s[g])}),l.prototype=c):(l=t(function(g,x,y,v){IEe(g,c);var _=0,b=0,k,w,S;if(!UG(x))S=CEe(x),w=S*n,k=new UEe(w);else if(MEe(x)){k=x,b=FG(y,n);var E=x.byteLength;if(v===void 0){if(E%n)throw new zG(jG);if(w=E-b,w<0)throw new zG(jG)}else if(w=yZt(v)*n,w+b>E)throw new zG(jG);S=w/n}else return WG(x)?PEe(l,x):TEe(AEe,l,x);for(PZt(g,{buffer:k,byteOffset:b,byteLength:w,length:S,view:new $Zt(k)});_=0?i:n+i;return a<0||a>=n?void 0:r[a]})});var rTe=P(function(){"use strict";var ZZt=Ze(),tTe=mn(),KZt=pU(),QZt=ZZt(KZt),JZt=tTe.aTypedArray,YZt=tTe.exportTypedArrayMethod;YZt("copyWithin",function(t,r){return QZt(JZt(this),t,r,arguments.length>2?arguments[2]:void 0)})});var iTe=P(function(){"use strict";var nTe=mn(),XZt=zo().every,eKt=nTe.aTypedArray,tKt=nTe.exportTypedArrayMethod;tKt("every",function(t){return XZt(eKt(this),t,arguments.length>1?arguments[1]:void 0)})});var oTe=P(function(){"use strict";var aTe=mn(),rKt=uA(),nKt=$9(),iKt=Pl(),aKt=Ft(),oKt=Ze(),sKt=We(),lKt=aTe.aTypedArray,uKt=aTe.exportTypedArrayMethod,cKt=oKt("".slice),dKt=sKt(function(){var e=0;return new Int8Array(2).fill({valueOf:function valueOf(){return e++}}),e!==1});uKt("fill",function(t){var r=arguments.length;lKt(this);var n=cKt(iKt(this),0,3)==="Big"?nKt(t):+t;return aKt(rKt,this,n,r>1?arguments[1]:void 0,r>2?arguments[2]:void 0)},dKt)});var lTe=P(function(lvn,sTe){"use strict";var pKt=Jy(),fKt=mn().getTypedArrayConstructor;sTe.exports=function(e,t){return pKt(fKt(e),t)}});var cTe=P(function(){"use strict";var uTe=mn(),mKt=zo().filter,hKt=lTe(),gKt=uTe.aTypedArray,xKt=uTe.exportTypedArrayMethod;xKt("filter",function(t){var r=mKt(gKt(this),t,arguments.length>1?arguments[1]:void 0);return hKt(this,r)})});var pTe=P(function(){"use strict";var dTe=mn(),vKt=zo().find,yKt=dTe.aTypedArray,_Kt=dTe.exportTypedArrayMethod;_Kt("find",function(t){return vKt(yKt(this),t,arguments.length>1?arguments[1]:void 0)})});var mTe=P(function(){"use strict";var fTe=mn(),bKt=zo().findIndex,wKt=fTe.aTypedArray,SKt=fTe.exportTypedArrayMethod;SKt("findIndex",function(t){return bKt(wKt(this),t,arguments.length>1?arguments[1]:void 0)})});var gTe=P(function(){"use strict";var hTe=mn(),kKt=oS().findLast,EKt=hTe.aTypedArray,TKt=hTe.exportTypedArrayMethod;TKt("findLast",function(t){return kKt(EKt(this),t,arguments.length>1?arguments[1]:void 0)})});var vTe=P(function(){"use strict";var xTe=mn(),IKt=oS().findLastIndex,CKt=xTe.aTypedArray,AKt=xTe.exportTypedArrayMethod;AKt("findLastIndex",function(t){return IKt(CKt(this),t,arguments.length>1?arguments[1]:void 0)})});var _Te=P(function(){"use strict";var yTe=mn(),PKt=zo().forEach,OKt=yTe.aTypedArray,RKt=yTe.exportTypedArrayMethod;RKt("forEach",function(t){PKt(OKt(this),t,arguments.length>1?arguments[1]:void 0)})});var bTe=P(function(){"use strict";var MKt=M9(),$Kt=mn().exportTypedArrayStaticMethod,NKt=LG();$Kt("from",NKt,MKt)});var STe=P(function(){"use strict";var wTe=mn(),DKt=zy().includes,qKt=wTe.aTypedArray,LKt=wTe.exportTypedArrayMethod;LKt("includes",function(t){return DKt(qKt(this),t,arguments.length>1?arguments[1]:void 0)})});var ETe=P(function(){"use strict";var kTe=mn(),FKt=zy().indexOf,zKt=kTe.aTypedArray,jKt=kTe.exportTypedArrayMethod;jKt("indexOf",function(t){return FKt(zKt(this),t,arguments.length>1?arguments[1]:void 0)})});var PTe=P(function(){"use strict";var UKt=ut(),BKt=We(),HG=Ze(),ITe=mn(),ZG=cS(),WKt=_r(),KG=WKt("iterator"),TTe=UKt.Uint8Array,VKt=HG(ZG.values),GKt=HG(ZG.keys),HKt=HG(ZG.entries),QG=ITe.aTypedArray,F9=ITe.exportTypedArrayMethod,E2=TTe&&TTe.prototype,z9=!BKt(function(){E2[KG].call([1])}),CTe=!!E2&&E2.values&&E2[KG]===E2.values&&E2.values.name==="values",ATe=function ATe(){return VKt(QG(this))};F9("entries",function(){return HKt(QG(this))},z9);F9("keys",function(){return GKt(QG(this))},z9);F9("values",ATe,z9||!CTe,{name:"values"});F9(KG,ATe,z9||!CTe,{name:"values"})});var RTe=P(function(){"use strict";var OTe=mn(),ZKt=Ze(),KKt=OTe.aTypedArray,QKt=OTe.exportTypedArrayMethod,JKt=ZKt([].join);QKt("join",function(t){return JKt(KKt(this),t)})});var $Te=P(function(){"use strict";var MTe=mn(),YKt=Ml(),XKt=TU(),eQt=MTe.aTypedArray,tQt=MTe.exportTypedArrayMethod;tQt("lastIndexOf",function(t){var r=arguments.length;return YKt(XKt,eQt(this),r>1?[t,arguments[1]]:[t])})});var NTe=P(function(){"use strict";var JG=mn(),rQt=zo().map,nQt=JG.aTypedArray,iQt=JG.getTypedArrayConstructor,aQt=JG.exportTypedArrayMethod;aQt("map",function(t){return rQt(nQt(this),t,arguments.length>1?arguments[1]:void 0,function(r,n){return new(iQt(r))(n)})})});var qTe=P(function(){"use strict";var DTe=mn(),oQt=M9(),sQt=DTe.aTypedArrayConstructor,lQt=DTe.exportTypedArrayStaticMethod;lQt("of",function(){for(var t=0,r=arguments.length,n=new(sQt(this))(r);r>t;)n[t]=arguments[t++];return n},oQt)});var FTe=P(function(){"use strict";var LTe=mn(),uQt=dS().left,cQt=LTe.aTypedArray,dQt=LTe.exportTypedArrayMethod;dQt("reduce",function(t){var r=arguments.length;return uQt(cQt(this),t,r,r>1?arguments[1]:void 0)})});var jTe=P(function(){"use strict";var zTe=mn(),pQt=dS().right,fQt=zTe.aTypedArray,mQt=zTe.exportTypedArrayMethod;mQt("reduceRight",function(t){var r=arguments.length;return pQt(fQt(this),t,r,r>1?arguments[1]:void 0)})});var BTe=P(function(){"use strict";var UTe=mn(),hQt=UTe.aTypedArray,gQt=UTe.exportTypedArrayMethod,xQt=Math.floor;gQt("reverse",function(){for(var t=this,r=hQt(t).length,n=xQt(r/2),i=0,a;i1?arguments[1]:void 0,1),n=_Qt(t);if(XG)return GTe(ZTe,this,n,r);var i=this.length,a=vQt(n),o=0;if(a+r>i)throw new bQt("Wrong length");for(;oa;)s[a]=n[a++];return s},PQt)});var YTe=P(function(){"use strict";var JTe=mn(),OQt=zo().some,RQt=JTe.aTypedArray,MQt=JTe.exportTypedArrayMethod;MQt("some",function(t){return OQt(RQt(this),t,arguments.length>1?arguments[1]:void 0)})});var iIe=P(function(){"use strict";var $Qt=ut(),NQt=Kh(),rH=We(),DQt=tn(),qQt=vA(),nIe=mn(),XTe=AU(),LQt=PU(),eIe=wd(),tIe=yA(),FQt=nIe.aTypedArray,zQt=nIe.exportTypedArrayMethod,o3=$Qt.Uint16Array,T2=o3&&NQt(o3.prototype.sort),jQt=!!T2&&!(rH(function(){T2(new o3(2),null)})&&rH(function(){T2(new o3(2),{})})),rIe=!!T2&&!rH(function(){if(eIe)return eIe<74;if(XTe)return XTe<67;if(LQt)return!0;if(tIe)return tIe<602;var e=new o3(516),t=Array(516),r,n;for(r=0;r<516;r++)n=r%4,e[r]=515-r,t[r]=r-2*n+3;for(T2(e,function(i,a){return(i/4|0)-(a/4|0)}),r=0;r<516;r++)if(e[r]!==t[r])return!0}),UQt=function UQt(e){return function(t,r){return e!==void 0?+e(t,r)||0:r!==r?-1:t!==t?1:t===0&&r===0?1/t>0&&1/r<0?1:-1:t>r}};zQt("sort",function(t){return t!==void 0&&DQt(t),rIe?T2(this,t):qQt(FQt(this),UQt(t))},!rIe||jQt)});var oIe=P(function(){"use strict";var nH=mn(),BQt=Al(),aIe=Op(),WQt=nH.aTypedArray,VQt=nH.getTypedArrayConstructor,GQt=nH.exportTypedArrayMethod;GQt("subarray",function(t,r){var n=WQt(this),i=n.length,a=aIe(t,i),o=VQt(n);return new o(n.buffer,n.byteOffset+a*n.BYTES_PER_ELEMENT,BQt((r===void 0?i:aIe(r,i))-a))})});var dIe=P(function(){"use strict";var HQt=ut(),ZQt=Ml(),uIe=mn(),iH=We(),sIe=Eu(),j9=HQt.Int8Array,lIe=uIe.aTypedArray,KQt=uIe.exportTypedArrayMethod,cIe=[].toLocaleString,QQt=!!j9&&iH(function(){cIe.call(new j9(1))}),JQt=iH(function(){return[1,2].toLocaleString()!==new j9([1,2]).toLocaleString()})||!iH(function(){j9.prototype.toLocaleString.call([1,2])});KQt("toLocaleString",function(){return ZQt(cIe,QQt?sIe(lIe(this)):lIe(this),sIe(arguments))},JQt)});var pIe=P(function(){"use strict";var YQt=MU(),aH=mn(),XQt=aH.aTypedArray,eJt=aH.exportTypedArrayMethod,tJt=aH.getTypedArrayConstructor;eJt("toReversed",function(){return YQt(XQt(this),tJt(this))})});var fIe=P(function(){"use strict";var U9=mn(),rJt=Ze(),nJt=tn(),iJt=Jy(),aJt=U9.aTypedArray,oJt=U9.getTypedArrayConstructor,sJt=U9.exportTypedArrayMethod,lJt=rJt(U9.TypedArrayPrototype.sort);sJt("toSorted",function(t){t!==void 0&&nJt(t);var r=aJt(this),n=iJt(oJt(r),r);return lJt(n,t)})});var hIe=P(function(){"use strict";var uJt=mn().exportTypedArrayMethod,cJt=We(),dJt=ut(),pJt=Ze(),mIe=dJt.Uint8Array,fJt=mIe&&mIe.prototype||{},B9=[].toString,mJt=pJt([].join);cJt(function(){B9.call({})})&&(B9=function B9(){return mJt(this)});var hJt=fJt.toString!==B9;uJt("toString",B9,hJt)});var xIe=P(function(){"use strict";var gJt=NU(),oH=mn(),xJt=qG(),vJt=la(),yJt=$9(),_Jt=oH.aTypedArray,bJt=oH.getTypedArrayConstructor,wJt=oH.exportTypedArrayMethod,gIe=function(){try{new Int8Array(1).with(2,{valueOf:function valueOf(){throw 8}})}catch(e){return e===8}}(),SJt=gIe&&function(){try{new Int8Array(1).with(-.5,1)}catch(e){return!0}}();wJt("with",function(e,t){var r=_Jt(this),n=vJt(e),i=xJt(r)?yJt(t):+t;return gJt(r,bJt(r),n,i)},!gIe||SJt)});var sH=P(function(uyn,vIe){"use strict";var kJt=pr(),EJt=String,TJt=TypeError;vIe.exports=function(e){if(e===void 0||kJt(e))return e;throw new TJt(EJt(e)+" is not an object or undefined")}});var s3=P(function(cyn,SIe){"use strict";var wIe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",yIe=wIe+"+/",_Ie=wIe+"-_",bIe=function bIe(e){for(var t={},r=0;r<64;r++)t[e.charAt(r)]=r;return t};SIe.exports={i2c:yIe,c2i:bIe(yIe),i2cUrl:_Ie,c2iUrl:bIe(_Ie)}});var lH=P(function(dyn,kIe){"use strict";var IJt=TypeError;kIe.exports=function(e){var t=e&&e.alphabet;if(t===void 0||t==="base64"||t==="base64url")return t||"base64";throw new IJt("Incorrect `alphabet` option")}});var pH=P(function(pyn,IIe){"use strict";var EIe=ut(),CJt=Ze(),AJt=sH(),PJt=QS(),OJt=Kr(),TIe=s3(),RJt=lH(),MJt=n2(),$Jt=TIe.c2i,NJt=TIe.c2iUrl,y0=EIe.SyntaxError,DJt=EIe.TypeError,ix=CJt("".charAt),uH=function uH(e,t){for(var r=e.length;t>16&255,i>>8&255,i&255];if(n===2){if(r&&a[1]!==0)throw new y0("Extra bits");return[a[0]]}if(n===3){if(r&&a[2]!==0)throw new y0("Extra bits");return[a[0],a[1]]}return a},dH=function dH(e,t,r){for(var n=t.length,i=0;i0){if(a==="stop-before-partial")break;if(a==="loose"){if(d.length===1)throw new y0("Malformed padding: exactly one additional character");l=dH(s,cH(d,i,!1),l)}else throw new y0("Missing padding")}c=o;break}var p=ix(e,u);if(++u,p==="="){if(d.length<2)throw new y0("Padding is too early");if(u=uH(e,u),d.length===2){if(u===o){if(a==="stop-before-partial")break;throw new y0("Malformed padding: only one =")}ix(e,u)==="="&&(++u,u=uH(e,u))}if(u1?arguments[1]:void 0,null,0x1fffffffffffff);return FJt(I2,r.bytes)}})});var mH=P(function(hyn,RIe){"use strict";var fH=ut(),PIe=Ze(),UJt=fH.Uint8Array,AIe=fH.SyntaxError,BJt=fH.parseInt,WJt=Math.min,OIe=/[^\da-f]/i,VJt=PIe(OIe.exec),GJt=PIe("".slice);RIe.exports=function(e,t){var r=e.length;if(r%2!==0)throw new AIe("String should be an even number of characters");for(var n=t?WJt(t.length,r/2):r/2,i=t||new UJt(n),a=0,o=0;o1?arguments[1]:void 0,this,this.length);return{read:r.read,written:r.written}}})});var DIe=P(function(){"use strict";var iYt=ne(),aYt=ut(),oYt=QS(),sYt=l3(),lYt=n2(),uYt=mH();aYt.Uint8Array&&iYt({target:"Uint8Array",proto:!0},{setFromHex:function setFromHex(t){sYt(this),oYt(t),lYt(this.buffer);var r=uYt(t,this).read;return{read:r,written:r/2}}})});var LIe=P(function(){"use strict";var cYt=ne(),dYt=ut(),pYt=Ze(),fYt=sH(),mYt=l3(),hYt=n2(),qIe=s3(),gYt=lH(),xYt=qIe.i2c,vYt=qIe.i2cUrl,yYt=pYt("".charAt),V9=dYt.Uint8Array,_Yt=!V9||!V9.prototype.toBase64||!function(){try{var e=new V9;e.toBase64(null)}catch(t){return!0}}();V9&&cYt({target:"Uint8Array",proto:!0,forced:_Yt},{toBase64:function toBase64(){var t=mYt(this),r=arguments.length?fYt(arguments[0]):void 0,n=gYt(r)==="base64"?xYt:vYt,i=!!r&&!!r.omitPadding;hYt(this.buffer);for(var a="",o=0,s=t.length,l,c=function c(d){return yYt(n,l>>6*d&63)};o+2>(-2*a&6)));return n}})});var y8e=P(function(){"use strict";var mXt=ne(),hXt=ut(),x8e=Zr(),v8e=Ze(),gXt=Ft(),wH=We(),h8e=Cr(),xXt=Cu(),vXt=s3().i2c,P2=x8e("btoa"),g8e=v8e("".charAt),yXt=v8e("".charCodeAt),p3=!!P2&&!wH(function(){return P2("hi")!=="aGk="}),_Xt=p3&&!wH(function(){P2()}),bXt=p3&&wH(function(){return P2(null)!=="bnVsbA=="}),wXt=p3&&P2.length!==1;mXt({global:!0,bind:!0,enumerable:!0,forced:!p3||_Xt||bXt||wXt},{btoa:function btoa1(t){if(xXt(arguments.length,1),p3)return gXt(P2,hXt,h8e(t));for(var r=h8e(t),n="",i=0,a=vXt,o,s;g8e(r,i)||(a="=",i%1);){if(s=yXt(r,i+=3/4),s>255)throw new(x8e("DOMException"))("The string contains characters outside of the Latin1 range","InvalidCharacterError");o=o<<8|s,n+=g8e(a,63&o>>8-i%1*8)}return n}})});var SH=P(function(Uyn,_8e){"use strict";_8e.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}});var EH=P(function(Byn,w8e){"use strict";var SXt=B6(),kH=SXt("span").classList,b8e=kH&&kH.constructor&&kH.constructor.prototype;w8e.exports=b8e===Object.prototype?void 0:b8e});var T8e=P(function(){"use strict";var S8e=ut(),k8e=SH(),kXt=EH(),TH=gU(),EXt=Lo(),E8e=function E8e(e){if(e&&e.forEach!==TH)try{EXt(e,"forEach",TH)}catch(t){e.forEach=TH}};for(tP in k8e)k8e[tP]&&E8e(S8e[tP]&&S8e[tP].prototype);var tP;E8e(kXt)});var O8e=P(function(){"use strict";var I8e=ut(),A8e=SH(),TXt=EH(),f3=cS(),C8e=Lo(),IXt=Js(),CXt=_r(),IH=CXt("iterator"),CH=f3.values,P8e=function P8e(e,t){if(e){if(e[IH]!==CH)try{C8e(e,IH,CH)}catch(n){e[IH]=CH}if(IXt(e,t,!0),A8e[t]){for(var r in f3)if(e[r]!==f3[r])try{C8e(e,r,f3[r])}catch(n){e[r]=f3[r]}}}};for(rP in A8e)P8e(I8e[rP]&&I8e[rP].prototype,rP);var rP;P8e(TXt,"DOMTokenList")});var AH=P(function(Zyn,R8e){"use strict";R8e.exports={IndexSizeError:{s:"INDEX_SIZE_ERR",c:1,m:1},DOMStringSizeError:{s:"DOMSTRING_SIZE_ERR",c:2,m:0},HierarchyRequestError:{s:"HIERARCHY_REQUEST_ERR",c:3,m:1},WrongDocumentError:{s:"WRONG_DOCUMENT_ERR",c:4,m:1},InvalidCharacterError:{s:"INVALID_CHARACTER_ERR",c:5,m:1},NoDataAllowedError:{s:"NO_DATA_ALLOWED_ERR",c:6,m:0},NoModificationAllowedError:{s:"NO_MODIFICATION_ALLOWED_ERR",c:7,m:1},NotFoundError:{s:"NOT_FOUND_ERR",c:8,m:1},NotSupportedError:{s:"NOT_SUPPORTED_ERR",c:9,m:1},InUseAttributeError:{s:"INUSE_ATTRIBUTE_ERR",c:10,m:1},InvalidStateError:{s:"INVALID_STATE_ERR",c:11,m:1},SyntaxError:{s:"SYNTAX_ERR",c:12,m:1},InvalidModificationError:{s:"INVALID_MODIFICATION_ERR",c:13,m:1},NamespaceError:{s:"NAMESPACE_ERR",c:14,m:1},InvalidAccessError:{s:"INVALID_ACCESS_ERR",c:15,m:1},ValidationError:{s:"VALIDATION_ERR",c:16,m:0},TypeMismatchError:{s:"TYPE_MISMATCH_ERR",c:17,m:1},SecurityError:{s:"SECURITY_ERR",c:18,m:1},NetworkError:{s:"NETWORK_ERR",c:19,m:1},AbortError:{s:"ABORT_ERR",c:20,m:1},URLMismatchError:{s:"URL_MISMATCH_ERR",c:21,m:1},QuotaExceededError:{s:"QUOTA_EXCEEDED_ERR",c:22,m:1},TimeoutError:{s:"TIMEOUT_ERR",c:23,m:1},InvalidNodeTypeError:{s:"INVALID_NODE_TYPE_ERR",c:24,m:1},DataCloneError:{s:"DATA_CLONE_ERR",c:25,m:1}}});var B8e=P(function(){"use strict";var AXt=ne(),aP=Zr(),PXt=oB(),NH=We(),OXt=Fo(),DH=Cl(),oP=Ni().f,RXt=Xn(),nP=ya(),iP=Kr(),MXt=$l(),$Xt=Ht(),N8e=rU(),M8e=F1(),O2=AH(),NXt=KC(),D8e=Di(),qH=rr(),q8e=Un(),R2="DOMException",$H="DATA_CLONE_ERR",lP=aP("Error"),dm=aP(R2)||function(){try{var e=aP("MessageChannel")||PXt("worker_threads").MessageChannel;new e().port1.postMessage(new WeakMap)}catch(t){if(t.name===$H&&t.code===25)return t.constructor}}(),DXt=dm&&dm.prototype,L8e=lP.prototype,qXt=D8e.set,LXt=D8e.getterFor(R2),FXt="stack"in new lP(R2),F8e=function F8e(e){return iP(O2,e)&&O2[e].m?O2[e].c:0},LH=function LH(){MXt(this,h3);var t=arguments.length,r=M8e(t<1?void 0:arguments[0]),n=M8e(t<2?void 0:arguments[1],"Error"),i=F8e(n);if(qXt(this,{type:R2,name:n,message:r,code:i}),qH||(this.name=n,this.message=r,this.code=i),FXt){var a=new lP(r);a.name=R2,oP(this,"stack",DH(1,NXt(a.stack,1)))}},h3=LH.prototype=OXt(L8e),z8e=function z8e(e){return{enumerable:!0,configurable:!0,get:e}},PH=function PH(e){return z8e(function(){return LXt(this)[e]})};qH&&(nP(h3,"code",PH("code")),nP(h3,"message",PH("message")),nP(h3,"name",PH("name")));oP(h3,"constructor",DH(1,LH));var uP=NH(function(){return!_instanceof(new dm,lP)}),j8e=uP||NH(function(){return L8e.toString!==N8e||String(new dm(1,2))!=="2: 1"}),U8e=uP||NH(function(){return new dm(1,"DataCloneError").code!==25}),zXt=uP||dm[$H]!==25||DXt[$H]!==25,$8e=q8e?j8e||U8e||zXt:uP;AXt({global:!0,constructor:!0,forced:$8e},{DOMException:$8e?LH:dm});var g3=aP(R2),sP=g3.prototype;j8e&&(q8e||dm===g3)&&RXt(sP,"toString",N8e);U8e&&qH&&dm===g3&&nP(sP,"code",z8e(function(){return F8e($Xt(this).name)}));for(OH in O2)iP(O2,OH)&&(RH=O2[OH],m3=RH.s,MH=DH(6,RH.c),iP(g3,m3)||oP(g3,m3,MH),iP(sP,m3)||oP(sP,m3,MH));var RH,m3,MH,OH});var Q8e=P(function(){"use strict";var jXt=ne(),UXt=ut(),GH=Zr(),WH=Cl(),VH=Ni().f,W8e=Kr(),BXt=$l(),WXt=Xh(),V8e=F1(),FH=AH(),VXt=KC(),GXt=rr(),Z8e=Un(),v3="DOMException",K8e=GH("Error"),y3=GH(v3),HH=function HH1(){BXt(this,HXt);var t=arguments.length,r=V8e(t<1?void 0:arguments[0]),n=V8e(t<2?void 0:arguments[1],"Error"),i=new y3(r,n),a=new K8e(r);return a.name=v3,VH(i,"stack",WH(1,VXt(a.stack,1))),WXt(i,this,HH),i},HXt=HH.prototype=y3.prototype,ZXt="stack"in new K8e(v3),KXt="stack"in new y3(1,2),zH=y3&&GXt&&Object.getOwnPropertyDescriptor(UXt,v3),QXt=!!zH&&!(zH.writable&&zH.configurable),G8e=ZXt&&!QXt&&!KXt;jXt({global:!0,constructor:!0,forced:Z8e||G8e},{DOMException:G8e?HH:y3});var x3=GH(v3),H8e=x3.prototype;if(H8e.constructor!==x3){Z8e||VH(H8e,"constructor",WH(1,x3));for(jH in FH)W8e(FH,jH)&&(UH=FH[jH],BH=UH.s,W8e(x3,BH)||VH(x3,BH,WH(6,UH.c)))}var UH,BH,jH});var Y8e=P(function(){"use strict";var JXt=Zr(),YXt=Js(),J8e="DOMException";YXt(JXt(J8e),J8e)});var e7e=P(function(){"use strict";var XXt=ne(),eer=ut(),X8e=zS().clear;XXt({global:!0,bind:!0,enumerable:!0,forced:eer.clearImmediate!==X8e},{clearImmediate:X8e})});var cP=P(function(n2n,r7e){"use strict";var t7e=ut(),ter=Ml(),rer=fn(),ner=fS(),ier=_d(),aer=Eu(),oer=Cu(),ser=t7e.Function,ler=/MSIE .\./.test(ier)||ner==="BUN"&&function(){var e=t7e.Bun.version.split(".");return e.length<3||e[0]==="0"&&(e[1]<3||e[1]==="3"&&e[2]==="0")}();r7e.exports=function(e,t){var r=t?2:1;return ler?function(n,i){var a=oer(arguments.length,1)>r,o=rer(n)?n:ser(n),s=a?aer(arguments,r):[],l=a?function l(){ter(o,this,s)}:o;return t?e(l,i):e(l)}:e}});var o7e=P(function(){"use strict";var uer=ne(),a7e=ut(),n7e=zS().set,cer=cP(),i7e=a7e.setImmediate?cer(n7e,!1):n7e;uer({global:!0,bind:!0,enumerable:!0,forced:a7e.setImmediate!==i7e},{setImmediate:i7e})});var s7e=P(function(){"use strict";e7e();o7e()});var l7e=P(function(){"use strict";var der=ne(),per=ut(),fer=fV(),mer=tn(),her=Cu(),ger=We(),xer=rr(),ver=ger(function(){return xer&&Object.getOwnPropertyDescriptor(per,"queueMicrotask").value.length!==1});der({global:!0,enumerable:!0,dontCallGetSet:!0,forced:ver},{queueMicrotask:function queueMicrotask1(t){her(arguments.length,1),fer(mer(t))}})});var c7e=P(function(){"use strict";var yer=ne(),_0=ut(),_er=ya(),ber=rr(),wer=TypeError,Ser=Object.defineProperty,u7e=_0.self!==_0;try{ber?(dP=Object.getOwnPropertyDescriptor(_0,"self"),(u7e||!dP||!dP.get||!dP.enumerable)&&_er(_0,"self",{get:function get1(){return _0},set:function set1(t){if(this!==_0)throw new wer("Illegal invocation");Ser(_0,"self",{value:t,writable:!0,configurable:!0,enumerable:!0})},configurable:!0,enumerable:!0})):yer({global:!0,simple:!0,forced:u7e},{self:_0})}catch(e){}var dP});var b7e=P(function(){"use strict";var ker=Un(),Eer=ne(),cs=ut(),b3=Zr(),S3=Ze(),XH=We(),Ter=Hh(),$2=fn(),Ier=Qh(),Cer=Pp(),gP=pr(),Aer=Vh(),Per=Za(),f7e=Ht(),mP=Pl(),Oer=Kr(),Rer=Tu(),ZH=Lo(),pP=ei(),Mer=Cu(),$er=p0(),xP=_W(),eZ=hc(),Ner=tx(),d7e=fB(),Der=Qj(),tZ=OA(),_3=cs.Object,qer=cs.Array,m7e=cs.Date,h7e=cs.Error,Ler=cs.TypeError,Fer=cs.PerformanceMark,ox=b3("DOMException"),JH=xP.Map,rZ=xP.has,g7e=xP.get,hP=xP.set,x7e=eZ.Set,v7e=eZ.add,zer=eZ.has,jer=b3("Object","keys"),Uer=S3([].push),Ber=S3((!0).valueOf),Wer=S3(1.1.valueOf),Ver=S3("".valueOf),Ger=S3(m7e.prototype.getTime),YH=Ter("structuredClone"),w3="DataCloneError",fP="Transferring",y7e=function y7e(e){return!XH(function(){var t=new cs.Set([7]),r=e(t),n=e(_3(7));return r===t||!r.has(7)||!gP(n)||+n!=7})&&e},p7e=function p7e(e,t){return!XH(function(){var r=new t,n=e({a:r,b:r});return!(n&&n.a===n.b&&_instanceof(n.a,t)&&n.a.stack===r.stack)})},Her=function Her(e){return!XH(function(){var t=e(new cs.AggregateError([1],YH,{cause:3}));return t.name!=="AggregateError"||t.errors[0]!==1||t.message!==YH||t.cause!==3})},M2=cs.structuredClone,Zer=ker||!p7e(M2,h7e)||!p7e(M2,ox)||!Her(M2),Ker=!M2&&y7e(function(e){return new Fer(YH,{detail:e}).detail}),pm=y7e(M2)||Ker,KH=function KH(e){throw new ox("Uncloneable type: "+e,w3)},Ll=function Ll(e,t){throw new ox((t||"Cloning")+" of "+e+" cannot be properly polyfilled in this engine",w3)},QH=function QH(e,t){return pm||Ll(t),pm(e)},Qer=function Qer(){var e;try{e=new cs.DataTransfer}catch(t){try{e=new cs.ClipboardEvent("").clipboardData}catch(r){}}return e&&e.items&&e.files?e:null},_7e=function _7e(e,t,r){if(rZ(t,e))return g7e(t,e);var n=r||mP(e),i,a,o,s,l,c;if(n==="SharedArrayBuffer")pm?i=pm(e):i=e;else{var d=cs.DataView;!d&&!$2(e.slice)&&Ll("ArrayBuffer");try{if($2(e.slice)&&!e.resizable)i=e.slice(0);else for(a=e.byteLength,o=("maxByteLength"in e)?{maxByteLength:e.maxByteLength}:void 0,i=new ArrayBuffer(a,o),s=new d(e),l=new d(i),c=0;c1&&!Cer(arguments[1])?f7e(arguments[1]):void 0,n=r?r.transfer:void 0,i,a;n!==void 0&&(i=new JH,a=Yer(n,i));var o=us(t,i);return a&&Xer(a),o}})});var k7e=P(function(){"use strict";var etr=ne(),S7e=ut(),ttr=cP(),w7e=ttr(S7e.setInterval,!0);etr({global:!0,bind:!0,forced:S7e.setInterval!==w7e},{setInterval:w7e})});var I7e=P(function(){"use strict";var rtr=ne(),T7e=ut(),ntr=cP(),E7e=ntr(T7e.setTimeout,!0);rtr({global:!0,bind:!0,forced:T7e.setTimeout!==E7e},{setTimeout:E7e})});var C7e=P(function(){"use strict";k7e();I7e()});var k3=P(function(_2n,P7e){"use strict";var itr=We(),atr=_r(),otr=rr(),A7e=Un(),str=atr("iterator");P7e.exports=!itr(function(){var e=new URL("b?a=1&b=2&c=3","https://a"),t=e.searchParams,r=new URLSearchParams("a=1&a=2&b=3"),n="";return e.pathname="c%20d",t.forEach(function(i,a){t.delete("b"),n+=a+i}),r.delete("a",2),r.delete("b",void 0),A7e&&(!e.toJSON||!r.has("a",1)||r.has("a",2)||!r.has("a",void 0)||r.has("b"))||!t.size&&(A7e||!otr)||!t.sort||e.href!=="https://a/c%20d?a=1&c=3"||t.get("c")!=="3"||String(new URLSearchParams("?a=1"))!=="a=1"||!t[str]||new URL("https://a@b").username!=="a"||new URLSearchParams(new URLSearchParams("a=b")).get("a")!=="b"||new URL("https://тест").host!=="xn--e1aybc"||new URL("https://a#б").hash!=="#%D0%B1"||n!=="a1c3"||new URL("https://x",void 0).host!=="x"})});var F7e=P(function(b2n,L7e){"use strict";var sx=Ze(),nZ=0x7fffffff,E3=36,N7e=1,oZ=26,ltr=38,utr=700,ctr=72,dtr=128,ptr="-",ftr=/[^\0-\u007E]/,D7e=/[.\u3002\uFF0E\uFF61]/g,O7e="Overflow: input needs wider integers to process",iZ=E3-N7e,R7e=RangeError,mtr=sx(D7e.exec),N2=Math.floor,aZ=String.fromCharCode,M7e=sx("".charCodeAt),q7e=sx([].join),b0=sx([].push),htr=sx("".replace),gtr=sx("".split),xtr=sx("".toLowerCase),vtr=function vtr(e){for(var t=[],r=0,n=e.length;r=55296&&i<=56319&&r>1,e+=N2(e/t);e>iZ*oZ>>1;)e=N2(e/iZ),n+=E3;return N2(n+(iZ+1)*e/(e+ltr))},_tr=function _tr(e){var t=[];e=vtr(e);var r=e.length,n=dtr,i=0,a=ctr,o,s;for(o=0;o=n&&sN2((nZ-i)/u))throw new R7e(O7e);for(i+=(d-n)*u,n=d,o=0;onZ)throw new R7e(O7e);if(s===n){for(var p=i,m=E3;;){var h=m<=a?N7e:m>=a+oZ?oZ:m-a;if(p0&&e&r;r>>=1)t++;return t},Gtr=function Gtr(e){var t=null;switch(e.length){case 1:t=e[0];break;case 2:t=(e[0]&31)<<6|e[1]&63;break;case 3:t=(e[0]&15)<<12|(e[1]&63)<<6|e[2]&63;break;case 4:t=(e[0]&7)<<18|(e[1]&63)<<12|(e[2]&63)<<6|e[3]&63;break}return t>1114111?null:t},Z7e=function Z7e(e){e=aCe(e,Btr," ");for(var t=e.length,r="",n=0;nt){r+="%",n++;continue}var a=H7e(e,n+1);if(a!==a){r+=i,n++;continue}n+=2;var o=Vtr(a);if(o===0)i=Ltr(a);else{if(o===1||o>4){r+=uZ,n++;continue}for(var s=[a],l=1;lt||bP(e,n)!=="%"));){var c=H7e(e,n+1);if(c!==c){n+=3;break}if(c>191||c<128)break;w0(s,c),n+=2,l++}if(s.length!==o){r+=uZ;continue}var d=Gtr(s);d===null?r+=uZ:i=Ftr(d)}}r+=i,n++}return r},Htr=/[!'()~]|%20/g,Ztr={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},Ktr=function Ktr(e){return Ztr[e]},K7e=function K7e(e){return aCe(qtr(e),Htr,Ktr)},cZ=Etr(function(t,r){iCe(this,{type:nCe,target:gc(t).entries,index:0,kind:r})},L2,function(){var t=Ntr(this),r=t.target,n=t.index++;if(!r||n>=r.length)return t.target=null,yP(void 0,!0);var i=r[n];switch(t.kind){case"keys":return yP(i.key,!1);case"values":return yP(i.value,!1)}return yP([i.key,i.value],!1)},!0),sCe=function sCe(e){this.entries=[],this.url=null,e!==void 0&&(rCe(e)?this.parseObject(e):this.parseQuery(typeof e=="string"?bP(e,0)==="?"?oCe(e,1):e:el(e)))};sCe.prototype={type:L2,bindURL:function bindURL(e){this.url=e,this.update()},parseObject:function parseObject(e){var t=this.entries,r=Otr(e),n,i,a,o,s,l,c;if(r)for(n=j7e(e,r),i=n.next;!(a=vP(i,n)).done;){if(o=j7e(Atr(a.value)),s=o.next,(l=vP(s,o)).done||(c=vP(s,o)).done||!vP(s,o).done)throw new Dtr("Expected sequence with length 2");w0(t,{key:el(l.value),value:el(c.value)})}else for(var d in e)Ttr(e,d)&&w0(t,{key:d,value:el(e[d])})},parseQuery:function parseQuery(e){if(e)for(var t=this.entries,r=G7e(e,"&"),n=0,i,a;n0?arguments[0]:void 0,r=iCe(this,new sCe(t));T3||(this.size=r.entries.length)},q2=SP.prototype;Str(q2,{append:function append(t,r){var n=gc(this);D2(arguments.length,2),w0(n.entries,{key:el(t),value:el(r)}),T3||this.size++,n.updateURL()},delete:function _delete(e){for(var t=gc(this),r=D2(arguments.length,1),n=t.entries,i=el(e),a=r<2?void 0:arguments[1],o=a===void 0?a:el(a),s=0;sn.key?1:-1}),t.updateURL()},forEach:function forEach(t){for(var r=gc(this).entries,n=Itr(t,arguments.length>1?arguments[1]:void 0),i=0,a;i1?dZ(arguments[1]):{})}}),sZ(wP)&&(_P=function _P(t){return tCe(this,lZ),new wP(t,arguments.length>1?dZ(arguments[1]):{})},lZ.constructor=_P,_P.prototype=lZ,pZ({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:_P})));var Q7e,J7e,dZ,_P;lCe.exports={URLSearchParams:SP,getState:gc}});var TCe=P(function(){"use strict";pG();var Qtr=ne(),RZ=rr(),Jtr=k3(),MZ=ut(),uCe=Ol(),bc=Ze(),CP=Xn(),xc=ya(),Ytr=$l(),AZ=Kr(),$Z=BW(),F2=xU(),Cd=Eu(),Xtr=YS().codeAt,err=F7e(),mm=Cr(),trr=Js(),rrr=Cu(),_Ce=hZ(),bCe=Di(),nrr=bCe.set,AP=bCe.getterFor("URL"),irr=_Ce.URLSearchParams,arr=_Ce.getState,C3=MZ.URL,PZ=MZ.TypeError,PP=MZ.parseInt,orr=Math.floor,cCe=Math.pow,_c=bc("".charAt),Ad=bc(/./.exec),P3=bc([].join),srr=bc(1.1.toString),lrr=bc([].pop),j2=bc([].push),gZ=bc("".replace),urr=bc([].shift),crr=bc("".split),R3=bc("".slice),OP=bc("".toLowerCase),drr=bc([].unshift),prr="Invalid authority",xZ="Invalid scheme",lx="Invalid host",dCe="Invalid port",wCe=/[a-z]/i,frr=/[\d+-.a-z]/i,OZ=/\d/,mrr=/^0x/i,hrr=/^[0-7]+$/,grr=/^\d+$/,SCe=/^[\da-f]+$/i,xrr=/[\0\t\n\r #%/:<>?@[\\\]^|]/,vrr=/[\0\t\n\r #/:<>?@[\\\]^|]/,yrr=/^[\u0000-\u0020]+/,_rr=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,brr=/[\t\n\r]/g,vc,wrr=function wrr(e){var t=crr(e,"."),r,n,i,a,o,s,l;if(t.length&&t[t.length-1]===""&&t.length--,r=t.length,r>4)return e;for(n=[],i=0;i1&&_c(a,0)==="0"&&(o=Ad(mrr,a)?16:8,a=R3(a,o===8?1:2)),a==="")s=0;else{if(!Ad(o===10?grr:o===8?hrr:SCe,a))return e;s=PP(a,o)}j2(n,s)}for(i=0;i=cCe(256,5-r))return null}else if(s>255)return null;for(l=lrr(n),i=0;i6))return;for(s=0;p();){if(l=null,s>0)if(p()==="."&&s<4)i++;else return;if(!Ad(OZ,p()))return;for(;Ad(OZ,p());){if(c=PP(p(),10),l===null)l=c;else{if(l===0)return;l=l*10+c}if(l>255)return;i++}t[r]=t[r]*256+l,s++,(s===2||s===4)&&r++}if(s!==4)return;break}else if(p()===":"){if(i++,!p())return}else if(p())return;t[r++]=a}if(n!==null)for(d=r-n,r=7;r!==0&&d>0;)u=t[r],t[r--]=t[n+d-1],t[n+--d]=u;else if(r!==8)return;return t},krr=function krr(e){for(var t=null,r=1,n=null,i=0,a=0;a<8;a++)e[a]!==0?(i>r&&(t=n,r=i),n=null,i=0):(n===null&&(n=a),++i);return i>r?n:t},A3=function A3(e){var t,r,n,i;if(typeof e=="number"){for(t=[],r=0;r<4;r++)drr(t,e%256),e=orr(e/256);return P3(t,".")}if((typeof e==="undefined"?"undefined":_type_of(e))=="object"){for(t="",n=krr(e),r=0;r<8;r++)i&&e[r]===0||(i&&(i=!1),n===r?(t+=r?":":"::",i=!0):(t+=srr(e[r],16),r<7&&(t+=":")));return"["+t+"]"}return e},IP={},kCe=$Z({},IP,{" ":1,'"':1,"<":1,">":1,"`":1}),ECe=$Z({},kCe,{"#":1,"?":1,"{":1,"}":1}),vZ=$Z({},ECe,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),S0=function S0(e,t){var r=Xtr(e,0);return r>32&&r<127&&!AZ(t,e)?e:encodeURIComponent(e)},kP={ftp:21,file:null,http:80,https:443,ws:80,wss:443},O3=function O3(e,t){var r;return e.length===2&&Ad(wCe,_c(e,0))&&((r=_c(e,1))===":"||!t&&r==="|")},pCe=function pCe(e){var t;return e.length>1&&O3(R3(e,0,2))&&(e.length===2||(t=_c(e,2))==="/"||t==="\\"||t==="?"||t==="#")},Err=function Err(e){return e==="."||OP(e)==="%2e"},Trr=function Trr(e){return e=OP(e),e===".."||e==="%2e."||e===".%2e"||e==="%2e%2e"},yZ={},fCe={},_Z={},mCe={},hCe={},bZ={},gCe={},xCe={},EP={},TP={},wZ={},SZ={},kZ={},EZ={},vCe={},TZ={},z2={},Bp={},yCe={},ux={},fm={},NZ=function NZ1(e,t,r){var n=mm(e),i,a,o;if(t){if(a=this.parse(n),a)throw new PZ(a);this.searchParams=null}else{if(r!==void 0&&(i=new NZ(r,!0)),a=this.parse(n,null,i),a)throw new PZ(a);o=arr(new irr),o.bindURL(this),this.searchParams=o}};NZ.prototype={type:"URL",parse:function parse(e,t,r){var n=this,i=t||yZ,a=0,o="",s=!1,l=!1,c=!1,d,u,p,m;for(e=mm(e),t||(n.scheme="",n.username="",n.password="",n.host=null,n.port=null,n.path=[],n.query=null,n.fragment=null,n.cannotBeABaseURL=!1,e=gZ(e,yrr,""),e=gZ(e,_rr,"$1")),e=gZ(e,brr,""),d=F2(e);a<=d.length;){switch(u=d[a],i){case yZ:if(u&&Ad(wCe,u))o+=OP(u),i=fCe;else{if(t)return xZ;i=_Z;continue}break;case fCe:if(u&&(Ad(frr,u)||u==="+"||u==="-"||u==="."))o+=OP(u);else if(u===":"){if(t&&(n.isSpecial()!==AZ(kP,o)||o==="file"&&(n.includesCredentials()||n.port!==null)||n.scheme==="file"&&!n.host))return;if(n.scheme=o,t){n.isSpecial()&&kP[n.scheme]===n.port&&(n.port=null);return}o="",n.scheme==="file"?i=EZ:n.isSpecial()&&r&&r.scheme===n.scheme?i=mCe:n.isSpecial()?i=xCe:d[a+1]==="/"?(i=hCe,a++):(n.cannotBeABaseURL=!0,j2(n.path,""),i=yCe)}else{if(t)return xZ;o="",i=_Z,a=0;continue}break;case _Z:if(!r||r.cannotBeABaseURL&&u!=="#")return xZ;if(r.cannotBeABaseURL&&u==="#"){n.scheme=r.scheme,n.path=Cd(r.path),n.query=r.query,n.fragment="",n.cannotBeABaseURL=!0,i=fm;break}i=r.scheme==="file"?EZ:bZ;continue;case mCe:if(u==="/"&&d[a+1]==="/")i=EP,a++;else{i=bZ;continue}break;case hCe:if(u==="/"){i=TP;break}else{i=Bp;continue}case bZ:if(n.scheme=r.scheme,u===vc)n.username=r.username,n.password=r.password,n.host=r.host,n.port=r.port,n.path=Cd(r.path),n.query=r.query;else if(u==="/"||u==="\\"&&n.isSpecial())i=gCe;else if(u==="?")n.username=r.username,n.password=r.password,n.host=r.host,n.port=r.port,n.path=Cd(r.path),n.query="",i=ux;else if(u==="#")n.username=r.username,n.password=r.password,n.host=r.host,n.port=r.port,n.path=Cd(r.path),n.query=r.query,n.fragment="",i=fm;else{n.username=r.username,n.password=r.password,n.host=r.host,n.port=r.port,n.path=Cd(r.path),n.path.length--,i=Bp;continue}break;case gCe:if(n.isSpecial()&&(u==="/"||u==="\\"))i=EP;else if(u==="/")i=TP;else{n.username=r.username,n.password=r.password,n.host=r.host,n.port=r.port,i=Bp;continue}break;case xCe:if(i=EP,u!=="/"||_c(o,a+1)!=="/")continue;a++;break;case EP:if(u!=="/"&&u!=="\\"){i=TP;continue}break;case TP:if(u==="@"){s&&(o="%40"+o),s=!0,p=F2(o);for(var h=0;h65535)return dCe;n.port=n.isSpecial()&&y===kP[n.scheme]?null:y,o=""}if(t)return;i=z2;continue}else return dCe;break;case EZ:if(n.scheme="file",u==="/"||u==="\\")i=vCe;else if(r&&r.scheme==="file")switch(u){case vc:n.host=r.host,n.path=Cd(r.path),n.query=r.query;break;case"?":n.host=r.host,n.path=Cd(r.path),n.query="",i=ux;break;case"#":n.host=r.host,n.path=Cd(r.path),n.query=r.query,n.fragment="",i=fm;break;default:pCe(P3(Cd(d,a),""))||(n.host=r.host,n.path=Cd(r.path),n.shortenPath()),i=Bp;continue}else{i=Bp;continue}break;case vCe:if(u==="/"||u==="\\"){i=TZ;break}r&&r.scheme==="file"&&!pCe(P3(Cd(d,a),""))&&(O3(r.path[0],!0)?j2(n.path,r.path[0]):n.host=r.host),i=Bp;continue;case TZ:if(u===vc||u==="/"||u==="\\"||u==="?"||u==="#"){if(!t&&O3(o))i=Bp;else if(o===""){if(n.host="",t)return;i=z2}else{if(m=n.parseHost(o),m)return m;if(n.host==="localhost"&&(n.host=""),t)return;o="",i=z2}continue}else o+=u;break;case z2:if(n.isSpecial()){if(i=Bp,u!=="/"&&u!=="\\")continue}else if(!t&&u==="?")n.query="",i=ux;else if(!t&&u==="#")n.fragment="",i=fm;else if(u!==vc&&(i=Bp,u!=="/"))continue;break;case Bp:if(u===vc||u==="/"||u==="\\"&&n.isSpecial()||!t&&(u==="?"||u==="#")){if(Trr(o)?(n.shortenPath(),u!=="/"&&!(u==="\\"&&n.isSpecial())&&j2(n.path,"")):Err(o)?u!=="/"&&!(u==="\\"&&n.isSpecial())&&j2(n.path,""):(n.scheme==="file"&&!n.path.length&&O3(o)&&(n.host&&(n.host=""),o=_c(o,0)+":"),j2(n.path,o)),o="",n.scheme==="file"&&(u===vc||u==="?"||u==="#"))for(;n.path.length>1&&n.path[0]==="";)urr(n.path);u==="?"?(n.query="",i=ux):u==="#"&&(n.fragment="",i=fm)}else o+=S0(u,ECe);break;case yCe:u==="?"?(n.query="",i=ux):u==="#"?(n.fragment="",i=fm):u!==vc&&(n.path[0]+=S0(u,IP));break;case ux:!t&&u==="#"?(n.fragment="",i=fm):u!==vc&&(u==="'"&&n.isSpecial()?n.query+="%27":u==="#"?n.query+="%23":n.query+=S0(u,IP));break;case fm:u!==vc&&(n.fragment+=S0(u,kCe));break}a++}},parseHost:function parseHost(e){var t,r,n;if(_c(e,0)==="["){if(_c(e,e.length-1)!=="]"||(t=Srr(R3(e,1,-1)),!t))return lx;this.host=t}else if(this.isSpecial()){if(e=err(e),Ad(xrr,e)||(t=wrr(e),t===null))return lx;this.host=t}else{if(Ad(vrr,e))return lx;for(t="",r=F2(e),n=0;n1?arguments[1]:void 0,i=nrr(r,new NZ(t,!1,n));RZ||(r.href=i.serialize(),r.origin=i.getOrigin(),r.protocol=i.getProtocol(),r.username=i.getUsername(),r.password=i.getPassword(),r.host=i.getHost(),r.hostname=i.getHostname(),r.port=i.getPort(),r.pathname=i.getPathname(),r.search=i.getSearch(),r.searchParams=i.getSearchParams(),r.hash=i.getHash())},tl=U2.prototype,yc=function yc(e,t){return{get:function get1(){return AP(this)[e]()},set:t&&function(r){return AP(this)[t](r)},configurable:!0,enumerable:!0}};RZ&&(xc(tl,"href",yc("serialize","setHref")),xc(tl,"origin",yc("getOrigin")),xc(tl,"protocol",yc("getProtocol","setProtocol")),xc(tl,"username",yc("getUsername","setUsername")),xc(tl,"password",yc("getPassword","setPassword")),xc(tl,"host",yc("getHost","setHost")),xc(tl,"hostname",yc("getHostname","setHostname")),xc(tl,"port",yc("getPort","setPort")),xc(tl,"pathname",yc("getPathname","setPathname")),xc(tl,"search",yc("getSearch","setSearch")),xc(tl,"searchParams",yc("getSearchParams")),xc(tl,"hash",yc("getHash","setHash")));CP(tl,"toJSON",function(){return AP(this).serialize()},{enumerable:!0});CP(tl,"toString",function(){return AP(this).serialize()},{enumerable:!0});C3&&(IZ=C3.createObjectURL,CZ=C3.revokeObjectURL,IZ&&CP(U2,"createObjectURL",uCe(IZ,C3)),CZ&&CP(U2,"revokeObjectURL",uCe(CZ,C3)));var IZ,CZ;trr(U2,"URL");Qtr({global:!0,constructor:!0,forced:!Jtr,sham:!RZ},{URL:U2})});var ICe=P(function(){"use strict";TCe()});var PCe=P(function(){"use strict";var Irr=ne(),Crr=Zr(),ACe=We(),Arr=Cu(),CCe=Cr(),Prr=k3(),DZ=Crr("URL"),Orr=Prr&&ACe(function(){DZ.canParse()}),Rrr=ACe(function(){return DZ.canParse.length!==1});Irr({target:"URL",stat:!0,forced:!Orr||Rrr},{canParse:function canParse(t){var r=Arr(arguments.length,1),n=CCe(t),i=r<2||arguments[1]===void 0?void 0:CCe(arguments[1]);try{return!!new DZ(n,i)}catch(a){return!1}}})});var RCe=P(function(){"use strict";var Mrr=ne(),$rr=Zr(),Nrr=Cu(),OCe=Cr(),Drr=k3(),qrr=$rr("URL");Mrr({target:"URL",stat:!0,forced:!Drr},{parse:function parse(t){var r=Nrr(arguments.length,1),n=OCe(t),i=r<2||arguments[1]===void 0?void 0:OCe(arguments[1]);try{return new qrr(n,i)}catch(a){return null}}})});var MCe=P(function(){"use strict";var Lrr=ne(),Frr=Ft();Lrr({target:"URL",proto:!0,enumerable:!0},{toJSON:function toJSON(){return Frr(URL.prototype.toString,this)}})});var $Ce=P(function(){"use strict";hZ()});var LCe=P(function(){"use strict";var zrr=Xn(),RP=Ze(),NCe=Cr(),jrr=Cu(),qCe=URLSearchParams,MP=qCe.prototype,Urr=RP(MP.append),DCe=RP(MP.delete),Brr=RP(MP.forEach),Wrr=RP([].push),qZ=new qCe("a=1&a=2&b=3");qZ.delete("a",1);qZ.delete("b",void 0);qZ+""!="a=2"&&zrr(MP,"delete",function(e){var t=arguments.length,r=t<2?void 0:arguments[1];if(t&&r===void 0)return DCe(this,e);var n=[];Brr(this,function(u,p){Wrr(n,{key:p,value:u})}),jrr(t,1);for(var i=NCe(e),a=NCe(r),o=0,s=0,l=!1,c=n.length,d;o2){var l=r.lastIndexOf("/");if(l!==r.length-1){l===-1?(r="",n=0):(r=r.slice(0,l),n=r.length-1-r.lastIndexOf("/")),i=s,a=0;continue}}else if(r.length===2||r.length===1){r="",n=0,i=s,a=0;continue}}t&&(r.length>0?r+="/..":r="..",n=2)}else r.length>0?r+="/"+e.slice(i+1,s):r=e.slice(i+1,s),n=s-i-1;i=s,a=0}else o===46&&a!==-1?++a:a=-1}return r};var Npr=function Npr(e,t){var r=t.dir||t.root,n=t.base||(t.name||"")+(t.ext||"");return r?r===t.root?r+n:r+e+n:n};var C_={resolve:function resolve(){for(var t="",r=!1,n,i=arguments.length-1;i>=-1&&!r;i--){var a;i>=0?a=arguments[i]:(n===void 0&&(n=process.cwd()),a=n),Yp(a),a.length!==0&&(t=a+"/"+t,r=a.charCodeAt(0)===47)}return t=jRe(t,!r),r?t.length>0?"/"+t:"/":t.length>0?t:"."},normalize:function normalize(t){if(Yp(t),t.length===0)return".";var r=t.charCodeAt(0)===47,n=t.charCodeAt(t.length-1)===47;return t=jRe(t,!r),t.length===0&&!r&&(t="."),t.length>0&&n&&(t+="/"),r?"/"+t:t},isAbsolute:function isAbsolute(t){return Yp(t),t.length>0&&t.charCodeAt(0)===47},join:function join(){if(arguments.length===0)return".";for(var t,r=0;r0&&(t===void 0?t=n:t+="/"+n)}return t===void 0?".":C_.normalize(t)},relative:function relative(t,r){if(Yp(t),Yp(r),t===r||(t=C_.resolve(t),r=C_.resolve(r),t===r))return"";for(var n=1;nc){if(r.charCodeAt(o+u)===47)return r.slice(o+u+1);if(u===0)return r.slice(o+u)}else a>c&&(t.charCodeAt(n+u)===47?d=u:u===0&&(d=0));break}var p=t.charCodeAt(n+u),m=r.charCodeAt(o+u);if(p!==m)break;p===47&&(d=u)}var h="";for(u=n+d+1;u<=i;++u)(u===i||t.charCodeAt(u)===47)&&(h.length===0?h+="..":h+="/..");return h.length>0?h+r.slice(o+d):(o+=d,r.charCodeAt(o)===47&&++o,r.slice(o))},_makeLong:function _makeLong(t){return t},dirname:function dirname(t){if(Yp(t),t.length===0)return".";for(var r=t.charCodeAt(0),n=r===47,i=-1,a=!0,o=t.length-1;o>=1;--o)if(r=t.charCodeAt(o),r===47){if(!a){i=o;break}}else a=!1;return i===-1?n?"/":".":n&&i===1?"//":t.slice(0,i)},basename:function basename(t,r){if(r!==void 0&&typeof r!="string")throw new TypeError('"ext" argument must be a string');Yp(t);var n=0,i=-1,a=!0,o;if(r!==void 0&&r.length>0&&r.length<=t.length){if(r.length===t.length&&r===t)return"";var s=r.length-1,l=-1;for(o=t.length-1;o>=0;--o){var c=t.charCodeAt(o);if(c===47){if(!a){n=o+1;break}}else l===-1&&(a=!1,l=o+1),s>=0&&(c===r.charCodeAt(s)?--s===-1&&(i=o):(s=-1,i=l))}return n===i?i=l:i===-1&&(i=t.length),t.slice(n,i)}else{for(o=t.length-1;o>=0;--o)if(t.charCodeAt(o)===47){if(!a){n=o+1;break}}else i===-1&&(a=!1,i=o+1);return i===-1?"":t.slice(n,i)}},extname:function extname(t){Yp(t);for(var r=-1,n=0,i=-1,a=!0,o=0,s=t.length-1;s>=0;--s){var l=t.charCodeAt(s);if(l===47){if(!a){n=s+1;break}continue}i===-1&&(a=!1,i=s+1),l===46?r===-1?r=s:o!==1&&(o=1):r!==-1&&(o=-1)}return r===-1||i===-1||o===0||o===1&&r===i-1&&r===n+1?"":t.slice(r,i)},format:function format(t){if(t===null||(typeof t==="undefined"?"undefined":_type_of(t))!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+(typeof t==="undefined"?"undefined":_type_of(t)));return Npr("/",t)},parse:function parse(t){Yp(t);var r={root:"",dir:"",base:"",ext:"",name:""};if(t.length===0)return r;var n=t.charCodeAt(0),i=n===47,a;i?(r.root="/",a=1):a=0;for(var o=-1,s=0,l=-1,c=!0,d=t.length-1,u=0;d>=a;--d){if(n=t.charCodeAt(d),n===47){if(!c){s=d+1;break}continue}l===-1&&(c=!1,l=d+1),n===46?o===-1?o=d:u!==1&&(u=1):o!==-1&&(u=-1)}return o===-1||l===-1||u===0||u===1&&o===l-1&&o===s+1?l!==-1&&(s===0&&i?r.base=r.name=t.slice(1,l):r.base=r.name=t.slice(s,l)):(s===0&&i?(r.name=t.slice(1,o),r.base=t.slice(1,l)):(r.name=t.slice(s,o),r.base=t.slice(s,l)),r.ext=t.slice(o,l)),s>0?r.dir=t.slice(0,s-1):i&&(r.dir="/"),r},sep:"/",delimiter:":",win32:null,posix:null};C_.posix=C_;URe.exports=C_});var HRe=P(function(GRe,iQ){(function(e){if((typeof GRe==="undefined"?"undefined":_type_of(GRe))=="object"&&typeof iQ!="undefined")iQ.exports=e();else if(typeof define=="function"&&define.amd)define([],e);else{var t;typeof window!="undefined"?t=window:typeof global!="undefined"?t=global:typeof self!="undefined"?t=self:t=this,t.localforage=e()}})(function(){var e,t,r;return(function n(i,a,o){function s(d,u){if(!a[d]){if(!i[d]){var p=typeof require=="function"&&require;if(!u&&p)return p(d,!0);if(l)return l(d,!0);var m=new Error("Cannot find module '"+d+"'");throw m.code="MODULE_NOT_FOUND",m}var h=a[d]={exports:{}};i[d][0].call(h.exports,function(g){var x=i[d][1][g];return s(x||g)},h,h.exports,n,i,a,o)}return a[d].exports}for(var l=typeof require=="function"&&require,c=0;c=43)}}).catch(function(){return!1})}function T(B){return typeof v=="boolean"?p.resolve(v):E(B).then(function(ue){return v=ue,v})}function I(B){var ue=_[B.name],K={};K.promise=new p(function(ye,we){K.resolve=ye,K.reject=we}),ue.deferredOperations.push(K),ue.dbReady?ue.dbReady=ue.dbReady.then(function(){return K.promise}):ue.dbReady=K.promise}function A(B){var ue=_[B.name],K=ue.deferredOperations.pop();if(K)return K.resolve(),K.promise}function O(B,ue){var K=_[B.name],ye=K.deferredOperations.pop();if(ye)return ye.reject(ue),ye.promise}function R(B,ue){return new p(function(K,ye){if(_[B.name]=_[B.name]||H(),B.db)if(ue)I(B),B.db.close();else return K(B.db);var we=[B.name];ue&&we.push(B.version);var Y=c.open.apply(c,we);ue&&(Y.onupgradeneeded=function(Ee){var Ne=Y.result;try{Ne.createObjectStore(B.storeName),Ee.oldVersion<=1&&Ne.createObjectStore(y)}catch(Ue){if(Ue.name==="ConstraintError")console.warn('The database "'+B.name+'" has been upgraded from version '+Ee.oldVersion+" to version "+Ee.newVersion+', but the storage "'+B.storeName+'" already exists.');else throw Ue}}),Y.onerror=function(Ee){Ee.preventDefault(),ye(Y.error)},Y.onsuccess=function(){var Ee=Y.result;Ee.onversionchange=function(Ne){Ne.target.close()},K(Ee),A(B)}})}function M(B){return R(B,!1)}function N(B){return R(B,!0)}function q(B,ue){if(!B.db)return!0;var K=!B.db.objectStoreNames.contains(B.storeName),ye=B.versionB.db.version;if(ye&&(B.version!==ue&&console.warn('The database "'+B.name+"\" can't be downgraded from version "+B.db.version+" to version "+B.version+"."),B.version=B.db.version),we||K){if(K){var Y=B.db.version+1;Y>B.version&&(B.version=Y)}return!0}return!1}function L(B){return new p(function(ue,K){var ye=new FileReader;ye.onerror=K,ye.onloadend=function(we){var Y=btoa(we.target.result||"");ue({__local_forage_encoded_blob:!0,data:Y,type:B.type})},ye.readAsBinaryString(B)})}function F(B){var ue=S(atob(B.data));return u([ue],{type:B.type})}function Q(B){return B&&B.__local_forage_encoded_blob}function de(B){var ue=this,K=ue._initReady().then(function(){var ye=_[ue._dbInfo.name];if(ye&&ye.dbReady)return ye.dbReady});return h(K,B,B),K}function D(B){I(B);for(var ue=_[B.name],K=ue.forages,ye=0;ye0&&(!B.db||Y.name==="InvalidStateError"||Y.name==="NotFoundError"))return p.resolve().then(function(){if(!B.db||Y.name==="NotFoundError"&&!B.db.objectStoreNames.contains(B.storeName)&&B.version<=B.db.version)return B.db&&(B.version=B.db.version+1),N(B)}).then(function(){return D(B).then(function(){j(B,ue,K,ye-1)})}).catch(K);K(Y)}}function H(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function J(B){var ue=this,K={db:null};if(B)for(var ye in B)K[ye]=B[ye];var we=_[K.name];we||(we=H(),_[K.name]=we),we.forages.push(ue),ue._initReady||(ue._initReady=ue.ready,ue.ready=de);var Y=[];function Ee(){return p.resolve()}for(var Ne=0;Ne>4,nt[we++]=(Ee&15)<<4|Ne>>2,nt[we++]=(Ne&3)<<6|Ue&63;return Be}function po(B){var ue=new Uint8Array(B),K="",ye;for(ye=0;ye>2],K+=X[(ue[ye]&3)<<4|ue[ye+1]>>4],K+=X[(ue[ye+1]&15)<<2|ue[ye+2]>>6],K+=X[ue[ye+2]&63];return ue.length%3===2?K=K.substring(0,K.length-1)+"=":ue.length%3===1&&(K=K.substring(0,K.length-2)+"=="),K}function rs(B,ue){var K="";if(B&&(K=aa.call(B)),B&&(K==="[object ArrayBuffer]"||B.buffer&&aa.call(B.buffer)==="[object ArrayBuffer]")){var ye,we=gt;_instanceof(B,ArrayBuffer)?(ye=B,we+=_t):(ye=B.buffer,K==="[object Int8Array]"?we+=Se:K==="[object Uint8Array]"?we+=Me:K==="[object Uint8ClampedArray]"?we+=Oe:K==="[object Int16Array]"?we+=it:K==="[object Uint16Array]"?we+=Vt:K==="[object Int32Array]"?we+=Ge:K==="[object Uint32Array]"?we+=Nt:K==="[object Float32Array]"?we+=He:K==="[object Float64Array]"?we+=Nr:ue(new Error("Failed to get type for BinaryArray"))),ue(we+po(ye))}else if(K==="[object Blob]"){var Y=new FileReader;Y.onload=function(){var _$Ee=ze+B.type+"~"+po(this.result);ue(gt+Pe+_$Ee)},Y.readAsArrayBuffer(B)}else try{ue(JSON.stringify(B))}catch(Ee){console.error("Couldn't convert value into a JSON string: ",B),ue(null,Ee)}}function Yn(B){if(B.substring(0,at)!==gt)return JSON.parse(B);var ue=B.substring(Mn),K=B.substring(at,Mn),ye;if(K===Pe&&ot.test(ue)){var we=ue.match(ot);ye=we[1],ue=ue.substring(we[0].length)}var Y=Hn(ue);switch(K){case _t:return Y;case Pe:return u([Y],{type:ye});case Se:return new Int8Array(Y);case Me:return new Uint8Array(Y);case Oe:return new Uint8ClampedArray(Y);case it:return new Int16Array(Y);case Vt:return new Uint16Array(Y);case Ge:return new Int32Array(Y);case Nt:return new Uint32Array(Y);case He:return new Float32Array(Y);case Nr:return new Float64Array(Y);default:throw new Error("Unkown type: "+K)}}var Dr={serialize:rs,deserialize:Yn,stringToBuffer:Hn,bufferToString:po};function W(B,ue,K,ye){B.executeSql("CREATE TABLE IF NOT EXISTS "+ue.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],K,ye)}function Ce(B){var ue=this,K={db:null};if(B)for(var ye in B)K[ye]=typeof B[ye]!="string"?B[ye].toString():B[ye];var we=new p(function(Y,Ee){try{K.db=openDatabase(K.name,String(K.version),K.description,K.size)}catch(Ne){return Ee(Ne)}K.db.transaction(function(Ne){W(Ne,K,function(){ue._dbInfo=K,Y()},function(Ue,Be){Ee(Be)})},Ee)});return K.serializer=Dr,we}function Dt(B,ue,K,ye,we,Y){B.executeSql(K,ye,we,function(Ee,Ne){Ne.code===Ne.SYNTAX_ERR?Ee.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[ue.storeName],function(Ue,Be){Be.rows.length?Y(Ue,Ne):W(Ue,ue,function(){Ue.executeSql(K,ye,we,Y)},Y)},Y):Y(Ee,Ne)},Y)}function kr(B,ue){var K=this;B=g(B);var ye=new p(function(we,Y){K.ready().then(function(){var Ee=K._dbInfo;Ee.db.transaction(function(Ne){Dt(Ne,Ee,"SELECT * FROM "+Ee.storeName+" WHERE key = ? LIMIT 1",[B],function(Ue,Be){var nt=Be.rows.length?Be.rows.item(0).value:null;nt&&(nt=Ee.serializer.deserialize(nt)),we(nt)},function(Ue,Be){Y(Be)})})}).catch(Y)});return m(ye,ue),ye}function dn(B,ue){var K=this,ye=new p(function(we,Y){K.ready().then(function(){var Ee=K._dbInfo;Ee.db.transaction(function(Ne){Dt(Ne,Ee,"SELECT * FROM "+Ee.storeName,[],function(Ue,Be){for(var nt=Be.rows,Ot=nt.length,Ct=0;Ct0){Ee(fo.apply(we,[B,Ue,K,ye-1]));return}Ne(Ct)}})})}).catch(Ne)});return m(Y,K),Y}function oc(B,ue,K){return fo.apply(this,[B,ue,K,1])}function bt(B,ue){var K=this;B=g(B);var ye=new p(function(we,Y){K.ready().then(function(){var Ee=K._dbInfo;Ee.db.transaction(function(Ne){Dt(Ne,Ee,"DELETE FROM "+Ee.storeName+" WHERE key = ?",[B],function(){we()},function(Ue,Be){Y(Be)})})}).catch(Y)});return m(ye,ue),ye}function pn(B){var ue=this,K=new p(function(ye,we){ue.ready().then(function(){var Y=ue._dbInfo;Y.db.transaction(function(Ee){Dt(Ee,Y,"DELETE FROM "+Y.storeName,[],function(){ye()},function(Ne,Ue){we(Ue)})})}).catch(we)});return m(K,B),K}function El(B){var ue=this,K=new p(function(ye,we){ue.ready().then(function(){var Y=ue._dbInfo;Y.db.transaction(function(Ee){Dt(Ee,Y,"SELECT COUNT(key) as c FROM "+Y.storeName,[],function(Ne,Ue){var Be=Ue.rows.item(0).c;ye(Be)},function(Ne,Ue){we(Ue)})})}).catch(we)});return m(K,B),K}function kp(B,ue){var K=this,ye=new p(function(we,Y){K.ready().then(function(){var Ee=K._dbInfo;Ee.db.transaction(function(Ne){Dt(Ne,Ee,"SELECT key FROM "+Ee.storeName+" WHERE id = ? LIMIT 1",[B+1],function(Ue,Be){var nt=Be.rows.length?Be.rows.item(0).key:null;we(nt)},function(Ue,Be){Y(Be)})})}).catch(Y)});return m(ye,ue),ye}function gd(B){var ue=this,K=new p(function(ye,we){ue.ready().then(function(){var Y=ue._dbInfo;Y.db.transaction(function(Ee){Dt(Ee,Y,"SELECT key FROM "+Y.storeName,[],function(Ne,Ue){for(var Be=[],nt=0;nt '__WebKitDatabaseInfoTable__'",[],function(we,Y){for(var Ee=[],Ne=0;Ne0}function Ji(B){var ue=this,K={};if(B)for(var ye in B)K[ye]=B[ye];return K.keyPrefix=As(B,ue._defaultConfig),Dn()?(ue._dbInfo=K,K.serializer=Dr,p.resolve()):p.reject()}function No(B){var ue=this,K=ue.ready().then(function(){for(var ye=ue._dbInfo.keyPrefix,we=localStorage.length-1;we>=0;we--){var Y=localStorage.key(we);Y.indexOf(ye)===0&&localStorage.removeItem(Y)}});return m(K,B),K}function fi(B,ue){var K=this;B=g(B);var ye=K.ready().then(function(){var we=K._dbInfo,Y=localStorage.getItem(we.keyPrefix+B);return Y&&(Y=we.serializer.deserialize(Y)),Y});return m(ye,ue),ye}function $i(B,ue){var K=this,ye=K.ready().then(function(){for(var we=K._dbInfo,Y=we.keyPrefix,Ee=Y.length,Ne=localStorage.length,Ue=1,Be=0;Be=0;Ee--){var Ne=localStorage.key(Ee);Ne.indexOf(Y)===0&&localStorage.removeItem(Ne)}}):we=p.reject("Invalid arguments"),m(we,ue),we}var lt={_driver:"localStorageWrapper",_initStorage:Ji,_support:en(),iterate:$i,getItem:fi,setItem:fe,removeItem:zh,clear:No,length:Fh,key:Ep,keys:Lh,dropInstance:Le},tr=function tr(ue,K){return ue===K||typeof ue=="number"&&typeof K=="number"&&isNaN(ue)&&isNaN(K)},oa=function oa(ue,K){for(var ye=ue.length,we=0;we=n.val||r>=e.length-1)return n}};var YRe=function YRe(e,t){if(typeof e=="number"&&!isNaN(e))return e;if(typeof e!="string")return null;var r=t&&t.mode||"metric";r=uQ(r);var n=Zpr.exec(e),i,a;if(!n)return null;i=parseFloat(n[1]),a=n[4],a===void 0&&(a="b"),a=a.toLowerCase();var o;return r=="jedec"&&(o=P_["_"+a]),o===void 0&&(o=P_[a]),Math.floor(o.val*i)};XRe.exports=QRe("metric");var Bpr=/\B(?=(\d{3})+(?!\d))/g,Wpr=/(?:\.0*|(\.[^0]+)0+)$/,P_={b:{val:1,longName:"byte",name:"B"},kb:{val:Math.pow(1e3,1),longName:"kilobyte",name:"kB"},mb:{val:Math.pow(1e3,2),longName:"megabyte",name:"MB"},gb:{val:Math.pow(1e3,3),longName:"gigabyte",name:"GB"},tb:{val:Math.pow(1e3,4),longName:"terabyte",name:"TB"},pb:{val:Math.pow(1e3,5),longName:"petabyte",name:"PB"},eb:{val:Math.pow(1e3,6),longName:"exabyte",name:"EB"},zb:{val:Math.pow(1e3,7),longName:"zettabyte",name:"ZB"},yb:{val:Math.pow(1e3,8),longName:"yottabyte",name:"YB"},kib:{val:Math.pow(1024,1),longName:"kibibyte",name:"KiB"},mib:{val:Math.pow(1024,2),longName:"mebibyte",name:"MiB"},gib:{val:Math.pow(1024,3),longName:"gibibyte",name:"GiB"},tib:{val:Math.pow(1024,4),longName:"tebibyte",name:"TiB"},pib:{val:Math.pow(1024,5),longName:"pebibyte",name:"PiB"},eib:{val:Math.pow(1024,6),longName:"exbibyte",name:"EiB"},zib:{val:Math.pow(1024,7),longName:"zebibyte",name:"ZiB"},yib:{val:Math.pow(1024,8),longName:"yobibyte",name:"YiB"},_kb:{val:Math.pow(1024,1),longName:"kilobyte",name:"kB"},_mb:{val:Math.pow(1024,2),longName:"megabyte",name:"MB"},_gb:{val:Math.pow(1024,3),longName:"gigabyte",name:"GB"},_tb:{val:Math.pow(1024,4),longName:"terabyte",name:"TB"}};var Vpr=lQ(["b","kb","mb","gb","tb","pb","eb","zb","yb"]),Gpr=lQ(["b","kib","mib","gib","tib","pib","eib","zib","yib"]),Hpr=lQ(["b","_kb","_mb","_gb","_tb"]),Zpr=/^((-|\+)?(\d+(?:\.\d+)?)) *((k|m|g|t|p|e|z|y)?i?(b))?$/i;function QRe(e){e=uQ(e);function t(n){return n=n!==void 0?n:{},n.mode===void 0&&(n.mode=e),n}function r(n,i){return Kpr(n,t(i))}return r.format=function(i,a){return JRe(i,t(a))},r.parse=function(i,a){return YRe(i,t(a))},r.withDefaultMode=QRe,r}});var gQ=P(function(CCn,D_){var rt=function rt(){this.Diff_Timeout=1,this.Diff_EditCost=4,this.Match_Threshold=.5,this.Match_Distance=1e3,this.Patch_DeleteThreshold=.5,this.Patch_Margin=4,this.Match_MaxBits=32},ki=-1,Fi=1,Vr=0;rt.Diff=function(e,t){return[e,t]};rt.prototype.diff_main=function(e,t,r,n){typeof n=="undefined"&&(this.Diff_Timeout<=0?n=Number.MAX_VALUE:n=new Date().getTime()+this.Diff_Timeout*1e3);var i=n;if(e==null||t==null)throw new Error("Null input. (diff_main)");if(e==t)return e?[new rt.Diff(Vr,e)]:[];typeof r=="undefined"&&(r=!0);var a=r,o=this.diff_commonPrefix(e,t),s=e.substring(0,o);e=e.substring(o),t=t.substring(o),o=this.diff_commonSuffix(e,t);var l=e.substring(e.length-o);e=e.substring(0,e.length-o),t=t.substring(0,t.length-o);var c=this.diff_compute_(e,t,a,i);return s&&c.unshift(new rt.Diff(Vr,s)),l&&c.push(new rt.Diff(Vr,l)),this.diff_cleanupMerge(c),c};rt.prototype.diff_compute_=function(e,t,r,n){var i;if(!e)return[new rt.Diff(Fi,t)];if(!t)return[new rt.Diff(ki,e)];var a=e.length>t.length?e:t,o=e.length>t.length?t:e,s=a.indexOf(o);if(s!=-1)return i=[new rt.Diff(Fi,a.substring(0,s)),new rt.Diff(Vr,o),new rt.Diff(Fi,a.substring(s+o.length))],e.length>t.length&&(i[0][0]=i[2][0]=ki),i;if(o.length==1)return[new rt.Diff(ki,e),new rt.Diff(Fi,t)];var l=this.diff_halfMatch_(e,t);if(l){var c=l[0],d=l[1],u=l[2],p=l[3],m=l[4],h=this.diff_main(c,u,r,n),g=this.diff_main(d,p,r,n);return h.concat([new rt.Diff(Vr,m)],g)}return r&&e.length>100&&t.length>100?this.diff_lineMode_(e,t,n):this.diff_bisect_(e,t,n)};rt.prototype.diff_lineMode_=function(e,t,r){var n=this.diff_linesToChars_(e,t);e=n.chars1,t=n.chars2;var i=n.lineArray,a=this.diff_main(e,t,!1,r);this.diff_charsToLines_(a,i),this.diff_cleanupSemantic(a),a.push(new rt.Diff(Vr,""));for(var o=0,s=0,l=0,c="",d="";o=1&&l>=1){a.splice(o-s-l,s+l),o=o-s-l;for(var u=this.diff_main(c,d,!1,r),p=u.length-1;p>=0;p--)a.splice(o,0,u[p]);o=o+u.length}l=0,s=0,c="",d="";break}o++}return a.pop(),a};rt.prototype.diff_bisect_=function(e,t,r){for(var n=e.length,i=t.length,a=Math.ceil((n+i)/2),o=a,s=2*a,l=new Array(s),c=new Array(s),d=0;dr);y++){for(var v=-y+m;v<=y-h;v+=2){var _=o+v,b;v==-y||v!=y&&l[_-1]n)h+=2;else if(k>i)m+=2;else if(p){var w=o+u-v;if(w>=0&&w=S)return this.diff_bisectSplit_(e,t,b,k,r)}}}for(var E=-y+g;E<=y-x;E+=2){var w=o+E,S;E==-y||E!=y&&c[w-1]n)x+=2;else if(T>i)g+=2;else if(!p){var _=o+u-E;if(_>=0&&_=S)return this.diff_bisectSplit_(e,t,b,k,r)}}}}return[new rt.Diff(ki,e),new rt.Diff(Fi,t)]};rt.prototype.diff_bisectSplit_=function(e,t,r,n,i){var a=e.substring(0,r),o=t.substring(0,n),s=e.substring(r),l=t.substring(n),c=this.diff_main(a,o,!1,i),d=this.diff_main(s,l,!1,i);return c.concat(d)};rt.prototype.diff_linesToChars_=function(e,t){var r=[],n={};r[0]="";function i(l){for(var c="",d=0,u=-1,p=r.length;un?e=e.substring(r-n):rt.length?e:t,n=e.length>t.length?t:e;if(r.length<4||n.length*2=h.length?[b,k,w,S,_]:null}var o=a(r,n,Math.ceil(r.length/4)),s=a(r,n,Math.ceil(r.length/2)),l;if(!o&&!s)return null;s?o?l=o[4].length>s[4].length?o:s:l=s:l=o;var c,d,u,p;e.length>t.length?(c=l[0],d=l[1],u=l[2],p=l[3]):(u=l[0],p=l[1],c=l[2],d=l[3]);var m=l[4];return[c,d,u,p,m]};rt.prototype.diff_cleanupSemantic=function(e){for(var t=!1,r=[],n=0,i=null,a=0,o=0,s=0,l=0,c=0;a0?r[n-1]:-1,o=0,s=0,l=0,c=0,i=null,t=!0)),a++;for(t&&this.diff_cleanupMerge(e),this.diff_cleanupSemanticLossless(e),a=1;a=m?(p>=d.length/2||p>=u.length/2)&&(e.splice(a,0,new rt.Diff(Vr,u.substring(0,p))),e[a-1][1]=d.substring(0,d.length-p),e[a+1][1]=u.substring(p),a++):(m>=d.length/2||m>=u.length/2)&&(e.splice(a,0,new rt.Diff(Vr,d.substring(0,m))),e[a-1][0]=Fi,e[a-1][1]=u.substring(0,u.length-m),e[a+1][0]=ki,e[a+1][1]=d.substring(m),a++),a++}a++}};rt.prototype.diff_cleanupSemanticLossless=function(e){function t(m,h){if(!m||!h)return 6;var g=m.charAt(m.length-1),x=h.charAt(0),y=g.match(rt.nonAlphaNumericRegex_),v=x.match(rt.nonAlphaNumericRegex_),_=y&&g.match(rt.whitespaceRegex_),b=v&&x.match(rt.whitespaceRegex_),k=_&&g.match(rt.linebreakRegex_),w=b&&x.match(rt.linebreakRegex_),S=k&&m.match(rt.blanklineEndRegex_),E=w&&h.match(rt.blanklineStartRegex_);return S||E?5:k||w?4:y&&!_&&b?3:_||b?2:y||v?1:0}for(var r=1;r=u&&(u=p,l=n,c=i,d=a)}e[r-1][1]!=l&&(l?e[r-1][1]=l:(e.splice(r-1,1),r--),e[r][1]=c,d?e[r+1][1]=d:(e.splice(r+1,1),r--))}r++}};rt.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/;rt.whitespaceRegex_=/\s/;rt.linebreakRegex_=/[\r\n]/;rt.blanklineEndRegex_=/\n\r?\n$/;rt.blanklineStartRegex_=/^\r?\n\r?\n/;rt.prototype.diff_cleanupEfficiency=function(e){for(var t=!1,r=[],n=0,i=null,a=0,o=!1,s=!1,l=!1,c=!1;a0?r[n-1]:-1,l=c=!1),t=!0)),a++;t&&this.diff_cleanupMerge(e)};rt.prototype.diff_cleanupMerge=function(e){e.push(new rt.Diff(Vr,""));for(var t=0,r=0,n=0,i="",a="",o;t1?(r!==0&&n!==0&&(o=this.diff_commonPrefix(a,i),o!==0&&(t-r-n>0&&e[t-r-n-1][0]==Vr?e[t-r-n-1][1]+=a.substring(0,o):(e.splice(0,0,new rt.Diff(Vr,a.substring(0,o))),t++),a=a.substring(o),i=i.substring(o)),o=this.diff_commonSuffix(a,i),o!==0&&(e[t][1]=a.substring(a.length-o)+e[t][1],a=a.substring(0,a.length-o),i=i.substring(0,i.length-o))),t-=r+n,e.splice(t,r+n),i.length&&(e.splice(t,0,new rt.Diff(ki,i)),t++),a.length&&(e.splice(t,0,new rt.Diff(Fi,a)),t++),t++):t!==0&&e[t-1][0]==Vr?(e[t-1][1]+=e[t][1],e.splice(t,1)):t++,n=0,r=0,i="",a="";break}e[e.length-1][1]===""&&e.pop();var s=!1;for(t=1;tt));o++)i=r,a=n;return e.length!=o&&e[o][0]===ki?a:a+(t-i)};rt.prototype.diff_prettyHtml=function(e){for(var t=[],r=/&/g,n=//g,a=/\n/g,o=0;o");switch(s){case Fi:t[o]=''+c+"";break;case ki:t[o]=''+c+"";break;case Vr:t[o]=""+c+"";break}}return t.join("")};rt.prototype.diff_text1=function(e){for(var t=[],r=0;rthis.Match_MaxBits)throw new Error("Pattern too long for this browser.");var n=this.match_alphabet_(t),i=this;function a(b,k){var w=b/t.length,S=Math.abs(r-k);return i.Match_Distance?w+S/i.Match_Distance:S?1:w}var o=this.Match_Threshold,s=e.indexOf(t,r);s!=-1&&(o=Math.min(a(0,s),o),s=e.lastIndexOf(t,r+t.length),s!=-1&&(o=Math.min(a(0,s),o)));var l=1<=h;y--){var v=n[e.charAt(y-1)];if(m===0?x[y]=(x[y+1]<<1|1)&v:x[y]=(x[y+1]<<1|1)&v|((p[y+1]|p[y])<<1|1)|p[y+1],x[y]&l){var _=a(m,y-1);if(_<=o)if(o=_,s=y-1,s>r)h=Math.max(1,2*r-s);else break}}if(a(m+1,r)>o)break;p=x}return s};rt.prototype.match_alphabet_=function(e){for(var t={},r=0;r2&&(this.diff_cleanupSemantic(i),this.diff_cleanupEfficiency(i));else if(e&&(typeof e==="undefined"?"undefined":_type_of(e))=="object"&&typeof t=="undefined"&&typeof r=="undefined")i=e,n=this.diff_text1(i);else if(typeof e=="string"&&t&&(typeof t==="undefined"?"undefined":_type_of(t))=="object"&&typeof r=="undefined")n=e,i=t;else if(typeof e=="string"&&typeof t=="string"&&r&&(typeof r==="undefined"?"undefined":_type_of(r))=="object")n=e,i=r;else throw new Error("Unknown call format to patch_make.");if(i.length===0)return[];for(var a=[],o=new rt.patch_obj,s=0,l=0,c=0,d=n,u=n,p=0;p=2*this.Patch_Margin&&s&&(this.patch_addContext_(o,d),a.push(o),o=new rt.patch_obj,s=0,d=u,l=c);break}m!==Fi&&(l+=h.length),m!==ki&&(c+=h.length)}return s&&(this.patch_addContext_(o,d),a.push(o)),a};rt.prototype.patch_deepCopy=function(e){for(var t=[],r=0;rthis.Match_MaxBits?(l=this.match_main(t,s.substring(0,this.Match_MaxBits),o),l!=-1&&(c=this.match_main(t,s.substring(s.length-this.Match_MaxBits),o+s.length-this.Match_MaxBits),(c==-1||l>=c)&&(l=-1))):l=this.match_main(t,s,o),l==-1)i[a]=!1,n-=e[a].length2-e[a].length1;else{i[a]=!0,n=l-o;var d;if(c==-1?d=t.substring(l,l+s.length):d=t.substring(l,c+this.Match_MaxBits),s==d)t=t.substring(0,l)+this.diff_text2(e[a].diffs)+t.substring(l+s.length);else{var u=this.diff_main(s,d,!1);if(s.length>this.Match_MaxBits&&this.diff_levenshtein(u)/s.length>this.Patch_DeleteThreshold)i[a]=!1;else{this.diff_cleanupSemanticLossless(u);for(var p=0,m,h=0;ha[0][1].length){var o=t-a[0][1].length;a[0][1]=r.substring(a[0][1].length)+a[0][1],i.start1-=o,i.start2-=o,i.length1+=o,i.length2+=o}if(i=e[e.length-1],a=i.diffs,a.length==0||a[a.length-1][0]!=Vr)a.push(new rt.Diff(Vr,r)),i.length1+=t,i.length2+=t;else if(t>a[a.length-1][1].length){var o=t-a[a.length-1][1].length;a[a.length-1][1]+=r.substring(0,o),i.length1+=o,i.length2+=o}return r};rt.prototype.patch_splitMax=function(e){for(var t=this.Match_MaxBits,r=0;r2*t?(s.length1+=d.length,i+=d.length,l=!1,s.diffs.push(new rt.Diff(c,d)),n.diffs.shift()):(d=d.substring(0,t-s.length1-this.Patch_Margin),s.length1+=d.length,i+=d.length,c===Vr?(s.length2+=d.length,a+=d.length):l=!1,s.diffs.push(new rt.Diff(c,d)),d==n.diffs[0][1]?n.diffs.shift():n.diffs[0][1]=n.diffs[0][1].substring(d.length))}o=this.diff_text2(s.diffs),o=o.substring(o.length-this.Patch_Margin);var u=this.diff_text1(n.diffs).substring(0,this.Patch_Margin);u!==""&&(s.length1+=u.length,s.length2+=u.length,s.diffs.length!==0&&s.diffs[s.diffs.length-1][0]===Vr?s.diffs[s.diffs.length-1][1]+=u:s.diffs.push(new rt.Diff(Vr,u))),l||e.splice(++r,0,s)}}};rt.prototype.patch_toText=function(e){for(var t=[],r=0;r5&&n==="xml")return qa("InvalidXml","XML declaration allowed only at the start of the document.",ml(e,t));if(e[t]=="?"&&e[t+1]==">"){t++;break}else continue}return t};var eHe=function eHe(e,t){if(e.length>t+5&&e[t+1]==="-"&&e[t+2]==="-"){for(t+=3;t"){t+=2;break}}else if(e.length>t+8&&e[t+1]==="D"&&e[t+2]==="O"&&e[t+3]==="C"&&e[t+4]==="T"&&e[t+5]==="Y"&&e[t+6]==="P"&&e[t+7]==="E"){var r=1;for(t+=8;t"&&(r--,r===0))break}else if(e.length>t+9&&e[t+1]==="["&&e[t+2]==="C"&&e[t+3]==="D"&&e[t+4]==="A"&&e[t+5]==="T"&&e[t+6]==="A"&&e[t+7]==="["){for(t+=8;t"){t+=2;break}}return t};var qkr=function qkr(e,t){var r="",n="",i=!1;for(;t"&&n===""){i=!0;break}r+=e[t]}return n!==""?!1:{value:r,index:t,tagClosed:i}};var tHe=function tHe(e,t){var r=Kre.getAllMatches(e,Lkr),n={};for(var i=0;i"&&e[a]!==" "&&e[a]!==" "&&e[a]!=="\n"&&e[a]!=="\r";a++)l+=e[a];if(l=l.trim(),l[l.length-1]==="/"&&(l=l.substring(0,l.length-1),a--),!Ukr(l)){var u=void 0;return l.trim().length===0?u="Invalid space after '<'.":u="Tag '"+l+"' is an invalid name.",qa("InvalidTag",u,ml(e,a))}var c=qkr(e,a);if(c===!1)return qa("InvalidAttr","Attributes for '"+l+"' have open quote.",ml(e,a));var d=c.value;if(a=c.index,d[d.length-1]==="/"){var u2=a-d.length;d=d.substring(0,d.length-1);var p=tHe(d,t);if(p===!0)n=!0;else return qa(p.err.code,p.err.msg,ml(e,u2+p.err.line))}else if(s)if(c.tagClosed){if(d.trim().length>0)return qa("InvalidTag","Closing tag '"+l+"' can't have attributes or invalid starting.",ml(e,o));if(r.length===0)return qa("InvalidTag","Closing tag '"+l+"' has not been opened.",ml(e,o));{var u3=r.pop();if(l!==u3.tagName){var p2=ml(e,u3.tagStartPos);return qa("InvalidTag","Expected closing tag '"+u3.tagName+"' (opened in line "+p2.line+", col "+p2.col+") instead of closing tag '"+l+"'.",ml(e,o))}r.length==0&&(i=!0)}}else return qa("InvalidTag","Closing tag '"+l+"' doesn't have proper closing.",ml(e,a));else{var u9=tHe(d,t);if(u9!==!0)return qa(u9.err.code,u9.err.msg,ml(e,a-d.length+u9.err.line));if(i===!0)return qa("InvalidXml","Multiple possible root nodes found.",ml(e,a));t.unpairedTags.indexOf(l)!==-1||r.push({tagName:l,tagStartPos:o}),n=!0}for(a++;a0)return qa("InvalidXml","Invalid '"+JSON.stringify(r.map(function(a){return a.tagName}),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1})}else return qa("InvalidXml","Start tag expected.",1);return!0};var Nkr='"',Dkr="'";var Lkr=new RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?","g")});var iHe=P(function(Jre){var nHe={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function tagValueProcessor(e,t){return t},attributeValueProcessor:function attributeValueProcessor(e,t){return t},stopNodes:[],alwaysCreateTextNode:!1,isArray:function(){return!1},commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function updateTag(e,t,r){return e}},Bkr=function Bkr(e){return Object.assign({},nHe,e)};Jre.buildOptions=Bkr;Jre.defaultOptions=nHe});var oHe=P(function(pVn,aHe){"use strict";var Yre=/*#__PURE__*/function(){function Yre(t){_class_call_check(this,Yre);this.tagname=t,this.child=[],this[":@"]={}}_create_class(Yre,[{key:"add",value:function add(t,r){t==="__proto__"&&(t="#__proto__"),this.child.push(_define_property({},t,r))}},{key:"addChild",value:function addChild(t){var _obj;t.tagname==="__proto__"&&(t.tagname="#__proto__"),t[":@"]&&Object.keys(t[":@"]).length>0?this.child.push((_obj={},_define_property(_obj,t.tagname,t.child),_define_property(_obj,":@",t[":@"]),_obj)):this.child.push(_define_property({},t.tagname,t.child))}}]);return Yre}();aHe.exports=Yre});var lHe=P(function(fVn,sHe){var Vkr=function Vkr(e,t){var r={};if(e[t+3]==="O"&&e[t+4]==="C"&&e[t+5]==="T"&&e[t+6]==="Y"&&e[t+7]==="P"&&e[t+8]==="E"){t=t+9;var n=1,i=!1,a=!1,o="";for(;t"){if(a?e[t-1]==="-"&&e[t-2]==="-"&&(a=!1,n--):n--,n===0)break}else e[t]==="["?i=!0:o+=e[t];if(n!==0)throw new Error("Unclosed DOCTYPE")}else throw new Error("Invalid Tag instead of DOCTYPE");return{entities:r,i:t}};var Gkr=function Gkr(e,t){var r="";for(;t1&&arguments[1]!==void 0?arguments[1]:{};if(t=Object.assign({},tEr,t),!e||typeof e!="string")return e;var r=e.trim();if(t.skipLike!==void 0&&t.skipLike.test(r))return e;if(e==="0")return 0;if(t.hex&&Xkr.test(r))return iEr(r,16);if(r.search(/[eE]/)!==-1){var n=r.match(/^([-\+])?(0*)([0-9]*(\.[0-9]*)?[eE][-\+]?[0-9]+)$/);if(n){if(t.leadingZeros)r=(n[1]||"")+n[3];else if(!(n[2]==="0"&&n[3][0]==="."))return e;return t.eNotation?Number(r):e}else return e}else{var n3=eEr.exec(r);if(n3){var i=n3[1],a=n3[2],o=nEr(n3[3]);if(!t.leadingZeros&&a.length>0&&i&&r[2]!==".")return e;if(!t.leadingZeros&&a.length>0&&!i&&r[1]!==".")return e;if(t.leadingZeros&&a===e)return 0;{var s=Number(r),l=""+s;return l.search(/[eE]/)!==-1?t.eNotation?s:e:r.indexOf(".")!==-1?l==="0"&&o===""||l===o||i&&l==="-"+o?s:e:a?o===l||i+o===l?s:e:r===l||r===i+l?s:e}}else return e}};var nEr=function nEr(e){return e&&e.indexOf(".")!==-1&&(e=e.replace(/0+$/,""),e==="."?e="0":e[0]==="."?e="0"+e:e[e.length-1]==="."&&(e=e.substr(0,e.length-1))),e};var iEr=function iEr(e,t){if(parseInt)return parseInt(e,t);if(Number.parseInt)return Number.parseInt(e,t);if(window&&window.parseInt)return window.parseInt(e,t);throw new Error("parseInt, Number.parseInt, window.parseInt are not supported")};var Xkr=/^[-+]?0x[a-fA-F0-9]+$/,eEr=/^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/,tEr={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};uHe.exports=rEr});var Xre=P(function(hVn,dHe){var aEr=function aEr(e){return typeof e=="function"?e:Array.isArray(e)?function(t){var _iteratorNormalCompletion=true,_didIteratorError=false,_iteratorError=undefined;try{for(var _iterator=e[Symbol.iterator](),_step;!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=true){var r=_step.value;if(typeof r=="string"&&t===r||_instanceof(r,RegExp)&&r.test(t))return!0}}catch(err){_didIteratorError=true;_iteratorError=err}finally{try{if(!_iteratorNormalCompletion&&_iterator.return!=null){_iterator.return()}}finally{if(_didIteratorError){throw _iteratorError}}}}:function(){return!1}};dHe.exports=aEr});var mHe=P(function(gVn,fHe){"use strict";var uEr=function uEr(e){var t=Object.keys(e);for(var r=0;r0)){o||(e=this.replaceEntitiesValue(e));var s=this.options.tagValueProcessor(t,e,r,i,a);return s==null?e:(typeof s==="undefined"?"undefined":_type_of(s))!=(typeof e==="undefined"?"undefined":_type_of(e))||s!==e?s:this.options.trimValues?rne(e,this.options.parseTagValue,this.options.numberParseOptions):e.trim()===e?rne(e,this.options.parseTagValue,this.options.numberParseOptions):e}};var dEr=function dEr(e){if(this.options.removeNSPrefix){var t=e.split(":"),r=e.charAt(0)==="/"?"/":"";if(t[0]==="xmlns")return"";t.length===2&&(e=r+t[1])}return e};var fEr=function fEr(e,t,r){if(this.options.ignoreAttributes!==!0&&typeof e=="string"){var n=pHe.getAllMatches(e,pEr),i=n.length,a={};for(var o=0;o2&&arguments[2]!==void 0?arguments[2]:">";var n,i="";for(var a=t;a3&&arguments[3]!==void 0?arguments[3]:">";var i=yEr(e,t+1,n);if(!i)return;var a=i.data,o=i.index,s=a.search(/\s/),l=a,c=!0;s!==-1&&(l=a.substring(0,s),a=a.substring(s+1).trimStart());var d=l;if(r){var u=l.indexOf(":");u!==-1&&(l=l.substr(u+1),c=l!==i.data.substr(u+1))}return{tagName:l,tagExp:a,closeIndex:o,attrExpPresent:c,rawTagName:d}};var _Er=function _Er(e,t,r){var n=r,i=1;for(;r",r,"".concat(t," is not closed"));if(e.substring(r+2,a).trim()===t&&(i--,i===0))return{tagContent:e.substring(n,r),i:a};r=a}else if(e[r+1]==="?")r=xv(e,"?>",r+1,"StopNode is not closed.");else if(e.substr(r+1,3)==="!--")r=xv(e,"-->",r+3,"StopNode is not closed.");else if(e.substr(r+1,2)==="![")r=xv(e,"]]>",r,"StopNode is not closed.")-2;else{var a2=tne(e,r,">");a2&&((a2&&a2.tagName)===t&&a2.tagExp[a2.tagExp.length-1]!=="/"&&i++,r=a2.closeIndex)}};var rne=function rne(e,t,r){if(t&&typeof e=="string"){var n=e.trim();return n==="true"?!0:n==="false"?!1:sEr(e,r)}else return pHe.isExist(e)?e:""};var pHe=LN(),hI=oHe(),oEr=lHe(),sEr=cHe(),lEr=Xre(),ene=function ene(t){_class_call_check(this,ene);this.options=t,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"\xa2"},pound:{regex:/&(pound|#163);/g,val:"\xa3"},yen:{regex:/&(yen|#165);/g,val:"\xa5"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"\xa9"},reg:{regex:/&(reg|#174);/g,val:"\xae"},inr:{regex:/&(inr|#8377);/g,val:"₹"},num_dec:{regex:/&#([0-9]{1,7});/g,val:function(r,n){return String.fromCharCode(Number.parseInt(n,10))}},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:function(r,n){return String.fromCharCode(Number.parseInt(n,16))}}},this.addExternalEntities=uEr,this.parseXml=mEr,this.parseTextData=cEr,this.resolveNameSpace=dEr,this.buildAttributesMap=fEr,this.isItStopNode=vEr,this.replaceEntitiesValue=gEr,this.readStopNodeData=_Er,this.saveTextToParentTag=xEr,this.addChild=hEr,this.ignoreAttributesFn=lEr(this.options.ignoreAttributes)};var pEr=new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?","gm");var mEr=function mEr(e){e=e.replace(/\r\n?/g,"\n");var t=new hI("!xml"),r=t,n="",i="";for(var a=0;a",a,"Closing Tag is not closed."),l=e.substring(a+2,s).trim();if(this.options.removeNSPrefix){var u=l.indexOf(":");u!==-1&&(l=l.substr(u+1))}this.options.transformTagName&&(l=this.options.transformTagName(l)),r&&(n=this.saveTextToParentTag(n,r,i));var c=i.substring(i.lastIndexOf(".")+1);if(l&&this.options.unpairedTags.indexOf(l)!==-1)throw new Error("Unpaired tag can not be used as closing tag: "));var d=0;c&&this.options.unpairedTags.indexOf(c)!==-1?(d=i.lastIndexOf(".",i.lastIndexOf(".")-1),this.tagsNodeStack.pop()):d=i.lastIndexOf("."),i=i.substring(0,d),r=this.tagsNodeStack.pop(),n="",a=s}else if(e[a+1]==="?"){var s2=tne(e,a,!1,"?>");if(!s2)throw new Error("Pi Tag is not closed.");if(n=this.saveTextToParentTag(n,r,i),!(this.options.ignoreDeclaration&&s2.tagName==="?xml"||this.options.ignorePiTags)){var l2=new hI(s2.tagName);l2.add(this.options.textNodeName,""),s2.tagName!==s2.tagExp&&s2.attrExpPresent&&(l2[":@"]=this.buildAttributesMap(s2.tagExp,i,s2.tagName)),this.addChild(r,l2,i)}a=s2.closeIndex+1}else if(e.substr(a+1,3)==="!--"){var s9=xv(e,"-->",a+4,"Comment is not closed.");if(this.options.commentPropName){var l9=e.substring(a+4,s9-2);n=this.saveTextToParentTag(n,r,i),r.add(this.options.commentPropName,[_define_property({},this.options.textNodeName,l9)])}a=s9}else if(e.substr(a+1,2)==="!D"){var s10=oEr(e,a);this.docTypeEntities=s10.entities,a=s10.i}else if(e.substr(a+1,2)==="!["){var s11=xv(e,"]]>",a,"CDATA is not closed.")-2,l10=e.substring(a+9,s11);n=this.saveTextToParentTag(n,r,i);var c2=this.parseTextData(l10,r.tagname,i,!0,!1,!0,!0);c2==null&&(c2=""),this.options.cdataPropName?r.add(this.options.cdataPropName,[_define_property({},this.options.textNodeName,l10)]):r.add(this.options.textNodeName,c2),a=s11+2}else{var s12=tne(e,a,this.options.removeNSPrefix),l11=s12.tagName,c3=s12.rawTagName,d2=s12.tagExp,u2=s12.attrExpPresent,p=s12.closeIndex;this.options.transformTagName&&(l11=this.options.transformTagName(l11)),r&&n&&r.tagname!=="!xml"&&(n=this.saveTextToParentTag(n,r,i,!1));var m=r;if(m&&this.options.unpairedTags.indexOf(m.tagname)!==-1&&(r=this.tagsNodeStack.pop(),i=i.substring(0,i.lastIndexOf("."))),l11!==t.tagname&&(i+=i?"."+l11:l11),this.isItStopNode(this.options.stopNodes,i,l11)){var h="";if(d2.length>0&&d2.lastIndexOf("/")===d2.length-1)l11[l11.length-1]==="/"?(l11=l11.substr(0,l11.length-1),i=i.substr(0,i.length-1),d2=l11):d2=d2.substr(0,d2.length-1),a=s12.closeIndex;else if(this.options.unpairedTags.indexOf(l11)!==-1)a=s12.closeIndex;else{var x=this.readStopNodeData(e,c3,p+1);if(!x)throw new Error("Unexpected end of ".concat(c3));a=x.i,h=x.tagContent}var g=new hI(l11);l11!==d2&&u2&&(g[":@"]=this.buildAttributesMap(d2,i,l11)),h&&(h=this.parseTextData(h,l11,i,!0,u2,!0,!0)),i=i.substr(0,i.lastIndexOf(".")),g.add(this.options.textNodeName,h),this.addChild(r,g,i)}else{if(d2.length>0&&d2.lastIndexOf("/")===d2.length-1){l11[l11.length-1]==="/"?(l11=l11.substr(0,l11.length-1),i=i.substr(0,i.length-1),d2=l11):d2=d2.substr(0,d2.length-1),this.options.transformTagName&&(l11=this.options.transformTagName(l11));var h2=new hI(l11);l11!==d2&&u2&&(h2[":@"]=this.buildAttributesMap(d2,i,l11)),this.addChild(r,h2,i),i=i.substr(0,i.lastIndexOf("."))}else{var h3=new hI(l11);this.tagsNodeStack.push(r),l11!==d2&&u2&&(h3[":@"]=this.buildAttributesMap(d2,i,l11)),this.addChild(r,h3,i),r=h3}n="",a=p}}else n+=e[a];return t.child};var gEr=function gEr(e){if(this.options.processEntities){for(var t in this.docTypeEntities){var r=this.docTypeEntities[t];e=e.replace(r.regx,r.val)}for(var t1 in this.lastEntities){var r2=this.lastEntities[t1];e=e.replace(r2.regex,r2.val)}if(this.options.htmlEntities)for(var t2 in this.htmlEntities){var r3=this.htmlEntities[t2];e=e.replace(r3.regex,r3.val)}e=e.replace(this.ampEntity.regex,this.ampEntity.val)}return e};fHe.exports=ene});var xHe=P(function(gHe){"use strict";var bEr=function bEr(e,t){return hHe(e,t)};var wEr=function wEr(e){var t=Object.keys(e);for(var r=0;r0&&(i[t.textNodeName]=n):n!==void 0&&(i[t.textNodeName]=n),i}gHe.prettify=bEr});var yHe=P(function(vVn,vHe){var _iHe=iHe(),EEr=_iHe.buildOptions,TEr=mHe(),_xHe=xHe(),IEr=_xHe.prettify,CEr=Qre(),nne=/*#__PURE__*/function(){function nne(t){_class_call_check(this,nne);this.externalEntities={},this.options=EEr(t)}_create_class(nne,[{key:"parse",value:function parse(t,r){if(typeof t!="string")if(t.toString)t=t.toString();else throw new Error("XML data is accepted in String or Bytes[] form.");if(r){r===!0&&(r={});var a=CEr.validate(t,r);if(a!==!0)throw Error("".concat(a.err.msg,":").concat(a.err.line,":").concat(a.err.col))}var n=new TEr(this.options);n.addExternalEntities(this.externalEntities);var i=n.parseXml(t);return this.options.preserveOrder||i===void 0?i:IEr(i,this.options)}},{key:"addEntity",value:function addEntity(t,r){if(r.indexOf("&")!==-1)throw new Error("Entity value can't have '&'");if(t.indexOf("&")!==-1||t.indexOf(";")!==-1)throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for ' '");if(r==="&")throw new Error("An entity with value '&' is not permitted");this.externalEntities[t]=r}}]);return nne}();vHe.exports=nne});var kHe=P(function(yVn,SHe){var PEr=function PEr(e,t){var r="";return t.format&&t.indentBy.length>0&&(r=AEr),bHe(e,t,"",r)};var OEr=function OEr(e){var t=Object.keys(e);for(var r=0;r0&&t.processEntities)for(var r=0;r"),a=!1;continue}else if(l===t.commentPropName){i+=n+""),a=!0;continue}else if(l[0]==="?"){var h2=_He(s[":@"],t),g=l==="?xml"?"":n,x=s[l][0][t.textNodeName];x=x.length!==0?" "+x:"",i+=g+"<".concat(l).concat(x).concat(h2,"?>"),a=!0;continue}var d=n;d!==""&&(d+=t.indentBy);var u=_He(s[":@"],t),p=n+"<".concat(l).concat(u),m=bHe(s[l],t,c,d);t.unpairedTags.indexOf(l)!==-1?t.suppressUnpairedNode?i+=p+">":i+=p+"/>":(!m||m.length===0)&&t.suppressEmptyNode?i+=p+"/>":m&&m.endsWith(">")?i+=p+">".concat(m).concat(n,""):(i+=p+">",m&&n!==""&&(m.includes("/>")||m.includes("")),a=!0}return i}SHe.exports=PEr});var THe=P(function(_Vn,EHe){"use strict";var Lg=function Lg(e){this.options=Object.assign({},NEr,e),this.options.ignoreAttributes===!0||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.ignoreAttributesFn=$Er(this.options.ignoreAttributes),this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=LEr),this.processTextOrObjNode=DEr,this.options.format?(this.indentate=qEr,this.tagEndChar=">\n",this.newLine="\n"):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")};var DEr=function DEr(e,t,r,n){var i=this.j2x(e,r+1,n.concat(t));return e[this.options.textNodeName]!==void 0&&Object.keys(e).length===1?this.buildTextValNode(e[this.options.textNodeName],t,i.attrStr,r):this.buildObjectNode(i.val,t,i.attrStr,r)};var qEr=function qEr(e){return this.options.indentBy.repeat(e)};var LEr=function LEr(e){return e.startsWith(this.options.attributeNamePrefix)&&e!==this.options.textNodeName?e.substr(this.attrPrefixLen):!1};var MEr=kHe(),$Er=Xre(),NEr={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function tagValueProcessor(e,t){return t},attributeValueProcessor:function attributeValueProcessor(e,t){return t},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&"},{regex:new RegExp(">","g"),val:">"},{regex:new RegExp("<","g"),val:"<"},{regex:new RegExp("'","g"),val:"'"},{regex:new RegExp('"',"g"),val:"""}],processEntities:!0,stopNodes:[],oneListGroup:!1};Lg.prototype.build=function(e){return this.options.preserveOrder?MEr(e,this.options):(Array.isArray(e)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(e=_define_property({},this.options.arrayNodeName,e)),this.j2x(e,0,[]).val)};Lg.prototype.j2x=function(e,t,r){var n="",i="",a=r.join(".");for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o))if(typeof e[o]=="undefined")this.isAttribute(o)&&(i+="");else if(e[o]===null)this.isAttribute(o)||o===this.options.cdataPropName?i+="":o[0]==="?"?i+=this.indentate(t)+"<"+o+"?"+this.tagEndChar:i+=this.indentate(t)+"<"+o+"/"+this.tagEndChar;else if(_instanceof(e[o],Date))i+=this.buildTextValNode(e[o],o,"",t);else if(_type_of(e[o])!="object"){var s=this.isAttribute(o);if(s&&!this.ignoreAttributesFn(s,a))n+=this.buildAttrPairStr(s,""+e[o]);else if(!s)if(o===this.options.textNodeName){var l=this.options.tagValueProcessor(o,""+e[o]);i+=this.replaceEntitiesValue(l)}else i+=this.buildTextValNode(e[o],o,"",t)}else if(Array.isArray(e[o])){var s2=e[o].length,l2="",c="";for(var d=0;d"+e+i:this.options.commentPropName!==!1&&t===this.options.commentPropName&&a.length===0?this.indentate(n)+"")+this.newLine:this.indentate(n)+"<"+t+r+a+this.tagEndChar+e+this.indentate(n)+i}};Lg.prototype.closeTag=function(e){var t="";return this.options.unpairedTags.indexOf(e)!==-1?this.options.suppressUnpairedNode||(t="/"):this.options.suppressEmptyNode?t="/":t=">")+this.newLine;if(this.options.commentPropName!==!1&&t===this.options.commentPropName)return this.indentate(n)+"")+this.newLine;if(t[0]==="?")return this.indentate(n)+"<"+t+r+"?"+this.tagEndChar;{var i=this.options.tagValueProcessor(t,e);return i=this.replaceEntitiesValue(i),i===""?this.indentate(n)+"<"+t+r+this.closeTag(t)+this.tagEndChar:this.indentate(n)+"<"+t+r+">"+i+"0&&this.options.processEntities)for(var t=0;t2&&arguments[2]!==void 0?arguments[2]:{};var n,i,a;for(n in t)a=t[n],r[n]=(i=e[n])!=null?i:a;return r};sne.overwrite=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};var n,i;for(n in e)i=e[n],t[n]!==void 0&&(r[n]=i);return r}});var lne=P(function(OVn,$He){"use strict";var MHe;MHe=/*#__PURE__*/function(){function MHe(t,r){_class_call_check(this,MHe);this.incr=t,this.decr=r,this._first=null,this._last=null,this.length=0}_create_class(MHe,[{key:"push",value:function push(t){var r;this.length++,typeof this.incr=="function"&&this.incr(),r={value:t,prev:this._last,next:null},this._last!=null?(this._last.next=r,this._last=r):this._first=this._last=r}},{key:"shift",value:function shift(){var t;if(this._first!=null)return this.length--,typeof this.decr=="function"&&this.decr(),t=this._first.value,(this._first=this._first.next)!=null?this._first.prev=null:this._last=null,t}},{key:"first",value:function first(){if(this._first!=null)return this._first.value}},{key:"getArray",value:function getArray(){var t,r,n;for(t=this._first,n=[];t!=null;)n.push((r=t,t=t.next,r.value));return n}},{key:"forEachShift",value:function forEachShift(t){var r;for(r=this.shift();r!=null;)t(r),r=this.shift()}},{key:"debug",value:function debug(){var t,r,n,i,a;for(t=this._first,a=[];t!=null;)a.push((r=t,t=t.next,{value:r.value,prev:(n=r.prev)!=null?n.value:void 0,next:(i=r.next)!=null?i.value:void 0}));return a}}]);return MHe}();$He.exports=MHe});var yv=P(function(MVn,LHe){"use strict";var NHe=function NHe(e,t,r,n,i,a,o){try{var s=e[a](o),l=s.value}catch(c){r(c);return}s.done?t(l):Promise.resolve(l).then(n,i)};var DHe=function DHe(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var a=e.apply(t,r);function o(l){NHe(a,n,i,o,s,"next",l)}function s(l){NHe(a,n,i,o,s,"throw",l)}o(void 0)})}};var qHe;qHe=/*#__PURE__*/function(){function qHe(t){var _this=this;var _this1=this;_class_call_check(this,qHe);if(this.instance=t,this._events={},this.instance.on!=null||this.instance.once!=null||this.instance.removeAllListeners!=null)throw new Error("An Emitter already exists for this object");this.instance.on=function(r,n){return _this._addListener(r,"many",n)},this.instance.once=function(r,n){return _this._addListener(r,"once",n)},this.instance.removeAllListeners=function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;return r!=null?delete _this1._events[r]:_this1._events={}}}_create_class(qHe,[{key:"_addListener",value:function _addListener(t,r,n){var i;return(i=this._events)[t]==null&&(i[t]=[]),this._events[t].push({cb:n,status:r}),this.instance}},{key:"listenerCount",value:function listenerCount(t){return this._events[t]!=null?this._events[t].length:0}},{key:"trigger",value:function trigger(t){for(var _len=arguments.length,r=new Array(_len>1?_len-1:0),_key=1;_key<_len;_key++){r[_key-1]=arguments[_key]}var n=this;return DHe(function(){var i,a,_tmp,o;return _ts_generator(this,function(_state){switch(_state.label){case 0:_state.trys.push([0,4,,5]);t!=="debug"&&n.trigger("debug","Event triggered: ".concat(t),r);if(!(n._events[t]==null))return[3,1];_tmp=void 0;return[3,3];case 1:n._events[t]=n._events[t].filter(function(o){return o.status!=="none"}),a=n._events[t].map(function(){var _$o=DHe(function(s){var l,c,_s1,_tmp,d;return _ts_generator(this,function(_state){switch(_state.label){case 0:if(!(s.status!=="none"))return[3,6];s.status==="once"&&(s.status="none");_state.label=1;case 1:_state.trys.push([1,5,,6]);c=typeof s.cb=="function"?(_s1=s).cb.apply(_s1,_to_consumable_array(r)):void 0;if(!(typeof(c!=null?c.then:void 0)=="function"))return[3,3];return[4,c];case 2:_tmp=_state.sent();return[3,4];case 3:_tmp=c;_state.label=4;case 4:return[2,_tmp];case 5:d=_state.sent();return[2,(l=d,n.trigger("error",l),null)];case 6:return[2]}})});return function(s){return _$o.apply(this,arguments)}}());return[4,Promise.all(a)];case 2:_tmp=_state.sent().find(function(o){return o!=null});_state.label=3;case 3:return[2,_tmp];case 4:o=_state.sent();return[2,(i=o,n.trigger("error",i),null)];case 5:return[2]}})})()}}]);return qHe}();LHe.exports=qHe});var BHe=P(function(NVn,UHe){"use strict";var FHe,zHe,jHe;FHe=lne();zHe=yv();jHe=/*#__PURE__*/function(){function jHe(t){_class_call_check(this,jHe);var r;this.Events=new zHe(this),this._length=0,this._lists=(function(){var _this=this;var n,i,a;for(a=[],r=n=1,i=t;1<=i?n<=i:n>=i;r=1<=i?++n:--n)a.push(new FHe(function(){return _this.incr()},function(){return _this.decr()}));return a}).call(this)}_create_class(jHe,[{key:"incr",value:function incr(){if(this._length++===0)return this.Events.trigger("leftzero")}},{key:"decr",value:function decr(){if(--this._length===0)return this.Events.trigger("zero")}},{key:"push",value:function push(t){return this._lists[t.options.priority].push(t)}},{key:"queued",value:function queued(t){return t!=null?this._lists[t].length:this._length}},{key:"shiftAll",value:function shiftAll(t){return this._lists.forEach(function(r){return r.forEachShift(t)})}},{key:"getFirst",value:function getFirst(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this._lists;var r,n,i;for(r=0,n=t.length;r0)return i;return[]}},{key:"shiftLastFrom",value:function shiftLastFrom(t){return this.getFirst(this._lists.slice(t).reverse()).shift()}}]);return jHe}();UHe.exports=jHe});var i4=P(function(qVn,VHe){"use strict";var WHe;WHe=/*#__PURE__*/function(Error1){_inherits(WHe,Error1);function WHe(){_class_call_check(this,WHe);return _call_super(this,WHe,arguments)}return WHe}(_wrap_native_super(Error));VHe.exports=WHe});var YHe=P(function(FVn,JHe){"use strict";var GHe=function GHe(e,t,r,n,i,a,o){try{var s=e[a](o),l=s.value}catch(c){r(c);return}s.done?t(l):Promise.resolve(l).then(n,i)};var HHe=function HHe(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var a=e.apply(t,r);function o(l){GHe(a,n,i,o,s,"next",l)}function s(l){GHe(a,n,i,o,s,"throw",l)}o(void 0)})}};var jN,ZHe,KHe,une,QHe;une=10;ZHe=5;QHe=oh();jN=i4();KHe=/*#__PURE__*/function(){function KHe(t,r,n,i,a,o,s,l){var _this=this;_class_call_check(this,KHe);this.task=t,this.args=r,this.rejectOnDrop=a,this.Events=o,this._states=s,this.Promise=l,this.options=QHe.load(n,i),this.options.priority=this._sanitizePriority(this.options.priority),this.options.id===i.id&&(this.options.id="".concat(this.options.id,"-").concat(this._randomIndex())),this.promise=new this.Promise(function(c,d){_this._resolve=c,_this._reject=d}),this.retryCount=0}_create_class(KHe,[{key:"_sanitizePriority",value:function _sanitizePriority(t){var r;return r=~~t!==t?ZHe:t,r<0?0:r>une-1?une-1:r}},{key:"_randomIndex",value:function _randomIndex(){return Math.random().toString(36).slice(2)}},{key:"doDrop",value:function doDrop(){var _ref=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=_ref.error,tmp=_ref.message,r=tmp===void 0?"This job has been dropped by Bottleneck":tmp;return this._states.remove(this.options.id)?(this.rejectOnDrop&&this._reject(t!=null?t:new jN(r)),this.Events.trigger("dropped",{args:this.args,options:this.options,task:this.task,promise:this.promise}),!0):!1}},{key:"_assertStatus",value:function _assertStatus(t){var r;if(r=this._states.jobStatus(this.options.id),!(r===t||t==="DONE"&&r===null))throw new jN("Invalid job status ".concat(r,", expected ").concat(t,". Please open an issue at https://github.com/SGrondin/bottleneck/issues"))}},{key:"doReceive",value:function doReceive(){return this._states.start(this.options.id),this.Events.trigger("received",{args:this.args,options:this.options})}},{key:"doQueue",value:function doQueue(t,r){return this._assertStatus("RECEIVED"),this._states.next(this.options.id),this.Events.trigger("queued",{args:this.args,options:this.options,reachedHWM:t,blocked:r})}},{key:"doRun",value:function doRun(){return this.retryCount===0?(this._assertStatus("QUEUED"),this._states.next(this.options.id)):this._assertStatus("EXECUTING"),this.Events.trigger("scheduled",{args:this.args,options:this.options})}},{key:"doExecute",value:function doExecute(t,r,n,i){var a=this;return HHe(function(){var o,s,l,_t,_a1,c;return _ts_generator(this,function(_state){switch(_state.label){case 0:a.retryCount===0?(a._assertStatus("RUNNING"),a._states.next(a.options.id)):a._assertStatus("EXECUTING"),s={args:a.args,options:a.options,retryCount:a.retryCount},a.Events.trigger("executing",s);_state.label=1;case 1:_state.trys.push([1,5,,6]);return[4,t!=null?(_t=t).schedule.apply(_t,[a.options,a.task].concat(_to_consumable_array(a.args))):(_a1=a).task.apply(_a1,_to_consumable_array(a.args))];case 2:if(!(l=_state.sent(),r()))return[3,4];a.doDone(s);return[4,i(a.options,s)];case 3:return[2,(_state.sent(),a._assertStatus("DONE"),a._resolve(l))];case 4:return[3,6];case 5:c=_state.sent();return[2,(o=c,a._onFailure(o,s,r,n,i))];case 6:return[2]}})})()}},{key:"doExpire",value:function doExpire(t,r,n){var i,a;return this._states.jobStatus(this.options.id==="RUNNING")&&this._states.next(this.options.id),this._assertStatus("EXECUTING"),a={args:this.args,options:this.options,retryCount:this.retryCount},i=new jN("This job timed out after ".concat(this.options.expiration," ms.")),this._onFailure(i,a,t,r,n)}},{key:"_onFailure",value:function _onFailure(t,r,n,i,a){var o=this;return HHe(function(){var s,l,_tmp;return _ts_generator(this,function(_state){switch(_state.label){case 0:if(!n())return[3,5];return[4,o.Events.trigger("failed",t,r)];case 1:s=_state.sent();if(!(s!=null))return[3,2];_tmp=(l=~~s,o.Events.trigger("retry","Retrying ".concat(o.options.id," after ").concat(l," ms"),r),o.retryCount++,i(l));return[3,4];case 2:o.doDone(r);return[4,a(o.options,r)];case 3:_tmp=(_state.sent(),o._assertStatus("DONE"),o._reject(t));_state.label=4;case 4:return[2,_tmp];case 5:return[2]}})})()}},{key:"doDone",value:function doDone(t){return this._assertStatus("EXECUTING"),this._states.next(this.options.id),this.Events.trigger("done",t)}}]);return KHe}();JHe.exports=KHe});var nZe=P(function(jVn,rZe){"use strict";var XHe=function XHe(e,t,r,n,i,a,o){try{var s=e[a](o),l=s.value}catch(c){r(c);return}s.done?t(l):Promise.resolve(l).then(n,i)};var Hu=function Hu(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var a=e.apply(t,r);function o(l){XHe(a,n,i,o,s,"next",l)}function s(l){XHe(a,n,i,o,s,"throw",l)}o(void 0)})}};var eZe,tZe,cne;cne=oh();eZe=i4();tZe=/*#__PURE__*/function(){function tZe(t,r,n){_class_call_check(this,tZe);this.instance=t,this.storeOptions=r,this.clientId=this.instance._randomIndex(),cne.load(n,n,this),this._nextRequest=this._lastReservoirRefresh=this._lastReservoirIncrease=Date.now(),this._running=0,this._done=0,this._unblockTime=0,this.ready=this.Promise.resolve(),this.clients={},this._startHeartbeat()}_create_class(tZe,[{key:"_startHeartbeat",value:function _startHeartbeat(){var _this=this;var t;return this.heartbeat==null&&(this.storeOptions.reservoirRefreshInterval!=null&&this.storeOptions.reservoirRefreshAmount!=null||this.storeOptions.reservoirIncreaseInterval!=null&&this.storeOptions.reservoirIncreaseAmount!=null)?typeof(t=this.heartbeat=setInterval(function(){var r,n,i,a,o;if(a=Date.now(),_this.storeOptions.reservoirRefreshInterval!=null&&a>=_this._lastReservoirRefresh+_this.storeOptions.reservoirRefreshInterval&&(_this._lastReservoirRefresh=a,_this.storeOptions.reservoir=_this.storeOptions.reservoirRefreshAmount,_this.instance._drainAll(_this.computeCapacity())),_this.storeOptions.reservoirIncreaseInterval!=null&&a>=_this._lastReservoirIncrease+_this.storeOptions.reservoirIncreaseInterval){var s=_this.storeOptions;if(r=s.reservoirIncreaseAmount,i=s.reservoirIncreaseMaximum,o=s.reservoir,_this._lastReservoirIncrease=a,n=i!=null?Math.min(r,i-o):r,n>0)return _this.storeOptions.reservoir+=n,_this.instance._drainAll(_this.computeCapacity())}},this.heartbeatInterval)).unref=="function"?t.unref():void 0:clearInterval(this.heartbeat)}},{key:"__publish__",value:function __publish__(t){var r=this;return Hu(function(){return _ts_generator(this,function(_state){switch(_state.label){case 0:return[4,r.yieldLoop()];case 1:return[2,(_state.sent(),r.instance.Events.trigger("message",t.toString()))]}})})()}},{key:"__disconnect__",value:function __disconnect__(t){var r=this;return Hu(function(){return _ts_generator(this,function(_state){switch(_state.label){case 0:return[4,r.yieldLoop()];case 1:return[2,(_state.sent(),clearInterval(r.heartbeat),r.Promise.resolve())]}})})()}},{key:"yieldLoop",value:function yieldLoop(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return new this.Promise(function(r,n){return setTimeout(r,t)})}},{key:"computePenalty",value:function computePenalty(){var t;return(t=this.storeOptions.penalty)!=null?t:15*this.storeOptions.minTime||5e3}},{key:"__updateSettings__",value:function __updateSettings__(t){var r=this;return Hu(function(){return _ts_generator(this,function(_state){switch(_state.label){case 0:return[4,r.yieldLoop()];case 1:return[2,(_state.sent(),cne.overwrite(t,t,r.storeOptions),r._startHeartbeat(),r.instance._drainAll(r.computeCapacity()),!0)]}})})()}},{key:"__running__",value:function __running__(){var t=this;return Hu(function(){return _ts_generator(this,function(_state){switch(_state.label){case 0:return[4,t.yieldLoop()];case 1:return[2,(_state.sent(),t._running)]}})})()}},{key:"__queued__",value:function __queued__(){var t=this;return Hu(function(){return _ts_generator(this,function(_state){switch(_state.label){case 0:return[4,t.yieldLoop()];case 1:return[2,(_state.sent(),t.instance.queued())]}})})()}},{key:"__done__",value:function __done__(){var t=this;return Hu(function(){return _ts_generator(this,function(_state){switch(_state.label){case 0:return[4,t.yieldLoop()];case 1:return[2,(_state.sent(),t._done)]}})})()}},{key:"__groupCheck__",value:function __groupCheck__(t){var r=this;return Hu(function(){return _ts_generator(this,function(_state){switch(_state.label){case 0:return[4,r.yieldLoop()];case 1:return[2,(_state.sent(),r._nextRequest+r.timeout=t}},{key:"check",value:function check(t,r){return this.conditionsCheck(t)&&this._nextRequest-r<=0}},{key:"__check__",value:function __check__(t){var r=this;return Hu(function(){var n;return _ts_generator(this,function(_state){switch(_state.label){case 0:return[4,r.yieldLoop()];case 1:return[2,(_state.sent(),n=Date.now(),r.check(t,n))]}})})()}},{key:"__register__",value:function __register__(t,r,n){var i=this;return Hu(function(){var a,o;return _ts_generator(this,function(_state){switch(_state.label){case 0:return[4,i.yieldLoop()];case 1:return[2,(_state.sent(),a=Date.now(),i.conditionsCheck(r)?(i._running+=r,i.storeOptions.reservoir!=null&&(i.storeOptions.reservoir-=r),o=Math.max(i._nextRequest-a,0),i._nextRequest=a+o+i.storeOptions.minTime,{success:!0,wait:o,reservoir:i.storeOptions.reservoir}):{success:!1})]}})})()}},{key:"strategyIsBlock",value:function strategyIsBlock(){return this.storeOptions.strategy===3}},{key:"__submit__",value:function __submit__(t,r){var n=this;return Hu(function(){var i,a,o;return _ts_generator(this,function(_state){switch(_state.label){case 0:return[4,n.yieldLoop()];case 1:if(_state.sent(),n.storeOptions.maxConcurrent!=null&&r>n.storeOptions.maxConcurrent)throw new eZe("Impossible to add a job having a weight of ".concat(r," to a limiter having a maxConcurrent setting of ").concat(n.storeOptions.maxConcurrent));return[2,(a=Date.now(),o=n.storeOptions.highWater!=null&&t===n.storeOptions.highWater&&!n.check(r,a),i=n.strategyIsBlock()&&(o||n.isBlocked(a)),i&&(n._unblockTime=a+n.computePenalty(),n._nextRequest=n._unblockTime+n.storeOptions.minTime,n.instance._dropAllQueued()),{reachedHWM:o,blocked:i,strategy:n.storeOptions.strategy})]}})})()}},{key:"__free__",value:function __free__(t,r){var n=this;return Hu(function(){return _ts_generator(this,function(_state){switch(_state.label){case 0:return[4,n.yieldLoop()];case 1:return[2,(_state.sent(),n._running-=r,n._done+=r,n.instance._drainAll(n.computeCapacity()),{running:n._running})]}})})()}}]);return tZe}();rZe.exports=tZe});var iZe=P(function(UVn,QEr){QEr.exports={"blacklist_client.lua":"local blacklist = ARGV[num_static_argv + 1]\n\nif redis.call('zscore', client_last_seen_key, blacklist) then\n redis.call('zadd', client_last_seen_key, 0, blacklist)\nend\n\n\nreturn {}\n","check.lua":"local weight = tonumber(ARGV[num_static_argv + 1])\n\nlocal capacity = process_tick(now, false)['capacity']\nlocal nextRequest = tonumber(redis.call('hget', settings_key, 'nextRequest'))\n\nreturn conditions_check(capacity, weight) and nextRequest - now <= 0\n","conditions_check.lua":"local conditions_check = function (capacity, weight)\n return capacity == nil or weight <= capacity\nend\n","current_reservoir.lua":"return process_tick(now, false)['reservoir']\n","done.lua":"process_tick(now, false)\n\nreturn tonumber(redis.call('hget', settings_key, 'done'))\n","free.lua":"local index = ARGV[num_static_argv + 1]\n\nredis.call('zadd', job_expirations_key, 0, index)\n\nreturn process_tick(now, false)['running']\n","get_time.lua":"redis.replicate_commands()\n\nlocal get_time = function ()\n local time = redis.call('time')\n\n return tonumber(time[1]..string.sub(time[2], 1, 3))\nend\n","group_check.lua":"return not (redis.call('exists', settings_key) == 1)\n","heartbeat.lua":"process_tick(now, true)\n","increment_reservoir.lua":"local incr = tonumber(ARGV[num_static_argv + 1])\n\nredis.call('hincrby', settings_key, 'reservoir', incr)\n\nlocal reservoir = process_tick(now, true)['reservoir']\n\nlocal groupTimeout = tonumber(redis.call('hget', settings_key, 'groupTimeout'))\nrefresh_expiration(0, 0, groupTimeout)\n\nreturn reservoir\n","init.lua":"local clear = tonumber(ARGV[num_static_argv + 1])\nlocal limiter_version = ARGV[num_static_argv + 2]\nlocal num_local_argv = num_static_argv + 2\n\nif clear == 1 then\n redis.call('del', unpack(KEYS))\nend\n\nif redis.call('exists', settings_key) == 0 then\n -- Create\n local args = {'hmset', settings_key}\n\n for i = num_local_argv + 1, #ARGV do\n table.insert(args, ARGV[i])\n end\n\n redis.call(unpack(args))\n redis.call('hmset', settings_key,\n 'nextRequest', now,\n 'lastReservoirRefresh', now,\n 'lastReservoirIncrease', now,\n 'running', 0,\n 'done', 0,\n 'unblockTime', 0,\n 'capacityPriorityCounter', 0\n )\n\nelse\n -- Apply migrations\n local settings = redis.call('hmget', settings_key,\n 'id',\n 'version'\n )\n local id = settings[1]\n local current_version = settings[2]\n\n if current_version ~= limiter_version then\n local version_digits = {}\n for k, v in string.gmatch(current_version, \"([^.]+)\") do\n table.insert(version_digits, tonumber(k))\n end\n\n -- 2.10.0\n if version_digits[2] < 10 then\n redis.call('hsetnx', settings_key, 'reservoirRefreshInterval', '')\n redis.call('hsetnx', settings_key, 'reservoirRefreshAmount', '')\n redis.call('hsetnx', settings_key, 'lastReservoirRefresh', '')\n redis.call('hsetnx', settings_key, 'done', 0)\n redis.call('hset', settings_key, 'version', '2.10.0')\n end\n\n -- 2.11.1\n if version_digits[2] < 11 or (version_digits[2] == 11 and version_digits[3] < 1) then\n if redis.call('hstrlen', settings_key, 'lastReservoirRefresh') == 0 then\n redis.call('hmset', settings_key,\n 'lastReservoirRefresh', now,\n 'version', '2.11.1'\n )\n end\n end\n\n -- 2.14.0\n if version_digits[2] < 14 then\n local old_running_key = 'b_'..id..'_running'\n local old_executing_key = 'b_'..id..'_executing'\n\n if redis.call('exists', old_running_key) == 1 then\n redis.call('rename', old_running_key, job_weights_key)\n end\n if redis.call('exists', old_executing_key) == 1 then\n redis.call('rename', old_executing_key, job_expirations_key)\n end\n redis.call('hset', settings_key, 'version', '2.14.0')\n end\n\n -- 2.15.2\n if version_digits[2] < 15 or (version_digits[2] == 15 and version_digits[3] < 2) then\n redis.call('hsetnx', settings_key, 'capacityPriorityCounter', 0)\n redis.call('hset', settings_key, 'version', '2.15.2')\n end\n\n -- 2.17.0\n if version_digits[2] < 17 then\n redis.call('hsetnx', settings_key, 'clientTimeout', 10000)\n redis.call('hset', settings_key, 'version', '2.17.0')\n end\n\n -- 2.18.0\n if version_digits[2] < 18 then\n redis.call('hsetnx', settings_key, 'reservoirIncreaseInterval', '')\n redis.call('hsetnx', settings_key, 'reservoirIncreaseAmount', '')\n redis.call('hsetnx', settings_key, 'reservoirIncreaseMaximum', '')\n redis.call('hsetnx', settings_key, 'lastReservoirIncrease', now)\n redis.call('hset', settings_key, 'version', '2.18.0')\n end\n\n end\n\n process_tick(now, false)\nend\n\nlocal groupTimeout = tonumber(redis.call('hget', settings_key, 'groupTimeout'))\nrefresh_expiration(0, 0, groupTimeout)\n\nreturn {}\n","process_tick.lua":"local process_tick = function (now, always_publish)\n\n local compute_capacity = function (maxConcurrent, running, reservoir)\n if maxConcurrent ~= nil and reservoir ~= nil then\n return math.min((maxConcurrent - running), reservoir)\n elseif maxConcurrent ~= nil then\n return maxConcurrent - running\n elseif reservoir ~= nil then\n return reservoir\n else\n return nil\n end\n end\n\n local settings = redis.call('hmget', settings_key,\n 'id',\n 'maxConcurrent',\n 'running',\n 'reservoir',\n 'reservoirRefreshInterval',\n 'reservoirRefreshAmount',\n 'lastReservoirRefresh',\n 'reservoirIncreaseInterval',\n 'reservoirIncreaseAmount',\n 'reservoirIncreaseMaximum',\n 'lastReservoirIncrease',\n 'capacityPriorityCounter',\n 'clientTimeout'\n )\n local id = settings[1]\n local maxConcurrent = tonumber(settings[2])\n local running = tonumber(settings[3])\n local reservoir = tonumber(settings[4])\n local reservoirRefreshInterval = tonumber(settings[5])\n local reservoirRefreshAmount = tonumber(settings[6])\n local lastReservoirRefresh = tonumber(settings[7])\n local reservoirIncreaseInterval = tonumber(settings[8])\n local reservoirIncreaseAmount = tonumber(settings[9])\n local reservoirIncreaseMaximum = tonumber(settings[10])\n local lastReservoirIncrease = tonumber(settings[11])\n local capacityPriorityCounter = tonumber(settings[12])\n local clientTimeout = tonumber(settings[13])\n\n local initial_capacity = compute_capacity(maxConcurrent, running, reservoir)\n\n --\n -- Process 'running' changes\n --\n local expired = redis.call('zrangebyscore', job_expirations_key, '-inf', '('..now)\n\n if #expired > 0 then\n redis.call('zremrangebyscore', job_expirations_key, '-inf', '('..now)\n\n local flush_batch = function (batch, acc)\n local weights = redis.call('hmget', job_weights_key, unpack(batch))\n redis.call('hdel', job_weights_key, unpack(batch))\n local clients = redis.call('hmget', job_clients_key, unpack(batch))\n redis.call('hdel', job_clients_key, unpack(batch))\n\n -- Calculate sum of removed weights\n for i = 1, #weights do\n acc['total'] = acc['total'] + (tonumber(weights[i]) or 0)\n end\n\n -- Calculate sum of removed weights by client\n local client_weights = {}\n for i = 1, #clients do\n local removed = tonumber(weights[i]) or 0\n if removed > 0 then\n acc['client_weights'][clients[i]] = (acc['client_weights'][clients[i]] or 0) + removed\n end\n end\n end\n\n local acc = {\n ['total'] = 0,\n ['client_weights'] = {}\n }\n local batch_size = 1000\n\n -- Compute changes to Zsets and apply changes to Hashes\n for i = 1, #expired, batch_size do\n local batch = {}\n for j = i, math.min(i + batch_size - 1, #expired) do\n table.insert(batch, expired[j])\n end\n\n flush_batch(batch, acc)\n end\n\n -- Apply changes to Zsets\n if acc['total'] > 0 then\n redis.call('hincrby', settings_key, 'done', acc['total'])\n running = tonumber(redis.call('hincrby', settings_key, 'running', -acc['total']))\n end\n\n for client, weight in pairs(acc['client_weights']) do\n redis.call('zincrby', client_running_key, -weight, client)\n end\n end\n\n --\n -- Process 'reservoir' changes\n --\n local reservoirRefreshActive = reservoirRefreshInterval ~= nil and reservoirRefreshAmount ~= nil\n if reservoirRefreshActive and now >= lastReservoirRefresh + reservoirRefreshInterval then\n reservoir = reservoirRefreshAmount\n redis.call('hmset', settings_key,\n 'reservoir', reservoir,\n 'lastReservoirRefresh', now\n )\n end\n\n local reservoirIncreaseActive = reservoirIncreaseInterval ~= nil and reservoirIncreaseAmount ~= nil\n if reservoirIncreaseActive and now >= lastReservoirIncrease + reservoirIncreaseInterval then\n local num_intervals = math.floor((now - lastReservoirIncrease) / reservoirIncreaseInterval)\n local incr = reservoirIncreaseAmount * num_intervals\n if reservoirIncreaseMaximum ~= nil then\n incr = math.min(incr, reservoirIncreaseMaximum - (reservoir or 0))\n end\n if incr > 0 then\n reservoir = (reservoir or 0) + incr\n end\n redis.call('hmset', settings_key,\n 'reservoir', reservoir,\n 'lastReservoirIncrease', lastReservoirIncrease + (num_intervals * reservoirIncreaseInterval)\n )\n end\n\n --\n -- Clear unresponsive clients\n --\n local unresponsive = redis.call('zrangebyscore', client_last_seen_key, '-inf', (now - clientTimeout))\n local unresponsive_lookup = {}\n local terminated_clients = {}\n for i = 1, #unresponsive do\n unresponsive_lookup[unresponsive[i]] = true\n if tonumber(redis.call('zscore', client_running_key, unresponsive[i])) == 0 then\n table.insert(terminated_clients, unresponsive[i])\n end\n end\n if #terminated_clients > 0 then\n redis.call('zrem', client_running_key, unpack(terminated_clients))\n redis.call('hdel', client_num_queued_key, unpack(terminated_clients))\n redis.call('zrem', client_last_registered_key, unpack(terminated_clients))\n redis.call('zrem', client_last_seen_key, unpack(terminated_clients))\n end\n\n --\n -- Broadcast capacity changes\n --\n local final_capacity = compute_capacity(maxConcurrent, running, reservoir)\n\n if always_publish or (initial_capacity ~= nil and final_capacity == nil) then\n -- always_publish or was not unlimited, now unlimited\n redis.call('publish', 'b_'..id, 'capacity:'..(final_capacity or ''))\n\n elseif initial_capacity ~= nil and final_capacity ~= nil and final_capacity > initial_capacity then\n -- capacity was increased\n -- send the capacity message to the limiter having the lowest number of running jobs\n -- the tiebreaker is the limiter having not registered a job in the longest time\n\n local lowest_concurrency_value = nil\n local lowest_concurrency_clients = {}\n local lowest_concurrency_last_registered = {}\n local client_concurrencies = redis.call('zrange', client_running_key, 0, -1, 'withscores')\n\n for i = 1, #client_concurrencies, 2 do\n local client = client_concurrencies[i]\n local concurrency = tonumber(client_concurrencies[i+1])\n\n if (\n lowest_concurrency_value == nil or lowest_concurrency_value == concurrency\n ) and (\n not unresponsive_lookup[client]\n ) and (\n tonumber(redis.call('hget', client_num_queued_key, client)) > 0\n ) then\n lowest_concurrency_value = concurrency\n table.insert(lowest_concurrency_clients, client)\n local last_registered = tonumber(redis.call('zscore', client_last_registered_key, client))\n table.insert(lowest_concurrency_last_registered, last_registered)\n end\n end\n\n if #lowest_concurrency_clients > 0 then\n local position = 1\n local earliest = lowest_concurrency_last_registered[1]\n\n for i,v in ipairs(lowest_concurrency_last_registered) do\n if v < earliest then\n position = i\n earliest = v\n end\n end\n\n local next_client = lowest_concurrency_clients[position]\n redis.call('publish', 'b_'..id,\n 'capacity-priority:'..(final_capacity or '')..\n ':'..next_client..\n ':'..capacityPriorityCounter\n )\n redis.call('hincrby', settings_key, 'capacityPriorityCounter', '1')\n else\n redis.call('publish', 'b_'..id, 'capacity:'..(final_capacity or ''))\n end\n end\n\n return {\n ['capacity'] = final_capacity,\n ['running'] = running,\n ['reservoir'] = reservoir\n }\nend\n","queued.lua":"local clientTimeout = tonumber(redis.call('hget', settings_key, 'clientTimeout'))\nlocal valid_clients = redis.call('zrangebyscore', client_last_seen_key, (now - clientTimeout), 'inf')\nlocal client_queued = redis.call('hmget', client_num_queued_key, unpack(valid_clients))\n\nlocal sum = 0\nfor i = 1, #client_queued do\n sum = sum + tonumber(client_queued[i])\nend\n\nreturn sum\n","refresh_expiration.lua":"local refresh_expiration = function (now, nextRequest, groupTimeout)\n\n if groupTimeout ~= nil then\n local ttl = (nextRequest + groupTimeout) - now\n\n for i = 1, #KEYS do\n redis.call('pexpire', KEYS[i], ttl)\n end\n end\n\nend\n","refs.lua":"local settings_key = KEYS[1]\nlocal job_weights_key = KEYS[2]\nlocal job_expirations_key = KEYS[3]\nlocal job_clients_key = KEYS[4]\nlocal client_running_key = KEYS[5]\nlocal client_num_queued_key = KEYS[6]\nlocal client_last_registered_key = KEYS[7]\nlocal client_last_seen_key = KEYS[8]\n\nlocal now = tonumber(ARGV[1])\nlocal client = ARGV[2]\n\nlocal num_static_argv = 2\n","register.lua":"local index = ARGV[num_static_argv + 1]\nlocal weight = tonumber(ARGV[num_static_argv + 2])\nlocal expiration = tonumber(ARGV[num_static_argv + 3])\n\nlocal state = process_tick(now, false)\nlocal capacity = state['capacity']\nlocal reservoir = state['reservoir']\n\nlocal settings = redis.call('hmget', settings_key,\n 'nextRequest',\n 'minTime',\n 'groupTimeout'\n)\nlocal nextRequest = tonumber(settings[1])\nlocal minTime = tonumber(settings[2])\nlocal groupTimeout = tonumber(settings[3])\n\nif conditions_check(capacity, weight) then\n\n redis.call('hincrby', settings_key, 'running', weight)\n redis.call('hset', job_weights_key, index, weight)\n if expiration ~= nil then\n redis.call('zadd', job_expirations_key, now + expiration, index)\n end\n redis.call('hset', job_clients_key, index, client)\n redis.call('zincrby', client_running_key, weight, client)\n redis.call('hincrby', client_num_queued_key, client, -1)\n redis.call('zadd', client_last_registered_key, now, client)\n\n local wait = math.max(nextRequest - now, 0)\n local newNextRequest = now + wait + minTime\n\n if reservoir == nil then\n redis.call('hset', settings_key,\n 'nextRequest', newNextRequest\n )\n else\n reservoir = reservoir - weight\n redis.call('hmset', settings_key,\n 'reservoir', reservoir,\n 'nextRequest', newNextRequest\n )\n end\n\n refresh_expiration(now, newNextRequest, groupTimeout)\n\n return {true, wait, reservoir}\n\nelse\n return {false}\nend\n","register_client.lua":"local queued = tonumber(ARGV[num_static_argv + 1])\n\n-- Could have been re-registered concurrently\nif not redis.call('zscore', client_last_seen_key, client) then\n redis.call('zadd', client_running_key, 0, client)\n redis.call('hset', client_num_queued_key, client, queued)\n redis.call('zadd', client_last_registered_key, 0, client)\nend\n\nredis.call('zadd', client_last_seen_key, now, client)\n\nreturn {}\n","running.lua":"return process_tick(now, false)['running']\n","submit.lua":"local queueLength = tonumber(ARGV[num_static_argv + 1])\nlocal weight = tonumber(ARGV[num_static_argv + 2])\n\nlocal capacity = process_tick(now, false)['capacity']\n\nlocal settings = redis.call('hmget', settings_key,\n 'id',\n 'maxConcurrent',\n 'highWater',\n 'nextRequest',\n 'strategy',\n 'unblockTime',\n 'penalty',\n 'minTime',\n 'groupTimeout'\n)\nlocal id = settings[1]\nlocal maxConcurrent = tonumber(settings[2])\nlocal highWater = tonumber(settings[3])\nlocal nextRequest = tonumber(settings[4])\nlocal strategy = tonumber(settings[5])\nlocal unblockTime = tonumber(settings[6])\nlocal penalty = tonumber(settings[7])\nlocal minTime = tonumber(settings[8])\nlocal groupTimeout = tonumber(settings[9])\n\nif maxConcurrent ~= nil and weight > maxConcurrent then\n return redis.error_reply('OVERWEIGHT:'..weight..':'..maxConcurrent)\nend\n\nlocal reachedHWM = (highWater ~= nil and queueLength == highWater\n and not (\n conditions_check(capacity, weight)\n and nextRequest - now <= 0\n )\n)\n\nlocal blocked = strategy == 3 and (reachedHWM or unblockTime >= now)\n\nif blocked then\n local computedPenalty = penalty\n if computedPenalty == nil then\n if minTime == 0 then\n computedPenalty = 5000\n else\n computedPenalty = 15 * minTime\n end\n end\n\n local newNextRequest = now + computedPenalty + minTime\n\n redis.call('hmset', settings_key,\n 'unblockTime', now + computedPenalty,\n 'nextRequest', newNextRequest\n )\n\n local clients_queued_reset = redis.call('hkeys', client_num_queued_key)\n local queued_reset = {}\n for i = 1, #clients_queued_reset do\n table.insert(queued_reset, clients_queued_reset[i])\n table.insert(queued_reset, 0)\n end\n redis.call('hmset', client_num_queued_key, unpack(queued_reset))\n\n redis.call('publish', 'b_'..id, 'blocked:')\n\n refresh_expiration(now, newNextRequest, groupTimeout)\nend\n\nif not blocked and not reachedHWM then\n redis.call('hincrby', client_num_queued_key, client, 1)\nend\n\nreturn {reachedHWM, blocked, strategy}\n","update_settings.lua":"local args = {'hmset', settings_key}\n\nfor i = num_static_argv + 1, #ARGV do\n table.insert(args, ARGV[i])\nend\n\nredis.call(unpack(args))\n\nprocess_tick(now, true)\n\nlocal groupTimeout = tonumber(redis.call('hget', settings_key, 'groupTimeout'))\nrefresh_expiration(0, 0, groupTimeout)\n\nreturn {}\n","validate_client.lua":"if not redis.call('zscore', client_last_seen_key, client) then\n return redis.error_reply('UNKNOWN_CLIENT')\nend\n\nredis.call('zadd', client_last_seen_key, now, client)\n","validate_keys.lua":"if not (redis.call('exists', settings_key) == 1) then\n return redis.error_reply('SETTINGS_KEY_NOT_FOUND')\nend\n"}});var WN=P(function(ao){"use strict";var UN,fa,BN;fa=iZe();UN={refs:fa["refs.lua"],validate_keys:fa["validate_keys.lua"],validate_client:fa["validate_client.lua"],refresh_expiration:fa["refresh_expiration.lua"],process_tick:fa["process_tick.lua"],conditions_check:fa["conditions_check.lua"],get_time:fa["get_time.lua"]};ao.allKeys=function(e){return["b_".concat(e,"_settings"),"b_".concat(e,"_job_weights"),"b_".concat(e,"_job_expirations"),"b_".concat(e,"_job_clients"),"b_".concat(e,"_client_running"),"b_".concat(e,"_client_num_queued"),"b_".concat(e,"_client_last_registered"),"b_".concat(e,"_client_last_seen")]};BN={init:{keys:ao.allKeys,headers:["process_tick"],refresh_expiration:!0,code:fa["init.lua"]},group_check:{keys:ao.allKeys,headers:[],refresh_expiration:!1,code:fa["group_check.lua"]},register_client:{keys:ao.allKeys,headers:["validate_keys"],refresh_expiration:!1,code:fa["register_client.lua"]},blacklist_client:{keys:ao.allKeys,headers:["validate_keys","validate_client"],refresh_expiration:!1,code:fa["blacklist_client.lua"]},heartbeat:{keys:ao.allKeys,headers:["validate_keys","validate_client","process_tick"],refresh_expiration:!1,code:fa["heartbeat.lua"]},update_settings:{keys:ao.allKeys,headers:["validate_keys","validate_client","process_tick"],refresh_expiration:!0,code:fa["update_settings.lua"]},running:{keys:ao.allKeys,headers:["validate_keys","validate_client","process_tick"],refresh_expiration:!1,code:fa["running.lua"]},queued:{keys:ao.allKeys,headers:["validate_keys","validate_client"],refresh_expiration:!1,code:fa["queued.lua"]},done:{keys:ao.allKeys,headers:["validate_keys","validate_client","process_tick"],refresh_expiration:!1,code:fa["done.lua"]},check:{keys:ao.allKeys,headers:["validate_keys","validate_client","process_tick","conditions_check"],refresh_expiration:!1,code:fa["check.lua"]},submit:{keys:ao.allKeys,headers:["validate_keys","validate_client","process_tick","conditions_check"],refresh_expiration:!0,code:fa["submit.lua"]},register:{keys:ao.allKeys,headers:["validate_keys","validate_client","process_tick","conditions_check"],refresh_expiration:!0,code:fa["register.lua"]},free:{keys:ao.allKeys,headers:["validate_keys","validate_client","process_tick"],refresh_expiration:!0,code:fa["free.lua"]},current_reservoir:{keys:ao.allKeys,headers:["validate_keys","validate_client","process_tick"],refresh_expiration:!1,code:fa["current_reservoir.lua"]},increment_reservoir:{keys:ao.allKeys,headers:["validate_keys","validate_client","process_tick"],refresh_expiration:!0,code:fa["increment_reservoir.lua"]}};ao.names=Object.keys(BN);ao.keys=function(e,t){return BN[e].keys(t)};ao.payload=function(e){var t;return t=BN[e],Array.prototype.concat(UN.refs,t.headers.map(function(r){return UN[r]}),t.refresh_expiration?UN.refresh_expiration:"",t.code).join("\n")}});var VN=P(function(exports,module){"use strict";var asyncGeneratorStep=function asyncGeneratorStep(e,t,r,n,i,a,o){try{var s=e[a](o),l=s.value}catch(c){r(c);return}s.done?t(l):Promise.resolve(l).then(n,i)};var _asyncToGenerator=function _asyncToGenerator(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var a=e.apply(t,r);function o(l){asyncGeneratorStep(a,n,i,o,s,"next",l)}function s(l){asyncGeneratorStep(a,n,i,o,s,"throw",l)}o(void 0)})}};var Events,RedisConnection,Scripts,parser;parser=oh();Events=yv();Scripts=WN();RedisConnection=(function(){var RedisConnection=/*#__PURE__*/function(){function RedisConnection(){var _this=this;var options=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};_class_call_check(this,RedisConnection);parser.load(options,this.defaults,this),this.Redis==null&&(this.Redis=eval("require")("redis")),this.Events==null&&(this.Events=new Events(this)),this.terminated=!1,this.client==null&&(this.client=this.Redis.createClient(this.clientOptions)),this.subscriber=this.client.duplicate(),this.limiters={},this.shas={},this.ready=this.Promise.all([this._setup(this.client,!1),this._setup(this.subscriber,!0)]).then(function(){return _this._loadScripts()}).then(function(){return{client:_this.client,subscriber:_this.subscriber}})}_create_class(RedisConnection,[{key:"_setup",value:function _setup(e,t){var _this=this;return e.setMaxListeners(0),new this.Promise(function(r,n){return e.on("error",function(i){return _this.Events.trigger("error",i)}),t&&e.on("message",function(i,a){var o;return(o=_this.limiters[i])!=null?o._store.onMessage(i,a):void 0}),e.ready?r():e.once("ready",r)})}},{key:"_loadScript",value:function _loadScript(e){var _this=this;return new this.Promise(function(t,r){var n;return n=Scripts.payload(e),_this.client.multi([["script","load",n]]).exec(function(i,a){return i!=null?r(i):(_this.shas[e]=a[0],t(a[0]))})})}},{key:"_loadScripts",value:function _loadScripts(){var _this=this;return this.Promise.all(Scripts.names.map(function(e){return _this._loadScript(e)}))}},{key:"__runCommand__",value:function __runCommand__(e){var t=this;return _asyncToGenerator(function(){return _ts_generator(this,function(_state){switch(_state.label){case 0:return[4,t.ready];case 1:return[2,(_state.sent(),new t.Promise(function(r,n){return t.client.multi([e]).exec_atomic(function(i,a){return i!=null?n(i):r(a[0])})}))]}})})()}},{key:"__addLimiter__",value:function __addLimiter__(e){var _this=this;return this.Promise.all([e.channel(),e.channel_client()].map(function(t){return new _this.Promise(function(r,n){var i;return i=function(a){if(a===t)return _this.subscriber.removeListener("subscribe",i),_this.limiters[t]=e,r()},_this.subscriber.on("subscribe",i),_this.subscriber.subscribe(t)})}))}},{key:"__removeLimiter__",value:function __removeLimiter__(e){var t=this;return this.Promise.all([e.channel(),e.channel_client()].map(function(){var r=_asyncToGenerator(function(n){var _tmp;return _ts_generator(this,function(_state){switch(_state.label){case 0:_tmp=t.terminated;if(_tmp)return[3,2];return[4,new t.Promise(function(i,a){return t.subscriber.unsubscribe(n,function(o,s){if(o!=null)return a(o);if(s===n)return i()})})];case 1:_tmp=_state.sent();_state.label=2;case 2:return[2,(_tmp,delete t.limiters[n])]}})});return function(n){return r.apply(this,arguments)}}()))}},{key:"__scriptArgs__",value:function __scriptArgs__(e,t,r,n){var i;return i=Scripts.keys(e,t),[this.shas[e],i.length].concat(i,r,n)}},{key:"__scriptFn__",value:function __scriptFn__(e){return this.client.evalsha.bind(this.client)}},{key:"disconnect",value:function disconnect(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;var t,r,n,i;for(i=Object.keys(this.limiters),t=0,n=i.length;t0&&arguments[0]!==void 0?arguments[0]:{};_class_call_check(this,IORedisConnection);parser.load(options,this.defaults,this),this.Redis==null&&(this.Redis=eval("require")("ioredis")),this.Events==null&&(this.Events=new Events(this)),this.terminated=!1,this.clusterNodes!=null?(this.client=new this.Redis.Cluster(this.clusterNodes,this.clientOptions),this.subscriber=new this.Redis.Cluster(this.clusterNodes,this.clientOptions)):this.client!=null&&this.client.duplicate==null?this.subscriber=new this.Redis.Cluster(this.client.startupNodes,this.client.options):(this.client==null&&(this.client=new this.Redis(this.clientOptions)),this.subscriber=this.client.duplicate()),this.limiters={},this.ready=this.Promise.all([this._setup(this.client,!1),this._setup(this.subscriber,!0)]).then(function(){return _this._loadScripts(),{client:_this.client,subscriber:_this.subscriber}})}_create_class(IORedisConnection,[{key:"_setup",value:function _setup(e,t){var _this=this;return e.setMaxListeners(0),new this.Promise(function(r,n){return e.on("error",function(i){return _this.Events.trigger("error",i)}),t&&e.on("message",function(i,a){var o;return(o=_this.limiters[i])!=null?o._store.onMessage(i,a):void 0}),e.status==="ready"?r():e.once("ready",r)})}},{key:"_loadScripts",value:function _loadScripts(){var _this=this;return Scripts.names.forEach(function(e){return _this.client.defineCommand(e,{lua:Scripts.payload(e)})})}},{key:"__runCommand__",value:function __runCommand__(e){var t=this;return _asyncToGenerator(function(){var r,n,i,a,o;return _ts_generator(this,function(_state){switch(_state.label){case 0:return[4,t.ready];case 1:_state.sent();return[4,t.client.pipeline([e]).exec()];case 2:i=_state.sent(),a=_slicedToArray(i,1),o=_slicedToArray(a[0],2);return[2,(r=o[0],n=o[1],n)]}})})()}},{key:"__addLimiter__",value:function __addLimiter__(e){var _this=this;return this.Promise.all([e.channel(),e.channel_client()].map(function(t){return new _this.Promise(function(r,n){return _this.subscriber.subscribe(t,function(){return _this.limiters[t]=e,r()})})}))}},{key:"__removeLimiter__",value:function __removeLimiter__(e){var t=this;return[e.channel(),e.channel_client()].forEach(function(){var r=_asyncToGenerator(function(n){var _tmp;return _ts_generator(this,function(_state){switch(_state.label){case 0:_tmp=t.terminated;if(_tmp)return[3,2];return[4,t.subscriber.unsubscribe(n)];case 1:_tmp=_state.sent();_state.label=2;case 2:return[2,(_tmp,delete t.limiters[n])]}})});return function(n){return r.apply(this,arguments)}}())}},{key:"__scriptArgs__",value:function __scriptArgs__(e,t,r,n){var i;return i=Scripts.keys(e,t),[i.length].concat(i,r,n)}},{key:"__scriptFn__",value:function __scriptFn__(e){return this.client[e].bind(this.client)}},{key:"disconnect",value:function disconnect(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;var t,r,n,i;for(i=Object.keys(this.limiters),t=0,n=i.length;t0?~~o:void 0)];case 1:return[2,_state.sent()];case 2:if(!(m==="capacity-priority"))return[3,7];g=o.split(":"),x=HN(g,3);p=x[0],u=x[1],a=x[2],i=p.length>0?~~p:void 0;if(!(u===n.clientId))return[3,5];return[4,n.instance._drainAll(i)];case 3:s=_state.sent(),c=i!=null?i-(s||0):"";return[4,n.clients.client.publish(n.instance.channel(),"capacity-priority:".concat(c,"::").concat(a))];case 4:_tmp=_state.sent();return[3,6];case 5:_tmp=u===""?(clearTimeout(n.capacityPriorityCounters[a]),delete n.capacityPriorityCounters[a],n.instance._drainAll(i)):n.capacityPriorityCounters[a]=setTimeout(Tf(function(){var _$y,v;return _ts_generator(this,function(_state){switch(_state.label){case 0:_state.trys.push([0,3,,4]);delete n.capacityPriorityCounters[a];return[4,n.runScript("blacklist_client",[u])];case 1:_state.sent();return[4,n.instance._drainAll(i)];case 2:return[2,_state.sent()];case 3:v=_state.sent();return[2,(_$y=v,n.instance.Events.trigger("error",_$y))];case 4:return[2]}})}),1e3);_state.label=6;case 6:return[2,_tmp];case 7:if(m==="message")return[2,n.instance.Events.trigger("message",o)];if(!(m==="blocked"))return[3,9];return[4,n.instance._dropAllQueued()];case 8:return[2,_state.sent()];case 9:return[3,11];case 10:y=_state.sent();return[2,(l=y,n.instance.Events.trigger("error",l))];case 11:return[2]}})})()}},{key:"__disconnect__",value:function __disconnect__(t){return clearInterval(this.heartbeat),this.sharedConnection?this.connection.__removeLimiter__(this.instance):this.connection.disconnect(t)}},{key:"runScript",value:function runScript(t,r){var n=this;return Tf(function(){var _this,_tmp;return _ts_generator(this,function(_state){switch(_state.label){case 0:_this=this;_tmp=t==="init"||t==="register_client";if(_tmp)return[3,2];return[4,n.ready];case 1:_tmp=_state.sent();_state.label=2;case 2:return[2,(_tmp,new n.Promise(function(i,a){var o,s;return o=[Date.now(),n.clientId].concat(r),n.instance.Events.trigger("debug","Calling Redis script: ".concat(t,".lua"),o),s=n.connection.__scriptArgs__(t,n.originalId,o,function(l,c){return l!=null?a(l):i(c)}),n.connection.__scriptFn__(t).apply(_this,_to_consumable_array(s))}).catch(function(i){return i.message==="SETTINGS_KEY_NOT_FOUND"?t==="heartbeat"?n.Promise.resolve():n.runScript("init",n.prepareInitSettings(!1)).then(function(){return n.runScript(t,r)}):i.message==="UNKNOWN_CLIENT"?n.runScript("register_client",[n.instance.queued()]).then(function(){return n.runScript(t,r)}):n.Promise.reject(i)}))]}})})()}},{key:"prepareArray",value:function prepareArray(t){var r,n,i,a;for(i=[],r=0,n=t.length;r0))return[3,2];t._running++;c=t._queue.shift();l=c.task,r=c.args,o=c.resolve,a=c.reject;return[4,xZe(function(){var d;return _ts_generator(this,function(_state){switch(_state.label){case 0:_state.trys.push([0,2,,3]);return[4,l.apply(void 0,_to_consumable_array(r))];case 1:return[2,(s=_state.sent(),function(){return o(s)})];case 2:d=_state.sent();return[2,(i=d,function(){return a(i)})];case 3:return[2]}})})()];case 1:return[2,(n=_state.sent(),t._running--,t._tryToRun(),n())];case 2:return[2]}})})()}},{key:"schedule",value:function schedule(t){for(var _len=arguments.length,r=new Array(_len>1?_len-1:0),_key=1;_key<_len;_key++){r[_key-1]=arguments[_key]}var n,i,a;return a=i=null,n=new this.Promise(function(o,s){return a=o,i=s}),this._queue.push({task:t,args:r,resolve:a,reject:i}),this._tryToRun(),n}}]);return yZe}();_Ze.exports=yZe});var wZe=P(function(QVn,eTr){eTr.exports={version:"2.19.5"}});var PZe=P(function(JVn,AZe){"use strict";var tTr=function tTr(e,t){return iTr(e)||nTr(e,t)||rTr()};var rTr=function rTr(){throw new TypeError("Invalid attempt to destructure non-iterable instance")};var nTr=function nTr(e,t){var r=[],n=!0,i=!1,a=void 0;try{for(var o=e[Symbol.iterator](),s;!(n=(s=o.next()).done)&&(r.push(s.value),!(t&&r.length===t));n=!0);}catch(l){i=!0,a=l}finally{try{!n&&o.return!=null&&o.return()}finally{if(i)throw a}}return r};var iTr=function iTr(e){if(Array.isArray(e))return e};var SZe=function SZe(e,t,r,n,i,a,o){try{var s=e[a](o),l=s.value}catch(c){r(c);return}s.done?t(l):Promise.resolve(l).then(n,i)};var pne=function pne(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var a=e.apply(t,r);function o(l){SZe(a,n,i,o,s,"next",l)}function s(l){SZe(a,n,i,o,s,"throw",l)}o(void 0)})}};var kZe,EZe,TZe,IZe,CZe,ZN;ZN=oh();kZe=yv();IZe=VN();TZe=GN();CZe=WN();EZe=(function(){var e=/*#__PURE__*/function(){function e(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};_class_call_check(this,e);this.deleteKey=this.deleteKey.bind(this),this.limiterOptions=r,ZN.load(this.limiterOptions,this.defaults,this),this.Events=new kZe(this),this.instances={},this.Bottleneck=fne(),this._startAutoCleanup(),this.sharedConnection=this.connection!=null,this.connection==null&&(this.limiterOptions.datastore==="redis"?this.connection=new IZe(Object.assign({},this.limiterOptions,{Events:this.Events})):this.limiterOptions.datastore==="ioredis"&&(this.connection=new TZe(Object.assign({},this.limiterOptions,{Events:this.Events}))))}_create_class(e,[{key:"key",value:function key(){var _this=this;var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";var n;return(n=this.instances[r])!=null?n:function(){var i;return i=_this.instances[r]=new _this.Bottleneck(Object.assign(_this.limiterOptions,{id:"".concat(_this.id,"-").concat(r),timeout:_this.timeout,connection:_this.connection})),_this.Events.trigger("created",i,r),i}()}},{key:"deleteKey",value:function deleteKey(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";var n=this;return pne(function(){var i,a,_tmp,_tmp1;return _ts_generator(this,function(_state){switch(_state.label){case 0:a=n.instances[r];_tmp=n.connection;if(!_tmp)return[3,2];return[4,n.connection.__runCommand__(["del"].concat(_to_consumable_array(CZe.allKeys("".concat(n.id,"-").concat(r)))))];case 1:_tmp=i=_state.sent();_state.label=2;case 2:_tmp;_tmp1=a!=null;if(!_tmp1)return[3,4];delete n.instances[r];return[4,a.disconnect()];case 3:_tmp1=_state.sent();_state.label=4;case 4:return[2,(_tmp1,a!=null||i>0)]}})})()}},{key:"limiters",value:function limiters(){var r,n,i,a;n=this.instances,i=[];for(r in n)a=n[r],i.push({key:r,limiter:a});return i}},{key:"keys",value:function keys(){return Object.keys(this.instances)}},{key:"clusterKeys",value:function clusterKeys(){var r=this;return pne(function(){var n,i,a,o,s,l,c,d,u,p,m;return _ts_generator(this,function(_state){switch(_state.label){case 0:if(r.connection==null)return[2,r.Promise.resolve(r.keys())];l=[],n=null,u="b_".concat(r.id,"-").length,i=9;_state.label=1;case 1:if(!(n!==0))return[3,4];return[4,r.connection.__runCommand__(["scan",n!=null?n:0,"match","b_".concat(r.id,"-*_settings"),"count",1e4])];case 2:p=_state.sent(),m=tTr(p,2);for(d=m[0],a=m[1],n=~~d,o=0,c=a.length;o0&&arguments[0]!==void 0?arguments[0]:{};if(ZN.overwrite(r,this.defaults,this),ZN.overwrite(r,r,this.limiterOptions),r.timeout!=null)return this._startAutoCleanup()}},{key:"disconnect",value:function disconnect(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;var n;if(!this.sharedConnection)return(n=this.connection)!=null?n.disconnect(r):void 0}}]);return e}();return e.prototype.defaults={timeout:1e3*60*5,connection:null,Promise:Promise,id:"group-key"},e}).call(void 0);AZe.exports=EZe});var NZe=P(function(YVn,$Ze){"use strict";var OZe,RZe,MZe;MZe=oh();RZe=yv();OZe=(function(){var e=/*#__PURE__*/function(){function e(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};_class_call_check(this,e);this.options=r,MZe.load(this.options,this.defaults,this),this.Events=new RZe(this),this._arr=[],this._resetPromise(),this._lastFlush=Date.now()}_create_class(e,[{key:"_resetPromise",value:function _resetPromise(){var _this=this;return this._promise=new this.Promise(function(r,n){return _this._resolve=r})}},{key:"_flush",value:function _flush(){return clearTimeout(this._timeout),this._lastFlush=Date.now(),this._resolve(),this.Events.trigger("batch",this._arr),this._arr=[],this._resetPromise()}},{key:"add",value:function add(r){var _this=this;var n;return this._arr.push(r),n=this._promise,this._arr.length===this.maxSize?this._flush():this.maxTime!=null&&this._arr.length===1&&(this._timeout=setTimeout(function(){return _this._flush()},this.maxTime)),n}}]);return e}();return e.prototype.defaults={maxTime:null,maxSize:null,Promise:Promise},e}).call(void 0);$Ze.exports=OZe});var fne=P(function(XVn,HZe){"use strict";var DZe=function DZe(e,t){return zZe(e)||aTr(e,t)||FZe()};var aTr=function aTr(e,t){var r=[],n=!0,i=!1,a=void 0;try{for(var o=e[Symbol.iterator](),s;!(n=(s=o.next()).done)&&(r.push(s.value),!(t&&r.length===t));n=!0);}catch(l){i=!0,a=l}finally{try{!n&&o.return!=null&&o.return()}finally{if(i)throw a}}return r};var KN=function KN(e){return zZe(e)||oTr(e)||FZe()};var FZe=function FZe(){throw new TypeError("Invalid attempt to destructure non-iterable instance")};var oTr=function oTr(e){if(Symbol.iterator in Object(e)||Object.prototype.toString.call(e)==="[object Arguments]")return Array.from(e)};var zZe=function zZe(e){if(Array.isArray(e))return e};var qZe=function qZe(e,t,r,n,i,a,o){try{var s=e[a](o),l=s.value}catch(c){r(c);return}s.done?t(l):Promise.resolve(l).then(n,i)};var mne=function mne(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var a=e.apply(t,r);function o(l){qZe(a,n,i,o,s,"next",l)}function s(l){qZe(a,n,i,o,s,"throw",l)}o(void 0)})}};var jZe,UZe,hne,gne,BZe,xne,WZe,VZe,GZe,vne,If,LZe=[].splice;xne=10;UZe=5;If=oh();WZe=BHe();gne=YHe();BZe=nZe();VZe=dZe();hne=yv();GZe=hZe();vne=bZe();jZe=(function(){var e=/*#__PURE__*/function(){function e(){var _this=this;var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};for(var _len=arguments.length,n=new Array(_len>1?_len-1:0),_key=1;_key<_len;_key++){n[_key-1]=arguments[_key]}_class_call_check(this,e);var i,a;this._addToQueue=this._addToQueue.bind(this),this._validateOptions(r,n),If.load(r,this.instanceDefaults,this),this._queues=new WZe(xne),this._scheduled={},this._states=new GZe(["RECEIVED","QUEUED","RUNNING","EXECUTING"].concat(this.trackDoneStatus?["DONE"]:[])),this._limiter=null,this.Events=new hne(this),this._submitLock=new vne("submit",this.Promise),this._registerLock=new vne("register",this.Promise),a=If.load(r,this.storeDefaults,{}),this._store=(function(){if(this.datastore==="redis"||this.datastore==="ioredis"||this.connection!=null)return i=If.load(r,this.redisStoreDefaults,{}),new VZe(this,a,i);if(this.datastore==="local")return i=If.load(r,this.localStoreDefaults,{}),new BZe(this,a,i);throw new e.prototype.BottleneckError("Invalid datastore type: ".concat(this.datastore))}).call(this),this._queues.on("leftzero",function(){var o;return(o=_this._store.heartbeat)!=null&&typeof o.ref=="function"?o.ref():void 0}),this._queues.on("zero",function(){var o;return(o=_this._store.heartbeat)!=null&&typeof o.unref=="function"?o.unref():void 0})}_create_class(e,[{key:"_validateOptions",value:function _validateOptions(r,n){if(!(r!=null&&(typeof r==="undefined"?"undefined":_type_of(r))=="object"&&n.length===0))throw new e.prototype.BottleneckError("Bottleneck v2 takes a single object argument. Refer to https://github.com/SGrondin/bottleneck#upgrading-to-v2 if you're upgrading from Bottleneck v1.")}},{key:"ready",value:function ready(){return this._store.ready}},{key:"clients",value:function clients(){return this._store.clients}},{key:"channel",value:function channel(){return"b_".concat(this.id)}},{key:"channel_client",value:function channel_client(){return"b_".concat(this.id,"_").concat(this._store.clientId)}},{key:"publish",value:function publish(r){return this._store.__publish__(r)}},{key:"disconnect",value:function disconnect(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return this._store.__disconnect__(r)}},{key:"chain",value:function chain(r){return this._limiter=r,this}},{key:"queued",value:function queued(r){return this._queues.queued(r)}},{key:"clusterQueued",value:function clusterQueued(){return this._store.__queued__()}},{key:"empty",value:function empty(){return this.queued()===0&&this._submitLock.isEmpty()}},{key:"running",value:function running(){return this._store.__running__()}},{key:"done",value:function done(){return this._store.__done__()}},{key:"jobStatus",value:function jobStatus(r){return this._states.jobStatus(r)}},{key:"jobs",value:function jobs(r){return this._states.statusJobs(r)}},{key:"counts",value:function counts(){return this._states.statusCounts()}},{key:"_randomIndex",value:function _randomIndex(){return Math.random().toString(36).slice(2)}},{key:"check",value:function check(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1;return this._store.__check__(r)}},{key:"_clearGlobalState",value:function _clearGlobalState(r){return this._scheduled[r]!=null?(clearTimeout(this._scheduled[r].expiration),delete this._scheduled[r],!0):!1}},{key:"_free",value:function _free(r,n,i,a){var o=this;return mne(function(){var s,l,c,d;return _ts_generator(this,function(_state){switch(_state.label){case 0:_state.trys.push([0,2,,3]);return[4,o._store.__free__(r,i.weight)];case 1:c=_state.sent();if(l=c.running,o.Events.trigger("debug","Freed ".concat(i.id),a),l===0&&o.empty())return[2,o.Events.trigger("idle")];return[3,3];case 2:d=_state.sent();return[2,(s=d,o.Events.trigger("error",s))];case 3:return[2]}})})()}},{key:"_run",value:function _run(r,n,i){var _this=this;var a,o,s;return n.doRun(),a=this._clearGlobalState.bind(this,r),s=this._run.bind(this,r,n),o=this._free.bind(this,r,n),this._scheduled[r]={timeout:setTimeout(function(){return n.doExecute(_this._limiter,a,s,o)},i),expiration:n.options.expiration!=null?setTimeout(function(){return n.doExpire(a,s,o)},i+n.options.expiration):void 0,job:n}}},{key:"_drainOne",value:function _drainOne(r){var _this=this;return this._registerLock.schedule(function(){var n,i,a,o,s;if(_this.queued()===0)return _this.Promise.resolve(null);s=_this._queues.getFirst();var l=a=s.first();return o=l.options,n=l.args,r!=null&&o.weight>r?_this.Promise.resolve(null):(_this.Events.trigger("debug","Draining ".concat(o.id),{args:n,options:o}),i=_this._randomIndex(),_this._store.__register__(i,o.weight,o.expiration).then(function(param){var c=param.success,d=param.wait,u=param.reservoir;var p;return _this.Events.trigger("debug","Drained ".concat(o.id),{success:c,args:n,options:o}),c?(s.shift(),p=_this.empty(),p&&_this.Events.trigger("empty"),u===0&&_this.Events.trigger("depleted",p),_this._run(i,a,d),_this.Promise.resolve(o.weight)):_this.Promise.resolve(null)}))})}},{key:"_drainAll",value:function _drainAll(r){var _this=this;var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return this._drainOne(r).then(function(i){var a;return i!=null?(a=r!=null?r-i:r,_this._drainAll(a,n+i)):_this.Promise.resolve(n)}).catch(function(i){return _this.Events.trigger("error",i)})}},{key:"_dropAllQueued",value:function _dropAllQueued(r){return this._queues.shiftAll(function(n){return n.doDrop({message:r})})}},{key:"stop",value:function stop(){var _this=this;var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};var n,i;return r=If.load(r,this.stopDefaults),i=function(a){var o;return o=function(){var s;return s=_this._states.counts,s[0]+s[1]+s[2]+s[3]===a},new _this.Promise(function(s,l){return o()?s():_this.on("done",function(){if(o())return _this.removeAllListeners("done"),s()})})},n=r.dropWaitingJobs?(this._run=function n(a,o){return o.doDrop({message:r.dropErrorMessage})},this._drainOne=function(){return _this.Promise.resolve(null)},this._registerLock.schedule(function(){return _this._submitLock.schedule(function(){var a,o,s;o=_this._scheduled;for(a in o)s=o[a],_this.jobStatus(s.job.options.id)==="RUNNING"&&(clearTimeout(s.timeout),clearTimeout(s.expiration),s.job.doDrop({message:r.dropErrorMessage}));return _this._dropAllQueued(r.dropErrorMessage),i(0)})})):this.schedule({priority:xne-1,weight:0},function(){return i(1)}),this._receive=function(a){return a._reject(new e.prototype.BottleneckError(r.enqueueErrorMessage))},this.stop=function(){return _this.Promise.reject(new e.prototype.BottleneckError("stop() has already been called"))},n}},{key:"_addToQueue",value:function _addToQueue(r){var n=this;return mne(function(){var i,a,o,s,l,c,d,u,p,_tmp,_tmp1;return _ts_generator(this,function(_state){switch(_state.label){case 0:i=r.args,s=r.options;_state.label=1;case 1:_state.trys.push([1,3,,4]);return[4,n._store.__submit__(n.queued(),s.weight)];case 2:u=_state.sent();l=u.reachedHWM,a=u.blocked,d=u.strategy;return[3,4];case 3:p=_state.sent();return[2,(o=p,n.Events.trigger("debug","Could not queue ".concat(s.id),{args:i,options:s,error:o}),r.doDrop({error:o}),!1)];case 4:if(!a)return[3,5];_tmp=(r.doDrop(),!0);return[3,9];case 5:if(!(l&&(c=d===e.prototype.strategy.LEAK?n._queues.shiftLastFrom(s.priority):d===e.prototype.strategy.OVERFLOW_PRIORITY?n._queues.shiftLastFrom(s.priority+1):d===e.prototype.strategy.OVERFLOW?r:void 0,c!=null&&c.doDrop(),c==null||d===e.prototype.strategy.OVERFLOW)))return[3,6];_tmp1=(c==null&&r.doDrop(),l);return[3,8];case 6:r.doQueue(l,a),n._queues.push(r);return[4,n._drainAll()];case 7:_tmp1=(_state.sent(),l);_state.label=8;case 8:_tmp=_tmp1;_state.label=9;case 9:return[2,_tmp]}})})()}},{key:"_receive",value:function _receive(r){return this._states.jobStatus(r.options.id)!=null?(r._reject(new e.prototype.BottleneckError("A job with the same id already exists (id=".concat(r.options.id,")"))),!1):(r.doReceive(),this._submitLock.schedule(this._addToQueue,r))}},{key:"submit",value:function submit(){for(var _len=arguments.length,r=new Array(_len),_key=0;_key<_len;_key++){r[_key]=arguments[_key]}var _this=this;var n,i,a,o,s,l,c;if(typeof r[0]=="function"){var d,u,p,m;s=r,d=s,u=KN(d),i=u[0],r=u.slice(1),p=LZe.call(r,-1),m=DZe(p,1),n=m[0],o=If.load({},this.jobDefaults)}else{var h,g,x,y;l=r,h=l,g=KN(h),o=g[0],i=g[1],r=g.slice(2),x=LZe.call(r,-1),y=DZe(x,1),n=y[0],o=If.load(o,this.jobDefaults)}return c=function(){for(var _len=arguments.length,v=new Array(_len),_key=0;_key<_len;_key++){v[_key]=arguments[_key]}return new _this.Promise(function(_,b){return i.apply(void 0,_to_consumable_array(v).concat([function(){for(var _len=arguments.length,k=new Array(_len),_key=0;_key<_len;_key++){k[_key]=arguments[_key]}return(k[0]!=null?b:_)(k)}]))})},a=new gne(c,r,o,this.jobDefaults,this.rejectOnDrop,this.Events,this._states,this.Promise),a.promise.then(function(v){return typeof n=="function"?n.apply(void 0,_to_consumable_array(v)):void 0}).catch(function(v){return Array.isArray(v)?typeof n=="function"?n.apply(void 0,_to_consumable_array(v)):void 0:typeof n=="function"?n(v):void 0}),this._receive(a)}},{key:"schedule",value:function schedule(){for(var _len=arguments.length,r=new Array(_len),_key=0;_key<_len;_key++){r[_key]=arguments[_key]}var n,i,a;if(typeof r[0]=="function"){var o=r,s=KN(o);a=s[0],r=s.slice(1),i={}}else{var l=r,c=KN(l);i=c[0],a=c[1],r=c.slice(2)}return n=new gne(a,r,i,this.jobDefaults,this.rejectOnDrop,this.Events,this._states,this.Promise),this._receive(n),n.promise}},{key:"wrap",value:function wrap(r){var n,i;return n=this.schedule.bind(this),i=function i(){for(var _len=arguments.length,o=new Array(_len),_key=0;_key<_len;_key++){o[_key]=arguments[_key]}return n.apply(void 0,[r.bind(this)].concat(_to_consumable_array(o)))},i.withOptions=function(a){for(var _len=arguments.length,o=new Array(_len>1?_len-1:0),_key=1;_key<_len;_key++){o[_key-1]=arguments[_key]}return n.apply(void 0,[a,r].concat(_to_consumable_array(o)))},i}},{key:"updateSettings",value:function updateSettings(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};var n=this;return mne(function(){return _ts_generator(this,function(_state){switch(_state.label){case 0:return[4,n._store.__updateSettings__(If.overwrite(r,n.storeDefaults))];case 1:return[2,(_state.sent(),If.overwrite(r,n.instanceDefaults,n),n)]}})})()}},{key:"currentReservoir",value:function currentReservoir(){return this._store.__currentReservoir__()}},{key:"incrementReservoir",value:function incrementReservoir(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return this._store.__incrementReservoir__(r)}}]);return e}();return e.default=e,e.Events=hne,e.version=e.prototype.version=wZe().version,e.strategy=e.prototype.strategy={LEAK:1,OVERFLOW:2,OVERFLOW_PRIORITY:4,BLOCK:3},e.BottleneckError=e.prototype.BottleneckError=i4(),e.Group=e.prototype.Group=PZe(),e.RedisConnection=e.prototype.RedisConnection=VN(),e.IORedisConnection=e.prototype.IORedisConnection=GN(),e.Batcher=e.prototype.Batcher=NZe(),e.prototype.jobDefaults={priority:UZe,weight:1,expiration:null,id:""},e.prototype.storeDefaults={maxConcurrent:null,minTime:0,highWater:null,strategy:e.prototype.strategy.LEAK,penalty:null,reservoir:null,reservoirRefreshInterval:null,reservoirRefreshAmount:null,reservoirIncreaseInterval:null,reservoirIncreaseAmount:null,reservoirIncreaseMaximum:null},e.prototype.localStoreDefaults={Promise:Promise,timeout:null,heartbeatInterval:250},e.prototype.redisStoreDefaults={Promise:Promise,timeout:null,heartbeatInterval:5e3,clientTimeout:1e4,Redis:null,clientOptions:{},clusterNodes:null,clearDatastore:!1,connection:null},e.prototype.instanceDefaults={datastore:"local",connection:null,id:"",rejectOnDrop:!0,trackDoneStatus:!1,Promise:Promise},e.prototype.stopDefaults={enqueueErrorMessage:"This limiter has been stopped and cannot accept new jobs.",dropWaitingJobs:!0,dropErrorMessage:"This limiter has been stopped."},e}).call(void 0);HZe.exports=jZe});var KZe=P(function(eGn,ZZe){"use strict";ZZe.exports=fne()});var CQe=P(function(jD){(function(){"use strict";var e={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function t(o){return n(a(o),arguments)}function r(o,s){return t.apply(null,[o].concat(s||[]))}function n(o,s){var l=1,c=o.length,d,u="",p,m,h,g,x,y,v,_;for(p=0;p=0),h.type){case"b":d=parseInt(d,10).toString(2);break;case"c":d=String.fromCharCode(parseInt(d,10));break;case"d":case"i":d=parseInt(d,10);break;case"j":d=JSON.stringify(d,null,h.width?parseInt(h.width):0);break;case"e":d=h.precision?parseFloat(d).toExponential(h.precision):parseFloat(d).toExponential();break;case"f":d=h.precision?parseFloat(d).toFixed(h.precision):parseFloat(d);break;case"g":d=h.precision?String(Number(d.toPrecision(h.precision))):parseFloat(d);break;case"o":d=(parseInt(d,10)>>>0).toString(8);break;case"s":d=String(d),d=h.precision?d.substring(0,h.precision):d;break;case"t":d=String(!!d),d=h.precision?d.substring(0,h.precision):d;break;case"T":d=Object.prototype.toString.call(d).slice(8,-1).toLowerCase(),d=h.precision?d.substring(0,h.precision):d;break;case"u":d=parseInt(d,10)>>>0;break;case"v":d=d.valueOf(),d=h.precision?d.substring(0,h.precision):d;break;case"x":d=(parseInt(d,10)>>>0).toString(16);break;case"X":d=(parseInt(d,10)>>>0).toString(16).toUpperCase();break}e.json.test(h.type)?u+=d:(e.number.test(h.type)&&(!v||h.sign)?(_=v?"+":"-",d=d.toString().replace(e.sign,"")):_="",x=h.pad_char?h.pad_char==="0"?"0":h.pad_char.charAt(1):" ",y=h.width-(_+d).length,g=h.width&&y>0?x.repeat(y):"",u+=h.align?_+d+g:x==="0"?_+g+d:g+_+d)}return u}var i=Object.create(null);function a(o){if(i[o])return i[o];for(var s=o,l,c=[],d=0;s;){if((l=e.text.exec(s))!==null)c.push(l[0]);else if((l=e.modulo.exec(s))!==null)c.push("%");else if((l=e.placeholder.exec(s))!==null){if(l[2]){d|=1;var u=[],p=l[2],m=[];if((m=e.key.exec(p))!==null)for(u.push(m[1]);(p=p.substring(m[0].length))!=="";)if((m=e.key_access.exec(p))!==null)u.push(m[1]);else if((m=e.index_access.exec(p))!==null)u.push(m[1]);else throw new SyntaxError("[sprintf] failed to parse named argument key");else throw new SyntaxError("[sprintf] failed to parse named argument key");l[2]=u}else d|=2;if(d===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");c.push({placeholder:l[0],param_no:l[1],keys:l[2],sign:l[3],pad_char:l[4],align:l[5],width:l[6],precision:l[7],type:l[8]})}else throw new SyntaxError("[sprintf] unexpected placeholder");s=s.substring(l[0].length)}return i[o]=c}typeof jD!="undefined"&&(jD.sprintf=t,jD.vsprintf=r),typeof window!="undefined"&&(window.sprintf=t,window.vsprintf=r,typeof define=="function"&&define.amd&&define(function(){return{sprintf:t,vsprintf:r}}))})()});var _7=P(function(zn){"use strict";var dmt=function dmt(e){for(var _len=arguments.length,t=new Array(_len>1?_len-1:0),_key=1;_key<_len;_key++){t[_key-1]=arguments[_key]}var r=[e[0]],n=0;for(;n1?_len-1:0),_key=1;_key<_len;_key++){t[_key-1]=arguments[_key]}var r=[y7(e[0])],n=0;for(;n1)return!1;var t=this._items[0];return t===""||t==='""'}},{key:"str",get:function get1(){var t;return(t=this._str)!==null&&t!==void 0?t:this._str=this._items.reduce(function(r,n){return"".concat(r).concat(n)},"")}},{key:"names",get:function get1(){var t;return(t=this._names)!==null&&t!==void 0?t:this._names=this._items.reduce(function(r,n){return _instanceof(n,_y)&&(r[n.str]=(r[n.str]||0)+1),r},{})}}]);return pd}(v7);zn._Code=pd;zn.nil=new pd("");zn._=dmt;var Tue=new pd("+");zn.str=pmt;zn.addCodeArg=Iue;zn.strConcat=aYr;zn.stringify=sYr;zn.safeStringify=y7;zn.getProperty=lYr;zn.getEsmExportName=uYr;zn.regexpCode=cYr});var Pue=P(function(_u){"use strict";Object.defineProperty(_u,"__esModule",{value:!0});_u.ValueScope=_u.ValueScopeName=_u.Scope=_u.varKinds=_u.UsedValueState=void 0;var yu=_7(),Cue=/*#__PURE__*/function(Error1){_inherits(Cue,Error1);function Cue(t){_class_call_check(this,Cue);var _this;_this=_call_super(this,Cue,['CodeGen: "code" for '.concat(t," not defined")]),_this.value=t.value;return _this}return Cue}(_wrap_native_super(Error)),zF;(function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"})(zF||(_u.UsedValueState=zF={}));_u.varKinds={const:new yu.Name("const"),let:new yu.Name("let"),var:new yu.Name("var")};var jF=/*#__PURE__*/function(){function jF(){var _ref=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=_ref.prefixes,r=_ref.parent;_class_call_check(this,jF);this._names={},this._prefixes=t,this._parent=r}_create_class(jF,[{key:"toName",value:function toName(t){return _instanceof(t,yu.Name)?t:this.name(t)}},{key:"name",value:function name(t){return new yu.Name(this._newName(t))}},{key:"_newName",value:function _newName(t){var r=this._names[t]||this._nameGroup(t);return"".concat(t).concat(r.index++)}},{key:"_nameGroup",value:function _nameGroup(t){var r,n;if(!((n=(r=this._parent)===null||r===void 0?void 0:r._prefixes)===null||n===void 0)&&n.has(t)||this._prefixes&&!this._prefixes.has(t))throw new Error('CodeGen: prefix "'.concat(t,'" is not allowed in this scope'));return this._names[t]={prefix:t,index:0}}}]);return jF}();_u.Scope=jF;var UF=/*#__PURE__*/function(_yu_Name){_inherits(UF,_yu_Name);function UF(t,r){_class_call_check(this,UF);var _this;_this=_call_super(this,UF,[r]),_this.prefix=t;return _this}_create_class(UF,[{key:"setValue",value:function setValue(t,param){var r=param.property,n=param.itemIndex;this.value=t,this.scopePath=(0,yu._)(_templateObject2(),new yu.Name(r),n)}}]);return UF}(yu.Name);_u.ValueScopeName=UF;var dYr=(0,yu._)(_templateObject3()),Aue=/*#__PURE__*/function(jF){_inherits(Aue,jF);function Aue(t){_class_call_check(this,Aue);var _this;_this=_call_super(this,Aue,[t]),_this._values={},_this._scope=t.scope,_this.opts=_object_spread_props(_object_spread({},t),{_n:t.lines?dYr:yu.nil});return _this}_create_class(Aue,[{key:"get",value:function get1(){return this._scope}},{key:"name",value:function name(t){return new UF(t,this._newName(t))}},{key:"value",value:function value(t,r){var n;if(r.ref===void 0)throw new Error("CodeGen: ref must be passed in value");var i=this.toName(t),a=i.prefix,o=(n=r.key)!==null&&n!==void 0?n:r.ref,s=this._values[a];if(s){var d=s.get(o);if(d)return d}else s=this._values[a]=new Map;s.set(o,i);var l=this._scope[a]||(this._scope[a]=[]),c=l.length;return l[c]=r.ref,i.setValue(r,{property:a,itemIndex:c}),i}},{key:"getValue",value:function getValue(t,r){var n=this._values[t];if(n)return n.get(r)}},{key:"scopeRefs",value:function scopeRefs(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this._values;return this._reduceValues(r,function(n){if(n.scopePath===void 0)throw new Error('CodeGen: name "'.concat(n,'" has no value'));return(0,yu._)(_templateObject4(),t,n.scopePath)})}},{key:"scopeCode",value:function scopeCode(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this._values,r=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0;return this._reduceValues(t,function(i){if(i.value===void 0)throw new Error('CodeGen: name "'.concat(i,'" has no value'));return i.value.code},r,n)}},{key:"_reduceValues",value:function _reduceValues(t,r){var _loop=function(o){var s=t[o];if(!s)return"continue";var l=n[o]=n[o]||new Map;s.forEach(function(c){if(l.has(c))return;l.set(c,zF.Started);var d=r(c);if(d){var u=_this.opts.es5?_u.varKinds.var:_u.varKinds.const;a=(0,yu._)(_templateObject5(),a,u,c,d,_this.opts._n)}else if(d=i==null?void 0:i(c))a=(0,yu._)(_templateObject6(),a,d,_this.opts._n);else throw new Cue(c);l.set(c,zF.Completed)})};var _this=this;var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;var a=yu.nil;for(var o in t)_loop(o);return a}}]);return Aue}(jF);_u.ValueScope=Aue});var Xr=P(function(on){"use strict";var wy=function wy(e,t){for(var r in t)e[r]=(e[r]||0)+(t[r]||0);return e};var VF=function VF(e,t){return _instanceof(t,Rn._CodeOrName)?wy(e,t.names):e};var x6=function x6(e,t,r){var _a1;if(_instanceof(e,Rn.Name))return n(e);if(!i(e))return e;return new Rn._Code(e._items.reduce(function(a,o){return _instanceof(o,Rn.Name)&&(o=n(o)),_instanceof(o,Rn._Code)?(_a1=a).push.apply(_a1,_to_consumable_array(o._items)):a.push(o),a},[]));function n(a){var o=r[a.str];return o===void 0||t[a.str]!==1?a:(delete t[a.str],o)}function i(a){return _instanceof(a,Rn._Code)&&a._items.some(function(o){return _instanceof(o,Rn.Name)&&t[o.str]===1&&r[o.str]!==void 0})}};var pYr=function pYr(e,t){for(var r in t)e[r]=(e[r]||0)-(t[r]||0)};var fmt=function fmt(e){return typeof e=="boolean"||typeof e=="number"||e===null?!e:(0,Rn._)(_templateObject7(),Uue(e))};var mYr=function mYr(){for(var _len=arguments.length,e=new Array(_len),_key=0;_key<_len;_key++){e[_key]=arguments[_key]}return e.reduce(fYr)};var gYr=function gYr(){for(var _len=arguments.length,e=new Array(_len),_key=0;_key<_len;_key++){e[_key]=arguments[_key]}return e.reduce(hYr)};var mmt=function mmt(e){return function(t,r){return t===Rn.nil?r:r===Rn.nil?t:(0,Rn._)(_templateObject8(),Uue(t),e,Uue(r))}};var Uue=function Uue(e){return _instanceof(e,Rn.Name)?e:(0,Rn._)(_templateObject9(),e)};Object.defineProperty(on,"__esModule",{value:!0});on.or=on.and=on.not=on.CodeGen=on.operators=on.varKinds=on.ValueScopeName=on.ValueScope=on.Scope=on.Name=on.regexpCode=on.stringify=on.getProperty=on.nil=on.strConcat=on.str=on._=void 0;var Rn=_7(),vp=Pue(),v1=_7();Object.defineProperty(on,"_",{enumerable:!0,get:function get1(){return v1._}});Object.defineProperty(on,"str",{enumerable:!0,get:function get1(){return v1.str}});Object.defineProperty(on,"strConcat",{enumerable:!0,get:function get1(){return v1.strConcat}});Object.defineProperty(on,"nil",{enumerable:!0,get:function get1(){return v1.nil}});Object.defineProperty(on,"getProperty",{enumerable:!0,get:function get1(){return v1.getProperty}});Object.defineProperty(on,"stringify",{enumerable:!0,get:function get1(){return v1.stringify}});Object.defineProperty(on,"regexpCode",{enumerable:!0,get:function get1(){return v1.regexpCode}});Object.defineProperty(on,"Name",{enumerable:!0,get:function get1(){return v1.Name}});var GF=Pue();Object.defineProperty(on,"Scope",{enumerable:!0,get:function get1(){return GF.Scope}});Object.defineProperty(on,"ValueScope",{enumerable:!0,get:function get1(){return GF.ValueScope}});Object.defineProperty(on,"ValueScopeName",{enumerable:!0,get:function get1(){return GF.ValueScopeName}});Object.defineProperty(on,"varKinds",{enumerable:!0,get:function get1(){return GF.varKinds}});on.operators={GT:new Rn._Code(">"),GTE:new Rn._Code(">="),LT:new Rn._Code("<"),LTE:new Rn._Code("<="),EQ:new Rn._Code("==="),NEQ:new Rn._Code("!=="),NOT:new Rn._Code("!"),OR:new Rn._Code("||"),AND:new Rn._Code("&&"),ADD:new Rn._Code("+")};var Rh=/*#__PURE__*/function(){function Rh(){_class_call_check(this,Rh)}_create_class(Rh,[{key:"optimizeNodes",value:function optimizeNodes(){return this}},{key:"optimizeNames",value:function optimizeNames(t,r){return this}}]);return Rh}(),Oue=/*#__PURE__*/function(Rh){_inherits(Oue,Rh);function Oue(t,r,n){_class_call_check(this,Oue);var _this;_this=_call_super(this,Oue),_this.varKind=t,_this.name=r,_this.rhs=n;return _this}_create_class(Oue,[{key:"render",value:function render(param){var t=param.es5,r=param._n;var n=t?vp.varKinds.var:this.varKind,i=this.rhs===void 0?"":" = ".concat(this.rhs);return"".concat(n," ").concat(this.name).concat(i,";")+r}},{key:"optimizeNames",value:function optimizeNames(t,r){if(t[this.name.str])return this.rhs&&(this.rhs=x6(this.rhs,t,r)),this}},{key:"names",get:function get1(){return _instanceof(this.rhs,Rn._CodeOrName)?this.rhs.names:{}}}]);return Oue}(Rh),BF=/*#__PURE__*/function(Rh){_inherits(BF,Rh);function BF(t,r,n){_class_call_check(this,BF);var _this;_this=_call_super(this,BF),_this.lhs=t,_this.rhs=r,_this.sideEffects=n;return _this}_create_class(BF,[{key:"render",value:function render(param){var t=param._n;return"".concat(this.lhs," = ").concat(this.rhs,";")+t}},{key:"optimizeNames",value:function optimizeNames(t,r){if(!(_instanceof(this.lhs,Rn.Name)&&!t[this.lhs.str]&&!this.sideEffects))return this.rhs=x6(this.rhs,t,r),this}},{key:"names",get:function get1(){var t=_instanceof(this.lhs,Rn.Name)?{}:_object_spread({},this.lhs.names);return VF(t,this.rhs)}}]);return BF}(Rh),Rue=/*#__PURE__*/function(BF){_inherits(Rue,BF);function Rue(t,r,n,i){_class_call_check(this,Rue);var _this;_this=_call_super(this,Rue,[t,n,i]),_this.op=r;return _this}_create_class(Rue,[{key:"render",value:function render(param){var t=param._n;return"".concat(this.lhs," ").concat(this.op,"= ").concat(this.rhs,";")+t}}]);return Rue}(BF),Mue=/*#__PURE__*/function(Rh){_inherits(Mue,Rh);function Mue(t){_class_call_check(this,Mue);var _this;_this=_call_super(this,Mue),_this.label=t,_this.names={};return _this}_create_class(Mue,[{key:"render",value:function render(param){var t=param._n;return"".concat(this.label,":")+t}}]);return Mue}(Rh),$ue=/*#__PURE__*/function(Rh){_inherits($ue,Rh);function $ue(t){_class_call_check(this,$ue);var _this;_this=_call_super(this,$ue),_this.label=t,_this.names={};return _this}_create_class($ue,[{key:"render",value:function render(param){var t=param._n;return"break".concat(this.label?" ".concat(this.label):"",";")+t}}]);return $ue}(Rh),Nue=/*#__PURE__*/function(Rh){_inherits(Nue,Rh);function Nue(t){_class_call_check(this,Nue);var _this;_this=_call_super(this,Nue),_this.error=t;return _this}_create_class(Nue,[{key:"render",value:function render(param){var t=param._n;return"throw ".concat(this.error,";")+t}},{key:"names",get:function get1(){return this.error.names}}]);return Nue}(Rh),Due=/*#__PURE__*/function(Rh){_inherits(Due,Rh);function Due(t){_class_call_check(this,Due);var _this;_this=_call_super(this,Due),_this.code=t;return _this}_create_class(Due,[{key:"render",value:function render(param){var t=param._n;return"".concat(this.code,";")+t}},{key:"optimizeNodes",value:function optimizeNodes(){return"".concat(this.code)?this:void 0}},{key:"optimizeNames",value:function optimizeNames(t,r){return this.code=x6(this.code,t,r),this}},{key:"names",get:function get1(){return _instanceof(this.code,Rn._CodeOrName)?this.code.names:{}}}]);return Due}(Rh),b7=/*#__PURE__*/function(Rh){_inherits(b7,Rh);function b7(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];_class_call_check(this,b7);var _this;_this=_call_super(this,b7),_this.nodes=t;return _this}_create_class(b7,[{key:"render",value:function render(t){return this.nodes.reduce(function(r,n){return r+n.render(t)},"")}},{key:"optimizeNodes",value:function optimizeNodes(){var _this=this,t=_this.nodes,r=t.length;for(;r--;){var _t;var n=t[r].optimizeNodes();Array.isArray(n)?(_t=t).splice.apply(_t,[r,1].concat(_to_consumable_array(n))):n?t[r]=n:t.splice(r,1)}return t.length>0?this:void 0}},{key:"optimizeNames",value:function optimizeNames(t,r){var _this=this,n=_this.nodes,i=n.length;for(;i--;){var a=n[i];a.optimizeNames(t,r)||(pYr(t,a.names),n.splice(i,1))}return n.length>0?this:void 0}},{key:"names",get:function get1(){return this.nodes.reduce(function(t,r){return wy(t,r.names)},{})}}]);return b7}(Rh),Mh=/*#__PURE__*/function(b7){_inherits(Mh,b7);function Mh(){_class_call_check(this,Mh);return _call_super(this,Mh,arguments)}_create_class(Mh,[{key:"render",value:function render(t){return"{"+t._n+_get(_get_prototype_of(Mh.prototype),"render",this).call(this,t)+"}"+t._n}}]);return Mh}(b7),que=/*#__PURE__*/function(b7){_inherits(que,b7);function que(){_class_call_check(this,que);return _call_super(this,que,arguments)}return que}(b7),g6=/*#__PURE__*/function(Mh){_inherits(g6,Mh);function g6(){_class_call_check(this,g6);return _call_super(this,g6,arguments)}return g6}(Mh);g6.kind="else";var yp=/*#__PURE__*/function(Mh){_inherits(yp1,Mh);function yp1(t,r){_class_call_check(this,yp1);var _this;_this=_call_super(this,yp1,[r]),_this.condition=t;return _this}_create_class(yp1,[{key:"render",value:function render(t){var r="if(".concat(this.condition,")")+_get(_get_prototype_of(yp1.prototype),"render",this).call(this,t);return this.else&&(r+="else "+this.else.render(t)),r}},{key:"optimizeNodes",value:function optimizeNodes(){_get(_get_prototype_of(yp1.prototype),"optimizeNodes",this).call(this);var t=this.condition;if(t===!0)return this.nodes;var r=this.else;if(r){var n=r.optimizeNodes();r=this.else=Array.isArray(n)?new g6(n):n}if(r)return t===!1?_instanceof(r,yp)?r:r.nodes:this.nodes.length?this:new yp(fmt(t),_instanceof(r,yp)?[r]:r.nodes);if(!(t===!1||!this.nodes.length))return this}},{key:"optimizeNames",value:function optimizeNames(t,r){var n;if(this.else=(n=this.else)===null||n===void 0?void 0:n.optimizeNames(t,r),!!(_get(_get_prototype_of(yp1.prototype),"optimizeNames",this).call(this,t,r)||this.else))return this.condition=x6(this.condition,t,r),this}},{key:"names",get:function get1(){var t=_get(_get_prototype_of(yp1.prototype),"names",this);return VF(t,this.condition),this.else&&wy(t,this.else.names),t}}]);return yp1}(Mh);yp.kind="if";var by=/*#__PURE__*/function(Mh){_inherits(by,Mh);function by(){_class_call_check(this,by);return _call_super(this,by,arguments)}return by}(Mh);by.kind="for";var Lue=/*#__PURE__*/function(by){_inherits(Lue,by);function Lue(t){_class_call_check(this,Lue);var _this;_this=_call_super(this,Lue),_this.iteration=t;return _this}_create_class(Lue,[{key:"render",value:function render(t){return"for(".concat(this.iteration,")")+_get(_get_prototype_of(Lue.prototype),"render",this).call(this,t)}},{key:"optimizeNames",value:function optimizeNames(t,r){if(_get(_get_prototype_of(Lue.prototype),"optimizeNames",this).call(this,t,r))return this.iteration=x6(this.iteration,t,r),this}},{key:"names",get:function get1(){return wy(_get(_get_prototype_of(Lue.prototype),"names",this),this.iteration.names)}}]);return Lue}(by),Fue=/*#__PURE__*/function(by){_inherits(Fue,by);function Fue(t,r,n,i){_class_call_check(this,Fue);var _this;_this=_call_super(this,Fue),_this.varKind=t,_this.name=r,_this.from=n,_this.to=i;return _this}_create_class(Fue,[{key:"render",value:function render(t){var r=t.es5?vp.varKinds.var:this.varKind,_this=this,n=_this.name,i=_this.from,a=_this.to;return"for(".concat(r," ").concat(n,"=").concat(i,"; ").concat(n,"<").concat(a,"; ").concat(n,"++)")+_get(_get_prototype_of(Fue.prototype),"render",this).call(this,t)}},{key:"names",get:function get1(){var t=VF(_get(_get_prototype_of(Fue.prototype),"names",this),this.from);return VF(t,this.to)}}]);return Fue}(by),WF=/*#__PURE__*/function(by){_inherits(WF,by);function WF(t,r,n,i){_class_call_check(this,WF);var _this;_this=_call_super(this,WF),_this.loop=t,_this.varKind=r,_this.name=n,_this.iterable=i;return _this}_create_class(WF,[{key:"render",value:function render(t){return"for(".concat(this.varKind," ").concat(this.name," ").concat(this.loop," ").concat(this.iterable,")")+_get(_get_prototype_of(WF.prototype),"render",this).call(this,t)}},{key:"optimizeNames",value:function optimizeNames(t,r){if(_get(_get_prototype_of(WF.prototype),"optimizeNames",this).call(this,t,r))return this.iterable=x6(this.iterable,t,r),this}},{key:"names",get:function get1(){return wy(_get(_get_prototype_of(WF.prototype),"names",this),this.iterable.names)}}]);return WF}(by),w7=/*#__PURE__*/function(Mh){_inherits(w7,Mh);function w7(t,r,n){_class_call_check(this,w7);var _this;_this=_call_super(this,w7),_this.name=t,_this.args=r,_this.async=n;return _this}_create_class(w7,[{key:"render",value:function render(t){return"".concat(this.async?"async ":"","function ").concat(this.name,"(").concat(this.args,")")+_get(_get_prototype_of(w7.prototype),"render",this).call(this,t)}}]);return w7}(Mh);w7.kind="func";var S7=/*#__PURE__*/function(b7){_inherits(S7,b7);function S7(){_class_call_check(this,S7);return _call_super(this,S7,arguments)}_create_class(S7,[{key:"render",value:function render(t){return"return "+_get(_get_prototype_of(S7.prototype),"render",this).call(this,t)}}]);return S7}(b7);S7.kind="return";var zue=/*#__PURE__*/function(Mh){_inherits(zue,Mh);function zue(){_class_call_check(this,zue);return _call_super(this,zue,arguments)}_create_class(zue,[{key:"render",value:function render(t){var r="try"+_get(_get_prototype_of(zue.prototype),"render",this).call(this,t);return this.catch&&(r+=this.catch.render(t)),this.finally&&(r+=this.finally.render(t)),r}},{key:"optimizeNodes",value:function optimizeNodes(){var t,r;return _get(_get_prototype_of(zue.prototype),"optimizeNodes",this).call(this),(t=this.catch)===null||t===void 0||t.optimizeNodes(),(r=this.finally)===null||r===void 0||r.optimizeNodes(),this}},{key:"optimizeNames",value:function optimizeNames(t,r){var n,i;return _get(_get_prototype_of(zue.prototype),"optimizeNames",this).call(this,t,r),(n=this.catch)===null||n===void 0||n.optimizeNames(t,r),(i=this.finally)===null||i===void 0||i.optimizeNames(t,r),this}},{key:"names",get:function get1(){var t=_get(_get_prototype_of(zue.prototype),"names",this);return this.catch&&wy(t,this.catch.names),this.finally&&wy(t,this.finally.names),t}}]);return zue}(Mh),k7=/*#__PURE__*/function(Mh){_inherits(k7,Mh);function k7(t){_class_call_check(this,k7);var _this;_this=_call_super(this,k7),_this.error=t;return _this}_create_class(k7,[{key:"render",value:function render(t){return"catch(".concat(this.error,")")+_get(_get_prototype_of(k7.prototype),"render",this).call(this,t)}}]);return k7}(Mh);k7.kind="catch";var E7=/*#__PURE__*/function(Mh){_inherits(E7,Mh);function E7(){_class_call_check(this,E7);return _call_super(this,E7,arguments)}_create_class(E7,[{key:"render",value:function render(t){return"finally"+_get(_get_prototype_of(E7.prototype),"render",this).call(this,t)}}]);return E7}(Mh);E7.kind="finally";var jue=/*#__PURE__*/function(){function jue(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};_class_call_check(this,jue);this._values={},this._blockStarts=[],this._constants={},this.opts=_object_spread_props(_object_spread({},r),{_n:r.lines?"\n":""}),this._extScope=t,this._scope=new vp.Scope({parent:t}),this._nodes=[new que]}_create_class(jue,[{key:"toString",value:function toString(){return this._root.render(this.opts)}},{key:"name",value:function name(t){return this._scope.name(t)}},{key:"scopeName",value:function scopeName(t){return this._extScope.name(t)}},{key:"scopeValue",value:function scopeValue(t,r){var n=this._extScope.value(t,r);return(this._values[n.prefix]||(this._values[n.prefix]=new Set)).add(n),n}},{key:"getScopeValue",value:function getScopeValue(t,r){return this._extScope.getValue(t,r)}},{key:"scopeRefs",value:function scopeRefs(t){return this._extScope.scopeRefs(t,this._values)}},{key:"scopeCode",value:function scopeCode(){return this._extScope.scopeCode(this._values)}},{key:"_def",value:function _def(t,r,n,i){var a=this._scope.toName(r);return n!==void 0&&i&&(this._constants[a.str]=n),this._leafNode(new Oue(t,a,n)),a}},{key:"const",value:function _const(t,r,n){return this._def(vp.varKinds.const,t,r,n)}},{key:"let",value:function _let(t,r,n){return this._def(vp.varKinds.let,t,r,n)}},{key:"var",value:function _var(t,r,n){return this._def(vp.varKinds.var,t,r,n)}},{key:"assign",value:function assign(t,r,n){return this._leafNode(new BF(t,r,n))}},{key:"add",value:function add(t,r){return this._leafNode(new Rue(t,on.operators.ADD,r))}},{key:"code",value:function code(t){return typeof t=="function"?t():t!==Rn.nil&&this._leafNode(new Due(t)),this}},{key:"object",value:function object(){for(var _len=arguments.length,t=new Array(_len),_key=0;_key<_len;_key++){t[_key]=arguments[_key]}var r=["{"];var _iteratorNormalCompletion=true,_didIteratorError=false,_iteratorError=undefined;try{for(var _iterator=t[Symbol.iterator](),_step;!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=true){var _step_value=_sliced_to_array(_step.value,2),n=_step_value[0],i=_step_value[1];r.length>1&&r.push(","),r.push(n),(n!==i||this.opts.es5)&&(r.push(":"),(0,Rn.addCodeArg)(r,i))}}catch(err){_didIteratorError=true;_iteratorError=err}finally{try{if(!_iteratorNormalCompletion&&_iterator.return!=null){_iterator.return()}}finally{if(_didIteratorError){throw _iteratorError}}}return r.push("}"),new Rn._Code(r)}},{key:"if",value:function _if(t,r,n){if(this._blockNode(new yp(t)),r&&n)this.code(r).else().code(n).endIf();else if(r)this.code(r).endIf();else if(n)throw new Error('CodeGen: "else" body without "then" body');return this}},{key:"elseIf",value:function elseIf(t){return this._elseNode(new yp(t))}},{key:"else",value:function _else(){return this._elseNode(new g6)}},{key:"endIf",value:function endIf(){return this._endBlockNode(yp,g6)}},{key:"_for",value:function _for(t,r){return this._blockNode(t),r&&this.code(r).endFor(),this}},{key:"for",value:function _for(t,r){return this._for(new Lue(t),r)}},{key:"forRange",value:function forRange(t,r,n,i){var a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.opts.es5?vp.varKinds.var:vp.varKinds.let;var o=this._scope.toName(t);return this._for(new Fue(a,o,r,n),function(){return i(o)})}},{key:"forOf",value:function forOf(t,r,n){var _this=this;var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:vp.varKinds.const;var a=this._scope.toName(t);if(this.opts.es5){var o=_instanceof(r,Rn.Name)?r:this.var("_arr",r);return this.forRange("_i",0,(0,Rn._)(_templateObject10(),o),function(s){_this.var(a,(0,Rn._)(_templateObject11(),o,s)),n(a)})}return this._for(new WF("of",i,a,r),function(){return n(a)})}},{key:"forIn",value:function forIn(t,r,n){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:this.opts.es5?vp.varKinds.var:vp.varKinds.const;if(this.opts.ownProperties)return this.forOf(t,(0,Rn._)(_templateObject12(),r),n);var a=this._scope.toName(t);return this._for(new WF("in",i,a,r),function(){return n(a)})}},{key:"endFor",value:function endFor(){return this._endBlockNode(by)}},{key:"label",value:function label(t){return this._leafNode(new Mue(t))}},{key:"break",value:function _break(t){return this._leafNode(new $ue(t))}},{key:"return",value:function _return(t){var r=new S7;if(this._blockNode(r),this.code(t),r.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(S7)}},{key:"try",value:function _try(t,r,n){if(!r&&!n)throw new Error('CodeGen: "try" without "catch" and "finally"');var i=new zue;if(this._blockNode(i),this.code(t),r){var a=this.name("e");this._currNode=i.catch=new k7(a),r(a)}return n&&(this._currNode=i.finally=new E7,this.code(n)),this._endBlockNode(k7,E7)}},{key:"throw",value:function _throw(t){return this._leafNode(new Nue(t))}},{key:"block",value:function block(t,r){return this._blockStarts.push(this._nodes.length),t&&this.code(t).endBlock(r),this}},{key:"endBlock",value:function endBlock(t){var r=this._blockStarts.pop();if(r===void 0)throw new Error("CodeGen: not in self-balancing block");var n=this._nodes.length-r;if(n<0||t!==void 0&&n!==t)throw new Error("CodeGen: wrong number of nodes: ".concat(n," vs ").concat(t," expected"));return this._nodes.length=r,this}},{key:"func",value:function func(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Rn.nil,n=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0;return this._blockNode(new w7(t,r,n)),i&&this.code(i).endFunc(),this}},{key:"endFunc",value:function endFunc(){return this._endBlockNode(w7)}},{key:"optimize",value:function optimize(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1;for(;t-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}},{key:"_leafNode",value:function _leafNode(t){return this._currNode.nodes.push(t),this}},{key:"_blockNode",value:function _blockNode(t){this._currNode.nodes.push(t),this._nodes.push(t)}},{key:"_endBlockNode",value:function _endBlockNode(t,r){var n=this._currNode;if(_instanceof(n,t)||r&&_instanceof(n,r))return this._nodes.pop(),this;throw new Error('CodeGen: not in block "'.concat(r?"".concat(t.kind,"/").concat(r.kind):t.kind,'"'))}},{key:"_elseNode",value:function _elseNode(t){var r=this._currNode;if(!_instanceof(r,yp))throw new Error('CodeGen: "else" without "if"');return this._currNode=r.else=t,this}},{key:"_root",get:function get1(){return this._nodes[0]}},{key:"_currNode",get:function get1(){var t=this._nodes;return t[t.length-1]},set:function set1(t){var r=this._nodes;r[r.length-1]=t}}]);return jue}();on.CodeGen=jue;on.not=fmt;var fYr=mmt(on.operators.AND);on.and=mYr;var hYr=mmt(on.operators.OR);on.or=gYr});var $n=P(function(cn){"use strict";var vYr=function vYr(e){var t={};var _iteratorNormalCompletion=true,_didIteratorError=false,_iteratorError=undefined;try{for(var _iterator=e[Symbol.iterator](),_step;!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=true){var r=_step.value;t[r]=!0}}catch(err){_didIteratorError=true;_iteratorError=err}finally{try{if(!_iteratorNormalCompletion&&_iterator.return!=null){_iterator.return()}}finally{if(_didIteratorError){throw _iteratorError}}}return t};var yYr=function yYr(e,t){return typeof t=="boolean"?t:Object.keys(t).length===0?!0:(xmt(e,t),!vmt(t,e.self.RULES.all))};var xmt=function xmt(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e.schema;var r=e.opts,n=e.self;if(!r.strictSchema||typeof t=="boolean")return;var i=n.RULES.keywords;for(var a in t)i[a]||bmt(e,'unknown keyword: "'.concat(a,'"'))};var vmt=function vmt(e,t){if(typeof e=="boolean")return!e;for(var r in e)if(t[r])return!0;return!1};var _Yr=function _Yr(e,t){if(typeof e=="boolean")return!e;for(var r in e)if(r!=="$ref"&&t.all[r])return!0;return!1};var bYr=function bYr(param,r,n,i){var e=param.topSchemaRef,t=param.schemaPath;if(!i){if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string")return(0,Mi._)(_templateObject13(),r)}return(0,Mi._)(_templateObject14(),e,t,(0,Mi.getProperty)(n))};var wYr=function wYr(e){return ymt(decodeURIComponent(e))};var SYr=function SYr(e){return encodeURIComponent(Wue(e))};var Wue=function Wue(e){return typeof e=="number"?"".concat(e):e.replace(/~/g,"~0").replace(/\//g,"~1")};var ymt=function ymt(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")};var kYr=function kYr(e,t){var _iteratorNormalCompletion=true,_didIteratorError=false,_iteratorError=undefined;if(Array.isArray(e))try{for(var _iterator=e[Symbol.iterator](),_step;!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=true){var r=_step.value;t(r)}}catch(err){_didIteratorError=true;_iteratorError=err}finally{try{if(!_iteratorNormalCompletion&&_iterator.return!=null){_iterator.return()}}finally{if(_didIteratorError){throw _iteratorError}}}else t(e)};var hmt=function hmt(param){var e=param.mergeNames,t=param.mergeToName,r=param.mergeValues,n=param.resultToName;return function(i,a,o,s){var l=o===void 0?a:_instanceof(o,Mi.Name)?(_instanceof(a,Mi.Name)?e(i,a,o):t(i,a,o),o):_instanceof(a,Mi.Name)?(t(i,o,a),a):r(a,o);return s===Mi.Name&&!_instanceof(l,Mi.Name)?n(i,l):l}};var _mt=function _mt(e,t){if(t===!0)return e.var("props",!0);var r=e.var("props",(0,Mi._)(_templateObject15()));return t!==void 0&&Vue(e,r,t),r};var Vue=function Vue(e,t,r){Object.keys(r).forEach(function(n){return e.assign((0,Mi._)(_templateObject16(),t,(0,Mi.getProperty)(n)),!0)})};var EYr=function EYr(e,t){return e.scopeValue("func",{ref:t,code:gmt[t.code]||(gmt[t.code]=new xYr._Code(t.code))})};var TYr=function TYr(e,t,r){if(_instanceof(e,Mi.Name)){var n=t===Bue.Num;return r?n?(0,Mi._)(_templateObject17(),e):(0,Mi._)(_templateObject18(),e):n?(0,Mi._)(_templateObject19(),e):(0,Mi._)(_templateObject20(),e)}return r?(0,Mi.getProperty)(e).toString():"/"+Wue(e)};var bmt=function bmt(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.opts.strictSchema;if(r){if(t="strict mode: ".concat(t),r===!0)throw new Error(t);e.self.logger.warn(t)}};Object.defineProperty(cn,"__esModule",{value:!0});cn.checkStrictMode=cn.getErrorPath=cn.Type=cn.useFunc=cn.setEvaluated=cn.evaluatedPropsToName=cn.mergeEvaluated=cn.eachItem=cn.unescapeJsonPointer=cn.escapeJsonPointer=cn.escapeFragment=cn.unescapeFragment=cn.schemaRefOrVal=cn.schemaHasRulesButRef=cn.schemaHasRules=cn.checkUnknownRules=cn.alwaysValidSchema=cn.toHash=void 0;var Mi=Xr(),xYr=_7();cn.toHash=vYr;cn.alwaysValidSchema=yYr;cn.checkUnknownRules=xmt;cn.schemaHasRules=vmt;cn.schemaHasRulesButRef=_Yr;cn.schemaRefOrVal=bYr;cn.unescapeFragment=wYr;cn.escapeFragment=SYr;cn.escapeJsonPointer=Wue;cn.unescapeJsonPointer=ymt;cn.eachItem=kYr;cn.mergeEvaluated={props:hmt({mergeNames:function(e,t,r){return e.if((0,Mi._)(_templateObject21(),r,t),function(){e.if((0,Mi._)(_templateObject22(),t),function(){return e.assign(r,!0)},function(){return e.assign(r,(0,Mi._)(_templateObject23(),r)).code((0,Mi._)(_templateObject24(),r,t))})})},mergeToName:function(e,t,r){return e.if((0,Mi._)(_templateObject25(),r),function(){t===!0?e.assign(r,!0):(e.assign(r,(0,Mi._)(_templateObject26(),r)),Vue(e,r,t))})},mergeValues:function(e,t){return e===!0?!0:_object_spread({},e,t)},resultToName:_mt}),items:hmt({mergeNames:function(e,t,r){return e.if((0,Mi._)(_templateObject27(),r,t),function(){return e.assign(r,(0,Mi._)(_templateObject28(),t,r,t,r,t))})},mergeToName:function(e,t,r){return e.if((0,Mi._)(_templateObject29(),r),function(){return e.assign(r,t===!0?!0:(0,Mi._)(_templateObject30(),r,t,r,t))})},mergeValues:function(e,t){return e===!0?!0:Math.max(e,t)},resultToName:function(e,t){return e.var("items",t)}})};cn.evaluatedPropsToName=_mt;cn.setEvaluated=Vue;var gmt={};cn.useFunc=EYr;var Bue;(function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"})(Bue||(cn.Type=Bue={}));cn.getErrorPath=TYr;cn.checkStrictMode=bmt});var $h=P(function(Gue){"use strict";Object.defineProperty(Gue,"__esModule",{value:!0});var Zs=Xr(),IYr={data:new Zs.Name("data"),valCxt:new Zs.Name("valCxt"),instancePath:new Zs.Name("instancePath"),parentData:new Zs.Name("parentData"),parentDataProperty:new Zs.Name("parentDataProperty"),rootData:new Zs.Name("rootData"),dynamicAnchors:new Zs.Name("dynamicAnchors"),vErrors:new Zs.Name("vErrors"),errors:new Zs.Name("errors"),this:new Zs.Name("this"),self:new Zs.Name("self"),scope:new Zs.Name("scope"),json:new Zs.Name("json"),jsonPos:new Zs.Name("jsonPos"),jsonLen:new Zs.Name("jsonLen"),jsonPart:new Zs.Name("jsonPart")};Gue.default=IYr});var T7=P(function(Ks){"use strict";var CYr=function CYr(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ks.keywordError,r=arguments.length>2?arguments[2]:void 0,n=arguments.length>3?arguments[3]:void 0;var i=e.it,a=i.gen,o=i.compositeRule,s=i.allErrors,l=kmt(e,t,r);(n!=null?n:o||s)?wmt(a,l):Smt(i,(0,Nn._)(_templateObject31(),l))};var AYr=function AYr(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ks.keywordError,r=arguments.length>2?arguments[2]:void 0;var n=e.it,i=n.gen,a=n.compositeRule,o=n.allErrors,s=kmt(e,t,r);wmt(i,s),a||o||Smt(n,Sl.default.vErrors)};var PYr=function PYr(e,t){e.assign(Sl.default.errors,t),e.if((0,Nn._)(_templateObject32(),Sl.default.vErrors),function(){return e.if(t,function(){return e.assign((0,Nn._)(_templateObject33(),Sl.default.vErrors),t)},function(){return e.assign(Sl.default.vErrors,null)})})};var OYr=function OYr(param){var e=param.gen,t=param.keyword,r=param.schemaValue,n=param.data,i=param.errsCount,a=param.it;if(i===void 0)throw new Error("ajv implementation error");var o=e.name("err");e.forRange("i",i,Sl.default.errors,function(s){e.const(o,(0,Nn._)(_templateObject34(),Sl.default.vErrors,s)),e.if((0,Nn._)(_templateObject35(),o),function(){return e.assign((0,Nn._)(_templateObject36(),o),(0,Nn.strConcat)(Sl.default.instancePath,a.errorPath))}),e.assign((0,Nn._)(_templateObject37(),o),(0,Nn.str)(_templateObject38(),a.errSchemaPath,t)),a.opts.verbose&&(e.assign((0,Nn._)(_templateObject39(),o),r),e.assign((0,Nn._)(_templateObject40(),o),n))})};var wmt=function wmt(e,t){var r=e.const("err",t);e.if((0,Nn._)(_templateObject41(),Sl.default.vErrors),function(){return e.assign(Sl.default.vErrors,(0,Nn._)(_templateObject42(),r))},(0,Nn._)(_templateObject43(),Sl.default.vErrors,r)),e.code((0,Nn._)(_templateObject44(),Sl.default.errors))};var Smt=function Smt(e,t){var r=e.gen,n=e.validateName,i=e.schemaEnv;i.$async?r.throw((0,Nn._)(_templateObject45(),e.ValidationError,t)):(r.assign((0,Nn._)(_templateObject46(),n),t),r.return(!1))};var kmt=function kmt(e,t,r){var _e_it=e.it,n=_e_it.createErrors;return n===!1?(0,Nn._)(_templateObject47()):RYr(e,t,r)};var RYr=function RYr(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};var _n1;var n=e.gen,i=e.it,a=[MYr(i,r),$Yr(e,r)];return NYr(e,t,a),(_n1=n).object.apply(_n1,_to_consumable_array(a))};var MYr=function MYr(param,param1){var e=param.errorPath,t=param1.instancePath;var r=t?(0,Nn.str)(_templateObject48(),e,(0,HF.getErrorPath)(t,HF.Type.Str)):e;return[Sl.default.instancePath,(0,Nn.strConcat)(Sl.default.instancePath,r)]};var $Yr=function $Yr(param,param1){var e=param.keyword,_param_it=param.it,t=_param_it.errSchemaPath,r=param1.schemaPath,n=param1.parentSchema;var i=n?t:(0,Nn.str)(_templateObject49(),t,e);return r&&(i=(0,Nn.str)(_templateObject50(),i,(0,HF.getErrorPath)(r,HF.Type.Str))),[Sy.schemaPath,i]};var NYr=function NYr(e,param,n){var t=param.params,r=param.message;var i=e.keyword,a=e.data,o=e.schemaValue,s=e.it,l=s.opts,c=s.propertyName,d=s.topSchemaRef,u=s.schemaPath;n.push([Sy.keyword,i],[Sy.params,typeof t=="function"?t(e):t||(0,Nn._)(_templateObject51())]),l.messages&&n.push([Sy.message,typeof r=="function"?r(e):r]),l.verbose&&n.push([Sy.schema,o],[Sy.parentSchema,(0,Nn._)(_templateObject52(),d,u)],[Sl.default.data,a]),c&&n.push([Sy.propertyName,c])};Object.defineProperty(Ks,"__esModule",{value:!0});Ks.extendErrors=Ks.resetErrorsCount=Ks.reportExtraError=Ks.reportError=Ks.keyword$DataError=Ks.keywordError=void 0;var Nn=Xr(),HF=$n(),Sl=$h();Ks.keywordError={message:function(param){var e=param.keyword;return(0,Nn.str)(_templateObject53(),e)}};Ks.keyword$DataError={message:function(param){var e=param.keyword,t=param.schemaType;return t?(0,Nn.str)(_templateObject54(),e,t):(0,Nn.str)(_templateObject55(),e)}};Ks.reportError=CYr;Ks.reportExtraError=AYr;Ks.resetErrorsCount=PYr;Ks.extendErrors=OYr;var Sy={keyword:new Nn.Name("keyword"),schemaPath:new Nn.Name("schemaPath"),params:new Nn.Name("params"),propertyName:new Nn.Name("propertyName"),message:new Nn.Name("message"),schema:new Nn.Name("schema"),parentSchema:new Nn.Name("parentSchema")}});var Tmt=P(function(v6){"use strict";var zYr=function zYr(e){var t=e.gen,r=e.schema,n=e.validateName;r===!1?Emt(e,!1):(typeof r==="undefined"?"undefined":_type_of(r))=="object"&&r.$async===!0?t.return(LYr.default.data):(t.assign((0,qYr._)(_templateObject56(),n),null),t.return(!0))};var jYr=function jYr(e,t){var r=e.gen,n=e.schema;n===!1?(r.var(t,!1),Emt(e)):r.var(t,!0)};var Emt=function Emt(e,t){var r=e.gen,n=e.data,i={gen:r,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,DYr.reportError)(i,FYr,void 0,t)};Object.defineProperty(v6,"__esModule",{value:!0});v6.boolOrEmptySchema=v6.topBoolOrEmptySchema=void 0;var DYr=T7(),qYr=Xr(),LYr=$h(),FYr={message:"boolean schema is false"};v6.topBoolOrEmptySchema=zYr;v6.boolOrEmptySchema=jYr});var Hue=P(function(y6){"use strict";var WYr=function WYr(e){return typeof e=="string"&&BYr.has(e)};var VYr=function VYr(){var e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:_object_spread_props(_object_spread({},e),{integer:!0,boolean:!0,null:!0}),rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}};Object.defineProperty(y6,"__esModule",{value:!0});y6.getRules=y6.isJSONType=void 0;var UYr=["string","number","integer","boolean","null","object","array"],BYr=new Set(UYr);y6.isJSONType=WYr;y6.getRules=VYr});var Zue=P(function(y1){"use strict";var GYr=function GYr(param,r){var e=param.schema,t=param.self;var n=t.RULES.types[r];return n&&n!==!0&&Imt(e,n)};var Imt=function Imt(e,t){return t.rules.some(function(r){return Cmt(e,r)})};var Cmt=function Cmt(e,t){var r;return e[t.keyword]!==void 0||((r=t.definition.implements)===null||r===void 0?void 0:r.some(function(n){return e[n]!==void 0}))};Object.defineProperty(y1,"__esModule",{value:!0});y1.shouldUseRule=y1.shouldUseGroup=y1.schemaHasRulesForType=void 0;y1.schemaHasRulesForType=GYr;y1.shouldUseGroup=Imt;y1.shouldUseRule=Cmt});var I7=P(function(Qs){"use strict";var QYr=function QYr(e){var t=Pmt(e.type);if(t.includes("null")){if(e.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!t.length&&e.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');e.nullable===!0&&t.push("null")}return t};var Pmt=function Pmt(e){var t=Array.isArray(e)?e:e?[e]:[];if(t.every(HYr.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))};var JYr=function JYr(e,t){var r=e.gen,n=e.data,i=e.opts,a=YYr(t,i.coerceTypes),o=t.length>0&&!(a.length===0&&t.length===1&&(0,ZYr.schemaHasRulesForType)(e,t[0]));if(o){var s=Que(t,n,i.strictNumbers,_6.Wrong);r.if(s,function(){a.length?XYr(e,t,a):Jue(e)})}return o};var YYr=function YYr(e,t){return t?e.filter(function(r){return Omt.has(r)||t==="array"&&r==="array"}):[]};var XYr=function XYr(e,t,r){var n=e.gen,i=e.data,a=e.opts,o=n.let("dataType",(0,Gr._)(_templateObject57(),i)),s=n.let("coerced",(0,Gr._)(_templateObject58()));a.coerceTypes==="array"&&n.if((0,Gr._)(_templateObject59(),o,i,i),function(){return n.assign(i,(0,Gr._)(_templateObject60(),i)).assign(o,(0,Gr._)(_templateObject61(),i)).if(Que(t,i,a.strictNumbers),function(){return n.assign(s,i)})}),n.if((0,Gr._)(_templateObject62(),s));var _iteratorNormalCompletion=true,_didIteratorError=false,_iteratorError=undefined;try{for(var _iterator=r[Symbol.iterator](),_step;!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=true){var c=_step.value;(Omt.has(c)||c==="array"&&a.coerceTypes==="array")&&l(c)}}catch(err){_didIteratorError=true;_iteratorError=err}finally{try{if(!_iteratorNormalCompletion&&_iterator.return!=null){_iterator.return()}}finally{if(_didIteratorError){throw _iteratorError}}}n.else(),Jue(e),n.endIf(),n.if((0,Gr._)(_templateObject63(),s),function(){n.assign(i,s),eXr(e,s)});function l(c){switch(c){case"string":n.elseIf((0,Gr._)(_templateObject64(),o,o)).assign(s,(0,Gr._)(_templateObject65(),i)).elseIf((0,Gr._)(_templateObject66(),i)).assign(s,(0,Gr._)(_templateObject67()));return;case"number":n.elseIf((0,Gr._)(_templateObject68(),o,i,o,i,i,i)).assign(s,(0,Gr._)(_templateObject69(),i));return;case"integer":n.elseIf((0,Gr._)(_templateObject70(),o,i,o,i,i,i,i)).assign(s,(0,Gr._)(_templateObject71(),i));return;case"boolean":n.elseIf((0,Gr._)(_templateObject72(),i,i,i)).assign(s,!1).elseIf((0,Gr._)(_templateObject73(),i,i)).assign(s,!0);return;case"null":n.elseIf((0,Gr._)(_templateObject74(),i,i,i)),n.assign(s,null);return;case"array":n.elseIf((0,Gr._)(_templateObject75(),o,o,o,i)).assign(s,(0,Gr._)(_templateObject76(),i))}}};var eXr=function eXr(param,n){var e=param.gen,t=param.parentData,r=param.parentDataProperty;e.if((0,Gr._)(_templateObject77(),t),function(){return e.assign((0,Gr._)(_templateObject78(),t,r),n)})};var Kue=function Kue(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:_6.Correct;var i=n===_6.Correct?Gr.operators.EQ:Gr.operators.NEQ,a;switch(e){case"null":return(0,Gr._)(_templateObject79(),t,i);case"array":a=(0,Gr._)(_templateObject80(),t);break;case"object":a=(0,Gr._)(_templateObject81(),t,t,t);break;case"integer":a=o((0,Gr._)(_templateObject82(),t,t));break;case"number":a=o();break;default:return(0,Gr._)(_templateObject83(),t,i,e)}return n===_6.Correct?a:(0,Gr.not)(a);function o(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Gr.nil;return(0,Gr.and)((0,Gr._)(_templateObject84(),t),s,r?(0,Gr._)(_templateObject85(),t):Gr.nil)}};var Que=function Que(e,t,r,n){if(e.length===1)return Kue(e[0],t,r,n);var i,a=(0,Amt.toHash)(e);if(a.array&&a.object){var o=(0,Gr._)(_templateObject86(),t);i=a.null?o:(0,Gr._)(_templateObject87(),t,o),delete a.null,delete a.array,delete a.object}else i=Gr.nil;a.number&&delete a.integer;for(var o3 in a)i=(0,Gr.and)(i,Kue(o3,t,r,n));return i};var Jue=function Jue(e){var t=rXr(e);(0,KYr.reportError)(t,tXr)};var rXr=function rXr(e){var t=e.gen,r=e.data,n=e.schema,i=(0,Amt.schemaRefOrVal)(e,n,"type");return{gen:t,keyword:"type",data:r,schema:n.type,schemaCode:i,schemaValue:i,parentSchema:n,params:{},it:e}};Object.defineProperty(Qs,"__esModule",{value:!0});Qs.reportTypeError=Qs.checkDataTypes=Qs.checkDataType=Qs.coerceAndCheckDataType=Qs.getJSONTypes=Qs.getSchemaTypes=Qs.DataType=void 0;var HYr=Hue(),ZYr=Zue(),KYr=T7(),Gr=Xr(),Amt=$n(),_6;(function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"})(_6||(Qs.DataType=_6={}));Qs.getSchemaTypes=QYr;Qs.getJSONTypes=Pmt;Qs.coerceAndCheckDataType=JYr;var Omt=new Set(["string","number","integer","boolean","null"]);Qs.checkDataType=Kue;Qs.checkDataTypes=Que;var tXr={message:function(param){var e=param.schema;return"must be ".concat(e)},params:function(param){var e=param.schema,t=param.schemaValue;return typeof e=="string"?(0,Gr._)(_templateObject88(),e):(0,Gr._)(_templateObject89(),t)}};Qs.reportTypeError=Jue});var Mmt=P(function(ZF){"use strict";var iXr=function iXr(e,t){var _e_schema=e.schema,r=_e_schema.properties,n=_e_schema.items;if(t==="object"&&r)for(var i in r)Rmt(e,i,r[i].default);else t==="array"&&Array.isArray(n)&&n.forEach(function(i,a){return Rmt(e,a,i.default)})};var Rmt=function Rmt(e,t,r){var n=e.gen,i=e.compositeRule,a=e.data,o=e.opts;if(r===void 0)return;var s=(0,b6._)(_templateObject90(),a,(0,b6.getProperty)(t));if(i){(0,nXr.checkStrictMode)(e,"default is ignored for: ".concat(s));return}var l=(0,b6._)(_templateObject91(),s);o.useDefaults==="empty"&&(l=(0,b6._)(_templateObject92(),l,s,s)),n.if(l,(0,b6._)(_templateObject93(),s,(0,b6.stringify)(r)))};Object.defineProperty(ZF,"__esModule",{value:!0});ZF.assignDefaults=void 0;var b6=Xr(),nXr=$n();ZF.assignDefaults=iXr});var fd=P(function(_i){"use strict";var oXr=function oXr(e,t){var r=e.gen,n=e.data,i=e.it;r.if(ece(r,n,t,i.opts.ownProperties),function(){e.setParams({missingProperty:(0,Ki._)(_templateObject94(),t)},!0),e.error()})};var sXr=function sXr(param,n,i){var e=param.gen,t=param.data,_param_it=param.it,r=_param_it.opts;return(0,Ki.or).apply(this,_to_consumable_array(n.map(function(a){return(0,Ki.and)(ece(e,t,a,r.ownProperties),(0,Ki._)(_templateObject95(),i,a))})))};var lXr=function lXr(e,t){e.setParams({missingProperty:t},!0),e.error()};var $mt=function $mt(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,Ki._)(_templateObject96())})};var Xue=function Xue(e,t,r){return(0,Ki._)(_templateObject97(),$mt(e),t,r)};var uXr=function uXr(e,t,r,n){var i=(0,Ki._)(_templateObject98(),t,(0,Ki.getProperty)(r));return n?(0,Ki._)(_templateObject99(),i,Xue(e,t,r)):i};var ece=function ece(e,t,r,n){var i=(0,Ki._)(_templateObject100(),t,(0,Ki.getProperty)(r));return n?(0,Ki.or)(i,(0,Ki.not)(Xue(e,t,r))):i};var Nmt=function Nmt(e){return e?Object.keys(e).filter(function(t){return t!=="__proto__"}):[]};var cXr=function cXr(e,t){return Nmt(t).filter(function(r){return!(0,Yue.alwaysValidSchema)(e,t[r])})};var dXr=function dXr(param,s,l,c){var e=param.schemaCode,t=param.data,_param_it=param.it,r=_param_it.gen,n=_param_it.topSchemaRef,i=_param_it.schemaPath,a=_param_it.errorPath,o=param.it;var _r1;var d=c?(0,Ki._)(_templateObject101(),e,t,n,i):t,u=[[_1.default.instancePath,(0,Ki.strConcat)(_1.default.instancePath,a)],[_1.default.parentData,o.parentData],[_1.default.parentDataProperty,o.parentDataProperty],[_1.default.rootData,_1.default.rootData]];o.opts.dynamicRef&&u.push([_1.default.dynamicAnchors,_1.default.dynamicAnchors]);var p=(0,Ki._)(_templateObject102(),d,(_r1=r).object.apply(_r1,_to_consumable_array(u)));return l!==Ki.nil?(0,Ki._)(_templateObject103(),s,l,p):(0,Ki._)(_templateObject104(),s,p)};var fXr=function fXr(param,r){var e=param.gen,_param_it=param.it,t=_param_it.opts;var n=t.unicodeRegExp?"u":"",_t_code=t.code,i=_t_code.regExp,a=i(r,n);return e.scopeValue("pattern",{key:a.toString(),ref:a,code:(0,Ki._)(_templateObject105(),i.code==="new RegExp"?pXr:(0,aXr.useFunc)(e,i),r,n)})};var mXr=function mXr(e){var t=e.gen,r=e.data,n=e.keyword,i=e.it,a=t.name("valid");if(i.allErrors){var s=t.let("valid",!0);return o(function(){return t.assign(s,!1)}),s}return t.var(a,!0),o(function(){return t.break()}),a;function o(s){var l=t.const("len",(0,Ki._)(_templateObject106(),r));t.forRange("i",0,l,function(c){e.subschema({keyword:n,dataProp:c,dataPropType:Yue.Type.Num},a),t.if((0,Ki.not)(a),s)})}};var hXr=function hXr(e){var t=e.gen,r=e.schema,n=e.keyword,i=e.it;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some(function(l){return(0,Yue.alwaysValidSchema)(i,l)})&&!i.opts.unevaluated)return;var o=t.let("valid",!1),s=t.name("_valid");t.block(function(){return r.forEach(function(l,c){var d=e.subschema({keyword:n,schemaProp:c,compositeRule:!0},s);t.assign(o,(0,Ki._)(_templateObject107(),o,s)),e.mergeValidEvaluated(d,s)||t.if((0,Ki.not)(o))})}),e.result(o,function(){return e.reset()},function(){return e.error(!0)})};Object.defineProperty(_i,"__esModule",{value:!0});_i.validateUnion=_i.validateArray=_i.usePattern=_i.callValidateCode=_i.schemaProperties=_i.allSchemaProperties=_i.noPropertyInData=_i.propertyInData=_i.isOwnProperty=_i.hasPropFunc=_i.reportMissingProp=_i.checkMissingProp=_i.checkReportMissingProp=void 0;var Ki=Xr(),Yue=$n(),_1=$h(),aXr=$n();_i.checkReportMissingProp=oXr;_i.checkMissingProp=sXr;_i.reportMissingProp=lXr;_i.hasPropFunc=$mt;_i.isOwnProperty=Xue;_i.propertyInData=uXr;_i.noPropertyInData=ece;_i.allSchemaProperties=Nmt;_i.schemaProperties=cXr;_i.callValidateCode=dXr;var pXr=(0,Ki._)(_templateObject108());_i.usePattern=fXr;_i.validateArray=mXr;_i.validateUnion=hXr});var Lmt=P(function(Hf){"use strict";var vXr=function vXr(e,t){var r=e.gen,n=e.keyword,i=e.schema,a=e.parentSchema,o=e.it,s=t.macro.call(o.self,i,a,o),l=qmt(r,n,s);o.opts.validateSchema!==!1&&o.self.validateSchema(s,!0);var c=r.name("valid");e.subschema({schema:s,schemaPath:kl.nil,errSchemaPath:"".concat(o.errSchemaPath,"/").concat(n),topSchemaRef:l,compositeRule:!0},c),e.pass(c,function(){return e.error(!0)})};var yXr=function yXr(e,t){var r;var n=e.gen,i=e.keyword,a=e.schema,o=e.parentSchema,s=e.$data,l=e.it;bXr(l,t);var c=!s&&t.compile?t.compile.call(l.self,a,o,l):t.validate,d=qmt(n,i,c),u=n.let("valid");e.block$data(u,p),e.ok((r=t.valid)!==null&&r!==void 0?r:u);function p(){if(t.errors===!1)g(),t.modifying&&Dmt(e),x(function(){return e.error()});else{var y=t.async?m():h();t.modifying&&Dmt(e),x(function(){return _Xr(e,y)})}}function m(){var y=n.let("ruleErrs",null);return n.try(function(){return g((0,kl._)(_templateObject109()))},function(v){return n.assign(u,!1).if((0,kl._)(_templateObject110(),v,l.ValidationError),function(){return n.assign(y,(0,kl._)(_templateObject111(),v))},function(){return n.throw(v)})}),y}function h(){var y=(0,kl._)(_templateObject112(),d);return n.assign(y,null),g(kl.nil),y}function g(){var y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:t.async?(0,kl._)(_templateObject113()):kl.nil;var v=l.opts.passContext?ky.default.this:ky.default.self,_=!("compile"in t&&!s||t.schema===!1);n.assign(u,(0,kl._)(_templateObject114(),y,(0,gXr.callValidateCode)(e,d,v,_)),t.modifying)}function x(y){var v;n.if((0,kl.not)((v=t.valid)!==null&&v!==void 0?v:u),y)}};var Dmt=function Dmt(e){var t=e.gen,r=e.data,n=e.it;t.if(n.parentData,function(){return t.assign(r,(0,kl._)(_templateObject115(),n.parentData,n.parentDataProperty))})};var _Xr=function _Xr(e,t){var r=e.gen;r.if((0,kl._)(_templateObject116(),t),function(){r.assign(ky.default.vErrors,(0,kl._)(_templateObject117(),ky.default.vErrors,t,ky.default.vErrors,t)).assign(ky.default.errors,(0,kl._)(_templateObject118(),ky.default.vErrors)),(0,xXr.extendErrors)(e)},function(){return e.error()})};var bXr=function bXr(param,t){var e=param.schemaEnv;if(t.async&&!e.$async)throw new Error("async keyword in sync schema")};var qmt=function qmt(e,t,r){if(r===void 0)throw new Error('keyword "'.concat(t,'" failed to compile'));return e.scopeValue("keyword",typeof r=="function"?{ref:r}:{ref:r,code:(0,kl.stringify)(r)})};var wXr=function wXr(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return!t.length||t.some(function(n){return n==="array"?Array.isArray(e):n==="object"?e&&(typeof e==="undefined"?"undefined":_type_of(e))=="object"&&!Array.isArray(e):(typeof e==="undefined"?"undefined":_type_of(e))==n||r&&typeof e=="undefined"})};var SXr=function SXr(param,i,a){var e=param.schema,t=param.opts,r=param.self,n=param.errSchemaPath;if(Array.isArray(i.keyword)?!i.keyword.includes(a):i.keyword!==a)throw new Error("ajv implementation error");var o=i.dependencies;if(o!=null&&o.some(function(s){return!Object.prototype.hasOwnProperty.call(e,s)}))throw new Error("parent schema must have dependencies of ".concat(a,": ").concat(o.join(",")));if(i.validateSchema&&!i.validateSchema(e[a])){var l='keyword "'.concat(a,'" value is invalid at path "').concat(n,'": ')+r.errorsText(i.validateSchema.errors);if(t.validateSchema==="log")r.logger.error(l);else throw new Error(l)}};Object.defineProperty(Hf,"__esModule",{value:!0});Hf.validateKeywordUsage=Hf.validSchemaType=Hf.funcKeywordCode=Hf.macroKeywordCode=void 0;var kl=Xr(),ky=$h(),gXr=fd(),xXr=T7();Hf.macroKeywordCode=vXr;Hf.funcKeywordCode=yXr;Hf.validSchemaType=wXr;Hf.validateKeywordUsage=SXr});var zmt=P(function(b1){"use strict";var kXr=function kXr(e,param){var t=param.keyword,r=param.schemaProp,n=param.schema,i=param.schemaPath,a=param.errSchemaPath,o=param.topSchemaRef;if(t!==void 0&&n!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(t!==void 0){var s=e.schema[t];return r===void 0?{schema:s,schemaPath:(0,Zf._)(_templateObject119(),e.schemaPath,(0,Zf.getProperty)(t)),errSchemaPath:"".concat(e.errSchemaPath,"/").concat(t)}:{schema:s[r],schemaPath:(0,Zf._)(_templateObject120(),e.schemaPath,(0,Zf.getProperty)(t),(0,Zf.getProperty)(r)),errSchemaPath:"".concat(e.errSchemaPath,"/").concat(t,"/").concat((0,Fmt.escapeFragment)(r))}}if(n!==void 0){if(i===void 0||a===void 0||o===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:n,schemaPath:i,topSchemaRef:o,errSchemaPath:a}}throw new Error('either "keyword" or "schema" must be passed')};var EXr=function EXr(e,t,param){var r=param.dataProp,n=param.dataPropType,i=param.data,a=param.dataTypes,o=param.propertyName;if(i!==void 0&&r!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');var s=t.gen;if(r!==void 0){var c=t.errorPath,d=t.dataPathArr,u=t.opts,p=s.let("data",(0,Zf._)(_templateObject121(),t.data,(0,Zf.getProperty)(r)),!0);l(p),e.errorPath=(0,Zf.str)(_templateObject122(),c,(0,Fmt.getErrorPath)(r,n,u.jsPropertySyntax)),e.parentDataProperty=(0,Zf._)(_templateObject123(),r),e.dataPathArr=_to_consumable_array(d).concat([e.parentDataProperty])}if(i!==void 0){var c2=_instanceof(i,Zf.Name)?i:s.let("data",i,!0);l(c2),o!==void 0&&(e.propertyName=o)}a&&(e.dataTypes=a);function l(c){e.data=c,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=_to_consumable_array(t.dataNames).concat([c])}};var TXr=function TXr(e,param){var t=param.jtdDiscriminator,r=param.jtdMetadata,n=param.compositeRule,i=param.createErrors,a=param.allErrors;n!==void 0&&(e.compositeRule=n),i!==void 0&&(e.createErrors=i),a!==void 0&&(e.allErrors=a),e.jtdDiscriminator=t,e.jtdMetadata=r};Object.defineProperty(b1,"__esModule",{value:!0});b1.extendSubschemaMode=b1.extendSubschemaData=b1.getSubschema=void 0;var Zf=Xr(),Fmt=$n();b1.getSubschema=kXr;b1.extendSubschemaData=EXr;b1.extendSubschemaMode=TXr});var tce=P(function(_xi,jmt){"use strict";jmt.exports=function e(t,r){if(t===r)return!0;if(t&&r&&(typeof t==="undefined"?"undefined":_type_of(t))=="object"&&(typeof r==="undefined"?"undefined":_type_of(r))=="object"){if(t.constructor!==r.constructor)return!1;var n,i,a;if(Array.isArray(t)){if(n=t.length,n!=r.length)return!1;for(i=n;i--!==0;)if(!e(t[i],r[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(a=Object.keys(t),n=a.length,n!==Object.keys(r).length)return!1;for(i=n;i--!==0;)if(!Object.prototype.hasOwnProperty.call(r,a[i]))return!1;for(i=n;i--!==0;){var o=a[i];if(!e(t[o],r[o]))return!1}return!0}return t!==t&&r!==r}});var Bmt=P(function(bxi,Umt){"use strict";var IXr=function IXr(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")};var w1=Umt.exports=function w1(e,t,r){typeof t=="function"&&(r=t,t={}),r=t.cb||r;var n=typeof r=="function"?r:r.pre||function(){},i=r.post||function(){};KF(t,n,i,e,"",e)};w1.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};w1.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};w1.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};w1.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function KF(e,t,r,n,i,a,o,s,l,c){if(n&&(typeof n==="undefined"?"undefined":_type_of(n))=="object"&&!Array.isArray(n)){t(n,i,a,o,s,l,c);for(var d in n){var u=n[d];if(Array.isArray(u)){if(d in w1.arrayKeywords)for(var p=0;p1&&arguments[1]!==void 0?arguments[1]:!0;return typeof e=="boolean"?!0:t===!0?!rce(e):t?Wmt(e)<=t:!1};var Vmt=function Vmt(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",r=arguments.length>2?arguments[2]:void 0;r!==!1&&(t=w6(t));var n=e.parse(t);return Gmt(e,n)};var Gmt=function Gmt(e,t){return e.serialize(t).split("#")[0]+"#"};var w6=function w6(e){return e?e.replace($Xr,""):""};var NXr=function NXr(e,t,r){return r=w6(r),e.resolve(t,r)};var qXr=function qXr(e,t){var _this=this;if(typeof e=="boolean")return{};var _this_opts=this.opts,r=_this_opts.schemaId,n=_this_opts.uriResolver,i=w6(e[r]||t),a={"":i},o=Vmt(n,i,!1),s={},l=new Set;return PXr(e,{allKeys:!0},function(u,p,m,h){var y=function y(_){var b=this.opts.uriResolver.resolve;if(_=w6(x?b(x,_):_),l.has(_))throw d(_);l.add(_);var k=this.refs[_];return typeof k=="string"&&(k=this.refs[k]),(typeof k==="undefined"?"undefined":_type_of(k))=="object"?c(u,k.schema,_):_!==w6(g)&&(_[0]==="#"?(c(u,s[_],_),s[_]=u):this.refs[_]=g),_};var v=function v(_){if(typeof _=="string"){if(!DXr.test(_))throw new Error('invalid anchor "'.concat(_,'"'));y.call(this,"#".concat(_))}};if(h===void 0)return;var g=o+p,x=a[h];typeof u[r]=="string"&&(x=y.call(_this,u[r])),v.call(_this,u.$anchor),v.call(_this,u.$dynamicAnchor),a[p]=x}),s;function c(u,p,m){if(p!==void 0&&!AXr(u,p))throw d(m)}function d(u){return new Error('reference "'.concat(u,'" resolves to more than one schema'))}};Object.defineProperty(bu,"__esModule",{value:!0});bu.getSchemaRefs=bu.resolveUrl=bu.normalizeId=bu._getFullPath=bu.getFullPath=bu.inlineRef=void 0;var CXr=$n(),AXr=tce(),PXr=Bmt(),OXr=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);bu.inlineRef=RXr;var MXr=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function rce(e){for(var t in e){if(MXr.has(t))return!0;var r=e[t];if(Array.isArray(r)&&r.some(rce)||(typeof r==="undefined"?"undefined":_type_of(r))=="object"&&rce(r))return!0}return!1}function Wmt(e){var t=0;for(var r in e){if(r==="$ref")return 1/0;if(t++,!OXr.has(r)&&(_type_of(e[r])=="object"&&(0,CXr.eachItem)(e[r],function(n){return t+=Wmt(n)}),t===1/0))return 1/0}return t}bu.getFullPath=Vmt;bu._getFullPath=Gmt;var $Xr=/#\/?$/;bu.normalizeId=w6;bu.resolveUrl=NXr;var DXr=/^[a-z_][-a-z0-9._]*$/i;bu.getSchemaRefs=qXr});var O7=P(function(S1){"use strict";var zXr=function zXr(e){if(eht(e)&&(tht(e),Xmt(e))){BXr(e);return}Ymt(e,function(){return(0,Jmt.topBoolOrEmptySchema)(e)})};var Ymt=function Ymt(param,a){var e=param.gen,t=param.validateName,r=param.schema,n=param.schemaEnv,i=param.opts;i.code.es5?e.func(t,(0,Jt._)(_templateObject124(),Tr.default.data,Tr.default.valCxt),n.$async,function(){e.code((0,Jt._)(_templateObject125(),Zmt(r,i))),UXr(e,i),e.code(a)}):e.func(t,(0,Jt._)(_templateObject126(),Tr.default.data,jXr(i)),n.$async,function(){return e.code(Zmt(r,i)).code(a)})};var jXr=function jXr(e){return(0,Jt._)(_templateObject128(),Tr.default.instancePath,Tr.default.parentData,Tr.default.parentDataProperty,Tr.default.rootData,Tr.default.data,e.dynamicRef?(0,Jt._)(_templateObject127(),Tr.default.dynamicAnchors):Jt.nil)};var UXr=function UXr(e,t){e.if(Tr.default.valCxt,function(){e.var(Tr.default.instancePath,(0,Jt._)(_templateObject129(),Tr.default.valCxt,Tr.default.instancePath)),e.var(Tr.default.parentData,(0,Jt._)(_templateObject130(),Tr.default.valCxt,Tr.default.parentData)),e.var(Tr.default.parentDataProperty,(0,Jt._)(_templateObject131(),Tr.default.valCxt,Tr.default.parentDataProperty)),e.var(Tr.default.rootData,(0,Jt._)(_templateObject132(),Tr.default.valCxt,Tr.default.rootData)),t.dynamicRef&&e.var(Tr.default.dynamicAnchors,(0,Jt._)(_templateObject133(),Tr.default.valCxt,Tr.default.dynamicAnchors))},function(){e.var(Tr.default.instancePath,(0,Jt._)(_templateObject134())),e.var(Tr.default.parentData,(0,Jt._)(_templateObject135())),e.var(Tr.default.parentDataProperty,(0,Jt._)(_templateObject136())),e.var(Tr.default.rootData,Tr.default.data),t.dynamicRef&&e.var(Tr.default.dynamicAnchors,(0,Jt._)(_templateObject137()))})};var BXr=function BXr(e){var t=e.schema,r=e.opts,n=e.gen;Ymt(e,function(){r.$comment&&t.$comment&&nht(e),ZXr(e),n.let(Tr.default.vErrors,null),n.let(Tr.default.errors,0),r.unevaluated&&WXr(e),rht(e),JXr(e)})};var WXr=function WXr(e){var t=e.gen,r=e.validateName;e.evaluated=t.const("evaluated",(0,Jt._)(_templateObject138(),r)),t.if((0,Jt._)(_templateObject139(),e.evaluated),function(){return t.assign((0,Jt._)(_templateObject140(),e.evaluated),(0,Jt._)(_templateObject141()))}),t.if((0,Jt._)(_templateObject142(),e.evaluated),function(){return t.assign((0,Jt._)(_templateObject143(),e.evaluated),(0,Jt._)(_templateObject144()))})};var Zmt=function Zmt(e,t){var r=(typeof e==="undefined"?"undefined":_type_of(e))=="object"&&e[t.schemaId];return r&&(t.code.source||t.code.process)?(0,Jt._)(_templateObject145(),r):Jt.nil};var VXr=function VXr(e,t){if(eht(e)&&(tht(e),Xmt(e))){GXr(e,t);return}(0,Jmt.boolOrEmptySchema)(e,t)};var Xmt=function Xmt(param){var e=param.schema,t=param.self;if(typeof e=="boolean")return!e;for(var r in e)if(t.RULES.all[r])return!0;return!1};var eht=function eht(e){return typeof e.schema!="boolean"};var GXr=function GXr(e,t){var r=e.schema,n=e.gen,i=e.opts;i.$comment&&r.$comment&&nht(e),KXr(e),QXr(e);var a=n.const("_errs",Tr.default.errors);rht(e,a),n.var(t,(0,Jt._)(_templateObject146(),a,Tr.default.errors))};var tht=function tht(e){(0,Nh.checkUnknownRules)(e),HXr(e)};var rht=function rht(e,t){if(e.opts.jtd)return Kmt(e,[],!1,t);var r=(0,Hmt.getSchemaTypes)(e.schema),n=(0,Hmt.coerceAndCheckDataType)(e,r);Kmt(e,r,!n,t)};var HXr=function HXr(e){var t=e.schema,r=e.errSchemaPath,n=e.opts,i=e.self;t.$ref&&n.ignoreKeywordsWithRef&&(0,Nh.schemaHasRulesButRef)(t,i.RULES)&&i.logger.warn('$ref: keywords ignored in schema at path "'.concat(r,'"'))};var ZXr=function ZXr(e){var t=e.schema,r=e.opts;t.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,Nh.checkStrictMode)(e,"default is ignored in the schema root")};var KXr=function KXr(e){var t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,FXr.resolveUrl)(e.opts.uriResolver,e.baseId,t))};var QXr=function QXr(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")};var nht=function nht(param){var e=param.gen,t=param.schemaEnv,r=param.schema,n=param.errSchemaPath,i=param.opts;var a=r.$comment;if(i.$comment===!0)e.code((0,Jt._)(_templateObject147(),Tr.default.self,a));else if(typeof i.$comment=="function"){var o=(0,Jt.str)(_templateObject148(),n),s=e.scopeValue("root",{ref:t.root});e.code((0,Jt._)(_templateObject149(),Tr.default.self,a,o,s))}};var JXr=function JXr(e){var t=e.gen,r=e.schemaEnv,n=e.validateName,i=e.ValidationError,a=e.opts;r.$async?t.if((0,Jt._)(_templateObject150(),Tr.default.errors),function(){return t.return(Tr.default.data)},function(){return t.throw((0,Jt._)(_templateObject151(),i,Tr.default.vErrors))}):(t.assign((0,Jt._)(_templateObject152(),n),Tr.default.vErrors),a.unevaluated&&YXr(e),t.return((0,Jt._)(_templateObject153(),Tr.default.errors)))};var YXr=function YXr(param){var e=param.gen,t=param.evaluated,r=param.props,n=param.items;_instanceof(r,Jt.Name)&&e.assign((0,Jt._)(_templateObject154(),t),r),_instanceof(n,Jt.Name)&&e.assign((0,Jt._)(_templateObject155(),t),n)};var Kmt=function Kmt(e,t,r,n){var i=e.gen,a=e.schema,o=e.data,s=e.allErrors,l=e.opts,c=e.self,d=c.RULES;if(a.$ref&&(l.ignoreKeywordsWithRef||!(0,Nh.schemaHasRulesButRef)(a,d))){i.block(function(){return aht(e,"$ref",d.all.$ref.definition)});return}l.jtd||XXr(e,t),i.block(function(){var _iteratorNormalCompletion=true,_didIteratorError=false,_iteratorError=undefined;try{for(var _iterator=d.rules[Symbol.iterator](),_step;!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=true){var p=_step.value;u(p)}}catch(err){_didIteratorError=true;_iteratorError=err}finally{try{if(!_iteratorNormalCompletion&&_iterator.return!=null){_iterator.return()}}finally{if(_didIteratorError){throw _iteratorError}}}u(d.post)});function u(p){(0,ice.shouldUseGroup)(a,p)&&(p.type?(i.if((0,QF.checkDataType)(p.type,o,l.strictNumbers)),Qmt(e,p),t.length===1&&t[0]===p.type&&r&&(i.else(),(0,QF.reportTypeError)(e)),i.endIf()):Qmt(e,p),s||i.if((0,Jt._)(_templateObject156(),Tr.default.errors,n||0)))}};var Qmt=function Qmt(e,t){var r=e.gen,n=e.schema,_e_opts=e.opts,i=_e_opts.useDefaults;i&&(0,LXr.assignDefaults)(e,t.type),r.block(function(){var _iteratorNormalCompletion=true,_didIteratorError=false,_iteratorError=undefined;try{for(var _iterator=t.rules[Symbol.iterator](),_step;!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=true){var a=_step.value;(0,ice.shouldUseRule)(n,a)&&aht(e,a.keyword,a.definition,t.type)}}catch(err){_didIteratorError=true;_iteratorError=err}finally{try{if(!_iteratorNormalCompletion&&_iterator.return!=null){_iterator.return()}}finally{if(_didIteratorError){throw _iteratorError}}}})};var XXr=function XXr(e,t){e.schemaEnv.meta||!e.opts.strictTypes||(een(e,t),e.opts.allowUnionTypes||ten(e,t),ren(e,e.dataTypes))};var een=function een(e,t){if(t.length){if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach(function(r){iht(e.dataTypes,r)||ace(e,'type "'.concat(r,'" not allowed by context "').concat(e.dataTypes.join(","),'"'))}),ien(e,t)}};var ten=function ten(e,t){t.length>1&&!(t.length===2&&t.includes("null"))&&ace(e,"use allowUnionTypes to allow union type keyword")};var ren=function ren(e,t){var r=e.self.RULES.all;for(var n in r){var i=r[n];if((typeof i==="undefined"?"undefined":_type_of(i))=="object"&&(0,ice.shouldUseRule)(e.schema,i)){var _i_definition=i.definition,a=_i_definition.type;a.length&&!a.some(function(o){return nen(t,o)})&&ace(e,'missing type "'.concat(a.join(","),'" for keyword "').concat(n,'"'))}}};var nen=function nen(e,t){return e.includes(t)||t==="number"&&e.includes("integer")};var iht=function iht(e,t){return e.includes(t)||t==="integer"&&e.includes("number")};var ien=function ien(e,t){var r=[];var _iteratorNormalCompletion=true,_didIteratorError=false,_iteratorError=undefined;try{for(var _iterator=e.dataTypes[Symbol.iterator](),_step;!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=true){var n=_step.value;iht(t,n)?r.push(n):t.includes("integer")&&n==="number"&&r.push("integer")}}catch(err){_didIteratorError=true;_iteratorError=err}finally{try{if(!_iteratorNormalCompletion&&_iterator.return!=null){_iterator.return()}}finally{if(_didIteratorError){throw _iteratorError}}}e.dataTypes=r};var ace=function ace(e,t){var r=e.schemaEnv.baseId+e.errSchemaPath;t+=' at "'.concat(r,'" (strictTypes)'),(0,Nh.checkStrictMode)(e,t,e.opts.strictTypes)};var aht=function aht(e,t,r,n){var i=new JF(e,r,t);"code"in r?r.code(i,n):i.$data&&r.validate?(0,P7.funcKeywordCode)(i,r):"macro"in r?(0,P7.macroKeywordCode)(i,r):(r.compile||r.validate)&&(0,P7.funcKeywordCode)(i,r)};var oht=function oht(e,param){var t=param.dataLevel,r=param.dataNames,n=param.dataPathArr;var i,a;if(e==="")return Tr.default.rootData;if(e[0]==="/"){if(!aen.test(e))throw new Error("Invalid JSON-pointer: ".concat(e));i=e,a=Tr.default.rootData}else{var c=oen.exec(e);if(!c)throw new Error("Invalid JSON-pointer: ".concat(e));var d=+c[1];if(i=c[2],i==="#"){if(d>=t)throw new Error(l("property/index",d));return n[t-d]}if(d>t)throw new Error(l("data",d));if(a=r[t-d],!i)return a}var o=a,s=i.split("/");var _iteratorNormalCompletion=true,_didIteratorError=false,_iteratorError=undefined;try{for(var _iterator=s[Symbol.iterator](),_step;!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=true){var c2=_step.value;c2&&(a=(0,Jt._)(_templateObject157(),a,(0,Jt.getProperty)((0,Nh.unescapeJsonPointer)(c2))),o=(0,Jt._)(_templateObject158(),o,a))}}catch(err){_didIteratorError=true;_iteratorError=err}finally{try{if(!_iteratorNormalCompletion&&_iterator.return!=null){_iterator.return()}}finally{if(_didIteratorError){throw _iteratorError}}}return o;function l(c,d){return"Cannot access ".concat(c," ").concat(d," levels up, current level is ").concat(t)}};Object.defineProperty(S1,"__esModule",{value:!0});S1.getData=S1.KeywordCxt=S1.validateFunctionCode=void 0;var Jmt=Tmt(),Hmt=I7(),ice=Zue(),QF=I7(),LXr=Mmt(),P7=Lmt(),nce=zmt(),Jt=Xr(),Tr=$h(),FXr=C7(),Nh=$n(),A7=T7();S1.validateFunctionCode=zXr;var JF=/*#__PURE__*/function(){function JF(t,r,n){_class_call_check(this,JF);if((0,P7.validateKeywordUsage)(t,r,n),this.gen=t.gen,this.allErrors=t.allErrors,this.keyword=n,this.data=t.data,this.schema=t.schema[n],this.$data=r.$data&&t.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,Nh.schemaRefOrVal)(t,this.schema,n,this.$data),this.schemaType=r.schemaType,this.parentSchema=t.schema,this.params={},this.it=t,this.def=r,this.$data)this.schemaCode=t.gen.const("vSchema",oht(this.$data,t));else if(this.schemaCode=this.schemaValue,!(0,P7.validSchemaType)(this.schema,r.schemaType,r.allowUndefined))throw new Error("".concat(n," value must be ").concat(JSON.stringify(r.schemaType)));("code"in r?r.trackErrors:r.errors!==!1)&&(this.errsCount=t.gen.const("_errs",Tr.default.errors))}_create_class(JF,[{key:"result",value:function result(t,r,n){this.failResult((0,Jt.not)(t),r,n)}},{key:"failResult",value:function failResult(t,r,n){this.gen.if(t),n?n():this.error(),r?(this.gen.else(),r(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}},{key:"pass",value:function pass(t,r){this.failResult((0,Jt.not)(t),void 0,r)}},{key:"fail",value:function fail(t){if(t===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(t),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}},{key:"fail$data",value:function fail$data(t){if(!this.$data)return this.fail(t);var _this=this,r=_this.schemaCode;this.fail((0,Jt._)(_templateObject159(),r,(0,Jt.or)(this.invalid$data(),t)))}},{key:"error",value:function error(t,r,n){if(r){this.setParams(r),this._error(t,n),this.setParams({});return}this._error(t,n)}},{key:"_error",value:function _error(t,r){(t?A7.reportExtraError:A7.reportError)(this,this.def.error,r)}},{key:"$dataError",value:function $dataError(){(0,A7.reportError)(this,this.def.$dataError||A7.keyword$DataError)}},{key:"reset",value:function reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,A7.resetErrorsCount)(this.gen,this.errsCount)}},{key:"ok",value:function ok1(t){this.allErrors||this.gen.if(t)}},{key:"setParams",value:function setParams(t,r){r?Object.assign(this.params,t):this.params=t}},{key:"block$data",value:function block$data(t,r){var _this=this;var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Jt.nil;this.gen.block(function(){_this.check$data(t,n),r()})}},{key:"check$data",value:function check$data(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Jt.nil,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Jt.nil;if(!this.$data)return;var _this=this,n=_this.gen,i=_this.schemaCode,a=_this.schemaType,o=_this.def;n.if((0,Jt.or)((0,Jt._)(_templateObject160(),i),r)),t!==Jt.nil&&n.assign(t,!0),(a.length||o.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),t!==Jt.nil&&n.assign(t,!1)),n.else()}},{key:"invalid$data",value:function invalid$data(){var _this=this,t=_this.gen,r=_this.schemaCode,n=_this.schemaType,i=_this.def,a=_this.it;return(0,Jt.or)(o(),s());function o(){if(n.length){if(!_instanceof(r,Jt.Name))throw new Error("ajv implementation error");var l=Array.isArray(n)?n:[n];return(0,Jt._)(_templateObject161(),(0,QF.checkDataTypes)(l,r,a.opts.strictNumbers,QF.DataType.Wrong))}return Jt.nil}function s(){if(i.validateSchema){var l=t.scopeValue("validate$data",{ref:i.validateSchema});return(0,Jt._)(_templateObject162(),l,r)}return Jt.nil}}},{key:"subschema",value:function subschema(t,r){var n=(0,nce.getSubschema)(this.it,t);(0,nce.extendSubschemaData)(n,this.it,t),(0,nce.extendSubschemaMode)(n,t);var i=_object_spread_props(_object_spread({},this.it,n),{items:void 0,props:void 0});return VXr(i,r),i}},{key:"mergeEvaluated",value:function mergeEvaluated(t,r){var _this=this,n=_this.it,i=_this.gen;n.opts.unevaluated&&(n.props!==!0&&t.props!==void 0&&(n.props=Nh.mergeEvaluated.props(i,t.props,n.props,r)),n.items!==!0&&t.items!==void 0&&(n.items=Nh.mergeEvaluated.items(i,t.items,n.items,r)))}},{key:"mergeValidEvaluated",value:function mergeValidEvaluated(t,r){var _this=this;var _this1=this,n=_this1.it,i=_this1.gen;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return i.if(r,function(){return _this.mergeEvaluated(t,Jt.Name)}),!0}}]);return JF}();S1.KeywordCxt=JF;var aen=/^\/(?:[^~]|~0|~1)*$/,oen=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;S1.getData=oht});var YF=P(function(sce){"use strict";Object.defineProperty(sce,"__esModule",{value:!0});var oce=/*#__PURE__*/function(Error1){_inherits(oce,Error1);function oce(t){_class_call_check(this,oce);var _this;_this=_call_super(this,oce,["validation failed"]),_this.errors=t,_this.ajv=_this.validation=!0;return _this}return oce}(_wrap_native_super(Error));sce.default=oce});var R7=P(function(cce){"use strict";Object.defineProperty(cce,"__esModule",{value:!0});var lce=C7(),uce=/*#__PURE__*/function(Error1){_inherits(uce,Error1);function uce(t,r,n,i){_class_call_check(this,uce);var _this;_this=_call_super(this,uce,[i||"can't resolve reference ".concat(n," from id ").concat(r)]),_this.missingRef=(0,lce.resolveUrl)(t,r,n),_this.missingSchema=(0,lce.normalizeId)((0,lce.getFullPath)(t,_this.missingRef));return _this}return uce}(_wrap_native_super(Error));cce.default=uce});var ez=P(function(md){"use strict";var pce=function pce(e){var t=lht.call(this,e);if(t)return t;var r=(0,bp.getFullPath)(this.opts.uriResolver,e.root.baseId),_this_opts_code=this.opts.code,n=_this_opts_code.es5,i=_this_opts_code.lines,_this_opts=this.opts,a=_this_opts.ownProperties,o=new _p.CodeGen(this.scope,{es5:n,lines:i,ownProperties:a}),s;e.$async&&(s=o.scopeValue("Error",{ref:sen.default,code:(0,_p._)(_templateObject163())}));var l=o.scopeName("validate");e.validateName=l;var c={gen:o,allErrors:this.opts.allErrors,data:Ey.default.data,parentData:Ey.default.parentData,parentDataProperty:Ey.default.parentDataProperty,dataNames:[Ey.default.data],dataPathArr:[_p.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:o.scopeValue("schema",this.opts.code.source===!0?{ref:e.schema,code:(0,_p.stringify)(e.schema)}:{ref:e.schema}),validateName:l,ValidationError:s,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:_p.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,_p._)(_templateObject164()),opts:this.opts,self:this},d;try{this._compilations.add(e),(0,len.validateFunctionCode)(c),o.optimize(this.opts.code.optimize);var _$u=o.toString();d="".concat(o.scopeRefs(Ey.default.scope),"return ").concat(_$u),this.opts.code.process&&(d=this.opts.code.process(d,e));var m=new Function("".concat(Ey.default.self),"".concat(Ey.default.scope),d)(this,this.scope.get());if(this.scope.value(l,{ref:m}),m.errors=null,m.schema=e.schema,m.schemaEnv=e,e.$async&&(m.$async=!0),this.opts.code.source===!0&&(m.source={validateName:l,validateCode:_$u,scopeValues:o._values}),this.opts.unevaluated){var h=c.props,g=c.items;m.evaluated={props:_instanceof(h,_p.Name)?void 0:h,items:_instanceof(g,_p.Name)?void 0:g,dynamicProps:_instanceof(h,_p.Name),dynamicItems:_instanceof(g,_p.Name)},m.source&&(m.source.evaluated=(0,_p.stringify)(m.evaluated))}return e.validate=m,e}catch(u){throw delete e.validate,delete e.validateName,d&&this.logger.error("Error compiling schema, function code:",d),u}finally{this._compilations.delete(e)}};var uen=function uen(e,t,r){var n;r=(0,bp.resolveUrl)(this.opts.uriResolver,t,r);var i=e.refs[r];if(i)return i;var a=pen.call(this,e,r);if(a===void 0){var o=(n=e.localRefs)===null||n===void 0?void 0:n[r],_this_opts=this.opts,s=_this_opts.schemaId;o&&(a=new S6({schema:o,schemaId:s,root:e,baseId:t}))}if(a!==void 0)return e.refs[r]=cen.call(this,a)};var cen=function cen(e){return(0,bp.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:pce.call(this,e)};var lht=function lht(e){var _iteratorNormalCompletion=true,_didIteratorError=false,_iteratorError=undefined;try{for(var _iterator=this._compilations[Symbol.iterator](),_step;!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=true){var t=_step.value;if(den(t,e))return t}}catch(err){_didIteratorError=true;_iteratorError=err}finally{try{if(!_iteratorNormalCompletion&&_iterator.return!=null){_iterator.return()}}finally{if(_didIteratorError){throw _iteratorError}}}};var den=function den(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId};var pen=function pen(e,t){var r;for(;typeof(r=this.refs[t])=="string";)t=r;return r||this.schemas[t]||XF.call(this,e,t)};var dce=function dce(e,param){var t=param.baseId,r=param.schema,n=param.root;var i;if(((i=e.fragment)===null||i===void 0?void 0:i[0])!=="/")return;var _iteratorNormalCompletion=true,_didIteratorError=false,_iteratorError=undefined;try{for(var _iterator=e.fragment.slice(1).split("/")[Symbol.iterator](),_step;!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=true){var s=_step.value;if(typeof r=="boolean")return;var l=r[(0,sht.unescapeFragment)(s)];if(l===void 0)return;r=l;var c=(typeof r==="undefined"?"undefined":_type_of(r))=="object"&&r[this.opts.schemaId];!fen.has(s)&&c&&(t=(0,bp.resolveUrl)(this.opts.uriResolver,t,c))}}catch(err){_didIteratorError=true;_iteratorError=err}finally{try{if(!_iteratorNormalCompletion&&_iterator.return!=null){_iterator.return()}}finally{if(_didIteratorError){throw _iteratorError}}}var a;if(typeof r!="boolean"&&r.$ref&&!(0,sht.schemaHasRulesButRef)(r,this.RULES)){var s2=(0,bp.resolveUrl)(this.opts.uriResolver,t,r.$ref);a=XF.call(this,n,s2)}var _this_opts=this.opts,o=_this_opts.schemaId;if(a=a||new S6({schema:r,schemaId:o,root:n,baseId:t}),a.schema!==a.root.schema)return a};Object.defineProperty(md,"__esModule",{value:!0});md.resolveSchema=md.getCompilingSchema=md.resolveRef=md.compileSchema=md.SchemaEnv=void 0;var _p=Xr(),sen=YF(),Ey=$h(),bp=C7(),sht=$n(),len=O7(),S6=function S6(t){_class_call_check(this,S6);var r;this.refs={},this.dynamicAnchors={};var n;_type_of(t.schema)=="object"&&(n=t.schema),this.schema=t.schema,this.schemaId=t.schemaId,this.root=t.root||this,this.baseId=(r=t.baseId)!==null&&r!==void 0?r:(0,bp.normalizeId)(n==null?void 0:n[t.schemaId||"$id"]),this.schemaPath=t.schemaPath,this.localRefs=t.localRefs,this.meta=t.meta,this.$async=n==null?void 0:n.$async,this.refs={}};md.SchemaEnv=S6;md.compileSchema=pce;md.resolveRef=uen;md.getCompilingSchema=lht;function XF(e,t){var r=this.opts.uriResolver.parse(t),n=(0,bp._getFullPath)(this.opts.uriResolver,r),i=(0,bp.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&n===i)return dce.call(this,r,e);var a=(0,bp.normalizeId)(n),o=this.refs[a]||this.schemas[a];if(typeof o=="string"){var s=XF.call(this,e,o);return _type_of(s==null?void 0:s.schema)!="object"?void 0:dce.call(this,r,s)}if(_type_of(o==null?void 0:o.schema)=="object"){if(o.validate||pce.call(this,o),a===(0,bp.normalizeId)(t)){var s2=o.schema,_this_opts=this.opts,l=_this_opts.schemaId,c=s2[l];return c&&(i=(0,bp.resolveUrl)(this.opts.uriResolver,i,c)),new S6({schema:s2,schemaId:l,root:e,baseId:i})}return dce.call(this,r,o)}}md.resolveSchema=XF;var fen=new Set(["properties","patternProperties","enum","dependencies","definitions"])});var uht=P(function(Ixi,men){men.exports={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}});var hce=P(function(Cxi,hht){"use strict";var mce=function mce(e){var t="",r=0,n=0;for(n=0;n=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";t+=e[n];break}for(n+=1;n=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";t+=e[n]}return t};var cht=function cht(e){return e.length=0,!0};var ven=function ven(e,t,r){if(e.length){var n=mce(e);if(n!=="")t.push(n);else return r.error=!0,!1;e.length=0}return!0};var yen=function yen(e){var t=0,r={error:!1,address:"",zone:""},n=[],i=[],a=!1,o=!1,s=ven;for(var l=0;l7){r.error=!0;break}l>0&&e[l-1]===":"&&(a=!0),n.push(":");continue}else if(c==="%"){if(!s(i,n,r))break;s=cht}else{i.push(c);continue}}return i.length&&(s===cht?r.zone=i.join(""):o?n.push(i.join("")):n.push(mce(i))),r.address=n.join(""),r};var fht=function fht(e){if(_en(e,":")<2)return{host:e,isIPV6:!1};var t=yen(e);if(t.error)return{host:e,isIPV6:!1};{var r=t.address,n=t.address;return t.zone&&(r+="%"+t.zone,n+="%25"+t.zone),{host:r,isIPV6:!0,escapedHost:n}}};var _en=function _en(e,t){var r=0;for(var n=0;n1&&arguments[1]!==void 0?arguments[1]:!1;if(e.indexOf("%")===-1)return e;var r="";for(var n=0;n65535))return"URI port is malformed."};var kht=function kht(e,t){var r=Object.assign({},t),n={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},i=!1,a=!1;r.reference==="suffix"&&(r.scheme?e=r.scheme+":"+e:e="//"+e);var o=e.match(rtn);o!==null&&o[1].indexOf("\\")!==-1&&(n.error="URI authority must not contain a literal backslash.",i=!0);var s=e.match(ttn);if(s){n.scheme=s[1],n.userinfo=s[3],n.host=s[4],n.port=parseInt(s[5],10),n.path=s[6]||"",n.query=s[7],n.fragment=s[8],isNaN(n.port)&&(n.port=s[5]);var l=ntn(n,s);if(l!==void 0&&(n.error=n.error||l,i=!0),n.host)if(Ken(n.host)===!1){var u=Ben(n.host);n.host=u.host.toLowerCase(),a=u.isIPV6}else a=!0;n.scheme===void 0&&n.userinfo===void 0&&n.host===void 0&&n.port===void 0&&n.query===void 0&&!n.path?n.reference="same-document":n.scheme===void 0?n.reference="relative":n.fragment===void 0?n.reference="absolute":n.reference="uri",r.reference&&r.reference!=="suffix"&&r.reference!==n.reference&&(n.error=n.error||"URI is not a "+r.reference+" reference.");var c=wht(r.scheme||n.scheme);if(!r.unicodeSupport&&(!c||!c.unicodeSupport)&&n.host&&(r.domainHost||c&&c.domainHost)&&a===!1&&Qen(n.host))try{n.host=new URL("http://"+n.host).hostname}catch(d){n.error=n.error||"Host's domain name can not be converted to ASCII: "+d}if((!c||c&&!c.skipNormalize)&&(e.indexOf("%")!==-1&&(n.scheme!==void 0&&(n.scheme=unescape(n.scheme)),n.host!==void 0&&(n.host=Zen(unescape(n.host),a))),n.path&&(n.path=Gen(n.path)),n.fragment))try{n.fragment=encodeURI(decodeURIComponent(n.fragment))}catch(d){n.error=n.error||"URI malformed"}c&&c.parse&&c.parse(n,r)}else n.error=n.error||"URI can not be parsed.";return{parsed:n,malformedAuthorityOrPort:i}};var k6=function k6(e,t){return kht(e,t).parsed};var itn=function itn(e,t){return Eht(e,t).normalized};var Eht=function Eht(e,t){var _kht=kht(e,t),r=_kht.parsed,n=_kht.malformedAuthorityOrPort;return{normalized:n?e:Ty(r,t),malformedAuthorityOrPort:n}};var bht=function bht(e,t){if(typeof e=="string"){var _Eht=Eht(e,t),r=_Eht.normalized,n=_Eht.malformedAuthorityOrPort;return n?void 0:r}if((typeof e==="undefined"?"undefined":_type_of(e))=="object")return Ty(e,t)};var _hce=hce(),Ben=_hce.normalizeIPv6,M7=_hce.removeDotSegments,Wen=_hce.recomposeAuthority,Ven=_hce.normalizePercentEncoding,Gen=_hce.normalizePathEncoding,Hen=_hce.escapePreservingEscapes,Zen=_hce.reescapeHostDelimiters,Ken=_hce.isIPv4,Qen=_hce.nonSimpleDomain,_ht1=_ht(),Jen=_ht1.SCHEMES,wht=_ht1.getSchemeHandler;var ttn=RegExp("^(?:([^#/:?]+):)?(?:\\/\\/((?:([^#/?@]*)@)?(\\[[^#/?\\]]+\\]|[^#/:?]*)(?::(\\d*))?))?([^#?]*)(?:\\?([^#]*))?(?:#((?:.|[\\n\\r])*))?","u"),rtn=/^(?:[^#/:?]+:)?\/\/([^/?#]*)/;var vce={SCHEMES:Jen,normalize:Yen,resolve:Xen,resolveComponent:Sht,equal:etn,serialize:Ty,parse:k6};nz.exports=vce;nz.exports.default=vce;nz.exports.fastUri=vce});var Cht=P(function(yce){"use strict";Object.defineProperty(yce,"__esModule",{value:!0});var Iht=Tht();Iht.code='require("ajv/dist/runtime/uri").default';yce.default=Iht});var Dht=P(function(Ts){"use strict";var mtn=function mtn(e){var t,r,n,i,a,o,s,l,c,d,u,p,m,h,g,x,y,v,_,b,k,w,S,E,T;var I=e.strict,A=(t=e.code)===null||t===void 0?void 0:t.optimize,O=A===!0||A===void 0?1:A||0,R=(n=(r=e.code)===null||r===void 0?void 0:r.regExp)!==null&&n!==void 0?n:$ht,M=(i=e.uriResolver)!==null&&i!==void 0?i:utn.default;return{strictSchema:(o=(a=e.strictSchema)!==null&&a!==void 0?a:I)!==null&&o!==void 0?o:!0,strictNumbers:(l=(s=e.strictNumbers)!==null&&s!==void 0?s:I)!==null&&l!==void 0?l:!0,strictTypes:(d=(c=e.strictTypes)!==null&&c!==void 0?c:I)!==null&&d!==void 0?d:"log",strictTuples:(p=(u=e.strictTuples)!==null&&u!==void 0?u:I)!==null&&p!==void 0?p:"log",strictRequired:(h=(m=e.strictRequired)!==null&&m!==void 0?m:I)!==null&&h!==void 0?h:!1,code:e.code?_object_spread_props(_object_spread({},e.code),{optimize:O,regExp:R}):{optimize:O,regExp:R},loopRequired:(g=e.loopRequired)!==null&&g!==void 0?g:Pht,loopEnum:(x=e.loopEnum)!==null&&x!==void 0?x:Pht,meta:(y=e.meta)!==null&&y!==void 0?y:!0,messages:(v=e.messages)!==null&&v!==void 0?v:!0,inlineRefs:(_=e.inlineRefs)!==null&&_!==void 0?_:!0,schemaId:(b=e.schemaId)!==null&&b!==void 0?b:"$id",addUsedSchema:(k=e.addUsedSchema)!==null&&k!==void 0?k:!0,validateSchema:(w=e.validateSchema)!==null&&w!==void 0?w:!0,validateFormats:(S=e.validateFormats)!==null&&S!==void 0?S:!0,unicodeRegExp:(E=e.unicodeRegExp)!==null&&E!==void 0?E:!0,int32range:(T=e.int32range)!==null&&T!==void 0?T:!0,uriResolver:M}};var Oht=function Oht(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"error";for(var i in e){var a=i;a in t&&this.logger[n]("".concat(r,": option ").concat(i,". ").concat(e[a]))}};var Rht=function Rht(e){return e=(0,N7.normalizeId)(e),this.schemas[e]||this.refs[e]};var htn=function htn(){var e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(var t in e)this.addSchema(e[t],t)};var gtn=function gtn(){for(var e in this.opts.formats){var t=this.opts.formats[e];t&&this.addFormat(e,t)}};var xtn=function xtn(e){if(Array.isArray(e)){this.addVocabulary(e);return}this.logger.warn("keywords option as map is deprecated, pass array");for(var t in e){var r=e[t];r.keyword||(r.keyword=t),this.addKeyword(r)}};var vtn=function vtn(){var e=_object_spread({},this.opts);var _iteratorNormalCompletion=true,_didIteratorError=false,_iteratorError=undefined;try{for(var _iterator=ctn[Symbol.iterator](),_step;!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=true){var t=_step.value;delete e[t]}}catch(err){_didIteratorError=true;_iteratorError=err}finally{try{if(!_iteratorNormalCompletion&&_iterator.return!=null){_iterator.return()}}finally{if(_didIteratorError){throw _iteratorError}}}return e};var _tn=function _tn(e){if(e===!1)return ytn;if(e===void 0)return console;if(e.log&&e.warn&&e.error)return e;throw new Error("logger must implement log, warn and error methods")};var wtn=function wtn(e,t){var _this=this,r=_this.RULES;if((0,bce.eachItem)(e,function(n){if(r.keywords[n])throw new Error("Keyword ".concat(n," is already defined"));if(!btn.test(n))throw new Error("Keyword ".concat(n," has invalid name"))}),!!t&&t.$data&&!("code"in t||"validate"in t))throw new Error('$data keyword must have "code" or "validate" function')};var _ce=function _ce(e,t,r){var _this=this;var n;var i=t==null?void 0:t.post;if(r&&i)throw new Error('keyword with "post" flag cannot have "type"');var _this1=this,a=_this1.RULES,o=i?a.post:a.rules.find(function(param){var l=param.type;return l===r});if(o||(o={type:r,rules:[]},a.rules.push(o)),a.keywords[e]=!0,!t)return;var s={keyword:e,definition:_object_spread_props(_object_spread({},t),{type:(0,iz.getJSONTypes)(t.type),schemaType:(0,iz.getJSONTypes)(t.schemaType)})};t.before?Stn.call(this,o,s,t.before):o.rules.push(s),a.all[e]=s,(n=t.implements)===null||n===void 0||n.forEach(function(l){return _this.addKeyword(l)})};var Stn=function Stn(e,t,r){var n=e.rules.findIndex(function(i){return i.keyword===r});n>=0?e.rules.splice(n,0,t):(e.rules.push(t),this.logger.warn("rule ".concat(r," is not defined")))};var ktn=function ktn(e){var t=e.metaSchema;t!==void 0&&(e.$data&&this.opts.$data&&(t=Nht(t)),e.validateSchema=this.compile(t,!0))};var Nht=function Nht(e){return{anyOf:[e,Etn]}};Object.defineProperty(Ts,"__esModule",{value:!0});Ts.CodeGen=Ts.Name=Ts.nil=Ts.stringify=Ts.str=Ts._=Ts.KeywordCxt=void 0;var atn=O7();Object.defineProperty(Ts,"KeywordCxt",{enumerable:!0,get:function get1(){return atn.KeywordCxt}});var E6=Xr();Object.defineProperty(Ts,"_",{enumerable:!0,get:function get1(){return E6._}});Object.defineProperty(Ts,"str",{enumerable:!0,get:function get1(){return E6.str}});Object.defineProperty(Ts,"stringify",{enumerable:!0,get:function get1(){return E6.stringify}});Object.defineProperty(Ts,"nil",{enumerable:!0,get:function get1(){return E6.nil}});Object.defineProperty(Ts,"Name",{enumerable:!0,get:function get1(){return E6.Name}});Object.defineProperty(Ts,"CodeGen",{enumerable:!0,get:function get1(){return E6.CodeGen}});var otn=YF(),Mht=R7(),stn=Hue(),$7=ez(),ltn=Xr(),N7=C7(),iz=I7(),bce=$n(),Aht=uht(),utn=Cht(),$ht=function(e,t){return new RegExp(e,t)};$ht.code="new RegExp";var ctn=["removeAdditional","useDefaults","coerceTypes"],dtn=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),ptn={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},ftn={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},Pht=200;var D7=/*#__PURE__*/function(){function D7(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};_class_call_check(this,D7);this.schemas={},this.refs={},this.formats=Object.create(null),this._compilations=new Set,this._loading={},this._cache=new Map,t=this.opts=_object_spread({},t,mtn(t));var _this_opts_code=this.opts.code,r=_this_opts_code.es5,n=_this_opts_code.lines;this.scope=new ltn.ValueScope({scope:{},prefixes:dtn,es5:r,lines:n}),this.logger=_tn(t.logger);var i=t.validateFormats;t.validateFormats=!1,this.RULES=(0,stn.getRules)(),Oht.call(this,ptn,t,"NOT SUPPORTED"),Oht.call(this,ftn,t,"DEPRECATED","warn"),this._metaOpts=vtn.call(this),t.formats&>n.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),t.keywords&&xtn.call(this,t.keywords),_type_of(t.meta)=="object"&&this.addMetaSchema(t.meta),htn.call(this),t.validateFormats=i}_create_class(D7,[{key:"_addVocabularies",value:function _addVocabularies(){this.addKeyword("$async")}},{key:"_addDefaultMetaSchema",value:function _addDefaultMetaSchema(){var _this_opts=this.opts,t=_this_opts.$data,r=_this_opts.meta,n=_this_opts.schemaId,i=Aht;n==="id"&&(i=_object_spread({},Aht),i.id=i.$id,delete i.$id),r&&t&&this.addMetaSchema(i,i[n],!1)}},{key:"defaultMeta",value:function defaultMeta(){var _this_opts=this.opts,t=_this_opts.meta,r=_this_opts.schemaId;return this.opts.defaultMeta=(typeof t==="undefined"?"undefined":_type_of(t))=="object"?t[r]||t:void 0}},{key:"validate",value:function validate(t,r){var n;if(typeof t=="string"){if(n=this.getSchema(t),!n)throw new Error('no schema with key or ref "'.concat(t,'"'))}else n=this.compile(t);var i=n(r);return"$async"in n||(this.errors=n.errors),i}},{key:"compile",value:function compile(t,r){var n=this._addSchema(t,r);return n.validate||this._compileSchemaEnv(n)}},{key:"compileAsync",value:function compileAsync(t,r){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");var _this_opts=this.opts,n=_this_opts.loadSchema;return i.call(this,t,r);function i(d,u){return _async_to_generator(function(){var p;return _ts_generator(this,function(_state){switch(_state.label){case 0:return[4,a.call(this,d.$schema)];case 1:_state.sent();p=this._addSchema(d,u);return[2,p.validate||o.call(this,p)]}})}).call(this)}function a(d){return _async_to_generator(function(){var _tmp;return _ts_generator(this,function(_state){switch(_state.label){case 0:_tmp=d&&!this.getSchema(d);if(!_tmp)return[3,2];return[4,i.call(this,{$ref:d},!0)];case 1:_tmp=_state.sent();_state.label=2;case 2:_tmp;return[2]}})}).call(this)}function o(d){return _async_to_generator(function(){var u;return _ts_generator(this,function(_state){switch(_state.label){case 0:_state.trys.push([0,1,,3]);return[2,this._compileSchemaEnv(d)];case 1:u=_state.sent();if(!_instanceof(u,Mht.default))throw u;s.call(this,u);return[4,l.call(this,u.missingSchema)];case 2:return[2,(_state.sent(),o.call(this,d))];case 3:return[2]}})}).call(this)}function s(param){var d=param.missingSchema,u=param.missingRef;if(this.refs[d])throw new Error("AnySchema ".concat(d," is loaded but ").concat(u," cannot be resolved"))}function l(d){return _async_to_generator(function(){var u,_tmp;return _ts_generator(this,function(_state){switch(_state.label){case 0:return[4,c.call(this,d)];case 1:u=_state.sent();_tmp=this.refs[d];if(_tmp)return[3,3];return[4,a.call(this,u.$schema)];case 2:_tmp=_state.sent();_state.label=3;case 3:_tmp,this.refs[d]||this.addSchema(u,d,r);return[2]}})}).call(this)}function c(d){return _async_to_generator(function(){var u;return _ts_generator(this,function(_state){switch(_state.label){case 0:u=this._loading[d];if(u)return[2,u];_state.label=1;case 1:_state.trys.push([1,,3,4]);return[4,this._loading[d]=n(d)];case 2:return[2,_state.sent()];case 3:delete this._loading[d];return[7];case 4:return[2]}})}).call(this)}}},{key:"addSchema",value:function addSchema(t,r,n){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:this.opts.validateSchema;if(Array.isArray(t)){var _iteratorNormalCompletion=true,_didIteratorError=false,_iteratorError=undefined;try{for(var _iterator=t[Symbol.iterator](),_step;!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=true){var o=_step.value;this.addSchema(o,void 0,n,i)}}catch(err){_didIteratorError=true;_iteratorError=err}finally{try{if(!_iteratorNormalCompletion&&_iterator.return!=null){_iterator.return()}}finally{if(_didIteratorError){throw _iteratorError}}}return this}var a;if((typeof t==="undefined"?"undefined":_type_of(t))=="object"){var _this_opts=this.opts,o3=_this_opts.schemaId;if(a=t[o3],a!==void 0&&typeof a!="string")throw new Error("schema ".concat(o3," must be string"))}return r=(0,N7.normalizeId)(r||a),this._checkUnique(r),this.schemas[r]=this._addSchema(t,n,r,i,!0),this}},{key:"addMetaSchema",value:function addMetaSchema(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.opts.validateSchema;return this.addSchema(t,r,!0,n),this}},{key:"validateSchema",value:function validateSchema(t,r){if(typeof t=="boolean")return!0;var n;if(n=t.$schema,n!==void 0&&typeof n!="string")throw new Error("$schema must be a string");if(n=n||this.opts.defaultMeta||this.defaultMeta(),!n)return this.logger.warn("meta-schema not available"),this.errors=null,!0;var i=this.validate(n,t);if(!i&&r){var a="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(a);else throw new Error(a)}return i}},{key:"getSchema",value:function getSchema(t){var r;for(;typeof(r=Rht.call(this,t))=="string";)t=r;if(r===void 0){var _this_opts=this.opts,n=_this_opts.schemaId,i=new $7.SchemaEnv({schema:{},schemaId:n});if(r=$7.resolveSchema.call(this,i,t),!r)return;this.refs[t]=r}return r.validate||this._compileSchemaEnv(r)}},{key:"removeSchema",value:function removeSchema(t){if(_instanceof(t,RegExp))return this._removeAllSchemas(this.schemas,t),this._removeAllSchemas(this.refs,t),this;switch(typeof t==="undefined"?"undefined":_type_of(t)){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{var r=Rht.call(this,t);return(typeof r==="undefined"?"undefined":_type_of(r))=="object"&&this._cache.delete(r.schema),delete this.schemas[t],delete this.refs[t],this}case"object":{var r2=t;this._cache.delete(r2);var n=t[this.opts.schemaId];return n&&(n=(0,N7.normalizeId)(n),delete this.schemas[n],delete this.refs[n]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}},{key:"addVocabulary",value:function addVocabulary(t){var _iteratorNormalCompletion=true,_didIteratorError=false,_iteratorError=undefined;try{for(var _iterator=t[Symbol.iterator](),_step;!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=true){var r=_step.value;this.addKeyword(r)}}catch(err){_didIteratorError=true;_iteratorError=err}finally{try{if(!_iteratorNormalCompletion&&_iterator.return!=null){_iterator.return()}}finally{if(_didIteratorError){throw _iteratorError}}}return this}},{key:"addKeyword",value:function addKeyword(t,r){var _this=this;var n;if(typeof t=="string")n=t,(typeof r==="undefined"?"undefined":_type_of(r))=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),r.keyword=n);else if((typeof t==="undefined"?"undefined":_type_of(t))=="object"&&r===void 0){if(r=t,n=r.keyword,Array.isArray(n)&&!n.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(wtn.call(this,n,r),!r)return(0,bce.eachItem)(n,function(a){return _ce.call(_this,a)}),this;ktn.call(this,r);var i=_object_spread_props(_object_spread({},r),{type:(0,iz.getJSONTypes)(r.type),schemaType:(0,iz.getJSONTypes)(r.schemaType)});return(0,bce.eachItem)(n,i.type.length===0?function(a){return _ce.call(_this,a,i)}:function(a){return i.type.forEach(function(o){return _ce.call(_this,a,i,o)})}),this}},{key:"getKeyword",value:function getKeyword(t){var r=this.RULES.all[t];return(typeof r==="undefined"?"undefined":_type_of(r))=="object"?r.definition:!!r}},{key:"removeKeyword",value:function removeKeyword(t){var _this=this,r=_this.RULES;delete r.keywords[t],delete r.all[t];var _iteratorNormalCompletion=true,_didIteratorError=false,_iteratorError=undefined;try{for(var _iterator=r.rules[Symbol.iterator](),_step;!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=true){var n=_step.value;var i=n.rules.findIndex(function(a){return a.keyword===t});i>=0&&n.rules.splice(i,1)}}catch(err){_didIteratorError=true;_iteratorError=err}finally{try{if(!_iteratorNormalCompletion&&_iterator.return!=null){_iterator.return()}}finally{if(_didIteratorError){throw _iteratorError}}}return this}},{key:"addFormat",value:function addFormat(t,r){return typeof r=="string"&&(r=new RegExp(r)),this.formats[t]=r,this}},{key:"errorsText",value:function errorsText(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.errors,_ref=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},tmp=_ref.separator,r=tmp===void 0?", ":tmp,tmp1=_ref.dataVar,n=tmp1===void 0?"data":tmp1;return!t||t.length===0?"No errors":t.map(function(i){return"".concat(n).concat(i.instancePath," ").concat(i.message)}).reduce(function(i,a){return i+r+a})}},{key:"$dataMetaSchema",value:function $dataMetaSchema(t,r){var n=this.RULES.all;t=JSON.parse(JSON.stringify(t));var _iteratorNormalCompletion=true,_didIteratorError=false,_iteratorError=undefined;try{for(var _iterator=r[Symbol.iterator](),_step;!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=true){var i=_step.value;var a=i.split("/").slice(1),o=t;var _iteratorNormalCompletion1=true,_didIteratorError1=false,_iteratorError1=undefined;try{for(var _iterator1=a[Symbol.iterator](),_step1;!(_iteratorNormalCompletion1=(_step1=_iterator1.next()).done);_iteratorNormalCompletion1=true){var s=_step1.value;o=o[s]}}catch(err){_didIteratorError1=true;_iteratorError1=err}finally{try{if(!_iteratorNormalCompletion1&&_iterator1.return!=null){_iterator1.return()}}finally{if(_didIteratorError1){throw _iteratorError1}}}for(var s2 in n){var l=n[s2];if((typeof l==="undefined"?"undefined":_type_of(l))!="object")continue;var _l_definition=l.definition,c=_l_definition.$data,d=o[s2];c&&d&&(o[s2]=Nht(d))}}}catch(err){_didIteratorError=true;_iteratorError=err}finally{try{if(!_iteratorNormalCompletion&&_iterator.return!=null){_iterator.return()}}finally{if(_didIteratorError){throw _iteratorError}}}return t}},{key:"_removeAllSchemas",value:function _removeAllSchemas(t,r){for(var n in t){var i=t[n];(!r||r.test(n))&&(typeof i=="string"?delete t[n]:i&&!i.meta&&(this._cache.delete(i.schema),delete t[n]))}}},{key:"_addSchema",value:function _addSchema(t,r,n){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:this.opts.validateSchema,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.opts.addUsedSchema;var o,_this_opts=this.opts,s=_this_opts.schemaId;if((typeof t==="undefined"?"undefined":_type_of(t))=="object")o=t[s];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof t!="boolean")throw new Error("schema must be object or boolean")}var l=this._cache.get(t);if(l!==void 0)return l;n=(0,N7.normalizeId)(o||n);var c=N7.getSchemaRefs.call(this,t,n);return l=new $7.SchemaEnv({schema:t,schemaId:s,meta:r,baseId:n,localRefs:c}),this._cache.set(l.schema,l),a&&!n.startsWith("#")&&(n&&this._checkUnique(n),this.refs[n]=l),i&&this.validateSchema(t,!0),l}},{key:"_checkUnique",value:function _checkUnique(t){if(this.schemas[t]||this.refs[t])throw new Error('schema with key or id "'.concat(t,'" already exists'))}},{key:"_compileSchemaEnv",value:function _compileSchemaEnv(t){if(t.meta?this._compileMetaSchema(t):$7.compileSchema.call(this,t),!t.validate)throw new Error("ajv implementation error");return t.validate}},{key:"_compileMetaSchema",value:function _compileMetaSchema(t){var r=this.opts;this.opts=this._metaOpts;try{$7.compileSchema.call(this,t)}finally{this.opts=r}}}]);return D7}();D7.ValidationError=otn.default;D7.MissingRefError=Mht.default;Ts.default=D7;var ytn={log:function log(){},warn:function warn(){},error:function error(){}};var btn=/^[a-z_$][a-z0-9_$:-]*$/i;var Etn={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"}});var qht=P(function(wce){"use strict";Object.defineProperty(wce,"__esModule",{value:!0});var Ttn={keyword:"id",code:function code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};wce.default=Ttn});var jht=P(function(Iy){"use strict";var zht=function zht(e,t){var r=e.gen;return t.validate?r.scopeValue("validate",{ref:t.validate}):(0,wu._)(_templateObject165(),r.scopeValue("wrapper",{ref:t}))};var oz=function oz(e,t,r,n){var i=e.gen,a=e.it,o=a.allErrors,s=a.schemaEnv,l=a.opts,c=l.passContext?T6.default.this:wu.nil;n?d():u();function d(){if(!s.$async)throw new Error("async schema referenced by sync schema");var h=i.let("valid");i.try(function(){i.code((0,wu._)(_templateObject166(),(0,Lht.callValidateCode)(e,t,c))),m(t),o||i.assign(h,!0)},function(g){i.if((0,wu._)(_templateObject167(),g,a.ValidationError),function(){return i.throw(g)}),p(g),o||i.assign(h,!1)}),e.ok(h)}function u(){e.result((0,Lht.callValidateCode)(e,t,c),function(){return m(t)},function(){return p(t)})}function p(h){var g=(0,wu._)(_templateObject168(),h);i.assign(T6.default.vErrors,(0,wu._)(_templateObject169(),T6.default.vErrors,g,T6.default.vErrors,g)),i.assign(T6.default.errors,(0,wu._)(_templateObject170(),T6.default.vErrors))}function m(h){var g;if(!a.opts.unevaluated)return;var x=(g=r==null?void 0:r.validate)===null||g===void 0?void 0:g.evaluated;if(a.props!==!0)if(x&&!x.dynamicProps)x.props!==void 0&&(a.props=az.mergeEvaluated.props(i,x.props,a.props));else{var y=i.var("props",(0,wu._)(_templateObject171(),h));a.props=az.mergeEvaluated.props(i,y,a.props,wu.Name)}if(a.items!==!0)if(x&&!x.dynamicItems)x.items!==void 0&&(a.items=az.mergeEvaluated.items(i,x.items,a.items));else{var y1=i.var("items",(0,wu._)(_templateObject172(),h));a.items=az.mergeEvaluated.items(i,y1,a.items,wu.Name)}}};Object.defineProperty(Iy,"__esModule",{value:!0});Iy.callRef=Iy.getValidate=void 0;var Itn=R7(),Lht=fd(),wu=Xr(),T6=$h(),Fht=ez(),az=$n(),Ctn={keyword:"$ref",schemaType:"string",code:function code(e){var t=e.gen,r=e.schema,n=e.it,i=n.baseId,a=n.schemaEnv,o=n.validateName,s=n.opts,l=n.self,c=a.root;if((r==="#"||r==="#/")&&i===c.baseId)return u();var d=Fht.resolveRef.call(l,c,i,r);if(d===void 0)throw new Itn.default(n.opts.uriResolver,i,r);if(_instanceof(d,Fht.SchemaEnv))return p(d);return m(d);function u(){if(a===c)return oz(e,o,a,a.$async);var h=t.scopeValue("root",{ref:c});return oz(e,(0,wu._)(_templateObject173(),h),c,c.$async)}function p(h){var g=zht(e,h);oz(e,g,h,h.$async)}function m(h){var g=t.scopeValue("schema",s.code.source===!0?{ref:h,code:(0,wu.stringify)(h)}:{ref:h}),x=t.name("valid"),y=e.subschema({schema:h,dataTypes:[],schemaPath:wu.nil,topSchemaRef:g,errSchemaPath:r},x);e.mergeEvaluated(y),e.ok(x)}}};Iy.getValidate=zht;Iy.callRef=oz;Iy.default=Ctn});var Uht=P(function(Sce){"use strict";Object.defineProperty(Sce,"__esModule",{value:!0});var Atn=qht(),Ptn=jht(),Otn=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",Atn.default,Ptn.default];Sce.default=Otn});var Bht=P(function(kce){"use strict";Object.defineProperty(kce,"__esModule",{value:!0});var sz=Xr(),k1=sz.operators,lz={maximum:{okStr:"<=",ok:k1.LTE,fail:k1.GT},minimum:{okStr:">=",ok:k1.GTE,fail:k1.LT},exclusiveMaximum:{okStr:"<",ok:k1.LT,fail:k1.GTE},exclusiveMinimum:{okStr:">",ok:k1.GT,fail:k1.LTE}},Rtn={message:function(param){var e=param.keyword,t=param.schemaCode;return(0,sz.str)(_templateObject174(),lz[e].okStr,t)},params:function(param){var e=param.keyword,t=param.schemaCode;return(0,sz._)(_templateObject175(),lz[e].okStr,t)}},Mtn={keyword:Object.keys(lz),type:"number",schemaType:"number",$data:!0,error:Rtn,code:function code(e){var t=e.keyword,r=e.data,n=e.schemaCode;e.fail$data((0,sz._)(_templateObject176(),r,lz[t].fail,n,r))}};kce.default=Mtn});var Wht=P(function(Ece){"use strict";Object.defineProperty(Ece,"__esModule",{value:!0});var q7=Xr(),$tn={message:function(param){var e=param.schemaCode;return(0,q7.str)(_templateObject177(),e)},params:function(param){var e=param.schemaCode;return(0,q7._)(_templateObject178(),e)}},Ntn={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:$tn,code:function code(e){var t=e.gen,r=e.data,n=e.schemaCode,i=e.it,a=i.opts.multipleOfPrecision,o=t.let("res"),s=a?(0,q7._)(_templateObject179(),o,o,a):(0,q7._)(_templateObject180(),o,o);e.fail$data((0,q7._)(_templateObject181(),n,o,r,n,s))}};Ece.default=Ntn});var Ght=P(function(Tce){"use strict";var Vht=function Vht(e){var t=e.length,r=0,n=0,i;for(;n=55296&&i<=56319&&n=s.loopRequired;if(o.allErrors?c():d(),s.strictRequired){var m=e.parentSchema.properties,_e_it=e.it,h=_e_it.definedProperties;var _iteratorNormalCompletion=true,_didIteratorError=false,_iteratorError=undefined;try{for(var _iterator=r[Symbol.iterator](),_step;!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=true){var g=_step.value;if((m==null?void 0:m[g])===void 0&&!h.has(g)){var x=o.schemaEnv.baseId+o.errSchemaPath,y='required property "'.concat(g,'" is not defined at "').concat(x,'" (strictRequired)');(0,Gtn.checkStrictMode)(o,y,o.opts.strictRequired)}}}catch(err){_didIteratorError=true;_iteratorError=err}finally{try{if(!_iteratorNormalCompletion&&_iterator.return!=null){_iterator.return()}}finally{if(_didIteratorError){throw _iteratorError}}}}function c(){var _iteratorNormalCompletion=true,_didIteratorError=false,_iteratorError=undefined;if(l||a)e.block$data(z7.nil,u);else try{for(var _iterator=r[Symbol.iterator](),_step;!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=true){var m=_step.value;(0,F7.checkReportMissingProp)(e,m)}}catch(err){_didIteratorError=true;_iteratorError=err}finally{try{if(!_iteratorNormalCompletion&&_iterator.return!=null){_iterator.return()}}finally{if(_didIteratorError){throw _iteratorError}}}}function d(){var m=t.let("missing");if(l||a){var h=t.let("valid",!0);e.block$data(h,function(){return p(m,h)}),e.ok(h)}else t.if((0,F7.checkMissingProp)(e,r,m)),(0,F7.reportMissingProp)(e,m),t.else()}function u(){t.forOf("prop",n,function(m){e.setParams({missingProperty:m}),t.if((0,F7.noPropertyInData)(t,i,m,s.ownProperties),function(){return e.error()})})}function p(m,h){e.setParams({missingProperty:m}),t.forOf(m,n,function(){t.assign(h,(0,F7.propertyInData)(t,i,m,s.ownProperties)),t.if((0,z7.not)(h),function(){e.error(),t.break()})},z7.nil)}}};Pce.default=Ztn});var Jht=P(function(Oce){"use strict";Object.defineProperty(Oce,"__esModule",{value:!0});var j7=Xr(),Ktn={message:function message(param){var e=param.keyword,t=param.schemaCode;var r=e==="maxItems"?"more":"fewer";return(0,j7.str)(_templateObject198(),r,t)},params:function(param){var e=param.schemaCode;return(0,j7._)(_templateObject199(),e)}},Qtn={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:Ktn,code:function code(e){var t=e.keyword,r=e.data,n=e.schemaCode,i=t==="maxItems"?j7.operators.GT:j7.operators.LT;e.fail$data((0,j7._)(_templateObject200(),r,i,n))}};Oce.default=Qtn});var uz=P(function(Rce){"use strict";Object.defineProperty(Rce,"__esModule",{value:!0});var Yht=tce();Yht.code='require("ajv/dist/runtime/equal").default';Rce.default=Yht});var Xht=P(function($ce){"use strict";Object.defineProperty($ce,"__esModule",{value:!0});var Mce=I7(),Is=Xr(),Jtn=$n(),Ytn=uz(),Xtn={message:function(param){var _param_params=param.params,e=_param_params.i,t=_param_params.j;return(0,Is.str)(_templateObject201(),t,e)},params:function(param){var _param_params=param.params,e=_param_params.i,t=_param_params.j;return(0,Is._)(_templateObject202(),e,t)}},ern={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:Xtn,code:function code(e){var t=e.gen,r=e.data,n=e.$data,i=e.schema,a=e.parentSchema,o=e.schemaCode,s=e.it;if(!n&&!i)return;var l=t.let("valid"),c=a.items?(0,Mce.getSchemaTypes)(a.items):[];e.block$data(l,d,(0,Is._)(_templateObject203(),o)),e.ok(l);function d(){var h=t.let("i",(0,Is._)(_templateObject204(),r)),g=t.let("j");e.setParams({i:h,j:g}),t.assign(l,!0),t.if((0,Is._)(_templateObject205(),h),function(){return(u()?p:m)(h,g)})}function u(){return c.length>0&&!c.some(function(h){return h==="object"||h==="array"})}function p(h,g){var x=t.name("item"),y=(0,Mce.checkDataTypes)(c,x,s.opts.strictNumbers,Mce.DataType.Wrong),v=t.const("indices",(0,Is._)(_templateObject206()));t.for((0,Is._)(_templateObject207(),h),function(){t.let(x,(0,Is._)(_templateObject208(),r,h)),t.if(y,(0,Is._)(_templateObject209())),c.length>1&&t.if((0,Is._)(_templateObject210(),x),(0,Is._)(_templateObject211(),x)),t.if((0,Is._)(_templateObject212(),v,x),function(){t.assign(g,(0,Is._)(_templateObject213(),v,x)),e.error(),t.assign(l,!1).break()}).code((0,Is._)(_templateObject214(),v,x,h))})}function m(h,g){var x=(0,Jtn.useFunc)(t,Ytn.default),y=t.name("outer");t.label(y).for((0,Is._)(_templateObject215(),h),function(){return t.for((0,Is._)(_templateObject216(),g,h,g),function(){return t.if((0,Is._)(_templateObject217(),x,r,h,r,g),function(){e.error(),t.assign(l,!1).break(y)})})})}}};$ce.default=ern});var e0t=P(function(Dce){"use strict";Object.defineProperty(Dce,"__esModule",{value:!0});var Nce=Xr(),trn=$n(),rrn=uz(),nrn={message:"must be equal to constant",params:function(param){var e=param.schemaCode;return(0,Nce._)(_templateObject218(),e)}},irn={keyword:"const",$data:!0,error:nrn,code:function code(e){var t=e.gen,r=e.data,n=e.$data,i=e.schemaCode,a=e.schema;n||a&&(typeof a==="undefined"?"undefined":_type_of(a))=="object"?e.fail$data((0,Nce._)(_templateObject219(),(0,trn.useFunc)(t,rrn.default),r,i)):e.fail((0,Nce._)(_templateObject220(),a,r))}};Dce.default=irn});var t0t=P(function(qce){"use strict";Object.defineProperty(qce,"__esModule",{value:!0});var U7=Xr(),arn=$n(),orn=uz(),srn={message:"must be equal to one of the allowed values",params:function(param){var e=param.schemaCode;return(0,U7._)(_templateObject221(),e)}},lrn={keyword:"enum",schemaType:"array",$data:!0,error:srn,code:function code(e){var t=e.gen,r=e.data,n=e.$data,i=e.schema,a=e.schemaCode,o=e.it;if(!n&&i.length===0)throw new Error("enum must have non-empty array");var s=i.length>=o.opts.loopEnum,l,c=function(){return l!=null?l:l=(0,arn.useFunc)(t,orn.default)},d;if(s||n)d=t.let("valid"),e.block$data(d,u);else{if(!Array.isArray(i))throw new Error("ajv implementation error");var m=t.const("vSchema",a);d=(0,U7.or).apply(this,_to_consumable_array(i.map(function(h,g){return p(m,g)})))}e.pass(d);function u(){t.assign(d,!1),t.forOf("v",a,function(m){return t.if((0,U7._)(_templateObject222(),c(),r,m),function(){return t.assign(d,!0).break()})})}function p(m,h){var g=i[h];return(typeof g==="undefined"?"undefined":_type_of(g))=="object"&&g!==null?(0,U7._)(_templateObject223(),c(),r,m,h):(0,U7._)(_templateObject224(),r,g)}}};qce.default=lrn});var r0t=P(function(Lce){"use strict";Object.defineProperty(Lce,"__esModule",{value:!0});var urn=Bht(),crn=Wht(),drn=Hht(),prn=Zht(),frn=Kht(),mrn=Qht(),hrn=Jht(),grn=Xht(),xrn=e0t(),vrn=t0t(),yrn=[urn.default,crn.default,drn.default,prn.default,frn.default,mrn.default,hrn.default,grn.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},xrn.default,vrn.default];Lce.default=yrn});var zce=P(function(B7){"use strict";var n0t=function n0t(e,t){var r=e.gen,n=e.schema,i=e.data,a=e.keyword,o=e.it;o.items=!0;var s=r.const("len",(0,Ay._)(_templateObject225(),i));if(n===!1)e.setParams({len:t.length}),e.pass((0,Ay._)(_templateObject226(),s,t.length));else if((typeof n==="undefined"?"undefined":_type_of(n))=="object"&&!(0,Fce.alwaysValidSchema)(o,n)){var c=r.var("valid",(0,Ay._)(_templateObject227(),s,t.length));r.if((0,Ay.not)(c),function(){return l(c)}),e.ok(c)}function l(c){r.forRange("i",t.length,s,function(d){e.subschema({keyword:a,dataProp:d,dataPropType:Fce.Type.Num},c),o.allErrors||r.if((0,Ay.not)(c),function(){return r.break()})})}};Object.defineProperty(B7,"__esModule",{value:!0});B7.validateAdditionalItems=void 0;var Ay=Xr(),Fce=$n(),_rn={message:function(param){var _param_params=param.params,e=_param_params.len;return(0,Ay.str)(_templateObject228(),e)},params:function(param){var _param_params=param.params,e=_param_params.len;return(0,Ay._)(_templateObject229(),e)}},brn={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:_rn,code:function code(e){var t=e.parentSchema,r=e.it,n=t.items;if(!Array.isArray(n)){(0,Fce.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}n0t(e,n)}};B7.validateAdditionalItems=n0t;B7.default=brn});var jce=P(function(W7){"use strict";var a0t=function a0t(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.schema;var n=e.gen,i=e.parentSchema,a=e.data,o=e.keyword,s=e.it;d(i),s.opts.unevaluated&&r.length&&s.items!==!0&&(s.items=cz.mergeEvaluated.items(n,r.length,s.items));var l=n.name("valid"),c=n.const("len",(0,i0t._)(_templateObject230(),a));r.forEach(function(u,p){(0,cz.alwaysValidSchema)(s,u)||(n.if((0,i0t._)(_templateObject231(),c,p),function(){return e.subschema({keyword:o,schemaProp:p,dataProp:p},l)}),e.ok(l))});function d(u){var p=s.opts,m=s.errSchemaPath,h=r.length,g=h===u.minItems&&(h===u.maxItems||u[t]===!1);if(p.strictTuples&&!g){var x='"'.concat(o,'" is ').concat(h,"-tuple, but minItems or maxItems/").concat(t,' are not specified or different at path "').concat(m,'"');(0,cz.checkStrictMode)(s,x,p.strictTuples)}}};Object.defineProperty(W7,"__esModule",{value:!0});W7.validateTuple=void 0;var i0t=Xr(),cz=$n(),wrn=fd(),Srn={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code:function code(e){var t=e.schema,r=e.it;if(Array.isArray(t))return a0t(e,"additionalItems",t);r.items=!0,!(0,cz.alwaysValidSchema)(r,t)&&e.ok((0,wrn.validateArray)(e))}};W7.validateTuple=a0t;W7.default=Srn});var o0t=P(function(Uce){"use strict";Object.defineProperty(Uce,"__esModule",{value:!0});var krn=jce(),Ern={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:function(e){return(0,krn.validateTuple)(e,"items")}};Uce.default=Ern});var l0t=P(function(Bce){"use strict";Object.defineProperty(Bce,"__esModule",{value:!0});var s0t=Xr(),Trn=$n(),Irn=fd(),Crn=zce(),Arn={message:function(param){var _param_params=param.params,e=_param_params.len;return(0,s0t.str)(_templateObject232(),e)},params:function(param){var _param_params=param.params,e=_param_params.len;return(0,s0t._)(_templateObject233(),e)}},Prn={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:Arn,code:function code(e){var t=e.schema,r=e.parentSchema,n=e.it,i=r.prefixItems;n.items=!0,!(0,Trn.alwaysValidSchema)(n,t)&&(i?(0,Crn.validateAdditionalItems)(e,i):e.ok((0,Irn.validateArray)(e)))}};Bce.default=Prn});var u0t=P(function(Wce){"use strict";Object.defineProperty(Wce,"__esModule",{value:!0});var hd=Xr(),dz=$n(),Orn={message:function(param){var _param_params=param.params,e=_param_params.min,t=_param_params.max;return t===void 0?(0,hd.str)(_templateObject234(),e):(0,hd.str)(_templateObject235(),e,t)},params:function(param){var _param_params=param.params,e=_param_params.min,t=_param_params.max;return t===void 0?(0,hd._)(_templateObject236(),e):(0,hd._)(_templateObject237(),e,t)}},Rrn={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:Orn,code:function code(e){var t=e.gen,r=e.schema,n=e.parentSchema,i=e.data,a=e.it,o,s,l=n.minContains,c=n.maxContains;a.opts.next?(o=l===void 0?1:l,s=c):o=1;var d=t.const("len",(0,hd._)(_templateObject238(),i));if(e.setParams({min:o,max:s}),s===void 0&&o===0){(0,dz.checkStrictMode)(a,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(s!==void 0&&o>s){(0,dz.checkStrictMode)(a,'"minContains" > "maxContains" is always invalid'),e.fail();return}if((0,dz.alwaysValidSchema)(a,r)){var g=(0,hd._)(_templateObject239(),d,o);s!==void 0&&(g=(0,hd._)(_templateObject240(),g,d,s)),e.pass(g);return}a.items=!0;var u=t.name("valid");s===void 0&&o===1?m(u,function(){return t.if(u,function(){return t.break()})}):o===0?(t.let(u,!0),s!==void 0&&t.if((0,hd._)(_templateObject241(),i),p)):(t.let(u,!1),p()),e.result(u,function(){return e.reset()});function p(){var g=t.name("_valid"),x=t.let("count",0);m(g,function(){return t.if(g,function(){return h(x)})})}function m(g,x){t.forRange("i",0,d,function(y){e.subschema({keyword:"contains",dataProp:y,dataPropType:dz.Type.Num,compositeRule:!0},g),x()})}function h(g){t.code((0,hd._)(_templateObject242(),g)),s===void 0?t.if((0,hd._)(_templateObject243(),g,o),function(){return t.assign(u,!0).break()}):(t.if((0,hd._)(_templateObject244(),g,s),function(){return t.assign(u,!1).break()}),o===1?t.assign(u,!0):t.if((0,hd._)(_templateObject245(),g,o),function(){return t.assign(u,!0)}))}}};Wce.default=Rrn});var p0t=P(function(Kf){"use strict";var Nrn=function Nrn(param){var e=param.schema;var t={},r={};for(var n in e){if(n==="__proto__")continue;var i=Array.isArray(e[n])?t:r;i[n]=e[n]}return[t,r]};var c0t=function c0t(e){var _loop=function(o){var s=t[o];if(s.length===0)return"continue";var l=(0,V7.propertyInData)(r,n,o,i.opts.ownProperties);e.setParams({property:o,depsCount:s.length,deps:s.join(", ")}),i.allErrors?r.if(l,function(){var _iteratorNormalCompletion=true,_didIteratorError=false,_iteratorError=undefined;try{for(var _iterator=s[Symbol.iterator](),_step;!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=true){var c=_step.value;(0,V7.checkReportMissingProp)(e,c)}}catch(err){_didIteratorError=true;_iteratorError=err}finally{try{if(!_iteratorNormalCompletion&&_iterator.return!=null){_iterator.return()}}finally{if(_didIteratorError){throw _iteratorError}}}}):(r.if((0,Vce._)(_templateObject246(),l,(0,V7.checkMissingProp)(e,s,a))),(0,V7.reportMissingProp)(e,a),r.else())};var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e.schema;var r=e.gen,n=e.data,i=e.it;if(Object.keys(t).length===0)return;var a=r.let("missing");for(var o in t)_loop(o)};var d0t=function d0t(e){var _loop=function(s){(0,Mrn.alwaysValidSchema)(a,t[s])||(r.if((0,V7.propertyInData)(r,n,s,a.opts.ownProperties),function(){var l=e.subschema({keyword:i,schemaProp:s},o);e.mergeValidEvaluated(l,o)},function(){return r.var(o,!0)}),e.ok(o))};var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e.schema;var r=e.gen,n=e.data,i=e.keyword,a=e.it,o=r.name("valid");for(var s in t)_loop(s)};Object.defineProperty(Kf,"__esModule",{value:!0});Kf.validateSchemaDeps=Kf.validatePropertyDeps=Kf.error=void 0;var Vce=Xr(),Mrn=$n(),V7=fd();Kf.error={message:function(param){var _param_params=param.params,e=_param_params.property,t=_param_params.depsCount,r=_param_params.deps;var n=t===1?"property":"properties";return(0,Vce.str)(_templateObject247(),n,r,e)},params:function(param){var _param_params=param.params,e=_param_params.property,t=_param_params.depsCount,r=_param_params.deps,n=_param_params.missingProperty;return(0,Vce._)(_templateObject248(),e,n,t,r)}};var $rn={keyword:"dependencies",type:"object",schemaType:"object",error:Kf.error,code:function code(e){var _Nrn=_sliced_to_array(Nrn(e),2),t=_Nrn[0],r=_Nrn[1];c0t(e,t),d0t(e,r)}};Kf.validatePropertyDeps=c0t;Kf.validateSchemaDeps=d0t;Kf.default=$rn});var m0t=P(function(Gce){"use strict";Object.defineProperty(Gce,"__esModule",{value:!0});var f0t=Xr(),Drn=$n(),qrn={message:"property name must be valid",params:function(param){var e=param.params;return(0,f0t._)(_templateObject249(),e.propertyName)}},Lrn={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:qrn,code:function code(e){var t=e.gen,r=e.schema,n=e.data,i=e.it;if((0,Drn.alwaysValidSchema)(i,r))return;var a=t.name("valid");t.forIn("key",n,function(o){e.setParams({propertyName:o}),e.subschema({keyword:"propertyNames",data:o,dataTypes:["string"],propertyName:o,compositeRule:!0},a),t.if((0,f0t.not)(a),function(){e.error(!0),i.allErrors||t.break()})}),e.ok(a)}};Gce.default=Lrn});var Zce=P(function(Hce){"use strict";Object.defineProperty(Hce,"__esModule",{value:!0});var pz=fd(),wp=Xr(),Frn=$h(),fz=$n(),zrn={message:"must NOT have additional properties",params:function(param){var e=param.params;return(0,wp._)(_templateObject250(),e.additionalProperty)}},jrn={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:zrn,code:function code(e){var t=e.gen,r=e.schema,n=e.parentSchema,i=e.data,a=e.errsCount,o=e.it;if(!a)throw new Error("ajv implementation error");var s=o.allErrors,l=o.opts;if(o.props=!0,l.removeAdditional!=="all"&&(0,fz.alwaysValidSchema)(o,r))return;var c=(0,pz.allSchemaProperties)(n.properties),d=(0,pz.allSchemaProperties)(n.patternProperties);u(),e.ok((0,wp._)(_templateObject251(),a,Frn.default.errors));function u(){t.forIn("key",i,function(x){!c.length&&!d.length?h(x):t.if(p(x),function(){return h(x)})})}function p(x){var y;if(c.length>8){var v=(0,fz.schemaRefOrVal)(o,n.properties,"properties");y=(0,pz.isOwnProperty)(t,v,x)}else c.length?y=(0,wp.or).apply(this,_to_consumable_array(c.map(function(v){return(0,wp._)(_templateObject252(),x,v)}))):y=wp.nil;return d.length&&(y=(0,wp.or).apply(this,[y].concat(_to_consumable_array(d.map(function(v){return(0,wp._)(_templateObject253(),(0,pz.usePattern)(e,v),x)}))))),(0,wp.not)(y)}function m(x){t.code((0,wp._)(_templateObject254(),i,x))}function h(x){if(l.removeAdditional==="all"||l.removeAdditional&&r===!1){m(x);return}if(r===!1){e.setParams({additionalProperty:x}),e.error(),s||t.break();return}if((typeof r==="undefined"?"undefined":_type_of(r))=="object"&&!(0,fz.alwaysValidSchema)(o,r)){var y=t.name("valid");l.removeAdditional==="failing"?(g(x,y,!1),t.if((0,wp.not)(y),function(){e.reset(),m(x)})):(g(x,y),s||t.if((0,wp.not)(y),function(){return t.break()}))}}function g(x,y,v){var _={keyword:"additionalProperties",dataProp:x,dataPropType:fz.Type.Str};v===!1&&Object.assign(_,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(_,y)}}};Hce.default=jrn});var x0t=P(function(Qce){"use strict";Object.defineProperty(Qce,"__esModule",{value:!0});var Urn=O7(),h0t=fd(),Kce=$n(),g0t=Zce(),Brn={keyword:"properties",type:"object",schemaType:"object",code:function code(e){var t=e.gen,r=e.schema,n=e.parentSchema,i=e.data,a=e.it;a.opts.removeAdditional==="all"&&n.additionalProperties===void 0&&g0t.default.code(new Urn.KeywordCxt(a,g0t.default,"additionalProperties"));var o=(0,h0t.allSchemaProperties)(r);var _iteratorNormalCompletion=true,_didIteratorError=false,_iteratorError=undefined;try{for(var _iterator=o[Symbol.iterator](),_step;!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=true){var u=_step.value;a.definedProperties.add(u)}}catch(err){_didIteratorError=true;_iteratorError=err}finally{try{if(!_iteratorNormalCompletion&&_iterator.return!=null){_iterator.return()}}finally{if(_didIteratorError){throw _iteratorError}}}a.opts.unevaluated&&o.length&&a.props!==!0&&(a.props=Kce.mergeEvaluated.props(t,(0,Kce.toHash)(o),a.props));var s=o.filter(function(u){return!(0,Kce.alwaysValidSchema)(a,r[u])});if(s.length===0)return;var l=t.name("valid");var _iteratorNormalCompletion1=true,_didIteratorError1=false,_iteratorError1=undefined;try{for(var _iterator1=s[Symbol.iterator](),_step1;!(_iteratorNormalCompletion1=(_step1=_iterator1.next()).done);_iteratorNormalCompletion1=true){var u2=_step1.value;c(u2)?d(u2):(t.if((0,h0t.propertyInData)(t,i,u2,a.opts.ownProperties)),d(u2),a.allErrors||t.else().var(l,!0),t.endIf()),e.it.definedProperties.add(u2),e.ok(l)}}catch(err){_didIteratorError1=true;_iteratorError1=err}finally{try{if(!_iteratorNormalCompletion1&&_iterator1.return!=null){_iterator1.return()}}finally{if(_didIteratorError1){throw _iteratorError1}}}function c(u){return a.opts.useDefaults&&!a.compositeRule&&r[u].default!==void 0}function d(u){e.subschema({keyword:"properties",schemaProp:u,dataProp:u},l)}}};Qce.default=Brn});var b0t=P(function(Jce){"use strict";Object.defineProperty(Jce,"__esModule",{value:!0});var v0t=fd(),mz=Xr(),y0t=$n(),_0t=$n(),Wrn={keyword:"patternProperties",type:"object",schemaType:"object",code:function code(e){var t=e.gen,r=e.schema,n=e.data,i=e.parentSchema,a=e.it,o=a.opts,s=(0,v0t.allSchemaProperties)(r),l=s.filter(function(g){return(0,y0t.alwaysValidSchema)(a,r[g])});if(s.length===0||l.length===s.length&&(!a.opts.unevaluated||a.props===!0))return;var c=o.strictSchema&&!o.allowMatchingProperties&&i.properties,d=t.name("valid");a.props!==!0&&!_instanceof(a.props,mz.Name)&&(a.props=(0,_0t.evaluatedPropsToName)(t,a.props));var u=a.props;p();function p(){var _iteratorNormalCompletion=true,_didIteratorError=false,_iteratorError=undefined;try{for(var _iterator=s[Symbol.iterator](),_step;!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=true){var g=_step.value;c&&m(g),a.allErrors?h(g):(t.var(d,!0),h(g),t.if(d))}}catch(err){_didIteratorError=true;_iteratorError=err}finally{try{if(!_iteratorNormalCompletion&&_iterator.return!=null){_iterator.return()}}finally{if(_didIteratorError){throw _iteratorError}}}}function m(g){for(var x in c)new RegExp(g).test(x)&&(0,y0t.checkStrictMode)(a,"property ".concat(x," matches pattern ").concat(g," (use allowMatchingProperties)"))}function h(g){t.forIn("key",n,function(x){t.if((0,mz._)(_templateObject255(),(0,v0t.usePattern)(e,g),x),function(){var y=l.includes(g);y||e.subschema({keyword:"patternProperties",schemaProp:g,dataProp:x,dataPropType:_0t.Type.Str},d),a.opts.unevaluated&&u!==!0?t.assign((0,mz._)(_templateObject256(),u,x),!0):!y&&!a.allErrors&&t.if((0,mz.not)(d),function(){return t.break()})})})}}};Jce.default=Wrn});var w0t=P(function(Yce){"use strict";Object.defineProperty(Yce,"__esModule",{value:!0});var Vrn=$n(),Grn={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code:function code(e){var t=e.gen,r=e.schema,n=e.it;if((0,Vrn.alwaysValidSchema)(n,r)){e.fail();return}var i=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},i),e.failResult(i,function(){return e.reset()},function(){return e.error()})},error:{message:"must NOT be valid"}};Yce.default=Grn});var S0t=P(function(Xce){"use strict";Object.defineProperty(Xce,"__esModule",{value:!0});var Hrn=fd(),Zrn={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:Hrn.validateUnion,error:{message:"must match a schema in anyOf"}};Xce.default=Zrn});var k0t=P(function(ede){"use strict";Object.defineProperty(ede,"__esModule",{value:!0});var hz=Xr(),Krn=$n(),Qrn={message:"must match exactly one schema in oneOf",params:function(param){var e=param.params;return(0,hz._)(_templateObject257(),e.passing)}},Jrn={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:Qrn,code:function code(e){var t=e.gen,r=e.schema,n=e.parentSchema,i=e.it;if(!Array.isArray(r))throw new Error("ajv implementation error");if(i.opts.discriminator&&n.discriminator)return;var a=r,o=t.let("valid",!1),s=t.let("passing",null),l=t.name("_valid");e.setParams({passing:s}),t.block(c),e.result(o,function(){return e.reset()},function(){return e.error(!0)});function c(){a.forEach(function(d,u){var p;(0,Krn.alwaysValidSchema)(i,d)?t.var(l,!0):p=e.subschema({keyword:"oneOf",schemaProp:u,compositeRule:!0},l),u>0&&t.if((0,hz._)(_templateObject258(),l,o)).assign(o,!1).assign(s,(0,hz._)(_templateObject259(),s,u)).else(),t.if(l,function(){t.assign(o,!0),t.assign(s,u),p&&e.mergeEvaluated(p,hz.Name)})})}}};ede.default=Jrn});var E0t=P(function(tde){"use strict";Object.defineProperty(tde,"__esModule",{value:!0});var Yrn=$n(),Xrn={keyword:"allOf",schemaType:"array",code:function code(e){var t=e.gen,r=e.schema,n=e.it;if(!Array.isArray(r))throw new Error("ajv implementation error");var i=t.name("valid");r.forEach(function(a,o){if((0,Yrn.alwaysValidSchema)(n,a))return;var s=e.subschema({keyword:"allOf",schemaProp:o},i);e.ok(i),e.mergeEvaluated(s)})}};tde.default=Xrn});var C0t=P(function(rde){"use strict";var T0t=function T0t(e,t){var r=e.schema[t];return r!==void 0&&!(0,I0t.alwaysValidSchema)(e,r)};Object.defineProperty(rde,"__esModule",{value:!0});var gz=Xr(),I0t=$n(),enn={message:function(param){var e=param.params;return(0,gz.str)(_templateObject260(),e.ifClause)},params:function(param){var e=param.params;return(0,gz._)(_templateObject261(),e.ifClause)}},tnn={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:enn,code:function code(e){var t=e.gen,r=e.parentSchema,n=e.it;r.then===void 0&&r.else===void 0&&(0,I0t.checkStrictMode)(n,'"if" without "then" and "else" is ignored');var i=T0t(n,"then"),a=T0t(n,"else");if(!i&&!a)return;var o=t.let("valid",!0),s=t.name("_valid");if(l(),e.reset(),i&&a){var d=t.let("ifClause");e.setParams({ifClause:d}),t.if(s,c("then",d),c("else",d))}else i?t.if(s,c("then")):t.if((0,gz.not)(s),c("else"));e.pass(o,function(){return e.error(!0)});function l(){var d=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},s);e.mergeEvaluated(d)}function c(d,u){return function(){var p=e.subschema({keyword:d},s);t.assign(o,s),e.mergeValidEvaluated(p,o),u?t.assign(u,(0,gz._)(_templateObject262(),d)):e.setParams({ifClause:d})}}}};rde.default=tnn});var A0t=P(function(nde){"use strict";Object.defineProperty(nde,"__esModule",{value:!0});var rnn=$n(),nnn={keyword:["then","else"],schemaType:["object","boolean"],code:function code(param){var e=param.keyword,t=param.parentSchema,r=param.it;t.if===void 0&&(0,rnn.checkStrictMode)(r,'"'.concat(e,'" without "if" is ignored'))}};nde.default=nnn});var P0t=P(function(ide){"use strict";var _nn=function _nn(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;var t=[mnn.default,hnn.default,gnn.default,xnn.default,vnn.default,ynn.default,cnn.default,dnn.default,unn.default,pnn.default,fnn.default];return e?t.push(ann.default,snn.default):t.push(inn.default,onn.default),t.push(lnn.default),t};Object.defineProperty(ide,"__esModule",{value:!0});var inn=zce(),ann=o0t(),onn=jce(),snn=l0t(),lnn=u0t(),unn=p0t(),cnn=m0t(),dnn=Zce(),pnn=x0t(),fnn=b0t(),mnn=w0t(),hnn=S0t(),gnn=k0t(),xnn=E0t(),vnn=C0t(),ynn=A0t();ide.default=_nn});var O0t=P(function(ade){"use strict";Object.defineProperty(ade,"__esModule",{value:!0});var Ba=Xr(),bnn={message:function(param){var e=param.schemaCode;return(0,Ba.str)(_templateObject263(),e)},params:function(param){var e=param.schemaCode;return(0,Ba._)(_templateObject264(),e)}},wnn={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:bnn,code:function code(e,t){var r=e.gen,n=e.data,i=e.$data,a=e.schema,o=e.schemaCode,s=e.it,l=s.opts,c=s.errSchemaPath,d=s.schemaEnv,u=s.self;if(!l.validateFormats)return;i?p():m();function p(){var h=r.scopeValue("formats",{ref:u.formats,code:l.code.formats}),g=r.const("fDef",(0,Ba._)(_templateObject265(),h,o)),x=r.let("fType"),y=r.let("format");r.if((0,Ba._)(_templateObject266(),g,g),function(){return r.assign(x,(0,Ba._)(_templateObject267(),g)).assign(y,(0,Ba._)(_templateObject268(),g))},function(){return r.assign(x,(0,Ba._)(_templateObject269())).assign(y,g)}),e.fail$data((0,Ba.or)(v(),_()));function v(){return l.strictSchema===!1?Ba.nil:(0,Ba._)(_templateObject270(),o,y)}function _(){var b=d.$async?(0,Ba._)(_templateObject271(),g,y,n,y,n):(0,Ba._)(_templateObject272(),y,n),k=(0,Ba._)(_templateObject273(),y,b,y,n);return(0,Ba._)(_templateObject274(),y,y,x,t,k)}}function m(){var h=u.formats[a];if(!h){v();return}if(h===!0)return;var _$_=_sliced_to_array(_(h),3),g=_$_[0],x=_$_[1],y=_$_[2];g===t&&e.pass(b());function v(){if(l.strictSchema===!1){u.logger.warn(k());return}throw new Error(k());function k(){return'unknown format "'.concat(a,'" ignored in schema at path "').concat(c,'"')}}function _(k){var w=_instanceof(k,RegExp)?(0,Ba.regexpCode)(k):l.code.formats?(0,Ba._)(_templateObject275(),l.code.formats,(0,Ba.getProperty)(a)):void 0,S=r.scopeValue("formats",{key:a,ref:k,code:w});return(typeof k==="undefined"?"undefined":_type_of(k))=="object"&&!_instanceof(k,RegExp)?[k.type||"string",k.validate,(0,Ba._)(_templateObject276(),S)]:["string",k,S]}function b(){if((typeof h==="undefined"?"undefined":_type_of(h))=="object"&&!_instanceof(h,RegExp)&&h.async){if(!d.$async)throw new Error("async format in sync schema");return(0,Ba._)(_templateObject277(),y,n)}return typeof x=="function"?(0,Ba._)(_templateObject278(),y,n):(0,Ba._)(_templateObject279(),y,n)}}}};ade.default=wnn});var R0t=P(function(ode){"use strict";Object.defineProperty(ode,"__esModule",{value:!0});var Snn=O0t(),knn=[Snn.default];ode.default=knn});var M0t=P(function(C6){"use strict";Object.defineProperty(C6,"__esModule",{value:!0});C6.contentVocabulary=C6.metadataVocabulary=void 0;C6.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];C6.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var N0t=P(function(sde){"use strict";Object.defineProperty(sde,"__esModule",{value:!0});var Enn=Uht(),Tnn=r0t(),Inn=P0t(),Cnn=R0t(),$0t=M0t(),Ann=[Enn.default,Tnn.default,(0,Inn.default)(),Cnn.default,$0t.metadataVocabulary,$0t.contentVocabulary];sde.default=Ann});var q0t=P(function(xz){"use strict";Object.defineProperty(xz,"__esModule",{value:!0});xz.DiscrError=void 0;var D0t;(function(e){e.Tag="tag",e.Mapping="mapping"})(D0t||(xz.DiscrError=D0t={}))});var F0t=P(function(ude){"use strict";Object.defineProperty(ude,"__esModule",{value:!0});var A6=Xr(),lde=q0t(),L0t=ez(),Pnn=R7(),Onn=$n(),Rnn={message:function(param){var _param_params=param.params,e=_param_params.discrError,t=_param_params.tagName;return e===lde.DiscrError.Tag?'tag "'.concat(t,'" must be string'):'value of tag "'.concat(t,'" must be in oneOf')},params:function(param){var _param_params=param.params,e=_param_params.discrError,t=_param_params.tag,r=_param_params.tagName;return(0,A6._)(_templateObject280(),e,r,t)}},Mnn={keyword:"discriminator",type:"object",schemaType:"object",error:Rnn,code:function code(e){var t=e.gen,r=e.data,n=e.schema,i=e.parentSchema,a=e.it,o=i.oneOf;if(!a.opts.discriminator)throw new Error("discriminator: requires discriminator option");var s=n.propertyName;if(typeof s!="string")throw new Error("discriminator: requires propertyName");if(n.mapping)throw new Error("discriminator: mapping is not supported");if(!o)throw new Error("discriminator: requires oneOf keyword");var l=t.let("valid",!1),c=t.const("tag",(0,A6._)(_templateObject281(),r,(0,A6.getProperty)(s)));t.if((0,A6._)(_templateObject282(),c),function(){return d()},function(){return e.error(!1,{discrError:lde.DiscrError.Tag,tag:c,tagName:s})}),e.ok(l);function d(){var m=p();t.if(!1);for(var h in m)t.elseIf((0,A6._)(_templateObject283(),c,h)),t.assign(l,u(m[h]));t.else(),e.error(!1,{discrError:lde.DiscrError.Mapping,tag:c,tagName:s}),t.endIf()}function u(m){var h=t.name("valid"),g=e.subschema({keyword:"oneOf",schemaProp:m},h);return e.mergeEvaluated(g,A6.Name),h}function p(){var m;var h={},g=y(i),x=!0;for(var b=0;b=1&&n<=12&&i>=1&&i<=(n===2&&Unn(r)?29:Wnn[n])};var hde=function hde(e,t){if(e&&t)return e>t?1:e23||d>59||e&&!s)return!1;if(i<=23&&a<=59&&o<60)return!0;var u=a-d*l,p=i-c*l-(u<0?1:0);return(p===23||p===-1)&&(u===59||u===-1)&&o<61}};var gde=function gde(e,t){if(!(e&&t))return;var r=new Date("2020-01-01T"+e).valueOf(),n=new Date("2020-01-01T"+t).valueOf();if(r&&n)return r-n};var G0t=function G0t(e,t){if(!(e&&t))return;var r=pde.exec(e),n=pde.exec(t);if(r&&n)return e=r[1]+r[2]+r[3],t=n[1]+n[2]+n[3],e>t?1:e=Knn};var Ynn=function Ynn(e){return Number.isInteger(e)};var W0t=function W0t(){return!0};var ein=function ein(e){if(Xnn.test(e))return!1;try{return new RegExp(e),!0}catch(t){return!1}};Object.defineProperty(Jf,"__esModule",{value:!0});Jf.formatNames=Jf.fastFormats=Jf.fullFormats=void 0;Jf.fullFormats={date:Qf(V0t,hde),time:Qf(fde(!0),gde),"date-time":Qf(U0t(!0),H0t),"iso-time":Qf(fde(),G0t),"iso-date-time":Qf(U0t(),Z0t),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:Hnn,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:RegExp("^(?:https?|ftp):\\/\\/(?:\\S+(?::\\S*)?@)?(?:(?!(?:10|127)(?:\\.\\d{1,3}){3})(?!(?:169\\.254|192\\.168)(?:\\.\\d{1,3}){2})(?!172\\.(?:1[6-9]|2\\d|3[0-1])(?:\\.\\d{1,3}){2})(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z0-9\\u{00a1}-\\u{ffff}]+-)*[a-z0-9\\u{00a1}-\\u{ffff}]+)(?:\\.(?:[a-z0-9\\u{00a1}-\\u{ffff}]+-)*[a-z0-9\\u{00a1}-\\u{ffff}]+)*(?:\\.(?:[a-z\\u{00a1}-\\u{ffff}]{2,})))(?::\\d{2,5})?(?:\\/[^\\s]*)?$","iu"),email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:ein,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:Znn,int32:{type:"number",validate:Jnn},int64:{type:"number",validate:Ynn},float:{type:"number",validate:W0t},double:{type:"number",validate:W0t},password:!0,binary:!0};Jf.fastFormats=_object_spread_props(_object_spread({},Jf.fullFormats),{date:Qf(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,hde),time:Qf(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,gde),"date-time":Qf(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,H0t),"iso-time":Qf(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,G0t),"iso-date-time":Qf(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,Z0t),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i});Jf.formatNames=Object.keys(Jf.fullFormats);var Bnn=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,Wnn=[0,31,28,31,30,31,30,31,31,30,31,30,31];var pde=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;var mde=/t|\s/i;var Vnn=/\/|:/,Gnn=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;var B0t=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;var Knn=-Math.pow(2,31),Qnn=Math.pow(2,31)-1;var Xnn=/[^\\]\\Z/});var Q0t=P(function(R6){"use strict";Object.defineProperty(R6,"__esModule",{value:!0});R6.formatLimitDefinition=void 0;var tin=dde(),Sp=Xr(),E1=Sp.operators,yz={formatMaximum:{okStr:"<=",ok:E1.LTE,fail:E1.GT},formatMinimum:{okStr:">=",ok:E1.GTE,fail:E1.LT},formatExclusiveMaximum:{okStr:"<",ok:E1.LT,fail:E1.GTE},formatExclusiveMinimum:{okStr:">",ok:E1.GT,fail:E1.LTE}},rin={message:function(param){var e=param.keyword,t=param.schemaCode;return(0,Sp.str)(_templateObject284(),yz[e].okStr,t)},params:function(param){var e=param.keyword,t=param.schemaCode;return(0,Sp._)(_templateObject285(),yz[e].okStr,t)}};R6.formatLimitDefinition={keyword:Object.keys(yz),type:"string",schemaType:"string",$data:!0,error:rin,code:function code(e){var t=e.gen,r=e.data,n=e.schemaCode,i=e.keyword,a=e.it,o=a.opts,s=a.self;if(!o.validateFormats)return;var l=new tin.KeywordCxt(a,s.RULES.all.format.definition,"format");l.$data?c():d();function c(){var p=t.scopeValue("formats",{ref:s.formats,code:o.code.formats}),m=t.const("fmt",(0,Sp._)(_templateObject286(),p,l.schemaCode));e.fail$data((0,Sp.or)((0,Sp._)(_templateObject287(),m),(0,Sp._)(_templateObject288(),m),(0,Sp._)(_templateObject289(),m),u(m)))}function d(){var p=l.schema,m=s.formats[p];if(!m||m===!0)return;if((typeof m==="undefined"?"undefined":_type_of(m))!="object"||_instanceof(m,RegExp)||typeof m.compare!="function")throw new Error('"'.concat(i,'": format "').concat(p,'" does not define "compare" function'));var h=t.scopeValue("formats",{key:p,ref:m,code:o.code.formats?(0,Sp._)(_templateObject290(),o.code.formats,(0,Sp.getProperty)(p)):void 0});e.fail$data(u(h))}function u(p){return(0,Sp._)(_templateObject291(),p,r,n,yz[i].fail)}},dependencies:["format"]};var nin=function(e){return e.addKeyword(R6.formatLimitDefinition),e};R6.default=nin});var egt=P(function(G7,X0t){"use strict";var Y0t=function Y0t(e,t,r,n){var i,a;(i=(a=e.opts.code).formats)!==null&&i!==void 0||(a.formats=(0,xde._)(_templateObject292(),n));var _iteratorNormalCompletion=true,_didIteratorError=false,_iteratorError=undefined;try{for(var _iterator=t[Symbol.iterator](),_step;!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=true){var o=_step.value;e.addFormat(o,r[o])}}catch(err){_didIteratorError=true;_iteratorError=err}finally{try{if(!_iteratorNormalCompletion&&_iterator.return!=null){_iterator.return()}}finally{if(_didIteratorError){throw _iteratorError}}}};Object.defineProperty(G7,"__esModule",{value:!0});var M6=K0t(),iin=Q0t(),xde=Xr(),J0t=new xde.Name("fullFormats"),ain=new xde.Name("fastFormats"),vde=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{keywords:!0};if(Array.isArray(t))return Y0t(e,t,M6.fullFormats,J0t),e;var _ref=_sliced_to_array(t.mode==="fast"?[M6.fastFormats,ain]:[M6.fullFormats,J0t],2),r=_ref[0],n=_ref[1],i=t.formats||M6.formatNames;return Y0t(e,i,r,n),t.keywords&&(0,iin.default)(e),e};vde.get=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"full";var n=(t==="fast"?M6.fastFormats:M6.fullFormats)[e];if(!n)throw new Error('Unknown format "'.concat(e,'"'));return n};X0t.exports=G7=vde;Object.defineProperty(G7,"__esModule",{value:!0});G7.default=vde});var lgt=P(function(yde){"use strict";var din=function din(e){if(!e||(typeof e==="undefined"?"undefined":_type_of(e))!="object")throw new TypeError("argument obj is required");var t=e.parameters,r=e.type;if(!r||!sgt.test(r))throw new TypeError("invalid type");var n=r;if(t&&(typeof t==="undefined"?"undefined":_type_of(t))=="object")for(var i,a=Object.keys(t).sort(),o=0;o0&&!lin.test(t))throw new TypeError("invalid parameter value");return'"'+t.replace(cin,"\\$1")+'"'};var hin=function hin(e){this.parameters=Object.create(null),this.type=e};var agt=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g,lin=/^[\u000b\u0020-\u007e\u0080-\u00ff]+$/,ogt=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/,uin=/\\([\u000b\u0020-\u00ff])/g,cin=/([\\"])/g,sgt=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;yde.format=din;yde.parse=pin});var ean={};ku(ean,{default:function(){return Oz}});module.exports=Kgt(ean);var v_i=Yt(qde(),1),y_i=Yt(VCe(),1);var GCe,B2=(GCe=globalThis.process)!=null?GCe:{cwd:function cwd(){return"/"},env:{}};typeof B2.cwd!="function"&&(B2.cwd=function(){return"/"});(!B2.env||_type_of(B2.env)!="object")&&(B2.env={});globalThis.process=B2;var JAe=Yt(QCe(),1),YAe=require("obsidian");var tnr={2:function(e){var t=function t(i,a,o){_instanceof(i,RegExp)&&(i=r(i,o)),_instanceof(a,RegExp)&&(a=r(a,o));var s=n(i,a,o);return s&&{start:s[0],end:s[1],pre:o.slice(0,s[0]),body:o.slice(s[0]+i.length,s[1]),post:o.slice(s[1]+a.length)}};var r=function r(i,a){var o=a.match(i);return o?o[0]:null};var n=function n(i,a,o){var s,l,c,d,u,p=o.indexOf(i),m=o.indexOf(a,p+1),h=p;if(p>=0&&m>0){for(s=[],c=o.length;h>=0&&!u;)h==p?(s.push(h),p=o.indexOf(i,h+1)):s.length==1?u=[s.pop(),m]:((l=s.pop())=0?p:m;s.length&&(u=[c,d])}return u};e.exports=t,t.range=n},101:function(e,t,r){var n;e=r.nmd(e),function(i){var a=(e&&e.exports,(typeof global==="undefined"?"undefined":_type_of(global))=="object"&&global);a.global!==a&&a.window;var o=function o(u){this.message=u};(o.prototype=new Error).name="InvalidCharacterError";var s=function s(u){throw new o(u)},l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",c=/[\t\n\f\r ]/g,d={encode:function encode(u){u=String(u),/[^\0-\xFF]/.test(u)&&s("The string to be encoded contains characters outside of the Latin1 range.");for(var p,m,h,g,x=u.length%3,y="",v=-1,_=u.length-x;++v<_;)p=u.charCodeAt(v)<<16,m=u.charCodeAt(++v)<<8,h=u.charCodeAt(++v),y+=l.charAt((g=p+m+h)>>18&63)+l.charAt(g>>12&63)+l.charAt(g>>6&63)+l.charAt(63&g);return x==2?(p=u.charCodeAt(v)<<8,m=u.charCodeAt(++v),y+=l.charAt((g=p+m)>>10)+l.charAt(g>>4&63)+l.charAt(g<<2&63)+"="):x==1&&(g=u.charCodeAt(v),y+=l.charAt(g>>2)+l.charAt(g<<4&63)+"=="),y},decode:function decode(u){var p=(u=String(u).replace(c,"")).length;p%4==0&&(p=(u=u.replace(/==?$/,"")).length),(p%4==1||/[^+a-zA-Z0-9/]/.test(u))&&s("Invalid character: the string to be decoded is not correctly encoded.");for(var m,h,g=0,x="",y=-1;++y>(-2*g&6)));return x},version:"1.0.0"};(n=(function(){return d}).call(t,r,t,e))===void 0||(e.exports=n)}()},172:function(e,t){t.d=function(r){if(!r)return 0;for(var n=(r=r.toString()).length,i=r.length;i--;){var a=r.charCodeAt(i);56320<=a&&a<=57343&&i--,127>>32-i},rotr:function rotr(n,i){return n<<32-i|n>>>i},endian:function endian(n){if(n.constructor==Number)return 0xff00ff&r.rotl(n,8)|0xff00ff00&r.rotl(n,24);for(var i=0;i0;n--)i.push(Math.floor(256*Math.random()));return i},bytesToWords:function bytesToWords(n){for(var i=[],a=0,o=0;a>>5]|=n[a]<<24-o%32;return i},wordsToBytes:function wordsToBytes(n){for(var i=[],a=0;a<32*n.length;a+=8)i.push(n[a>>>5]>>>24-a%32&255);return i},bytesToHex:function bytesToHex(n){for(var i=[],a=0;a>>4).toString(16)),i.push((15&n[a]).toString(16));return i.join("")},hexToBytes:function hexToBytes(n){for(var i=[],a=0;a>>6*(3-s)&63)):i.push("=");return i.join("")},base64ToBytes:function base64ToBytes(n){n=n.replace(/[^A-Z0-9+\/]/gi,"");for(var i=[],a=0,o=0;a>>6-2*o);return i}},e.exports=r},635:function(e,t,r){var n=r(31),i=r(338),a=r(221);e.exports={XMLParser:i,XMLValidator:n,XMLBuilder:a}},118:function(e){e.exports=function(t){return typeof t=="function"?t:Array.isArray(t)?function(r){var _iteratorNormalCompletion=true,_didIteratorError=false,_iteratorError=undefined;try{for(var _iterator=t[Symbol.iterator](),_step;!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=true){var n=_step.value;if(typeof n=="string"&&r===n||_instanceof(n,RegExp)&&n.test(r))return!0}}catch(err){_didIteratorError=true;_iteratorError=err}finally{try{if(!_iteratorNormalCompletion&&_iterator.return!=null){_iterator.return()}}finally{if(_didIteratorError){throw _iteratorError}}}}:function(){return!1}}},705:function(e,t){var r=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",n="["+r+"]["+r+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*",i=new RegExp("^"+n+"$");t.isExist=function(a){return a!==void 0},t.isEmptyObject=function(a){return Object.keys(a).length===0},t.merge=function(a,o,s){if(o){var l=Object.keys(o),c=l.length;for(var d=0;d5&&k==="xml")return h("InvalidXml","XML declaration allowed only at the start of the document.",x(v,_));if(v[_]=="?"&&v[_+1]==">"){_++;break}}return _};var s=function s(v,_){if(v.length>_+5&&v[_+1]==="-"&&v[_+2]==="-"){for(_+=3;_"){_+=2;break}}else if(v.length>_+8&&v[_+1]==="D"&&v[_+2]==="O"&&v[_+3]==="C"&&v[_+4]==="T"&&v[_+5]==="Y"&&v[_+6]==="P"&&v[_+7]==="E"){var b=1;for(_+=8;_"&&(b--,b===0))break}else if(v.length>_+9&&v[_+1]==="["&&v[_+2]==="C"&&v[_+3]==="D"&&v[_+4]==="A"&&v[_+5]==="T"&&v[_+6]==="A"&&v[_+7]==="["){for(_+=8;_"){_+=2;break}}return _};var d=function d(v,_){var b="",k="",w=!1;for(;_"&&k===""){w=!0;break}b+=v[_]}return k===""&&{value:b,index:_,tagClosed:w}};var p=function p(v,_){var b=n.getAllMatches(v,u),k={};for(var w=0;w"&&v[E]!==" "&&v[E]!==" "&&v[E]!=="\n"&&v[E]!=="\r";E++)A+=v[E];if(A=A.trim(),A[A.length-1]==="/"&&(A=A.substring(0,A.length-1),E--),S=A,!n.isName(S)){var M=void 0;return M=A.trim().length===0?"Invalid space after '<'.":"Tag '"+A+"' is an invalid name.",h("InvalidTag",M,x(v,E))}var O=d(v,E);if(O===!1)return h("InvalidAttr","Attributes for '"+A+"' have open quote.",x(v,E));var R=O.value;if(E=O.index,R[R.length-1]==="/"){var M1=E-R.length;R=R.substring(0,R.length-1);var N=p(R,_);if(N!==!0)return h(N.err.code,N.err.msg,x(v,M1+N.err.line));k=!0}else if(I){if(!O.tagClosed)return h("InvalidTag","Closing tag '"+A+"' doesn't have proper closing.",x(v,E));if(R.trim().length>0)return h("InvalidTag","Closing tag '"+A+"' can't have attributes or invalid starting.",x(v,T));if(b.length===0)return h("InvalidTag","Closing tag '"+A+"' has not been opened.",x(v,T));{var M2=b.pop();if(A!==M2.tagName){var N1=x(v,M2.tagStartPos);return h("InvalidTag","Expected closing tag '"+M2.tagName+"' (opened in line "+N1.line+", col "+N1.col+") instead of closing tag '"+A+"'.",x(v,T))}b.length==0&&(w=!0)}}else{var M6=p(R,_);if(M6!==!0)return h(M6.err.code,M6.err.msg,x(v,E-R.length+M6.err.line));if(w===!0)return h("InvalidXml","Multiple possible root nodes found.",x(v,E));_.unpairedTags.indexOf(A)!==-1||b.push({tagName:A,tagStartPos:T}),k=!0}for(E++;E0)||h("InvalidXml","Invalid '"+JSON.stringify(b.map(function(E){return E.tagName}),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):h("InvalidXml","Start tag expected.",1)};var l='"',c="'";var u=new RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?","g")},221:function(e,t,r){var o=function o(d){this.options=Object.assign({},a,d),this.options.ignoreAttributes===!0||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.ignoreAttributesFn=i(this.options.ignoreAttributes),this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=c),this.processTextOrObjNode=s,this.options.format?(this.indentate=l,this.tagEndChar=">\n",this.newLine="\n"):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")};var s=function s(d,u,p,m){var h=this.j2x(d,p+1,m.concat(u));return d[this.options.textNodeName]!==void 0&&Object.keys(d).length===1?this.buildTextValNode(d[this.options.textNodeName],u,h.attrStr,p):this.buildObjectNode(h.val,u,h.attrStr,p)};var l=function l(d){return this.options.indentBy.repeat(d)};var c=function c(d){return!(!d.startsWith(this.options.attributeNamePrefix)||d===this.options.textNodeName)&&d.substr(this.attrPrefixLen)};var n=r(87),i=r(118),a={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function tagValueProcessor(d,u){return u},attributeValueProcessor:function attributeValueProcessor(d,u){return u},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&"},{regex:new RegExp(">","g"),val:">"},{regex:new RegExp("<","g"),val:"<"},{regex:new RegExp("'","g"),val:"'"},{regex:new RegExp('"',"g"),val:"""}],processEntities:!0,stopNodes:[],oneListGroup:!1};o.prototype.build=function(d){return this.options.preserveOrder?n(d,this.options):(Array.isArray(d)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(d=_define_property({},this.options.arrayNodeName,d)),this.j2x(d,0,[]).val)},o.prototype.j2x=function(d,u,p){var m="",h="",g=p.join(".");for(var x in d)if(Object.prototype.hasOwnProperty.call(d,x))if(d[x]===void 0)this.isAttribute(x)&&(h+="");else if(d[x]===null)this.isAttribute(x)?h+="":x[0]==="?"?h+=this.indentate(u)+"<"+x+"?"+this.tagEndChar:h+=this.indentate(u)+"<"+x+"/"+this.tagEndChar;else if(_instanceof(d[x],Date))h+=this.buildTextValNode(d[x],x,"",u);else if(_type_of(d[x])!="object"){var y=this.isAttribute(x);if(y&&!this.ignoreAttributesFn(y,g))m+=this.buildAttrPairStr(y,""+d[x]);else if(!y)if(x===this.options.textNodeName){var v=this.options.tagValueProcessor(x,""+d[x]);h+=this.replaceEntitiesValue(v)}else h+=this.buildTextValNode(d[x],x,"",u)}else if(Array.isArray(d[x])){var y1=d[x].length,v1="",_="";for(var b=0;b")+this.newLine:this.indentate(m)+"<"+u+p+g+this.tagEndChar+d+this.indentate(m)+h:this.indentate(m)+"<"+u+p+g+">"+d+h}},o.prototype.closeTag=function(d){var u="";return this.options.unpairedTags.indexOf(d)!==-1?this.options.suppressUnpairedNode||(u="/"):u=this.options.suppressEmptyNode?"/":">")+this.newLine;if(this.options.commentPropName!==!1&&u===this.options.commentPropName)return this.indentate(m)+"")+this.newLine;if(u[0]==="?")return this.indentate(m)+"<"+u+p+"?"+this.tagEndChar;{var h=this.options.tagValueProcessor(u,d);return h=this.replaceEntitiesValue(h),h===""?this.indentate(m)+"<"+u+p+this.closeTag(u)+this.tagEndChar:this.indentate(m)+"<"+u+p+">"+h+"0&&this.options.processEntities)for(var u=0;u0&&s.processEntities)for(var l=0;l"),u=!1;continue}if(h===s.commentPropName){d+=c+""),u=!0;continue}if(h[0]==="?"){var _1=n(m[":@"],s),b=h==="?xml"?"":c,k=m[h][0][s.textNodeName];k=k.length!==0?" "+k:"",d+=b+"<".concat(h).concat(k).concat(_1,"?>"),u=!0;continue}var x=c;x!==""&&(x+=s.indentBy);var y=c+"<".concat(h).concat(n(m[":@"],s)),v=t(m[h],s,g,x);s.unpairedTags.indexOf(h)!==-1?s.suppressUnpairedNode?d+=y+">":d+=y+"/>":v&&v.length!==0||!s.suppressEmptyNode?v&&v.endsWith(">")?d+=y+">".concat(v).concat(c,""):(d+=y+">",v&&c!==""&&(v.includes("/>")||v.includes("")):d+=y+"/>",u=!0}return d}e.exports=function(o,s){var l="";return s.format&&s.indentBy.length>0&&(l="\n"),t(o,s,"",l)}},193:function(e,t,r){var i=function i(u,p){var m="";for(;p"){if(x?u[p-1]==="-"&&u[p-2]==="-"&&(x=!1,h--):h--,h===0)break}else u[p]==="["?g=!0:y+=u[p];else{if(g&&o(u,p)){var v=void 0,_=void 0;var ref;p+=7,ref=_sliced_to_array(i(u,p+1),3),v=ref[0],_=ref[1],p=ref[2],ref,_.indexOf("&")===-1&&(m[d(v)]={regx:RegExp("&".concat(v,";"),"g"),val:_})}else if(g&&s(u,p))p+=8;else if(g&&l(u,p))p+=8;else if(g&&c(u,p))p+=9;else{if(!a)throw new Error("Invalid DOCTYPE");x=!0}h++,y=""}if(h!==0)throw new Error("Unclosed DOCTYPE")}return{entities:m,i:p}}},63:function(e,t){var r={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function tagValueProcessor(n,i){return i},attributeValueProcessor:function attributeValueProcessor(n,i){return i},stopNodes:[],alwaysCreateTextNode:!1,isArray:function(){return!1},commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function updateTag(n,i,a){return n}};t.buildOptions=function(n){return Object.assign({},r,n)},t.defaultOptions=r},299:function(e,t,r){var l=function l(w){var S=Object.keys(w);for(var E=0;E0)){O||(w=this.replaceEntitiesValue(w));var R=this.options.tagValueProcessor(S,w,E,I,A);return R==null?w:(typeof R==="undefined"?"undefined":_type_of(R))!=(typeof w==="undefined"?"undefined":_type_of(w))||R!==w?R:this.options.trimValues||w.trim()===w?k(w,this.options.parseTagValue,this.options.numberParseOptions):w}};var d=function d(w){if(this.options.removeNSPrefix){var S=w.split(":"),E=w.charAt(0)==="/"?"/":"";if(S[0]==="xmlns")return"";S.length===2&&(w=E+S[1])}return w};var p=function p(w,S,E){if(this.options.ignoreAttributes!==!0&&typeof w=="string"){var T=n.getAllMatches(w,u),I=T.length,A={};for(var O=0;O2&&arguments[2]!==void 0?arguments[2]:">",de="";for(var D=L;D3&&arguments[3]!==void 0?arguments[3]:">");if(!T)return;var I=T.data,A=T.index,O=I.search(/\s/),R=I,M=!0;O!==-1&&(R=I.substring(0,O),I=I.substring(O+1).trimStart());var N=R;if(E){var q=R.indexOf(":");q!==-1&&(R=R.substr(q+1),M=R!==T.data.substr(q+1))}return{tagName:R,tagExp:I,closeIndex:A,attrExpPresent:M,rawTagName:N}};var b=function b(w,S,E){var T=E,I=1;for(;E",E,"".concat(S," is not closed"));if(w.substring(E+2,A).trim()===S&&(I--,I===0))return{tagContent:w.substring(T,E),i:A};E=A}else if(w[E+1]==="?")E=v(w,"?>",E+1,"StopNode is not closed.");else if(w.substr(E+1,3)==="!--")E=v(w,"-->",E+3,"StopNode is not closed.");else if(w.substr(E+1,2)==="![")E=v(w,"]]>",E,"StopNode is not closed.")-2;else{var A1=_(w,E,">");A1&&((A1&&A1.tagName)===S&&A1.tagExp[A1.tagExp.length-1]!=="/"&&I++,E=A1.closeIndex)}};var k=function k(w,S,E){if(S&&typeof w=="string"){var T=w.trim();return T==="true"||T!=="false"&&o(w,E)}return n.isExist(w)?w:""};var n=r(705),i=r(365),a=r(193),o=r(494),s=r(118);var u=new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?","gm");var m=function m(w){w=w.replace(/\r\n?/g,"\n");var S=new i("!xml"),E=S,T="",I="";for(var A=0;A",A,"Closing Tag is not closed."),R=w.substring(A+2,O).trim();if(this.options.removeNSPrefix){var q=R.indexOf(":");q!==-1&&(R=R.substr(q+1))}this.options.transformTagName&&(R=this.options.transformTagName(R)),E&&(T=this.saveTextToParentTag(T,E,I));var M=I.substring(I.lastIndexOf(".")+1);if(R&&this.options.unpairedTags.indexOf(R)!==-1)throw new Error("Unpaired tag can not be used as closing tag: "));var N=0;M&&this.options.unpairedTags.indexOf(M)!==-1?(N=I.lastIndexOf(".",I.lastIndexOf(".")-1),this.tagsNodeStack.pop()):N=I.lastIndexOf("."),I=I.substring(0,N),E=this.tagsNodeStack.pop(),T="",A=O}else if(w[A+1]==="?"){var O2=_(w,A,!1,"?>");if(!O2)throw new Error("Pi Tag is not closed.");if(T=this.saveTextToParentTag(T,E,I),!(this.options.ignoreDeclaration&&O2.tagName==="?xml"||this.options.ignorePiTags)){var R2=new i(O2.tagName);R2.add(this.options.textNodeName,""),O2.tagName!==O2.tagExp&&O2.attrExpPresent&&(R2[":@"]=this.buildAttributesMap(O2.tagExp,I,O2.tagName)),this.addChild(E,R2,I)}A=O2.closeIndex+1}else if(w.substr(A+1,3)==="!--"){var O3=v(w,"-->",A+4,"Comment is not closed.");if(this.options.commentPropName){var R3=w.substring(A+4,O3-2);T=this.saveTextToParentTag(T,E,I),E.add(this.options.commentPropName,[_define_property({},this.options.textNodeName,R3)])}A=O3}else if(w.substr(A+1,2)==="!D"){var O6=a(w,A);this.docTypeEntities=O6.entities,A=O6.i}else if(w.substr(A+1,2)==="!["){var O9=v(w,"]]>",A,"CDATA is not closed.")-2,R6=w.substring(A+9,O9);T=this.saveTextToParentTag(T,E,I);var M1=this.parseTextData(R6,E.tagname,I,!0,!1,!0,!0);M1==null&&(M1=""),this.options.cdataPropName?E.add(this.options.cdataPropName,[_define_property({},this.options.textNodeName,R6)]):E.add(this.options.textNodeName,M1),A=O9+2}else{var O10=_(w,A,this.options.removeNSPrefix),R10=O10.tagName,M2=O10.rawTagName,N1=O10.tagExp,q1=O10.attrExpPresent,L=O10.closeIndex;this.options.transformTagName&&(R10=this.options.transformTagName(R10)),E&&T&&E.tagname!=="!xml"&&(T=this.saveTextToParentTag(T,E,I,!1));var F=E;if(F&&this.options.unpairedTags.indexOf(F.tagname)!==-1&&(E=this.tagsNodeStack.pop(),I=I.substring(0,I.lastIndexOf("."))),R10!==S.tagname&&(I+=I?"."+R10:R10),this.isItStopNode(this.options.stopNodes,I,R10)){var Q="";if(N1.length>0&&N1.lastIndexOf("/")===N1.length-1)R10[R10.length-1]==="/"?(R10=R10.substr(0,R10.length-1),I=I.substr(0,I.length-1),N1=R10):N1=N1.substr(0,N1.length-1),A=O10.closeIndex;else if(this.options.unpairedTags.indexOf(R10)!==-1)A=O10.closeIndex;else{var D=this.readStopNodeData(w,M2,L+1);if(!D)throw new Error("Unexpected end of ".concat(M2));A=D.i,Q=D.tagContent}var de=new i(R10);R10!==N1&&q1&&(de[":@"]=this.buildAttributesMap(N1,I,R10)),Q&&(Q=this.parseTextData(Q,R10,I,!0,q1,!0,!0)),I=I.substr(0,I.lastIndexOf(".")),de.add(this.options.textNodeName,Q),this.addChild(E,de,I)}else{if(N1.length>0&&N1.lastIndexOf("/")===N1.length-1){R10[R10.length-1]==="/"?(R10=R10.substr(0,R10.length-1),I=I.substr(0,I.length-1),N1=R10):N1=N1.substr(0,N1.length-1),this.options.transformTagName&&(R10=this.options.transformTagName(R10));var Q1=new i(R10);R10!==N1&&q1&&(Q1[":@"]=this.buildAttributesMap(N1,I,R10)),this.addChild(E,Q1,I),I=I.substr(0,I.lastIndexOf("."))}else{var Q6=new i(R10);this.tagsNodeStack.push(E),R10!==N1&&q1&&(Q6[":@"]=this.buildAttributesMap(N1,I,R10)),this.addChild(E,Q6,I),E=Q6}T="",A=L}}else T+=w[A];return S.child};var g=function g(w){if(this.options.processEntities){for(var S in this.docTypeEntities){var E=this.docTypeEntities[S];w=w.replace(E.regx,E.val)}for(var S1 in this.lastEntities){var E1=this.lastEntities[S1];w=w.replace(E1.regex,E1.val)}if(this.options.htmlEntities)for(var S2 in this.htmlEntities){var E2=this.htmlEntities[S2];w=w.replace(E2.regex,E2.val)}w=w.replace(this.ampEntity.regex,this.ampEntity.val)}return w};e.exports=function _class(w){_class_call_check(this,_class);this.options=w,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"\xa2"},pound:{regex:/&(pound|#163);/g,val:"\xa3"},yen:{regex:/&(yen|#165);/g,val:"\xa5"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"\xa9"},reg:{regex:/&(reg|#174);/g,val:"\xae"},inr:{regex:/&(inr|#8377);/g,val:"₹"},num_dec:{regex:/&#([0-9]{1,7});/g,val:function(S,E){return String.fromCharCode(Number.parseInt(E,10))}},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:function(S,E){return String.fromCharCode(Number.parseInt(E,16))}}},this.addExternalEntities=l,this.parseXml=m,this.parseTextData=c,this.resolveNameSpace=d,this.buildAttributesMap=p,this.isItStopNode=y,this.replaceEntitiesValue=g,this.readStopNodeData=b,this.saveTextToParentTag=x,this.addChild=h,this.ignoreAttributesFn=s(this.options.ignoreAttributes)}},338:function(e,t,r){var _r1=r(63),n=_r1.buildOptions,i=r(299),_r2=r(728),a=_r2.prettify,o=r(31);e.exports=/*#__PURE__*/function(){function _class(s){_class_call_check(this,_class);this.externalEntities={},this.options=n(s)}_create_class(_class,[{key:"parse",value:function parse(s,l){if(typeof s!="string"){if(!s.toString)throw new Error("XML data is accepted in String or Bytes[] form.");s=s.toString()}if(l){l===!0&&(l={});var u=o.validate(s,l);if(u!==!0)throw Error("".concat(u.err.msg,":").concat(u.err.line,":").concat(u.err.col))}var c=new i(this.options);c.addExternalEntities(this.externalEntities);var d=c.parseXml(s);return this.options.preserveOrder||d===void 0?d:a(d,this.options)}},{key:"addEntity",value:function addEntity(s,l){if(l.indexOf("&")!==-1)throw new Error("Entity value can't have '&'");if(s.indexOf("&")!==-1||s.indexOf(";")!==-1)throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for ' '");if(l==="&")throw new Error("An entity with value '&' is not permitted");this.externalEntities[s]=l}}]);return _class}()},728:function(e,t){var n=function n(o){var s=Object.keys(o);for(var l=0;l0&&(d[s.textNodeName]=c):c!==void 0&&(d[s.textNodeName]=c),d}t.prettify=function(o,s){return r(o,s)}},365:function(e){e.exports=/*#__PURE__*/function(){function _class(t){_class_call_check(this,_class);this.tagname=t,this.child=[],this[":@"]={}}_create_class(_class,[{key:"add",value:function add(t,r){t==="__proto__"&&(t="#__proto__"),this.child.push(_define_property({},t,r))}},{key:"addChild",value:function addChild(t){var _obj;t.tagname==="__proto__"&&(t.tagname="#__proto__"),t[":@"]&&Object.keys(t[":@"]).length>0?this.child.push((_obj={},_define_property(_obj,t.tagname,t.child),_define_property(_obj,":@",t[":@"]),_obj)):this.child.push(_define_property({},t.tagname,t.child))}}]);return _class}()},135:function(e){var t=function t(r){return!!r.constructor&&typeof r.constructor.isBuffer=="function"&&r.constructor.isBuffer(r)};e.exports=function(r){return r!=null&&(t(r)||function(n){return typeof n.readFloatLE=="function"&&typeof n.slice=="function"&&t(n.slice(0,0))}(r)||!!r._isBuffer)}},542:function(e,t,r){(function(){var n=r(298),i=r(526).utf8,a=r(135),o=r(526).bin,s=function s2(l,c){l.constructor==String?l=c&&c.encoding==="binary"?o.stringToBytes(l):i.stringToBytes(l):a(l)?l=Array.prototype.slice.call(l,0):Array.isArray(l)||l.constructor===Uint8Array||(l=l.toString());for(var d=n.bytesToWords(l),u=8*l.length,p=0x67452301,m=-0x10325477,h=-0x67452302,g=0x10325476,x=0;x>>24)|0xff00ff00&(d[x]<<24|d[x]>>>8);d[u>>>5]|=128<>>9<<4)]=u;var y=s._ff,v=s._gg,_=s._hh,b=s._ii;for(x=0;x>>0,m=m+w>>>0,h=h+S>>>0,g=g+E>>>0}return n.endian([p,m,h,g])};s._ff=function(l,c,d,u,p,m,h){var g=l+(c&d|~c&u)+(p>>>0)+h;return(g<>>32-m)+c},s._gg=function(l,c,d,u,p,m,h){var g=l+(c&u|d&~u)+(p>>>0)+h;return(g<>>32-m)+c},s._hh=function(l,c,d,u,p,m,h){var g=l+(c^d^u)+(p>>>0)+h;return(g<>>32-m)+c},s._ii=function(l,c,d,u,p,m,h){var g=l+(d^(c|~u))+(p>>>0)+h;return(g<>>32-m)+c},s._blocksize=16,s._digestsize=16,e.exports=function(l,c){if(l==null)throw new Error("Illegal argument "+l);var d=n.wordsToBytes(s(l,c));return c&&c.asBytes?d:c&&c.asString?o.bytesToString(d):n.bytesToHex(d)}})()},285:function(e,t,r){var c=function c(y){return parseInt(y,10)==y?parseInt(y,10):y.charCodeAt(0)};var d=function d(y){return y.split(i).join("\\").split(a).join("{").split(o).join("}").split(s).join(",").split(l).join(".")};var p=function p(y){return"{"+y+"}"};var m=function m(y){return/^-?0\d/.test(y)};var h=function h(y,v){return y<=v};var g=function g(y,v){return y>=v};var n=r(2);e.exports=function(y){return y?(y.substr(0,2)==="{}"&&(y="\\{\\}"+y.substr(2)),x(function(v){return v.split("\\\\").join(i).split("\\{").join(a).split("\\}").join(o).split("\\,").join(s).split("\\.").join(l)}(y),!0).map(d)):[]};var i="\0SLASH"+Math.random()+"\0",a="\0OPEN"+Math.random()+"\0",o="\0CLOSE"+Math.random()+"\0",s="\0COMMA"+Math.random()+"\0",l="\0PERIOD"+Math.random()+"\0";function u(y){if(!y)return[""];var v=[],_=n("{","}",y);if(!_)return y.split(",");var b=_.pre,k=_.body,w=_.post,S=b.split(",");S[S.length-1]+="{"+k+"}";var E=u(w);return w.length&&(S[S.length-1]+=E.shift(),S.push.apply(S,E)),v.push.apply(v,S),v}function x(y,v){var _=[],b=n("{","}",y);if(!b)return[y];var k=b.pre,w=b.post.length?x(b.post,!1):[""];if(/\$$/.test(b.pre))for(var S=0;S=0;if(!R&&!M)return b.post.match(/,.*\}/)?x(y=b.pre+"{"+b.body+o+b.post):[y];if(R)T=b.body.split(/\.\./);else if((T=u(b.body)).length===1&&(T=x(T[0],!1).map(p)).length===1)return w.map(function(G){return b.pre+T[0]+G});if(R){var N=c(T[0]),q=c(T[1]),L=Math.max(T[0].length,T[1].length),F=T.length==3?Math.abs(c(T[2])):1,Q=h;q0){var J=new Array(H+1).join("0");j=D<0?"-"+J+j.slice(1):J+j}}I.push(j)}}else{I=[];for(var he=0;he2&&arguments[2]!==void 0?arguments[2]:function u(){},p=d.split("."),m=p.length,h=function h(y){var v=p[y];if(!c)return{v:void 0};if(v==="+"){if(Array.isArray(c))return{v:c.map(function(b,k){var w=p.slice(y+1);return w.length>0?s(b,w.join("."),u):u(c,k,p,y)})};var _=p.slice(0,y).join(".");throw new Error("Object at wildcard (".concat(_,") is not an array"))}c=u(c,v,p,y)},g=0;g2&&arguments[2]!==void 0?arguments[2]:{};if(t(c)!="object"||c===null||d===void 0)return!1;if(typeof d=="number")return d in c;try{var p=!1;return s(c,d,function(m,h,g,x){if(!l(g,x))return m&&m[h];p=u.own?m.hasOwnProperty(h):h in m}),p}catch(m){return!1}},hasOwn:function hasOwn(c,d,u){return this.has(c,d,u||{own:!0})},isIn:function isIn(c,d,u){var p=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};if(t(c)!="object"||c===null||d===void 0)return!1;try{var m=!1,h=!1;return s(c,d,function(g,x,y,v){return m=m||g===u||!!g&&g[x]===u,h=l(y,v)&&t(g)==="object"&&x in g,g&&g[x]}),p.validPath?m&&h:m}catch(g){return!1}},ObjectPrototypeMutationError:o}},47:function(e,t,r){var a=function a(c,d){for(var u=[],p=0;p=-1&&!d;u--){var p=u>=0?arguments[u]:process.cwd();if(!i(p))throw new TypeError("Arguments to path.resolve must be strings");p&&(c=p+"/"+c,d=p.charAt(0)==="/")}return(d?"/":"")+(c=a(c.split("/"),!d).join("/"))||"."},s.normalize=function(c){var d=s.isAbsolute(c),u=c.substr(-1)==="/";return(c=a(c.split("/"),!d).join("/"))||d||(c="."),c&&u&&(c+="/"),(d?"/":"")+c},s.isAbsolute=function(c){return c.charAt(0)==="/"},s.join=function(){for(var c="",d=0;d=0&&v[b]==="";b--);return _>b?[]:v.slice(_,b+1)}c=s.resolve(c).substr(1),d=s.resolve(d).substr(1);for(var p=u(c.split("/")),m=u(d.split("/")),h=Math.min(p.length,m.length),g=h,x=0;x1&&arguments[1]!==void 0?arguments[1]:{};if(a=Object.assign({},n,a),!i||typeof i!="string")return i;var o=i.trim();if(a.skipLike!==void 0&&a.skipLike.test(o))return i;if(a.hex&&t.test(o))return Number.parseInt(o,16);{var l=r.exec(o);if(l){var c=l[1],d=l[2],u=((s=l[3])&&s.indexOf(".")!==-1&&((s=s.replace(/0+$/,""))==="."?s="0":s[0]==="."?s="0"+s:s[s.length-1]==="."&&(s=s.substr(0,s.length-1))),s),p=l[4]||l[6];if(!a.leadingZeros&&d.length>0&&c&&o[2]!=="."||!a.leadingZeros&&d.length>0&&!c&&o[1]!==".")return i;{var m=Number(o),h=""+m;return h.search(/[eE]/)!==-1||p?a.eNotation?m:i:o.indexOf(".")!==-1?h==="0"&&u===""||h===u||c&&h==="-"+u?m:i:d?u===h||c+u===h?m:i:o===h||o===c+h?m:i}}return i}var s}},737:function(e,t,r){var u=function u(v){return(v||"").toString().replace(a,"")};var h=function h(v){var _,b=(typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{}).location||{},k={},w=_type_of(v=v||b);if(v.protocol==="blob:")k=new y(unescape(v.pathname),{});else if(w==="string")for(_ in k=new y(v,{}),m)delete k[_];else if(w==="object"){for(_ in v)_ in m||(k[_]=v[_]);k.slashes===void 0&&(k.slashes=s.test(v.href))}return k};var g=function g(v){return v==="file:"||v==="ftp:"||v==="http:"||v==="https:"||v==="ws:"||v==="wss:"};var x=function x(v,_){v=(v=u(v)).replace(o,""),_=_||{};var b,k=c.exec(v),w=k[1]?k[1].toLowerCase():"",S=!!k[2],E=!!k[3],T=0;return S?E?(b=k[2]+k[3]+k[4],T=k[2].length+k[3].length):(b=k[2]+k[4],T=k[2].length):E?(b=k[3]+k[4],T=k[3].length):b=k[4],w==="file:"?T>=2&&(b=b.slice(2)):g(w)?b=k[4]:w?S&&(b=b.slice(2)):T>=2&&g(_.protocol)&&(b=k[4]),{protocol:w,slashes:S||g(w),slashesCount:T,rest:b}};var n=r(670),i=r(647),a=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,o=/[\n\r\t]/g,s=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,l=/:\d+$/,c=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,d=/^[a-zA-Z]:/;var p=[["#","hash"],["?","query"],function(v,_){return g(_.protocol)?v.replace(/\\/g,"/"):v},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d*)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],m={hash:1,query:1};function y(v,_,b){if(v=(v=u(v)).replace(o,""),!_instanceof(this,y))return new y(v,_,b);var k,w,S,E,T,I,A=p.slice(),O=typeof _==="undefined"?"undefined":_type_of(_),R=this,M=0;for(O!=="object"&&O!=="string"&&(b=_,_=null),b&&typeof b!="function"&&(b=i.parse),k=!(w=x(v||"",_=h(_))).protocol&&!w.slashes,R.slashes=w.slashes||k&&_.slashes,R.protocol=w.protocol||_.protocol||"",v=w.rest,(w.protocol==="file:"&&(w.slashesCount!==2||d.test(v))||!w.slashes&&(w.protocol||w.slashesCount<2||!g(R.protocol)))&&(A[3]=[/(.*)/,"pathname"]);M1){var a=n.shift();n[0]=a+n[0]}n[0].match(/^file:\/\/\//)?n[0]=n[0].replace(/^([^/:]+):\/*/,"$1:///"):n[0]=n[0].replace(/^([^/:]+):\/*/,"$1://");for(var o=0;o0&&(s=s.replace(/^[\/]+/,"")),s=o0?"?":"")+c.join("&")}(_type_of(arguments[0])=="object"?arguments[0]:[].slice.call(arguments))}(t.reduce(function(n,i,a){return(a===0||i!=="/"||i==="/"&&n[n.length-1]!=="/")&&n.push(i),n},[]))}var onr=bi(542),M3=bi.n(onr),snr="abcdef0123456789";function tAe(e,t){var r=e.url.replace("//",""),n=r.indexOf("/")==-1?"/":r.slice(r.indexOf("/")),i=e.method?e.method.toUpperCase():"GET",a=!!/(^|,)\s*auth\s*($|,)/.test(t.qop)&&"auth",o="00000000".concat(t.nc).slice(-8),s=function(p,m,h,g,x,y,v){var _=v||M3()("".concat(m,":").concat(h,":").concat(g));return p&&p.toLowerCase()==="md5-sess"?M3()("".concat(_,":").concat(x,":").concat(y)):_}(t.algorithm,t.username,t.realm,t.password,t.nonce,t.cnonce,t.ha1),l=M3()("".concat(i,":").concat(n)),c=a?M3()("".concat(s,":").concat(t.nonce,":").concat(o,":").concat(t.cnonce,":").concat(a,":").concat(l)):M3()("".concat(s,":").concat(t.nonce,":").concat(l)),d={username:t.username,realm:t.realm,nonce:t.nonce,uri:n,qop:a,response:c,nc:o,cnonce:t.cnonce,algorithm:t.algorithm,opaque:t.opaque},u=[];for(var p in d)d[p]&&(p==="qop"||p==="nc"||p==="algorithm"?u.push("".concat(p,"=").concat(d[p])):u.push("".concat(p,'="').concat(d[p],'"')));return"Digest ".concat(u.join(", "))}function xAe(e){return(e.headers&&e.headers.get("www-authenticate")||"").split(/\s/)[0].toLowerCase()==="digest"}var lnr=bi(101),vAe=bi.n(lnr);function rAe(e){return vAe().decode(e)}function nAe(e,t){var r;return"Basic ".concat((r="".concat(e,":").concat(t),vAe().encode(r)))}var L3=typeof WorkerGlobalScope!="undefined"&&_instanceof(self,WorkerGlobalScope)?self:typeof window!="undefined"?window:globalThis,unr=L3.fetch.bind(L3),cnr=(L3.Headers,L3.Request),dnr=L3.Response,rl=function(e){return e.Auto="auto",e.Digest="digest",e.None="none",e.Password="password",e.Token="token",e}({}),xm=function(e){return e.DataTypeNoLength="data-type-no-length",e.InvalidAuthType="invalid-auth-type",e.InvalidOutputFormat="invalid-output-format",e.LinkUnsupportedAuthType="link-unsupported-auth",e.InvalidUpdateRange="invalid-update-range",e.NotSupported="not-supported",e}({});function yAe(e,t,r,n,i){switch(e.authType){case rl.Auto:t&&r&&(e.headers.Authorization=nAe(t,r));break;case rl.Digest:e.digest=function(o,s,l){return{username:o,password:s,ha1:l,nc:0,algorithm:"md5",hasDigestAuth:!1}}(t,r,i);break;case rl.None:break;case rl.Password:e.headers.Authorization=nAe(t,r);break;case rl.Token:e.headers.Authorization="".concat((a=n).token_type," ").concat(a.access_token);break;default:throw new ds({info:{code:xm.InvalidAuthType}},"Invalid auth type: ".concat(e.authType))}var a}bi(345),bi(800);var iAe="@@HOTPATCHER",pnr=function(){};function jZ(e){return{original:e,methods:[e],final:!1}}var KZ=/*#__PURE__*/function(){function KZ1(){_class_call_check(this,KZ1);this._configuration={registry:{},getEmptyAction:"null"},this.__type__=iAe}_create_class(KZ1,[{key:"configuration",get:function get1(){return this._configuration}},{key:"getEmptyAction",get:function get1(){return this.configuration.getEmptyAction},set:function set1(t){this.configuration.getEmptyAction=t}},{key:"control",value:function control(t){var _this=this;var r=arguments.length>1&&arguments[1]!==void 0&&arguments[1];if(!t||t.__type__!==iAe)throw new Error("Failed taking control of target HotPatcher instance: Invalid type or object");return Object.keys(t.configuration.registry).forEach(function(n){_this.configuration.registry.hasOwnProperty(n)?r&&(_this.configuration.registry[n]=Object.assign({},t.configuration.registry[n])):_this.configuration.registry[n]=Object.assign({},t.configuration.registry[n])}),t._configuration=this.configuration,this}},{key:"execute",value:function execute(t){var r=this.get(t)||pnr;for(var n=arguments.length,i=new Array(n>1?n-1:0),a=1;a0;)c=[i.shift().apply(d,c)];return c[0]}}).apply(this,_to_consumable_array(r.methods))}},{key:"isPatched",value:function isPatched(t){return!!this.configuration.registry[t]}},{key:"patch",value:function patch(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},tmp=n.chain,i=tmp===void 0?!1:tmp;if(this.configuration.registry[t]&&this.configuration.registry[t].final)throw new Error("Failed patching '".concat(t,"': Method marked as being final"));if(typeof r!="function")throw new Error("Failed patching '".concat(t,"': Provided method is not a function"));if(i)this.configuration.registry[t]?this.configuration.registry[t].methods.push(r):this.configuration.registry[t]=jZ(r);else if(this.isPatched(t)){var _this_configuration_registry_t=this.configuration.registry[t],a=_this_configuration_registry_t.original;this.configuration.registry[t]=Object.assign(jZ(r),{original:a})}else this.configuration.registry[t]=jZ(r);return this}},{key:"patchInline",value:function patchInline(t,r){this.isPatched(t)||this.patch(t,r);for(var n=arguments.length,i=new Array(n>2?n-2:0),a=2;a1?r-1:0),i=1;i0;){var a=i.shift();n=n?bAe(n,a):qP(a)}return n}function bAe(e,t){var r=qP(e);return Object.keys(t).forEach(function(n){r.hasOwnProperty(n)?Array.isArray(t[n])?r[n]=Array.isArray(r[n])?_to_consumable_array(r[n]).concat(_to_consumable_array(t[n])):_to_consumable_array(t[n]):_type_of(t[n])=="object"&&t[n]?r[n]=_type_of(r[n])=="object"&&r[n]?bAe(r[n],t[n]):qP(t[n]):r[n]=t[n]:r[n]=t[n]}),r}function fnr(e){var t={};var _iteratorNormalCompletion=true,_didIteratorError=false,_iteratorError=undefined;try{for(var _iterator=e.keys()[Symbol.iterator](),_step;!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=true){var r=_step.value;t[r]=e.get(r)}}catch(err){_didIteratorError=true;_iteratorError=err}finally{try{if(!_iteratorNormalCompletion&&_iterator.return!=null){_iterator.return()}}finally{if(_didIteratorError){throw _iteratorError}}}return t}function QZ(){for(var e=arguments.length,t=new Array(e),r=0;r65536)throw new TypeError("pattern is too long")},vnr={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},$3=function(e){return e.replace(/[[\]\\-]/g,"\\$&")},oAe=function(e){return e.join("")},ynr=function(e,t){var r=t;if(e.charAt(r)!=="[")throw new Error("not in a brace expression");var n=[],i=[],a=r+1,o=!1,s=!1,l=!1,c=!1,d=r,u="";e:for(;au?n.push($3(u)+"-"+$3(g)):g===u&&n.push($3(g)),u="",a++):e.startsWith("-]",a+1)?(n.push($3(g+"-")),a+=2):e.startsWith("-",a+1)?(u=g,a+=2):(n.push($3(g)),a++)}else l=!0,a++}else c=!0,a++}if(d1&&arguments[1]!==void 0?arguments[1]:{},tmp=_ref.windowsPathsNoEscape,t=tmp===void 0?!1:tmp;return t?e.replace(/\[([^\/\\])\]/g,"$1"):e.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1")},_nr=new Set(["!","?","+","*","@"]),sAe=function(e){return _nr.has(e)},BZ="(?!\\.)",bnr=new Set(["[","."]),wnr=new Set(["..","."]),Snr=new Set("().*{}+?[]^$\\!"),rK="[^/]",lAe=rK+"*?",uAe=rK+"+?",xo,Bo,gm,Xi,Ka,E0,cx,T0,Wp,dx,F3,jP,EAe,Z2,NP,z3,YZ,UP,TAe,Fl=/*#__PURE__*/function(){function Fl1(t,r){_class_call_check(this,Fl1);Ir(this,jP);Ir(this,z3);C(this,"type");Ir(this,xo,void 0);Ir(this,Bo,void 0);Ir(this,gm,!1);Ir(this,Xi,[]);Ir(this,Ka,void 0);Ir(this,E0,void 0);Ir(this,cx,void 0);Ir(this,T0,!1);Ir(this,Wp,void 0);Ir(this,dx,void 0);Ir(this,F3,!1);var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.type=t,t&&dr(this,Bo,!0),dr(this,Ka,r),dr(this,xo,_e(this,Ka)?_e(_e(this,Ka),xo):this),dr(this,Wp,_e(this,xo)===this?n:_e(_e(this,xo),Wp)),dr(this,cx,_e(this,xo)===this?[]:_e(_e(this,xo),cx)),t!=="!"||_e(_e(this,xo),T0)||_e(this,cx).push(this),dr(this,E0,_e(this,Ka)?_e(_e(this,Ka),Xi).length:0)}_create_class(Fl1,[{key:"hasMagic",get:function get1(){if(_e(this,Bo)!==void 0)return _e(this,Bo);var _iteratorNormalCompletion=true,_didIteratorError=false,_iteratorError=undefined;try{for(var _iterator=_e(this,Xi)[Symbol.iterator](),_step;!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=true){var t=_step.value;if(typeof t!="string"&&(t.type||t.hasMagic))return dr(this,Bo,!0)}}catch(err){_didIteratorError=true;_iteratorError=err}finally{try{if(!_iteratorNormalCompletion&&_iterator.return!=null){_iterator.return()}}finally{if(_didIteratorError){throw _iteratorError}}}return _e(this,Bo)}},{key:"toString",value:function toString(){return _e(this,dx)!==void 0?_e(this,dx):this.type?dr(this,dx,this.type+"("+_e(this,Xi).map(function(t){return String(t)}).join("|")+")"):dr(this,dx,_e(this,Xi).map(function(t){return String(t)}).join(""))}},{key:"push",value:function push(){for(var t=arguments.length,r=new Array(t),n=0;n1&&arguments[1]!==void 0?arguments[1]:{},n=new Fl(null,void 0,r);return Hr(i=Fl,Z2,NP).call(i,t,n,0,r),n}}]);return Fl1}(),V2=Fl;xo=new WeakMap,Bo=new WeakMap,gm=new WeakMap,Xi=new WeakMap,Ka=new WeakMap,E0=new WeakMap,cx=new WeakMap,T0=new WeakMap,Wp=new WeakMap,dx=new WeakMap,F3=new WeakMap,jP=new WeakSet,EAe=function EAe1(){if(this!==_e(this,xo))throw new Error("should only call on root");if(_e(this,T0))return this;var t;for(this.toString(),dr(this,T0,!0);t=_e(this,cx).pop();){if(t.type!=="!")continue;var r=t,n=_e(r,Ka);for(;n;){var _iteratorNormalCompletion=true,_didIteratorError=false,_iteratorError=undefined;for(var i=_e(r,E0)+1;!n.type&&i<_e(n,Xi).length;i++)try{for(var _iterator=_e(t,Xi)[Symbol.iterator](),_step;!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=true){var a=_step.value;if(typeof a=="string")throw new Error("string part in extglob AST??");a.copyIn(_e(n,Xi)[i])}}catch(err){_didIteratorError=true;_iteratorError=err}finally{try{if(!_iteratorNormalCompletion&&_iterator.return!=null){_iterator.return()}}finally{if(_didIteratorError){throw _iteratorError}}}r=n,n=_e(r,Ka)}}return this},Z2=new WeakSet,NP=function(t,r,n,i){var m,h;var a=!1,o=!1,s=-1,l=!1;if(r.type===null){var g=n,x="";for(;g2&&arguments[2]!==void 0&&arguments[2],i=!1,a="",o=!1;for(var s=0;s2&&arguments[2]!==void 0?arguments[2]:{};return FP(t),!(!r.nocomment&&t.charAt(0)==="#")&&new K2(t,r).match(e)},knr=/^\*+([^+@!?\*\[\(]*)$/,Enr=function(e){return function(t){return!t.startsWith(".")&&t.endsWith(e)}},Tnr=function(e){return function(t){return t.endsWith(e)}},Inr=function(e){return e=e.toLowerCase(),function(t){return!t.startsWith(".")&&t.toLowerCase().endsWith(e)}},Cnr=function(e){return e=e.toLowerCase(),function(t){return t.toLowerCase().endsWith(e)}},Anr=/^\*+\.\*+$/,Pnr=function(e){return!e.startsWith(".")&&e.includes(".")},Onr=function(e){return e!=="."&&e!==".."&&e.includes(".")},Rnr=/^\.\*+$/,Mnr=function(e){return e!=="."&&e!==".."&&e.startsWith(".")},$nr=/^\*+$/,Nnr=function(e){return e.length!==0&&!e.startsWith(".")},Dnr=function(e){return e.length!==0&&e!=="."&&e!==".."},qnr=/^\?+([^+@!?\*\[\(]*)?$/,Lnr=function(e){var _e1=_sliced_to_array(e,2),t=_e1[0],tmp=_e1[1],r=tmp===void 0?"":tmp,n=IAe([t]);return r?(r=r.toLowerCase(),function(i){return n(i)&&i.toLowerCase().endsWith(r)}):n},Fnr=function(e){var _e1=_sliced_to_array(e,2),t=_e1[0],tmp=_e1[1],r=tmp===void 0?"":tmp,n=CAe([t]);return r?(r=r.toLowerCase(),function(i){return n(i)&&i.toLowerCase().endsWith(r)}):n},znr=function(e){var _e1=_sliced_to_array(e,2),t=_e1[0],tmp=_e1[1],r=tmp===void 0?"":tmp,n=CAe([t]);return r?function(i){return n(i)&&i.endsWith(r)}:n},jnr=function(e){var _e1=_sliced_to_array(e,2),t=_e1[0],tmp=_e1[1],r=tmp===void 0?"":tmp,n=IAe([t]);return r?function(i){return n(i)&&i.endsWith(r)}:n},IAe=function(e){var _e1=_sliced_to_array(e,1),t=_e1[0],r=t.length;return function(n){return n.length===r&&!n.startsWith(".")}},CAe=function(e){var _e1=_sliced_to_array(e,1),t=_e1[0],r=t.length;return function(n){return n.length===r&&n!=="."&&n!==".."}},AAe=(typeof process==="undefined"?"undefined":_type_of(process))=="object"&&process?_type_of(process.env)=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix";Rs.sep=AAe==="win32"?"\\":"/";var Sc=Symbol("globstar **");Rs.GLOBSTAR=Sc,Rs.filter=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function(r){return Rs(r,e,t)}};var wc=function wc1(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Object.assign({},e,t)};Rs.defaults=function(e){if(!e||(typeof e==="undefined"?"undefined":_type_of(e))!="object"||!Object.keys(e).length)return Rs;var t=Rs;return Object.assign(function(r,n){return t(r,n,wc(e,arguments.length>2&&arguments[2]!==void 0?arguments[2]:{}))},{Minimatch:/*#__PURE__*/function(_t_Minimatch){_inherits(Minimatch,_t_Minimatch);function Minimatch(r){_class_call_check(this,Minimatch);return _call_super(this,Minimatch,[r,wc(e,arguments.length>1&&arguments[1]!==void 0?arguments[1]:{})])}_create_class(Minimatch,null,[{key:"defaults",value:function defaults(r){return t.defaults(wc(e,r)).Minimatch}}]);return Minimatch}(t.Minimatch),AST:/*#__PURE__*/function(_t_AST){_inherits(AST,_t_AST);function AST(r,n){_class_call_check(this,AST);return _call_super(this,AST,[r,n,wc(e,arguments.length>2&&arguments[2]!==void 0?arguments[2]:{})])}_create_class(AST,null,[{key:"fromGlob",value:function fromGlob(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t.AST.fromGlob(r,wc(e,n))}}]);return AST}(t.AST),unescape:function unescape1(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t.unescape(r,wc(e,n))},escape:function escape1(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t.escape(r,wc(e,n))},filter:function filter(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t.filter(r,wc(e,n))},defaults:function(r){return t.defaults(wc(e,r))},makeRe:function makeRe(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t.makeRe(r,wc(e,n))},braceExpand:function braceExpand(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t.braceExpand(r,wc(e,n))},match:function match(r,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return t.match(r,n,wc(e,i))},sep:t.sep,GLOBSTAR:Sc})};var PAe=function PAe1(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return FP(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:xnr(e)};Rs.braceExpand=PAe,Rs.makeRe=function(e){return new K2(e,arguments.length>1&&arguments[1]!==void 0?arguments[1]:{}).makeRe()},Rs.match=function(e,t){var r=new K2(t,arguments.length>2&&arguments[2]!==void 0?arguments[2]:{});return e=e.filter(function(n){return r.match(n)}),r.options.nonull&&!e.length&&e.push(t),e};var cAe=/[?*]|[+@!]\(.*?\)|\[|\]/,K2=/*#__PURE__*/function(){function K21(t){_class_call_check(this,K21);C(this,"options");C(this,"set");C(this,"pattern");C(this,"windowsPathsNoEscape");C(this,"nonegate");C(this,"negate");C(this,"comment");C(this,"empty");C(this,"preserveMultipleSlashes");C(this,"partial");C(this,"globSet");C(this,"globParts");C(this,"nocase");C(this,"isWindows");C(this,"platform");C(this,"windowsNoMagicRoot");C(this,"regexp");var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};FP(t),r=r||{},this.options=r,this.pattern=t,this.platform=r.platform||AAe,this.isWindows=this.platform==="win32",this.windowsPathsNoEscape=!!r.windowsPathsNoEscape||r.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!r.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!r.nonegate,this.comment=!1,this.empty=!1,this.partial=!!r.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=r.windowsNoMagicRoot!==void 0?r.windowsNoMagicRoot:!(!this.isWindows||!this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}_create_class(K21,[{key:"hasMagic",value:function hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;var _iteratorNormalCompletion=true,_didIteratorError=false,_iteratorError=undefined,_iteratorNormalCompletion1=true,_didIteratorError1=false,_iteratorError1=undefined;try{for(var _iterator=this.set[Symbol.iterator](),_step;!(_iteratorNormalCompletion1=(_step=_iterator.next()).done);_iteratorNormalCompletion1=true){var t=_step.value;try{for(var _iterator1=t[Symbol.iterator](),_step1;!(_iteratorNormalCompletion=(_step1=_iterator1.next()).done);_iteratorNormalCompletion=true){var r=_step1.value;if(typeof r!="string")return!0}}catch(err){_didIteratorError=true;_iteratorError=err}finally{try{if(!_iteratorNormalCompletion&&_iterator1.return!=null){_iterator1.return()}}finally{if(_didIteratorError){throw _iteratorError}}}}}catch(err){_didIteratorError1=true;_iteratorError1=err}finally{try{if(!_iteratorNormalCompletion1&&_iterator.return!=null){_iterator.return()}}finally{if(_didIteratorError1){throw _iteratorError1}}}return!1}},{key:"debug",value:function debug(){}},{key:"make",value:function make(){var _this=this;var t=this.pattern,r=this.options;if(!r.nocomment&&t.charAt(0)==="#")return void(this.comment=!0);if(!t)return void(this.empty=!0);this.parseNegate(),this.globSet=_to_consumable_array(new Set(this.braceExpand())),r.debug&&(this.debug=function(){var _console;return(_console=console).error.apply(_console,arguments)}),this.debug(this.pattern,this.globSet);var n=this.globSet.map(function(a){return _this.slashSplit(a)});this.globParts=this.preprocess(n),this.debug(this.pattern,this.globParts);var i=this.globParts.map(function(a,o,s){if(_this.isWindows&&_this.windowsNoMagicRoot){var l=!(a[0]!==""||a[1]!==""||a[2]!=="?"&&cAe.test(a[2])||cAe.test(a[3])),c=/^[a-z]:/i.test(a[0]);if(l)return _to_consumable_array(a.slice(0,4)).concat(_to_consumable_array(a.slice(4).map(function(d){return _this.parse(d)})));if(c)return[a[0]].concat(_to_consumable_array(a.slice(1).map(function(d){return _this.parse(d)})))}return a.map(function(l){return _this.parse(l)})});if(this.debug(this.pattern,i),this.set=i.filter(function(a){return a.indexOf(!1)===-1}),this.isWindows)for(var a=0;a=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):t=r>=1?this.levelOneOptimize(t):this.adjascentGlobstarOptimize(t),t}},{key:"adjascentGlobstarOptimize",value:function adjascentGlobstarOptimize(t){return t.map(function(r){var n=-1;for(;(n=r.indexOf("**",n+1))!==-1;){var i=n;for(;r[i+1]==="**";)i++;i!==n&&r.splice(n,i-n)}return r})}},{key:"levelOneOptimize",value:function levelOneOptimize(t){return t.map(function(r){return(r=r.reduce(function(n,i){var a=n[n.length-1];return i==="**"&&a==="**"?n:i===".."&&a&&a!==".."&&a!=="."&&a!=="**"?(n.pop(),n):(n.push(i),n)},[])).length===0?[""]:r})}},{key:"levelTwoFileOptimize",value:function levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));var r=!1;do{if(r=!1,!this.preserveMultipleSlashes){for(var i=1;ii&&n.splice(i+1,o-i);var s=n[i+1],l=n[i+2],c=n[i+3];if(s!==".."||!l||l==="."||l===".."||!c||c==="."||c==="..")continue;r=!0,n.splice(i,1);var d=n.slice(0);d[i]="**",t.push(d),i--}if(!this.preserveMultipleSlashes){for(var o3=1;o32&&arguments[2]!==void 0&&arguments[2],i=0,a=0,o=[],s="";for(;i2&&arguments[2]!==void 0&&arguments[2],i=this.options;if(this.isWindows){var g=typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]),x=!g&&t[0]===""&&t[1]===""&&t[2]==="?"&&/^[a-z]:$/i.test(t[3]),y=typeof r[0]=="string"&&/^[a-z]:$/i.test(r[0]),v=x?3:g?0:void 0,_=!y&&r[0]===""&&r[1]===""&&r[2]==="?"&&typeof r[3]=="string"&&/^[a-z]:$/i.test(r[3])?3:y?0:void 0;if(typeof v=="number"&&typeof _=="number"){var _ref=[t[v],r[_]],b=_ref[0],k=_ref[1];b.toLowerCase()===k.toLowerCase()&&(r[_]=b,_>v?r=r.slice(_):v>_&&(t=t.slice(v)))}}var _this_options=this.options,tmp=_this_options.optimizationLevel,a=tmp===void 0?1:tmp;a>=2&&(t=this.levelTwoFileOptimize(t)),this.debug("matchOne",this,{file:t,pattern:r}),this.debug("matchOne",t.length,r.length);for(var o=0,s=0,l=t.length,c=r.length;o>> no match, partial?",t,p,r,m),p!==l))}var g2=void 0;if(typeof d=="string"?(g2=u===d,this.debug("string match",d,u,g2)):(g2=d.test(u),this.debug("pattern match",d,u,g2)),!g2)return!1}if(o===l&&s===c)return!0;if(o===l)return n;if(s===c)return o===l-1&&t[o]==="";throw new Error("wtf?")}},{key:"braceExpand",value:function braceExpand(){return PAe(this.pattern,this.options)}},{key:"parse",value:function parse(t){FP(t);var r=this.options;if(t==="**")return Sc;if(t==="")return"";var n,i=null;(n=t.match($nr))?i=r.dot?Dnr:Nnr:(n=t.match(knr))?i=(r.nocase?r.dot?Cnr:Inr:r.dot?Tnr:Enr)(n[1]):(n=t.match(qnr))?i=(r.nocase?r.dot?Fnr:Lnr:r.dot?znr:jnr)(n):(n=t.match(Anr))?i=r.dot?Onr:Pnr:(n=t.match(Rnr))&&(i=Mnr);var a=V2.fromGlob(t,this.options).toMMPattern();return i&&(typeof a==="undefined"?"undefined":_type_of(a))=="object"&&Reflect.defineProperty(a,"test",{value:i}),a}},{key:"makeRe",value:function makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;var t=this.set;if(!t.length)return this.regexp=!1,this.regexp;var r=this.options,n=r.noglobstar?"[^/]*?":r.dot?"(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?":"(?:(?!(?:\\/|^)\\.).)*?",i=new Set(r.nocase?["i"]:[]),a=t.map(function(l){var c=l.map(function(d){var _iteratorNormalCompletion=true,_didIteratorError=false,_iteratorError=undefined;if(_instanceof(d,RegExp))try{for(var _iterator=d.flags.split("")[Symbol.iterator](),_step;!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=true){var u=_step.value;i.add(u)}}catch(err){_didIteratorError=true;_iteratorError=err}finally{try{if(!_iteratorNormalCompletion&&_iterator.return!=null){_iterator.return()}}finally{if(_didIteratorError){throw _iteratorError}}}return typeof d=="string"?d.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):d===Sc?Sc:d._src});return c.forEach(function(d,u){var p=c[u+1],m=c[u-1];d===Sc&&m!==Sc&&(m===void 0?p!==void 0&&p!==Sc?c[u+1]="(?:\\/|"+n+"\\/)?"+p:c[u]=n:p===void 0?c[u-1]=m+"(?:\\/|"+n+")?":p!==Sc&&(c[u-1]=m+"(?:\\/|\\/"+n+"\\/)"+p,c[u+1]=Sc))}),c.filter(function(d){return d!==Sc}).join("/")}).join("|"),_ref=_sliced_to_array(t.length>1?["(?:",")"]:["",""],2),o=_ref[0],s=_ref[1];a="^"+o+a+s+"$",this.negate&&(a="^(?!"+a+").+$");try{this.regexp=new RegExp(a,_to_consumable_array(i).join(""))}catch(l){this.regexp=!1}return this.regexp}},{key:"slashSplit",value:function slashSplit(t){return this.preserveMultipleSlashes?t.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(t)?[""].concat(_to_consumable_array(t.split(/\/+/))):t.split(/\/+/)}},{key:"match",value:function match(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.partial;if(this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return t==="";if(t==="/"&&r)return!0;var n=this.options;this.isWindows&&(t=t.split("\\").join("/"));var i=this.slashSplit(t);this.debug(this.pattern,"split",i);var a=this.set;this.debug(this.pattern,"set",a);var o=i[i.length-1];if(!o)for(var s=i.length-2;!o&&s>=0;s--)o=i[s];for(var s2=0;s21&&arguments[1]!==void 0?arguments[1]:"","Invalid response: ").concat(e.status," ").concat(e.statusText));return t.status=e.status,t.response=e,t}function _o(e,t){var r=t.status;if(r===401&&e.digest)return t;if(r>=400)throw nK(t);return t}function px(e,t){return arguments.length>2&&arguments[2]!==void 0&&arguments[2]?{data:t,headers:e.headers?fnr(e.headers):{},status:e.status,statusText:e.statusText}:t}Rs.AST=V2,Rs.Minimatch=K2,Rs.escape=function(e){var _ref=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},tmp=_ref.windowsPathsNoEscape,t=tmp===void 0?!1:tmp;return t?e.replace(/[?*()[\]]/g,"[$&]"):e.replace(/[?*()[\]\\]/g,"\\$&")},Rs.unescape=N3;var Unr=(dAe=function dAe1(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},i=yo({url:ca(e.remoteURL,ua(t)),method:"COPY",headers:{Destination:ca(e.remoteURL,ua(r)),Overwrite:n.overwrite===!1?"F":"T",Depth:n.shallow?"0":"infinity"}},e,n);return o=function o(s){_o(e,s)},(a=vo(i,e))&&a.then||(a=Promise.resolve(a)),o?a.then(o):a;var a,o},function Unr1(){for(var e=[],t=0;t2&&arguments[2]!==void 0?arguments[2]:G2.Original,n=hm().get(e,t);return r==="array"&&Array.isArray(n)===!1?[n]:r==="object"&&Array.isArray(n)?n[0]:n}function j3(e){return new Promise(function(t){t(function(r){var n=r.multistatus;if(n==="")return{multistatus:{response:[]}};if(!n)throw new Error("Invalid response: No root multistatus found");var i={multistatus:Array.isArray(n)?n[0]:n};return hm().set(i,"multistatus.response",$P(i,"multistatus.response",G2.Array)),hm().set(i,"multistatus.response",hm().get(i,"multistatus.response").map(function(a){return function(o){var s=Object.assign({},o);return s.status?hm().set(s,"status",$P(s,"status",G2.Object)):(hm().set(s,"propstat",$P(s,"propstat",G2.Object)),hm().set(s,"propstat.prop",$P(s,"propstat.prop",G2.Object))),s}(a)})),i}(new iK.XMLParser({allowBooleanAttributes:!0,attributeNamePrefix:"",textNodeName:"text",ignoreAttributes:!1,removeNSPrefix:!0,numberParseOptions:{hex:!0,leadingZeros:!1},attributeValueProcessor:function(r,n,i){return n==="true"||n==="false"?n==="true":n},tagValueProcessor:function tagValueProcessor(r,n,i){if(!i.endsWith("propstat.prop.displayname"))return n}}).parse(e)))})}function BP(e,t){var r=arguments.length>2&&arguments[2]!==void 0&&arguments[2],tmp=e.getlastmodified,n=tmp===void 0?null:tmp,tmp1=e.getcontentlength,i=tmp1===void 0?"0":tmp1,tmp2=e.resourcetype,a=tmp2===void 0?null:tmp2,tmp3=e.getcontenttype,o=tmp3===void 0?null:tmp3,tmp4=e.getetag,s=tmp4===void 0?null:tmp4,l=a&&(typeof a==="undefined"?"undefined":_type_of(a))=="object"&&a.collection!==void 0?"directory":"file",c={filename:t,basename:DP().basename(t),lastmod:n,size:parseInt(i,10),type:l,etag:typeof s=="string"?s.replace(/"/g,""):null};return l==="file"&&(c.mime=o&&typeof o=="string"?o.split(";")[0]:""),r&&(e.displayname!==void 0&&(e.displayname=String(e.displayname)),c.props=e),c}function OAe(e,t){var r=arguments.length>2&&arguments[2]!==void 0&&arguments[2],n=null;try{e.multistatus.response[0].propstat&&(n=e.multistatus.response[0])}catch(d){}if(!n)throw new Error("Failed getting item stat: bad response");var _n_propstat=n.propstat,i=_n_propstat.prop,a=_n_propstat.status,_a_split=_sliced_to_array(a.split(" ",3),3),o=_a_split[0],s=_a_split[1],l=_a_split[2],c=parseInt(s,10);if(c>=400){var d=new Error("Invalid response: ".concat(c," ").concat(l));throw d.status=c,d}return BP(i,q3(t),r)}function RAe(e){switch(String(e)){case"-3":return"unlimited";case"-2":case"-1":return"unknown";default:return parseInt(String(e),10)}}function WZ(e,t,r){return r?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}var aK=function(e){return function(){for(var t=[],r=0;r2&&arguments[2]!==void 0?arguments[2]:{},tmp=r.details,n=tmp===void 0?!1:tmp,i=yo({url:ca(e.remoteURL,ua(t)),method:"PROPFIND",headers:{Accept:"text/plain,application/xml",Depth:"0"}},e,r);return WZ(vo(i,e),function(a){return _o(e,a),WZ(a.text(),function(o){return WZ(j3(o),function(s){var l=OAe(s,t,n);return px(a,l,n)})})})});function MAe(e,t,r){return r?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}var Wnr=$Ae(function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=function(a){if(!a||a==="/")return[];var o=a,s=[];do s.push(o),o=DP().dirname(o);while(o&&o!=="/");return s}(q3(t));n.sort(function(a,o){return a.length>o.length?1:o.length>a.length?-1:0});var i=!1;return function(a,o,s){if(typeof a[fAe]=="function"){var g=function g2(x){try{for(;!(l=u.next()).done;)if((x=o(l.value))&&x.then){if(!mAe(x))return void x.then(g,d||(d=nl.bind(null,c=new H2,2)));x=x.v}c?nl(c,1,x):c=x}catch(y){nl(c||(c=new H2),2,y)}};var l,c,d,u=a[fAe]();if(g(),u.return){var p=function p(x){try{l.done||u.return()}catch(y){}return x};if(c&&c.then)return c.then(p,function(x){throw p(x)});p()}return c}if(!("length"in a))throw new TypeError("Object is not iterable");for(var m=[],h=0;h2&&arguments[2]!==void 0?arguments[2]:{};if(r.recursive===!0)return Wnr(e,t,r);var n=yo({url:ca(e.remoteURL,(i=ua(t),i.endsWith("/")?i:i+"/")),method:"MKCOL"},e,r);var i;return MAe(vo(n,e),function(a){_o(e,a)})}),Gnr=bi(388),hAe=bi.n(Gnr),Hnr=function(e){return function(){for(var t=[],r=0;r2&&arguments[2]!==void 0?arguments[2]:{},n={};if(_type_of(r.range)=="object"&&typeof r.range.start=="number"){var s="bytes=".concat(r.range.start,"-");typeof r.range.end=="number"&&(s="".concat(s).concat(r.range.end)),n.Range=s}var i=yo({url:ca(e.remoteURL,ua(t)),method:"GET",headers:n},e,r);return o=function o(s){if(_o(e,s),n.Range&&s.status!==206){var l=new Error("Invalid response code for partial request: ".concat(s.status));throw l.status=s.status,l}return r.callback&&setTimeout(function(){r.callback(s)},0),s.body},(a=vo(i,e))&&a.then||(a=Promise.resolve(a)),o?a.then(o):a;var a,o}),Znr=function(){},Knr=function(e){return function(){for(var t=[],r=0;r2&&arguments[2]!==void 0?arguments[2]:{},n=yo({url:ca(e.remoteURL,ua(t)),method:"DELETE"},e,r);return a=function a(o){_o(e,o)},(i=vo(n,e))&&i.then||(i=Promise.resolve(i)),a?i.then(a):i;var i,a}),Jnr=function(e){return function(){for(var t=[],r=0;r2&&arguments[2]!==void 0?arguments[2]:{};return function(n,i){try{var a=(o=aK(e,t,r),s=function s(){return!0},l?s?s(o):o:(o&&o.then||(o=Promise.resolve(o)),s?o.then(s):o))}catch(c){return i(c)}var o,s,l;return a&&a.then?a.then(void 0,i):a}(0,function(n){if(n.status===404)return!1;throw n})});function VZ(e,t,r){return r?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}var Ynr=function(e){return function(){for(var t=[],r=0;r2&&arguments[2]!==void 0?arguments[2]:{},n=yo({url:ca(e.remoteURL,ua(t),"/"),method:"PROPFIND",headers:{Accept:"text/plain,application/xml",Depth:r.deep?"infinity":"1"}},e,r);return VZ(vo(n,e),function(i){return _o(e,i),VZ(i.text(),function(a){if(!a)throw new Error("Failed parsing directory contents: Empty response");return VZ(j3(a),function(o){var s=eAe(t),l=function(c,d,u){var p=arguments.length>3&&arguments[3]!==void 0&&arguments[3],m=arguments.length>4&&arguments[4]!==void 0&&arguments[4],h=DP().join(d,"/"),_c_multistatus=c.multistatus,g=_c_multistatus.response,x=g.map(function(y){var v=function(b){try{return b.replace(/^https?:\/\/[^\/]+/,"")}catch(k){throw new ds(k,"Failed normalising HREF")}}(y.href),_y_propstat=y.propstat,_=_y_propstat.prop;return BP(_,h==="/"?decodeURIComponent(q3(v)):q3(DP().relative(decodeURIComponent(h),decodeURIComponent(v))),p)});return m?x:x.filter(function(y){return y.basename&&(y.type==="file"||y.filename!==u.replace(/\/$/,""))})}(o,eAe(e.remoteBasePath||e.remotePath),s,r.details,r.includeSelf);return r.glob&&(l=function(c,d){return c.filter(function(u){return Rs(u.filename,d,{matchBase:!0})})}(l,r.glob)),px(i,l,r.details)})})})});function oK(e){return function(){for(var t=[],r=0;r2&&arguments[2]!==void 0?arguments[2]:{},n=yo({url:ca(e.remoteURL,ua(t)),method:"GET",headers:{Accept:"text/plain"},transformResponse:[rir]},e,r);return zP(vo(n,e),function(i){return _o(e,i),zP(i.text(),function(a){return px(i,a,r.details)})})});function zP(e,t,r){return r?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}var eir=oK(function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=yo({url:ca(e.remoteURL,ua(t)),method:"GET"},e,r);return zP(vo(n,e),function(i){var a;return _o(e,i),function(o,s){var l=o();return l&&l.then?l.then(s):s()}(function(){return zP(i.arrayBuffer(),function(o){a=o})},function(){return px(i,a,r.details)})})}),tir=oK(function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},tmp=r.format,n=tmp===void 0?"binary":tmp;if(n!=="binary"&&n!=="text")throw new ds({info:{code:xm.InvalidOutputFormat}},"Invalid output format: ".concat(n));return n==="text"?Xnr(e,t,r):eir(e,t,r)}),rir=function(e){return e};function nir(e){return new iK.XMLBuilder({attributeNamePrefix:"@_",format:!0,ignoreAttributes:!1,suppressEmptyNode:!0}).build(NAe({lockinfo:{"@_xmlns:d":"DAV:",lockscope:{exclusive:{}},locktype:{write:{}},owner:{href:e}}},"d"))}function NAe(e,t){var r=_object_spread({},e);for(var n in r)r.hasOwnProperty(n)&&(r[n]&&_type_of(r[n])=="object"&&n.indexOf(":")===-1?(r["".concat(t,":").concat(n)]=NAe(r[n],t),delete r[n]):/^@_/.test(n)===!1&&(r["".concat(t,":").concat(n)]=r[n],delete r[n]));return r}function eK(e,t,r){return r?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}function DAe(e){return function(){for(var t=[],r=0;r3&&arguments[3]!==void 0?arguments[3]:{},i=yo({url:ca(e.remoteURL,ua(t)),method:"UNLOCK",headers:{"Lock-Token":r}},e,n);return eK(vo(i,e),function(a){if(_o(e,a),a.status!==204&&a.status!==200)throw nK(a)})}),air=DAe(function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=r.refreshToken,tmp=r.timeout,i=tmp===void 0?oir:tmp,a={Accept:"text/plain,application/xml",Timeout:i};n&&(a.If=n);var o=yo({url:ca(e.remoteURL,ua(t)),method:"LOCK",headers:a,data:nir(e.contactHref)},e,r);return eK(vo(o,e),function(s){return _o(e,s),eK(s.text(),function(l){var c=(p=l,new iK.XMLParser({removeNSPrefix:!0,parseAttributeValue:!0,parseTagValue:!0}).parse(p)),d=hm().get(c,"prop.lockdiscovery.activelock.locktoken.href"),u=hm().get(c,"prop.lockdiscovery.activelock.timeout");var p;if(!d)throw nK(s,"No lock token received: ");return{token:d,serverTimeout:u}})})}),oir="Infinite, Second-4100000000";function GZ(e,t,r){return r?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}var sir=function(e){return function(){for(var t=[],r=0;r1&&arguments[1]!==void 0?arguments[1]:{},r=t.path||"/",n=yo({url:ca(e.remoteURL,r),method:"PROPFIND",headers:{Accept:"text/plain,application/xml",Depth:"0"}},e,t);return GZ(vo(n,e),function(i){return _o(e,i),GZ(i.text(),function(a){return GZ(j3(a),function(o){var s=function(l){try{var _l_multistatus_response=_sliced_to_array(l.multistatus.response,1),c=_l_multistatus_response[0],_c_propstat=c.propstat,_c_propstat_prop=_c_propstat.prop,d=_c_propstat_prop["quota-used-bytes"],u=_c_propstat_prop["quota-available-bytes"];return d!==void 0&&u!==void 0?{used:parseInt(String(d),10),available:RAe(u)}:null}catch(c){}return null}(o);return px(i,s,t.details)})})})});function HZ(e,t,r){return r?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}var lir=function(e){return function(){for(var t=[],r=0;r2&&arguments[2]!==void 0?arguments[2]:{},tmp=r.details,n=tmp===void 0?!1:tmp,i=yo({url:ca(e.remoteURL,ua(t)),method:"SEARCH",headers:{Accept:"text/plain,application/xml","Content-Type":e.headers["Content-Type"]||"application/xml; charset=utf-8"}},e,r);return HZ(vo(i,e),function(a){return _o(e,a),HZ(a.text(),function(o){return HZ(j3(o),function(s){var l=function(c,d,u){var p={truncated:!1,results:[]};return p.truncated=c.multistatus.response.some(function(m){var h,g;return((g=(m.status||((h=m.propstat)==null?void 0:h.status)).split(" ",3))==null?void 0:g[1])==="507"&&m.href.replace(/\/$/,"").endsWith(ua(d).replace(/\/$/,""))}),c.multistatus.response.forEach(function(m){if(m.propstat===void 0)return;var h=m.href.split("/").map(decodeURIComponent).join("/");p.results.push(BP(m.propstat.prop,h,u))}),p}(s,t,n);return px(a,l,n)})})})}),uir=function(e){return function(){for(var t=[],r=0;r3&&arguments[3]!==void 0?arguments[3]:{},i=yo({url:ca(e.remoteURL,ua(t)),method:"MOVE",headers:{Destination:ca(e.remoteURL,ua(r)),Overwrite:n.overwrite===!1?"F":"T"}},e,n);return o=function o(s){_o(e,s)},(a=vo(i,e))&&a.then||(a=Promise.resolve(a)),o?a.then(o):a;var a,o}),cir=bi(172),dir=function(e){return function(){for(var t=[],r=0;r3&&arguments[3]!==void 0?arguments[3]:{},tmp=n.contentLength,i=tmp===void 0?!0:tmp,tmp1=n.overwrite,a=tmp1===void 0?!0:tmp1,o={"Content-Type":"application/octet-stream"};i===!1||(o["Content-Length"]=typeof i=="number"?"".concat(i):"".concat(function(d){if(wAe(d))return d.byteLength;if(SAe(d))return d.length;if(typeof d=="string")return(0,cir.d)(d);throw new ds({info:{code:xm.DataTypeNoLength}},"Cannot calculate data length: Invalid type")}(r))),a||(o["If-None-Match"]="*");var s=yo({url:ca(e.remoteURL,ua(t)),method:"PUT",headers:o,data:r},e,n);return c=function c(d){try{_o(e,d)}catch(u){var p=u;if(p.status!==412||a)throw p;return!1}return!0},(l=vo(s,e))&&l.then||(l=Promise.resolve(l)),c?l.then(c):l;var l,c}),qAe=function(e){return function(){for(var t=[],r=0;r2&&arguments[2]!==void 0?arguments[2]:{},n=yo({url:ca(e.remoteURL,ua(t)),method:"OPTIONS"},e,r);return a=function a(o){var s,l;try{_o(e,o)}catch(c){throw c}return{compliance:((s=o.headers.get("DAV"))!=null?s:"").split(",").map(function(c){return c.trim()}),server:(l=o.headers.get("Server"))!=null?l:""}},(i=vo(n,e))&&i.then||(i=Promise.resolve(i)),a?i.then(a):i;var i,a});function D3(e,t,r){return r?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}var pir=sK(function(e,t,r,n,i){var a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{};if(r>n||r<0)throw new ds({info:{code:xm.InvalidUpdateRange}},"Invalid update range ".concat(r," for partial update"));var o={"Content-Type":"application/octet-stream","Content-Length":""+(n-r+1),"Content-Range":"bytes ".concat(r,"-").concat(n,"/*")},s=yo({url:ca(e.remoteURL,ua(t)),method:"PUT",headers:o,data:i},e,a);return D3(vo(s,e),function(l){_o(e,l)})});function gAe(e,t){var r=e();return r&&r.then?r.then(t):t(r)}var fir=sK(function(e,t,r,n,i){var a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{};if(r>n||r<0)throw new ds({info:{code:xm.InvalidUpdateRange}},"Invalid update range ".concat(r," for partial update"));var o={"Content-Type":"application/x-sabredav-partialupdate","Content-Length":""+(n-r+1),"X-Update-Range":"bytes=".concat(r,"-").concat(n)},s=yo({url:ca(e.remoteURL,ua(t)),method:"PATCH",headers:o,data:i},e,a);return D3(vo(s,e),function(l){_o(e,l)})});function sK(e){return function(){for(var t=[],r=0;r5&&arguments[5]!==void 0?arguments[5]:{};return D3(qAe(e,t,a),function(o){var s=!1;return gAe(function(){if(o.compliance.includes("sabredav-partialupdate"))return D3(fir(e,t,r,n,i,a),function(l){return s=!0,l})},function(l){var c=!1;return s?l:gAe(function(){if(o.server.includes("Apache")&&o.compliance.includes(""))return D3(pir(e,t,r,n,i,a),function(d){return c=!0,d})},function(d){if(c)return d;throw new ds({info:{code:xm.NotSupported}},"Not supported")})})})}),hir="https://github.com/perry-mitchell/webdav-client/blob/master/LOCK_CONTACT.md";function gir(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},tmp=t.authType,r=tmp===void 0?null:tmp,n=t.remoteBasePath,tmp1=t.contactHref,i=tmp1===void 0?hir:tmp1,a=t.ha1,tmp2=t.headers,o=tmp2===void 0?{}:tmp2,s=t.httpAgent,l=t.httpsAgent,c=t.password,d=t.token,u=t.username,p=t.withCredentials,m=r;m||(m=u||c?rl.Password:rl.None);var h={authType:m,remoteBasePath:n,contactHref:i,ha1:a,headers:Object.assign({},o),httpAgent:s,httpsAgent:l,password:c,remotePath:anr(e),remoteURL:e,token:d,username:u,withCredentials:p};return yAe(h,u,c,d,a),{copyFile:function(g,x,y){return Unr(h,g,x,y)},createDirectory:function(g,x){return XZ(h,g,x)},createReadStream:function(g,x){return function(y,v){var _=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},b=new(hAe()).PassThrough;return Hnr(y,v,_).then(function(k){k.pipe(b)}).catch(function(k){b.emit("error",k)}),b}(h,g,x)},createWriteStream:function(g,x,y){return function(v,_){var b=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},k=arguments.length>3&&arguments[3]!==void 0?arguments[3]:Znr,w=new(hAe()).PassThrough,S={};b.overwrite===!1&&(S["If-None-Match"]="*");var E=yo({url:ca(v.remoteURL,ua(_)),method:"PUT",headers:S,data:w,maxRedirects:0},v,b);return vo(E,v).then(function(T){return _o(v,T)}).then(function(T){setTimeout(function(){k(T)},0)}).catch(function(T){w.emit("error",T)}),w}(h,g,x,y)},customRequest:function(g,x){return Knr(h,g,x)},deleteFile:function(g,x){return Qnr(h,g,x)},exists:function(g,x){return Jnr(h,g,x)},getDirectoryContents:function(g,x){return Ynr(h,g,x)},getFileContents:function(g,x){return tir(h,g,x)},getFileDownloadLink:function(g){return function(x,y){var v=ca(x.remoteURL,ua(y)),_=/^https:/i.test(v)?"https":"http";switch(x.authType){case rl.None:break;case rl.Password:{var b=rAe(x.headers.Authorization.replace(/^Basic /i,"").trim());v=v.replace(/^https?:\/\//,"".concat(_,"://").concat(b,"@"));break}default:throw new ds({info:{code:xm.LinkUnsupportedAuthType}},"Unsupported auth type for file link: ".concat(x.authType))}return v}(h,g)},getFileUploadLink:function(g){return function(x,y){var v="".concat(ca(x.remoteURL,ua(y)),"?Content-Type=application/octet-stream"),_=/^https:/i.test(v)?"https":"http";switch(x.authType){case rl.None:break;case rl.Password:{var b=rAe(x.headers.Authorization.replace(/^Basic /i,"").trim());v=v.replace(/^https?:\/\//,"".concat(_,"://").concat(b,"@"));break}default:throw new ds({info:{code:xm.LinkUnsupportedAuthType}},"Unsupported auth type for file link: ".concat(x.authType))}return v}(h,g)},getHeaders:function(){return Object.assign({},h.headers)},getQuota:function(g){return sir(h,g)},lock:function(g,x){return air(h,g,x)},moveFile:function(g,x,y){return uir(h,g,x,y)},putFileContents:function(g,x,y){return dir(h,g,x,y)},partialUpdateFileContents:function(g,x,y,v,_){return mir(h,g,x,y,v,_)},getDAVCompliance:function(g){return qAe(h,g)},search:function(g,x){return lir(h,g,x)},setHeaders:function(g){h.headers=Object.assign({},g)},stat:function(g,x){return aK(h,g,x)},unlock:function(g,x,y){return iir(h,g,x,y)}}}var W2n=kc.hT,V2n=kc.O4,G2n=kc.Kd,H2n=kc.YK,lK=kc.UU,LAe=kc.Gu,Z2n=kc.ky,K2n=kc.h4,Q2n=kc.ch,J2n=kc.hq,Y2n=kc.i5;var Q2=require("obsidian"),FAe="https://dav.jianguoyun.com/nsdav",zAe="https://dav.jianguoyun.com/dav",jAe="1.4.2",UAe="dc_obsidian_dp0gymrn",Vp="nutstore-llm-gateway";var xir="0.13.26",vir="0.14.6";var BAe=!Q2.Platform.isAndroidApp&&(0,Q2.requireApiVersion)(xir)||Q2.Platform.isAndroidApp&&(0,Q2.requireApiVersion)(vir),vm=!1;var KAe=require("obsidian");var Ms={silent:Number.NEGATIVE_INFINITY,fatal:0,error:0,warn:1,log:2,info:3,success:3,fail:3,ready:3,start:3,box:3,debug:4,trace:5,verbose:Number.POSITIVE_INFINITY},pK={silent:{level:-1},fatal:{level:Ms.fatal},error:{level:Ms.error},warn:{level:Ms.warn},log:{level:Ms.log},info:{level:Ms.info},success:{level:Ms.success},fail:{level:Ms.fail},ready:{level:Ms.info},start:{level:Ms.info},box:{level:Ms.info},debug:{level:Ms.debug},trace:{level:Ms.trace},verbose:{level:Ms.verbose}};function uK(e){if(e===null||(typeof e==="undefined"?"undefined":_type_of(e))!="object")return!1;var t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null||Symbol.iterator in e?!1:Symbol.toStringTag in e?Object.prototype.toString.call(e)==="[object Module]":!0}function fK(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".",n=arguments.length>3?arguments[3]:void 0;if(!uK(t))return fK(e,{},r,n);var i=Object.assign({},t);for(var a in e){if(a==="__proto__"||a==="constructor")continue;var o=e[a];o!=null&&(n&&n(i,a,o,r)||(Array.isArray(o)&&Array.isArray(i[a])?i[a]=_to_consumable_array(o).concat(_to_consumable_array(i[a])):uK(o)&&uK(i[a])?i[a]=fK(o,i[a],(r?"".concat(r,"."):"")+a.toString(),n):i[a]=o))}return i}function yir(e){return function(){for(var _len=arguments.length,t=new Array(_len),_key=0;_key<_len;_key++){t[_key]=arguments[_key]}return t.reduce(function(r,n){return fK(r,n,"",e)},{})}}var _ir=yir();function bir(e){return Object.prototype.toString.call(e)==="[object Object]"}function wir(e){return!(!bir(e)||!e.message&&!e.args||e.stack)}var cK=!1,WAe=[],Qa=/*#__PURE__*/function(){function Qa1(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};_class_call_check(this,Qa1);C(this,"options");C(this,"_lastLog");C(this,"_mockFn");var r=t.types||pK;this.options=_ir(_object_spread_props(_object_spread({},t),{defaults:_object_spread({},t.defaults),level:dK(t.level,r),reporters:_to_consumable_array(t.reporters||[])}),{types:pK,throttle:1e3,throttleMin:5,formatOptions:{date:!0,colors:!1,compact:!0}});for(var n in r){var i=_object_spread({type:n},this.options.defaults,r[n]);this[n]=this._wrapLogFn(i),this[n].raw=this._wrapLogFn(i,!0)}this.options.mockFn&&this.mockTypes(),this._lastLog={}}_create_class(Qa1,[{key:"level",get:function get1(){return this.options.level},set:function set1(t){this.options.level=dK(t,this.options.types,this.options.level)}},{key:"prompt",value:function prompt1(t,r){if(!this.options.prompt)throw new Error("prompt is not supported!");return this.options.prompt(t,r)}},{key:"create",value:function create(t){var r=new Qa(_object_spread({},this.options,t));return this._mockFn&&r.mockTypes(this._mockFn),r}},{key:"withDefaults",value:function withDefaults(t){return this.create(_object_spread_props(_object_spread({},this.options),{defaults:_object_spread({},this.options.defaults,t)}))}},{key:"withTag",value:function withTag(t){return this.withDefaults({tag:this.options.defaults.tag?this.options.defaults.tag+":"+t:t})}},{key:"addReporter",value:function addReporter(t){return this.options.reporters.push(t),this}},{key:"removeReporter",value:function removeReporter(t){if(t){var r=this.options.reporters.indexOf(t);if(r!==-1)return this.options.reporters.splice(r,1)}else this.options.reporters.splice(0);return this}},{key:"setReporters",value:function setReporters(t){return this.options.reporters=Array.isArray(t)?t:[t],this}},{key:"wrapAll",value:function wrapAll(){this.wrapConsole(),this.wrapStd()}},{key:"restoreAll",value:function restoreAll(){this.restoreConsole(),this.restoreStd()}},{key:"wrapConsole",value:function wrapConsole(){for(var t in this.options.types)console["__"+t]||(console["__"+t]=console[t]),console[t]=this[t].raw}},{key:"restoreConsole",value:function restoreConsole(){for(var t in this.options.types)console["__"+t]&&(console[t]=console["__"+t],delete console["__"+t])}},{key:"wrapStd",value:function wrapStd(){this._wrapStream(this.options.stdout,"log"),this._wrapStream(this.options.stderr,"log")}},{key:"_wrapStream",value:function _wrapStream(t,r){var _this=this;t&&(t.__write||(t.__write=t.write),t.write=function(n){_this[r].raw(String(n).trim())})}},{key:"restoreStd",value:function restoreStd(){this._restoreStream(this.options.stdout),this._restoreStream(this.options.stderr)}},{key:"_restoreStream",value:function _restoreStream(t){t&&t.__write&&(t.write=t.__write,delete t.__write)}},{key:"pauseLogs",value:function pauseLogs(){cK=!0}},{key:"resumeLogs",value:function resumeLogs(){cK=!1;var t=WAe.splice(0);var _iteratorNormalCompletion=true,_didIteratorError=false,_iteratorError=undefined;try{for(var _iterator=t[Symbol.iterator](),_step;!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=true){var r=_step.value;r[0]._logFn(r[1],r[2])}}catch(err){_didIteratorError=true;_iteratorError=err}finally{try{if(!_iteratorNormalCompletion&&_iterator.return!=null){_iterator.return()}}finally{if(_didIteratorError){throw _iteratorError}}}}},{key:"mockTypes",value:function mockTypes(t){var r=t||this.options.mockFn;if(this._mockFn=r,typeof r=="function")for(var n in this.options.types)this[n]=r(n,this.options.types[n])||this[n],this[n].raw=this[n]}},{key:"_wrapLogFn",value:function _wrapLogFn(t,r){var _this=this;return function(){for(var _len=arguments.length,n=new Array(_len),_key=0;_key<_len;_key++){n[_key]=arguments[_key]}if(cK){WAe.push([_this,t,n,r]);return}return _this._logFn(t,n,r)}}},{key:"_logFn",value:function _logFn(t,r,n){var _this=this;if((t.level||0)>this.level)return!1;var i=_object_spread_props(_object_spread({date:new Date,args:[]},t),{level:dK(t.level,this.options.types)});!n&&r.length===1&&wir(r[0])?Object.assign(i,r[0]):i.args=_to_consumable_array(r),i.message&&(i.args.unshift(i.message),delete i.message),i.additional&&(Array.isArray(i.additional)||(i.additional=i.additional.split("\n")),i.args.push("\n"+i.additional.join("\n")),delete i.additional),i.type=typeof i.type=="string"?i.type.toLowerCase():"log",i.tag=typeof i.tag=="string"?i.tag:"";var a=function(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;var l=(_this._lastLog.count||0)-_this.options.throttleMin;if(_this._lastLog.object&&l>0){var c=_to_consumable_array(_this._lastLog.object.args);l>1&&c.push("(repeated ".concat(l," times)")),_this._log(_object_spread_props(_object_spread({},_this._lastLog.object),{args:c})),_this._lastLog.count=1}s&&(_this._lastLog.object=i,_this._log(i))};clearTimeout(this._lastLog.timeout);var o=this._lastLog.time&&i.date?i.date.getTime()-this._lastLog.time.getTime():0;if(this._lastLog.time=i.date,othis.options.throttleMin)){this._lastLog.timeout=setTimeout(a,this.options.throttle);return}}catch(s){}a(!0)}},{key:"_log",value:function _log(t){var _iteratorNormalCompletion=true,_didIteratorError=false,_iteratorError=undefined;try{for(var _iterator=this.options.reporters[Symbol.iterator](),_step;!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=true){var r=_step.value;r.log(t,{options:this.options})}}catch(err){_didIteratorError=true;_iteratorError=err}finally{try{if(!_iteratorNormalCompletion&&_iterator.return!=null){_iterator.return()}}finally{if(_didIteratorError){throw _iteratorError}}}}}]);return Qa1}();function dK(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:3;return e===void 0?r:typeof e=="number"?e:t[e]&&t[e].level!==void 0?t[e].level:r}Qa.prototype.add=Qa.prototype.addReporter;Qa.prototype.remove=Qa.prototype.removeReporter;Qa.prototype.clear=Qa.prototype.removeReporter;Qa.prototype.withScope=Qa.prototype.withTag;Qa.prototype.mock=Qa.prototype.mockTypes;Qa.prototype.pause=Qa.prototype.pauseLogs;Qa.prototype.resume=Qa.prototype.resumeLogs;function VAe(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return new Qa(e)}var mK=/*#__PURE__*/function(){function mK1(t){_class_call_check(this,mK1);C(this,"options");C(this,"defaultColor");C(this,"levelColorMap");C(this,"typeColorMap");this.options=_object_spread({},t),this.defaultColor="#7f8c8d",this.levelColorMap={0:"#c0392b",1:"#f39c12",3:"#00BCD4"},this.typeColorMap={success:"#2ecc71"}}_create_class(mK1,[{key:"_getLogFn",value:function _getLogFn(t){return t<1?console.__error||console.error:t===1?console.__warn||console.warn:console.__log||console.log}},{key:"log",value:function log(t){var r=this._getLogFn(t.level),n=t.type==="log"?"":t.type,i=t.tag||"",o="\n background: ".concat(this.typeColorMap[t.type]||this.levelColorMap[t.level]||this.defaultColor,";\n border-radius: 0.5em;\n color: white;\n font-weight: bold;\n padding: 2px 0.5em;\n "),s="%c".concat([i,n].filter(Boolean).join(":"));typeof t.args[0]=="string"?r.apply(void 0,["".concat(s,"%c ").concat(t.args[0]),o,""].concat(_to_consumable_array(t.args.slice(1)))):r.apply(void 0,[s,o].concat(_to_consumable_array(t.args)))}}]);return mK1}();function hK(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return VAe(_object_spread({reporters:e.reporters||[new mK({})],prompt:function prompt1(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return n.type==="confirm"?Promise.resolve(confirm(r)):Promise.resolve(prompt(r))}},e))}var c_n=hK();var Sir=hK({level:Ms.verbose,formatOptions:{date:!0,colors:!1}}),$e=Sir;var Gp=require("obsidian");function kir(){return Gp.Platform.isWin?"Windows":Gp.Platform.isMacOS?"macOS":Gp.Platform.isLinux?"Linux":Gp.Platform.isAndroidApp?"Android":Gp.Platform.isIosApp?"iOS":"Unknown"}function Eir(){return Gp.Platform.isTablet?"Tablet":Gp.Platform.isPhone?"Phone":Gp.Platform.isDesktopApp?"Desktop":Gp.Platform.isMobileApp?"Mobile":"Unknown"}function GAe(e){try{return new URL(e).hostname.toLowerCase().includes("jianguoyun")}catch(t){return!1}}var HAe="Obsidian (".concat(kir(),"; ").concat(Eir(),"; ObsidianNutstoreSync/").concat(jAe,")"),ZAe="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36";var gK=/*#__PURE__*/function(Error1){_inherits(gK1,Error1);function gK1(r){_class_call_check(this,gK1);var _this;_this=_call_super(this,gK1,["".concat(r.status,": ").concat(r.text)]);_this.res=r;return _this}return gK1}(_wrap_native_super(Error));function Ec(e){return _async_to_generator(function(){var t,r,n,i,a;return _ts_generator(this,function(_state){switch(_state.label){case 0:t=typeof e=="string"?e:e.url,r=typeof e=="string"?{}:e.headers||{},n=GAe(t)?_object_spread_props(_object_spread({},r),{"User-Agent":HAe}):_object_spread_props(_object_spread({},r),{"User-Agent":ZAe}),i=typeof e=="string"?{url:t,throw:!1,headers:n}:_object_spread_props(_object_spread({},e),{throw:!1,headers:n});return[4,(0,KAe.requestUrl)(i)];case 1:a=_state.sent();if(a.status>=400&&($e.error(a),typeof e=="string"||e.throw!==!1))throw new gK(a);return[2,a]}})})()}function QAe(e){return Object.fromEntries(Object.entries(e).map(function(param){var _param=_sliced_to_array(param,2),t=_param[0],r=_param[1];return[t.toLowerCase(),r]}))}function Tir(e){return!/[^\u0000-\u00ff]/g.test(e)}BAe&&LAe().patch("request",function(e){return _async_to_generator(function(){var d,t,r,n,i,a,o,_tmp,s,u,l,c;return _ts_generator(this,function(_state){switch(_state.label){case 0:t=e,r=QAe(_object_spread({},t.headers));delete r.host,delete r["content-length"];n=(d=r.accept)!=null?d:r["content-type"],i=_object_spread({},r);Object.prototype.hasOwnProperty.call(i,"authorization")&&(i.authorization="");a={url:t.url,method:t.method,body:t.data,headers:r,contentType:n,throw:!1};return[4,Ec(a)];case 1:o=_state.sent();_tmp=o.status===401&&YAe.Platform.isIosApp&&!t.url.endsWith("/")&&!t.url.endsWith(".md")&&t.method.toUpperCase()==="PROPFIND";if(!_tmp)return[3,3];a.url="".concat(t.url,"/");return[4,Ec(a)];case 2:_tmp=o=_state.sent();_state.label=3;case 3:_tmp;s=QAe(_object_spread({},o.headers));for(var u in s)Object.prototype.hasOwnProperty.call(s,u)&&(Tir(s[u])||(s[u]=encodeURIComponent(s[u])));c=(0,JAe.getReasonPhrase)(o.status);return[2,([101,103,204,205,304].includes(o.status)?l=new Response(null,{status:o.status,statusText:c,headers:s}):l=new Response(o.arrayBuffer,{status:o.status,statusText:c,headers:s}),l)]}})})()});var B3=typeof Buffer=="function",P_n=typeof TextDecoder=="function"?new TextDecoder:void 0,XAe=typeof TextEncoder=="function"?new TextEncoder:void 0,Iir="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",U3=Array.prototype.slice.call(Iir),WP=function(e){var t={};return e.forEach(function(r,n){return t[r]=n}),t}(U3),Cir=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,Pu=String.fromCharCode.bind(String),e9e=typeof Uint8Array.from=="function"?Uint8Array.from.bind(Uint8Array):function(e){return new Uint8Array(Array.prototype.slice.call(e,0))},r9e=function(e){return e.replace(/=/g,"").replace(/[+\/]/g,function(t){return t=="+"?"-":"_"})},n9e=function(e){return e.replace(/[^A-Za-z0-9\+\/]/g,"")},Air=function(e){var t,r,n,i,a="",o=e.length%3;for(var s=0;s255||(n=e.charCodeAt(s++))>255||(i=e.charCodeAt(s++))>255)throw new TypeError("invalid character found");t=r<<16|n<<8|i,a+=U3[t>>18&63]+U3[t>>12&63]+U3[t>>6&63]+U3[t&63]}return o?a.slice(0,o-3)+"===".substring(o):a},i9e=typeof btoa=="function"?function(e){return btoa(e)}:B3?function(e){return Buffer.from(e,"binary").toString("base64")}:Air,xK=B3?function(e){return Buffer.from(e).toString("base64")}:function(e){var r=[];for(var n=0,i=e.length;n1&&arguments[1]!==void 0?arguments[1]:!1;return t?r9e(xK(e)):xK(e)},Pir=function(e){if(e.length<2){var t=e.charCodeAt(0);return t<128?e:t<2048?Pu(192|t>>>6)+Pu(128|t&63):Pu(224|t>>>12&15)+Pu(128|t>>>6&63)+Pu(128|t&63)}else{var t=65536+(e.charCodeAt(0)-55296)*1024+(e.charCodeAt(1)-56320);return Pu(240|t>>>18&7)+Pu(128|t>>>12&63)+Pu(128|t>>>6&63)+Pu(128|t&63)}},Oir=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,Rir=function(e){return e.replace(Oir,Pir)},t9e=B3?function(e){return Buffer.from(e,"utf8").toString("base64")}:XAe?function(e){return xK(XAe.encode(e))}:function(e){return i9e(Rir(e))},a9e=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return t?r9e(t9e(e)):t9e(e)};var Mir=function(e){if(e=e.replace(/\s+/g,""),!Cir.test(e))throw new TypeError("malformed base64.");e+="==".slice(2-(e.length&3));var t,r,n,i=[];for(var a=0;a>16&255)):n===64?i.push(Pu(t>>16&255,t>>8&255)):i.push(Pu(t>>16&255,t>>8&255,t&255));return i.join("")},$ir=typeof atob=="function"?function(e){return atob(n9e(e))}:B3?function(e){return Buffer.from(e,"base64").toString("binary")}:Mir,Nir=B3?function(e){return e9e(Buffer.from(e,"base64"))}:function(e){return e9e($ir(e).split("").map(function(t){return t.charCodeAt(0)}))},W3=function(e){return Nir(Dir(e))};var Dir=function(e){return n9e(e.replace(/[-_]/g,function(t){return t=="-"?"+":"/"}))};var Rz=require("obsidian");var o9e=Object.freeze({ignoreUnknown:!1,respectType:!1,respectFunctionNames:!1,respectFunctionProperties:!1,unorderedObjects:!0,unorderedArrays:!1,unorderedSets:!1,excludeKeys:void 0,excludeValues:void 0,replacer:void 0});function V3(e,t){t?t=_object_spread({},o9e,t):t=o9e;var r=l9e(t);return r.dispatch(e),r.toString()}var qir=Object.freeze(["prototype","__proto__","constructor"]);function l9e(e){var t="",r=new Map,n=function(i){t+=i};return{toString:function toString(){return t},getContext:function getContext(){return r},dispatch:function dispatch(i){return e.replacer&&(i=e.replacer(i)),this[i===null?"null":typeof i==="undefined"?"undefined":_type_of(i)](i)},object:function object(i){var _this=this;if(i&&typeof i.toJSON=="function")return this.object(i.toJSON());var a=Object.prototype.toString.call(i),o="",s=a.length;s<10?o="unknown:["+a+"]":o=a.slice(8,s-1),o=o.toLowerCase();var l=null;if((l=r.get(i))===void 0)r.set(i,r.size);else return this.dispatch("[CIRCULAR:"+l+"]");if(typeof Buffer!="undefined"&&Buffer.isBuffer&&Buffer.isBuffer(i))return n("buffer:"),n(i.toString("utf8"));if(o!=="object"&&o!=="function"&&o!=="asyncfunction")this[o]?this[o](i):e.ignoreUnknown||this.unkown(i,o);else{var c=Object.keys(i);e.unorderedObjects&&(c=c.sort());var d=[];e.respectType!==!1&&!s9e(i)&&(d=qir),e.excludeKeys&&(c=c.filter(function(p){return!e.excludeKeys(p)}),d=d.filter(function(p){return!e.excludeKeys(p)})),n("object:"+(c.length+d.length)+":");var u=function(p){_this.dispatch(p),n(":"),e.excludeValues||_this.dispatch(i[p]),n(",")};var _iteratorNormalCompletion=true,_didIteratorError=false,_iteratorError=undefined;try{for(var _iterator=c[Symbol.iterator](),_step;!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=true){var p=_step.value;u(p)}}catch(err){_didIteratorError=true;_iteratorError=err}finally{try{if(!_iteratorNormalCompletion&&_iterator.return!=null){_iterator.return()}}finally{if(_didIteratorError){throw _iteratorError}}}var _iteratorNormalCompletion1=true,_didIteratorError1=false,_iteratorError1=undefined;try{for(var _iterator1=d[Symbol.iterator](),_step1;!(_iteratorNormalCompletion1=(_step1=_iterator1.next()).done);_iteratorNormalCompletion1=true){var p2=_step1.value;u(p2)}}catch(err){_didIteratorError1=true;_iteratorError1=err}finally{try{if(!_iteratorNormalCompletion1&&_iterator1.return!=null){_iterator1.return()}}finally{if(_didIteratorError1){throw _iteratorError1}}}}},array:function array(i,a){if(a=a===void 0?e.unorderedArrays!==!1:a,n("array:"+i.length+":"),!a||i.length<=1){var _iteratorNormalCompletion=true,_didIteratorError=false,_iteratorError=undefined;try{for(var _iterator=i[Symbol.iterator](),_step;!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=true){var l=_step.value;this.dispatch(l)}}catch(err){_didIteratorError=true;_iteratorError=err}finally{try{if(!_iteratorNormalCompletion&&_iterator.return!=null){_iterator.return()}}finally{if(_didIteratorError){throw _iteratorError}}}return}var o=new Map,s=i.map(function(l){var c=l9e(e);c.dispatch(l);var _iteratorNormalCompletion=true,_didIteratorError=false,_iteratorError=undefined;try{for(var _iterator=c.getContext()[Symbol.iterator](),_step;!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=true){var _step_value=_sliced_to_array(_step.value,2),d=_step_value[0],u=_step_value[1];o.set(d,u)}}catch(err){_didIteratorError=true;_iteratorError=err}finally{try{if(!_iteratorNormalCompletion&&_iterator.return!=null){_iterator.return()}}finally{if(_didIteratorError){throw _iteratorError}}}return c.toString()});return r=o,s.sort(),this.array(s,!1)},date:function date(i){return n("date:"+i.toJSON())},symbol:function symbol(i){return n("symbol:"+i.toString())},unkown:function unkown(i,a){if(n(a),!!i&&(n(":"),i&&typeof i.entries=="function"))return this.array(Array.from(i.entries()),!0)},error:function error(i){return n("error:"+i.toString())},boolean:function boolean(i){return n("bool:"+i)},string:function string(i){n("string:"+i.length+":"),n(i)},function:function _function(i){n("fn:"),s9e(i)?this.dispatch("[native]"):this.dispatch(i.toString()),e.respectFunctionNames!==!1&&this.dispatch("function-name:"+String(i.name)),e.respectFunctionProperties&&this.object(i)},number:function number(i){return n("number:"+i)},xml:function xml(i){return n("xml:"+i.toString())},null:function _null(){return n("Null")},undefined:function undefined1(){return n("Undefined")},regexp:function regexp(i){return n("regex:"+i.toString())},uint8array:function uint8array(i){return n("uint8array:"),this.dispatch(Array.prototype.slice.call(i))},uint8clampedarray:function uint8clampedarray(i){return n("uint8clampedarray:"),this.dispatch(Array.prototype.slice.call(i))},int8array:function int8array(i){return n("int8array:"),this.dispatch(Array.prototype.slice.call(i))},uint16array:function uint16array(i){return n("uint16array:"),this.dispatch(Array.prototype.slice.call(i))},int16array:function int16array(i){return n("int16array:"),this.dispatch(Array.prototype.slice.call(i))},uint32array:function uint32array(i){return n("uint32array:"),this.dispatch(Array.prototype.slice.call(i))},int32array:function int32array(i){return n("int32array:"),this.dispatch(Array.prototype.slice.call(i))},float32array:function float32array(i){return n("float32array:"),this.dispatch(Array.prototype.slice.call(i))},float64array:function float64array(i){return n("float64array:"),this.dispatch(Array.prototype.slice.call(i))},arraybuffer:function arraybuffer(i){return n("arraybuffer:"),this.dispatch(new Uint8Array(i))},url:function url(i){return n("url:"+i.toString())},map:function map(i){n("map:");var a=_to_consumable_array(i);return this.array(a,e.unorderedSets!==!1)},set:function set1(i){n("set:");var a=_to_consumable_array(i);return this.array(a,e.unorderedSets!==!1)},file:function file(i){return n("file:"),this.dispatch([i.name,i.size,i.type,i.lastModfied])},blob:function blob(){if(e.ignoreUnknown)return n("[blob]");throw new Error('Hashing Blob objects is currently not supported\nUse "options.replacer" or "options.ignoreUnknown"\n')},domwindow:function domwindow(){return n("domwindow")},bigint:function bigint(i){return n("bigint:"+i.toString())},process:function process1(){return n("process")},timer:function timer(){return n("timer")},pipe:function pipe(){return n("pipe")},tcp:function tcp(){return n("tcp")},udp:function udp(){return n("udp")},tty:function tty(){return n("tty")},statwatcher:function statwatcher(){return n("statwatcher")},securecontext:function securecontext(){return n("securecontext")},connection:function connection(){return n("connection")},zlib:function zlib(){return n("zlib")},context:function context(){return n("context")},nodescript:function nodescript(){return n("nodescript")},httpparser:function httpparser(){return n("httpparser")},dataview:function dataview(){return n("dataview")},signal:function signal(){return n("signal")},fsevent:function fsevent(){return n("fsevent")},tlswrap:function tlswrap(){return n("tlswrap")}}}var u9e="[native code] }",Lir=u9e.length;function s9e(e){return typeof e!="function"?!1:Function.prototype.toString.call(e).slice(-Lir)===u9e}var Hp=/*#__PURE__*/function(){function Hp1(t,r){_class_call_check(this,Hp1);C(this,"words");C(this,"sigBytes");t=this.words=t||[],this.sigBytes=r===void 0?t.length*4:r}_create_class(Hp1,[{key:"toString",value:function toString(t){return(t||Fir).stringify(this)}},{key:"concat",value:function concat(t){if(this.clamp(),this.sigBytes%4)for(var r=0;r>>2]>>>24-r%4*8&255;this.words[this.sigBytes+r>>>2]|=n<<24-(this.sigBytes+r)%4*8}else for(var r2=0;r2>>2]=t.words[r2>>>2];return this.sigBytes+=t.sigBytes,this}},{key:"clamp",value:function clamp(){this.words[this.sigBytes>>>2]&=0xffffffff<<32-this.sigBytes%4*8,this.words.length=Math.ceil(this.sigBytes/4)}},{key:"clone",value:function clone(){return new Hp(_to_consumable_array(this.words))}}]);return Hp1}(),Fir={stringify:function stringify(e){var t=[];for(var r=0;r>>2]>>>24-r%4*8&255;t.push((n>>>4).toString(16),(n&15).toString(16))}return t.join("")}},zir={stringify:function stringify(e){var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=[];for(var n=0;n>>2]>>>24-n%4*8&255,a=e.words[n+1>>>2]>>>24-(n+1)%4*8&255,o=e.words[n+2>>>2]>>>24-(n+2)%4*8&255,s=i<<16|a<<8|o;for(var l=0;l<4&&n*8+l*6>>6*(3-l)&63))}return r.join("")}},jir={parse:function parse(e){var t=e.length,r=[];for(var n=0;n>>2]|=(e.charCodeAt(n)&255)<<24-n%4*8;return new Hp(r,t)}},Uir={parse:function parse(e){return jir.parse(unescape(encodeURIComponent(e)))}},vK=/*#__PURE__*/function(){function vK1(){_class_call_check(this,vK1);C(this,"_data",new Hp);C(this,"_nDataBytes",0);C(this,"_minBufferSize",0);C(this,"blockSize",512/32)}_create_class(vK1,[{key:"reset",value:function reset(){this._data=new Hp,this._nDataBytes=0}},{key:"_append",value:function _append(t){typeof t=="string"&&(t=Uir.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes}},{key:"_doProcessBlock",value:function _doProcessBlock(t,r){}},{key:"_process",value:function _process(t){var r,n=this._data.sigBytes/(this.blockSize*4);t?n=Math.ceil(n):n=Math.max((n|0)-this._minBufferSize,0);var i=n*this.blockSize,a=Math.min(i*4,this._data.sigBytes);if(i){for(var o=0;o>>7)^(b<<14|b>>>18)^b>>>3,w=fx[m-2],S=(w<<15|w>>>17)^(w<<13|w>>>19)^w>>>10;fx[m]=k+fx[m-7]+S+fx[m-16]}var h=c&d^~c&u,g=a&o^a&s^o&s,x=(a<<30|a>>>2)^(a<<19|a>>>13)^(a<<10|a>>>22),y=(c<<26|c>>>6)^(c<<21|c>>>11)^(c<<7|c>>>25),v=p+y+h+Bir[m]+fx[m],_=x+g;p=u,u=d,d=c,c=l+v|0,l=s,s=o,o=a,a=v+_|0}i[0]=i[0]+a|0,i[1]=i[1]+o|0,i[2]=i[2]+s|0,i[3]=i[3]+l|0,i[4]=i[4]+c|0,i[5]=i[5]+d|0,i[6]=i[6]+u|0,i[7]=i[7]+p|0}},{key:"finalize",value:function finalize(r){_get(_get_prototype_of(_K1.prototype),"finalize",this).call(this,r);var n=this._nDataBytes*8,i=this._data.sigBytes*8;return this._data.words[i>>>5]|=128<<24-i%32,this._data.words[(i+64>>>9<<4)+14]=Math.floor(n/0x100000000),this._data.words[(i+64>>>9<<4)+15]=n,this._data.sigBytes=this._data.words.length*4,this._process(),this._hash}}]);return _K1}(yK);function Wir(e){return new _K().finalize(e).toString(zir)}function il(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};var r=typeof e=="string"?e:V3(e,t);return Wir(r).slice(0,10)}function Y2(e,t){return{hash:il({type:"vault-path",kind:t,path:e}),type:"vault-path",kind:t,path:e}}function VP(e){return _object_spread_props(_object_spread({},e),{range:{from:_object_spread({},e.range.from),to:_object_spread({},e.range.to)},hash:il(e)})}function GP(e,t){return _async_to_generator(function(){var o,r,n,i,a;return _ts_generator(this,function(_state){switch(_state.label){case 0:r=(t==null?void 0:t.mimeType)||e.type||"image/png",n=(o=t==null?void 0:t.size)!=null?o:e.size,i=e.type===r?e:new Blob([e],{type:r});return[4,Gir(i)];case 1:a=_state.sent();return[2,{hash:il({type:"image",mimeType:r,size:n,dataUrl:a}),type:"image",blob:e,mimeType:r,name:t==null?void 0:t.name,size:n}]}})})()}function p9e(e,t){var a;var r=t.mimeType||e.type||"application/octet-stream",n=(a=t.size)!=null?a:e.size,i="lastModified"in e&&typeof e.lastModified=="number"?e.lastModified:void 0;return{hash:il({type:"file",mimeType:r,filename:t.filename,size:n,lastModified:i}),type:"file",blob:e,mimeType:r,filename:t.filename,size:n}}var d9e=0;function HP(e,t){d9e+=1;var r="pending-context-".concat(Date.now().toString(36),"-").concat(d9e);return{type:"pending-context",placeholderType:e,id:r,placeholder:t}}function Zp(e){return e.type==="pending-context"?e.id:e.hash?e.hash:e.type==="vault-path"?il({type:"vault-path",kind:e.kind,path:e.path}):e.type==="selection"?il({type:"selection",filePath:e.filePath,range:e.range,selectedText:e.selectedText}):e.type==="file"?il({type:"file",mimeType:e.mimeType,filename:e.filename,size:e.size}):il({type:"image",mimeType:e.mimeType,size:e.size})}function Vir(e){if(e.type==="pending-context")return _object_spread({},e);var t=Zp(e);return e.type==="vault-path"?_object_spread_props(_object_spread({},e),{hash:t}):e.type==="image"?_object_spread_props(_object_spread({},e),{hash:t}):e.type==="file"?_object_spread_props(_object_spread({},e),{hash:t}):_object_spread_props(_object_spread({},e),{hash:t,range:{from:_object_spread({},e.range.from),to:_object_spread({},e.range.to)}})}function I0(e){var t=Vir(e);return t.type==="vault-path"?_object_spread({},t):t.type==="image"?_object_spread({},t):t.type==="file"?_object_spread({},t):t.type==="pending-context"?_object_spread({},t):{hash:t.hash,type:"selection",filePath:t.filePath,range:{from:_object_spread({},t.range.from),to:_object_spread({},t.range.to)},selectedText:t.selectedText}}function G3(e){return e.map(I0)}function Gir(e){return new Promise(function(t,r){var n=new FileReader;n.onerror=function(){r(n.error||new Error("Failed to read image blob."))},n.onload=function(){if(typeof n.result=="string"){t(n.result);return}r(new Error("Unexpected FileReader result while reading image."))},n.readAsDataURL(e)})}function ZP(e){var t=e.reduce(function(n,i){return i.type==="vault-path"&&n.push({type:i.kind,path:i.path}),i.type==="selection"&&n.push({type:"selection",filePath:i.filePath,range:{from:i.range.from,to:i.range.to},selectedText:i.selectedText}),n},[]);return"\n".concat(JSON.stringify(t,null,2),"\n")}var nct=require("obsidian");function bK(){for(var _len=arguments.length,e=new Array(_len),_key=0;_key<_len;_key++){e[_key]=arguments[_key]}return e.flatMap(function(t){return t.split(/\s+/).filter(Boolean)})}function Er(e){for(var _len=arguments.length,t=new Array(_len>1?_len-1:0),_key=1;_key<_len;_key++){t[_key-1]=arguments[_key]}var _e_classList;(_e_classList=e.classList).add.apply(_e_classList,_to_consumable_array(bK.apply(void 0,_to_consumable_array(t))))}function wi(e){for(var _len=arguments.length,t=new Array(_len>1?_len-1:0),_key=1;_key<_len;_key++){t[_key-1]=arguments[_key]}var _e_classList;(_e_classList=e.classList).remove.apply(_e_classList,_to_consumable_array(bK.apply(void 0,_to_consumable_array(t))))}function ym(e,t,r){var _iteratorNormalCompletion=true,_didIteratorError=false,_iteratorError=undefined;try{for(var _iterator=bK(t)[Symbol.iterator](),_step;!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=true){var n=_step.value;e.classList.toggle(n,r)}}catch(err){_didIteratorError=true;_iteratorError=err}finally{try{if(!_iteratorNormalCompletion&&_iterator.return!=null){_iterator.return()}}finally{if(_didIteratorError){throw _iteratorError}}}}var wK=function wK1(e,t){return wK=Object.setPrototypeOf||_instanceof({__proto__:[]},Array)&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},wK(e,t)};function Tc(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");wK(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}function H3(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function next(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function _m(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)a.push(i.value)}catch(s){o={error:s}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return a}function bm(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,a;n0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(r){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,r)},t.prototype._subscribe=function(r){return this._throwIfClosed(),this._checkFinalizedStatuses(r),this._innerSubscribe(r)},t.prototype._innerSubscribe=function(r){var n=this,i=this,a=i.hasError,o=i.isStopped,s=i.observers;return a||o?SK:(this.currentObservers=null,s.push(r),new C0(function(){n.currentObservers=null,mx(s,r)}))},t.prototype._checkFinalizedStatuses=function(r){var n=this,i=n.hasError,a=n.thrownError,o=n.isStopped;i?r.error(a):o&&r.complete()},t.prototype.asObservable=function(){var r=new Z3;return r.source=this,r},t.create=function(r,n){return new k9e(r,n)},t}(Z3);var k9e=function(e){Tc(t,e);function t(r,n){var i=e.call(this)||this;return i.destination=r,i.source=n,i}return t.prototype.next=function(r){var n,i;(i=(n=this.destination)===null||n===void 0?void 0:n.next)===null||i===void 0||i.call(n,r)},t.prototype.error=function(r){var n,i;(i=(n=this.destination)===null||n===void 0?void 0:n.error)===null||i===void 0||i.call(n,r)},t.prototype.complete=function(){var r,n;(n=(r=this.destination)===null||r===void 0?void 0:r.complete)===null||n===void 0||n.call(r)},t.prototype._subscribe=function(r){var n,i;return(i=(n=this.source)===null||n===void 0?void 0:n.subscribe(r))!==null&&i!==void 0?i:SK},t}(ti);var AK={now:function now(){return(AK.delegate||Date).now()},delegate:void 0};var E9e=function(e){Tc(t,e);function t(r,n){return e.call(this)||this}return t.prototype.schedule=function(r,n){return n===void 0&&(n=0),this},t}(C0);var K3={setInterval:function setInterval1(e,t){for(var r=[],n=2;n-1?e.replace(tar,"."):e},K9e=function(e){return!e||Ar(e)},Y3=function(e,t,r){var n=Ar(t)?t.split("."):t,i=0;for(;i":">",'"':""","'":"'","/":"/"},aar=function(e){return Ar(e)?e.replace(/[&<>"'\/]/g,function(t){return iar[t]}):e},RK=/*#__PURE__*/function(){function RK1(t){_class_call_check(this,RK1);this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}_create_class(RK1,[{key:"getRegExp",value:function getRegExp(t){var r=this.regExpMap.get(t);if(r!==void 0)return r;var n=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,n),this.regExpQueue.push(t),n}}]);return RK1}(),oar=[" ",",","?","!",";"],sar=new RK(20),lar=function(e,t,r){t=t||"",r=r||"";var n=oar.filter(function(o){return t.indexOf(o)<0&&r.indexOf(o)<0});if(n.length===0)return!0;var i=sar.getRegExp("(".concat(n.map(function(o){return o==="?"?"\\?":o}).join("|"),")")),a=!i.test(e);if(!a){var o=e.indexOf(r);o>0&&!i.test(e.substring(0,o))&&(a=!0)}return a},MK=function MK1(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;var n=t.split(r),i=e;for(var a=0;a-1&&l1&&arguments[1]!==void 0?arguments[1]:{};this.init(t,r)}_create_class(n_1,[{key:"init",value:function init(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=r.prefix||"i18next:",this.logger=t||uar,this.options=r,this.debug=r.debug}},{key:"log",value:function log(){for(var t=arguments.length,r=new Array(t),n=0;n1?r-1:0),i=1;i1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};_this=_call_super(this,hO1),_this.data=t||{},_this.options=r,_this.options.keySeparator===void 0&&(_this.options.keySeparator="."),_this.options.ignoreJSONStructure===void 0&&(_this.options.ignoreJSONStructure=!0);return _this}_create_class(hO1,[{key:"addNamespaces",value:function addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}},{key:"removeNamespaces",value:function removeNamespaces(t){var r=this.options.ns.indexOf(t);r>-1&&this.options.ns.splice(r,1)}},{key:"getResource",value:function getResource(t,r,n){var _s1,_s2;var c,d;var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},a=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,o=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure,s;t.indexOf(".")>-1?s=t.split("."):(s=[t,r],n&&(Array.isArray(n)?(_s1=s).push.apply(_s1,_to_consumable_array(n)):Ar(n)&&a?(_s2=s).push.apply(_s2,_to_consumable_array(n.split(a))):s.push(n)));var l=fO(this.data,s);return!l&&!r&&!n&&t.indexOf(".")>-1&&(t=s[0],r=s[1],n=s.slice(2).join(".")),l||!o||!Ar(n)?l:MK((d=(c=this.data)==null?void 0:c[t])==null?void 0:d[r],n,a)}},{key:"addResource",value:function addResource(t,r,n,i){var a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1},o=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator,s=[t,r];n&&(s=s.concat(o?n.split(o):n)),t.indexOf(".")>-1&&(s=t.split("."),i=r,r=s[1]),this.addNamespaces(r),Q9e(this.data,s,i),a.silent||this.emit("added",t,r,n,i)}},{key:"addResources",value:function addResources(t,r,n){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(var a in n)(Ar(n[a])||Array.isArray(n[a]))&&this.addResource(t,r,a,n[a],{silent:!0});i.silent||this.emit("added",t,r,n)}},{key:"addResourceBundle",value:function addResourceBundle(t,r,n,i,a){var o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},s=[t,r];t.indexOf(".")>-1&&(s=t.split("."),i=n,n=r,r=s[1]),this.addNamespaces(r);var l=fO(this.data,s)||{};o.skipCopy||(n=JSON.parse(JSON.stringify(n))),i?iPe(l,n,a):l=_object_spread({},l,n),Q9e(this.data,s,l),o.silent||this.emit("added",t,r,n)}},{key:"removeResourceBundle",value:function removeResourceBundle(t,r){this.hasResourceBundle(t,r)&&delete this.data[t][r],this.removeNamespaces(r),this.emit("removed",t,r)}},{key:"hasResourceBundle",value:function hasResourceBundle(t,r){return this.getResource(t,r)!==void 0}},{key:"getResourceBundle",value:function getResourceBundle(t,r){return r||(r=this.options.defaultNS),this.getResource(t,r)}},{key:"getDataByLanguage",value:function getDataByLanguage(t){return this.data[t]}},{key:"hasLanguageSomeTranslations",value:function hasLanguageSomeTranslations(t){var r=this.getDataByLanguage(t);return!!(r&&Object.keys(r)||[]).find(function(i){return r[i]&&Object.keys(r[i]).length>0})}},{key:"toJSON",value:function toJSON(){return this.data}}]);return hO1}(i_),aPe={processors:{},addPostProcessor:function addPostProcessor(e){this.processors[e.name]=e},handle:function handle(e,t,r,n,i){var _this=this;return e.forEach(function(a){var o,s;t=(s=(o=_this.processors[a])==null?void 0:o.process(t,r,n,i))!=null?s:t}),t}},J9e={},Y9e=function(e){return!Ar(e)&&typeof e!="boolean"&&typeof e!="number"},a_=/*#__PURE__*/function(i_1){_inherits(a_1,i_1);function a_1(t){_class_call_check(this,a_1);var _this;var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};_this=_call_super(this,a_1),ear(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,_this),_this.options=r,_this.options.keySeparator===void 0&&(_this.options.keySeparator="."),_this.logger=Kp.create("translator");return _this}_create_class(a_1,[{key:"changeLanguage",value:function changeLanguage(t){t&&(this.language=t)}},{key:"exists",value:function exists(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(t==null)return!1;var n=this.resolve(t,r);return(n==null?void 0:n.res)!==void 0}},{key:"extractFromKey",value:function extractFromKey(t,r){var n=r.nsSeparator!==void 0?r.nsSeparator:this.options.nsSeparator;n===void 0&&(n=":");var i=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator,a=r.ns||this.options.defaultNS||[],o=n&&t.indexOf(n)>-1,s=!this.options.userDefinedKeySeparator&&!r.keySeparator&&!this.options.userDefinedNsSeparator&&!r.nsSeparator&&!lar(t,n,i);if(o&&!s){var l=t.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:t,namespaces:Ar(a)?[a]:a};var c=t.split(n);(n!==i||n===i&&this.options.ns.indexOf(c[0])>-1)&&(a=c.shift()),t=c.join(i)}return{key:t,namespaces:Ar(a)?[a]:a}}},{key:"translate",value:function translate(t,r,n){var _this=this;if((typeof r==="undefined"?"undefined":_type_of(r))!="object"&&this.options.overloadTranslationOptionHandler&&(r=this.options.overloadTranslationOptionHandler(arguments)),(typeof r==="undefined"?"undefined":_type_of(r))=="object"&&(r=_object_spread({},r)),r||(r={}),t==null)return"";Array.isArray(t)||(t=[String(t)]);var i=r.returnDetails!==void 0?r.returnDetails:this.options.returnDetails,a=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator,_this_extractFromKey=this.extractFromKey(t[t.length-1],r),o=_this_extractFromKey.key,s=_this_extractFromKey.namespaces,l=s[s.length-1],c=r.lng||this.language,d=r.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((c==null?void 0:c.toLowerCase())==="cimode"){if(d){var A=r.nsSeparator||this.options.nsSeparator;return i?{res:"".concat(l).concat(A).concat(o),usedKey:o,exactUsedKey:o,usedLng:c,usedNS:l,usedParams:this.getUsedParamsDetails(r)}:"".concat(l).concat(A).concat(o)}return i?{res:o,usedKey:o,exactUsedKey:o,usedLng:c,usedNS:l,usedParams:this.getUsedParamsDetails(r)}:o}var u=this.resolve(t,r),p=u==null?void 0:u.res,m=(u==null?void 0:u.usedKey)||o,h=(u==null?void 0:u.exactUsedKey)||o,g=["[object Number]","[object Function]","[object RegExp]"],x=r.joinArrays!==void 0?r.joinArrays:this.options.joinArrays,y=!this.i18nFormat||this.i18nFormat.handleAsObject,v=r.count!==void 0&&!Ar(r.count),_=a_.hasDefaultValue(r),b=v?this.pluralResolver.getSuffix(c,r.count,r):"",k=r.ordinal&&v?this.pluralResolver.getSuffix(c,r.count,{ordinal:!1}):"",w=v&&!r.ordinal&&r.count===0,S=w&&r["defaultValue".concat(this.options.pluralSeparator,"zero")]||r["defaultValue".concat(b)]||r["defaultValue".concat(k)]||r.defaultValue,E=p;y&&!p&&_&&(E=S);var T=Y9e(E),I=Object.prototype.toString.apply(E);if(y&&E&&T&&g.indexOf(I)<0&&!(Ar(x)&&Array.isArray(E))){if(!r.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");var A1=this.options.returnedObjectHandler?this.options.returnedObjectHandler(m,E,_object_spread_props(_object_spread({},r),{ns:s})):"key '".concat(o," (").concat(this.language,")' returned an object instead of string.");return i?(u.res=A1,u.usedParams=this.getUsedParamsDetails(r),u):A1}if(a){var A2=Array.isArray(E),O=A2?[]:{},R=A2?h:m;for(var M in E)if(Object.prototype.hasOwnProperty.call(E,M)){var N="".concat(R).concat(a).concat(M);_&&!p?O[M]=this.translate(N,_object_spread_props(_object_spread({},r),{defaultValue:Y9e(S)?S[M]:void 0,joinArrays:!1,ns:s})):O[M]=this.translate(N,_object_spread_props(_object_spread({},r),{joinArrays:!1,ns:s})),O[M]===N&&(O[M]=E[M])}p=O}}else if(y&&Ar(x)&&Array.isArray(p))p=p.join(x),p&&(p=this.extendTranslation(p,t,r,n));else{var A3=!1,O2=!1;!this.isValidLookup(p)&&_&&(A3=!0,p=S),this.isValidLookup(p)||(O2=!0,p=o);var M1=(r.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&O2?void 0:p,N1=_&&S!==p&&this.options.updateMissing;if(O2||A3||N1){if(this.logger.log(N1?"updateKey":"missingKey",c,l,o,N1?S:p),a){var Q=this.resolve(o,_object_spread_props(_object_spread({},r),{keySeparator:!1}));Q&&Q.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var q=[],L=this.languageUtils.getFallbackCodes(this.options.fallbackLng,r.lng||this.language);if(this.options.saveMissingTo==="fallback"&&L&&L[0])for(var Q1=0;Q11&&arguments[1]!==void 0?arguments[1]:{},n,i,a,o,s;return Ar(t)&&(t=[t]),t.forEach(function(l){if(_this.isValidLookup(n))return;var c=_this.extractFromKey(l,r),d=c.key;i=d;var u=c.namespaces;_this.options.fallbackNS&&(u=u.concat(_this.options.fallbackNS));var p=r.count!==void 0&&!Ar(r.count),m=p&&!r.ordinal&&r.count===0,h=r.context!==void 0&&(Ar(r.context)||typeof r.context=="number")&&r.context!=="",g=r.lngs?r.lngs:_this.languageUtils.toResolveHierarchy(r.lng||_this.language,r.fallbackLng);u.forEach(function(x){var y,v;_this.isValidLookup(n)||(s=x,!J9e["".concat(g[0],"-").concat(x)]&&(y=_this.utils)!=null&&y.hasLoadedNamespace&&!((v=_this.utils)!=null&&v.hasLoadedNamespace(s))&&(J9e["".concat(g[0],"-").concat(x)]=!0,_this.logger.warn('key "'.concat(i,'" for languages "').concat(g.join(", "),'" won\'t get resolved as namespace "').concat(s,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),g.forEach(function(_){var w;if(_this.isValidLookup(n))return;o=_;var b=[d];if((w=_this.i18nFormat)!=null&&w.addLookupKeys)_this.i18nFormat.addLookupKeys(b,d,_,x,r);else{var S;p&&(S=_this.pluralResolver.getSuffix(_,r.count,r));var E="".concat(_this.options.pluralSeparator,"zero"),T="".concat(_this.options.pluralSeparator,"ordinal").concat(_this.options.pluralSeparator);if(p&&(b.push(d+S),r.ordinal&&S.indexOf(T)===0&&b.push(d+S.replace(T,_this.options.pluralSeparator)),m&&b.push(d+E)),h){var I="".concat(d).concat(_this.options.contextSeparator).concat(r.context);b.push(I),p&&(b.push(I+S),r.ordinal&&S.indexOf(T)===0&&b.push(I+S.replace(T,_this.options.pluralSeparator)),m&&b.push(I+E))}}var k;for(;k=b.pop();)_this.isValidLookup(n)||(a=k,n=_this.getResource(_,x,k,r))}))})}),{res:n,usedKey:i,exactUsedKey:a,usedLng:o,usedNS:s}}},{key:"isValidLookup",value:function isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}},{key:"getResource",value:function getResource(t,r,n){var a;var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return(a=this.i18nFormat)!=null&&a.getResource?this.i18nFormat.getResource(t,r,n,i):this.resourceStore.getResource(t,r,n,i)}},{key:"getUsedParamsDetails",value:function getUsedParamsDetails(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=t.replace&&!Ar(t.replace),i=n?t.replace:t;if(n&&typeof t.count!="undefined"&&(i.count=t.count),this.options.interpolation.defaultVariables&&(i=_object_spread({},this.options.interpolation.defaultVariables,i)),!n){i=_object_spread({},i);var _iteratorNormalCompletion=true,_didIteratorError=false,_iteratorError=undefined;try{for(var _iterator=r[Symbol.iterator](),_step;!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=true){var a=_step.value;delete i[a]}}catch(err){_didIteratorError=true;_iteratorError=err}finally{try{if(!_iteratorNormalCompletion&&_iterator.return!=null){_iterator.return()}}finally{if(_didIteratorError){throw _iteratorError}}}}return i}}],[{key:"hasDefaultValue",value:function hasDefaultValue(t){var r="defaultValue";for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&r===n.substring(0,r.length)&&t[n]!==void 0)return!0;return!1}}]);return a_1}(i_),gO=/*#__PURE__*/function(){function gO1(t){_class_call_check(this,gO1);this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Kp.create("languageUtils")}_create_class(gO1,[{key:"getScriptPartFromCode",value:function getScriptPartFromCode(t){if(t=mO(t),!t||t.indexOf("-")<0)return null;var r=t.split("-");return r.length===2||(r.pop(),r[r.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(r.join("-"))}},{key:"getLanguagePartFromCode",value:function getLanguagePartFromCode(t){if(t=mO(t),!t||t.indexOf("-")<0)return t;var r=t.split("-");return this.formatLanguageCode(r[0])}},{key:"formatLanguageCode",value:function formatLanguageCode(t){if(Ar(t)&&t.indexOf("-")>-1){var r;try{r=Intl.getCanonicalLocales(t)[0]}catch(n){}return r&&this.options.lowerCaseLng&&(r=r.toLowerCase()),r||(this.options.lowerCaseLng?t.toLowerCase():t)}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}},{key:"isSupportedCode",value:function isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}},{key:"getBestMatchFromCodes",value:function getBestMatchFromCodes(t){var _this=this;if(!t)return null;var r;return t.forEach(function(n){if(r)return;var i=_this.formatLanguageCode(n);(!_this.options.supportedLngs||_this.isSupportedCode(i))&&(r=i)}),!r&&this.options.supportedLngs&&t.forEach(function(n){if(r)return;var i=_this.getLanguagePartFromCode(n);if(_this.isSupportedCode(i))return r=i;r=_this.options.supportedLngs.find(function(a){if(a===i)return a;if(!(a.indexOf("-")<0&&i.indexOf("-")<0)&&(a.indexOf("-")>0&&i.indexOf("-")<0&&a.substring(0,a.indexOf("-"))===i||a.indexOf(i)===0&&i.length>1))return a})}),r||(r=this.getFallbackCodes(this.options.fallbackLng)[0]),r}},{key:"getFallbackCodes",value:function getFallbackCodes(t,r){if(!t)return[];if(typeof t=="function"&&(t=t(r)),Ar(t)&&(t=[t]),Array.isArray(t))return t;if(!r)return t.default||[];var n=t[r];return n||(n=t[this.getScriptPartFromCode(r)]),n||(n=t[this.formatLanguageCode(r)]),n||(n=t[this.getLanguagePartFromCode(r)]),n||(n=t.default),n||[]}},{key:"toResolveHierarchy",value:function toResolveHierarchy(t,r){var _this=this;var n=this.getFallbackCodes(r||this.options.fallbackLng||[],t),i=[],a=function(o){o&&(_this.isSupportedCode(o)?i.push(o):_this.logger.warn("rejecting language code not found in supportedLngs: ".concat(o)))};return Ar(t)&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&a(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&a(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&a(this.getLanguagePartFromCode(t))):Ar(t)&&a(this.formatLanguageCode(t)),n.forEach(function(o){i.indexOf(o)<0&&a(_this.formatLanguageCode(o))}),i}}]);return gO1}(),X9e={zero:0,one:1,two:2,few:3,many:4,other:5},ePe={select:function(e){return e===1?"one":"other"},resolvedOptions:function(){return{pluralCategories:["one","other"]}}},$K=/*#__PURE__*/function(){function $K1(t){_class_call_check(this,$K1);var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=t,this.options=r,this.logger=Kp.create("pluralResolver"),this.pluralRulesCache={}}_create_class($K1,[{key:"addRule",value:function addRule(t,r){this.rules[t]=r}},{key:"clearCache",value:function clearCache(){this.pluralRulesCache={}}},{key:"getRule",value:function getRule(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=mO(t==="dev"?"en":t),i=r.ordinal?"ordinal":"cardinal",a=JSON.stringify({cleanedCode:n,type:i});if(a in this.pluralRulesCache)return this.pluralRulesCache[a];var o;try{o=new Intl.PluralRules(n,{type:i})}catch(s){if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),ePe;if(!t.match(/-|_/))return ePe;var l=this.languageUtils.getLanguagePartFromCode(t);o=this.getRule(l,r)}return this.pluralRulesCache[a]=o,o}},{key:"needsPlural",value:function needsPlural(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=this.getRule(t,r);return n||(n=this.getRule("dev",r)),(n==null?void 0:n.resolvedOptions().pluralCategories.length)>1}},{key:"getPluralFormsOfKey",value:function getPluralFormsOfKey(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(t,n).map(function(i){return"".concat(r).concat(i)})}},{key:"getSuffixes",value:function getSuffixes(t){var _this=this;var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=this.getRule(t,r);return n||(n=this.getRule("dev",r)),n?n.resolvedOptions().pluralCategories.sort(function(i,a){return X9e[i]-X9e[a]}).map(function(i){return"".concat(_this.options.prepend).concat(r.ordinal?"ordinal".concat(_this.options.prepend):"").concat(i)}):[]}},{key:"getSuffix",value:function getSuffix(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=this.getRule(t,n);return i?"".concat(this.options.prepend).concat(n.ordinal?"ordinal".concat(this.options.prepend):"").concat(i.select(r)):(this.logger.warn("no plural rule found for: ".concat(t)),this.getSuffix("dev",r,n))}}]);return $K1}(),tPe=function tPe1(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,a=nar(e,t,r);return!a&&i&&Ar(r)&&(a=MK(e,r,n),a===void 0&&(a=MK(t,r,n))),a},OK=function(e){return e.replace(/\$/g,"$$$$")},NK=/*#__PURE__*/function(){function NK1(){_class_call_check(this,NK1);var r;var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Kp.create("interpolator"),this.options=t,this.format=((r=t==null?void 0:t.interpolation)==null?void 0:r.format)||function(n){return n},this.init(t)}_create_class(NK1,[{key:"init",value:function init(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});var _t_interpolation=t.interpolation,r=_t_interpolation.escape,n=_t_interpolation.escapeValue,i=_t_interpolation.useRawValueToEscape,a=_t_interpolation.prefix,o=_t_interpolation.prefixEscaped,s=_t_interpolation.suffix,l=_t_interpolation.suffixEscaped,c=_t_interpolation.formatSeparator,d=_t_interpolation.unescapeSuffix,u=_t_interpolation.unescapePrefix,p=_t_interpolation.nestingPrefix,m=_t_interpolation.nestingPrefixEscaped,h=_t_interpolation.nestingSuffix,g=_t_interpolation.nestingSuffixEscaped,x=_t_interpolation.nestingOptionsSeparator,y=_t_interpolation.maxReplaces,v=_t_interpolation.alwaysFormat;this.escape=r!==void 0?r:aar,this.escapeValue=n!==void 0?n:!0,this.useRawValueToEscape=i!==void 0?i:!1,this.prefix=a?t_(a):o||"{{",this.suffix=s?t_(s):l||"}}",this.formatSeparator=c||",",this.unescapePrefix=d?"":u||"-",this.unescapeSuffix=this.unescapePrefix?"":d||"",this.nestingPrefix=p?t_(p):m||t_("$t("),this.nestingSuffix=h?t_(h):g||t_(")"),this.nestingOptionsSeparator=x||",",this.maxReplaces=y||1e3,this.alwaysFormat=v!==void 0?v:!1,this.resetRegExp()}},{key:"reset",value:function reset(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function resetRegExp(){var t=function(r,n){return(r==null?void 0:r.source)===n?(r.lastIndex=0,r):new RegExp(n,"g")};this.regexp=t(this.regexp,"".concat(this.prefix,"(.+?)").concat(this.suffix)),this.regexpUnescape=t(this.regexpUnescape,"".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix)),this.nestingRegexp=t(this.nestingRegexp,"".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix))}},{key:"interpolate",value:function interpolate(t,r,n,i){var _this=this;var m;var a,o,s,l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=function(h){if(h.indexOf(_this.formatSeparator)<0){var v=tPe(r,l,h,_this.options.keySeparator,_this.options.ignoreJSONStructure);return _this.alwaysFormat?_this.format(v,void 0,n,_object_spread_props(_object_spread({},i,r),{interpolationkey:h})):v}var g=h.split(_this.formatSeparator),x=g.shift().trim(),y=g.join(_this.formatSeparator).trim();return _this.format(tPe(r,l,x,_this.options.keySeparator,_this.options.ignoreJSONStructure),y,n,_object_spread_props(_object_spread({},i,r),{interpolationkey:x}))};this.resetRegExp();var d=(i==null?void 0:i.missingInterpolationHandler)||this.options.missingInterpolationHandler,u=((m=i==null?void 0:i.interpolation)==null?void 0:m.skipOnVariables)!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:function(h){return OK(h)}},{regex:this.regexp,safeValue:function(h){return _this.escapeValue?OK(_this.escape(h)):OK(h)}}].forEach(function(h){for(s=0;a=h.regex.exec(t);){var g=a[1].trim();if(o=c(g),o===void 0)if(typeof d=="function"){var y=d(t,a,i);o=Ar(y)?y:""}else if(i&&Object.prototype.hasOwnProperty.call(i,g))o="";else if(u){o=a[0];continue}else _this.logger.warn("missed to pass in variable ".concat(g," for interpolating ").concat(t)),o="";else!Ar(o)&&!_this.useRawValueToEscape&&(o=H9e(o));var x=h.safeValue(o);if(t=t.replace(a[0],x),u?(h.regex.lastIndex+=o.length,h.regex.lastIndex-=a[0].length):h.regex.lastIndex=0,s++,s>=_this.maxReplaces)break}}),t}},{key:"nest",value:function nest(t,r){var _this=this;var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i,a,o,s=function(l,c){var g;var d=_this.nestingOptionsSeparator;if(l.indexOf(d)<0)return l;var u=l.split(new RegExp("".concat(d,"[ ]*{"))),p="{".concat(u[1]);l=u[0],p=_this.interpolate(p,o);var m=p.match(/'/g),h=p.match(/"/g);(((g=m==null?void 0:m.length)!=null?g:0)%2===0&&!h||h.length%2!==0)&&(p=p.replace(/'/g,'"'));try{o=JSON.parse(p),c&&(o=_object_spread({},c,o))}catch(x){return _this.logger.warn("failed parsing options string in nesting for key ".concat(l),x),"".concat(l).concat(d).concat(p)}return o.defaultValue&&o.defaultValue.indexOf(_this.prefix)>-1&&delete o.defaultValue,l};for(;i=this.nestingRegexp.exec(t);){var l=[];o=_object_spread({},n),o=o.replace&&!Ar(o.replace)?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;var c=!1;if(i[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(i[1])){var d=i[1].split(this.formatSeparator).map(function(u){return u.trim()});i[1]=d.shift(),l=d,c=!0}if(a=r(s.call(this,i[1].trim(),o),o),a&&i[0]===t&&!Ar(a))return a;Ar(a)||(a=H9e(a)),a||(this.logger.warn("missed to resolve ".concat(i[1]," for nesting ").concat(t)),a=""),c&&(a=l.reduce(function(d,u){return _this.format(d,u,n.lng,_object_spread_props(_object_spread({},n),{interpolationkey:i[1].trim()}))},a.trim())),t=t.replace(i[0],a),this.regexp.lastIndex=0}return t}}]);return NK1}(),car=function(e){var t=e.toLowerCase().trim(),r={};if(e.indexOf("(")>-1){var n=e.split("(");t=n[0].toLowerCase().trim();var i=n[1].substring(0,n[1].length-1);t==="currency"&&i.indexOf(":")<0?r.currency||(r.currency=i.trim()):t==="relativetime"&&i.indexOf(":")<0?r.range||(r.range=i.trim()):i.split(";").forEach(function(o){if(o){var _o_split=_to_array(o.split(":")),s=_o_split[0],l=_o_split.slice(1),c=l.join(":").trim().replace(/^'+|'+$/g,""),d=s.trim();r[d]||(r[d]=c),c==="false"&&(r[d]=!1),c==="true"&&(r[d]=!0),isNaN(c)||(r[d]=parseInt(c,10))}})}return{formatName:t,formatOptions:r}},r_=function(e){var t={};return function(r,n,i){var a=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(a=_object_spread_props(_object_spread({},a),_define_property({},i.interpolationkey,void 0)));var o=n+JSON.stringify(a),s=t[o];return s||(s=e(mO(n),i),t[o]=s),s(r)}},DK=/*#__PURE__*/function(){function DK1(){_class_call_check(this,DK1);var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Kp.create("formatter"),this.options=t,this.formats={number:r_(function(r,n){var i=new Intl.NumberFormat(r,_object_spread({},n));return function(a){return i.format(a)}}),currency:r_(function(r,n){var i=new Intl.NumberFormat(r,_object_spread_props(_object_spread({},n),{style:"currency"}));return function(a){return i.format(a)}}),datetime:r_(function(r,n){var i=new Intl.DateTimeFormat(r,_object_spread({},n));return function(a){return i.format(a)}}),relativetime:r_(function(r,n){var i=new Intl.RelativeTimeFormat(r,_object_spread({},n));return function(a){return i.format(a,n.range||"day")}}),list:r_(function(r,n){var i=new Intl.ListFormat(r,_object_spread({},n));return function(a){return i.format(a)}})},this.init(t)}_create_class(DK1,[{key:"init",value:function init(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};this.formatSeparator=r.interpolation.formatSeparator||","}},{key:"add",value:function add(t,r){this.formats[t.toLowerCase().trim()]=r}},{key:"addCached",value:function addCached(t,r){this.formats[t.toLowerCase().trim()]=r_(r)}},{key:"format",value:function format(t,r,n){var _this=this;var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},a=r.split(this.formatSeparator);if(a.length>1&&a[0].indexOf("(")>1&&a[0].indexOf(")")<0&&a.find(function(s){return s.indexOf(")")>-1})){var s=a.findIndex(function(l){return l.indexOf(")")>-1});a[0]=[a[0]].concat(_to_consumable_array(a.splice(1,s))).join(this.formatSeparator)}return a.reduce(function(s,l){var u;var _car=car(l),c=_car.formatName,d=_car.formatOptions;if(_this.formats[c]){var p=s;try{var _$m=((u=i==null?void 0:i.formatParams)==null?void 0:u[i.interpolationkey])||{},h=_$m.locale||_$m.lng||i.locale||i.lng||n;p=_this.formats[c](s,h,_object_spread({},d,i,_$m))}catch(m){_this.logger.warn(m)}return p}else _this.logger.warn("there was no format function for ".concat(c));return s},t)}}]);return DK1}(),dar=function(e,t){e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)},qK=/*#__PURE__*/function(i_1){_inherits(qK1,i_1);function qK1(t,r,n){_class_call_check(this,qK1);var _this;var a,o;var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};_this=_call_super(this,qK1),_this.backend=t,_this.store=r,_this.services=n,_this.languageUtils=n.languageUtils,_this.options=i,_this.logger=Kp.create("backendConnector"),_this.waitingReads=[],_this.maxParallelReads=i.maxParallelReads||10,_this.readingCalls=0,_this.maxRetries=i.maxRetries>=0?i.maxRetries:5,_this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,_this.state={},_this.queue=[],(o=(a=_this.backend)==null?void 0:a.init)==null||o.call(a,n,i.backend,i);return _this}_create_class(qK1,[{key:"queueLoad",value:function queueLoad(t,r,n,i){var _this=this;var a={},o={},s={},l={};return t.forEach(function(c){var d=!0;r.forEach(function(u){var p="".concat(c,"|").concat(u);!n.reload&&_this.store.hasResourceBundle(c,u)?_this.state[p]=2:_this.state[p]<0||(_this.state[p]===1?o[p]===void 0&&(o[p]=!0):(_this.state[p]=1,d=!1,o[p]===void 0&&(o[p]=!0),a[p]===void 0&&(a[p]=!0),l[u]===void 0&&(l[u]=!0)))}),d||(s[c]=!0)}),(Object.keys(a).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(a),pending:Object.keys(o),toLoadLanguages:Object.keys(s),toLoadNamespaces:Object.keys(l)}}},{key:"loaded",value:function loaded(t,r,n){var i=t.split("|"),a=i[0],o=i[1];r&&this.emit("failedLoading",a,o,r),!r&&n&&this.store.addResourceBundle(a,o,n,void 0,void 0,{skipCopy:!0}),this.state[t]=r?-1:2,r&&n&&(this.state[t]=0);var s={};this.queue.forEach(function(l){rar(l.loaded,[a],o),dar(l,t),r&&l.errors.push(r),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(function(c){s[c]||(s[c]={});var d=l.loaded[c];d.length&&d.forEach(function(u){s[c][u]===void 0&&(s[c][u]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",s),this.queue=this.queue.filter(function(l){return!l.done})}},{key:"read",value:function read(t,r,n){var _this=this;var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,o=arguments.length>5?arguments[5]:void 0;if(!t.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:r,fcName:n,tried:i,wait:a,callback:o});return}this.readingCalls++;var s=function(c,d){if(_this.readingCalls--,_this.waitingReads.length>0){var u=_this.waitingReads.shift();_this.read(u.lng,u.ns,u.fcName,u.tried,u.wait,u.callback)}if(c&&d&&i<_this.maxRetries){setTimeout(function(){_this.read.call(_this,t,r,n,i+1,a*2,o)},a);return}o(c,d)},l=this.backend[n].bind(this.backend);if(l.length===2){try{var _$c=l(t,r);_$c&&typeof _$c.then=="function"?_$c.then(function(d){return s(null,d)}).catch(s):s(null,_$c)}catch(c){s(c)}return}return l(t,r,s)}},{key:"prepareLoading",value:function prepareLoading(t,r){var _this=this;var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();Ar(t)&&(t=this.languageUtils.toResolveHierarchy(t)),Ar(r)&&(r=[r]);var a=this.queueLoad(t,r,n,i);if(!a.toLoad.length)return a.pending.length||i(),null;a.toLoad.forEach(function(o){_this.loadOne(o)})}},{key:"load",value:function load(t,r,n){this.prepareLoading(t,r,{},n)}},{key:"reload",value:function reload(t,r,n){this.prepareLoading(t,r,{reload:!0},n)}},{key:"loadOne",value:function loadOne(t){var _this=this;var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",n=t.split("|"),i=n[0],a=n[1];this.read(i,a,"read",void 0,void 0,function(o,s){o&&_this.logger.warn("".concat(r,"loading namespace ").concat(a," for language ").concat(i," failed"),o),!o&&s&&_this.logger.log("".concat(r,"loaded namespace ").concat(a," for language ").concat(i),s),_this.loaded(t,o,s)})}},{key:"saveMissing",value:function saveMissing(t,r,n,i,a){var l,c,d,u,p;var o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},s=arguments.length>6&&arguments[6]!==void 0?arguments[6]:function(){};if((c=(l=this.services)==null?void 0:l.utils)!=null&&c.hasLoadedNamespace&&!((u=(d=this.services)==null?void 0:d.utils)!=null&&u.hasLoadedNamespace(r))){this.logger.warn('did not save key "'.concat(n,'" as the namespace "').concat(r,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(n==null||n==="")){if((p=this.backend)!=null&&p.create){var m=_object_spread_props(_object_spread({},o),{isUpdate:a}),h=this.backend.create.bind(this.backend);if(h.length<6)try{var _$g;h.length===5?_$g=h(t,r,n,i,m):_$g=h(t,r,n,i),_$g&&typeof _$g.then=="function"?_$g.then(function(x){return s(null,x)}).catch(s):s(null,_$g)}catch(g){s(g)}else h(t,r,n,i,s,m)}!t||!t[0]||this.store.addResource(t[0],r,n,i)}}}]);return qK1}(i_),rPe=function(){return{debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){var t={};if(_type_of(e[1])=="object"&&(t=e[1]),Ar(e[1])&&(t.defaultValue=e[1]),Ar(e[2])&&(t.tDescription=e[2]),_type_of(e[2])=="object"||_type_of(e[3])=="object"){var r=e[3]||e[2];Object.keys(r).forEach(function(n){t[n]=r[n]})}return t},interpolation:{escapeValue:!0,format:function(e){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}},nPe=function(e){var t,r;return Ar(e.ns)&&(e.ns=[e.ns]),Ar(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),Ar(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),((r=(t=e.supportedLngs)==null?void 0:t.indexOf)==null?void 0:r.call(t,"cimode"))<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),typeof e.initImmediate=="boolean"&&(e.initAsync=e.initImmediate),e},pO=function(){},par=function(e){Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(function(r){typeof e[r]=="function"&&(e[r]=e[r].bind(e))})},xx=/*#__PURE__*/function(i_1){_inherits(xx1,i_1);function xx1(){_class_call_check(this,xx1);var _this;var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;if(_this=_call_super(this,xx1),_this.options=nPe(t),_this.services={},_this.logger=Kp,_this.modules={external:[]},par(_this),r&&!_this.isInitialized&&!t.isClone){if(!_this.options.initAsync)return _possible_constructor_return(_this,(_this.init(t,r),_this));setTimeout(function(){_this.init(t,r)},0)}return _this}_create_class(xx1,[{key:"init",value:function init(){var _this=this;var t=this;var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof r=="function"&&(n=r,r={}),r.defaultNS==null&&r.ns&&(Ar(r.ns)?r.defaultNS=r.ns:r.ns.indexOf("translation")<0&&(r.defaultNS=r.ns[0]));var i=rPe();this.options=_object_spread({},i,this.options,nPe(r)),this.options.interpolation=_object_spread({},i.interpolation,this.options.interpolation),r.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=r.keySeparator),r.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=r.nsSeparator);var a=function(d){return d?typeof d=="function"?new d:d:null};if(!this.options.isClone){this.modules.logger?Kp.init(a(this.modules.logger),this.options):Kp.init(null,this.options);var d;this.modules.formatter?d=this.modules.formatter:d=DK;var u=new gO(this.options);this.store=new hO(this.options.resources,this.options);var p=this.services;p.logger=Kp,p.resourceStore=this.store,p.languageUtils=u,p.pluralResolver=new $K(u,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),d&&(!this.options.interpolation.format||this.options.interpolation.format===i.interpolation.format)&&(p.formatter=a(d),p.formatter.init(p,this.options),this.options.interpolation.format=p.formatter.format.bind(p.formatter)),p.interpolator=new NK(this.options),p.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},p.backendConnector=new qK(a(this.modules.backend),p.resourceStore,p,this.options),p.backendConnector.on("*",function(m){var _t;for(var h=arguments.length,g=new Array(h>1?h-1:0),x=1;x1?h-1:0),x=1;x0&&d2[0]!=="dev"&&(this.options.lng=d2[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(function(d){_this[d]=function(){var _t_store;return(_t_store=t.store)[d].apply(_t_store,arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(function(d){_this[d]=function(){var _t_store;return(_t_store=t.store)[d].apply(_t_store,arguments),t}});var l=J3(),c=function(){var d=function(u,p){_this.isInitializing=!1,_this.isInitialized&&!_this.initializedStoreOnce&&_this.logger.warn("init: i18next is already initialized. You should call init just once!"),_this.isInitialized=!0,_this.options.isClone||_this.logger.log("initialized",_this.options),_this.emit("initialized",_this.options),l.resolve(p),n(u,p)};if(_this.languages&&!_this.isInitialized)return d(null,_this.t.bind(_this));_this.changeLanguage(_this.options.lng,d)};return this.options.resources||!this.options.initAsync?c():setTimeout(c,0),l}},{key:"loadResources",value:function loadResources(t){var _this=this;var a,o;var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:pO,i=Ar(t)?t:this.language;if(typeof t=="function"&&(n=t),!this.options.resources||this.options.partialBundledLanguages){if((i==null?void 0:i.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return n();var s=[],l=function(c){if(!c||c==="cimode")return;_this.services.languageUtils.toResolveHierarchy(c).forEach(function(u){u!=="cimode"&&s.indexOf(u)<0&&s.push(u)})};i?l(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(function(d){return l(d)}),(o=(a=this.options.preload)==null?void 0:a.forEach)==null||o.call(a,function(c){return l(c)}),this.services.backendConnector.load(s,this.options.ns,function(c){!c&&!_this.resolvedLanguage&&_this.language&&_this.setResolvedLanguage(_this.language),n(c)})}else n(null)}},{key:"reloadResources",value:function reloadResources(t,r,n){var i=J3();return typeof t=="function"&&(n=t,t=void 0),typeof r=="function"&&(n=r,r=void 0),t||(t=this.languages),r||(r=this.options.ns),n||(n=pO),this.services.backendConnector.reload(t,r,function(a){i.resolve(),n(a)}),i}},{key:"use",value:function use1(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&aPe.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}},{key:"setResolvedLanguage",value:function setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1))for(var r=0;r-1)&&this.store.hasLanguageSomeTranslations(n)){this.resolvedLanguage=n;break}}}},{key:"changeLanguage",value:function changeLanguage(t,r){var _this=this;var n=this;this.isLanguageChangingTo=t;var i=J3();this.emit("languageChanging",t);var a=function(l){_this.language=l,_this.languages=_this.services.languageUtils.toResolveHierarchy(l),_this.resolvedLanguage=void 0,_this.setResolvedLanguage(l)},o=function(l,c){c?(a(c),_this.translator.changeLanguage(c),_this.isLanguageChangingTo=void 0,_this.emit("languageChanged",c),_this.logger.log("languageChanged",c)):_this.isLanguageChangingTo=void 0,i.resolve(function(){var _n1;return(_n1=n).t.apply(_n1,arguments)}),r&&r(l,function(){var _n1;return(_n1=n).t.apply(_n1,arguments)})},s=function(l){var d,u;!t&&!l&&_this.services.languageDetector&&(l=[]);var c=Ar(l)?l:_this.services.languageUtils.getBestMatchFromCodes(l);c&&(_this.language||a(c),_this.translator.language||_this.translator.changeLanguage(c),(u=(d=_this.services.languageDetector)==null?void 0:d.cacheUserLanguage)==null||u.call(d,c)),_this.loadResources(c,function(p){o(p,c)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?s(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(s):this.services.languageDetector.detect(s):s(t),i}},{key:"getFixedT",value:function getFixedT(t,r,n){var i=this;var a=function a2(o,s){var l;if((typeof s==="undefined"?"undefined":_type_of(s))!="object"){for(var c=arguments.length,d=new Array(c>2?c-2:0),u=2;u1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var n=r.lng||this.resolvedLanguage||this.languages[0],i=this.options?this.options.fallbackLng:!1,a=this.languages[this.languages.length-1];if(n.toLowerCase()==="cimode")return!0;var o=function(s,l){var c=_this.services.backendConnector.state["".concat(s,"|").concat(l)];return c===-1||c===0||c===2};if(r.precheck){var s=r.precheck(this,o);if(s!==void 0)return s}return!!(this.hasResourceBundle(n,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||o(n,t)&&(!i||o(a,t)))}},{key:"loadNamespaces",value:function loadNamespaces(t,r){var _this=this;var n=J3();return this.options.ns?(Ar(t)&&(t=[t]),t.forEach(function(i){_this.options.ns.indexOf(i)<0&&_this.options.ns.push(i)}),this.loadResources(function(i){n.resolve(),r&&r(i)}),n):(r&&r(),Promise.resolve())}},{key:"loadLanguages",value:function loadLanguages(t,r){var _this=this;var n=J3();Ar(t)&&(t=[t]);var i=this.options.preload||[],a=t.filter(function(o){return i.indexOf(o)<0&&_this.services.languageUtils.isSupportedCode(o)});return a.length?(this.options.preload=i.concat(a),this.loadResources(function(o){n.resolve(),r&&r(o)}),n):(r&&r(),Promise.resolve())}},{key:"dir",value:function dir1(t){var i,a;if(t||(t=this.resolvedLanguage||(((i=this.languages)==null?void 0:i.length)>0?this.languages[0]:this.language)),!t)return"rtl";var r=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],n=((a=this.services)==null?void 0:a.languageUtils)||new gO(rPe());return r.indexOf(n.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}},{key:"cloneInstance",value:function cloneInstance(){var _this=this;var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:pO,n=t.forkResourceStore;n&&delete t.forkResourceStore;var i=_object_spread_props(_object_spread({},this.options,t),{isClone:!0}),a=new xx(i);if((t.debug!==void 0||t.prefix!==void 0)&&(a.logger=a.logger.clone(t)),["store","services","language"].forEach(function(s){a[s]=_this[s]}),a.services=_object_spread({},this.services),a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},n){var s=Object.keys(this.store.data).reduce(function(l,c){return l[c]=_object_spread({},_this.store.data[c]),Object.keys(l[c]).reduce(function(d,u){return d[u]=_object_spread({},l[c][u]),d},{})},{});a.store=new hO(s,i),a.services.resourceStore=a.store}return a.translator=new a_(a.services,i),a.translator.on("*",function(s){var _a1;for(var l=arguments.length,c=new Array(l>1?l-1:0),d=1;d0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;return new xx(t,r)}}]);return xx1}(i_),Wo=xx.createInstance();Wo.createInstance=xx.createInstance;var Kwn=Wo.createInstance,Qwn=Wo.dir,Jwn=Wo.init,Ywn=Wo.loadResources,Xwn=Wo.reloadResources,e4n=Wo.use,t4n=Wo.changeLanguage,r4n=Wo.getFixedT,n4n=Wo.t,i4n=Wo.exists,a4n=Wo.setDefaultNamespace,o4n=Wo.hasLoadedNamespace,s4n=Wo.loadNamespaces,l4n=Wo.loadLanguages;var xO={errors:{filenameUnsupportedChars:"File {{path}} contains unsupported characters: {{chars}}"},settings:{language:{name:"Language",desc:"Select interface language",auto:"Auto detect"},account:{name:"Account",desc:"Enter your WebDAV account",placeholder:"Enter your account"},credential:{name:"Credential",desc:"Enter the app password you created in Nutstore (Account info → Security options), not your login password.",placeholder:"Your Nutstore app password"},checkConnection:{name:"Check connection",desc:"Click to check WebDAV connection",success:"WebDAV connection successful",failure:"WebDAV connection failed",successButton:"Connected ✓",failureButton:"Failed \xd7"},remoteDir:{name:"Remote directory",desc:"Which Nutstore folder this vault syncs with. Use the folder button to pick one visually.",placeholder:"e.g. /MyNotes"},login:{name:"Login",success:"Login successful",failure:"Login failed, please try again"},loginMode:{name:"Login mode",manual:"Manual input",sso:"Single sign-on"},enterpriseBaseUrl:{name:"Nutstore Enterprise",desc:"Optional Base URL for Nutstore Enterprise. Leave empty to use the default endpoint. Example: https://dav.jianguoyun.com",action:"Set",modalTitle:"Set Nutstore Enterprise Base URL",placeholder:"For example https://dav.jianguoyun.com",invalid:"Invalid Base URL",invalidWithReason:"Invalid Base URL: {{reason}}",errors:{invalidFormat:"enter a complete server address, for example: https://dav.jianguoyun.com",unsupportedProtocol:"the address must start with http:// or https://"}},ssoStatus:{loggedIn:"Logged in",notLoggedIn:"Not logged in",logout:"Logout",logoutSuccess:"Logged out successfully"},backupWarning:{name:"Backup warning",desc:"⚠️ Note: Sync process will modify or delete local files. Please backup important files before syncing."},conflictStrategy:{name:"Conflict resolution strategy",desc:"Choose how to resolve file conflicts. \nNote: We recommend backing up important files before using auto-merge to prevent data loss.",noConflictMerge:"Conflict-free merge",diff3:"Auto-merge (keeps both sides' edits, marked inline)",localPriority:"Local priority (overwrite server)",serverPriority:"Server priority (overwrite local)"},confirmBeforeSync:{name:"Confirm before sync",desc:"Show pending tasks and execute after confirmation"},confirmBeforeDeleteInAutoSync:{name:"Confirm before deleting files during auto-sync",desc:"Show a confirmation dialog when local files are about to be deleted during auto-sync, allowing you to choose to delete or re-upload them"},realtimeSync:{name:"Real-time sync",desc:"Automatically sync changes as soon as files are modified"},syncMode:{name:"Sync mode",desc:"Loose mode is faster when you have many files: it skips files with the same name and size that were never synced. Strict mode compares everything.",strict:"Strict",loose:"Loose"},syncPolicy:{name:"Sync policy",desc:'Controls how changes are shared between this device and the cloud. Policies with "Override" or "Revert" delete files on the other side — use with care.',twoWay:"Two Way",sendOnly:"Send Only",sendOnlyOverrideChanges:"Send Only: Override Changes",receiveOnly:"Receive Only",receiveOnlyRevertLocalChanges:"Receive Only: Revert Local Changes",modal:{title:"Confirm sync policy",twoWayDesc:"Local and cloud sync in both directions — additions and deletions on either side are applied to the other.\nIf the same file is edited on both sides, conflicts are resolved by your configured strategy.",sendOnlyDesc:"Send all local changes (additions, modifications, deletions) to the cloud.\n\n• Local new/modified files → uploaded to the cloud\n• Files deleted locally with no cloud changes → removed from the cloud\n• Cloud-only new or modified files → preserved\n• Deleted locally while the cloud also has changes → skipped (to protect cloud edits)\n\nBest for: local as source of truth, cloud as secondary.",sendOnlyOverrideChangesDesc:"Overwrite the cloud with the full current state of your local vault.\nFiles on the cloud that do not exist locally will be deleted.\nUse when you want the cloud to match this device exactly.",receiveOnlyDesc:"Receive all cloud changes (additions, modifications, deletions) into your local vault.\n\n• Cloud new/modified files → downloaded to local\n• Files deleted on the cloud with no local changes → removed from local\n• Local-only new or modified files → preserved\n• Deleted on the cloud while local also has changes → skipped (to protect local edits)\n\nBest for: read-only devices, or cloud as source of truth.",receiveOnlyRevertLocalChangesDesc:"Revert your local vault to the full current state of the cloud.\nFiles that exist locally but not on the cloud will be deleted.\nBest for read-only devices or when the cloud must be the source of truth.",confirm:"Confirm",cancel:"Cancel"}},startupSyncDelay:{name:"Auto-sync on startup (seconds)",desc:"Set the number of seconds after startup to automatically perform a sync. Set to 0 to disable auto-sync on startup.",placeholder:"Enter seconds (e.g., 5, 0 to disable)",invalidValue:"Invalid value, reset to 0",exceedsMax:"Value exceeds maximum limit of {{max}} seconds (1 day), automatically adjusted"},autoSyncInterval:{name:"Auto-sync interval (minutes)",desc:"Set the interval for automatic background synchronization (in minutes). Set to 0 to disable automatic sync.",placeholder:"Enter minutes (e.g., 5, 0 to disable)",invalidValue:"Invalid value, reset to 0",exceedsMax:"Value exceeds maximum limit of {{max}} minutes (1 day), automatically adjusted"},sections:{account:"Account",common:"General",filters:"Filter rules",ai:"AI"},tabs:{sync:"Sync",ai:"AI",troubleshooting:"Troubleshoot"},ai:{saved:"AI settings saved",none:"Not set",unnamedProvider:"Unnamed provider",unnamedModel:"Unnamed model",defaultModel:{name:"Default model",desc:"Optional model selected for new chat sessions"},nutstoreLlmGateway:{name:"Nutstore AI (Experimental)",providerName:"Nutstore",desc:"Authorize to use models provided by Nutstore.",pendingDesc:"Finish authorization in your browser. Current code: {{code}}",connectedDesc:"Authorized with {{count}} model(s) available.",authorize:"Authorize",authorizing:"Authorizing...",openAuthorizationPage:"Open authorization page",cancelAuthorization:"Cancel authorization",authorized:"Nutstore AI authorized",disconnect:"Disconnect",disconnected:"Nutstore AI disconnected",refreshModels:"Refresh",betaModal:{title:"Feature in Beta",message:"Nutstore AI is currently in beta and not yet available to all users. If you are not on the beta list, you may not be able to use the feature after authorizing. We are gradually opening access — please check back later.",cancel:"Cancel",confirm:"I understand, continue"},errors:{authorizationRequired:"Authorize Nutstore AI first",authorizationExpired:"Nutstore AI authorization expired. Start again.",authorizationFailed:"Nutstore AI authorization failed: {{code}} {{message}}",missingClientId:"Missing LLM_GATEWAY_CLIENT_ID. Nutstore AI authorization cannot start.",modelsFailed:"Failed to fetch Nutstore AI models: {{status}}",emptyModels:"Nutstore AI did not return any available models",refreshFailed:"Failed to refresh Nutstore AI models"}},providers:{name:"Providers",desc:"Manage available AI providers",summary:"{{count}} provider(s) configured",emptyHint:"No providers configured yet. Click “Manage providers” to add one.",manage:"Manage providers",add:"Add provider",refreshPresetName:"Get latest model list",refreshPresetDesc:"Get the latest model list.",refreshPresetModels:"Get model list",refreshPresetModelsLoading:"Fetching...",refreshPresetModelsSuccess:"Fetched ✓ providers {{providers}} models {{models}}",refreshPresetModelsFailure:"Failed \xd7",presetModelsRefreshFailed:"Update failed. Continuing with local/built-in model list.",presetModelsRefreshFailedWithReason:"Update failed. Continuing with local/built-in model list: {{reason}}",empty:"No provider configured yet.",defaultEndpoint:"Default endpoint",presetCustom:"Custom",updateModels:"Update models",updateModelsHint:"{{count}} preset model(s) can be added to this provider.",updateModelsSuccess:"{{count}} model(s) added"},provider:{name:"Provider name",desc:"Label shown in the chatbox",baseUrl:{name:"Base URL",desc:"Optional override, for example https://api.openai.com/v1"},apiKey:{name:"API key",desc:"Secret used for requests"},allowBrowserCors:{name:"Allow browser CORS requests",desc:"Prefer native browser fetch for providers that support CORS, enabling streaming output"},apiFormat:{name:"API format",desc:"Protocol used to talk to this provider",openaiChatCompletions:"OpenAI Chat Completions",openaiResponses:"OpenAI Responses",anthropic:"Anthropic Messages",other:"Other ({{npm}})"}},models:{name:"Models",desc:"Models available under this provider",add:"Add model",empty:"No model configured yet."},model:{id:"Model ID",idDesc:"Model identifier sent to the API (e.g. gpt-4o)",inputModalities:"Input modalities"},modals:{confirmDeleteLabel:"Confirm",providers:{title:"Providers",updateModelsTitle:"Sync preset models",updateModelsDesc:"{{count}} model(s) will be added to {{provider}}. Please confirm the new models below:",updateModelsConfirm:"Add models"},provider:{createTitle:"Create provider",editTitle:"Edit provider",edit:"Edit",saved:"Provider saved",deleted:"Provider deleted",corsConfirmTitle:"Enable browser CORS requests",corsConfirmMessage:"Not every provider allows direct browser cross-origin access. When enabled, the plugin will prefer native browser fetch to support streaming output. If this provider stops working afterward, return here and turn this option off.",corsConfirmEnable:"Enable"},model:{createTitle:"Create model",editTitle:"Edit model",edit:"Edit",deleted:"Model deleted"}},mcp:{name:"MCP servers",summary:"{{count}} server(s) configured",manage:"Manage MCP servers",manager:{title:"MCP servers",add:"Add server",empty:"No MCP server configured yet.",configFileHint:"Stored in {{path}}. You can also ask the AI in chat to edit this file.",parseError:"Failed to parse {{path}}: {{reason}}",statusDisabled:"disabled",statusConnected:"{{count}} tool(s)",statusError:"connection failed: {{reason}}",test:"Test",testSuccess:"Connected: {{count}} tool(s) available",testFailed:"Connection failed: {{reason}}"},editor:{createTitle:"Add MCP server",editTitle:"Edit MCP server",serverName:"Server name",serverNameDesc:"Letters, numbers, hyphens and underscores only",url:"URL",urlDesc:"Streamable HTTP endpoint of the MCP server",headers:"Headers",headersDesc:"Custom HTTP headers, e.g. Authorization",headerKeyPlaceholder:"Header name",headerValuePlaceholder:"Header value",addHeader:"Add header",removeHeader:"Remove header",enabled:"Enabled"},errors:{emptyName:"Server name cannot be empty",invalidName:"Server name may only contain letters, numbers, hyphens and underscores",duplicateName:"A server with this name already exists",emptyUrl:"URL cannot be empty",invalidUrl:"Invalid URL"}},yolo:{name:"Full access",desc:"⚠️ When on, the AI can edit files and change plugin settings without asking for confirmation each time."},errors:{saveFailed:"Failed to save AI settings",saveFailedWithReason:"Failed to save AI settings: {{reason}}",invalidProvidersConfig:"AI provider configuration is invalid. Please fix it in settings. Details: {{reason}}",emptyModelId:"Model ID cannot be empty",duplicateModelId:"A model with this ID already exists",emptyProviderId:"Provider name cannot be empty",duplicateProviderId:"A provider with this name already exists",reservedProviderId:"This provider name is reserved by Nutstore AI. Use another name.",providerNotFoundForProtocolOpen:"Provider not found. It may have been deleted or renamed: {{providerId}}",networkDisconnected:"Network connection unavailable. Check your connection and try again.",browserCorsFallbackToBuiltinTransport:"Browser CORS request failed. Temporarily fell back to the built-in request transport.",browserCorsFailedWithDisableLink:"Browser CORS request failed. [Open this provider and disable CORS]({{link}})."}},logout:{confirmTitle:"Confirm logout",confirmMessage:"Are you sure you want to log out? You will need to log in again to continue syncing.",confirm:"Confirm logout",cancel:"Cancel"},help:{name:"How to get WebDAV account and credential?"},filters:{name:"Filter rules",desc:'Choose which files and folders are skipped or forced into sync. Use simple paths or wildcards, e.g. "图片" or "*.tmp". The last matching rule wins; the Aa switch controls case sensitivity.',add:"Add rule",remove:"Remove",confirmRemove:"Confirm remove",edit:"Edit rules",toggle:"Enable or disable this rule",save:"Save",cancel:"Cancel",placeholder:"e.g.: .DS_Store, *.pdf",types:{exclude:"Exclude",include:"Include"}},configDirSync:{name:"Config directory sync",desc:"Control whether {{configDir}} is included in sync.",none:"Do not sync",bookmarks:"Sync bookmarks only",all:"Sync all",bookmarksTitle:"Enable bookmark sync",bookmarksDesc:"Only {{configDir}}/bookmarks.json will be synced. Other config files are not affected.",warnTitle:"Enable full config directory sync?",warnSyncs:"What syncs: plugin settings (data.json), plugin binaries (main.js), themes, snippets, and all other config files.",warnExcludes:"Auto-excluded: {{configDir}}/plugins/**/node_modules, {{configDir}}/plugins/**/.git, and {{configDir}}/plugins/**/.pnpm-store.",warnConflict:"Conflict resolution: when both sides have changes, the more recently modified version wins and the other side is overwritten.",warnRisk:"Risks: running Obsidian on multiple devices simultaneously increases conflict risk; config changes may require restarting Obsidian to take effect.",warnPruned:"Rule `{{rule}}` excludes {{configDir}} itself, so the config folder won't sync. To sync the config folder, disable this rule in the filter rules first.",syncNotice:"Config folder won't sync: rule `{{rule}}` excludes {{configDir}}. Disable this rule first to sync it.",confirm:"Enable",cancel:"Cancel"},skipLargeFiles:{name:"Skip large files",desc:"Files larger than this are not synced, e.g. 100MB or 1GB. Lower it if sync is slow or error-prone.",placeholder:"e.g., 10 MiB or 500 KiB",invalidFormat:'Invalid file size format. Please use formats like "10MB" or "500KB"',exceedsMaxSize:"File size exceeds maximum limit of 500MB"},mobileAppDownloadFileChunkSize:{name:"Mobile download chunk size (advanced)",desc:"Only change this when mobile downloads fail. Controls how large each download chunk is.",placeholder:"e.g., 16 MiB",invalidFormat:'Invalid chunk size format. Please use formats like "16 MiB" or "512 KiB"',belowMinSize:"Chunk size cannot be below 64 KiB and was adjusted",exceedsMaxSize:"Chunk size cannot exceed 64 MiB and was adjusted"},log:{title:"Debug logs",name:"Console logs",desc:"View console output and debug information",saveToNote:"Save to note",savedToNote:"Logs saved to note: {{fileName}}",saveError:"Failed to save logs",clear:"Clear",cleared:"Console logs cleared",clearName:"Clear logs",clearDesc:"Delete all console output records"},troubleshooting:{title:"Troubleshoot"},cache:{title:"Cache management",clearName:"Clear local cache",clearDesc:"Delete local cache data stored on this device only. This action cannot be undone and will require rebuilding the cache before the next sync. Your Nutstore data remains intact.",clear:"Clear",confirm:"Confirm clear",cleared:"Cache cleared successfully",clearModal:{title:"Clear cache",description:"Select which cache types to clear. This action cannot be undone.",cancel:"Cancel",confirm:"Confirm clear",syncRecordCache:{name:"Sync record cache",desc:"Tracks synchronization status for each file."},blobCache:{name:"File snapshot cache",desc:"Stores file snapshots needed for comparing changes during sync."},traverseWebDAVCache:{name:"File scan cache",desc:"Stores remote folder structure to enable faster sync by fetching only changes. If you encounter file list anomalies or data inconsistencies after a plugin update, try clearing this cache. After clearing, the next sync will need to re-scan all remote files, which may take a while."},nothingSelected:"Please select at least one cache type to clear."},gcBlockedBySync:"Sync is currently running. Wait for sync to finish before running garbage collection.",gcBlockedByGc:"Garbage collection is already running. Please try again later.",generateBlobGarbageName:"GC stress test: generate garbage snapshots",generateBlobGarbageDesc:"Write {{count}} random file snapshots to blob cache (about {{sizeKiB}} KiB each) for GC testing.",generateBlobGarbage:"Generate garbage snapshots",generateBlobGarbageRunning:"Generating garbage snapshots...",generateBlobGarbageDone:"Generated {{count}} garbage snapshot(s)."}},aiPermission:{title:"AI Permission Request",sessionLabel:'Session "{{title}}" is requesting permission',message:"AI is requesting to perform the following file operations:",sessionScopeHint:'"Auto-approve this operation" only applies to this chat session and resets after restarting Obsidian.',allowOnce:"Approve",alwaysAllow:"Auto-approve this operation",deny:"Deny",denied:"Permission denied: {{summary}}",readonly:"This agent is read-only and cannot modify files. Attempted: {{summary}}",source:"Source",destination:"Destination",operations:{read:"read",write:"write",edit:"edit",delete:"delete",mkdir:"create directory",copy:"copy",move:"move",updateSettings:"update plugin settings"},settings:{emptySummary:"No readable settings change detected.",on:"on",off:"off",fields:{filterRules:{name:"Filter rules",empty:"(empty)",disabled:"(disabled)"},skipLargeFiles:{name:"Max file size to skip"},startupSyncDelay:{name:"Auto sync after startup"},autoSyncInterval:{name:"Scheduled auto sync interval"},realtimeSync:{name:"Realtime sync"},confirmBeforeSync:{name:"Confirm before manual sync"},confirmBeforeDeleteInAutoSync:{name:"Confirm before auto delete"},syncMode:{name:"Sync mode"},conflictStrategy:{name:"Conflict strategy"},configDirSyncMode:{name:"Config directory sync"},language:{name:"Language",auto:"auto"}}}},sync:{error:{localPathNotFound:"Local path not found: {{path}}",mergeNotSupported:"This file type is currently not supported for merging",failedToAutoMerge:"Failed to auto merge",failedToUploadMerged:"Failed to upload merged content",requestsTooFrequent:"Requests too frequent, please wait a few minutes and try again",accountNotConfigured:"Nutstore account not configured. Please configure your account in settings first.",ssoTokenInvalid:"Login has expired. Please log in again in settings."},requestsTooFrequent:"Requests too frequent, plugin will resume sync at {{time}}",preparing:"\uD83D\uDCCB Preparing sync",preparation:{checkingRemote:"Checking the remote directory…",loadingState:"Reading sync state…",scanningRemote:"Scanning remote directories…",checkingChanges:"Checking remote changes…",retryingRemote:"The server is busy. Retrying in 30 seconds…",analyzing:"Analyzing file differences…",savingCache:"Saving the remote traversal cache…",traversalStats:"Scanned {{processed}} directories, {{queued}} queued, {{items}} items found",incrementalStats:"Processed {{changes}} remote changes"},start:"⌛️ Starting sync",complete:"✅ Sync completed",result:{title:"Sync successful",success:"All synchronization tasks have been completed",noChanges:"There are currently no files to synchronize"},completeWithFailed:"❌ Sync completed with {{failedCount}} failed tasks",failedWithError:"Sync failed with error: {{error}}",progress:"Sync progress: {{percent}}%",blockedBySync:"Sync is already running. Please try again later.",stoppingGcForSync:"Garbage collection is running. Stopping cleanup and starting sync.",startButton:"Start sync",stopButton:"Stop sync",hideButton:"Hide",closeButton:"Close",showProgressButton:"Show sync progress",notSyncing:"No sync currently in progress",percentComplete:"{{percent}}%",currentFile:"{{path}}",filePath:"{{path}}",progressTitle:"Sync progress",progressStats:"Completed: {{completed}} / {{total}} tasks",completedFilesTitle:"Completed tasks",syncingFiles:"Syncing files...",updatingCache:"Updating local cache...",cacheUpdated:"Local cache updated.",failedStatus:"Sync failed",cancelled:"Sync cancelled",suggestUseClientForManyTasks:"Tip: When there are many sync tasks, we recommend using the Nutstore client for better performance and stability. The plugin is more suitable for mobile use!",fileOp:{createLocalDir:"Create local directory",createRemoteDir:"Create remote directory",createRemoteDirs:"Create multi-level directories",download:"Download",filenameError:"Invalid path characters",merge:"Merge",removeLocal:"Remove local",removeRemote:"Remove remote",removeRemoteRecursively:"Remove remote recursively",sync:"Sync",upload:"Upload",noop:"Skip",cleanRecord:"Clean record",skip:"Skip"},skipReason:{"file-too-large":"File too large","folder-contains-ignored-items":"Folder contains ignored items","conflict-in-send-only-mode":"Both local and cloud changed; send-only mode preserved the cloud version","conflict-in-receive-only-mode":"Both local and cloud changed; receive-only mode preserved the local version","deleted-locally-but-changed-remotely":"Deleted locally, but the cloud has changes; skipped to protect cloud edits","deleted-remotely-but-changed-locally":"Deleted on the cloud, but local has changes; skipped to protect local edits"},confirmModal:{title:"Sync confirmation",policyTitle:"Sync policy for this sync",message:"⚠️ Please note:\n\n1. Sync operation may modify or delete local files\n2. We recommend backing up important files before syncing\n3. In case of file conflicts, manual resolution may be required\n4. Initial sync will process all files and may take longer, please be patient\n\nAre you sure you want to start syncing?",confirm:"Confirm sync",cancel:"Cancel",remoteDir:"Remote directory: {{dir}}",strategy:"Conflict strategy: {{strategy}}"}},taskList:{title:"Sync task list",instruction:'Please review the tasks below. Click "Continue" to execute the selected tasks, or "Cancel" to skip this sync.',continue:"Continue ({{count}})",cancel:"Cancel"},deleteConfirm:{title:"Confirm local file deletion",instruction:"⚠️ The following local files will be deleted during auto-sync (because they were deleted remotely).\n\nCheck files to delete; unchecked files will be re-uploaded:",warningNotice:"Local files will be deleted, please confirm",select:"Select",filePath:"File path",deleteAndReupload:"Delete selected, re-upload unchecked",skipForNow:"Skip for now"},failedTasks:{title:"Failed sync tasks",instruction:"The following tasks failed during sync:",taskName:"Task",localPath:"Local path",errorMessage:"Error",close:"Close"},textAreaModal:{copy:"Copy",close:"Close",copied:"Text copied to clipboard"},time:{justNow:"just now",minutesAgo:"{{count}}min ago",hoursAgo:"{{count}}h ago",daysAgo:"{{count}}d ago",longAgo:"long ago"},chatbox:{title:"Chatbox",openCommand:"Open chatbox",addToContext:"Add to AI context",newChat:"New chat",sessionDeleted:"Session deleted",exportSaved:"Session exported: {{fileName}}",exportFailed:"Failed to export session",conflictResolution:{action:"Resolve {{count}} conflict(s) with AI",prompt:"Resolve every merge conflict in the context file. Analyze both sides of each <<<<<<<, =======, and >>>>>>> block. Preserve useful, non-conflicting information from both sides, merge duplicate passages by meaning, and retain the existing Markdown structure, frontmatter, internal links, and writing style. Do not invent information that is not present in the file. If the two sides contradict each other, cannot both be true, and the file does not provide enough evidence to choose one, ask me a specific question in the chat and wait for my answer; do not modify the file or invent a compromise before I respond. Continue resolving the conflicts after receiving my answer. Remove every conflict marker when finished and verify that the result is coherent and complete. Modify only this file.",alreadyResolved:"The conflicts in this file are already resolved",modelUnavailable:"Configure a default AI provider and model first",failed:"Could not create an AI conflict-resolution session"},exportDialog:{title:"Export session",description:"Export to a Markdown file in your vault.",includeToolMessages:"Include tool call messages",cancel:"Cancel",confirm:"Export"},exportRole:{user:"User",tool:"Tool",systemNotification:"System notification"},exportFrontmatter:{title:"title",sessionId:"session_id",exportedAt:"exported_at",createdAt:"created_at",updatedAt:"updated_at",model:"model",includeToolMessages:"include_tool_messages",pluginVersion:"plugin_version"},exportMeta:{messageTime:"Time",emptyContent:"(no text content)",toolCalls:"Tool calls",toolName:"Tool name",toolCallId:"Tool call ID"},repeatedToolCallsStopped:"The agent repeated the same tool call with the same arguments {{count}} times in a row and was stopped.",task:{cancelledSummary:"Task {{task}} was cancelled.",emptyResult:"Task completed but returned no summary."},ui:{history:{title:"History",sessionActions:"Session actions",sessionRunning:"Running"},actions:{exportAsMarkdown:"Export as Markdown",deleteSession:"Delete",cancel:"Cancel",close:"Close",selectFile:"Select File",send:"Send",stopRun:"Stop",compressContext:"Compress Context",copy:"Copy",runHtmlCode:"Run",showHtmlCode:"Code",deleteMessage:"Delete message",regenerateMessage:"Regenerate",recallMessage:"Recall",removeContextItem:"Remove"},tooltips:{contextUsage:"Context: {{used}}% used (window {{total}} tokens \xb7 total {{usedTokens}})"},labels:{provider:"Provider",model:"Model",tool:"Tool",toolCall:"Tool call",params:"Params",result:"Result",queuedSubmissions:"Queued Submissions",contextArea:"Context",reasoning:"Reasoning",todoList:"Todo List",systemNotification:"System Notification"},fileChanges:{create:"Added",update:"Modified",delete:"Deleted",binary:"Binary file; text diff is unavailable"},states:{empty:"Start by sending a message",dragFilePrompt:"Drop to add file",thinking:"Thinking",compressing:"Compressing",processingTools:"Processing Tools",noProvider:"No provider",noModel:"No model",taskDispatching:"Dispatching…",running:"Running",completed:"Completed",failed:"Failed",cancelled:"Cancelled",taskQueued:"Queued",taskWaiting:"Waiting for subtask",toolDenied:"Denied",toolWaitingApproval:"Waiting for approval",noSubagentMessages:"This subagent has not produced any messages yet.",copied:"Copied!",loadingContextItem:"Loading…",todoEmpty:"No todos"},placeholders:{input:"Type a message. Enter to send, Shift+Enter for newline"},dialogs:{subagentTimeline:{title:"Subagent timeline"},deleteSession:{title:"Delete Session",message:"Delete this session permanently? This action cannot be undone.",confirm:"Delete"},deleteMessage:{title:"Delete Message",userConfirm:"This will delete this message and all following AI responses and tool results. This action cannot be undone.",assistantConfirm:"This will delete this AI response. This action cannot be undone.",toolConfirm:"This will delete this tool result and remove the corresponding tool call from the AI message. This action cannot be undone.",toolRestoreWarning:"After deletion, these file changes can no longer be restored by recalling the message.",confirm:"Delete"},compressContext:{title:"Compress Context",message:"This asks the AI to condense the earlier conversation before continuing. It usually helps with long chats, but some details may be simplified.",confirm:"Compress"},regenerate:{title:"Regenerate",message:"This will regenerate this AI response in place. The original response will be replaced, and subsequent messages will be preserved. This action cannot be undone.",confirm:"Regenerate"},recall:{title:"Recall Message",message:"This will put the message content back into the input box and recall this message plus all following messages in the current fragment. This action cannot be undone.",onlySecondTitle:"Confirm Recall Only",onlySecondMessage:"This will recall the message without restoring related file changes. This action cannot be undone. Continue?",restoreSecondTitle:"Confirm Recall and Restore",restoreSecondMessage:"This will recall the message and restore related file changes. This action cannot be undone. Continue?",restoreConfirm:"Recall and restore files",onlyConfirm:"Recall only"}},mcp:{button:"MCP servers",title:"MCP servers for this session",empty:"No MCP servers configured",toolCount:"{{count}} tools",notConnected:"not connected"}},requestFailed:"Request failed",errors:{noProvider:"Select a provider before sending",apiKeyRequired:"The selected provider is missing an API key",providerBaseUrlRequired:"The selected OpenAI-compatible provider is missing a base URL",noModel:"Select a model before sending",unsupportedAttachmentType:"Unsupported file type: {{name}}",unknownTool:"Unknown tool: {{name}}",toolFieldRequired:"{{field}} is required",toolFieldTooLong:"{{field}} is too long",fileNotFound:"File not found: {{path}}",notFile:"Path is not a file: {{path}}",fileNotRead:"Editing failed — read {{path}} at least once before editing it.",sessionNotFound:"The target session no longer exists",corruptSessionFile:"A session file is corrupted and was skipped: {{path}}",agentNotDispatchable:"Agent type cannot be dispatched: {{agentType}}",taskSessionUnavailable:"The task session or model configuration is no longer available"}},taskSelectionVirtualList:{filter:{all:"All ({{ count }})",searchPlaceholder:"Search by path…",empty:"No matching tasks."},footer:{totalItems:"Total {{ count }} items",filtered:"{{ count }} shown"},labels:{execute:"Execute",action:"Action",localPath:"Local Path",remotePath:"Remote Path"}},webdavExplorer:{actions:{newFolder:"New Folder",goBack:"Go Back",confirm:"Confirm",cancel:"Cancel"},labels:{currentPath:"Current Path"}}};var vO={errors:{filenameUnsupportedChars:"文件 {{path}} 包含不支持的字符:{{chars}}"},settings:{language:{name:"语言",desc:"选择界面语言",auto:"自动检测"},account:{name:"账号",desc:"输入你的 WebDAV 账号",placeholder:"输入你的账号"},credential:{name:"凭证",desc:"输入你在坚果云“安全选项”中创建的“应用密码”,不是你的登录密码",placeholder:"输入你的坚果云应用密码"},remoteDir:{name:"远程目录",desc:"本仓库与坚果云的哪个文件夹同步。可点右侧文件夹按钮可视化选择。",placeholder:"例如 /MyNotes"},checkConnection:{name:"检查连接",desc:"点击检查 WebDAV 连接",success:"WebDAV 连接成功",failure:"WebDAV 连接失败",successButton:"连接成功 ✓",failureButton:"连接失败 \xd7"},login:{name:"登录",success:"登录成功",failure:"登录失败,请重试"},backupWarning:{name:"备份提醒",desc:"⚠️ 请注意:同步过程会修改或删除本地文件,建议在同步前备份重要文件。"},conflictStrategy:{name:"冲突解决策略",desc:"选择解决文件冲突的方式。\n注意:建议在使用自动合并功能前,先手动备份重要文件,以防数据丢失。",noConflictMerge:"无冲突合并",diff3:"自动合并(保留双方改动并用标记标出)",localPriority:"本地优先(覆盖服务器)",serverPriority:"服务器优先(覆盖本地)"},loginMode:{name:"登录方式",manual:"手动输入",sso:"单点登录"},ssoStatus:{loggedIn:"已登录",notLoggedIn:"未登录",logout:"退出登录",logoutSuccess:"已退出登录"},logout:{confirmTitle:"确认退出",confirmMessage:"确定要退出登录吗?退出后需要重新登录才能继续同步。",confirm:"确认退出",cancel:"取消"},help:{name:"如何获取 WebDAV 账号和凭证?"},enterpriseBaseUrl:{name:"企业版坚果云",desc:"可选配置企业版坚果云 Base URL,留空则使用默认地址。例如:https://dav.jianguoyun.com",action:"设置",modalTitle:"设置企业版坚果云 Base URL",placeholder:"例如 https://dav.jianguoyun.com",invalid:"Base URL 不合法",invalidWithReason:"Base URL 不合法:{{reason}}",errors:{invalidFormat:"请输入完整的服务器地址,例如:https://dav.jianguoyun.com",unsupportedProtocol:"地址需要以 http:// 或 https:// 开头"}},sections:{account:"账号设置",common:"通用设置",filters:"过滤规则",ai:"AI 设置"},tabs:{sync:"同步",ai:"AI",troubleshooting:"排障"},ai:{saved:"AI 设置已保存",none:"未设置",unnamedProvider:"未命名模型提供商",unnamedModel:"未命名模型",defaultModel:{name:"默认模型",desc:"新建对话时可选的默认模型"},nutstoreLlmGateway:{name:"坚果云 AI(实验性)",providerName:"坚果云",desc:"授权后可使用坚果云提供的模型。",pendingDesc:"请在浏览器中完成授权,当前验证码:{{code}}",connectedDesc:"已授权,当前 {{count}} 个模型可用。",authorize:"授权",authorizing:"授权中...",openAuthorizationPage:"打开授权页",cancelAuthorization:"取消授权",authorized:"坚果云 AI 授权成功",disconnect:"断开",disconnected:"已断开坚果云 AI",refreshModels:"更新",betaModal:{title:"功能内测中",message:"坚果云 AI 目前处于内测阶段,尚未向所有用户开放。如果您不在内测名单中,授权后可能暂时无法使用相关功能,请继续等待,我们正在陆续开放中。",cancel:"取消",confirm:"我知道了,继续授权"},errors:{authorizationRequired:"请先授权坚果云 AI",authorizationExpired:"坚果云 AI 授权已过期,请重新发起授权",authorizationFailed:"坚果云 AI 授权失败:{{code}} {{message}}",missingClientId:"缺少 LLM_GATEWAY_CLIENT_ID,无法启动坚果云 AI 授权",modelsFailed:"获取坚果云 AI 模型失败:{{status}}",emptyModels:"坚果云 AI 没有返回可用模型",refreshFailed:"刷新坚果云 AI 模型失败"}},providers:{name:"模型提供商",desc:"管理可用的 AI 模型提供商",summary:"已配置 {{count}} 个模型提供商",emptyHint:"尚未配置模型提供商。点击“管理模型提供商”添加一个后再开始对话。",manage:"管理模型提供商",add:"新增模型提供商",refreshPresetName:"获取最新模型列表",refreshPresetDesc:"可以获取最新的模型列表。",refreshPresetModels:"获取模型列表",refreshPresetModelsLoading:"获取中...",refreshPresetModelsSuccess:"提供商 {{providers}},模型 {{models}}",refreshPresetModelsFailure:"获取失败 \xd7",presetModelsRefreshFailed:"更新失败,继续使用本地/内置模型列表",presetModelsRefreshFailedWithReason:"更新失败,继续使用本地/内置模型列表:{{reason}}",empty:"当前还没有配置模型提供商。",defaultEndpoint:"默认端点",presetCustom:"自定义",updateModels:"更新",updateModelsHint:"预设中还有 {{count}} 个模型可同步到当前提供商。",updateModelsSuccess:"已增加 {{count}} 个模型"},provider:{name:"模型提供商名称",desc:"用于在 Chatbox 中显示的名称",baseUrl:{name:"Base URL",desc:"可选覆盖,例如 https://api.openai.com/v1"},apiKey:{name:"API Key",desc:"发送请求时使用的密钥"},allowBrowserCors:{name:"允许浏览器跨域请求",desc:"开启后将优先使用浏览器原生 fetch,可在支持的提供商上获得流式输出"},apiFormat:{name:"API 格式",desc:"与该提供商通信使用的协议",openaiChatCompletions:"OpenAI Chat Completions",openaiResponses:"OpenAI Responses",anthropic:"Anthropic Messages",other:"其他({{npm}})"}},models:{name:"模型",desc:"在当前模型提供商下可用的模型",add:"新增模型",empty:"当前模型提供商下还没有模型。"},model:{id:"模型 ID",idDesc:"请求 API 时使用的模型标识(如 gpt-4o)",inputModalities:"输入模态"},modals:{confirmDeleteLabel:"确认",providers:{title:"模型提供商管理",updateModelsTitle:"同步预设模型",updateModelsDesc:"将为 {{provider}} 增加 {{count}} 个模型,请确认以下新增项:",updateModelsConfirm:"确认增加"},provider:{createTitle:"新建提供商",editTitle:"编辑提供商",edit:"编辑",saved:"提供商已保存",deleted:"提供商已删除",corsConfirmTitle:"确认启用浏览器跨域请求",corsConfirmMessage:"并不是所有模型提供商都允许浏览器直接跨域访问。开启后将优先使用浏览器原生 fetch 以支持流式输出;如果之后发现该提供商无法使用,请回到这里关闭此开关。",corsConfirmEnable:"确认启用"},model:{createTitle:"新建模型",editTitle:"编辑模型",edit:"编辑",deleted:"模型已删除"}},mcp:{name:"MCP 服务",summary:"已配置 {{count}} 个服务",manage:"管理 MCP 服务",manager:{title:"MCP 服务",add:"添加服务",empty:"尚未配置 MCP 服务。",configFileHint:"配置保存在 {{path}},也可以在聊天中让 AI 帮你编辑该文件。",parseError:"解析 {{path}} 失败:{{reason}}",statusDisabled:"已停用",statusConnected:"{{count}} 个工具",statusError:"连接失败:{{reason}}",test:"测试",testSuccess:"连接成功:共 {{count}} 个可用工具",testFailed:"连接失败:{{reason}}"},editor:{createTitle:"添加 MCP 服务",editTitle:"编辑 MCP 服务",serverName:"服务名称",serverNameDesc:"仅限字母、数字、连字符和下划线",url:"URL",urlDesc:"MCP 服务的 Streamable HTTP 端点",headers:"请求头",headersDesc:"自定义 HTTP 请求头,例如 Authorization",headerKeyPlaceholder:"请求头名称",headerValuePlaceholder:"请求头值",addHeader:"添加请求头",removeHeader:"删除请求头",enabled:"启用"},errors:{emptyName:"服务名称不能为空",invalidName:"服务名称只能包含字母、数字、连字符和下划线",duplicateName:"已存在同名服务",emptyUrl:"URL 不能为空",invalidUrl:"URL 格式不正确"}},yolo:{name:"完全访问权限",desc:"⚠️ 开启后,AI 可自动修改文件和插件设置,不再逐次询问确认"},errors:{saveFailed:"AI 设置保存失败",saveFailedWithReason:"AI 设置保存失败:{{reason}}",invalidProvidersConfig:"AI 模型提供商配置无效,请在设置中修正。详情:{{reason}}",emptyModelId:"模型 ID 不能为空",duplicateModelId:"已存在相同 ID 的模型",emptyProviderId:"模型提供商名称不能为空",duplicateProviderId:"已存在相同名称的模型提供商",reservedProviderId:"该模型提供商名称由坚果云 AI 保留,请使用其他名称",providerNotFoundForProtocolOpen:"未找到对应的模型提供商,可能已被删除或重命名:{{providerId}}",networkDisconnected:"网络连接不可用,请检查网络后重试。",browserCorsFallbackToBuiltinTransport:"浏览器跨域请求失败,已临时回退到内置请求方式。",browserCorsFailedWithDisableLink:"浏览器跨域请求失败。[打开此提供商并关闭 CORS]({{link}})。"}},confirmBeforeSync:{name:"同步前确认",desc:"同步前显示待执行的任务列表,确认后再执行"},confirmBeforeDeleteInAutoSync:{name:"自动同步时删除文件前确认",desc:"自动同步过程中检测到本地文件将被删除时,弹出确认对话框让你选择删除或重新上传"},realtimeSync:{name:"实时同步",desc:"文件修改后自动进行同步"},syncMode:{name:"同步模式",desc:"文件很多时建议选“宽松”,速度更快:它会跳过两边都存在、同名且大小相同但从未同步过的文件。严格模式会逐一比对。",strict:"严格",loose:"宽松"},syncPolicy:{name:"同步策略",desc:"控制本机与云端如何同步变更。带“覆盖”或“还原”的策略会删除另一端的多余文件,请谨慎使用。",twoWay:"双向同步",sendOnly:"仅发送",sendOnlyOverrideChanges:"仅发送:覆盖云端变更",receiveOnly:"仅接收",receiveOnlyRevertLocalChanges:"仅接收:还原本地变更",modal:{title:"确认同步策略",twoWayDesc:"本地和云端互相同步,各自的新增和删除都会同步到对方。\n同一文件两端都改动时,按冲突策略处理。",sendOnlyDesc:"把本地的所有变更(新增、修改、删除)发送到云端。\n\n• 本地新增/修改的文件 → 上传到云端\n• 本地删除且云端未改动的文件 → 从云端删除\n• 云端独立新增或修改的文件 → 保留不动\n• 本地删除时云端也有改动 → 跳过该项(避免误删云端改动)\n\n适合:以本地为主、云端为辅的场景。",sendOnlyOverrideChangesDesc:"以本地当前完整状态覆盖云端。\n云端有但本地没有的文件会被删除。\n适合希望让云端与本地完全一致的场景。",receiveOnlyDesc:"把云端的所有变更(新增、修改、删除)接收到本地。\n\n• 云端新增/修改的文件 → 下载到本地\n• 云端删除且本地未改动的文件 → 从本地删除\n• 本地独立新增或修改的文件 → 保留不动\n• 云端删除时本地也有改动 → 跳过该项(避免误删本地改动)\n\n适合:只读设备,或以云端为准的场景。",receiveOnlyRevertLocalChangesDesc:"以云端当前完整状态还原本地。\n本地有但云端没有的文件会被删除。\n适合只读设备,或需要强制以云端内容为准时使用。",confirm:"确认",cancel:"取消"}},startupSyncDelay:{name:"启动后自动同步(秒)",desc:"设置启动后第几秒自动执行一次同步。设置为 0 则禁用启动时自动同步。",placeholder:"输入秒数 (例如 5, 0 则禁用)",invalidValue:"无效的数值,已重置为 0",exceedsMax:"数值超过最大限制 {{max}} 秒(1天),已自动调整"},autoSyncInterval:{name:"定时自动同步(分钟)",desc:"设置每隔多长时间在后台自动执行一次同步(分钟)。设置为 0 则禁用定时自动同步。",placeholder:"输入分钟数 (例如 5, 0 则禁用)",invalidValue:"无效的数值,已重置为 0",exceedsMax:"数值超过最大限制 {{max}} 分钟(1天),已自动调整"},filters:{name:"过滤规则",desc:"选择哪些文件或文件夹不参与同步。可用简单路径或通配符,例如“图片”或“*.tmp”。从上到下判定,最后命中的规则生效;每条规则的 Aa 开关控制是否区分大小写。",add:"添加规则",remove:"删除",confirmRemove:"确认删除",edit:"编辑规则",toggle:"启用或禁用该规则",save:"保存",cancel:"取消",placeholder:"例如: .DS_Store, *.pdf",types:{exclude:"排除",include:"包含"}},configDirSync:{name:"配置目录同步",desc:"控制 {{configDir}} 目录是否参与同步。",none:"不同步",bookmarks:"仅同步书签",all:"同步全部",bookmarksTitle:"启用书签同步",bookmarksDesc:"仅同步 {{configDir}}/bookmarks.json,其他配置文件不受影响。",warnTitle:"启用完整配置目录同步?",warnSyncs:"同步内容:插件设置(data.json)、插件二进制(main.js)、主题、代码片段等所有配置文件。",warnExcludes:"自动排除:{{configDir}}/plugins/**/node_modules、{{configDir}}/plugins/**/.git 和 {{configDir}}/plugins/**/.pnpm-store。",warnConflict:"冲突处理:两端同一文件均有修改时,保留修改时间较新的版本,另一端的修改将被覆盖。",warnRisk:"风险:多台设备同时运行 Obsidian 容易引发冲突;插件设置变更后可能需要重启 Obsidian 才能生效。",warnPruned:"规则 `{{rule}}` 会排除 {{configDir}} 本身,导致配置文件夹无法同步。若要同步配置文件夹,请先在过滤规则里禁用这条规则。",syncNotice:"配置文件夹无法同步:规则 `{{rule}}` 排除了 {{configDir}}。若要同步,请先禁用这条规则。",confirm:"启用",cancel:"取消"},skipLargeFiles:{name:"跳过大文件",desc:"超过该大小的文件将不参与同步,例如 100MB 或 1GB。同步慢或报错时可适当调低。",placeholder:"例如:10 MiB 或 500 KiB",invalidFormat:'无效的文件大小格式,请使用如 "10MB" 或 "500KB" 的格式',exceedsMaxSize:"文件大小超过最大限制 500MB"},mobileAppDownloadFileChunkSize:{name:"移动端下载分块大小(高级)",desc:"仅当移动端下载文件失败时才需要调整。控制每次下载文件的分块大小。",placeholder:"例如:16 MiB",invalidFormat:'无效的分块大小格式,请使用如 "16 MiB" 或 "512 KiB" 的格式',belowMinSize:"分块大小不能小于 64 KiB,已自动调整",exceedsMaxSize:"分块大小不能超过 64 MiB,已自动调整"},log:{title:"调试日志",name:"控制台日志",desc:"查看控制台输出和调试信息",saveToNote:"保存到笔记",savedToNote:"日志已保存到笔记: {{fileName}}",saveError:"保存日志失败",clear:"清除",cleared:"控制台日志已清除",clearName:"清除日志",clearDesc:"删除所有控制台输出记录"},troubleshooting:{title:"排障"},cache:{title:"缓存管理",clearName:"清除本地缓存",clearDesc:"删除当前设备上的本地缓存数据。此操作无法撤销,会导致下次同步前需要重新建立缓存。仅影响当前设备,不会影响您在坚果云中的数据。",clear:"清除",confirm:"确认清除",cleared:"缓存已成功清除",clearModal:{title:"清除缓存",description:"选择需要清除的缓存类型。此操作无法撤销。",cancel:"取消",confirm:"确认清除",syncRecordCache:{name:"同步记录缓存",desc:"跟踪每个文件的同步状态。"},blobCache:{name:"文件快照缓存",desc:"存储用于同步时对比变化的文件快照。"},traverseWebDAVCache:{name:"文件扫描缓存",desc:"存储远程文件夹结构,下次同步时只需获取变化的部分,加快同步速度。如果插件更新后同步出现文件列表异常或数据不一致,可尝试清除此缓存。清除后下次同步需要重新扫描所有远程文件,可能需要较长时间。"},nothingSelected:"请至少选择一种缓存类型进行清除。"},gcBlockedBySync:"当前正在同步,请等待同步结束后再进行垃圾回收。",gcBlockedByGc:"垃圾回收正在进行中,请稍后再试。",generateBlobGarbageName:"GC 压测:生成垃圾快照",generateBlobGarbageDesc:"向 blob 缓存中写入 {{count}} 个随机文件快照(每个约 {{sizeKiB}} KiB),用于测试 GC 清理效果。",generateBlobGarbage:"生成垃圾快照",generateBlobGarbageRunning:"正在生成垃圾快照...",generateBlobGarbageDone:"已生成 {{count}} 个垃圾快照。"}},aiPermission:{title:"AI 权限请求",sessionLabel:"会话「{{title}}」正在请求权限",message:"AI 正在请求执行以下文件操作:",sessionScopeHint:"“自动同意该操作”仅在当前会话生效,重启 Obsidian 后将恢复询问。",allowOnce:"同意",alwaysAllow:"自动同意该操作",deny:"拒绝",denied:"操作已拒绝:{{summary}}",readonly:"该 agent 是只读的,不能修改文件。尝试的操作:{{summary}}",source:"源路径",destination:"目标路径",operations:{read:"读取",write:"写入",edit:"编辑",delete:"删除",mkdir:"创建目录",copy:"复制",move:"移动",updateSettings:"更新插件设置"},settings:{emptySummary:"未检测到可读取的设置变更。",on:"开启",off:"关闭",fields:{filterRules:{name:"过滤规则",empty:"(空)",disabled:"(已禁用)"},skipLargeFiles:{name:"跳过的大文件上限"},startupSyncDelay:{name:"启动后自动同步(秒)"},autoSyncInterval:{name:"定时自动同步间隔"},realtimeSync:{name:"实时同步"},confirmBeforeSync:{name:"同步前确认"},confirmBeforeDeleteInAutoSync:{name:"自动同步删除前确认"},syncMode:{name:"同步模式"},conflictStrategy:{name:"冲突解决策略"},configDirSyncMode:{name:"配置目录同步"},language:{name:"语言",auto:"自动"}}}},sync:{error:{localPathNotFound:"本地路径未找到: {{path}}",mergeNotSupported:"该文件类型暂不支持合并",failedToAutoMerge:"自动合并失败",failedToUploadMerged:"上传合并内容失败",requestsTooFrequent:"请求过于频繁,请等待几分钟后再试",accountNotConfigured:"尚未配置坚果云账号,请先在设置中配置账号信息",ssoTokenInvalid:"登录已失效,请在设置中重新登录。"},requestsTooFrequent:"请求过于频繁,插件将在 {{time}} 后自动继续同步任务",preparing:"\uD83D\uDCCB 准备同步",preparation:{checkingRemote:"正在检查远端目录…",loadingState:"正在读取同步状态…",scanningRemote:"正在扫描远端目录…",checkingChanges:"正在检查远端变化…",retryingRemote:"服务器繁忙,30 秒后重试…",analyzing:"正在分析文件差异…",savingCache:"正在保存远端遍历缓存…",traversalStats:"已扫描 {{processed}} 个目录,待扫描 {{queued}} 个目录,已发现 {{items}} 个项目",incrementalStats:"已处理 {{changes}} 项远端变化"},start:"⌛️ 开始同步",complete:"✅ 同步完成",result:{title:"同步成功",success:"所有同步任务均已完成",noChanges:"当前没有需要同步的文件"},completeWithFailed:"❌ 同步完成,但有 {{failedCount}} 个任务失败",failedWithError:"同步失败,错误信息: {{error}}",progress:"同步进度: {{percent}}%",blockedBySync:"同步正在进行中,请稍后再试。",stoppingGcForSync:"检测到垃圾回收正在进行,正在停止清理并开始同步。",startButton:"开始同步",stopButton:"停止同步",hideButton:"隐藏",closeButton:"关闭",showProgressButton:"显示同步进度",notSyncing:"尚未开始同步",percentComplete:"{{percent}}%",currentFile:"{{path}}",filePath:"{{path}}",progressTitle:"同步进度",progressStats:"已完成: {{completed}} / {{total}} 个任务",completedFilesTitle:"已完成的任务",syncingFiles:"正在同步文件...",updatingCache:"正在更新本地缓存...",cacheUpdated:"本地缓存已更新。",failedStatus:"同步失败",cancelled:"同步已取消",suggestUseClientForManyTasks:"提示:当同步任务较多时,建议使用坚果云客户端同步,可获得更好的性能和稳定性,插件更适合在移动端使用!",fileOp:{createLocalDir:"创建本地目录",createRemoteDir:"创建远程目录",createRemoteDirs:"创建多级目录",download:"下载",filenameError:"路径含无效字符",merge:"合并",removeLocal:"删除本地",removeRemote:"删除远程",removeRemoteRecursively:"递归删除远程",sync:"同步",upload:"上传",noop:"跳过",cleanRecord:"清理记录",skip:"跳过"},skipReason:{"file-too-large":"文件过大","folder-contains-ignored-items":"文件夹包含被忽略的文件","conflict-in-send-only-mode":"本地和云端都已变更;当前为仅发送模式,已保留云端版本","conflict-in-receive-only-mode":"本地和云端都已变更;当前为仅接收模式,已保留本地版本","deleted-locally-but-changed-remotely":"本地已删除,但云端有修改;为避免误删云端改动,已跳过此项","deleted-remotely-but-changed-locally":"云端已删除,但本地有修改;为避免误删本地改动,已跳过此项"},confirmModal:{title:"同步确认",policyTitle:"本次同步策略",message:"⚠️ 请注意:\n\n1. 同步操作可能会修改或删除本地文件\n2. 建议在同步前手动备份重要文件\n3. 如果出现文件冲突,可能需要手动解决\n4. 首次同步需要处理所有文件,可能会比较慢,请耐心等待\n\n确定要开始同步吗?",confirm:"确认同步",cancel:"取消",remoteDir:"远程目录:{{dir}}",strategy:"冲突处理策略:{{strategy}}"}},taskList:{title:"同步任务列表",instruction:'请检查以下待执行的任务。点击"继续"将执行选中的任务,点击"取消"则跳过本次同步。',continue:"继续({{count}})",cancel:"取消"},deleteConfirm:{title:"确认删除本地文件",instruction:"⚠️ 在自动同步过程中检测到以下本地文件将被删除(因远程已删除)。\n\n勾选要删除的文件,未勾选的文件将重新上传到远程:",warningNotice:"检测到本地文件将被删除,请确认",select:"选择",filePath:"文件路径",deleteAndReupload:"删除选中的,重新上传未选中的",skipForNow:"暂时忽略"},failedTasks:{title:"同步失败任务",instruction:"以下任务在同步时失败:",taskName:"任务",localPath:"本地路径",errorMessage:"失败原因",close:"关闭"},textAreaModal:{copy:"复制",close:"关闭",copied:"文本已复制到剪贴板"},time:{justNow:"刚刚",minutesAgo:"{{count}}分钟前",hoursAgo:"{{count}}小时前",daysAgo:"{{count}}天前",longAgo:"很久前"},chatbox:{title:"Chatbox",openCommand:"打开 Chatbox",addToContext:"添加到 AI 上下文",newChat:"新对话",sessionDeleted:"会话已删除",exportSaved:"会话已导出:{{fileName}}",exportFailed:"导出会话失败",conflictResolution:{action:"使用 AI 解决 {{count}} 处冲突",prompt:"请解决上下文文件中的所有版本冲突。逐个分析 <<<<<<<、=======、>>>>>>> 标记两侧的内容,保留双方不冲突且有价值的信息,对重复内容进行语义合并,保持原有 Markdown 结构、Frontmatter、内部链接和语言风格。不要臆造文件中不存在的信息。如果两侧内容相互矛盾、无法同时成立,并且文件中没有足够依据确定取舍,请先在对话中向我提出具体问题,等待我的回答,不要修改文件或自行添加折中方案;收到回答后再继续解决冲突。完成后删除所有冲突标记,并检查结果是否连贯完整。只修改这个文件。",alreadyResolved:"文件中的冲突已经解决",modelUnavailable:"请先配置默认 AI Provider 和 Model",failed:"无法创建 AI 冲突解决会话"},exportDialog:{title:"导出会话",description:"导出为 Markdown 文件并保存到笔记库。",includeToolMessages:"包含工具调用消息",cancel:"取消",confirm:"导出"},exportRole:{user:"用户",tool:"工具",systemNotification:"系统通知"},exportFrontmatter:{title:"标题",sessionId:"会话ID",exportedAt:"导出时间",createdAt:"创建时间",updatedAt:"更新时间",model:"模型",includeToolMessages:"包含工具消息",pluginVersion:"插件版本"},exportMeta:{messageTime:"时间",emptyContent:"(无文本内容)",toolCalls:"工具调用",toolName:"工具名称",toolCallId:"工具调用 ID"},repeatedToolCallsStopped:"Agent 连续 {{count}} 次调用了完全相同的工具与参数,已停止继续调用。",task:{cancelledSummary:"任务 {{task}} 已取消。",emptyResult:"任务已完成,但没有返回摘要。"},ui:{history:{title:"历史",sessionActions:"会话操作",sessionRunning:"运行中"},actions:{exportAsMarkdown:"导出为 Markdown",deleteSession:"删除",cancel:"取消",close:"关闭",selectFile:"选择文件",send:"发送",stopRun:"终止",compressContext:"压缩上下文",copy:"复制",runHtmlCode:"运行",showHtmlCode:"代码",deleteMessage:"删除消息",regenerateMessage:"重新生成",recallMessage:"撤回",removeContextItem:"移除"},tooltips:{contextUsage:"上下文:已用 {{used}}%(窗口 {{total}} tokens \xb7 总计 {{usedTokens}})"},labels:{provider:"Provider",model:"Model",tool:"工具",toolCall:"工具调用",params:"参数",result:"结果",queuedSubmissions:"排队内容",contextArea:"上下文",reasoning:"推理",todoList:"待办列表",systemNotification:"系统通知"},fileChanges:{create:"新增",update:"修改",delete:"删除",binary:"二进制文件,无法显示文本差异"},states:{empty:"开始发送一条消息",dragFilePrompt:"松手以添加文件",thinking:"思考中",compressing:"压缩中",processingTools:"工具处理中",noProvider:"未选择 Provider",noModel:"未选择 Model",taskDispatching:"正在派发…",running:"运行中",completed:"已完成",failed:"失败",cancelled:"已取消",taskQueued:"排队中",taskWaiting:"等待子任务",toolDenied:"已拒绝",toolWaitingApproval:"等待批准",noSubagentMessages:"该子 Agent 尚未产生消息。",copied:"已复制",loadingContextItem:"加载中…",todoEmpty:"暂无待办"},placeholders:{input:"输入消息,Enter 发送,Shift+Enter 换行"},dialogs:{subagentTimeline:{title:"子 Agent 时间线"},deleteSession:{title:"删除会话",message:"确认删除这个会话吗?删除后不可恢复。",confirm:"确认删除"},deleteMessage:{title:"删除消息",userConfirm:"此操作将删除该用户消息,以及其后所有 AI 回复和工具调用结果,无法恢复。",assistantConfirm:"此操作将删除该 AI 回复,无法恢复。",toolConfirm:"此操作将删除该工具调用结果,并从对应的 AI 消息中移除该工具调用记录,无法恢复。",toolRestoreWarning:"删除后将无法通过撤回消息恢复这些文件修改。",confirm:"确认删除"},compressContext:{title:"压缩上下文",message:"这会让 AI 先整理前面的聊天内容,再继续当前对话。这样通常能减少长度带来的影响,但部分细节可能会被简化。",confirm:"开始压缩"},regenerate:{title:"重新生成",message:"此操作将重新生成该 AI 回复,原回复内容将被替换,其后的消息将被保留,无法恢复。",confirm:"重新生成"},recall:{title:"撤回消息",message:"此操作将把消息内容放回输入框,并撤回该消息及当前段中之后的所有消息,无法恢复。",onlySecondTitle:"确认仅撤回",onlySecondMessage:"将仅撤回消息,不还原相关修改。此操作无法恢复,确认继续吗?",restoreSecondTitle:"确认撤回并还原修改",restoreSecondMessage:"将撤回消息,并还原相关修改。此操作无法恢复,确认继续吗?",restoreConfirm:"撤回并还原修改",onlyConfirm:"仅撤回"}},mcp:{button:"MCP 服务",title:"本会话的 MCP 服务",empty:"尚未配置 MCP 服务",toolCount:"{{count}} 个工具",notConnected:"未连接"}},requestFailed:"请求失败",errors:{noProvider:"发送前请先选择模型提供商",apiKeyRequired:"当前模型提供商缺少 API Key",providerBaseUrlRequired:"当前 OpenAI-compatible 模型提供商缺少 Base URL",noModel:"发送前请先选择模型",unsupportedAttachmentType:"暂不支持该文件类型:{{name}}",unknownTool:"未知工具:{{name}}",toolFieldRequired:"{{field}} 为必填项",toolFieldTooLong:"{{field}} 过长",fileNotFound:"未找到文件:{{path}}",notFile:"该路径不是文件:{{path}}",fileNotRead:"编辑失败,请至少先读取一次 {{path}} 再编辑。",sessionNotFound:"目标会话已不存在",corruptSessionFile:"会话文件已损坏,已跳过加载:{{path}}",agentNotDispatchable:"该 Agent 类型不可派发:{{agentType}}",taskSessionUnavailable:"任务对应的会话或模型配置已不可用"}},taskSelectionVirtualList:{filter:{all:"全部 ({{ count }})",searchPlaceholder:"按路径搜索……",empty:"没有匹配的任务。"},footer:{totalItems:"共 {{ count }} 项",filtered:"筛选后 {{ count }} 项"},labels:{execute:"执行",action:"操作",localPath:"本地路径",remotePath:"远程路径"}},webdavExplorer:{actions:{newFolder:"新建文件夹",goBack:"返回上一层",confirm:"确定",cancel:"取消"},labels:{currentPath:"当前路径"}}};var har="translation",gar={zh:{translation:vO},en:{translation:xO}};Wo.init({ns:["translation"],defaultNS:har,resources:gar,fallbackLng:"en",interpolation:{escapeValue:!1}});var $=Wo;var Lr=/*#__PURE__*/function(){function Lr1(){_class_call_check(this,Lr1)}_create_class(Lr1,[{key:"onload",value:function onload(){}},{key:"onunload",value:function onunload(){}}]);return Lr1}();var xar=(typeof global==="undefined"?"undefined":_type_of(global))=="object"&&global&&global.Object===Object&&global,yO=xar;var yar=(typeof self==="undefined"?"undefined":_type_of(self))=="object"&&self&&self.Object===Object&&self,_ar=yO||yar||Function("return this")(),Bn=_ar;var bar=Bn.Symbol,Ic=bar;var oPe=Object.prototype,war=oPe.hasOwnProperty,Sar=oPe.toString,X3=Ic?Ic.toStringTag:void 0;function kar(e){var t=war.call(e,X3),r=e[X3];try{e[X3]=void 0;var n=!0}catch(a){}var i=Sar.call(e);return n&&(t?e[X3]=r:delete e[X3]),i}var sPe=kar;var Ear=Object.prototype,Tar=Ear.toString;function Iar(e){return Tar.call(e)}var lPe=Iar;var Car="[object Null]",Aar="[object Undefined]",uPe=Ic?Ic.toStringTag:void 0;function Par(e){return e==null?e===void 0?Aar:Car:uPe&&uPe in Object(e)?sPe(e):lPe(e)}var Ca=Par;function Oar(e){return e!=null&&(typeof e==="undefined"?"undefined":_type_of(e))=="object"}var Si=Oar;var Rar="[object Symbol]";function Mar(e){return(typeof e==="undefined"?"undefined":_type_of(e))=="symbol"||Si(e)&&Ca(e)==Rar}var e5=Mar;var $ar=Array.isArray,Ou=$ar;var Nar=/\s/;function Dar(e){for(var t=e.length;t--&&Nar.test(e.charAt(t)););return t}var cPe=Dar;var qar=/^\s+/;function Lar(e){return e&&e.slice(0,cPe(e)+1).replace(qar,"")}var dPe=Lar;function Far(e){var t=typeof e==="undefined"?"undefined":_type_of(e);return e!=null&&(t=="object"||t=="function")}var Aa=Far;var pPe=0/0,zar=/^[-+]0x[0-9a-f]+$/i,jar=/^0b[01]+$/i,Uar=/^0o[0-7]+$/i,Bar=parseInt;function War(e){if(typeof e=="number")return e;if(e5(e))return pPe;if(Aa(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Aa(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=dPe(e);var r=jar.test(e);return r||Uar.test(e)?Bar(e.slice(2),r?2:8):zar.test(e)?pPe:+e}var wm=War;var fPe=1/0,Var=17976931348623157e292;function Gar(e){if(!e)return e===0?e:0;if(e=wm(e),e===fPe||e===-fPe){var t=e<0?-1:1;return t*Var}return e===e?e:0}var mPe=Gar;function Har(e){var t=mPe(e),r=t%1;return t===t?r?t-r:t:0}var t5=Har;function Zar(e){return e}var o_=Zar;var Kar="[object AsyncFunction]",Qar="[object Function]",Jar="[object GeneratorFunction]",Yar="[object Proxy]";function Xar(e){if(!Aa(e))return!1;var t=Ca(e);return t==Qar||t==Jar||t==Kar||t==Yar}var vx=Xar;var eor=Bn["__core-js_shared__"],_O=eor;var hPe=function(){var e=/[^.]+$/.exec(_O&&_O.keys&&_O.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function tor(e){return!!hPe&&hPe in e}var gPe=tor;var ror=Function.prototype,nor=ror.toString;function ior(e){if(e!=null){try{return nor.call(e)}catch(t){}try{return e+""}catch(t){}}return""}var Sm=ior;var aor=/[\\^$.*+?()[\]{}|]/g,oor=/^\[object .+?Constructor\]$/,sor=Function.prototype,lor=Object.prototype,uor=sor.toString,cor=lor.hasOwnProperty,dor=RegExp("^"+uor.call(cor).replace(aor,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function por(e){if(!Aa(e)||gPe(e))return!1;var t=vx(e)?dor:oor;return t.test(Sm(e))}var xPe=por;function mor(e,t){return e==null?void 0:e[t]}var vPe=mor;function hor(e,t){var r=vPe(e,t);return xPe(r)?r:void 0}var jl=hor;var gor=jl(Bn,"WeakMap"),yx=gor;var xor=yx&&new yx,s_=xor;var vor=s_?function vor1(e,t){return s_.set(e,t),e}:o_,bO=vor;var yPe=Object.create,yor=function(){function e(){}return function(t){if(!Aa(t))return{};if(yPe)return yPe(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}(),P0=yor;function _or(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var r=P0(e.prototype),n=e.apply(r,t);return Aa(n)?n:r}}var km=_or;var bor=1;function wor(e,t,r){var n=t&bor,i=km(e);function a(){var o=this&&this!==Bn&&_instanceof(this,a)?i:e;return o.apply(n?r:this,arguments)}return a}var _Pe=wor;function Sor(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}var l_=Sor;var kor=Math.max;function Eor(e,t,r,n){for(var i=-1,a=e.length,o=r.length,s=-1,l=t.length,c=kor(a-o,0),d=Array(l+c),u=!n;++s0){if(++t>=Uor)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var CO=Vor;var Gor=CO(bO),AO=Gor;var Hor=/\{\n\/\* \[wrapped with (.+)\] \*/,Zor=/,? & /;function Kor(e){var t=e.match(Hor);return t?t[1].split(Zor):[]}var IPe=Kor;var Qor=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;function Jor(e,t){var r=t.length;if(!r)return e;var n=r-1;return t[n]=(r>1?"& ":"")+t[n],t=t.join(r>2?", ":" "),e.replace(Qor,"{\n/* [wrapped with "+t+"] */\n")}var CPe=Jor;function Yor(e){return function(){return e}}var APe=Yor;var Xor=function(){try{var e=jl(Object,"defineProperty");return e({},"",{}),e}catch(t){}}(),p_=Xor;var esr=p_?function esr1(e,t){return p_(e,"toString",{configurable:!0,enumerable:!1,value:APe(t),writable:!0})}:o_,PPe=esr;var tsr=CO(PPe),PO=tsr;function rsr(e,t){for(var r=-1,n=e==null?0:e.length;++r-1}var NPe=ssr;var lsr=1,usr=2,csr=8,dsr=16,psr=32,fsr=64,msr=128,hsr=256,gsr=512,xsr=[["ary",msr],["bind",lsr],["bindKey",usr],["curry",csr],["curryRight",dsr],["flip",gsr],["partial",psr],["partialRight",fsr],["rearg",hsr]];function vsr(e,t){return OO(xsr,function(r){var n="_."+r[0];t&r[1]&&!NPe(e,n)&&e.push(n)}),e.sort()}var DPe=vsr;function ysr(e,t,r){var n=t+"";return PO(e,CPe(n,DPe(IPe(n),r)))}var RO=ysr;var _sr=1,bsr=2,wsr=4,Ssr=8,qPe=32,LPe=64;function ksr(e,t,r,n,i,a,o,s,l,c){var d=t&Ssr,u=d?o:void 0,p=d?void 0:o,m=d?a:void 0,h=d?void 0:a;t|=d?qPe:LPe,t&=~(d?LPe:qPe),t&wsr||(t&=~(_sr|bsr));var g=[e,t,i,m,u,h,p,s,l,c],x=r.apply(void 0,g);return TPe(e)&&AO(x,g),x.placeholder=n,RO(x,e,t)}var MO=ksr;function Esr(e){var t=e;return t.placeholder}var f_=Esr;var Tsr=0x1fffffffffffff,Isr=/^(?:0|[1-9]\d*)$/;function Csr(e,t){var r=typeof e==="undefined"?"undefined":_type_of(e);return t=t==null?Tsr:t,!!t&&(r=="number"||r!="symbol"&&Isr.test(e))&&e>-1&&e%1==0&&e1&&v.reverse(),d&&l-1&&e%1==0&&e<=rlr}var qO=nlr;function ilr(e){return e!=null&&qO(e.length)&&!vx(e)}var h_=ilr;function alr(e,t,r){if(!Aa(r))return!1;var n=typeof t==="undefined"?"undefined":_type_of(t);return(n=="number"?h_(r)&&m_(t,r.length):n=="string"&&t in r)?O0(r[t],e):!1}var tOe=alr;var olr=Object.prototype;function slr(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||olr;return e===r}var g_=slr;function llr(e,t){for(var r=-1,n=Array(e);++r-1}var kOe=Eur;function Tur(e,t){var r=this.__data__,n=M0(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var EOe=Tur;function __(e){var t=-1,r=e==null?0:e.length;for(this.clear();++ti?0:i+t),r=r>i?i:r,r<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var a=Array(i);++n=t?e:t)),e}var MOe=jur;function Uur(e,t,r){return r===void 0&&(r=t,t=void 0),r!==void 0&&(r=wm(r),r=r===r?r:0),t!==void 0&&(t=wm(t),t=t===t?t:0),MOe(wm(e),t,r)}var Jp=Uur;function Bur(){this.__data__=new $0,this.size=0}var $Oe=Bur;function Wur(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var NOe=Wur;function Vur(e){return this.__data__.get(e)}var DOe=Vur;function Gur(e){return this.__data__.has(e)}var qOe=Gur;var Hur=200;function Zur(e,t){var r=this.__data__;if(_instanceof(r,$0)){var n=r.__data__;if(!N0||n.lengths))return!1;var c=a.get(e),d=a.get(t);if(c&&d)return c==t&&d==e;var u=-1,p=!0,m=r&Ldr?new SRe:void 0;for(a.set(e,t),a.set(t,e);++u=t||S<0||u&&E>=a}function y(){var w=eR();if(x(w))return v(w);s=setTimeout(y,g(w))}function v(w){return s=void 0,p&&n?m(w):(n=i=void 0,o)}function _(){s!==void 0&&clearTimeout(s),c=0,n=l=i=s=void 0}function b(){return s===void 0?o:v(eR())}function k(){var w=eR(),S=x(w);if(n=arguments,i=this,l=w,S){if(s===void 0)return h(l);if(u)return clearTimeout(s),s=setTimeout(y,t),m(l)}return s===void 0&&(s=setTimeout(y,t)),o}return k.cancel=_,k.flush=b,k}var Cm=fpr;var mpr="[object String]";function hpr(e){return typeof e=="string"||!Ou(e)&&Si(e)&&Ca(e)==mpr}var HK=hpr;var gpr="[object Boolean]";function xpr(e){return e===!0||e===!1||Si(e)&&Ca(e)==gpr}var ZK=xpr;var vpr="[object Date]";function ypr(e){return Si(e)&&Ca(e)==vpr}var qRe=ypr;var LRe=al&&al.isDate,_pr=LRe?Qp(LRe):qRe,KK=_pr;function bpr(e,t){return DRe(e,t)}var QK=bpr;var wpr=Bn.isFinite;function Spr(e){return typeof e=="number"&&wpr(e)}var I_=Spr;var kpr="[object Number]";function Epr(e){return typeof e=="number"||Si(e)&&Ca(e)==kpr}var s5=Epr;function Tpr(e){return e==null}var Pa=Tpr;function Ipr(e){return e===null}var JK=Ipr;var Cpr="[object RegExp]";function Apr(e){return Si(e)&&Ca(e)==Cpr}var FRe=Apr;var zRe=al&&al.isRegExp,Ppr=zRe?Qp(zRe):FRe,YK=Ppr;function Opr(e){return e===void 0}var XK=Opr;var Rpr=32,eQ=eOe(function(e,t){var r=Em(t,f_(eQ));return JPe(e,Rpr,void 0,t,r)});eQ.placeholder={};var tQ=eQ;var Mpr="Expected a function";function $pr(e,t,r){var n=!0,i=!0;if(typeof e!="function")throw new TypeError(Mpr);return Aa(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),Cm(e,t,{leading:n,maxWait:t,trailing:i})}var rQ=$pr;var Qu=require("obsidian"),zI=Yt(Sn(),1);var tR=require("obsidian");var l5=/*#__PURE__*/function(_tR_Modal){_inherits(l51,_tR_Modal);function l51(r,n){_class_call_check(this,l51);var _this;_this=_call_super(this,l51,[r]);_this.tasks=n;C(_this,"confirmed",!1);C(_this,"selectedTasks",[]);_this.selectedTasks=new Array(n.length).fill(!0);return _this}_create_class(l51,[{key:"onOpen",value:function onOpen(){var _this=this;this.setTitle($.t("deleteConfirm.title"));var _this1=this,r=_this1.contentEl;r.empty();var n=r.createEl("p",{cls:"delete-confirm-instruction"});n.style.whiteSpace="pre-wrap",n.setText($.t("deleteConfirm.instruction"));var a=r.createDiv({cls:"ns-tjnmw4"}).createEl("table",{cls:"task-list-table"}),s=a.createEl("thead").createEl("tr"),l=s.createEl("th",{text:$.t("deleteConfirm.select")});l.style.textAlign="center",s.createEl("th",{text:$.t("deleteConfirm.filePath")});var c=a.createEl("tbody");this.tasks.forEach(function(u,p){var m=c.createEl("tr"),h=m.createEl("td");h.style.textAlign="center";var g=h.createEl("input");g.type="checkbox",g.checked=_this.selectedTasks[p],g.addEventListener("change",function(x){_this.selectedTasks[p]=g.checked,x.stopPropagation()}),m.addEventListener("click",function(x){x.target!==g&&(g.checked=!g.checked,_this.selectedTasks[p]=g.checked,x.stopPropagation())}),m.createEl("td",{text:u.localPath})});var d=r.createDiv();d.style.marginTop="1rem",new tR.Setting(d).addButton(function(u){u.setButtonText($.t("deleteConfirm.deleteAndReupload")).setCta().onClick(function(){_this.confirmed=!0,_this.close()})}).addButton(function(u){u.setButtonText($.t("deleteConfirm.skipForNow")).onClick(function(){_this.confirmed=!1,_this.close()})})}},{key:"open",value:function open(){var _this=this;var _this1=this,_superprop_get_open=function(){return _get(_get_prototype_of(l51.prototype),"open",_this)};return _async_to_generator(function(){var _this;return _ts_generator(this,function(_state){_this=this;return[2,(_superprop_get_open().call(_this1),new Promise(function(r){_this.onClose=function(){if(!_this.confirmed){r({tasksToDelete:[],tasksToReupload:[]});return}var n=_this.tasks.filter(function(a,o){return _this.selectedTasks[o]}),i=_this.tasks.filter(function(a,o){return!_this.selectedTasks[o]});r({tasksToDelete:n,tasksToReupload:i})}}))]})}).call(this)}}]);return l51}(tR.Modal);var rR=require("obsidian");var u5=/*#__PURE__*/function(_rR_Modal){_inherits(u51,_rR_Modal);function u51(r,n){_class_call_check(this,u51);var _this;_this=_call_super(this,u51,[r]);_this.failedTasks=n;return _this}_create_class(u51,[{key:"onOpen",value:function onOpen(){var _this=this;this.setTitle($.t("failedTasks.title"));var _this1=this,r=_this1.contentEl;r.empty(),r.createEl("p",{cls:"failed-tasks-instruction"}).setText($.t("failedTasks.instruction"));var a=r.createDiv({cls:"ns-tjnmw4"}).createEl("table",{cls:"task-list-table"}),s=a.createEl("thead").createEl("tr");s.createEl("th",{text:$.t("failedTasks.taskName")}),s.createEl("th",{text:$.t("failedTasks.localPath")}),s.createEl("th",{text:$.t("failedTasks.errorMessage")});var l=a.createEl("tbody");this.failedTasks.forEach(function(d){var u=l.createEl("tr");u.createEl("td",{text:d.taskName}),u.createEl("td",{text:d.localPath}),u.createEl("td",{text:d.errorMessage})});var c=r.createDiv();c.style.marginTop="1rem",new rR.Setting(c).addButton(function(d){d.setButtonText($.t("failedTasks.close")).setCta().onClick(function(){return _this.close()})})}},{key:"onClose",value:function onClose(){var _this=this,r=_this.contentEl;r.empty()}}]);return u51}(rR.Modal);var ON=require("obsidian");var BRe=require("obsidian"),nR=Yt(Sn(),1),mi=/*#__PURE__*/function(){function mi1(t){_class_call_check(this,mi1);this.options=t}_create_class(mi1,[{key:"vault",get:function get1(){return this.options.vault}},{key:"syncRecord",get:function get1(){return this.options.syncRecord}},{key:"webdav",get:function get1(){return this.options.webdav}},{key:"remoteBaseDir",get:function get1(){return this.options.remoteBaseDir}},{key:"remotePath",get:function get1(){return(0,nR.isAbsolute)(this.options.remotePath)?this.options.remotePath:(0,nR.join)(this.remoteBaseDir,this.options.remotePath)}},{key:"localPath",get:function get1(){return(0,BRe.normalizePath)(this.options.localPath)}},{key:"logger",get:function get1(){return this.options.logger}},{key:"toJSON",value:function toJSON(){var _this=this,t=_this.localPath,r=_this.remoteBaseDir,n=_this.remotePath;return{taskName:this.constructor.name,localPath:t,remoteBaseDir:r,remotePath:n}}}]);return mi1}(),wx=/*#__PURE__*/function(Error1){_inherits(wx1,Error1);function wx1(r,n,i){_class_call_check(this,wx1);var _this;_this=_call_super(this,wx1,[r]);_this.task=n;_this.cause=i;_this.name="TaskError";return _this}return wx1}(_wrap_native_super(Error));function Li(e,t){if(_instanceof(e,wx))return e;var r=_instanceof(e,Error)?e.message:String(e);return new wx(r,t,_instanceof(e,Error)?e:void 0)}var Ul=/*#__PURE__*/function(mi1){_inherits(Ul1,mi1);function Ul1(){_class_call_check(this,Ul1);return _call_super(this,Ul1,arguments)}_create_class(Ul1,[{key:"exec",value:function exec(){return _async_to_generator(function(){var t;return _ts_generator(this,function(_state){switch(_state.label){case 0:_state.trys.push([0,2,,3]);return[4,this.syncRecord.deleteFileRecord(this.localPath)];case 1:return[2,(_state.sent(),{success:!0,skipRecord:!0})];case 2:t=_state.sent();return[2,(this.logger.error(this,t),{success:!1,error:Li(t,this)})];case 3:return[2]}})}).call(this)}}]);return Ul1}(mi);function WRe(e){return _async_to_generator(function(){return _ts_generator(this,function(_state){return[2,crypto.subtle.digest("SHA-256",e)]})})()}function VRe(e){return _async_to_generator(function(){var t;return _ts_generator(this,function(_state){switch(_state.label){case 0:return[4,WRe(e)];case 1:t=_state.sent();return[2,Array.from(new Uint8Array(t)).map(function(i){return i.toString(16).padStart(2,"0")}).join("")]}})})()}function nQ(e){return _async_to_generator(function(){var t;return _ts_generator(this,function(_state){switch(_state.label){case 0:return[4,WRe(e)];case 1:t=_state.sent();return[2,J2(new Uint8Array(t),!1)]}})})()}var ZRe=Yt(HRe(),1);var Dpr=[/connection to indexeddb server lost/i,/connection to indexeddatabase server lost/i,/internal error opening backing store/i,/the database connection is closing/i];function qpr(e){if(!e)return!1;var t=e,r=typeof t.name=="string"?t.name:"",n=typeof t.message=="string"?t.message:typeof e=="string"?e:"",i="".concat(r," ").concat(n).trim();return i?Dpr.some(function(a){return a.test(i)}):!1}function Lpr(e){return(typeof e==="undefined"?"undefined":_type_of(e))=="object"&&e!==null&&"getFreshInstance"in e&&typeof e.getFreshInstance=="function"}function aQ(e){var m,h;var t=Lpr(e)?e:{getFreshInstance:function(){return e},maxRetries:0},r=t.getFreshInstance(),n=(m=t.shouldRecover)!=null?m:qpr,i=Math.max(0,(h=t.maxRetries)!=null?h:0);function a(g){return _async_to_generator(function(){var x,y,v;return _ts_generator(this,function(_state){switch(_state.label){case 0:y=0;_state.label=1;case 1:if(!(y<=i))return[3,6];_state.label=2;case 2:_state.trys.push([2,4,,5]);return[4,g(r)];case 3:return[2,_state.sent()];case 4:v=_state.sent();if(y===0&&(x=v),!(y>2;if(a>0){var o=new Uint32Array(r.buffer,r.byteOffset,a),s=new Uint32Array(n.buffer,n.byteOffset,a);for(var l=0;l2&&_arguments[2]!==void 0?_arguments[2]:!1;n=(0,ol.normalizePath)(t);if(!R_(e,n))return[3,5];return[4,e.adapter.stat(n)];case 1:a=_state.sent();if(!a)return[2];if(!(a.type==="folder"))return[3,3];return[4,e.adapter.rmdir(n,r)];case 2:_state.sent();return[2];case 3:return[4,e.adapter.remove(n)];case 4:_state.sent();return[2];case 5:i=e.getAbstractFileByPath(n);_tmp=i;if(!_tmp)return[3,7];return[4,e.trash(i,!1)];case 6:_tmp=_state.sent();_state.label=7;case 7:_tmp;return[2]}})}).apply(this,arguments)}var lR=Yt(Sn(),1);function ps(e,t){return _async_to_generator(function(){var r,n,_tmp,_tmp1,i,_tmp2,_tmp3,_tmp4;return _ts_generator(this,function(_state){switch(_state.label){case 0:r=[],n=(0,lR.normalize)(t);_tmp=!(n==="/"||n===".");if(!_tmp)return[3,2];return[4,Ru(e,n)];case 1:_tmp=!_state.sent();_state.label=2;case 2:if(!_tmp)return[3,16];_state.label=3;case 3:_tmp1=n!==""&&n!=="/"&&n!==".";if(!_tmp1)return[3,5];return[4,Ru(e,n)];case 4:_tmp1=!_state.sent();_state.label=5;case 5:if(!_tmp1)return[3,7];r.push(n),n=(0,lR.dirname)(n);_state.label=6;case 6:return[3,3];case 7:if(!r.length)return[3,16];i=r.pop();_tmp2=i;if(!_tmp2)return[3,14];return[4,Ru(e,i)];case 8:_tmp3=_state.sent();if(_tmp3)return[3,13];if(!oR(e,i))return[3,10];return[4,e.adapter.mkdir(i)];case 9:_tmp4=_state.sent();return[3,12];case 10:return[4,e.createFolder(i)];case 11:_tmp4=_state.sent();_state.label=12;case 12:_tmp3=_tmp4;_state.label=13;case 13:_tmp2=_tmp3;_state.label=14;case 14:_tmp2;_state.label=15;case 15:return[3,7];case 16:return[2]}})})()}function uR(e){return _async_to_generator(function(){return _ts_generator(this,function(_state){switch(_state.label){case 0:if(!!f5.Platform.isMobileApp)return[3,2];return[4,nfr(e)];case 1:_state.sent();return[2];case 2:return[4,ifr(e)];case 3:_state.sent();return[2]}})})()}function tfr(e){return _instanceof(e,ArrayBuffer)?e:ofr(e)}function rfr(e,t){var r=new ArrayBuffer(t),n=new Uint8Array(r),i=0;var _iteratorNormalCompletion=true,_didIteratorError=false,_iteratorError=undefined;try{for(var _iterator=e[Symbol.iterator](),_step;!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=true){var a=_step.value;n.set(new Uint8Array(a),i),i+=a.byteLength}}catch(err){_didIteratorError=true;_iteratorError=err}finally{try{if(!_iteratorNormalCompletion&&_iterator.return!=null){_iterator.return()}}finally{if(_didIteratorError){throw _iteratorError}}}if(i!==t)throw new Error("Remote Size Not Match!");return r}function nfr(_0){return _async_to_generator(function(param){var e,t,r,n,i,a,o;return _ts_generator(this,function(_state){switch(_state.label){case 0:e=param.vault,t=param.webdav,r=param.remotePath,n=param.localPath,i=param.remoteSize;return[4,t.getFileContents(r,{format:"binary",details:!1})];case 1:a=_state.sent(),o=tfr(a);if(o.byteLength!==i)throw new Error("Remote Size Not Match!");return[4,ps(e,(0,hQ.dirname)(n))];case 2:_state.sent();return[4,Ex(e,n,o)];case 3:_state.sent();return[2]}})}).apply(this,arguments)}function ifr(_0){return _async_to_generator(function(param){var e,t,r,n,i,a,m,o,s,l,c,d,u,p,_$h,g,x,y,_tmp,_tmp1,_tmp2,_tmp3,h,_tmp4;return _ts_generator(this,function(_state){switch(_state.label){case 0:e=param.vault,t=param.webdav,r=param.remotePath,n=param.localPath,i=param.remoteSize,a=param.mobileAppDownloadFileChunkSize;o=(0,f5.normalizePath)(n);return[4,ps(e,(0,hQ.dirname)(o))];case 1:if(!(_state.sent(),i===0))return[3,3];return[4,Ex(e,o,new ArrayBuffer(0))];case 2:_state.sent();return[2];case 3:s=(m=e.adapter.appendBinary)==null?void 0:m.bind(e.adapter),l=[],c=rMe(a),d=(0,f5.normalizePath)("".concat(o,".nutstore-sync-").concat(Date.now(),"-").concat(Math.random().toString(36).slice(2),".download")),u=0,p=0;$e.info("[ChunkedDownload] start ".concat(r," (").concat(i," bytes, chunkSize=").concat(c,")"));_state.label=4;case 4:_state.trys.push([4,23,,26]);_state.label=5;case 5:if(!(uu));p++);if(po&&(a.push({stable:!0,buffer:"o",bufferStart:o,bufferLength:l-o,bufferContent:t.slice(o,l)}),o=l)}for(;n.length;){var l=n.shift(),c=l.oStart,d=l.oStart+l.oLength,u=[l];for(s(c);n.length;){var p=n[0],m=p.oStart;if(m>d)break;d=Math.max(d,m+p.oLength),u.push(n.shift())}if(u.length===1){if(l.abLength>0){var p2=l.ab==="a"?e:r;a.push({stable:!0,buffer:l.ab,bufferStart:l.abStart,bufferLength:l.abLength,bufferContent:p2.slice(l.abStart,l.abStart+l.abLength)})}}else{var p3={a:[e.length,-1,t.length,-1],b:[r.length,-1,t.length,-1]};for(;u.length;){l=u.shift();var v=l.oStart,_=v+l.oLength,b=l.abStart,k=b+l.abLength,w=p3[l.ab];w[0]=Math.min(b,w[0]),w[1]=Math.max(k,w[1]),w[2]=Math.min(v,w[2]),w[3]=Math.max(_,w[3])}var m2=p3.a[0]+(c-p3.a[2]),h=p3.a[1]+(d-p3.a[3]),g=p3.b[0]+(c-p3.b[2]),x=p3.b[1]+(d-p3.b[3]),y={stable:!1,aStart:m2,aLength:h-m2,aContent:e.slice(m2,h),oStart:c,oLength:d-c,oContent:t.slice(c,d),bStart:g,bLength:x-g,bContent:r.slice(g,x)};a.push(y)}o=d}return s(t.length),a}function xQ(e,t,r,n){n=Object.assign({excludeFalseConflicts:!0,stringSeparator:/\s+/},n),typeof e=="string"&&(e=e.split(n.stringSeparator)),typeof t=="string"&&(t=t.split(n.stringSeparator)),typeof r=="string"&&(r=r.split(n.stringSeparator));var a=[],o=lfr(e,t,r),s=[];function l(){s.length&&a.push({ok:s}),s=[]}function c(d,u){if(d.length!==u.length)return!1;for(var p=0;pt?e:t},OCn=Number.isNaN;var gR=function(e){return e!==0?e<0:1/e<0};var q_=Number.MAX_SAFE_INTEGER,yQ=Number.MIN_SAFE_INTEGER,RCn=1<<31;var dMe=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&ll(e)===e},MCn=Number.isNaN,$Cn=Number.parseInt;var bQ=String.fromCharCode,ufr=String.fromCodePoint,NCn=bQ(65535),cfr=function(e){return e.toLowerCase()},dfr=/^\s*/g,pfr=function(e){return e.replace(dfr,"")},ffr=/([A-Z])/g,wQ=function(e,t){return pfr(e.replace(ffr,function(r){return"".concat(t).concat(cfr(r))}))};var mfr=function(e){var t=unescape(encodeURIComponent(e)),r=t.length,n=new Uint8Array(r);for(var i=0;i127;)Vo(e,128|127&t),t=ll(t/128);Vo(e,127&t)},_R=function(e,t){var r=gR(t);for(r&&(t=-t),Vo(e,(t>63?128:0)|(r?64:0)|63&t),t=ll(t/64);t>0;)Vo(e,(t>127?128:0)|127&t),t=ll(t/128)},SQ=new Uint8Array(3e4),vfr=SQ.length/3,yfr=function(e,t){if(t.length0&&(e.bufs.push(e.cbuf),e.cbuf=new Uint8Array(Om(r*2,a)),e.cbuf.set(t.subarray(i)),e.cpos=a)},Bl=function(e,t){hn(e,t.byteLength),_5(e,t)},kQ=function(e,t){xfr(e,t);var r=new DataView(e.cbuf.buffer,e.cpos,t);return e.cpos+=t,r},bfr=function(e,t){return kQ(e,4).setFloat32(0,t,!1)},wfr=function(e,t){return kQ(e,8).setFloat64(0,t,!1)},Sfr=function(e,t){return kQ(e,8).setBigInt64(0,t,!1)};var hMe=new DataView(new ArrayBuffer(4)),kfr=function(e){return hMe.setFloat32(0,e),hMe.getFloat32(0)===e},j_=function(e,t){switch(typeof t==="undefined"?"undefined":_type_of(t)){case"string":Vo(e,119),Ax(e,t);break;case"number":dMe(t)&&Ix(t)<=0x7fffffff?(Vo(e,125),_R(e,t)):kfr(t)?(Vo(e,124),bfr(e,t)):(Vo(e,123),wfr(e,t));break;case"bigint":Vo(e,122),Sfr(e,t);break;case"object":if(t===null)Vo(e,126);else if(Tx(t)){Vo(e,117),hn(e,t.length);for(var r=0;r0&&hn(this,this.count-1),this.count=1,this.w(this,t),this.s=t)}}]);return v51}(Cx);var gMe=function(e){e.count>0&&(_R(e.encoder,e.count===1?e.s:-e.s),e.count>1&&hn(e.encoder,e.count-2))},Px=/*#__PURE__*/function(){function Px1(){_class_call_check(this,Px1);this.encoder=new Cx,this.s=0,this.count=0}_create_class(Px1,[{key:"write",value:function write(t){this.s===t?this.count++:(gMe(this),this.count=1,this.s=t)}},{key:"toUint8Array",value:function toUint8Array(){return gMe(this),Od(this.encoder)}}]);return Px1}();var xMe=function(e){if(e.count>0){var t=e.diff*2+(e.count===1?0:1);_R(e.encoder,t),e.count>1&&hn(e.encoder,e.count-2)}},U_=/*#__PURE__*/function(){function U_1(){_class_call_check(this,U_1);this.encoder=new Cx,this.s=0,this.count=0,this.diff=0}_create_class(U_1,[{key:"write",value:function write(t){this.diff===t-this.s?(this.s=t,this.count++):(xMe(this),this.count=1,this.diff=t-this.s,this.s=t)}},{key:"toUint8Array",value:function toUint8Array(){return xMe(this),Od(this.encoder)}}]);return U_1}(),vR=/*#__PURE__*/function(){function vR1(){_class_call_check(this,vR1);this.sarr=[],this.s="",this.lensE=new Px}_create_class(vR1,[{key:"write",value:function write(t){this.s+=t,this.s.length>19&&(this.sarr.push(this.s),this.s=""),this.lensE.write(t.length)}},{key:"toUint8Array",value:function toUint8Array(){var t=new Cx;return this.sarr.push(this.s),this.s="",Ax(t,this.sarr.join("")),_5(t,this.lensE.toUint8Array()),Od(t)}}]);return vR1}();var Mu=function(e){return new Error(e)},$u=function(){throw Mu("Method unimplemented")},Wl=function(){throw Mu("Unexpected case")};var vMe=Mu("Unexpected end of array"),yMe=Mu("Integer out of Range"),B_=function B_1(t){_class_call_check(this,B_1);this.arr=t,this.pos=0},$x=function(e){return new B_(e)},_Me=function(e){return e.pos!==e.arr.length};var Tfr=function(e,t){var r=new Uint8Array(e.arr.buffer,e.pos+e.arr.byteOffset,t);return e.pos+=t,r},Vl=function(e){return Tfr(e,rn(e))};var Ox=function(e){return e.arr[e.pos++]};var rn=function(e){var t=0,r=1,n=e.arr.length;for(;e.posq_)throw yMe}throw vMe},wR=function(e){var t=e.arr[e.pos++],r=t&63,n=64,i=(t&64)>0?-1:1;if(!(t&128))return i*r;var a=e.arr.length;for(;e.posq_)throw yMe}throw vMe};var Ifr=function(e){var t=rn(e);if(t===0)return"";{var r=String.fromCodePoint(Ox(e));if(--t<100)for(;t--;)r+=String.fromCodePoint(Ox(e));else for(;t>0;){var n=t<1e4?t:1e4,i=e.arr.subarray(e.pos,e.pos+n);e.pos+=n,r+=String.fromCodePoint.apply(null,i),t-=n}return decodeURIComponent(escape(r))}},Cfr=function(e){return L_.decode(Vl(e))},Rx=L_?Cfr:Ifr;var TQ=function(e,t){var r=new DataView(e.arr.buffer,e.arr.byteOffset+e.pos,t);return e.pos+=t,r},Afr=function(e){return TQ(e,4).getFloat32(0,!1)},Pfr=function(e){return TQ(e,8).getFloat64(0,!1)},Ofr=function(e){return TQ(e,8).getBigInt64(0,!1)};var Rfr=[function(e){},function(e){return null},wR,Afr,Pfr,Ofr,function(e){return!1},function(e){return!0},Rx,function(e){var t=rn(e),r={};for(var n=0;n>e/4).toString(16)})};var SMe=Date.now;var CQ=function(e){return new Promise(e)};var jCn=Promise.all.bind(Promise);var AQ=function(e){return e===void 0?null:e};var PQ=/*#__PURE__*/function(){function PQ1(){_class_call_check(this,PQ1);this.map=new Map}_create_class(PQ1,[{key:"setItem",value:function setItem(t,r){this.map.set(t,r)}},{key:"getItem",value:function getItem(t){return this.map.get(t)}}]);return PQ1}(),kMe=new PQ,Ffr=!0;try{typeof localStorage!="undefined"&&localStorage&&(kMe=localStorage,Ffr=!1)}catch(e){}var EMe=kMe;var Nx=Symbol("Equality"),SR=function(e,t){var r;return e===t||!!((r=e==null?void 0:e[Nx])!=null&&r.call(e,t))||!1};var TMe=function(e){return(typeof e==="undefined"?"undefined":_type_of(e))=="object"},IMe=Object.assign,jfr=Object.keys;var CMe=function(e,t){for(var r in e)t(e[r],r)};var w5=function(e){return jfr(e).length};var AMe=function(e){for(var t in e)return!1;return!0},G_=function(e,t){for(var r in e)if(!t(e[r],r))return!1;return!0},S5=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},RQ=function(e,t){return e===t||w5(e)===w5(t)&&G_(e,function(r,n){return(r!==void 0||S5(t,n))&&SR(t[n],r)})},Ufr=Object.freeze,MQ=function(e){for(var t in e){var r=e[t];((typeof r==="undefined"?"undefined":_type_of(r))=="object"||typeof r=="function")&&MQ(e[t])}return Ufr(e)};var E5=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;try{var _e1;for(;r=.5},kR=function(e,t,r){return ll(e.next()*(r+1-t)+t)};var zQ=function(e,t,r){return ll(e.next()*(r+1-t)+t)};var jQ=function(e,t,r){return zQ(e,t,r)};var Kfr=function(e){return bQ(jQ(e,97,122))},DMe=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:20;var n=jQ(e,t,r),i="";for(var a=0;a3&&arguments[3]!==void 0?arguments[3]:null;this._rerrs.push({path:t,expected:r,has:n,message:i})}},{key:"toString",value:function toString(){var t=[];for(var r=this._rerrs.length-1;r>0;r--){var n=this._rerrs[r];t.push(fMe(" ",(this._rerrs.length-r)*2)+"".concat(n.path!=null?"[".concat(n.path,"] "):"").concat(n.has," doesn't match ").concat(n.expected,". ").concat(n.message))}return t.join("\n")}}]);return UQ1}(),BQ=function(e,t){return e===t?!0:e==null||t==null||e.constructor!==t.constructor?!1:e[Nx]?SR(e,t):Tx(e)?pR(e,function(r){return fR(t,function(n){return BQ(r,n)})}):TMe(e)?G_(e,function(r,n){return BQ(r,t[n])}):!1},Go=/*#__PURE__*/function(){function Go1(){_class_call_check(this,Go1)}_create_class(Go1,[{key:"extends",value:function _extends(t){var _ref=[this.shape,t.shape],r=_ref[0],n=_ref[1];var ref;return this.constructor._dilutes&&(ref=[r,n],n=ref[0],r=ref[1],ref),BQ(r,n)}},{key:"equals",value:function equals(t){return this.constructor===t.constructor&&k5(this.shape,t.shape)}},{key:Jfr,value:function value(){return!0}},{key:Nx,value:function value(t){return this.equals(t)}},{key:"validate",value:function validate(t){return this.check(t)}},{key:"check",value:function check(t,r){$u()}},{key:"nullable",get:function get1(){return Y_(this,DR)}},{key:"optional",get:function get1(){return new TR(this)}},{key:"cast",value:function cast(t){return qMe(t,this),t}},{key:"expect",value:function expect(t){return qMe(t,this),t}}]);return Go1}();C(Go,"_dilutes",!1);var A5=/*#__PURE__*/function(Go1){_inherits(A51,Go1);function A51(t,r){_class_call_check(this,A51);var _this;_this=_call_super(this,A51),_this.shape=t,_this._c=r;return _this}_create_class(A51,[{key:"check",value:function check(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:void 0;var n=(t==null?void 0:t.constructor)===this.shape&&(this._c==null||this._c(t));return!n&&(r==null||r.extend(null,this.shape.name,t==null?void 0:t.constructor.name,(t==null?void 0:t.constructor)!==this.shape?"Constructor match failed":"Check failed")),n}}]);return A51}(Go),Ja=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return new A5(e,t)},WCn=Ja(A5),P5=/*#__PURE__*/function(Go1){_inherits(P51,Go1);function P51(t){_class_call_check(this,P51);var _this;_this=_call_super(this,P51),_this.shape=t;return _this}_create_class(P51,[{key:"check",value:function check(t,r){var n=this.shape(t);return!n&&(r==null||r.extend(null,"custom prop",t==null?void 0:t.constructor.name,"failed to check custom prop")),n}}]);return P51}(Go),wo=function(e){return new P5(e)},VCn=Ja(P5),Q_=/*#__PURE__*/function(Go1){_inherits(Q_1,Go1);function Q_1(t){_class_call_check(this,Q_1);var _this;_this=_call_super(this,Q_1),_this.shape=t;return _this}_create_class(Q_1,[{key:"check",value:function check(t,r){var n=this.shape.some(function(i){return i===t});return!n&&(r==null||r.extend(null,this.shape.join(" | "),t.toString())),n}}]);return Q_1}(Go),$R=function(){for(var _len=arguments.length,e=new Array(_len),_key=0;_key<_len;_key++){e[_key]=arguments[_key]}return new Q_(e)},LMe=Ja(Q_),Yfr=RegExp.escape||function(e){return e.replace(/[().|&,$^[\]]/g,function(t){return"\\"+t})},FMe=function(e){if(J_.check(e))return[Yfr(e)];if(LMe.check(e))return e.shape.map(function(t){return t+""});if(WMe.check(e))return["[+-]?\\d+.?\\d*"];if(VMe.check(e))return[".*"];if(RR.check(e))return e.shape.map(FMe).flat(1);Wl()},WQ=/*#__PURE__*/function(Go1){_inherits(WQ1,Go1);function WQ1(t){_class_call_check(this,WQ1);var _this;_this=_call_super(this,WQ1),_this.shape=t,_this._r=new RegExp("^"+t.map(FMe).map(function(r){return"(".concat(r.join("|"),")")}).join("")+"$");return _this}_create_class(WQ1,[{key:"check",value:function check(t,r){var n=this._r.exec(t)!=null;return!n&&(r==null||r.extend(null,this._r.toString(),t.toString(),"String doesn't match string template.")),n}}]);return WQ1}(Go);var GCn=Ja(WQ),Xfr=Symbol("optional"),TR=/*#__PURE__*/function(Go1){_inherits(TR1,Go1);function TR1(t){_class_call_check(this,TR1);var _this;_this=_call_super(this,TR1),_this.shape=t;return _this}_create_class(TR1,[{key:"check",value:function check(t,r){var n=t===void 0||this.shape.check(t);return!n&&(r==null||r.extend(null,"undefined (optional)","()")),n}},{key:Xfr,get:function get1(){return!0}}]);return TR1}(Go),emr=Ja(TR),IR=/*#__PURE__*/function(Go1){_inherits(IR1,Go1);function IR1(){_class_call_check(this,IR1);return _call_super(this,IR1,arguments)}_create_class(IR1,[{key:"check",value:function check(t,r){return r==null||r.extend(null,"never",typeof t==="undefined"?"undefined":_type_of(t)),!1}}]);return IR1}(Go),HCn=new IR,ZCn=Ja(IR),KQ=/*#__PURE__*/function(Go1){_inherits(KQ1,Go1);function KQ1(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;_class_call_check(this,KQ1);var _this;_this=_call_super(this,KQ1),_this.shape=t,_this._isPartial=r;return _this}_create_class(KQ1,[{key:"partial",get:function get1(){return new KQ(this.shape,!0)}},{key:"check",value:function check(t,r){var _this=this;return t==null?(r==null||r.extend(null,"object","null"),!1):G_(this.shape,function(n,i){var a=_this._isPartial&&!S5(t,i)||n.check(t[i],r);return!a&&(r==null||r.extend(i.toString(),n.toString(),_type_of(t[i]),"Object property does not match")),a})}}]);return KQ1}(Go),C5=KQ;C(C5,"_dilutes",!0);var tmr=function(e){return new C5(e)},rmr=Ja(C5),nmr=wo(function(e){return e!=null&&(e.constructor===Object||e.constructor==null)}),CR=/*#__PURE__*/function(Go1){_inherits(CR1,Go1);function CR1(t,r){_class_call_check(this,CR1);var _this;_this=_call_super(this,CR1),_this.shape={keys:t,values:r};return _this}_create_class(CR1,[{key:"check",value:function check(t,r){var _this=this;return t!=null&&G_(t,function(n,i){var a=_this.shape.keys.check(i,r);return!a&&(r==null||r.extend(i+"","Record",typeof t==="undefined"?"undefined":_type_of(t),a?"Key doesn't match schema":"Value doesn't match value")),a&&_this.shape.values.check(n,r)})}}]);return CR1}(Go),zMe=function(e,t){return new CR(e,t)},imr=Ja(CR),AR=/*#__PURE__*/function(Go1){_inherits(AR1,Go1);function AR1(t){_class_call_check(this,AR1);var _this;_this=_call_super(this,AR1),_this.shape=t;return _this}_create_class(AR1,[{key:"check",value:function check(t,r){return t!=null&&G_(this.shape,function(n,i){var a=n.check(t[i],r);return!a&&(r==null||r.extend(i.toString(),"Tuple",typeof n==="undefined"?"undefined":_type_of(n))),a})}}]);return AR1}(Go),amr=function(){for(var _len=arguments.length,e=new Array(_len),_key=0;_key<_len;_key++){e[_key]=arguments[_key]}return new AR(e)},KCn=Ja(AR),PR=/*#__PURE__*/function(Go1){_inherits(PR1,Go1);function PR1(t){_class_call_check(this,PR1);var _this;_this=_call_super(this,PR1),_this.shape=t.length===1?t[0]:new Z_(t);return _this}_create_class(PR1,[{key:"check",value:function check(t,r){var _this=this;var n=Tx(t)&&pR(t,function(i){return _this.shape.check(i)});return!n&&(r==null||r.extend(null,"Array","")),n}}]);return PR1}(Go),jMe=function(){for(var _len=arguments.length,e=new Array(_len),_key=0;_key<_len;_key++){e[_key]=arguments[_key]}return new PR(e)},omr=Ja(PR),smr=wo(function(e){return Tx(e)}),OR=/*#__PURE__*/function(Go1){_inherits(OR1,Go1);function OR1(t,r){_class_call_check(this,OR1);var _this;_this=_call_super(this,OR1),_this.shape=t,_this._c=r;return _this}_create_class(OR1,[{key:"check",value:function check(t,r){var n=_instanceof(t,this.shape)&&(this._c==null||this._c(t));return!n&&(r==null||r.extend(null,this.shape.name,t==null?void 0:t.constructor.name)),n}}]);return OR1}(Go),lmr=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return new OR(e,t)},QCn=Ja(OR),umr=lmr(Go),VQ=/*#__PURE__*/function(Go1){_inherits(VQ1,Go1);function VQ1(t){_class_call_check(this,VQ1);var _this;_this=_call_super(this,VQ1),_this.len=t.length-1,_this.args=amr.apply(void 0,_to_consumable_array(t.slice(-1))),_this.res=t[_this.len];return _this}_create_class(VQ1,[{key:"check",value:function check(t,r){var n=t.constructor===Function&&t.length<=this.len;return!n&&(r==null||r.extend(null,"function",typeof t==="undefined"?"undefined":_type_of(t))),n}}]);return VQ1}(Go);var cmr=Ja(VQ),dmr=wo(function(e){return typeof e=="function"}),GQ=/*#__PURE__*/function(Go1){_inherits(GQ1,Go1);function GQ1(t){_class_call_check(this,GQ1);var _this;_this=_call_super(this,GQ1),_this.shape=t;return _this}_create_class(GQ1,[{key:"check",value:function check(t,r){var n=pR(this.shape,function(i){return i.check(t,r)});return!n&&(r==null||r.extend(null,"Intersectinon",typeof t==="undefined"?"undefined":_type_of(t))),n}}]);return GQ1}(Go);var JCn=Ja(GQ,function(e){return e.shape.length>0}),Z_=/*#__PURE__*/function(Go1){_inherits(Z_1,Go1);function Z_1(t){_class_call_check(this,Z_1);var _this;_this=_call_super(this,Z_1),_this.shape=t;return _this}_create_class(Z_1,[{key:"check",value:function check(t,r){var n=fR(this.shape,function(i){return i.check(t,r)});return r==null||r.extend(null,"Union",typeof t==="undefined"?"undefined":_type_of(t)),n}}]);return Z_1}(Go);C(Z_,"_dilutes",!0);var Y_=function(){for(var _len=arguments.length,e=new Array(_len),_key=0;_key<_len;_key++){e[_key]=arguments[_key]}return e.findIndex(function(t){return RR.check(t)})>=0?Y_.apply(void 0,_to_consumable_array(e.map(function(t){return O5(t)}).map(function(t){return RR.check(t)?t.shape:[t]}).flat(1))):e.length===1?e[0]:new Z_(e)},RR=Ja(Z_),UMe=function(){return!0},MR=wo(UMe),pmr=Ja(P5,function(e){return e.shape===UMe}),ZQ=wo(function(e){return(typeof e==="undefined"?"undefined":_type_of(e))=="bigint"}),fmr=wo(function(e){return e===ZQ}),BMe=wo(function(e){return(typeof e==="undefined"?"undefined":_type_of(e))=="symbol"}),YCn=wo(function(e){return e===BMe}),K_=wo(function(e){return typeof e=="number"}),WMe=wo(function(e){return e===K_}),J_=wo(function(e){return typeof e=="string"}),VMe=wo(function(e){return e===J_}),NR=wo(function(e){return typeof e=="boolean"}),mmr=wo(function(e){return e===NR}),GMe=$R(void 0),XCn=Ja(Q_,function(e){return e.shape.length===1&&e.shape[0]===void 0}),eAn=$R(void 0);var DR=$R(null),hmr=Ja(Q_,function(e){return e.shape.length===1&&e.shape[0]===null}),tAn=Ja(Uint8Array),rAn=Ja(A5,function(e){return e.shape===Uint8Array}),gmr=Y_(K_,J_,DR,GMe,ZQ,NR,BMe),nAn=function(){var e=jMe(MR),t=zMe(J_,MR),r=Y_(K_,J_,DR,NR,e,t);return e.shape=r,t.shape.values=r,r}(),O5=function(e){if(umr.check(e))return e;if(nmr.check(e)){var t={};for(var r in e)t[r]=O5(e[r]);return tmr(t)}else{if(smr.check(e))return Y_.apply(void 0,_to_consumable_array(e.map(O5)));if(gmr.check(e))return $R(e);if(dmr.check(e))return Ja(e)}Wl()},qMe=MMe?function(){}:function(e,t){var r=new UQ;if(!t.check(e,r))throw Mu("Expected value to be of type ".concat(t.constructor.name,".\n").concat(r.toString()))},HQ=/*#__PURE__*/function(){function HQ1(t){_class_call_check(this,HQ1);this.patterns=[],this.$state=t}_create_class(HQ1,[{key:"if",value:function _if(t,r){return this.patterns.push({if:O5(t),h:r}),this}},{key:"else",value:function _else(t){return this.if(MR,t)}},{key:"done",value:function done(){var _this=this;return function(t,r){for(var n=0;n<_this.patterns.length;n++){var i=_this.patterns[n];if(i.if.check(t))return i.h(t,r)}throw Mu("Unhandled pattern")}}}]);return HQ1}(),xmr=function(e){return new HQ(e)},HMe=xmr(MR).if(WMe,function(e,t){return kR(t,yQ,q_)}).if(VMe,function(e,t){return DMe(t)}).if(mmr,function(e,t){return FQ(t)}).if(fmr,function(e,t){return BigInt(kR(t,yQ,q_))}).if(RR,function(e,t){return H_(t,ER(t,e.shape))}).if(rmr,function(e,t){var r={};for(var n in e.shape){var i=e.shape[n];if(emr.check(i)){if(FQ(t))continue;i=i.shape}r[n]=HMe(i,t)}return r}).if(omr,function(e,t){var r=[],n=zQ(t,0,42);for(var i=0;i0&&r.push(t.join(""));n0||c.length>0?(t.push("%c"+s),r.push(c)):t.push(s)}else break}}for(a>0&&(i=r,i.unshift(t.join("")));a=a.clock?t[n-1]=new tb(i.clock,Om(i.len,a.clock+a.len-i.clock)):(n0&&t.clients.set(n,i)}),t},ob=function(e,t){hn(e.restEncoder,t.clients.size),rf(t.clients.entries()).sort(function(r,n){return n[0]-r[0]}).forEach(function(param){var _param=_sliced_to_array(param,2),r=_param[0],n=_param[1];e.resetDsCurVal(),hn(e.restEncoder,r);var i=n.length;hn(e.restEncoder,i);for(var a=0;a0){var o=tf(t.clients,i,function(){return[]});for(var s=0;s0){var a2=new Rm;return hn(a2.restEncoder,0),ob(a2,n),a2.toUint8Array()}return null};var v$e=IQ,Rd=/*#__PURE__*/function(mR1){_inherits(Rd1,mR1);function Rd1(){var _ref=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},tmp=_ref.guid,t=tmp===void 0?wMe():tmp,tmp1=_ref.collectionid,r=tmp1===void 0?null:tmp1,tmp2=_ref.gc,n=tmp2===void 0?!0:tmp2,tmp3=_ref.gcFilter,i=tmp3===void 0?function(){return!0}:tmp3,tmp4=_ref.meta,a=tmp4===void 0?null:tmp4,tmp5=_ref.autoLoad,o=tmp5===void 0?!1:tmp5,tmp6=_ref.shouldLoad,s=tmp6===void 0?!0:tmp6;_class_call_check(this,Rd1);var _this;_this=_call_super(this,Rd1),_this.gc=n,_this.gcFilter=i,_this.clientID=v$e(),_this.guid=t,_this.collectionid=r,_this.share=new Map,_this.store=new ZR,_this._transaction=null,_this._transactionCleanups=[],_this.subdocs=new Set,_this._item=null,_this.shouldLoad=s,_this.autoLoad=o,_this.meta=a,_this.isLoaded=!1,_this.isSynced=!1,_this.isDestroyed=!1,_this.whenLoaded=CQ(function(c){_this.on("load",function(){_this.isLoaded=!0,c(_this)})});var l=function(){return CQ(function(c){var d=function(u){(u===void 0||u===!0)&&(_this.off("sync",d),c())};_this.on("sync",d)})};_this.on("sync",function(c){c===!1&&_this.isSynced&&(_this.whenSynced=l()),_this.isSynced=c===void 0||c===!0,_this.isSynced&&!_this.isLoaded&&_this.emit("load",[_this])}),_this.whenSynced=l();return _this}_create_class(Rd1,[{key:"load",value:function load(){var _this=this;var t=this._item;t!==null&&!this.shouldLoad&&zi(t.parent.doc,function(r){r.subdocsLoaded.add(_this)},null,!0),this.shouldLoad=!0}},{key:"getSubdocs",value:function getSubdocs(){return this.subdocs}},{key:"getSubdocGuids",value:function getSubdocGuids(){return new Set(rf(this.subdocs).map(function(t){return t.guid}))}},{key:"transact",value:function transact(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return zi(this,t,r)}},{key:"get",value:function get1(t){var _this=this;var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:So;var n=tf(this.share,t,function(){var a=new r;return a._integrate(_this,null),a}),i=n.constructor;if(r!==So&&i!==r)if(i===So){var a=new r;a._map=n._map,n._map.forEach(function(o){for(;o!==null;o=o.left)o.parent=a}),a._start=n._start;for(var o=a._start;o!==null;o=o.right)o.parent=a;return a._length=n._length,this.share.set(t,a),a._integrate(this,null),a}else throw new Error("Type with the name ".concat(t," has already been defined with a different constructor"));return n}},{key:"getArray",value:function getArray(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return this.get(t,B0)}},{key:"getText",value:function getText(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return this.get(t,H0)}},{key:"getMap",value:function getMap(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return this.get(t,G0)}},{key:"getXmlElement",value:function getXmlElement(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return this.get(t,Z0)}},{key:"getXmlFragment",value:function getXmlFragment(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return this.get(t,Mm)}},{key:"toJSON",value:function toJSON(){var t={};return this.share.forEach(function(r,n){t[n]=r.toJSON()}),t}},{key:"destroy",value:function destroy(){var _this=this;this.isDestroyed=!0,rf(this.subdocs).forEach(function(r){return r.destroy()});var t=this._item;if(t!==null){this._item=null;var r=t.content;r.doc=new Rd(_object_spread_props(_object_spread({guid:this.guid},r.opts),{shouldLoad:!1})),r.doc._item=t,zi(t.parent.doc,function(n){var i=r.doc;t.deleted||n.subdocsAdded.add(i),n.subdocsRemoved.add(_this)},null,!0)}this.emit("destroyed",[!0]),this.emit("destroy",[this]),_get(_get_prototype_of(Rd1.prototype),"destroy",this).call(this)}}]);return Rd1}(mR),WR=/*#__PURE__*/function(){function WR1(t){_class_call_check(this,WR1);this.restDecoder=t}_create_class(WR1,[{key:"resetDsCurVal",value:function resetDsCurVal(){}},{key:"readDsClock",value:function readDsClock(){return rn(this.restDecoder)}},{key:"readDsLen",value:function readDsLen(){return rn(this.restDecoder)}}]);return WR1}(),VR=/*#__PURE__*/function(WR1){_inherits(VR1,WR1);function VR1(){_class_call_check(this,VR1);return _call_super(this,VR1,arguments)}_create_class(VR1,[{key:"readLeftID",value:function readLeftID(){return Tn(rn(this.restDecoder),rn(this.restDecoder))}},{key:"readRightID",value:function readRightID(){return Tn(rn(this.restDecoder),rn(this.restDecoder))}},{key:"readClient",value:function readClient(){return rn(this.restDecoder)}},{key:"readInfo",value:function readInfo(){return Ox(this.restDecoder)}},{key:"readString",value:function readString(){return Rx(this.restDecoder)}},{key:"readParentInfo",value:function readParentInfo(){return rn(this.restDecoder)===1}},{key:"readTypeRef",value:function readTypeRef(){return rn(this.restDecoder)}},{key:"readLen",value:function readLen(){return rn(this.restDecoder)}},{key:"readAny",value:function readAny(){return W_(this.restDecoder)}},{key:"readBuf",value:function readBuf(){return NMe(Vl(this.restDecoder))}},{key:"readJSON",value:function readJSON(){return JSON.parse(Rx(this.restDecoder))}},{key:"readKey",value:function readKey(){return Rx(this.restDecoder)}}]);return VR1}(WR),nJ=/*#__PURE__*/function(){function nJ1(t){_class_call_check(this,nJ1);this.dsCurrVal=0,this.restDecoder=t}_create_class(nJ1,[{key:"resetDsCurVal",value:function resetDsCurVal(){this.dsCurrVal=0}},{key:"readDsClock",value:function readDsClock(){return this.dsCurrVal+=rn(this.restDecoder),this.dsCurrVal}},{key:"readDsLen",value:function readDsLen(){var t=rn(this.restDecoder)+1;return this.dsCurrVal+=t,t}}]);return nJ1}(),W0=/*#__PURE__*/function(nJ1){_inherits(W01,nJ1);function W01(t){_class_call_check(this,W01);var _this;_this=_call_super(this,W01,[t]),_this.keys=[],rn(t),_this.keyClockDecoder=new V_(Vl(t)),_this.clientDecoder=new Mx(Vl(t)),_this.leftClockDecoder=new V_(Vl(t)),_this.rightClockDecoder=new V_(Vl(t)),_this.infoDecoder=new b5(Vl(t),Ox),_this.stringDecoder=new bR(Vl(t)),_this.parentInfoDecoder=new b5(Vl(t),Ox),_this.typeRefDecoder=new Mx(Vl(t)),_this.lenDecoder=new Mx(Vl(t));return _this}_create_class(W01,[{key:"readLeftID",value:function readLeftID(){return new U0(this.clientDecoder.read(),this.leftClockDecoder.read())}},{key:"readRightID",value:function readRightID(){return new U0(this.clientDecoder.read(),this.rightClockDecoder.read())}},{key:"readClient",value:function readClient(){return this.clientDecoder.read()}},{key:"readInfo",value:function readInfo(){return this.infoDecoder.read()}},{key:"readString",value:function readString(){return this.stringDecoder.read()}},{key:"readParentInfo",value:function readParentInfo(){return this.parentInfoDecoder.read()===1}},{key:"readTypeRef",value:function readTypeRef(){return this.typeRefDecoder.read()}},{key:"readLen",value:function readLen(){return this.lenDecoder.read()}},{key:"readAny",value:function readAny(){return W_(this.restDecoder)}},{key:"readBuf",value:function readBuf(){return Vl(this.restDecoder)}},{key:"readJSON",value:function readJSON(){return W_(this.restDecoder)}},{key:"readKey",value:function readKey(){var t=this.keyClockDecoder.read();if(ti&&n.set(a,i)}),XR(t).forEach(function(i,a){r.has(a)||n.set(a,0)}),hn(e.restEncoder,n.size),rf(n.entries()).sort(function(i,a){return a[0]-i[0]}).forEach(function(param){var _param=_sliced_to_array(param,2),i=_param[0],a=_param[1];Nmr(e,t.clients.get(i),i,a)})},Dmr=function(e,t){var r=sl(),n=rn(e.restDecoder);for(var i=0;i0)m=r.get(i[i.length-1]);else return null;return m},o=a();if(o===null)return null;var s=new ZR,l=new Map,c=function(m,h){var g=l.get(m);(g==null||g>h)&&l.set(m,h)},d=o.refs[o.i++],u=new Map,p=function(){var _iteratorNormalCompletion=true,_didIteratorError=false,_iteratorError=undefined;try{var _loop=function(){var m=_step.value;var h=m.id.client,g=r.get(h);g?(g.i--,s.clients.set(h,g.refs.slice(g.i)),r.delete(h),g.i=0,g.refs=[]):s.clients.set(h,[m]),i=i.filter(function(x){return x!==h})};for(var _iterator=n[Symbol.iterator](),_step;!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=true)_loop()}catch(err){_didIteratorError=true;_iteratorError=err}finally{try{if(!_iteratorNormalCompletion&&_iterator.return!=null){_iterator.return()}}finally{if(_didIteratorError){throw _iteratorError}}}n.length=0};for(;;){if(d.constructor!==Hl){var h=tf(u,d.id.client,function(){return Ho(t,d.id.client)})-d.id.clock;if(h<0)n.push(d),c(d.id.client,d.id.clock-1),p();else{var g=d.getMissing(e,t);if(g!==null){n.push(d);var x=r.get(g)||{refs:[],i:0};if(x.refs.length===x.i)c(g,Ho(t,g)),p();else{d=x.refs[x.i++];continue}}else(h===0||h0)d=n.pop();else if(o!==null&&o.i0){var m=new Rm;return xJ(m,s,new Map),hn(m.restEncoder,0),{missing:l,update:m.toUint8Array()}}return null},Lmr=function(e,t){return xJ(e,t.doc.store,t.beforeState)},Fmr=function(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:new W0(e);return zi(t,function(i){i.local=!1;var a=!1,o=i.doc,s=o.store,l=Dmr(n,o),c=qmr(i,s,l),d=s.pendingStructs;if(d){var _iteratorNormalCompletion=true,_didIteratorError=false,_iteratorError=undefined;try{for(var _iterator=d.missing[Symbol.iterator](),_step;!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=true){var _step_value=_sliced_to_array(_step.value,2),p=_step_value[0],m=_step_value[1];if(mm2)&&d.missing.set(p2,m2)}}catch(err){_didIteratorError1=true;_iteratorError1=err}finally{try{if(!_iteratorNormalCompletion1&&_iterator1.return!=null){_iterator1.return()}}finally{if(_didIteratorError1){throw _iteratorError1}}}d.update=KR([d.update,c.update])}}else s.pendingStructs=c;var u=i$e(n,i,s);if(s.pendingDs){var p3=new W0($x(s.pendingDs));rn(p3.restDecoder);var m3=i$e(p3,i,s);u&&m3?s.pendingDs=KR([u,m3]):s.pendingDs=u||m3}else s.pendingDs=u;if(a){var p9=s.pendingStructs.update;s.pendingStructs=null,y$e(i.doc,p9)}},r,!1)};var y$e=function(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:W0;var i=$x(t);Fmr(i,e,r,new n(i))},U5=function(e,t,r){return y$e(e,t,r,VR)},zmr=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:new Map;xJ(e,t.store,r),ob(e,$mr(t.store))},jmr=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:new Uint8Array([0]),r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:new Rm;var n=_$e(t);zmr(r,e,n);var i=[r.toUint8Array()];if(e.store.pendingDs&&i.push(e.store.pendingDs),e.store.pendingStructs&&i.push(ehr(e.store.pendingStructs.update,t)),i.length>1){if(r.constructor===Lx)return Ymr(i.map(function(a,o){return o===0?a:rhr(a)}));if(r.constructor===Rm)return KR(i)}return i[0]},vJ=function(e,t){return jmr(e,t,new Lx)},Umr=function(e){var t=new Map,r=rn(e.restDecoder);for(var n=0;n1&&arguments[1]!==void 0?arguments[1]:new HR;return _instanceof(e,Map)?b$e(t,e):Bmr(t,e),t.toUint8Array()},w$e=function(e){return Wmr(e,new GR)},iJ=function iJ1(){_class_call_check(this,iJ1);this.l=[]},a$e=function(){return new iJ},o$e=function(e,t){return e.l.push(t)},s$e=function(e,t){var r=e.l,n=r.length;e.l=r.filter(function(i){return t!==i}),n===e.l.length&&console.error("[yjs] Tried to remove event handler that doesn't exist.")},S$e=function(e,t,r){return E5(e.l,[t,r])},U0=function U01(t,r){_class_call_check(this,U01);this.client=t,this.clock=r},LR=function(e,t){return e===t||e!==null&&t!==null&&e.client===t.client&&e.clock===t.clock},Tn=function(e,t){return new U0(e,t)};var Vmr=function(e){var _iteratorNormalCompletion=true,_didIteratorError=false,_iteratorError=undefined;try{for(var _iterator=e.doc.share.entries()[Symbol.iterator](),_step;!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=true){var _step_value=_sliced_to_array(_step.value,2),t=_step_value[0],r=_step_value[1];if(r===e)return t}}catch(err){_didIteratorError=true;_iteratorError=err}finally{try{if(!_iteratorNormalCompletion&&_iterator.return!=null){_iterator.return()}}finally{if(_didIteratorError){throw _iteratorError}}}throw Wl()};var aJ=function aJ1(t,r){_class_call_check(this,aJ1);this.ds=t,this.sv=r};var Gmr=function(e,t){return new aJ(e,t)},kAn=Gmr(x$e(),new Map);var eb=function(e,t){return t===void 0?!e.deleted:t.sv.has(e.id.client)&&(t.sv.get(e.id.client)||0)>e.id.clock&&!g$e(t.ds,e.id)},oJ=function(e,t){var r=tf(e.meta,oJ,Pm),n=e.doc.store;r.has(t)||(t.sv.forEach(function(i,a){i0;r=n,n=e[--i-1]){if(n.deleted===r.deleted&&n.constructor===r.constructor&&n.mergeWith(r)){_instanceof(r,Oa)&&r.parentSub!==null&&r.parent._map.get(r.parentSub)===r&&r.parent._map.set(r.parentSub,n);continue}break}var a=t-i;return a&&e.splice(t+1-a,a),a},Kmr=function(e,t,r){var _iteratorNormalCompletion=true,_didIteratorError=false,_iteratorError=undefined;try{for(var _iterator=e.clients.entries()[Symbol.iterator](),_step;!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=true){var _step_value=_sliced_to_array(_step.value,2),n=_step_value[0],i=_step_value[1];var a=t.clients.get(n);for(var o=i.length-1;o>=0;o--){var s=i[o],l=s.clock+s.len;for(var c=sf(a,s.clock),d=a[c];c=0;a--){var o=r[a],s=hR(i.length-1,1+sf(i,o.clock+o.len-1));for(var l=s,c=i[l];l>0&&c.id.clock>=o.clock;c=i[l])l-=1+jR(i,l)}})};var T$e=function(e,t){if(t0&&(c._item===null||!c._item.deleted)&&(l=l.filter(function(d){return d.target._item===null||!d.target._item.deleted}),l.forEach(function(d){d.currentTarget=c,d._path=null}),l.sort(function(d,u){return d.path.length-u.path.length}),s.push(function(){S$e(c._dEH,l,r)}))}),s.push(function(){return n.emit("afterTransaction",[r,n])}),s.push(function(){r._needFormattingCleanup&&fhr(r)})}),E5(s,[])}finally{n.gc&&Kmr(a,i,n.gcFilter),Qmr(a,i),r.afterState.forEach(function(d,u){var p=r.beforeState.get(u)||0;if(p!==d){var m=i.clients.get(u),h=Om(sf(m,p),1);for(var g=m.length-1;g>=h;)g-=1+jR(m,g)}});for(var d=o.length-1;d>=0;d--){var _o_d_id=o[d].id,u=_o_d_id.client,p=_o_d_id.clock,m=i.clients.get(u),h=sf(m,p);h+11||h>0&&jR(m,h)}if(!r.local&&r.afterState.get(n.clientID)!==r.beforeState.get(n.clientID)&&(JMe(X_,R5,"[yjs] ",M5,$5,"Changed the client-id because another client seems to be using it."),n.clientID=v$e()),n.emit("afterTransactionCleanup",[r,n]),n._observers.has("update")){var d2=new Lx;u$e(d2,r)&&n.emit("update",[d2.toUint8Array(),r.origin,n,r])}if(n._observers.has("updateV2")){var d3=new Rm;u$e(d3,r)&&n.emit("updateV2",[d3.toUint8Array(),r.origin,n,r])}var s2=r.subdocsAdded,l=r.subdocsLoaded,c=r.subdocsRemoved;(s2.size>0||c.size>0||l.size>0)&&(s2.forEach(function(d){d.clientID=n.clientID,d.collectionid==null&&(d.collectionid=n.collectionid),n.subdocs.add(d)}),c.forEach(function(d){return n.subdocs.delete(d)}),n.emit("subdocs",[{loaded:l,added:s2,removed:c},n,r]),c.forEach(function(d){return d.destroy()})),e.length<=t+1?(n._transactionCleanups=[],n.emit("afterAllTransactions",[n,e])):T$e(e,t+1)}}},zi=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0;var i=e._transactionCleanups,a=!1,o=null;e._transaction===null&&(a=!0,e._transaction=new lJ(e,r,n),i.push(e._transaction),i.length===1&&e.emit("beforeAllTransactions",[e]),e.emit("beforeTransaction",[e._transaction,e]));try{o=t(e._transaction)}finally{if(a){var s=e._transaction===i[0];e._transaction=null,s&&T$e(i,0)}}return o};function Jmr(e){var t,r,n,i,a,o,s,l,l2,c,l9;return _ts_generator(this,function(_state){switch(_state.label){case 0:t=rn(e.restDecoder);r=0;_state.label=1;case 1:if(!(r1&&arguments[1]!==void 0?arguments[1]:W0,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Rm;if(e.length===1)return e[0];var n=e.map(function(d){return new t($x(d))}),i=n.map(function(d){return new D5(d,!0)}),a=null,o=new r,s=new q5(o);for(;i=i.filter(function(p){return p.curr!==null}),i.sort(function(p,m){if(p.curr.id.client===m.curr.id.client){var h=p.curr.id.clock-m.curr.id.clock;return h===0?p.curr.constructor===m.curr.constructor?0:p.curr.constructor===Hl?1:-1:h}else return m.curr.id.client-p.curr.id.client}),i.length!==0;){var d=i[0],u=d.curr.id.client;if(a!==null){var p=d.curr,m=!1;for(;p!==null&&p.id.clock+p.length<=a.struct.id.clock+a.struct.length&&p.id.client>=a.struct.id.client;)p=d.next(),m=!0;if(p===null||p.id.client!==u||m&&p.id.clock>a.struct.id.clock+a.struct.length)continue;if(u!==a.struct.id.client)z0(s,a.struct,a.offset),a={struct:p,offset:0},d.next();else if(a.struct.id.clock+a.struct.length0&&(a.struct.constructor===Hl?a.struct.length-=h2:p=Xmr(p,h2)),a.struct.mergeWith(p)||(z0(s,a.struct,a.offset),a={struct:p,offset:0},d.next())}}else a={struct:d.curr,offset:0},d.next();for(var p2=d.curr;p2!==null&&p2.id.client===u&&p2.id.clock===a.struct.id.clock+a.struct.length&&p2.constructor!==Hl;p2=d.next())z0(s,a.struct,a.offset),a={struct:p2,offset:0}}a!==null&&(z0(s,a.struct,a.offset),a=null),yJ(s);var l=n.map(function(d){return gJ(d)}),c=Mmr(l);return ob(o,c),o.toUint8Array()},ehr=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:W0,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:Rm;var i=_$e(t),a=new n,o=new q5(a),s=new r($x(e)),l=new D5(s,!1);for(;l.curr;){var d=l.curr,u=d.id.client,p=i.get(u)||0;if(l.curr.constructor===Hl){l.next();continue}if(d.id.clock+d.length>p)for(z0(o,d,Om(p-d.id.clock,0)),l.next();l.curr&&l.curr.id.client===u;)z0(o,l.curr,0),l.next();else for(;l.curr&&l.curr.id.client===u&&l.curr.id.clock+l.curr.length<=p;)l.next()}yJ(o);var c=gJ(s);return ob(a,c),a.toUint8Array()};var I$e=function(e){e.written>0&&(e.clientStructs.push({written:e.written,restEncoder:Od(e.encoder.restEncoder)}),e.encoder.restEncoder=y5(),e.written=0)},z0=function(e,t,r){e.written>0&&e.currClient!==t.id.client&&I$e(e),e.written===0&&(e.currClient=t.id.client,e.encoder.writeClient(t.id.client),hn(e.encoder.restEncoder,t.id.clock+r)),t.write(e.encoder,r),e.written++},yJ=function(e){I$e(e);var t=e.encoder.restEncoder;hn(t,e.clientStructs.length);for(var r=0;r=(this.transaction.beforeState.get(t.id.client)||0)}},{key:"changes",get:function get1(){var t=this._changes;if(t===null){if(this.transaction.doc._transactionCleanups.length===0)throw Mu(d$e);var r=this.target,n=Pm(),i=Pm(),a=[];if(t={added:n,deleted:i,delta:a,keys:this.keys},this.transaction.changed.get(r).has(null)){var s=null,l=function(){s&&a.push(s)};for(var c=r._start;c!==null;c=c.right)c.deleted?this.deletes(c)&&!this.adds(c)&&((s===null||s.delete===void 0)&&(l(),s={delete:0}),s.delete+=c.length,i.add(c)):this.adds(c)?((s===null||s.insert===void 0)&&(l(),s={insert:[]}),s.insert=s.insert.concat(c.content.getContent()),n.add(c)):((s===null||s.retain===void 0)&&(l(),s={retain:0}),s.retain+=c.length);s!==null&&s.retain===void 0&&l()}this._changes=t}return t}}]);return rb1}(),nhr=function(e,t){var r=[];for(;t._item!==null&&t!==e;){if(t._item.parentSub!==null)r.unshift(t._item.parentSub);else{var n=0,i=t._item.parent._start;for(;i!==t._item&&i!==null;)!i.deleted&&i.countable&&(n+=i.length),i=i.right;r.unshift(n)}t=t._item.parent}return r},Ns=function(){YMe("Invalid access: Add Yjs type to a document before reading data.")},C$e=80,_J=0,uJ=function uJ1(t,r){_class_call_check(this,uJ1);t.marker=!0,this.p=t,this.index=r,this.timestamp=_J++},ihr=function(e){e.timestamp=_J++},A$e=function(e,t,r){e.p.marker=!1,e.p=t,t.marker=!0,e.index=r,e.timestamp=_J++},ahr=function(e,t,r){if(e.length>=C$e){var n=e.reduce(function(i,a){return i.timestampt;)n=n.left,!n.deleted&&n.countable&&(i-=n.length);for(;n.left!==null&&n.left.id.client===n.id.client&&n.left.id.clock+n.left.length===n.id.clock;)n=n.left,!n.deleted&&n.countable&&(i-=n.length);return r!==null&&Ix(r.index-i)=0;n--){var i=e[n];if(r>0){var a=i.p;for(a.marker=!1;a&&(a.deleted||!a.countable);)a=a.left,a&&!a.deleted&&a.countable&&(i.index-=a.length);if(a===null||a.marker===!0){e.splice(n,1);continue}i.p=a,a.marker=!0}(t0&&t===i.index)&&(i.index=Om(t,i.index+r))}};var tM=function(e,t,r){var n=e,i=t.changedParentTypes;for(;tf(i,e,function(){return[]}).push(r),e._item!==null;)e=e._item.parent;S$e(n._eH,r,t)},So=/*#__PURE__*/function(){function So1(){_class_call_check(this,So1);this._item=null,this._map=new Map,this._start=null,this.doc=null,this._length=0,this._eH=a$e(),this._dEH=a$e(),this._searchMarker=null}_create_class(So1,[{key:"parent",get:function get1(){return this._item?this._item.parent:null}},{key:"_integrate",value:function _integrate(t,r){this.doc=t,this._item=r}},{key:"_copy",value:function _copy(){throw $u()}},{key:"clone",value:function clone(){throw $u()}},{key:"_write",value:function _write(t){}},{key:"_first",get:function get1(){var t=this._start;for(;t!==null&&t.deleted;)t=t.right;return t}},{key:"_callObserver",value:function _callObserver(t,r){!t.local&&this._searchMarker&&(this._searchMarker.length=0)}},{key:"observe",value:function observe(t){o$e(this._eH,t)}},{key:"observeDeep",value:function observeDeep(t){o$e(this._dEH,t)}},{key:"unobserve",value:function unobserve(t){s$e(this._eH,t)}},{key:"unobserveDeep",value:function unobserveDeep(t){s$e(this._dEH,t)}},{key:"toJSON",value:function toJSON(){}}]);return So1}(),P$e=function(e,t,r){var o;(o=e.doc)!=null||Ns(),t<0&&(t=e._length+t),r<0&&(r=e._length+r);var n=r-t,i=[],a=e._start;for(;a!==null&&n>0;){if(a.countable&&!a.deleted){var s=a.content.getContent();if(s.length<=t)t-=s.length;else{for(var l=t;l0;l++)i.push(s[l]),n--;t=0}}a=a.right}return i},O$e=function(e){var n;(n=e.doc)!=null||Ns();var t=[],r=e._start;for(;r!==null;){if(r.countable&&!r.deleted){var i=r.content.getContent();for(var a=0;a0&&(i=new Oa(Tn(o,Ho(s,o)),i,i&&i.lastId,l,l&&l.id,t,null,new Nm(c)),i.integrate(e,0),c=[])};n.forEach(function(u){if(u===null)c.push(u);else switch(u.constructor){case Number:case Object:case Boolean:case Array:case String:c.push(u);break;default:switch(d(),u.constructor){case Uint8Array:case ArrayBuffer:i=new Oa(Tn(o,Ho(s,o)),i,i&&i.lastId,l,l&&l.id,t,null,new Fx(new Uint8Array(u))),i.integrate(e,0);break;case Rd:i=new Oa(Tn(o,Ho(s,o)),i,i&&i.lastId,l,l&&l.id,t,null,new jx(u)),i.integrate(e,0);break;default:if(_instanceof(u,So))i=new Oa(Tn(o,Ho(s,o)),i,i&&i.lastId,l,l&&l.id,t,null,new Md(u)),i.integrate(e,0);else throw new Error("Unexpected content type in insert operation")}}}),d()},$$e=function(){return Mu("Length exceeded!")},N$e=function(e,t,r,n){if(r>t._length)throw $$e();if(r===0)return t._searchMarker&&L5(t._searchMarker,r,n.length),QR(e,t,null,n);var i=r,a=eM(t,r),o=t._start;for(a!==null&&(o=a.p,r-=a.index,r===0&&(o=o.prev,r+=o&&o.countable&&!o.deleted?o.length:0));o!==null;o=o.right)if(!o.deleted&&o.countable){if(r<=o.length){ra.index?o:a},{index:0,p:t._start}).p;if(i)for(;i.right;)i=i.right;return QR(e,t,i,r)},D$e=function(e,t,r,n){if(n===0)return;var i=r,a=n,o=eM(t,r),s=t._start;for(o!==null&&(s=o.p,r-=o.index);s!==null&&r>0;s=s.right)!s.deleted&&s.countable&&(r0&&s!==null;)s.deleted||(n0)throw $$e();t._searchMarker&&L5(t._searchMarker,i,-a+n)},JR=function(e,t,r){var n=t._map.get(r);n!==void 0&&n.delete(e)},bJ=function(e,t,r,n){var i=t._map.get(r)||null,a=e.doc,o=a.clientID,s;if(n==null)s=new Nm([n]);else switch(n.constructor){case Number:case Object:case Boolean:case Array:case String:case Date:case BigInt:s=new Nm([n]);break;case Uint8Array:s=new Fx(n);break;case Rd:s=new jx(n);break;default:if(_instanceof(n,So))s=new Md(n);else throw new Error("Unexpected content type")}new Oa(Tn(o,Ho(a.store,o)),i,i&&i.lastId,null,null,t,r,s).integrate(e,0)},wJ=function(e,t){var n;(n=e.doc)!=null||Ns();var r=e._map.get(t);return r!==void 0&&!r.deleted?r.content.getContent()[r.length-1]:void 0},q$e=function(e){var r;var t={};return(r=e.doc)!=null||Ns(),e._map.forEach(function(n,i){n.deleted||(t[i]=n.content.getContent()[n.length-1])}),t},L$e=function(e,t){var n;(n=e.doc)!=null||Ns();var r=e._map.get(t);return r!==void 0&&!r.deleted};var lhr=function(e,t){var r={};return e._map.forEach(function(n,i){var a=n;for(;a!==null&&(!t.sv.has(a.id.client)||a.id.clock>=(t.sv.get(a.id.client)||0));)a=a.left;a!==null&&eb(a,t)&&(r[i]=a.content.getContent()[a.length-1])}),r},FR=function(e){var t;return(t=e.doc)!=null||Ns(),t$e(e._map.entries(),function(r){return!r[1].deleted})},cJ=/*#__PURE__*/function(rb1){_inherits(cJ1,rb1);function cJ1(){_class_call_check(this,cJ1);return _call_super(this,cJ1,arguments)}return cJ1}(rb),B0=/*#__PURE__*/function(So1){_inherits(B01,So1);function B01(){_class_call_check(this,B01);var _this;_this=_call_super(this,B01),_this._prelimContent=[],_this._searchMarker=[];return _this}_create_class(B01,[{key:"_integrate",value:function _integrate(t,r){_get(_get_prototype_of(B01.prototype),"_integrate",this).call(this,t,r),this.insert(0,this._prelimContent),this._prelimContent=null}},{key:"_copy",value:function _copy(){return new B0}},{key:"clone",value:function clone(){var t=new B0;return t.insert(0,this.toArray().map(function(r){return _instanceof(r,So)?r.clone():r})),t}},{key:"length",get:function get1(){var t;return(t=this.doc)!=null||Ns(),this._length}},{key:"_callObserver",value:function _callObserver(t,r){_get(_get_prototype_of(B01.prototype),"_callObserver",this).call(this,t,r),tM(this,t,new cJ(this,t))}},{key:"insert",value:function insert(t,r){var _this=this;var _this__prelimContent;this.doc!==null?zi(this.doc,function(n){N$e(n,_this,t,r)}):(_this__prelimContent=this._prelimContent).splice.apply(_this__prelimContent,[t,0].concat(_to_consumable_array(r)))}},{key:"push",value:function push(t){var _this=this;var _this__prelimContent;this.doc!==null?zi(this.doc,function(r){shr(r,_this,t)}):(_this__prelimContent=this._prelimContent).push.apply(_this__prelimContent,_to_consumable_array(t))}},{key:"unshift",value:function unshift(t){this.insert(0,t)}},{key:"delete",value:function _delete(t){var _this=this;var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;this.doc!==null?zi(this.doc,function(n){D$e(n,_this,t,r)}):this._prelimContent.splice(t,r)}},{key:"get",value:function get1(t){return M$e(this,t)}},{key:"toArray",value:function toArray(){return O$e(this)}},{key:"slice",value:function slice(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.length;return P$e(this,t,r)}},{key:"toJSON",value:function toJSON(){return this.map(function(t){return _instanceof(t,So)?t.toJSON():t})}},{key:"map",value:function map(t){return R$e(this,t)}},{key:"forEach",value:function forEach(t){F5(this,t)}},{key:Symbol.iterator,value:function value(){return ohr(this)}},{key:"_write",value:function _write(t){t.writeTypeRef(Phr)}}],[{key:"from",value:function from(t){var r=new B0;return r.push(t),r}}]);return B01}(So),uhr=function(e){return new B0},dJ=/*#__PURE__*/function(rb1){_inherits(dJ1,rb1);function dJ1(t,r,n){_class_call_check(this,dJ1);var _this;_this=_call_super(this,dJ1,[t,r]),_this.keysChanged=n;return _this}return dJ1}(rb),G0=/*#__PURE__*/function(So1){_inherits(G01,So1);function G01(t){_class_call_check(this,G01);var _this;_this=_call_super(this,G01),_this._prelimContent=null,t===void 0?_this._prelimContent=new Map:_this._prelimContent=new Map(t);return _this}_create_class(G01,[{key:"_integrate",value:function _integrate(t,r){var _this=this;_get(_get_prototype_of(G01.prototype),"_integrate",this).call(this,t,r),this._prelimContent.forEach(function(n,i){_this.set(i,n)}),this._prelimContent=null}},{key:"_copy",value:function _copy(){return new G0}},{key:"clone",value:function clone(){var t=new G0;return this.forEach(function(r,n){t.set(n,_instanceof(r,So)?r.clone():r)}),t}},{key:"_callObserver",value:function _callObserver(t,r){tM(this,t,new dJ(this,t,r))}},{key:"toJSON",value:function toJSON(){var r;(r=this.doc)!=null||Ns();var t={};return this._map.forEach(function(n,i){if(!n.deleted){var a=n.content.getContent()[n.length-1];t[i]=_instanceof(a,So)?a.toJSON():a}}),t}},{key:"size",get:function get1(){return _to_consumable_array(FR(this)).length}},{key:"keys",value:function keys(){return qR(FR(this),function(t){return t[0]})}},{key:"values",value:function values(){return qR(FR(this),function(t){return t[1].content.getContent()[t[1].length-1]})}},{key:"entries",value:function entries(){return qR(FR(this),function(t){return[t[0],t[1].content.getContent()[t[1].length-1]]})}},{key:"forEach",value:function forEach(t){var _this=this;var r;(r=this.doc)!=null||Ns(),this._map.forEach(function(n,i){n.deleted||t(n.content.getContent()[n.length-1],i,_this)})}},{key:Symbol.iterator,value:function value(){return this.entries()}},{key:"delete",value:function _delete(t){var _this=this;this.doc!==null?zi(this.doc,function(r){JR(r,_this,t)}):this._prelimContent.delete(t)}},{key:"set",value:function set1(t,r){var _this=this;return this.doc!==null?zi(this.doc,function(n){bJ(n,_this,t,r)}):this._prelimContent.set(t,r),r}},{key:"get",value:function get1(t){return wJ(this,t)}},{key:"has",value:function has(t){return L$e(this,t)}},{key:"clear",value:function clear(){var _this=this;this.doc!==null?zi(this.doc,function(t){_this.forEach(function(r,n,i){JR(t,i,n)})}):this._prelimContent.clear()}},{key:"_write",value:function _write(t){t.writeTypeRef(Ohr)}}]);return G01}(So),chr=function(e){return new G0},j0=function(e,t){return e===t||(typeof e==="undefined"?"undefined":_type_of(e))=="object"&&(typeof t==="undefined"?"undefined":_type_of(t))=="object"&&e&&t&&RQ(e,t)},z5=/*#__PURE__*/function(){function z51(t,r,n,i){_class_call_check(this,z51);this.left=t,this.right=r,this.index=n,this.currentAttributes=i}_create_class(z51,[{key:"forward",value:function forward(){switch(this.right===null&&Wl(),this.right.content.constructor){case Ra:this.right.deleted||sb(this.currentAttributes,this.right.content);break;default:this.right.deleted||(this.index+=this.right.length);break}this.left=this.right,this.right=this.right.right}}]);return z51}(),p$e=function(e,t,r){for(;t.right!==null&&r>0;){switch(t.right.content.constructor){case Ra:t.right.deleted||sb(t.currentAttributes,t.right.content);break;default:t.right.deleted||(r0||s.size>0&&(r.right.deleted||r.right.content.constructor===Ra));){if(!r.right.deleted)switch(r.right.content.constructor){case Ra:{var _r_right_content=r.right.content,l=_r_right_content.key,c=_r_right_content.value,d=i[l];if(d!==void 0){if(j0(d,c))s.delete(l);else{if(n===0)break e;s.set(l,c)}r.right.delete(e)}else r.currentAttributes.set(l,c);break}default:n0){var l2="";for(;n>0;n--)l2+="\n";r.right=new Oa(Tn(o,Ho(a.store,o)),r.left,r.left&&r.left.lastId,r.right,r.right&&r.right.id,t,null,new Pc(l2)),r.right.integrate(e,0),r.forward()}F$e(e,t,r,s)},U$e=function(e,t,r,n,i){var c,d;var a=t,o=sl();for(;a&&(!a.countable||a.deleted);){if(!a.deleted&&a.content.constructor===Ra){var u=a.content;o.set(u.key,u)}a=a.right}var s=0,l=!1;for(;t!==a;){if(r===t&&(l=!0),!t.deleted){var u2=t.content;switch(u2.constructor){case Ra:{var p=u2.key,m=u2.value,h=(c=n.get(p))!=null?c:null;(o.get(p)!==u2||h===m)&&(t.delete(e),s++,!l&&((d=i.get(p))!=null?d:null)===m&&h!==m&&(h===null?i.delete(p):i.set(p,h))),!l&&!t.deleted&&sb(i,u2);break}}}t=t.right}return s},dhr=function(e,t){for(;t&&t.right&&(t.right.deleted||!t.right.countable);)t=t.right;var r=new Set;for(;t&&(t.deleted||!t.countable);){if(!t.deleted&&t.content.constructor===Ra){var n=t.content.key;r.has(n)?t.delete(e):r.add(n)}t=t.left}},phr=function(e){var t=0;return zi(e.doc,function(r){var n=e._start,i=e._start,a=sl(),o=cR(a);for(;i;){if(i.deleted===!1)switch(i.content.constructor){case Ra:sb(o,i.content);break;default:t+=U$e(r,n,i,a,o),a=cR(o),n=i;break}i=i.right}}),t},fhr=function(e){var t=new Set,r=e.doc;var _iteratorNormalCompletion=true,_didIteratorError=false,_iteratorError=undefined;try{for(var _iterator=e.afterState.entries()[Symbol.iterator](),_step;!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=true){var _step_value=_sliced_to_array(_step.value,2),n=_step_value[0],i=_step_value[1];var a=e.beforeState.get(n)||0;i!==a&&E$e(e,r.store.clients.get(n),a,i,function(o){!o.deleted&&o.content.constructor===Ra&&o.constructor!==Gl&&t.add(o.parent)})}}catch(err){_didIteratorError=true;_iteratorError=err}finally{try{if(!_iteratorNormalCompletion&&_iterator.return!=null){_iterator.return()}}finally{if(_didIteratorError){throw _iteratorError}}}zi(r,function(n){h$e(e,e.deleteSet,function(i){if(_instanceof(i,Gl)||!i.parent._hasFormatting||t.has(i.parent))return;var a=i.parent;i.content.constructor===Ra?t.add(a):dhr(n,i)});var _iteratorNormalCompletion=true,_didIteratorError=false,_iteratorError=undefined;try{for(var _iterator=t[Symbol.iterator](),_step;!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=true){var i=_step.value;phr(i)}}catch(err){_didIteratorError=true;_iteratorError=err}finally{try{if(!_iteratorNormalCompletion&&_iterator.return!=null){_iterator.return()}}finally{if(_didIteratorError){throw _iteratorError}}}})},m$e=function(e,t,r){var n=r,i=cR(t.currentAttributes),a=t.right;for(;r>0&&t.right!==null;){if(t.right.deleted===!1)switch(t.right.content.constructor){case Md:case $m:case Pc:r0&&(x={delete:u}),u=0;break;case"insert":((typeof c==="undefined"?"undefined":_type_of(c))=="object"||c.length>0)&&(x={insert:c},i.size>0&&(x.attributes={},i.forEach(function(y,v){y!==null&&(x.attributes[v]=y)}))),c="";break;case"retain":d>0&&(x={retain:d},AMe(l)||(x.attributes=IMe({},l))),d=0;break}x&&r.push(x),s=null}};for(;o!==null;){switch(o.content.constructor){case Md:case $m:_this.adds(o)?_this.deletes(o)||(p(),s="insert",c=o.content.getContent()[0],p()):_this.deletes(o)?(s!=="delete"&&(p(),s="delete"),u+=1):o.deleted||(s!=="retain"&&(p(),s="retain"),d+=1);break;case Pc:_this.adds(o)?_this.deletes(o)||(s!=="insert"&&(p(),s="insert"),c+=o.content.str):_this.deletes(o)?(s!=="delete"&&(p(),s="delete"),u+=o.length):o.deleted||(s!=="retain"&&(p(),s="retain"),d+=o.length);break;case Ra:{var _o_content=o.content,x=_o_content.key,y=_o_content.value;if(_this.adds(o)){if(!_this.deletes(o)){var v=(m=i.get(x))!=null?m:null;j0(v,y)?y!==null&&o.delete(n):(s==="retain"&&p(),j0(y,(h=a.get(x))!=null?h:null)?delete l[x]:l[x]=y)}}else if(_this.deletes(o)){a.set(x,y);var v1=(g=i.get(x))!=null?g:null;j0(v1,y)||(s==="retain"&&p(),l[x]=v1)}else if(!o.deleted){a.set(x,y);var v2=l[x];v2!==void 0&&(j0(v2,y)?v2!==null&&o.delete(n):(s==="retain"&&p(),y===null?delete l[x]:l[x]=y))}o.deleted||(s==="insert"&&p(),sb(i,o.content));break}}o=o.right}for(p();r.length>0;){var x2=r[r.length-1];if(x2.retain!==void 0&&x2.attributes===void 0)r.pop();else break}}),this._delta=r}return this._delta}}]);return pJ1}(rb),H0=/*#__PURE__*/function(So1){_inherits(H01,So1);function H01(t){_class_call_check(this,H01);var _this;_this=_call_super(this,H01),_this._pending=t!==void 0?[function(){return _this.insert(0,t)}]:[],_this._searchMarker=[],_this._hasFormatting=!1;return _this}_create_class(H01,[{key:"length",get:function get1(){var t;return(t=this.doc)!=null||Ns(),this._length}},{key:"_integrate",value:function _integrate(t,r){_get(_get_prototype_of(H01.prototype),"_integrate",this).call(this,t,r);try{this._pending.forEach(function(n){return n()})}catch(n){console.error(n)}this._pending=null}},{key:"_copy",value:function _copy(){return new H0}},{key:"clone",value:function clone(){var t=new H0;return t.applyDelta(this.toDelta()),t}},{key:"_callObserver",value:function _callObserver(t,r){_get(_get_prototype_of(H01.prototype),"_callObserver",this).call(this,t,r);var n=new pJ(this,t,r);tM(this,t,n),!t.local&&this._hasFormatting&&(t._needFormattingCleanup=!0)}},{key:"toString",value:function toString(){var n;(n=this.doc)!=null||Ns();var t="",r=this._start;for(;r!==null;)!r.deleted&&r.countable&&r.content.constructor===Pc&&(t+=r.content.str),r=r.right;return t}},{key:"toJSON",value:function toJSON(){return this.toString()}},{key:"applyDelta",value:function applyDelta(t){var _this=this;var _ref=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},tmp=_ref.sanitize,r=tmp===void 0?!0:tmp;this.doc!==null?zi(this.doc,function(n){var i=new z5(null,_this._start,0,new Map);for(var a=0;a0)&&rJ(n,_this,i,s,o.attributes||{})}else o.retain!==void 0?f$e(n,_this,i,o.retain,o.attributes||{}):o.delete!==void 0&&m$e(n,i,o.delete)}}):this._pending.push(function(){return _this.applyDelta(t)})}},{key:"toDelta",value:function toDelta(t,r,n){var u;(u=this.doc)!=null||Ns();var i=[],a=new Map,o=this.doc,s="",l=this._start;function c(){if(s.length>0){var p={},m=!1;a.forEach(function(g,x){m=!0,p[x]=g});var h={insert:s};m&&(h.attributes=p),i.push(h),s=""}}var d=function(){var _loop=function(){if(eb(l,t)||r!==void 0&&eb(l,r))switch(l.content.constructor){case Pc:{var p=a.get("ychange");t!==void 0&&!eb(l,t)?(p===void 0||p.user!==l.id.client||p.type!=="removed")&&(c(),a.set("ychange",n?n("removed",l.id):{type:"removed"})):r!==void 0&&!eb(l,r)?(p===void 0||p.user!==l.id.client||p.type!=="added")&&(c(),a.set("ychange",n?n("added",l.id):{type:"added"})):p!==void 0&&(c(),a.delete("ychange")),s+=l.content.str;break}case Md:case $m:{c();var p2={insert:l.content.getContent()[0]};if(a.size>0){var m={};p2.attributes=m,a.forEach(function(h,g){m[g]=h})}i.push(p2);break}case Ra:eb(l,t)&&(c(),sb(a,l.content));break}l=l.right};for(;l!==null;)_loop();c()};return t||r?zi(o,function(p){t&&oJ(p,t),r&&oJ(p,r),d()},"cleanup"):d(),i}},{key:"insert",value:function insert(t,r,n){var _this=this;if(r.length<=0)return;var i=this.doc;i!==null?zi(i,function(a){var o=zR(a,_this,t,!n);n||(n={},o.currentAttributes.forEach(function(s,l){n[l]=s})),rJ(a,_this,o,r,n)}):this._pending.push(function(){return _this.insert(t,r,n)})}},{key:"insertEmbed",value:function insertEmbed(t,r,n){var _this=this;var i=this.doc;i!==null?zi(i,function(a){var o=zR(a,_this,t,!n);rJ(a,_this,o,r,n||{})}):this._pending.push(function(){return _this.insertEmbed(t,r,n||{})})}},{key:"delete",value:function _delete(t,r){var _this=this;if(r===0)return;var n=this.doc;n!==null?zi(n,function(i){m$e(i,zR(i,_this,t,!0),r)}):this._pending.push(function(){return _this.delete(t,r)})}},{key:"format",value:function format(t,r,n){var _this=this;if(r===0)return;var i=this.doc;i!==null?zi(i,function(a){var o=zR(a,_this,t,!1);o.right!==null&&f$e(a,_this,o,r,n)}):this._pending.push(function(){return _this.format(t,r,n)})}},{key:"removeAttribute",value:function removeAttribute(t){var _this=this;this.doc!==null?zi(this.doc,function(r){JR(r,_this,t)}):this._pending.push(function(){return _this.removeAttribute(t)})}},{key:"setAttribute",value:function setAttribute(t,r){var _this=this;this.doc!==null?zi(this.doc,function(n){bJ(n,_this,t,r)}):this._pending.push(function(){return _this.setAttribute(t,r)})}},{key:"getAttribute",value:function getAttribute(t){return wJ(this,t)}},{key:"getAttributes",value:function getAttributes(){return q$e(this)}},{key:"_write",value:function _write(t){t.writeTypeRef(Rhr)}}]);return H01}(So),mhr=function(e){return new H0},N5=/*#__PURE__*/function(){function N51(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:function(){return!0};_class_call_check(this,N51);var n;this._filter=r,this._root=t,this._currentNode=t._start,this._firstCall=!0,(n=t.doc)!=null||Ns()}_create_class(N51,[{key:Symbol.iterator,value:function value(){return this}},{key:"next",value:function next(){var t=this._currentNode,r=t&&t.content&&t.content.type;if(t!==null&&(!this._firstCall||t.deleted||!this._filter(r)))do if(r=t.content.type,!t.deleted&&(r.constructor===Z0||r.constructor===Mm)&&r._start!==null)t=r._start;else for(;t!==null;){var n=t.next;if(n!==null){t=n;break}else t.parent===this._root?t=null:t=t.parent._item}while(t!==null&&(t.deleted||!this._filter(t.content.type)));return this._firstCall=!1,t===null?{value:void 0,done:!0}:(this._currentNode=t,{value:t.content.type,done:!1})}}]);return N51}(),Mm=/*#__PURE__*/function(So1){_inherits(Mm1,So1);function Mm1(){_class_call_check(this,Mm1);var _this;_this=_call_super(this,Mm1),_this._prelimContent=[];return _this}_create_class(Mm1,[{key:"firstChild",get:function get1(){var t=this._first;return t?t.content.getContent()[0]:null}},{key:"_integrate",value:function _integrate(t,r){_get(_get_prototype_of(Mm1.prototype),"_integrate",this).call(this,t,r),this.insert(0,this._prelimContent),this._prelimContent=null}},{key:"_copy",value:function _copy(){return new Mm}},{key:"clone",value:function clone(){var t=new Mm;return t.insert(0,this.toArray().map(function(r){return _instanceof(r,So)?r.clone():r})),t}},{key:"length",get:function get1(){var t;return(t=this.doc)!=null||Ns(),this._prelimContent===null?this._length:this._prelimContent.length}},{key:"createTreeWalker",value:function createTreeWalker(t){return new N5(this,t)}},{key:"querySelector",value:function querySelector(t){t=t.toUpperCase();var n=new N5(this,function(i){return i.nodeName&&i.nodeName.toUpperCase()===t}).next();return n.done?null:n.value}},{key:"querySelectorAll",value:function querySelectorAll(t){return t=t.toUpperCase(),rf(new N5(this,function(r){return r.nodeName&&r.nodeName.toUpperCase()===t}))}},{key:"_callObserver",value:function _callObserver(t,r){tM(this,t,new fJ(this,r,t))}},{key:"toString",value:function toString(){return R$e(this,function(t){return t.toString()}).join("")}},{key:"toJSON",value:function toJSON(){return this.toString()}},{key:"toDOM",value:function toDOM(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:document,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;var i=t.createDocumentFragment();return n!==void 0&&n._createAssociation(i,this),F5(this,function(a){i.insertBefore(a.toDOM(t,r,n),null)}),i}},{key:"insert",value:function insert(t,r){var _this=this;var _this__prelimContent;this.doc!==null?zi(this.doc,function(n){N$e(n,_this,t,r)}):(_this__prelimContent=this._prelimContent).splice.apply(_this__prelimContent,[t,0].concat(_to_consumable_array(r)))}},{key:"insertAfter",value:function insertAfter(t,r){var _this=this;if(this.doc!==null)zi(this.doc,function(n){var i=t&&_instanceof(t,So)?t._item:t;QR(n,_this,i,r)});else{var _n1;var n=this._prelimContent,i=t===null?0:n.findIndex(function(a){return a===t})+1;if(i===0&&t!==null)throw Mu("Reference item not found");(_n1=n).splice.apply(_n1,[i,0].concat(_to_consumable_array(r)))}}},{key:"delete",value:function _delete(t){var _this=this;var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;this.doc!==null?zi(this.doc,function(n){D$e(n,_this,t,r)}):this._prelimContent.splice(t,r)}},{key:"toArray",value:function toArray(){return O$e(this)}},{key:"push",value:function push(t){this.insert(this.length,t)}},{key:"unshift",value:function unshift(t){this.insert(0,t)}},{key:"get",value:function get1(t){return M$e(this,t)}},{key:"slice",value:function slice(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.length;return P$e(this,t,r)}},{key:"forEach",value:function forEach(t){F5(this,t)}},{key:"_write",value:function _write(t){t.writeTypeRef($hr)}}]);return Mm1}(So),hhr=function(e){return new Mm},Z0=/*#__PURE__*/function(Mm1){_inherits(Z01,Mm1);function Z01(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"UNDEFINED";_class_call_check(this,Z01);var _this;_this=_call_super(this,Z01),_this.nodeName=t,_this._prelimAttrs=new Map;return _this}_create_class(Z01,[{key:"nextSibling",get:function get1(){var t=this._item?this._item.next:null;return t?t.content.type:null}},{key:"prevSibling",get:function get1(){var t=this._item?this._item.prev:null;return t?t.content.type:null}},{key:"_integrate",value:function _integrate(t,r){var _this=this;_get(_get_prototype_of(Z01.prototype),"_integrate",this).call(this,t,r),this._prelimAttrs.forEach(function(n,i){_this.setAttribute(i,n)}),this._prelimAttrs=null}},{key:"_copy",value:function _copy(){return new Z0(this.nodeName)}},{key:"clone",value:function clone(){var t=new Z0(this.nodeName),r=this.getAttributes();return CMe(r,function(n,i){t.setAttribute(i,n)}),t.insert(0,this.toArray().map(function(n){return _instanceof(n,So)?n.clone():n})),t}},{key:"toString",value:function toString(){var t=this.getAttributes(),r=[],n=[];for(var s in t)n.push(s);n.sort();var i=n.length;for(var s2=0;s20?" "+r.join(" "):"";return"<".concat(a).concat(o,">").concat(_get(_get_prototype_of(Z01.prototype),"toString",this).call(this),"")}},{key:"removeAttribute",value:function removeAttribute(t){var _this=this;this.doc!==null?zi(this.doc,function(r){JR(r,_this,t)}):this._prelimAttrs.delete(t)}},{key:"setAttribute",value:function setAttribute(t,r){var _this=this;this.doc!==null?zi(this.doc,function(n){bJ(n,_this,t,r)}):this._prelimAttrs.set(t,r)}},{key:"getAttribute",value:function getAttribute(t){return wJ(this,t)}},{key:"hasAttribute",value:function hasAttribute(t){return L$e(this,t)}},{key:"getAttributes",value:function getAttributes(t){return t?lhr(this,t):q$e(this)}},{key:"toDOM",value:function toDOM(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:document,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;var i=t.createElement(this.nodeName),a=this.getAttributes();for(var o in a){var s=a[o];typeof s=="string"&&i.setAttribute(o,s)}return F5(this,function(o){i.appendChild(o.toDOM(t,r,n))}),n!==void 0&&n._createAssociation(i,this),i}},{key:"_write",value:function _write(t){t.writeTypeRef(Mhr),t.writeKey(this.nodeName)}}]);return Z01}(Mm),ghr=function(e){return new Z0(e.readKey())},fJ=/*#__PURE__*/function(rb1){_inherits(fJ1,rb1);function fJ1(t,r,n){_class_call_check(this,fJ1);var _this;_this=_call_super(this,fJ1,[t,n]),_this.childListChanged=!1,_this.attributesChanged=new Set,r.forEach(function(i){i===null?_this.childListChanged=!0:_this.attributesChanged.add(i)});return _this}return fJ1}(rb),nb=/*#__PURE__*/function(G01){_inherits(nb1,G01);function nb1(t){_class_call_check(this,nb1);var _this;_this=_call_super(this,nb1),_this.hookName=t;return _this}_create_class(nb1,[{key:"_copy",value:function _copy(){return new nb(this.hookName)}},{key:"clone",value:function clone(){var t=new nb(this.hookName);return this.forEach(function(r,n){t.set(n,r)}),t}},{key:"toDOM",value:function toDOM(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:document,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;var i=r[this.hookName],a;return i!==void 0?a=i.createDom(this):a=document.createElement(this.hookName),a.setAttribute("data-yjs-hook",this.hookName),n!==void 0&&n._createAssociation(a,this),a}},{key:"_write",value:function _write(t){t.writeTypeRef(Nhr),t.writeKey(this.hookName)}}]);return nb1}(G0),xhr=function(e){return new nb(e.readKey())},ib=/*#__PURE__*/function(H01){_inherits(ib1,H01);function ib1(){_class_call_check(this,ib1);return _call_super(this,ib1,arguments)}_create_class(ib1,[{key:"nextSibling",get:function get1(){var t=this._item?this._item.next:null;return t?t.content.type:null}},{key:"prevSibling",get:function get1(){var t=this._item?this._item.prev:null;return t?t.content.type:null}},{key:"_copy",value:function _copy(){return new ib}},{key:"clone",value:function clone(){var t=new ib;return t.applyDelta(this.toDelta()),t}},{key:"toDOM",value:function toDOM(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:document,r=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0;var i=t.createTextNode(this.toString());return n!==void 0&&n._createAssociation(i,this),i}},{key:"toString",value:function toString(){return this.toDelta().map(function(t){var r=[];for(var i in t.attributes){var a=[];for(var o in t.attributes[i])a.push({key:o,value:t.attributes[i][o]});a.sort(function(o,s){return o.key=0;i3--)n+="");return n}).join("")}},{key:"toJSON",value:function toJSON(){return this.toString()}},{key:"_write",value:function _write(t){t.writeTypeRef(Dhr)}}]);return ib1}(H0),vhr=function(e){return new ib},j5=/*#__PURE__*/function(){function j51(t,r){_class_call_check(this,j51);this.id=t,this.length=r}_create_class(j51,[{key:"deleted",get:function get1(){throw $u()}},{key:"mergeWith",value:function mergeWith(t){return!1}},{key:"write",value:function write(t,r,n){throw $u()}},{key:"integrate",value:function integrate(t,r){throw $u()}}]);return j51}(),yhr=0,Gl=/*#__PURE__*/function(j51){_inherits(Gl1,j51);function Gl1(){_class_call_check(this,Gl1);return _call_super(this,Gl1,arguments)}_create_class(Gl1,[{key:"deleted",get:function get1(){return!0}},{key:"delete",value:function _delete(){}},{key:"mergeWith",value:function mergeWith(t){return this.constructor!==t.constructor?!1:(this.length+=t.length,!0)}},{key:"integrate",value:function integrate(t,r){r>0&&(this.id.clock+=r,this.length-=r),k$e(t.doc.store,this)}},{key:"write",value:function write(t,r){t.writeInfo(yhr),t.writeLen(this.length-r)}},{key:"getMissing",value:function getMissing(t,r){return null}}]);return Gl1}(j5),Fx=/*#__PURE__*/function(){function Fx1(t){_class_call_check(this,Fx1);this.content=t}_create_class(Fx1,[{key:"getLength",value:function getLength(){return 1}},{key:"getContent",value:function getContent(){return[this.content]}},{key:"isCountable",value:function isCountable(){return!0}},{key:"copy",value:function copy(){return new Fx(this.content)}},{key:"splice",value:function splice(t){throw $u()}},{key:"mergeWith",value:function mergeWith(t){return!1}},{key:"integrate",value:function integrate(t,r){}},{key:"delete",value:function _delete(t){}},{key:"gc",value:function gc(t){}},{key:"write",value:function write(t,r){t.writeBuf(this.content)}},{key:"getRef",value:function getRef(){return 3}}]);return Fx1}(),_hr=function(e){return new Fx(e.readBuf())},zx=/*#__PURE__*/function(){function zx1(t){_class_call_check(this,zx1);this.len=t}_create_class(zx1,[{key:"getLength",value:function getLength(){return this.len}},{key:"getContent",value:function getContent(){return[]}},{key:"isCountable",value:function isCountable(){return!1}},{key:"copy",value:function copy(){return new zx(this.len)}},{key:"splice",value:function splice(t){var r=new zx(this.len-t);return this.len=t,r}},{key:"mergeWith",value:function mergeWith(t){return this.len+=t.len,!0}},{key:"integrate",value:function integrate(t,r){BR(t.deleteSet,r.id.client,r.id.clock,this.len),r.markDeleted()}},{key:"delete",value:function _delete(t){}},{key:"gc",value:function gc(t){}},{key:"write",value:function write(t,r){t.writeLen(this.len-r)}},{key:"getRef",value:function getRef(){return 1}}]);return zx1}(),bhr=function(e){return new zx(e.readLen())},B$e=function(e,t){return new Rd(_object_spread_props(_object_spread({guid:e},t),{shouldLoad:t.shouldLoad||t.autoLoad||!1}))},jx=/*#__PURE__*/function(){function jx1(t){_class_call_check(this,jx1);t._item&&console.error("This document was already integrated as a sub-document. You should create a second instance instead with the same guid."),this.doc=t;var r={};this.opts=r,t.gc||(r.gc=!1),t.autoLoad&&(r.autoLoad=!0),t.meta!==null&&(r.meta=t.meta)}_create_class(jx1,[{key:"getLength",value:function getLength(){return 1}},{key:"getContent",value:function getContent(){return[this.doc]}},{key:"isCountable",value:function isCountable(){return!0}},{key:"copy",value:function copy(){return new jx(B$e(this.doc.guid,this.opts))}},{key:"splice",value:function splice(t){throw $u()}},{key:"mergeWith",value:function mergeWith(t){return!1}},{key:"integrate",value:function integrate(t,r){this.doc._item=r,t.subdocsAdded.add(this.doc),this.doc.shouldLoad&&t.subdocsLoaded.add(this.doc)}},{key:"delete",value:function _delete(t){t.subdocsAdded.has(this.doc)?t.subdocsAdded.delete(this.doc):t.subdocsRemoved.add(this.doc)}},{key:"gc",value:function gc(t){}},{key:"write",value:function write(t,r){t.writeString(this.doc.guid),t.writeAny(this.opts)}},{key:"getRef",value:function getRef(){return 9}}]);return jx1}(),whr=function(e){return new jx(B$e(e.readString(),e.readAny()))},$m=/*#__PURE__*/function(){function $m1(t){_class_call_check(this,$m1);this.embed=t}_create_class($m1,[{key:"getLength",value:function getLength(){return 1}},{key:"getContent",value:function getContent(){return[this.embed]}},{key:"isCountable",value:function isCountable(){return!0}},{key:"copy",value:function copy(){return new $m(this.embed)}},{key:"splice",value:function splice(t){throw $u()}},{key:"mergeWith",value:function mergeWith(t){return!1}},{key:"integrate",value:function integrate(t,r){}},{key:"delete",value:function _delete(t){}},{key:"gc",value:function gc(t){}},{key:"write",value:function write(t,r){t.writeJSON(this.embed)}},{key:"getRef",value:function getRef(){return 5}}]);return $m1}(),Shr=function(e){return new $m(e.readJSON())},Ra=/*#__PURE__*/function(){function Ra1(t,r){_class_call_check(this,Ra1);this.key=t,this.value=r}_create_class(Ra1,[{key:"getLength",value:function getLength(){return 1}},{key:"getContent",value:function getContent(){return[]}},{key:"isCountable",value:function isCountable(){return!1}},{key:"copy",value:function copy(){return new Ra(this.key,this.value)}},{key:"splice",value:function splice(t){throw $u()}},{key:"mergeWith",value:function mergeWith(t){return!1}},{key:"integrate",value:function integrate(t,r){var n=r.parent;n._searchMarker=null,n._hasFormatting=!0}},{key:"delete",value:function _delete(t){}},{key:"gc",value:function gc(t){}},{key:"write",value:function write(t,r){t.writeKey(this.key),t.writeJSON(this.value)}},{key:"getRef",value:function getRef(){return 6}}]);return Ra1}(),khr=function(e){return new Ra(e.readKey(),e.readJSON())},ab=/*#__PURE__*/function(){function ab1(t){_class_call_check(this,ab1);this.arr=t}_create_class(ab1,[{key:"getLength",value:function getLength(){return this.arr.length}},{key:"getContent",value:function getContent(){return this.arr}},{key:"isCountable",value:function isCountable(){return!0}},{key:"copy",value:function copy(){return new ab(this.arr)}},{key:"splice",value:function splice(t){var r=new ab(this.arr.slice(t));return this.arr=this.arr.slice(0,t),r}},{key:"mergeWith",value:function mergeWith(t){return this.arr=this.arr.concat(t.arr),!0}},{key:"integrate",value:function integrate(t,r){}},{key:"delete",value:function _delete(t){}},{key:"gc",value:function gc(t){}},{key:"write",value:function write(t,r){var n=this.arr.length;t.writeLen(n-r);for(var i=r;i=55296&&n<=56319&&(this.str=this.str.slice(0,t-1)+"�",r.str="�"+r.str.slice(1)),r}},{key:"mergeWith",value:function mergeWith(t){return this.str+=t.str,!0}},{key:"integrate",value:function integrate(t,r){}},{key:"delete",value:function _delete(t){}},{key:"gc",value:function gc(t){}},{key:"write",value:function write(t,r){t.writeString(r===0?this.str:this.str.slice(r))}},{key:"getRef",value:function getRef(){return 4}}]);return Pc1}(),Chr=function(e){return new Pc(e.readString())},Ahr=[uhr,chr,mhr,ghr,hhr,xhr,vhr],Phr=0,Ohr=1,Rhr=2,Mhr=3,$hr=4,Nhr=5,Dhr=6,Md=/*#__PURE__*/function(){function Md1(t){_class_call_check(this,Md1);this.type=t}_create_class(Md1,[{key:"getLength",value:function getLength(){return 1}},{key:"getContent",value:function getContent(){return[this.type]}},{key:"isCountable",value:function isCountable(){return!0}},{key:"copy",value:function copy(){return new Md(this.type._copy())}},{key:"splice",value:function splice(t){throw $u()}},{key:"mergeWith",value:function mergeWith(t){return!1}},{key:"integrate",value:function integrate(t,r){this.type._integrate(t.doc,r)}},{key:"delete",value:function _delete(t){var r=this.type._start;for(;r!==null;)r.deleted?r.id.clock<(t.beforeState.get(r.id.client)||0)&&t._mergeStructs.push(r):r.delete(t),r=r.right;this.type._map.forEach(function(n){n.deleted?n.id.clock<(t.beforeState.get(n.id.client)||0)&&t._mergeStructs.push(n):n.delete(t)}),t.changed.delete(this.type)}},{key:"gc",value:function gc(t){var r=this.type._start;for(;r!==null;)r.gc(t,!0),r=r.right;this.type._start=null,this.type._map.forEach(function(n){for(;n!==null;)n.gc(t,!0),n=n.left}),this.type._map=new Map}},{key:"write",value:function write(t,r){this.type._write(t)}},{key:"getRef",value:function getRef(){return 7}}]);return Md1}(),qhr=function(e){return new Md(Ahr[e.readTypeRef()](e))};var YR=function(e,t,r){var _t_id=t.id,n=_t_id.client,i=_t_id.clock,a=new Oa(Tn(n,i+r),t,Tn(n,i+r-1),t.right,t.rightOrigin,t.parent,t.parentSub,t.content.splice(r));return t.deleted&&a.markDeleted(),t.keep&&(a.keep=!0),t.redone!==null&&(a.redone=Tn(t.redone.client,t.redone.clock+r)),t.right=a,a.right!==null&&(a.right.left=a),e._mergeStructs.push(a),a.parentSub!==null&&a.right===null&&a.parent._map.set(a.parentSub,a),t.length=r,a};var Oa=/*#__PURE__*/function(j51){_inherits(Oa1,j51);function Oa1(t,r,n,i,a,o,s,l){_class_call_check(this,Oa1);var _this;_this=_call_super(this,Oa1,[t,l.getLength()]),_this.origin=n,_this.left=r,_this.right=i,_this.rightOrigin=a,_this.parent=o,_this.parentSub=s,_this.redone=null,_this.content=l,_this.info=_this.content.isCountable()?2:0;return _this}_create_class(Oa1,[{key:"marker",get:function get1(){return(this.info&8)>0},set:function set1(t){(this.info&8)>0!==t&&(this.info^=8)}},{key:"keep",get:function get1(){return(this.info&1)>0},set:function set1(t){this.keep!==t&&(this.info^=1)}},{key:"countable",get:function get1(){return(this.info&2)>0}},{key:"deleted",get:function get1(){return(this.info&4)>0},set:function set1(t){this.deleted!==t&&(this.info^=4)}},{key:"markDeleted",value:function markDeleted(){this.info|=4}},{key:"getMissing",value:function getMissing(t,r){if(this.origin&&this.origin.client!==this.id.client&&this.origin.clock>=Ho(r,this.origin.client))return this.origin.client;if(this.rightOrigin&&this.rightOrigin.client!==this.id.client&&this.rightOrigin.clock>=Ho(r,this.rightOrigin.client))return this.rightOrigin.client;if(this.parent&&this.parent.constructor===U0&&this.id.client!==this.parent.client&&this.parent.clock>=Ho(r,this.parent.client))return this.parent.client;if(this.origin&&(this.left=l$e(t,r,this.origin),this.origin=this.left.lastId),this.rightOrigin&&(this.right=V0(t,this.rightOrigin),this.rightOrigin=this.right.id),this.left&&this.left.constructor===Gl||this.right&&this.right.constructor===Gl)this.parent=null;else if(!this.parent)this.left&&this.left.constructor===Oa?(this.parent=this.left.parent,this.parentSub=this.left.parentSub):this.right&&this.right.constructor===Oa&&(this.parent=this.right.parent,this.parentSub=this.right.parentSub);else if(this.parent.constructor===U0){var n=tJ(r,this.parent);n.constructor===Gl?this.parent=null:this.parent=n.content.type}return null}},{key:"integrate",value:function integrate(t,r){if(r>0&&(this.id.clock+=r,this.left=l$e(t,t.doc.store,Tn(this.id.client,this.id.clock-1)),this.origin=this.left.lastId,this.content=this.content.splice(r),this.length-=r),this.parent){if(!this.left&&(!this.right||this.right.left!==null)||this.left&&this.left.right!==this.right){var n=this.left,i;if(n!==null)i=n.right;else if(this.parentSub!==null)for(i=this.parent._map.get(this.parentSub)||null;i!==null&&i.left!==null;)i=i.left;else i=this.parent._start;var a=new Set,o=new Set;for(;i!==null&&i!==this.right;){if(o.add(i),a.add(i),LR(this.origin,i.origin)){if(i.id.client0?Tn(this.id.client,this.id.clock+r-1):this.origin,i=this.rightOrigin,a=this.parentSub,o=this.content.getRef()&31|(n===null?0:128)|(i===null?0:64)|(a===null?0:32);if(t.writeInfo(o),n!==null&&t.writeLeftID(n),i!==null&&t.writeRightID(i),n===null&&i===null){var s=this.parent;if(s._item!==void 0){var l=s._item;if(l===null){var c=Vmr(s);t.writeParentInfo(!0),t.writeString(c)}else t.writeParentInfo(!1),t.writeLeftID(l.id)}else s.constructor===String?(t.writeParentInfo(!0),t.writeString(s)):s.constructor===U0?(t.writeParentInfo(!1),t.writeLeftID(s)):Wl();a!==null&&t.writeString(a)}this.content.write(t,r)}}]);return Oa1}(j5),W$e=function(e,t){return Lhr[t&31](e)},Lhr=[function(){Wl()},bhr,Ehr,_hr,Chr,Shr,khr,qhr,Ihr,whr,function(){Wl()}],Fhr=10,Hl=/*#__PURE__*/function(j51){_inherits(Hl1,j51);function Hl1(){_class_call_check(this,Hl1);return _call_super(this,Hl1,arguments)}_create_class(Hl1,[{key:"deleted",get:function get1(){return!0}},{key:"delete",value:function _delete(){}},{key:"mergeWith",value:function mergeWith(t){return this.constructor!==t.constructor?!1:(this.length+=t.length,!0)}},{key:"integrate",value:function integrate(t,r){Wl()}},{key:"write",value:function write(t,r){t.writeInfo(Fhr),hn(t.restEncoder,this.length-r)}},{key:"getMissing",value:function getMissing(t,r){return null}}]);return Hl1}(j5),V$e=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:{},G$e="__ $YJS$ __";V$e[G$e]===!0&&console.error("Yjs was already imported. This breaks constructor checks and will lead to issues! - https://github.com/yjs/yjs/issues/438");V$e[G$e]=!0;function jhr(e,t,r){var n=xQ(t,e,r,{excludeFalseConflicts:!0,stringSeparator:"\n"});if(n.some(function(a){return!a.ok}))return!1;var i=[];var _iteratorNormalCompletion=true,_didIteratorError=false,_iteratorError=undefined;try{for(var _iterator=n[Symbol.iterator](),_step;!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=true){var a=_step.value;a.ok&&i.push(a.ok)}}catch(err){_didIteratorError=true;_iteratorError=err}finally{try{if(!_iteratorNormalCompletion&&_iterator.return!=null){_iterator.return()}}finally{if(_didIteratorError){throw _iteratorError}}}return i.flat().join("\n")}function H$e(param){var e=param.localContentText,t=param.remoteContentText,r=param.baseContentText;if(e===t)return{success:!0,isIdentical:!0};var _oMe=oMe(e,r,t,{excludeFalseConflicts:!0,stringSeparator:"\n",label:{a:"LOCAL",o:"BASE",b:"REMOTE"}}),n=_oMe.result;return{success:!0,mergedText:n.join("\n")}}var lf=Symbol("missing-json-value");function SJ(e){return e!==null&&(typeof e==="undefined"?"undefined":_type_of(e))=="object"&&!Array.isArray(e)}function kJ(e,t){return e===lf||t===lf?e===t:QK(e,t)}function Z$e(e,t,r){if(kJ(t,r))return t;if(kJ(t,e))return r;if(kJ(r,e))return t;if(SJ(t)&&SJ(r)&&(SJ(e)||e===lf)){var n=e===lf?{}:e,i=new Set(_to_consumable_array(Object.keys(t)).concat(_to_consumable_array(Object.keys(r)),_to_consumable_array(Object.keys(n)))),a=Object.create(null);var _iteratorNormalCompletion=true,_didIteratorError=false,_iteratorError=undefined;try{for(var _iterator=i[Symbol.iterator](),_step;!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=true){var o=_step.value;var s=Z$e(Object.hasOwn(n,o)?n[o]:lf,Object.hasOwn(t,o)?t[o]:lf,Object.hasOwn(r,o)?r[o]:lf);s!==lf&&(a[o]=s)}}catch(err){_didIteratorError=true;_iteratorError=err}finally{try{if(!_iteratorNormalCompletion&&_iterator.return!=null){_iterator.return()}}finally{if(_didIteratorError){throw _iteratorError}}}return a}return t}function Uhr(e){if(!e.includes("\n"))return;var t=e.match(/\n([\t ]+)\S/);return t?t[1].startsWith(" ")?" ":t[1].length:2}function Bhr(e,t,r,n){try{var i=JSON.parse(t),a=JSON.parse(r),o=n?JSON.parse(e):lf,s=Z$e(o,i,a);if(s===lf)return;var l=t.endsWith("\n")?"\n":"";return JSON.stringify(s,null,Uhr(t))+l}catch(i){return}}function Whr(e,t,r){var i=new B5.diff_match_patch().diff_main(t,r),a=0;e.doc.transact(function(){var _iteratorNormalCompletion=true,_didIteratorError=false,_iteratorError=undefined;try{for(var _iterator=i[Symbol.iterator](),_step;!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=true){var _step_value=_sliced_to_array(_step.value,2),o=_step_value[0],s=_step_value[1];switch(o){case B5.diff_match_patch.DIFF_EQUAL:a+=s.length;break;case B5.diff_match_patch.DIFF_DELETE:e.delete(a,s.length);break;case B5.diff_match_patch.DIFF_INSERT:e.insert(a,s),a+=s.length}}}catch(err){_didIteratorError=true;_iteratorError=err}finally{try{if(!_iteratorNormalCompletion&&_iterator.return!=null){_iterator.return()}}finally{if(_didIteratorError){throw _iteratorError}}}})}function Vhr(e,t,r){var n=new Rd;n.getText("content").insert(0,e);var i=vJ(n),a=w$e(n),o=function(l){var c=new Rd;return U5(c,i),Whr(c.getText("content"),e,l),vJ(c,a)},s=new Rd;return U5(s,i),U5(s,o(t)),U5(s,o(r)),s.getText("content").toString()}function K$e(e){return _async_to_generator(function(){var t,r,n,i,tmp,a,_$s,o;return _ts_generator(this,function(_state){t=e.localContentText,r=e.remoteContentText,n=e.baseContentText,i=e.filePath,tmp=e.hasBase,a=tmp===void 0?!0:tmp;if(t===r)return[2,{success:!0,isIdentical:!0}];if(i!=null&&i.trim().toLowerCase().endsWith(".json")){_$s=Bhr(n,t,r,a);if(_$s!==void 0)return[2,{success:!0,mergedText:_$s}]}o=jhr(n,t,r);if(o!==!1)return[2,{success:!0,mergedText:o}];try{return[2,{success:!0,mergedText:Vhr(n,t,r)}]}catch(s){return[2,{success:!1,error:_instanceof(s,Error)?s.message:String(s)}]}return[2]})})()}var lb=function(i){return i.NoConflictMerge="no-conflict-merge",i.Diff3="diff3",i.LocalPriority="local-priority",i.ServerPriority="server-priority",i}(lb||{}),Oc=/*#__PURE__*/function(mi1){_inherits(Oc1,mi1);function Oc1(r){_class_call_check(this,Oc1);var _this;_this=_call_super(this,Oc1,[r]);_this.options=r;return _this}_create_class(Oc1,[{key:"exec",value:function exec(){return _async_to_generator(function(){var r,n,_$i,_tmp,a,_tmp1,_,i;return _ts_generator(this,function(_state){switch(_state.label){case 0:_state.trys.push([0,16,,17]);this.logger.info("[ConflictResolve] ".concat(this.localPath," strategy=").concat(this.options.strategy));if(!((r=this.options.localStat)!=null))return[3,1];_tmp=r;return[3,3];case 1:return[4,$s(this.vault,this.localPath)];case 2:_tmp=_state.sent();_state.label=3;case 3:_$i=_tmp;if(!_$i)throw new Error("Local file not found: "+this.localPath);if(!((n=this.options.remoteStat)!=null))return[3,4];_tmp1=n;return[3,6];case 4:return[4,iMe(this.webdav,this.remotePath)];case 5:_tmp1=_state.sent();_state.label=6;case 6:a=_tmp1;if(a.isDir)throw new Error("Remote path is a directory: "+this.remotePath);if(_$i.isDir)throw new Error("Local path is a directory: "+this.localPath);if(_$i.size===0&&a.size===0)return[2,{success:!0}];_=this.options.strategy;switch(_){case"no-conflict-merge":return[3,7];case"diff3":return[3,9];case"local-priority":return[3,11];case"server-priority":return[3,13]}return[3,15];case 7:return[4,this.execMerge(K$e,"NoConflictMerge")];case 8:return[2,_state.sent()];case 9:return[4,this.execMerge(H$e,"Diff3")];case 10:return[2,_state.sent()];case 11:return[4,this.execLocalPriority()];case 12:return[2,_state.sent()];case 13:return[4,this.execServerPriority(a)];case 14:return[2,_state.sent()];case 15:return[3,17];case 16:i=_state.sent();return[2,(this.logger.error("[ConflictResolve] failed: ".concat(this.localPath),i),{success:!1,error:Li(i,this)})];case 17:return[2]}})}).call(this)}},{key:"execLocalPriority",value:function execLocalPriority(){return _async_to_generator(function(){var n,r;return _ts_generator(this,function(_state){switch(_state.label){case 0:_state.trys.push([0,4,,5]);return[4,Ru(this.vault,this.localPath)];case 1:if(!_state.sent())return[2,{success:!1,error:Li(new Error("cannot find file in local fs: "+this.localPath),this)}];return[4,Am(this.vault,this.localPath)];case 2:n=_state.sent();return[4,this.webdav.putFileContents(this.remotePath,n,{overwrite:!0})];case 3:return[2,(_state.sent(),{success:!0})];case 4:r=_state.sent();return[2,(this.logger.error("[ConflictResolve/LocalPriority] failed: ".concat(this.localPath),r),{success:!1,error:Li(r,this)})];case 5:return[2]}})}).call(this)}},{key:"execServerPriority",value:function execServerPriority(r){return _async_to_generator(function(){var n;return _ts_generator(this,function(_state){switch(_state.label){case 0:_state.trys.push([0,2,,3]);if(r.isDir)throw new Error("Remote path is a directory: "+this.remotePath);return[4,uR({vault:this.vault,webdav:this.webdav,remotePath:this.remotePath,localPath:this.localPath,remoteSize:r.size,mobileAppDownloadFileChunkSize:this.options.mobileAppDownloadFileChunkSize})];case 1:return[2,(_state.sent(),{success:!0})];case 2:n=_state.sent();return[2,(this.logger.error("[ConflictResolve/ServerPriority] failed: ".concat(this.localPath),n),{success:!1,error:Li(n,this)})];case 3:return[2]}})}).call(this)}},{key:"execMerge",value:function execMerge(r,n){return _async_to_generator(function(){var i,a,s,l,_this_options,c,d,u,_tmp,p,m,h,g,x,y,v,_tmp1,_tmp2,o;return _ts_generator(this,function(_state){switch(_state.label){case 0:_state.trys.push([0,16,,17]);return[4,Ru(this.vault,this.localPath)];case 1:if(!_state.sent())throw new Error("cannot find file in local fs: "+this.localPath);return[4,Am(this.vault,this.localPath)];case 2:s=_state.sent();return[4,this.webdav.getFileContents(this.remotePath,{format:"binary",details:!1})];case 3:l=_state.sent();if(aR(s,l))return[2,{success:!0}];_this_options=this.options,c=_this_options.record,d=null,u=(i=c==null?void 0:c.base)==null?void 0:i.key;_tmp=u;if(!_tmp)return[3,5];return[4,L0.get(u)];case 4:_tmp=d=_state.sent();_state.label=5;case 5:_tmp;p=c5(this.localPath),m=c5(this.remotePath);if(!(p&&m))throw new Error($.t("sync.error.mergeNotSupported"));return[4,new Blob([new Uint8Array(s)]).text()];case 6:h=_state.sent();return[4,new Blob([new Uint8Array(l)]).text()];case 7:g=_state.sent();return[4,d==null?void 0:d.text()];case 8:x=(a=_state.sent())!=null?a:"";return[4,r({localContentText:h,remoteContentText:g,baseContentText:x,filePath:this.localPath,hasBase:d!==null})];case 9:y=_state.sent();if(this.logger.info("[ConflictResolve/".concat(n,"] ").concat(this.localPath,": merge ").concat(y.success?"ok":"failed")),!y.success)throw new Error($.t("sync.error.failedToAutoMerge"));if(y.isIdentical)return[2,{success:!0}];v=y.mergedText;if(!(v===g))return[3,12];_tmp1=v!==h;if(!_tmp1)return[3,11];return[4,M_(this.vault,this.localPath,v)];case 10:_tmp1=_state.sent();_state.label=11;case 11:return[2,(_tmp1,{success:!0})];case 12:return[4,this.webdav.putFileContents(this.remotePath,v,{overwrite:!0})];case 13:if(!_state.sent())throw new Error($.t("sync.error.failedToUploadMerged"));_tmp2=h!==v;if(!_tmp2)return[3,15];return[4,M_(this.vault,this.localPath,v)];case 14:_tmp2=_state.sent();_state.label=15;case 15:return[2,(_tmp2,{success:!0})];case 16:o=_state.sent();return[2,(this.logger.error("[ConflictResolve/".concat(n,"] failed: ").concat(this.localPath),o),{success:!1,error:Li(o,this)})];case 17:return[2]}})}).call(this)}}]);return Oc1}(mi);var Ghr=':*?"<>|',Q$e=Ghr.split("");function Rc(e){return Q$e.some(function(t){return e.includes(t)})}function J$e(e){return Q$e.filter(function(t){return e.includes(t)})}var W5=/*#__PURE__*/function _target(Error1){_inherits(W51,Error1);function W51(r,n){_class_call_check(this,W51);var _this;var i;_this=_call_super(this,W51);_this.invalidChars=r;_this.filePath=n;_this.name="FilenameError",(i=Object.setPrototypeOf)==null||i.call(Object,_this,(_instanceof(this,W51)?this.constructor:void 0).prototype),Object.defineProperty(_this,"message",{configurable:!0,get:function(){return W5.format(_this.invalidChars,_this.filePath)}});return _this}_create_class(W51,null,[{key:"format",value:function format(r,n){var a=Array.from(new Set(r)).map(function(o){return"'".concat(o,"'")}).join(", ");return $.t("errors.filenameUnsupportedChars",{chars:a,path:n})}}]);return W51}(_wrap_native_super(Error)),Dm=/*#__PURE__*/function(mi1){_inherits(Dm1,mi1);function Dm1(){_class_call_check(this,Dm1);return _call_super(this,Dm1,arguments)}_create_class(Dm1,[{key:"exec",value:function exec(){var t=J$e(this.localPath);return{success:!1,error:Li(new W5(t,this.localPath),this)}}}]);return Dm1}(mi);var $d=/*#__PURE__*/function(mi1){_inherits($d1,mi1);function $d1(){_class_call_check(this,$d1);return _call_super(this,$d1,arguments)}_create_class($d1,[{key:"exec",value:function exec(){return _async_to_generator(function(){var t;return _ts_generator(this,function(_state){switch(_state.label){case 0:_state.trys.push([0,2,,3]);this.logger.info("[MkdirLocal] ".concat(this.localPath));return[4,ps(this.vault,this.localPath)];case 1:return[2,(_state.sent(),{success:!0})];case 2:t=_state.sent();return[2,(this.logger.error("[MkdirLocal] failed: ".concat(this.localPath),t),{success:!1,error:Li(t,this)})];case 3:return[2]}})}).call(this)}}]);return $d1}(mi);var fs=/*#__PURE__*/function(mi1){_inherits(fs1,mi1);function fs1(){_class_call_check(this,fs1);return _call_super(this,fs1,arguments)}_create_class(fs1,[{key:"exec",value:function exec(){return _async_to_generator(function(){var t;return _ts_generator(this,function(_state){switch(_state.label){case 0:_state.trys.push([0,3,,4]);return[4,$s(this.vault,this.localPath)];case 1:if(!_state.sent())throw this.logger.debug("[MkdirRemote] local path not found:",this.localPath),new Error($.t("sync.error.localPathNotFound",{path:this.localPath}));this.logger.info("[MkdirRemote] ".concat(this.remotePath));return[4,this.webdav.createDirectory(this.remotePath,{recursive:!0})];case 2:return[2,(_state.sent(),{success:!0})];case 3:t=_state.sent();return[2,(this.logger.error("[MkdirRemote] failed: ".concat(this.remotePath),t),{success:!1,error:Li(t,this)})];case 4:return[2]}})}).call(this)}}]);return fs1}(mi);var Mc=/*#__PURE__*/function(mi1){_inherits(Mc1,mi1);function Mc1(r){_class_call_check(this,Mc1);var _this;_this=_call_super(this,Mc1,[r]);C(_this,"additionalPaths");_this.additionalPaths=r.additionalPaths;return _this}_create_class(Mc1,[{key:"exec",value:function exec(){return _async_to_generator(function(){var r;return _ts_generator(this,function(_state){switch(_state.label){case 0:_state.trys.push([0,3,,4]);return[4,$s(this.vault,this.localPath)];case 1:if(!_state.sent())throw this.logger.debug("MkdirsRemoteTask: local path:",this.localPath),this.logger.debug("MkdirsRemoteTask: local stat is null"),new Error($.t("sync.error.localPathNotFound",{path:this.localPath}));return[4,this.webdav.createDirectory(this.remotePath,{recursive:!0})];case 2:return[2,(_state.sent(),{success:!0})];case 3:r=_state.sent();return[2,(this.logger.error(this,r),{success:!1,error:Li(r,this)})];case 4:return[2]}})}).call(this)}},{key:"getAllPaths",value:function getAllPaths(){return[{localPath:this.localPath,remotePath:this.remotePath}].concat(_to_consumable_array(this.additionalPaths))}},{key:"toJSON",value:function toJSON(){return _object_spread_props(_object_spread({},_get(_get_prototype_of(Mc1.prototype),"toJSON",this).call(this)),{additionalPaths:this.additionalPaths,totalDirs:this.getAllPaths().length})}}]);return Mc1}(mi);var Zl=/*#__PURE__*/function(mi1){_inherits(Zl1,mi1);function Zl1(){_class_call_check(this,Zl1);return _call_super(this,Zl1,arguments)}_create_class(Zl1,[{key:"exec",value:function exec(){return{success:!0}}}]);return Zl1}(mi);var $c=/*#__PURE__*/function(mi1){_inherits($c1,mi1);function $c1(r){_class_call_check(this,$c1);var _this;_this=_call_super(this,$c1,[r]);_this.options=r;return _this}_create_class($c1,[{key:"remoteSize",get:function get1(){return this.options.remoteSize}},{key:"exec",value:function exec(){return _async_to_generator(function(){var r;return _ts_generator(this,function(_state){switch(_state.label){case 0:_state.trys.push([0,2,,3]);this.logger.info("[PullTask] ".concat(this.remotePath," → ").concat(this.localPath," (").concat(this.remoteSize," bytes)"));return[4,uR({vault:this.vault,webdav:this.webdav,remotePath:this.remotePath,localPath:this.localPath,remoteSize:this.remoteSize,mobileAppDownloadFileChunkSize:this.options.mobileAppDownloadFileChunkSize})];case 1:return[2,(_state.sent(),{success:!0})];case 2:r=_state.sent();return[2,(this.logger.error("[PullTask] failed: ".concat(this.localPath),r),{success:!1,error:Li(r,this)})];case 3:return[2]}})}).call(this)}}]);return $c1}(mi);var Nc=/*#__PURE__*/function(mi1){_inherits(Nc1,mi1);function Nc1(){_class_call_check(this,Nc1);return _call_super(this,Nc1,arguments)}_create_class(Nc1,[{key:"exec",value:function exec(){return _async_to_generator(function(){var r,n,t;return _ts_generator(this,function(_state){switch(_state.label){case 0:_state.trys.push([0,4,,5]);return[4,Ru(this.vault,this.localPath)];case 1:if(!_state.sent())throw new Error("cannot find file in local fs: "+this.localPath);return[4,Am(this.vault,this.localPath)];case 2:r=_state.sent();this.logger.info("[PushTask] ".concat(this.localPath," → ").concat(this.remotePath," (").concat(r.byteLength," bytes)"));return[4,this.webdav.putFileContents(this.remotePath,r,{overwrite:!0})];case 3:n=_state.sent();if(!n)throw new Error("Upload failed");return[2,{success:n}];case 4:t=_state.sent();return[2,(this.logger.error("[PushTask] failed: ".concat(this.localPath),t),{success:!1,error:Li(t,this)})];case 5:return[2]}})}).call(this)}}]);return Nc1}(mi);var Kl=/*#__PURE__*/function(mi1){_inherits(Kl1,mi1);function Kl1(r){_class_call_check(this,Kl1);var _this;_this=_call_super(this,Kl1,[r]);_this.options=r;return _this}_create_class(Kl1,[{key:"exec",value:function exec(){return _async_to_generator(function(){var _tmp,r;return _ts_generator(this,function(_state){switch(_state.label){case 0:_state.trys.push([0,5,,6]);return[4,$s(this.vault,this.localPath)];case 1:if(!_state.sent())return[3,3];this.logger.info("[RemoveLocal] ".concat(this.localPath));return[4,sR(this.vault,this.localPath,this.options.recursive)];case 2:_tmp=(_state.sent(),{success:!0});return[3,4];case 3:_tmp={success:!0};_state.label=4;case 4:return[2,_tmp];case 5:r=_state.sent();return[2,(this.logger.error("[RemoveLocal] failed: ".concat(this.localPath),r),{success:!1,error:Li(r,this)})];case 6:return[2]}})}).call(this)}}]);return Kl1}(mi);var Nd=/*#__PURE__*/function(mi1){_inherits(Nd1,mi1);function Nd1(){_class_call_check(this,Nd1);return _call_super(this,Nd1,arguments)}_create_class(Nd1,[{key:"exec",value:function exec(){return _async_to_generator(function(){var t;return _ts_generator(this,function(_state){switch(_state.label){case 0:_state.trys.push([0,2,,3]);return[4,this.webdav.deleteFile(this.remotePath)];case 1:return[2,(_state.sent(),{success:!0})];case 2:t=_state.sent();return[2,(this.logger.error(t),{success:!1,error:Li(t,this)})];case 3:return[2]}})}).call(this)}}]);return Nd1}(mi);var Nu=/*#__PURE__*/function(mi1){_inherits(Nu1,mi1);function Nu1(){_class_call_check(this,Nu1);return _call_super(this,Nu1,arguments)}_create_class(Nu1,[{key:"exec",value:function exec(){return _async_to_generator(function(){var t;return _ts_generator(this,function(_state){switch(_state.label){case 0:_state.trys.push([0,2,,3]);this.logger.info("[RemoveRemote] ".concat(this.remotePath));return[4,this.webdav.deleteFile(this.remotePath)];case 1:return[2,(_state.sent(),{success:!0})];case 2:t=_state.sent();return[2,(this.logger.error("[RemoveRemote] failed: ".concat(this.remotePath),t),{success:!1,error:Li(t,this)})];case 3:return[2]}})}).call(this)}}]);return Nu1}(mi);var Du=/*#__PURE__*/function(mi1){_inherits(Du1,mi1);function Du1(r){_class_call_check(this,Du1);var _this;_this=_call_super(this,Du1,[r]);_this.options=r;return _this}_create_class(Du1,[{key:"exec",value:function exec(){return{success:!0,skipRecord:!0}}}]);return Du1}(mi);function qm(e){if(_instanceof(e,Ul))return $.t("sync.fileOp.cleanRecord");if(_instanceof(e,Oc))return $.t("sync.fileOp.merge");if(_instanceof(e,Dm))return $.t("sync.fileOp.filenameError");if(_instanceof(e,$d))return $.t("sync.fileOp.createLocalDir");if(_instanceof(e,fs))return $.t("sync.fileOp.createRemoteDir");if(_instanceof(e,Mc))return $.t("sync.fileOp.createRemoteDirs");if(_instanceof(e,Zl))return $.t("sync.fileOp.noop");if(_instanceof(e,$c))return $.t("sync.fileOp.download");if(_instanceof(e,Nc))return $.t("sync.fileOp.upload");if(_instanceof(e,Kl))return $.t("sync.fileOp.removeLocal");if(_instanceof(e,Nu))return $.t("sync.fileOp.removeRemote");if(_instanceof(e,Nd))return $.t("sync.fileOp.removeRemoteRecursively");if(_instanceof(e,Du)){var t=function(){if(e.options.reason==="file-too-large")return $.t("sync.skipReason.file-too-large");if(e.options.reason==="folder-contains-ignored-items")return $.t("sync.skipReason.folder-contains-ignored-items");if(e.options.reason==="conflict-in-send-only-mode")return $.t("sync.skipReason.conflict-in-send-only-mode");if(e.options.reason==="conflict-in-receive-only-mode")return $.t("sync.skipReason.conflict-in-receive-only-mode");if(e.options.reason==="deleted-locally-but-changed-remotely")return $.t("sync.skipReason.deleted-locally-but-changed-remotely");if(e.options.reason==="deleted-remotely-but-changed-locally")return $.t("sync.skipReason.deleted-remotely-but-changed-locally")}();return"".concat($.t("sync.fileOp.skip"),": ").concat(t)}return $.t("sync.fileOp.sync")}var Wn={context:void 0,registry:void 0,effects:void 0,done:!1,getContextId:function getContextId(){return Y$e(this.context.count)},getNextContextId:function getNextContextId(){return Y$e(this.context.count++)}};function Y$e(e){var t=String(e),r=t.length-1;return Wn.context.id+(r?String.fromCharCode(96+r):"")+t}function IJ(e){Wn.context=e}function Hhr(){return _object_spread_props(_object_spread({},Wn.context),{id:Wn.getNextContextId(),count:0})}var Zhr=!1,Khr=function(e,t){return e===t},Q0=Symbol("solid-proxy");var aM=Symbol("solid-track"),U9n=Symbol("solid-dev-component"),nM={equals:Khr},X$e=null,aNe=fNe,qu=1,V5=2,oNe={owned:null,cleanups:null,context:null,owner:null},TJ={},gn=null,ct=null,db=null,ub=null,Qn=null,Ya=null,Ds=null,oM=0;function cb(e,t){var r=Qn,n=gn,i=e.length===0,a=t===void 0?n:t,o=i?oNe:{owned:null,cleanups:null,context:a?a.context:null,owner:a},s=i?e:function(){return e(function(){return ms(function(){return K0(o)})})};gn=o,Qn=null;try{return Ql(s,!0)}finally{Qn=r,gn=n}}function nr(e,t){t=t?Object.assign({},nM,t):nM;var r={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0},n=function(i){return typeof i=="function"&&(ct&&ct.running&&ct.sources.has(r)?i=i(r.tValue):i=i(r.value)),pNe(r,i)};return[dNe.bind(r),n]}function eNe(e,t,r){var n=cM(e,t,!0,qu);db&&ct&&ct.running?Ya.push(n):pb(n)}function wt(e,t,r){var n=cM(e,t,!1,qu);db&&ct&&ct.running?Ya.push(n):pb(n)}function Gi(e,t,r){aNe=t0r;var n=cM(e,t,!1,qu),i=G5&&cNe(G5);i&&(n.suspense=i),(!r||!r.render)&&(n.user=!0),Ds?Ds.push(n):pb(n)}function si(e,t,r){r=r?Object.assign({},nM,r):nM;var n=cM(e,t,!0,0);return n.observers=null,n.observerSlots=null,n.comparator=r.equals||void 0,db&&ct&&ct.running?(n.tState=qu,Ya.push(n)):pb(n),dNe.bind(n)}function Qhr(e){return e&&(typeof e==="undefined"?"undefined":_type_of(e))=="object"&&"then"in e}function sNe(e,t,r){var n,i,a;typeof t=="function"?(n=e,i=t,a=r||{}):(n=!0,i=e,a=t||{});var o=null,s=TJ,l=null,c=!1,d=!1,u="initialValue"in a,p=typeof n=="function"&&si(n),m=new Set,_ref=_sliced_to_array((a.storage||nr)(a.initialValue),2),h=_ref[0],g=_ref[1],_nr1=_sliced_to_array(nr(void 0),2),x=_nr1[0],y=_nr1[1],_nr2=_sliced_to_array(nr(void 0,{equals:!1}),2),v=_nr2[0],_=_nr2[1],_nr3=_sliced_to_array(nr(u?"ready":"unresolved"),2),b=_nr3[0],k=_nr3[1];Wn.context&&(l=Wn.getNextContextId(),a.ssrLoadFrom==="initial"?s=a.initialValue:Wn.load&&Wn.has(l)&&(s=Wn.load(l)));function w(A,O,R,M){return o===A&&(o=null,M!==void 0&&(u=!0),(A===s||O===s)&&a.onHydrated&&queueMicrotask(function(){return a.onHydrated(M,{value:O})}),s=TJ,ct&&A&&c?(ct.promises.delete(A),c=!1,Ql(function(){ct.running=!0,S(O,R)},!1)):S(O,R)),O}function S(A,O){Ql(function(){O===void 0&&g(function(){return A}),k(O!==void 0?"errored":u?"ready":"unresolved"),y(O);var _iteratorNormalCompletion=true,_didIteratorError=false,_iteratorError=undefined;try{for(var _iterator=m.keys()[Symbol.iterator](),_step;!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=true){var R=_step.value;R.decrement()}}catch(err){_didIteratorError=true;_iteratorError=err}finally{try{if(!_iteratorNormalCompletion&&_iterator.return!=null){_iterator.return()}}finally{if(_didIteratorError){throw _iteratorError}}}m.clear()},!1)}function E(){var A=G5&&cNe(G5),O=h(),R=x();if(R!==void 0&&!o)throw R;return Qn&&!Qn.user&&A&&eNe(function(){v(),o&&(A.resolved&&ct&&c?ct.promises.add(o):m.has(A)||(A.increment(),m.add(A)))}),O}function T(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;if(A!==!1&&d)return;d=!1;var O=p?p():n;if(c=ct&&ct.running,O==null||O===!1){w(o,ms(h));return}ct&&o&&ct.promises.delete(o);var R,M=s!==TJ?s:ms(function(){try{return i(O,{value:h(),refetching:A})}catch(N){R=N}});if(R!==void 0){w(o,void 0,rM(R),O);return}else if(!Qhr(M))return w(o,M,void 0,O),M;return o=M,"v"in M?(M.s===1?w(o,M.v,void 0,O):w(o,void 0,rM(M.v),O),M):(d=!0,queueMicrotask(function(){return d=!1}),Ql(function(){k(u?"refreshing":"pending"),_()},!1),M.then(function(N){return w(M,N,void 0,O)},function(N){return w(M,void 0,rM(N),O)}))}Object.defineProperties(E,{state:{get:function(){return b()}},error:{get:function(){return x()}},loading:{get:function get1(){var A=b();return A==="pending"||A==="refreshing"}},latest:{get:function get1(){if(!u)return E();var A=x();if(A&&!o)throw A;return h()}}});var I=gn;return p?eNe(function(){return I=gn,T(!1)}):T(!1),[E,{refetch:function(A){return AJ(I,function(){return T(A)})},mutate:g}]}function lNe(e){return Ql(e,!1)}function ms(e){if(!ub&&Qn===null)return e();var t=Qn;Qn=null;try{return ub?ub.untrack(e):e()}finally{Qn=t}}function sM(e,t,r){var n=Array.isArray(e),i,a=r&&r.defer;return function(o){var s;if(n){s=Array(e.length);for(var c=0;c1e6)throw Ya=[],new Error},!1)}return t}function pb(e){if(!e.fn)return;K0(e);var t=oM;rNe(e,ct&&ct.running&&ct.sources.has(e)?e.tValue:e.value,t),ct&&!ct.running&&ct.sources.has(e)&&queueMicrotask(function(){Ql(function(){ct&&(ct.running=!0),Qn=gn=e,rNe(e,e.tValue,t),Qn=gn=null},!1)})}function rNe(e,t,r){var n,i=gn,a=Qn;Qn=gn=e;try{n=e.fn(t)}catch(o){return e.pure&&(ct&&ct.running?(e.tState=qu,e.tOwned&&e.tOwned.forEach(K0),e.tOwned=void 0):(e.state=qu,e.owned&&e.owned.forEach(K0),e.owned=null)),e.updatedAt=r+1,dM(o)}finally{Qn=a,gn=i}(!e.updatedAt||e.updatedAt<=r)&&(e.updatedAt!=null&&"observers"in e?pNe(e,n,!0):ct&&ct.running&&e.pure?(ct.sources.add(e),e.tValue=n):e.value=n,e.updatedAt=r)}function cM(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:qu,i=arguments.length>4?arguments[4]:void 0;var a={fn:e,state:n,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:gn,context:gn?gn.context:null,pure:r};if(ct&&ct.running&&(a.state=0,a.tState=n),gn===null||gn!==oNe&&(ct&&ct.running&&gn.pure?gn.tOwned?gn.tOwned.push(a):gn.tOwned=[a]:gn.owned?gn.owned.push(a):gn.owned=[a]),ub&&a.fn){var _nr1=_sliced_to_array(nr(void 0,{equals:!1}),2),o=_nr1[0],s=_nr1[1],l=ub.factory(a.fn,s);Xa(function(){return l.dispose()});var c=function(){return Jhr(s).then(function(){return d.dispose()})},d=ub.factory(a.fn,c);a.fn=function(u){return o(),ct&&ct.running?d.track(u):l.track(u)}}return a}function H5(e){var t=ct&&ct.running;if((t?e.tState:e.state)===0)return;if((t?e.tState:e.state)===V5)return iM(e);if(e.suspense&&ms(e.suspense.inFallback))return e.suspense.effects.push(e);var r=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt=0;n--){if(e=r[n],t){var i=e,a=r[n+1];for(;(i=i.owner)&&i!==a;)if(ct.disposed.has(i))return}if((t?e.tState:e.state)===qu)pb(e);else if((t?e.tState:e.state)===V5){var i2=Ya;Ya=null,Ql(function(){return iM(e,r[0])},!1),Ya=i2}}}function Ql(e,t){if(Ya)return e();var r=!1;t||(Ya=[]),Ds?r=!0:Ds=[],oM++;try{var _$n=e();return Xhr(r),_$n}catch(n){r||(Ds=null),Ya=null,dM(n)}}function Xhr(e){if(Ya&&(db&&ct&&ct.running?e0r(Ya):fNe(Ya),Ya=null),e)return;var t;if(ct){if(!ct.promises.size&&!ct.queue.size){var n=ct.sources,i=ct.disposed;Ds.push.apply(Ds,ct.effects),t=ct.resolve;var _iteratorNormalCompletion=true,_didIteratorError=false,_iteratorError=undefined;try{for(var _iterator=Ds[Symbol.iterator](),_step;!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=true){var a=_step.value;"tState"in a&&(a.state=a.tState),delete a.tState}}catch(err){_didIteratorError=true;_iteratorError=err}finally{try{if(!_iteratorNormalCompletion&&_iterator.return!=null){_iterator.return()}}finally{if(_didIteratorError){throw _iteratorError}}}ct=null,Ql(function(){var _iteratorNormalCompletion=true,_didIteratorError=false,_iteratorError=undefined;try{for(var _iterator=i[Symbol.iterator](),_step;!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=true){var a=_step.value;K0(a)}}catch(err){_didIteratorError=true;_iteratorError=err}finally{try{if(!_iteratorNormalCompletion&&_iterator.return!=null){_iterator.return()}}finally{if(_didIteratorError){throw _iteratorError}}}var _iteratorNormalCompletion1=true,_didIteratorError1=false,_iteratorError1=undefined;try{for(var _iterator1=n[Symbol.iterator](),_step1;!(_iteratorNormalCompletion1=(_step1=_iterator1.next()).done);_iteratorNormalCompletion1=true){var a2=_step1.value;if(a2.value=a2.tValue,a2.owned)for(var o=0,s=a2.owned.length;o=0;t--)K0(e.tOwned[t]);delete e.tOwned}if(ct&&ct.running&&e.pure)hNe(e,!0);else if(e.owned){for(t=e.owned.length-1;t>=0;t--)K0(e.owned[t]);e.owned=null}if(e.cleanups){for(t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null}ct&&ct.running?e.tState=0:e.state=0}function hNe(e,t){if(t||(e.tState=0,ct.disposed.add(e)),e.owned)for(var r=0;r1&&arguments[1]!==void 0?arguments[1]:gn;var r=X$e&&t&&t.context&&t.context[X$e],n=rM(e);if(!r)throw n;Ds?Ds.push({fn:function fn1(){nNe(n,r,t)},state:qu}):nNe(n,r,t)}function CJ(e){if(typeof e=="function"&&!e.length)return CJ(e());if(Array.isArray(e)){var t=[];for(var r=0;r2&&arguments[2]!==void 0?arguments[2]:{};var n=[],i=[],a=[],o=0,s=t.length>1?[]:null;return Xa(function(){return iNe(a)}),function(){var p=function p(m){if(a[u]=m,s){var _nr1=_sliced_to_array(nr(u),2),h=_nr1[0],g=_nr1[1];return s[u]=g,t(l[u],h)}return t(l[u])};var l=e()||[],c=l.length,d,u;return l[aM],ms(function(){var m,h,g,x,y,v,_,b,k;if(c===0)o!==0&&(iNe(a),a=[],n=[],i=[],o=0,s&&(s=[])),r.fallback&&(n=[r0r],i[0]=cb(function(w){return a[0]=w,r.fallback()}),o=1);else if(o===0){for(i=new Array(c),u=0;u=v&&b>=v&&n[_]===l[b];_--,b--)g[b]=i[_],x[b]=a[_],s&&(y[b]=s[_]);for(m=new Map,h=new Array(b+1),u=b;u>=v;u--)k=l[u],d=m.get(k),h[u]=d===void 0?-1:d,m.set(k,u);for(d=v;d<=_;d++)k=n[d],u=m.get(k),u!==void 0&&u!==-1?(g[u]=i[d],x[u]=a[d],s&&(y[u]=s[d]),u=h[u],m.set(k,u)):a[d]();for(u=v;u.")};function Vn(e){var t="fallback"in e&&{fallback:function(){return e.fallback}};return si(n0r(function(){return e.each},e.children,t||void 0))}function At(e){var t=e.keyed,r=si(function(){return e.when},void 0,void 0),n=t?r:si(r,void 0,{equals:function(i,a){return!i==!a}});return si(function(){var i=n();if(i){var a=e.children;return typeof a=="function"&&a.length>0?ms(function(){return a(t?i:function(){if(!ms(n))throw gNe("Show");return r()})}):a}return e.fallback},void 0,void 0)}function Ux(e){var t=Yhr(function(){return e.children}),r=si(function(){var _loop=function(o){var s=o,l=i[o],c=a,d=si(function(){return c()?void 0:l.when},void 0,void 0),u=l.keyed?d:si(d,void 0,{equals:function(p,m){return!p==!m}});a=function(){return c()||(u()?[s,d,l]:void 0)}};var n=t(),i=Array.isArray(n)?n:[n],a=function(){};for(var o=0;o0?ms(function(){return s(o.keyed?a():function(){var c;if(((c=ms(r)())==null?void 0:c[0])!==i)throw gNe("Match");return a()})}):s},void 0,void 0)}function Jl(e){return e}var a0r=["allowfullscreen","async","alpha","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","hidden","indeterminate","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected","adauctionheaders","browsingtopics","credentialless","defaultchecked","defaultmuted","defaultselected","defer","disablepictureinpicture","disableremoteplayback","preservespitch","shadowrootclonable","shadowrootcustomelementregistry","shadowrootdelegatesfocus","shadowrootserializable","sharedstoragewritable"],X9n=new Set(["className","value","readOnly","noValidate","formNoValidate","isMap","noModule","playsInline","adAuctionHeaders","allowFullscreen","browsingTopics","defaultChecked","defaultMuted","defaultSelected","disablePictureInPicture","disableRemotePlayback","preservesPitch","shadowRootClonable","shadowRootCustomElementRegistry","shadowRootDelegatesFocus","shadowRootSerializable","sharedStorageWritable"].concat(_to_consumable_array(a0r)));var yNe=new Set(["beforeinput","click","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"]);var Ei=function(e){return si(function(){return e()})};function o0r(e,t,r){var n=r.length,i=t.length,a=n,o=0,s=0,l=t[i-1].nextSibling,c=null;for(;od3-s){var h=t[o];for(;s3&&arguments[3]!==void 0?arguments[3]:{};var i;return cb(function(a){i=a,t===document?e():be(t,e(),t.firstChild?null:void 0,r)},n.owner),function(){i(),t.textContent=""}}function je(e,t,r,n){var i,a=function(){var s=n?document.createElementNS("http://www.w3.org/1998/Math/MathML","template"):document.createElement("template");return s.innerHTML=e,r?s.content.firstChild.firstChild:n?s.firstChild:s.content.firstChild},o=t?function(){return ms(function(){return document.importNode(i||(i=a()),!0)})}:function(){return(i||(i=a())).cloneNode(!0)};return o.cloneNode=o,o}function ln(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:window.document;var r=t[xNe]||(t[xNe]=new Set);for(var n=0,i=e.length;n2&&arguments[2]!==void 0?arguments[2]:null;for(var n=0,i=t.length;n=0;o--){var s=t[o];if(i!==s){var l=s.parentNode===e;!a&&!o?l?e.replaceChild(i,s):e.insertBefore(i,r):l&&s.remove()}else a=!0}}else e.insertBefore(i,r);return[i]}var ePn=Symbol();var l0r="http://www.w3.org/2000/svg";function u0r(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;return t?document.createElementNS(l0r,e):document.createElement(e,{is:r})}function uf(e){var t=e.useShadow,r=document.createTextNode(""),n=function(){return e.mount||document.body},i=uM(),a,o=!!Wn.context;return Gi(function(){o&&(uM().user=o=!1),a||(a=AJ(i,function(){return si(function(){return e.children})}));var s=n();if(_instanceof(s,HTMLHeadElement)){var _nr1=_sliced_to_array(nr(!1),2),l=_nr1[0],c=_nr1[1],d=function(){return c(!0)};cb(function(u){return be(s,function(){return l()?u():a()},null)}),Xa(d)}else{var l2=u0r(e.isSVG?"g":"div",e.isSVG),c2=t&&l2.attachShadow?l2.attachShadow({mode:"open"}):l2;Object.defineProperty(l2,"_$host",{get:function get1(){return r.parentNode},configurable:!0}),be(c2,a),s.appendChild(l2),e.ref&&e.ref(l2),Xa(function(){return s.removeChild(l2)})}},void 0,{render:!o}),r}var MJ=Symbol("store-raw"),hb=Symbol("store-node"),Lm=Symbol("store-has"),bNe=Symbol("store-self");function wNe(e){var t=e[Q0];if(!t&&(Object.defineProperty(e,Q0,{value:t=new Proxy(e,p0r)}),!Array.isArray(e))){var r=Object.keys(e),n=Object.getOwnPropertyDescriptors(e);for(var i=0,a=r.length;i1&&arguments[1]!==void 0?arguments[1]:new Set;var r,n,i,a;if(r=e!=null&&e[MJ])return r;if(!J0(e)||t.has(e))return e;if(Array.isArray(e)){Object.isFrozen(e)?e=e.slice(0):t.add(e);for(var o=0,s=e.length;o3&&arguments[3]!==void 0?arguments[3]:!1;if(!n&&e[t]===r)return;var i=e[t],a=e.length;r===void 0?(delete e[t],e[Lm]&&e[Lm][t]&&i!==void 0&&e[Lm][t].$()):(e[t]=r,e[Lm]&&e[Lm][t]&&i===void 0&&e[Lm][t].$());var o=hM(e,hb),s;if((s=K5(o,t,i))&&s.$(function(){return r}),Array.isArray(e)&&e.length!==a){for(var l=e.length;l2&&arguments[2]!==void 0?arguments[2]:[];var n,i=e;if(t.length>1){n=t.shift();var o=typeof n==="undefined"?"undefined":_type_of(n),s=Array.isArray(e);if(Array.isArray(n)){for(var l=0;l1){Z5(e[n],t,[n].concat(r));return}i=e[n],r=[n].concat(r)}var a=t[0];typeof a=="function"&&(a=a(i,r),a===i)||n===void 0&&a==null||(a=gb(a),n===void 0||J0(i)&&J0(a)&&!Array.isArray(a)?kNe(i,a):Dc(e,n,a))}function ENe(){for(var _len=arguments.length,_tmp=new Array(_len),_key=0;_key<_len;_key++){_tmp[_key]=arguments[_key]}var _tmp1=_sliced_to_array(_tmp,2),e=_tmp1[0],t=_tmp1[1];var r=gb(e||{}),n=Array.isArray(r),i=wNe(r);function a(){for(var _len=arguments.length,o=new Array(_len),_key=0;_key<_len;_key++){o[_key]=arguments[_key]}lNe(function(){n&&o.length===1?f0r(r,o[0]):Z5(r,o)})}return[i,a]}var $J=Symbol("store-root");function mb(e,t,r,n,i){var a=t[r];if(e===a)return;var o=Array.isArray(e);if(r!==$J&&(!J0(e)||!J0(a)||o!==Array.isArray(a)||i&&e[i]!==a[i])){Dc(t,r,e);return}if(o){if(e.length&&a.length&&(!n||i&&e[0]&&e[0][i]!=null)){var c,d,u,p,m,h,g,x;for(u=0,p=Math.min(a.length,e.length);u=u&&m>=u&&(a[p]===e[m]||i&&a[p]&&e[m]&&a[p][i]&&a[p][i]===e[m][i]);p--,m--)y[m]=a[p];if(u>m||u>p){for(d=u;d<=m;d++)Dc(a,d,e[d]);for(;de.length&&Dc(a,"length",e.length);return}for(g=new Array(m+1),d=m;d>=u;d--)h=e[d],x=i&&h?h[i]:h,c=v.get(x),g[d]=c===void 0?-1:c,v.set(x,d);for(c=u;c<=p;c++)h=a[c],x=i&&h?h[i]:h,d=v.get(x),d!==void 0&&d!==-1&&(y[d]=a[c],d=g[d],v.set(x,d));for(d=u;de.length&&Dc(a,"length",e.length);return}var s=Object.keys(e);for(var c3=0,d3=s.length;c31&&arguments[1]!==void 0?arguments[1]:{};var r=t.merge,tmp=t.key,n=tmp===void 0?"id":tmp,i=gb(e);return function(a){if(!J0(a)||!J0(i))return i;var o=mb(i,_define_property({},$J,a),$J,r,n);return o===void 0?a:o}}function xb(e,t,r){var a;ln(Array.from(yNe),(a=t.ownerDocument)!=null?a:document);var n,i=_Ne(function(){var _ENe=_sliced_to_array(ENe(r),2),o=_ENe[0],s=_ENe[1];return n=function(l){return s(TNe(l))},ke(e,o)},t);return{update:function(o){return n(o)},destroy:i}}var oGe=require("obsidian");function gM(e){var t,r;return e?typeof e.totalTokens=="number"&&e.totalTokens>0?e.totalTokens:Math.max(0,((t=e.inputTokens)!=null?t:0)+((r=e.outputTokens)!=null?r:0)):0}function Zo(e){return e.subagents.master}function m0r(e){return Zo(e).timeline}function INe(e){return Object.values(e.subagents).flatMap(function(t){return[t].concat(_to_consumable_array(INe(t)))})}function Fm(e){return INe(Zo(e)).sort(function(t,r){return r.createdAt-t.createdAt})}function xM(e){var r;var t=m0r(e);for(var n=t.length-1;n>=0;n-=1){var i=(r=t[n])==null?void 0:r.parts.find(function(a){return a.type==="data-todos"});if((i==null?void 0:i.type)==="data-todos")return i.data.items.map(function(a){return _object_spread({},a)})}return[]}function vM(e){return e.status==="completed"||e.status==="failed"||e.status==="cancelled"}function CNe(e){var r,n;var t=(r=e==null?void 0:e.getBoundingClientRect().width)!=null?r:0;return t>0?t:(n=e==null?void 0:e.clientWidth)!=null?n:0}function ANe(e){var n,i;var t=(n=e==null?void 0:e.ownerDocument)!=null?n:document,r=CNe(e);return e!=null&&e.isConnected&&r>=486?{mountEl:e,contained:!0,hostEl:e}:{mountEl:(i=t.body)!=null?i:document.body,contained:!1,hostEl:e!=null&&e.isConnected?e:void 0}}function cf(e,t){var u,p,m,h,g,x;if(!t)return;var r=e,n=r.containerEl;if(!n)return;var i=r.modalEl,a=n.classList.contains("mod-dim"),o=(u=t.hostEl)!=null?u:t.contained?t.mountEl:void 0,s=(m=(p=o==null?void 0:o.ownerDocument)==null?void 0:p.body)!=null?m:t.mountEl,l=function(){var y=!!(o!=null&&o.isConnected)&&CNe(o)>=486,v=y?o:s;v!=null&&v.isConnected&&n.parentElement!==v&&v.appendChild(n),n.classList.toggle("ns-chatbox-contained-modal-container",y),a&&n.classList.toggle("mod-dim",!y),i==null||i.classList.toggle("ns-chatbox-contained-modal",y)};if(l(),!o)return;var c=(x=(g=(h=o.ownerDocument)==null?void 0:h.defaultView)==null?void 0:g.ResizeObserver)!=null?x:globalThis.ResizeObserver;if(!c)return;var d=new c(l);return d.observe(o),function(){d.disconnect(),a&&n.classList.add("mod-dim")}}var PNe=function(e){return e!=null&&(e=Object.getPrototypeOf(e),e===Array.prototype||e===Object.prototype)};function ONe(e,t,r){var _iteratorNormalCompletion=true,_didIteratorError=false,_iteratorError=undefined;try{for(var _iterator=Object.entries(t)[Symbol.iterator](),_step;!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=true){var _step_value=_sliced_to_array(_step.value,2),n=_step_value[0],i=_step_value[1];var a="".concat(r,".").concat(n);e[a]=i,PNe(i)&&ONe(e,i,a)}}catch(err){_didIteratorError=true;_iteratorError=err}finally{try{if(!_iteratorNormalCompletion&&_iterator.return!=null){_iterator.return()}}finally{if(_didIteratorError){throw _iteratorError}}}}function RNe(e){var t=_object_spread({},e);var _iteratorNormalCompletion=true,_didIteratorError=false,_iteratorError=undefined;try{for(var _iterator=Object.entries(e)[Symbol.iterator](),_step;!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=true){var _step_value=_sliced_to_array(_step.value,2),r=_step_value[0],n=_step_value[1];PNe(n)&&ONe(t,n,r)}}catch(err){_didIteratorError=true;_iteratorError=err}finally{try{if(!_iteratorNormalCompletion&&_iterator.return!=null){_iterator.return()}}finally{if(_didIteratorError){throw _iteratorError}}}return t}var MNe=function(e,t){var _iteratorNormalCompletion=true,_didIteratorError=false,_iteratorError=undefined;if(t)try{for(var _iterator=Object.entries(t)[Symbol.iterator](),_step;!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=true){var _step_value=_sliced_to_array(_step.value,2),r=_step_value[0],n=_step_value[1];e=e.replace(new RegExp("{{\\s*".concat(r,"\\s*}}"),"g"),n)}}catch(err){_didIteratorError=true;_iteratorError=err}finally{try{if(!_iteratorNormalCompletion&&_iterator.return!=null){_iterator.return()}}finally{if(_didIteratorError){throw _iteratorError}}}return e},h0r=function(e){return e};function $Ne(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:h0r;return function(r){for(var _len=arguments.length,n=new Array(_len>1?_len-1:0),_key=1;_key<_len;_key++){n[_key-1]=arguments[_key]}var a;r[0]==="."&&(r=r.slice(1));var i=(a=e())==null?void 0:a[r];switch(typeof i==="undefined"?"undefined":_type_of(i)){case"function":return i.apply(void 0,_to_consumable_array(n));case"string":return t(i,n[0]);default:return i}}}var x0r={en:xO,zh:vO};function v0r(e){switch(e.split("-")[0].toLowerCase()){case"zh":return"zh";default:return"en"}}var y0r=RNe(x0r[v0r(navigator.language)]),Re=$Ne(function(){return y0r},MNe);var NNe=je("