function _array_like_to_array(arr1,len){if(len==null||len>arr1.length)len=arr1.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(arr1,i){return _array_with_holes(arr1)||_iterable_to_array_limit(arr1,i)||_unsupported_iterable_to_array(arr1,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(arr1){return _array_with_holes(arr1)||_iterable_to_array(arr1)||_unsupported_iterable_to_array(arr1)||_non_iterable_rest()}function _to_consumable_array(arr1){return _array_without_holes(arr1)||_iterable_to_array(arr1)||_unsupported_iterable_to_array(arr1)||_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 f10,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(op){if(f10)throw new TypeError("Generator is already executing.");while(g&&(g=0,op[0]&&(_=0)),_)try{if(f10=1,y&&(t=op[0]&2?y["return"]:op[0]?y["throw"]||((t=y["return"])&&t.call(y),0):y.next)&&!(t=t.call(y,op[1])).done)return t;if(y=0,t)op=[op[0]&2,t.value];switch(op[0]){case 0:case 1:t=op;break;case 4:_.label++;return{value:op[1],done:false};case 5:_.label++;y=op[1];op=[0];continue;case 7:op=_.ops.pop();_.trys.pop();continue;default:if(!(t=_.trys,t=t.length>0&&t[t.length-1])&&(op[0]===6||op[0]===2)){_=0;continue}if(op[0]===3&&(!t||op[1]>t[0]&&op[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}(function(){var $T1=Object.create;var Bv1=Object.defineProperty;var HT1=Object.getOwnPropertyDescriptor;var GT1=Object.getOwnPropertyNames;var WT1=Object.getPrototypeOf,VT1=Object.prototype.hasOwnProperty;var o=function(r,e){return function(){return e||r((e={exports:{}}).exports,e),e.exports}};var zT1=function(r,e,t,a){var _iteratorNormalCompletion=true,_didIteratorError=false,_iteratorError=undefined;if(e&&(typeof e==="undefined"?"undefined":_type_of(e))=="object"||typeof e=="function")try{var _loop=function(){var i=_step.value;!VT1.call(r,i)&&i!==t&&Bv1(r,i,{get:function(){return e[i]},enumerable:!(a=HT1(e,i))||a.enumerable})};for(var _iterator=GT1(e)[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 r};var p=function(r,e,t){return t=r!=null?$T1(WT1(r)):{},zT1(e||!r||!r.__esModule?Bv1(t,"default",{value:r,enumerable:!0}):t,r)};var R=o(function(Y81,Mv1){"use strict";Mv1.exports=function(r){try{return!!r()}catch(e){return!0}}});var w=o(function(J81,kv1){"use strict";var KT1=R();kv1.exports=!KT1(function(){return Object.defineProperty({},1,{get:function get1(){return 7}})[1]!==7})});var tt=o(function(X81,jv1){"use strict";var YT1=R();jv1.exports=!YT1(function(){var r=(function(){}).bind();return typeof r!="function"||r.hasOwnProperty("prototype")})});var S=o(function(Q81,Gv1){"use strict";var $v1=tt(),Hv1=Function.prototype,_$Yi=Hv1.call,JT1=$v1&&Hv1.bind.bind(_$Yi,_$Yi);Gv1.exports=$v1?JT1:function(r){return function(){return _$Yi.apply(r,arguments)}}});var b=o(function(Z81,Wv1){"use strict";var Ji1=(typeof document==="undefined"?"undefined":_type_of(document))=="object"&&document.all;Wv1.exports=typeof Ji1=="undefined"&&Ji1!==void 0?function(r){return typeof r=="function"||r===Ji1}:function(r){return typeof r=="function"}});var we=o(function(rH1,Vv1){"use strict";Vv1.exports=function(r){return r==null}});var ir1=o(function(eH1,zv1){"use strict";var XT1=we(),QT1=TypeError;zv1.exports=function(r){if(XT1(r))throw new QT1("Can't call method on "+r);return r}});var B=o(function(tH1,Kv1){"use strict";var ZT1=ir1(),_$rO=Object;Kv1.exports=function(r){return _$rO(ZT1(r))}});var C=o(function(aH1,Yv1){"use strict";var eO1=S(),tO1=B(),aO1=eO1({}.hasOwnProperty);Yv1.exports=Object.hasOwn||function(e,t){return aO1(tO1(e),t)}});var at=o(function(iH1,Xv1){"use strict";var Xi1=w(),iO1=C(),Jv1=Function.prototype,_$nO=Xi1&&Object.getOwnPropertyDescriptor,Qi1=iO1(Jv1,"name"),uO1=Qi1&&(function(){}).name==="something",oO1=Qi1&&(!Xi1||Xi1&&_$nO(Jv1,"name").configurable);Xv1.exports={EXISTS:Qi1,PROPER:uO1,CONFIGURABLE:oO1}});var D=o(function(nH1,Qv){"use strict";Qv.exports=!1});var I=o(function(Zi1,Zv1){"use strict";var it=function it(r){return r&&r.Math===Math&&r};Zv1.exports=it((typeof globalThis==="undefined"?"undefined":_type_of(globalThis))=="object"&&globalThis)||it((typeof window==="undefined"?"undefined":_type_of(window))=="object"&&window)||it((typeof self==="undefined"?"undefined":_type_of(self))=="object"&&self)||it((typeof global==="undefined"?"undefined":_type_of(global))=="object"&&global)||it((typeof Zi1==="undefined"?"undefined":_type_of(Zi1))=="object"&&Zi1)||function(){return this}()||Function("return this")()});var ea1=o(function(uH1,ec1){"use strict";var rc1=I(),sO1=Object.defineProperty;ec1.exports=function(r,e){try{sO1(rc1,r,{value:e,configurable:!0,writable:!0})}catch(t){rc1[r]=e}return e}});var ta1=o(function(oH1,ic1){"use strict";var vO1=D(),cO1=I(),fO1=ea1(),tc1="__core-js_shared__",ac1=ic1.exports=cO1[tc1]||fO1(tc1,{});(ac1.versions||(ac1.versions=[])).push({version:"3.47.0",mode:vO1?"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 aa1=o(function(sH1,nc1){"use strict";var lO1=S(),hO1=b(),rn1=ta1(),pO1=lO1(Function.toString);hO1(rn1.inspectSource)||(rn1.inspectSource=function(r){return pO1(r)});nc1.exports=rn1.inspectSource});var sc1=o(function(vH1,oc1){"use strict";var gO1=I(),yO1=b(),uc1=gO1.WeakMap;oc1.exports=yO1(uc1)&&/native code/.test(String(uc1))});var P1=o(function(cH1,vc1){"use strict";var _$dO=b();vc1.exports=function(r){return(typeof r==="undefined"?"undefined":_type_of(r))=="object"?r!==null:_$dO(r)}});var ia1=o(function(fH1,fc){"use strict";var qO1=I(),cc=P1(),en1=qO1.document,EO1=cc(en1)&&cc(en1.createElement);fc.exports=function(r){return EO1?en1.createElement(r):{}}});var tn1=o(function(lH1,lc1){"use strict";var SO1=w(),IO1=R(),RO1=ia1();lc1.exports=!SO1&&!IO1(function(){return Object.defineProperty(RO1("div"),"a",{get:function get1(){return 7}}).a!==7})});var an1=o(function(hH1,hc){"use strict";var TO1=w(),OO1=R();hc.exports=TO1&&OO1(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42})});var A1=o(function(pH1,pc){"use strict";var mO1=P1(),AO1=String,wO1=TypeError;pc.exports=function(r){if(mO1(r))return r;throw new wO1(AO1(r)+" is not an object")}});var m=o(function(gH1,gc1){"use strict";var bO1=tt(),na1=Function.prototype.call;gc1.exports=bO1?na1.bind(na1):function(){return na1.apply(na1,arguments)}});var W10=o(function(yH1,yc1){"use strict";var nn1=I(),xO1=b(),CO1=function CO1(r){return xO1(r)?r:void 0};yc1.exports=function(r,e){return arguments.length<2?CO1(nn1[r]):nn1[r]&&nn1[r][e]}});var Cr=o(function(dH1,dc1){"use strict";var PO1=S();dc1.exports=PO1({}.isPrototypeOf)});var be=o(function(qH,Sc1){"use strict";var _$_O=I(),qc1=_$_O.navigator,Ec1=qc1&&qc1.userAgent;Sc1.exports=Ec1?String(Ec1):""});var se1=o(function(EH1,Ac1){"use strict";var mc=I(),_$un=be(),Ic1=mc.process,Rc1=mc.Deno,Tc1=Ic1&&Ic1.versions||Rc1&&Rc1.version,Oc1=Tc1&&Tc1.v8,lr1,ua1;Oc1&&(lr1=Oc1.split("."),ua1=lr1[0]>0&&lr1[0]<4?1:+(lr1[0]+lr1[1]));!ua1&&_$un&&(lr1=_$un.match(/Edge\/(\d+)/),(!lr1||lr1[1]>=74)&&(lr1=_$un.match(/Chrome\/(\d+)/),lr1&&(ua1=+lr1[1])));Ac1.exports=ua1});var oa1=o(function(SH1,bc1){"use strict";var wc1=se1(),NO1=R(),LO1=I(),DO1=LO1.String;bc1.exports=!!Object.getOwnPropertySymbols&&!NO1(function(){var r=Symbol("symbol detection");return!DO1(r)||!_instanceof(Object(r),Symbol)||!Symbol.sham&&wc1&&wc1<41})});var on1=o(function(IH1,xc1){"use strict";var FO1=oa1();xc1.exports=FO1&&!Symbol.sham&&_type_of(Symbol.iterator)=="symbol"});var xe=o(function(RH1,Cc1){"use strict";var UO1=W10(),BO1=b(),MO1=Cr(),kO1=on1(),jO1=Object;Cc1.exports=kO1?function(r){return(typeof r==="undefined"?"undefined":_type_of(r))=="symbol"}:function(r){var e=UO1("Symbol");return BO1(e)&&MO1(e.prototype,jO1(r))}});var ve=o(function(TH1,Pc1){"use strict";var $O1=String;Pc1.exports=function(r){try{return $O1(r)}catch(e){return"Object"}}});var _=o(function(OH1,_c1){"use strict";var HO1=b(),GO1=ve(),WO1=TypeError;_c1.exports=function(r){if(HO1(r))return r;throw new WO1(GO1(r)+" is not a function")}});var $r1=o(function(mH1,Nc1){"use strict";var VO1=_(),zO1=we();Nc1.exports=function(r,e){var t=r[e];return zO1(t)?void 0:VO1(t)}});var Dc1=o(function(AH1,Lc1){"use strict";var sn=m(),vn1=b(),cn1=P1(),KO1=TypeError;Lc1.exports=function(r,e){var t,a;if(e==="string"&&vn1(t=r.toString)&&!cn1(a=sn(t,r))||vn1(t=r.valueOf)&&!cn1(a=sn(t,r))||e!=="string"&&vn1(t=r.toString)&&!cn1(a=sn(t,r)))return a;throw new KO1("Can't convert object to primitive value")}});var sa1=o(function(wH1,Uc1){"use strict";var Fc1=ta1();Uc1.exports=function(r,e){return Fc1[r]||(Fc1[r]=e||{})}});var Ce1=o(function(bH1,Bc1){"use strict";var YO1=S(),JO1=0,XO1=Math.random(),QO1=YO1(1.1.toString);Bc1.exports=function(r){return"Symbol("+(r===void 0?"":r)+")_"+QO1(++JO1+XO1,36)}});var x=o(function(xH1,kc1){"use strict";var ZO1=I(),rm1=sa1(),Mc1=C(),em=Ce1(),tm=oa1(),am1=on1(),Pe=ZO1.Symbol,fn1=rm1("wks"),im1=am1?Pe.for||Pe:Pe&&Pe.withoutSetter||em;kc1.exports=function(r){return Mc1(fn1,r)||(fn1[r]=tm&&Mc1(Pe,r)?Pe[r]:im1("Symbol."+r)),fn1[r]}});var ln1=o(function(CH1,Hc1){"use strict";var nm1=m(),jc1=P1(),$c1=xe(),um1=$r1(),om1=Dc1(),sm1=x(),vm1=TypeError,cm1=sm1("toPrimitive");Hc1.exports=function(r,e){if(!jc1(r)||$c1(r))return r;var t=um1(r,cm1),a;if(t){if(e===void 0&&(e="default"),a=nm1(t,r,e),!jc1(a)||$c1(a))return a;throw new vm1("Can't convert object to primitive value")}return e===void 0&&(e="number"),om1(r,e)}});var va1=o(function(PH1,Gc1){"use strict";var fm1=ln1(),lm1=xe();Gc1.exports=function(r){var e=fm1(r,"string");return lm1(e)?e:e+""}});var V=o(function(Vc1){"use strict";var hm1=w(),pm1=tn1(),gm1=an1(),ca=A1(),Wc1=va1(),ym1=TypeError,hn1=Object.defineProperty,dm1=Object.getOwnPropertyDescriptor,pn1="enumerable",gn1="configurable",yn="writable";Vc1.f=hm1?gm1?function(e,t,a){if(ca(e),t=Wc1(t),ca(a),typeof e=="function"&&t==="prototype"&&"value"in a&&yn in a&&!a[yn]){var i=dm1(e,t);i&&i[yn]&&(e[t]=a.value,a={configurable:gn1 in a?a[gn1]:i[gn1],enumerable:pn1 in a?a[pn1]:i[pn1],writable:!1})}return hn1(e,t,a)}:hn1:function(e,t,a){if(ca(e),t=Wc1(t),ca(a),pm1)try{return hn1(e,t,a)}catch(i){}if("get"in a||"set"in a)throw new ym1("Accessors not supported");return"value"in a&&(e[t]=a.value),e}});var Pr1=o(function(NH1,zc1){"use strict";zc1.exports=function(r,e){return{enumerable:!(r&1),configurable:!(r&2),writable:!(r&4),value:e}}});var z=o(function(LH1,Kc1){"use strict";var qm1=w(),Em1=V(),Sm1=Pr1();Kc1.exports=qm1?function(r,e,t){return Em1.f(r,e,Sm1(1,t))}:function(r,e,t){return r[e]=t,r}});var fa1=o(function(DH1,Jc1){"use strict";var Im1=sa1(),Rm1=Ce1(),Yc1=Im1("keys");Jc1.exports=function(r){return Yc1[r]||(Yc1[r]=Rm1(r))}});var la1=o(function(FH1,Xc1){"use strict";Xc1.exports={}});var _$X=o(function(UH1,rf1){"use strict";var Tm1=sc1(),Zc1=I(),Om1=P1(),mm1=z(),dn1=C(),qn1=ta1(),Am1=fa1(),wm1=la1(),Qc1="Object already initialized",En1=Zc1.TypeError,bm=Zc1.WeakMap,ha1,nt,pa1,xm1=function xm1(r){return pa1(r)?nt(r):ha1(r,{})},Cm1=function Cm1(r){return function(e){var t;if(!Om1(e)||(t=nt(e)).type!==r)throw new En1("Incompatible receiver, "+r+" required");return t}};Tm1||qn1.state?(hr1=qn1.state||(qn1.state=new bm),hr1.get=hr1.get,hr1.has=hr1.has,hr1.set=hr1.set,ha1=function ha1(r,e){if(hr1.has(r))throw new En1(Qc1);return e.facade=r,hr1.set(r,e),e},nt=function nt(r){return hr1.get(r)||{}},pa1=function pa1(r){return hr1.has(r)}):(_$ce=Am1("state"),wm1[_$ce]=!0,ha1=function ha1(r,e){if(dn1(r,_$ce))throw new En1(Qc1);return e.facade=r,mm1(r,_$ce,e),e},nt=function nt(r){return dn1(r,_$ce)?r[_$ce]:{}},pa1=function pa1(r){return dn1(r,_$ce)});var hr1,_$ce;rf1.exports={set:ha1,get:nt,has:pa1,enforce:xm1,getterFor:Cm1}});var Rn=o(function(BH1,af1){"use strict";var In1=S(),Pm1=R(),_m1=b(),ga1=C(),Sn1=w(),Nm1=at().CONFIGURABLE,Lm1=aa1(),tf1=_$X(),Dm1=tf1.enforce,Fm1=tf1.get,ef1=String,_$ya=Object.defineProperty,Um1=In1("".slice),Bm1=In1("".replace),Mm1=In1([].join),km1=Sn1&&!Pm1(function(){return _$ya(function(){},"length",{value:8}).length!==8}),jm1=String(String).split("String"),$m1=af1.exports=function $m1(r,e,t){Um1(ef1(e),0,7)==="Symbol("&&(e="["+Bm1(ef1(e),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),t&&t.getter&&(e="get "+e),t&&t.setter&&(e="set "+e),(!ga1(r,"name")||Nm1&&r.name!==e)&&(Sn1?_$ya(r,"name",{value:e,configurable:!0}):r.name=e),km1&&t&&ga1(t,"arity")&&r.length!==t.arity&&_$ya(r,"length",{value:t.arity});try{t&&ga1(t,"constructor")&&t.constructor?Sn1&&_$ya(r,"prototype",{writable:!1}):r.prototype&&(r.prototype=void 0)}catch(i){}var a=Dm1(r);return ga1(a,"source")||(a.source=Mm1(jm1,typeof e=="string"?e:"")),r};Function.prototype.toString=$m1(function(){return _m1(this)&&Fm1(this).source||Lm1(this)},"toString")});var Q=o(function(MH1,uf1){"use strict";var nf1=Rn(),Hm1=V();uf1.exports=function(r,e,t){return t.get&&nf1(t.get,e,{getter:!0}),t.set&&nf1(t.set,e,{setter:!0}),Hm1.f(r,e,t)}});var da=o(function(kH1,of1){"use strict";of1.exports=typeof ArrayBuffer!="undefined"&&typeof DataView!="undefined"});var _$ut=o(function(jH1,sf1){"use strict";var Gm1=S(),Wm1=_();sf1.exports=function(r,e,t){try{return Gm1(Wm1(Object.getOwnPropertyDescriptor(r,e)[t]))}catch(a){}}});var pr1=o(function($H1,cf1){"use strict";var vf1=S(),Vm1=vf1({}.toString),zm1=vf1("".slice);cf1.exports=function(r){return zm1(Vm1(r),8,-1)}});var Tn1=o(function(HH1,hf1){"use strict";var lf1=I(),Km1=_$ut(),Ym1=pr1(),ff1=lf1.ArrayBuffer,Jm1=lf1.TypeError;hf1.exports=ff1&&Km1(ff1.prototype,"byteLength","get")||function(r){if(Ym1(r)!=="ArrayBuffer")throw new Jm1("ArrayBuffer expected");return r.byteLength}});var On=o(function(GH,pf1){"use strict";var Xm1=I(),Qm1=da(),Zm1=Tn1(),rA1=Xm1.DataView;pf1.exports=function(r){if(!Qm1||Zm1(r)!==0)return!1;try{return new rA1(r),!1}catch(e){return!0}}});var yf1=o(function(){"use strict";var eA1=w(),tA1=Q(),aA1=On(),_$gf=ArrayBuffer.prototype;eA1&&!("detached"in _$gf)&&tA1(_$gf,"detached",{configurable:!0,get:function get1(){return aA1(this)}})});var mn1=o(function(Ef1){"use strict";var df1={}.propertyIsEnumerable,qf=Object.getOwnPropertyDescriptor,iA1=qf&&!df1.call({1:2},1);Ef1.f=iA1?function(e){var t=qf(this,e);return!!t&&t.enumerable}:df1});var _e1=o(function(KH,Sf1){"use strict";var nA1=S(),uA1=R(),oA1=pr1(),An1=Object,sA1=nA1("".split);Sf1.exports=uA1(function(){return!An1("z").propertyIsEnumerable(0)})?function(r){return oA1(r)==="String"?sA1(r,""):An1(r)}:An1});var fe1=o(function(YH,If1){"use strict";var vA1=_e1(),cA1=ir1();If1.exports=function(r){return vA1(cA1(r))}});var qa=o(function(Tf1){"use strict";var fA1=w(),lA1=m(),hA=mn1(),pA1=Pr1(),gA=fe1(),yA1=va1(),dA1=C(),qA1=tn1(),Rf1=Object.getOwnPropertyDescriptor;Tf1.f=fA1?Rf1:function(e,t){if(e=gA(e),t=yA1(t),qA1)try{return Rf1(e,t)}catch(a){}if(dA1(e,t))return pA1(!lA1(hA.f,e,t),e[t])}});var Z=o(function(XH,Of1){"use strict";var EA1=b(),SA=V(),IA1=Rn(),RA1=ea1();Of1.exports=function(r,e,t,a){a||(a={});var i=a.enumerable,n=a.name!==void 0?a.name:e;if(EA1(t)&&IA1(t,n,a),a.global)i?r[e]=t:RA1(e,t);else{try{a.unsafe?r[e]&&(i=!0):delete r[e]}catch(u){}i?r[e]=t:SA.f(r,e,{value:t,enumerable:!1,configurable:!a.nonConfigurable,writable:!a.nonWritable})}return r}});var Af1=o(function(QH,mf1){"use strict";var _$TA=Math.ceil,OA1=Math.floor;mf1.exports=Math.trunc||function(e){var t=+e;return(t>0?OA1:_$TA)(t)}});var k=o(function(ZH,wf1){"use strict";var mA1=Af1();wf1.exports=function(r){var e=+r;return e!==e||e===0?0:mA1(e)}});var ot1=o(function(rG1,bf1){"use strict";var AA1=k(),wA=Math.max,bA=Math.min;bf1.exports=function(r,e){var t=AA1(r);return t<0?wA(t+e,0):bA(t,e)}});var _r1=o(function(eG1,xf1){"use strict";var xA=k(),CA1=Math.min;xf1.exports=function(r){var e=xA(r);return e>0?CA1(e,0x1fffffffffffff):0}});var L=o(function(tG1,Cf1){"use strict";var PA1=_r1();Cf1.exports=function(r){return PA1(r.length)}});var Nf1=o(function(aG1,_f1){"use strict";var _A1=fe1(),NA1=ot1(),_$LA=L(),Pf1=function Pf1(r){return function(e,t,a){var i=_A1(e),n=_$LA(i);if(n===0)return!r&&-1;var u=NA1(a,n),s;if(r&&t!==t){for(;n>u;)if(s=i[u++],s!==s)return!0}else for(;n>u;u++)if((r||u in i)&&i[u]===t)return r||u||0;return!r&&-1}};_f1.exports={includes:Pf1(!0),indexOf:Pf1(!1)}});var bn=o(function(iG1,Df1){"use strict";var DA1=S(),wn1=C(),FA1=fe1(),UA1=Nf1().indexOf,BA1=la1(),Lf1=DA1([].push);Df1.exports=function(r,e){var t=FA1(r),a=0,i=[],n;for(n in t)!wn1(BA1,n)&&wn1(t,n)&&Lf1(i,n);for(;e.length>a;)wn1(t,n=e[a++])&&(~UA1(i,n)||Lf1(i,n));return i}});var Ea=o(function(nG1,Ff1){"use strict";Ff1.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]});var xn=o(function(Uf1){"use strict";var MA1=bn(),kA1=Ea(),jA1=kA1.concat("length","prototype");Uf1.f=Object.getOwnPropertyNames||function(e){return MA1(e,jA1)}});var Cn=o(function(Bf){"use strict";Bf.f=Object.getOwnPropertySymbols});var kf1=o(function(sG1,Mf1){"use strict";var $A1=W10(),HA1=S(),GA1=xn(),_$WA=Cn(),VA1=A1(),zA1=HA1([].concat);Mf1.exports=$A1("Reflect","ownKeys")||function(e){var t=GA1.f(VA1(e)),a=_$WA.f;return a?zA1(t,a(e)):t}});var st1=o(function(vG1,$f1){"use strict";var jf1=C(),KA1=kf1(),YA1=qa(),JA1=V();$f1.exports=function(r,e,t){for(var a=KA1(e),i=JA1.f,n=YA1.f,u=0;ut||v!==v?u*(1/0):u*v}});var al1=o(function(EG1,tl1){"use strict";var Tw1=el1(),Ow1=11920928955078125e-23,mw1=34028234663852886e22,Aw1=11754943508222875e-54;tl1.exports=Math.fround||function(e){return Tw1(e,Ow1,mw1,Aw1)}});var nl1=o(function(SG1,il1){"use strict";var ww1=Array,bw1=Math.abs,Nr1=Math.pow,xw1=Math.floor,Cw1=Math.log,_$Pw=Math.LN2,_w1=function _w1(r,e,t){var a=ww1(t),i=t*8-e-1,n=(1<>1,s=e===23?Nr1(2,-24)-Nr1(2,-77):0,v=r<0||r===0&&1/r<0?1:0,f10=0,l,c,h;for(r=bw1(r),r!==r||r===1/0?(c=r!==r?1:0,l=n):(l=xw1(Cw1(r)/_$Pw),h=Nr1(2,-l),r*h<1&&(l--,h*=2),l+u>=1?r+=s/h:r+=s*Nr1(2,1-u),r*h>=2&&(l++,h/=2),l+u>=n?(c=0,l=n):l+u>=1?(c=(r*h-1)*Nr1(2,e),l+=u):(c=r*Nr1(2,u-1)*Nr1(2,e),l=0));e>=8;)a[f10++]=c&255,c/=256,e-=8;for(l=l<0;)a[f10++]=l&255,l/=256,i-=8;return a[f10-1]|=v*128,a},Nw1=function Nw1(r,e){var t=r.length,a=t*8-e-1,i=(1<>1,u=a-7,s=t-1,v=r[s--],f10=v&127,l;for(v>>=7;u>0;)f10=f10*256+r[s--],u-=8;for(l=f10&(1<<-u)-1,f10>>=-u,u+=e;u>0;)l=l*256+r[s--],u-=8;if(f10===0)f10=1-n;else{if(f10===i)return l?NaN:v?-1/0:1/0;l+=Nr1(2,e),f10-=n}return(v?-1:1)*l*Nr1(2,f10-e)};il1.exports={pack:_w1,unpack:Nw1}});var ol1=o(function(IG1,ul1){"use strict";var Lw1=R();ul1.exports=!Lw1(function(){function r(){}return r.prototype.constructor=null,Object.getPrototypeOf(new r)!==r.prototype})});var Ne1=o(function(RG1,vl1){"use strict";var Dw1=C(),Fw1=b(),Uw1=B(),Bw1=fa1(),Mw1=ol1(),sl1=Bw1("IE_PROTO"),_n=Object,kw1=_n.prototype;vl1.exports=Mw1?_n.getPrototypeOf:function(r){var e=Uw1(r);if(Dw1(e,sl1))return e[sl1];var t=e.constructor;return Fw1(t)&&_instanceof(e,t)?t.prototype:_instanceof(e,_n)?kw1:null}});var fl1=o(function(TG1,cl1){"use strict";var jw1=P1();cl1.exports=function(r){return jw1(r)||r===null}});var hl1=o(function(OG1,ll1){"use strict";var $w1=fl1(),Hw1=String,Gw1=TypeError;ll1.exports=function(r){if($w1(r))return r;throw new Gw1("Can't set "+Hw1(r)+" as a prototype")}});var he1=o(function(mG1,pl1){"use strict";var Ww1=_$ut(),Vw1=P1(),zw1=ir1(),Kw1=hl1();pl1.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var r=!1,e={},t;try{t=Ww1(Object.prototype,"__proto__","set"),t(e,[]),r=_instanceof(e,Array)}catch(a){}return function(i,n){return zw1(i),Kw1(n),Vw1(i)&&(r?t(i,n):i.__proto__=n),i}}():void 0)});var Nn=o(function(AG1,yl1){"use strict";var Yw1=B(),gl1=ot1(),Jw1=L();yl1.exports=function(e){for(var t=Yw1(this),a=Jw1(t),i=arguments.length,n=gl1(i>1?arguments[1]:void 0,a),u=i>2?arguments[2]:void 0,s=u===void 0?a:gl1(u,a);s>n;)t[n++]=e;return t}});var ft1=o(function(wG1,dl1){"use strict";var Xw1=S();dl1.exports=Xw1([].slice)});var _$lt=o(function(bG1,El1){"use strict";var Qw1=b(),Zw1=P1(),ql1=he1();El1.exports=function(r,e,t){var a,i;return ql1&&Qw1(a=e.constructor)&&a!==t&&Zw1(i=a.prototype)&&i!==t.prototype&&ql1(r,i),r}});var Hr=o(function(xG1,Il){"use strict";var rb1=V().f,eb1=C(),tb1=x(),Sl1=tb1("toStringTag");Il.exports=function(r,e,t){r&&!t&&(r=r.prototype),r&&!eb1(r,Sl1)&&rb1(r,Sl1,{configurable:!0,value:e})}});var kn=o(function(CG1,Bl1){"use strict";var wa1=I(),Bn1=S(),Ln1=w(),ab1=da(),Nl1=at(),ib1=z(),nb1=Q(),Rl=Ia1(),Dn1=R(),Ta=le1(),ub1=k(),ob1=_r1(),ma1=_$Ra(),sb1=al1(),Ll1=nl1(),vb1=Ne1(),Tl1=he1(),cb1=Nn(),fb1=ft1(),lb1=_$lt(),hb1=st1(),Dl1=Hr(),Mn=_$X(),pb1=Nl1.PROPER,Ol=Nl1.CONFIGURABLE,De="ArrayBuffer",ba1="DataView",Fe="prototype",gb1="Wrong length",Fl1="Wrong index",ml1=Mn.getterFor(De),pt=Mn.getterFor(ba1),Al=Mn.set,gr1=wa1[De],rr=gr1,_$Le=rr&&rr[Fe],Sr1=wa1[ba1],pe=Sr1&&Sr1[Fe],wl1=Object.prototype,yb1=wa1.Array,Aa1=wa1.RangeError,db1=Bn1(cb1),qb1=Bn1([].reverse),Ul1=Ll1.pack,bl1=Ll1.unpack,xl1=function xl1(r){return[r&255]},Cl1=function Cl1(r){return[r&255,r>>8&255]},Pl=function Pl(r){return[r&255,r>>8&255,r>>16&255,r>>24&255]},_l1=function _l1(r){return r[3]<<24|r[2]<<16|r[1]<<8|r[0]},Eb1=function Eb1(r){return Ul1(sb1(r),23,4)},Sb1=function Sb1(r){return Ul1(r,52,8)},Oa1=function Oa1(r,e,t){nb1(r[Fe],e,{configurable:!0,get:function get1(){return t(this)[e]}})},Gr=function Gr(r,e,t,a){var i=pt(r),n=ma1(t),u=!!a;if(n+e>i.byteLength)throw new Aa1(Fl1);var s=i.bytes,v=n+i.byteOffset,f10=fb1(s,v,v+e);return u?f10:qb1(f10)},Wr1=function Wr1(r,e,t,a,i,n){var u=pt(r),s=ma1(t),v=a(+i),f10=!!n;if(s+e>u.byteLength)throw new Aa1(Fl1);for(var l=u.bytes,c=s+u.byteOffset,h=0;h>24)},setUint8:function setUint8(e,t){Un1(this,e,t<<24>>24)}},{unsafe:!0})):(rr=function rr(e){Ta(this,_$Le);var t=ma1(e);Al(this,{type:De,bytes:db1(yb1(t),0),byteLength:t}),Ln1||(this.byteLength=t,this.detached=!1)},_$Le=rr[Fe],Sr1=function Sr1(e,t,a){Ta(this,pe),Ta(e,_$Le);var i=ml1(e),n=i.byteLength,u=ub1(t);if(u<0||u>n)throw new Aa1("Wrong offset");if(a=a===void 0?n-u:ob1(a),u+a>n)throw new Aa1(gb1);Al(this,{type:ba1,buffer:e,byteLength:a,byteOffset:u,bytes:i.bytes}),Ln1||(this.buffer=e,this.byteLength=a,this.byteOffset=u)},pe=Sr1[Fe],Ln1&&(Oa1(rr,"byteLength",ml1),Oa1(Sr1,"buffer",pt),Oa1(Sr1,"byteLength",pt),Oa1(Sr1,"byteOffset",pt)),Rl(pe,{getInt8:function getInt8(e){return Gr(this,1,e)[0]<<24>>24},getUint8:function getUint8(e){return Gr(this,1,e)[0]},getInt16:function getInt16(e){var t=Gr(this,2,e,arguments.length>1?arguments[1]:!1);return(t[1]<<8|t[0])<<16>>16},getUint16:function getUint16(e){var t=Gr(this,2,e,arguments.length>1?arguments[1]:!1);return t[1]<<8|t[0]},getInt32:function getInt32(e){return _l1(Gr(this,4,e,arguments.length>1?arguments[1]:!1))},getUint32:function getUint32(e){return _l1(Gr(this,4,e,arguments.length>1?arguments[1]:!1))>>>0},getFloat32:function getFloat32(e){return bl1(Gr(this,4,e,arguments.length>1?arguments[1]:!1),23)},getFloat64:function getFloat64(e){return bl1(Gr(this,8,e,arguments.length>1?arguments[1]:!1),52)},setInt8:function setInt8(e,t){Wr1(this,1,e,xl1,t)},setUint8:function setUint8(e,t){Wr1(this,1,e,xl1,t)},setInt16:function setInt16(e,t){Wr1(this,2,e,Cl1,t,arguments.length>2?arguments[2]:!1)},setUint16:function setUint16(e,t){Wr1(this,2,e,Cl1,t,arguments.length>2?arguments[2]:!1)},setInt32:function setInt32(e,t){Wr1(this,4,e,Pl,t,arguments.length>2?arguments[2]:!1)},setUint32:function setUint32(e,t){Wr1(this,4,e,Pl,t,arguments.length>2?arguments[2]:!1)},setFloat32:function setFloat32(e,t){Wr1(this,4,e,Eb1,t,arguments.length>2?arguments[2]:!1)},setFloat64:function setFloat64(e,t){Wr1(this,8,e,Sb1,t,arguments.length>2?arguments[2]:!1)}}));var Fn1,ht1,Un1;Dl1(rr,De);Dl1(Sr1,ba1);Bl1.exports={ArrayBuffer:rr,DataView:Sr1}});var Gl1=o(function(){"use strict";var Ib1=q(),$n1=ct1(),Rb1=R(),$l1=kn(),Ml=A1(),kl1=ot1(),Tb1=_r1(),Hn1=$l1.ArrayBuffer,_$jn=$l1.DataView,Hl1=_$jn.prototype,jl1=$n1(Hn1.prototype.slice),Ob1=$n1(Hl1.getUint8),mb1=$n1(Hl1.setUint8),Ab1=Rb1(function(){return!new Hn1(2).slice(1,void 0).byteLength});Ib1({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:Ab1},{slice:function slice(e,t){if(jl1&&t===void 0)return jl1(Ml(this),e);for(var a=Ml(this).byteLength,i=kl1(e,a),n=kl1(t===void 0?a:t,a),u=new Hn1(Tb1(n-i)),s=new _$jn(this),v=new _$jn(u),f10=0;i92||Vn1==="NODE"&&_$Wn>94||Vn1==="BROWSER"&&_$Wn>97)return!1;var r=new ArrayBuffer(8),e=Xl1(r,{transfer:[r]});return r.byteLength!==0||e.byteLength!==8})});var _$Xn=o(function(BG1,eh1){"use strict";var Jn1=I(),Fb1=Jl1(),Ub=Pa1(),Bb1=Jn1.structuredClone,Zl1=Jn1.ArrayBuffer,_a1=Jn1.MessageChannel,_$Yn=!1,zn1,rh1,Na1,Kn1;if(Ub)_$Yn=function Yn1(r){Bb1(r,{transfer:[r]})};else if(Zl1)try{_a1||(zn1=Fb1("worker_threads"),zn1&&(_a1=zn1.MessageChannel)),_a1&&(rh1=new _a1,Na1=new Zl1(2),Kn1=function Kn1(r){rh1.port1.postMessage(null,[r])},Na1.byteLength===2&&(Kn1(Na1),Na1.byteLength===0&&(_$Yn=Kn1)))}catch(r){}eh1.exports=_$Yn});var au1=o(function(MG1,sh1){"use strict";var ru1=I(),eu1=S(),nh1=_$ut(),Mb1=_$Ra(),kb1=Vl1(),jb=Tn1(),th1=_$Xn(),Qn1=Pa1(),$b1=ru1.structuredClone,uh1=ru1.ArrayBuffer,Zn=ru1.DataView,Hb1=Math.min,tu=uh1.prototype,oh1=Zn.prototype,Gb1=eu1(tu.slice),ah1=nh1(tu,"resizable","get"),ih1=nh1(tu,"maxByteLength","get"),Wb1=eu1(oh1.getInt8),Vb1=eu1(oh1.setInt8);sh1.exports=(Qn1||th1)&&function(r,e,t){var a=jb(r),i=e===void 0?a:Mb1(e),n=!ah1||!ah1(r),u;if(kb1(r),Qn1&&(r=$b1(r,{transfer:[r]}),a===i&&(t||n)))return r;if(a>=i&&(!t||n))u=Gb1(r,0,i);else{var s=t&&!n&&ih1?{maxByteLength:ih1(r)}:void 0;u=new uh1(i,s);for(var v=new Zn(r),f10=new Zn(u),l=Hb1(i,a),c=0;cu;)Zb1.f(e,s=i[u++],a[s]);return e}});var dh1=o(function(VG1,yh1){"use strict";var ax1=W10();yh1.exports=ax1("document","documentElement")});var Vr1=o(function(zG1,Oh1){"use strict";var ix1=A1(),nx1=gh1(),qh1=Ea(),ux1=la1(),ox1=dh1(),sx1=ia1(),vx1=fa1(),Eh1=">",Sh1="<",uu1="prototype",ou1="script",Rh1=vx1("IE_PROTO"),nu1=function nu1(){},Th=function Th(r){return Sh1+ou1+Eh1+r+Sh1+"/"+ou1+Eh1},Ih1=function Ih1(r){r.write(Th("")),r.close();var e=r.parentWindow.Object;return r=null,e},cx1=function cx1(){var r=sx1("iframe"),e="java"+ou1+":",t;return r.style.display="none",ox1.appendChild(r),r.src=String(e),t=r.contentWindow.document,t.open(),t.write(Th("document.F=Object")),t.close(),t.F},La1,Da1=function Da2(){try{La1=new ActiveXObject("htmlfile")}catch(e){}Da1=typeof document!="undefined"?document.domain&&La1?Ih1(La1):cx1():Ih1(La1);for(var r=qh1.length;r--;)delete Da1[uu1][qh1[r]];return Da1()};ux1[Rh1]=!0;Oh1.exports=Object.create||function(e,t){var a;return e!==null?(nu1[uu1]=ix1(e),a=new nu1,nu1[uu1]=null,a[Rh1]=e):a=Da1(),t===void 0?a:nx1.f(a,t)}});var yt1=o(function(KG1,mh1){"use strict";var fx1=x(),lx1=Vr1(),hx1=V().f,su1=fx1("unscopables"),vu=Array.prototype;vu[su1]===void 0&&hx1(vu,su1,{configurable:!0,value:lx1(null)});mh1.exports=function(r){vu[su1][r]=!0}});var Ah1=o(function(){"use strict";var px1=q(),gx1=B(),yx1=L(),dx1=k(),qx1=yt1();px1({target:"Array",proto:!0},{at:function at(e){var t=gx1(this),a=yx1(t),i=dx1(e),n=i>=0?i:a+i;return n<0||n>=a?void 0:t[n]}});qx1("at")});var dt1=o(function(XG1,wh1){"use strict";var _$Ex=pr1();wh1.exports=Array.isArray||function(e){return _$Ex(e)==="Array"}});var cu1=o(function(QG1,bh1){"use strict";var _$Sx=w(),Ix1=dt1(),Rx=TypeError,Tx1=Object.getOwnPropertyDescriptor,Ox=_$Sx&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(r){return _instanceof(r,TypeError)}}();bh1.exports=Ox?function(r,e){if(Ix1(r)&&!Tx1(r,"length").writable)throw new Rx("Cannot set read only .length");return r.length=e}:function(r,e){return r.length=e}});var fu1=o(function(ZG1,xh1){"use strict";var mx1=TypeError,Ax1=0x1fffffffffffff;xh1.exports=function(r){if(r>Ax1)throw mx1("Maximum allowed index exceeded");return r}});var Ch1=o(function(){"use strict";var wx1=q(),bx1=B(),xx1=L(),_$Cx=cu1(),Px1=fu1(),_x1=R(),Nx1=_x1(function(){return[].push.call({length:0x100000000},1)!==0x100000001}),Lx1=function Lx1(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(r){return _instanceof(r,TypeError)}},Dx1=Nx1||!Lx1();wx1({target:"Array",proto:!0,arity:1,forced:Dx1},{push:function push(e){var t=bx1(this),a=xx1(t),i=arguments.length;Px1(a+i);for(var n=0;n=0:s>v;v+=f10)v in u&&(i=t(i,u[v],v,n));return i}};Lh1.exports={left:Nh1(!1),right:Nh1(!0)}});var lu1=o(function(a41,Fh1){"use strict";var _$kx=R();Fh1.exports=function(r,e){var t=[][r];return!!t&&_$kx(function(){t.call(null,e||function(){return 1},1)})}});var Bh1=o(function(){"use strict";var jx=q(),$x1=Dh().left,Hx1=lu1(),Uh1=se1(),Gx1=Gn1(),Wx=!Gx1&&Uh1>79&&Uh1<83,Vx1=Wx||!Hx1("reduce");jx({target:"Array",proto:!0,forced:Vx1},{reduce:function reduce(e){var t=arguments.length;return $x1(this,e,t,t>1?arguments[1]:void 0)}})});var kh1=o(function(){"use strict";var zx1=q(),Kx1=S(),Yx1=dt1(),Jx1=Kx1([].reverse),Mh1=[1,2];zx1({target:"Array",proto:!0,forced:String(Mh1)===String(Mh1.reverse())},{reverse:function reverse(){return Yx1(this)&&(this.length=this.length),Jx1(this)}})});var hu=o(function(s41,$h1){"use strict";var jh1=ve(),Xx1=TypeError;$h1.exports=function(r,e){if(!delete r[e])throw new Xx1("Cannot delete property "+jh1(e)+" of "+jh1(r))}});var Wh1=o(function(v41,Gh1){"use strict";var Qx1=x(),Zx1=Qx1("toStringTag"),Hh1={};Hh1[Zx1]="z";Gh1.exports=String(Hh1)==="[object z]"});var Ir1=o(function(c41,Vh1){"use strict";var r01=Wh1(),e01=b(),Fa1=pr1(),t01=x(),a01=t01("toStringTag"),i01=Object,n01=Fa1(function(){return arguments}())==="Arguments",u01=function u01(r,e){try{return r[e]}catch(t){}};Vh1.exports=r01?Fa1:function(r){var e,t,a;return r===void 0?"Undefined":r===null?"Null":typeof(t=u01(e=i01(r),a01))=="string"?t:n01?Fa1(e):(a=Fa1(e))==="Object"&&e01(e.callee)?"Arguments":a}});var N=o(function(f41,zh1){"use strict";var o01=Ir1(),s01=String;zh1.exports=function(r){if(o01(r)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return s01(r)}});var Ua=o(function(l41,Yh1){"use strict";var Kh1=ft1(),v01=Math.floor,pu1=function pu2(r,e){var t=r.length;if(t<8)for(var a=1,i,n;a0;)r[n]=r[--n];n!==a++&&(r[n]=i)}else for(var u=v01(t/2),s=pu1(Kh1(r,0,u),e),v=pu1(Kh1(r,u),e),f10=s.length,l=v.length,c=0,h=0;c3)){if(E01)return!0;if(np1)return np1<603;var r="",e,t,a,i;for(e=65;e<76;e++){switch(t=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:a=3;break;case 68:case 71:a=4;break;default:a=2}for(i=0;i<47;i++)zr1.push({k:t+i,v:a})}for(zr1.sort(function(n,u){return u.v-n.v}),i=0;itp1(t)?1:-1}};h01({target:"Array",proto:!0,forced:O01},{sort:function sort(e){e!==void 0&&p01(e);var t=g01(this);if(sp1)return e===void 0?up1(t):up1(t,e);var a=[],i=ep1(t),n,u;for(u=0;u=i||u<0)throw new M01("Incorrect index");for(var s=new e(i),v=0;vn&&vC1(d,arguments[n]),d});if(c.prototype=f10,s!=="Error"?Np1?Np1(c,l):Lp1(c,l,{name:!0}):fC&&i in v&&(Dp1(c,v,i),Dp1(c,v,"prepareStackTrace")),Lp1(c,v),!Fp1)try{f10.name!==s&&_p1(f10,"name",s),f10.constructor=c}catch(h){}return c}}});var $p1=o(function(){"use strict";var kp1=q(),lC1=I(),Rr1=qt1(),jp1=Bp1(),Tu="WebAssembly",Mp1=lC1[Tu],Ba=new Error("e",{cause:7}).cause!==7,ge=function ge(r,e){var t={};t[r]=jp1(r,e,Ba),kp1({global:!0,constructor:!0,arity:1,forced:Ba},t)},Ou1=function Ou1(r,e){if(Mp1&&Mp1[r]){var t={};t[r]=jp1(Tu+"."+r,e,Ba),kp1({target:Tu,stat:!0,constructor:!0,arity:1,forced:Ba},t)}};ge("Error",function(r){return function(t){return Rr1(r,this,arguments)}});ge("EvalError",function(r){return function(t){return Rr1(r,this,arguments)}});ge("RangeError",function(r){return function(t){return Rr1(r,this,arguments)}});ge("ReferenceError",function(r){return function(t){return Rr1(r,this,arguments)}});ge("SyntaxError",function(r){return function(t){return Rr1(r,this,arguments)}});ge("TypeError",function(r){return function(t){return Rr1(r,this,arguments)}});ge("URIError",function(r){return function(t){return Rr1(r,this,arguments)}});Ou1("CompileError",function(r){return function(t){return Rr1(r,this,arguments)}});Ou1("LinkError",function(r){return function(t){return Rr1(r,this,arguments)}});Ou1("RuntimeError",function(r){return function(t){return Rr1(r,this,arguments)}})});var Hp1=o(function(){"use strict";var hC1=q(),mu=I();hC1({global:!0,forced:mu.globalThis!==mu},{globalThis:mu})});var Et1=o(function(M41,Gp1){"use strict";var pC1=w(),gC1=V(),yC1=Pr1();Gp1.exports=function(r,e,t){pC1?gC1.f(r,e,yC1(0,t)):r[e]=t}});var St1=o(function(k41,zp1){"use strict";var dC1=R(),qC1=b(),EC1=P1(),SC1=Vr1(),Wp1=Ne1(),IC1=Z(),RC1=x(),TC1=D(),bu1=RC1("iterator"),Vp1=!1,Lr,Au1,_$wu;[].keys&&(_$wu=[].keys(),"next"in _$wu?(Au1=Wp1(Wp1(_$wu)),Au1!==Object.prototype&&(Lr=Au1)):Vp1=!0);var OC1=!EC1(Lr)||dC1(function(){var r={};return Lr[bu1].call(r)!==r});OC1?Lr={}:TC1&&(Lr=SC1(Lr));qC1(Lr[bu1])||IC1(Lr,bu1,function(){return this});zp1.exports={IteratorPrototype:Lr,BUGGY_SAFARI_ITERATORS:Vp1}});var Zp1=o(function(){"use strict";var mC1=q(),AC1=I(),wC1=le1(),bC1=A1(),xC1=b(),CC1=Ne1(),PC1=Q(),_C1=Et1(),NC1=R(),Pu1=C(),LC1=x(),Tr=St1().IteratorPrototype,DC1=w(),FC1=D(),xu="constructor",Yp1="Iterator",Kp1=LC1("toStringTag"),Jp1=TypeError,Cu1=AC1[Yp1],Xp1=FC1||!xC1(Cu1)||Cu1.prototype!==Tr||!NC1(function(){Cu1({})}),_u=function _u(){if(wC1(this,Tr),CC1(this)===Tr)throw new Jp1("Abstract class Iterator not directly constructable")},Qp1=function Qp1(r,e){DC1?PC1(Tr,r,{configurable:!0,get:function get1(){return e},set:function set1(t){if(bC1(this),this===Tr)throw new Jp1("You can't redefine this property");Pu1(this,r)?this[r]=t:_C1(this,r,t)}}):Tr[r]=e};Pu1(Tr,Kp1)||Qp1(Kp1,Yp1);(Xp1||!Pu1(Tr,xu)||Tr[xu]===Object)&&Qp1(xu,_u);_u.prototype=Tr;mC1({global:!0,constructor:!0,forced:Xp1},{Iterator:_u})});var er1=o(function(H41,rg){"use strict";rg.exports=function(r){return{iterator:r,next:r.next,done:!1}}});var tg=o(function(G41,eg){"use strict";var UC1=RangeError;eg.exports=function(r){if(r===r)return r;throw new UC1("NaN is not allowed")}});var Nu1=o(function(W41,ag){"use strict";var BC1=k(),MC1=RangeError;ag.exports=function(r){var e=BC1(r);if(e<0)throw new MC1("The argument can't be less than 0");return e}});var M=o(function(V41,ng){"use strict";var kC1=m(),ig=A1(),jC1=$r1();ng.exports=function(r,e,t){var a,i;ig(r);try{if(a=jC1(r,"return"),!a){if(e==="throw")throw t;return t}a=kC1(a,r)}catch(n){i=!0,a=n}if(e==="throw")throw t;if(i)throw a;return ig(a),t}});var Ue=o(function(z41,ug){"use strict";ug.exports=function(r,e){return{value:r,done:e}}});var sg1=o(function(K41,og){"use strict";var $C1=M();og.exports=function(r,e,t){for(var a=r.length-1;a>=0;a--)if(r[a]!==void 0)try{t=$C1(r[a].iterator,e,t)}catch(i){e="throw",t=i}if(e==="throw")throw t;return t}});var It1=o(function(Y41,gg1){"use strict";var HC1=m(),GC1=Vr1(),WC1=z(),VC1=Ia1(),zC1=x(),cg=_$X(),KC1=$r1(),YC1=St1().IteratorPrototype,Ma1=Ue(),ka1=M(),JC1=sg1(),XC1=zC1("toStringTag"),fg1="IteratorHelper",lg="WrapForValidIterator",Lu1="normal",vg1="throw",QC1=cg.set,hg1=function hg1(r){var e=cg.getterFor(r?lg:fg1);return VC1(GC1(YC1),{next:function next(){var a=e(this);if(r)return a.nextHandler();if(a.done)return Ma1(void 0,!0);try{var i=a.nextHandler();return a.returnHandlerResult?i:Ma1(i,a.done)}catch(n){throw a.done=!0,n}},return:function _return(){var t=e(this),a=t.iterator;if(t.done=!0,r){var i=KC1(a,"return");return i?HC1(i,a):Ma1(void 0,!0)}if(t.inner)try{ka1(t.inner.iterator,Lu1)}catch(n){return ka1(a,vg1,n)}if(t.openIters)try{JC1(t.openIters,Lu1)}catch(n){return ka1(a,vg1,n)}return a&&ka1(a,Lu1),Ma1(void 0,!0)}})},ZC1=hg1(!0),pg1=hg1(!1);WC1(pg1,XC1,"Iterator Helper");gg1.exports=function(r,e,t){var a=function a(n,u){u?(u.iterator=n.iterator,u.next=n.next):u=n,u.type=e?lg:fg1,u.returnHandlerResult=!!t,u.nextHandler=r,u.counter=0,u.done=!1,QC1(this,u)};return a.prototype=e?ZC1:pg1,a}});var Rt=o(function(J41,yg1){"use strict";yg1.exports=function(r,e){var t=typeof Iterator=="function"&&Iterator.prototype[r];if(t)try{t.call({next:null},e).next()}catch(a){return!0}}});var Or1=o(function(X41,dg1){"use strict";var rP1=I();dg1.exports=function(r,e){var t=rP1.Iterator,a=t&&t.prototype,i=a&&a[r],n=!1;if(i)try{i.call({next:function next(){return{done:!0}},return:function _return(){n=!0}},-1)}catch(u){_instanceof(u,e)||(n=!1)}if(!n)return i}});var Eg1=o(function(){"use strict";var eP1=q(),Du1=m(),Fu1=A1(),tP1=er1(),aP1=tg(),iP1=Nu1(),nP1=M(),uP1=It1(),oP1=Rt(),sP1=Or1(),Bu1=D(),qg1=!Bu1&&!oP1("drop",0),Uu1=!Bu1&&!qg1&&sP1("drop",RangeError),vP1=Bu1||qg1||Uu1,cP1=uP1(function(){for(var r=this.iterator,e=this.next,t,a;this.remaining;)if(this.remaining--,t=Fu1(Du1(e,r)),a=this.done=!!t.done,a)return;if(t=Fu1(Du1(e,r)),a=this.done=!!t.done,!a)return t.value});eP1({target:"Iterator",proto:!0,real:!0,forced:vP1},{drop:function drop(e){Fu1(this);var t;try{t=iP1(aP1(+e))}catch(a){nP1(this,"throw",a)}return Uu1?Du1(Uu1,this,t):new cP1(tP1(this),{remaining:t})}})});var _$Kr=o(function(rW1,Ig1){"use strict";var Sg1=ct1(),fP1=_(),lP1=tt(),hP1=Sg1(Sg1.bind);Ig1.exports=function(r,e){return fP1(r),e===void 0?r:lP1?hP1(r,e):function(){return r.apply(e,arguments)}}});var Be1=o(function(eW1,Rg1){"use strict";Rg1.exports={}});var ja1=o(function(tW1,Tg1){"use strict";var pP1=x(),gP1=Be1(),yP1=pP1("iterator"),dP1=Array.prototype;Tg1.exports=function(r){return r!==void 0&&(gP1.Array===r||dP1[yP1]===r)}});var ye=o(function(aW1,mg1){"use strict";var qP1=Ir1(),Og1=$r1(),EP1=we(),SP1=Be1(),IP1=x(),RP1=IP1("iterator");mg1.exports=function(r){if(!EP1(r))return Og1(r,RP1)||Og1(r,"@@iterator")||SP1[qP1(r)]}});var Tt=o(function(iW,Ag1){"use strict";var TP1=m(),OP1=_(),mP1=A1(),AP1=ve(),wP1=ye(),bP1=TypeError;Ag1.exports=function(r,e){var t=arguments.length<2?wP1(r):e;if(OP1(t))return mP1(TP1(t,r));throw new bP1(AP1(r)+" is not iterable")}});var mr1=o(function(nW1,Cg1){"use strict";var xP1=_$Kr(),CP1=m(),PP1=A1(),_P1=ve(),NP1=ja1(),LP1=L(),wg1=Cr(),DP1=Tt(),FP1=ye(),bg1=M(),UP1=TypeError,$a1=function $a1(r,e){this.stopped=r,this.result=e},xg1=$a1.prototype;Cg1.exports=function(r,e,t){var a=t&&t.that,i=!!(t&&t.AS_ENTRIES),n=!!(t&&t.IS_RECORD),u=!!(t&&t.IS_ITERATOR),s=!!(t&&t.INTERRUPTED),v=xP1(e,a),f10,l,c,h,y,g,d,E=function E(O){return f10&&bg1(f10,"normal"),new $a1(!0,O)},T=function T(O){return i?(PP1(O),s?v(O[0],O[1],E):v(O[0],O[1])):s?v(O,E):v(O)};if(n)f10=r.iterator;else if(u)f10=r;else{if(l=FP1(r),!l)throw new UP1(_P1(r)+" is not iterable");if(NP1(l)){for(c=0,h=LP1(r);h>c;c++)if(y=T(r[c]),y&&wg1(xg1,y))return y;return new $a1(!1)}f10=DP1(r,l)}for(g=n?r.next:f10.next;!(d=CP1(g,f10)).done;){try{y=T(d.value)}catch(O){bg1(f10,"throw",O)}if((typeof y==="undefined"?"undefined":_type_of(y))=="object"&&y&&wg1(xg1,y))return y}return new $a1(!1)}});var Pg1=o(function(){"use strict";var BP1=q(),MP1=m(),_$kP=mr1(),jP1=_(),$P1=A1(),HP1=er1(),GP1=M(),WP1=Or1(),Mu1=WP1("every",TypeError);BP1({target:"Iterator",proto:!0,real:!0,forced:Mu1},{every:function every(e){$P1(this);try{jP1(e)}catch(i){GP1(this,"throw",i)}if(Mu1)return MP1(Mu1,this,e);var t=HP1(this),a=0;return!_$kP(t,function(i,n){if(!e(i,a++))return n()},{IS_RECORD:!0,INTERRUPTED:!0}).stopped}})});var Ha1=o(function(sW1,_g1){"use strict";var VP1=A1(),zP1=M();_g1.exports=function(r,e,t,a){try{return a?e(VP1(t)[0],t[1]):e(t)}catch(i){zP1(r,"throw",i)}}});var Fg1=o(function(){"use strict";var KP1=q(),Ng1=m(),YP1=_(),Lg1=A1(),JP1=er1(),XP1=It1(),QP1=Ha1(),ju1=D(),ZP1=M(),r_1=Rt(),e_1=Or1(),Dg1=!ju1&&!r_1("filter",function(){}),ku1=!ju1&&!Dg1&&e_1("filter",TypeError),t_1=ju1||Dg1||ku1,a_1=XP1(function(){for(var r=this.iterator,e=this.predicate,t=this.next,a,i,n;;){if(a=Lg1(Ng1(t,r)),i=this.done=!!a.done,i)return;if(n=a.value,QP1(r,e,[n,this.counter++],!0))return n}});KP1({target:"Iterator",proto:!0,real:!0,forced:t_1},{filter:function filter(e){Lg1(this);try{YP1(e)}catch(t){ZP1(this,"throw",t)}return ku1?Ng1(ku1,this,e):new a_1(JP1(this),{predicate:e})}})});var Ug1=o(function(){"use strict";var i_1=q(),n_1=m(),u_1=mr1(),o_1=_(),s_1=A1(),v_1=er1(),c_1=M(),f_1=Or1(),$u1=f_1("find",TypeError);i_1({target:"Iterator",proto:!0,real:!0,forced:$u1},{find:function find(e){s_1(this);try{o_1(e)}catch(i){c_1(this,"throw",i)}if($u1)return n_1($u1,this,e);var t=v_1(this),a=0;return u_1(t,function(i,n){if(e(i,a++))return n(i)},{IS_RECORD:!0,INTERRUPTED:!0}).result}})});var kg1=o(function(hW1,Mg1){"use strict";var l_1=m(),Bg1=A1(),h_1=er1(),p_1=ye();Mg1.exports=function(r,e){(!e||typeof r!="string")&&Bg1(r);var t=p_1(r);return h_1(Bg1(t!==void 0?l_1(t,r):r))}});var $g1=o(function(){"use strict";var g_1=q(),Hu1=m(),y_1=_(),Gu1=A1(),d_1=er1(),q_=kg1(),E_1=It1(),Wu1=M(),zu1=D(),S_1=Rt(),I_1=Or1(),jg1=!zu1&&!S_1("flatMap",function(){}),Vu1=!zu1&&!jg1&&I_1("flatMap",TypeError),R_=zu1||jg1||Vu1,T_1=E_1(function(){for(var r=this.iterator,e=this.mapper,t,a;;){if(a=this.inner)try{if(t=Gu1(Hu1(a.next,a.iterator)),!t.done)return t.value;this.inner=null}catch(i){Wu1(r,"throw",i)}if(t=Gu1(Hu1(this.next,r)),this.done=!!t.done)return;try{this.inner=q_(e(t.value,this.counter++),!1)}catch(i){Wu1(r,"throw",i)}}});g_1({target:"Iterator",proto:!0,real:!0,forced:R_},{flatMap:function flatMap(e){Gu1(this);try{y_1(e)}catch(t){Wu1(this,"throw",t)}return Vu1?Hu1(Vu1,this,e):new T_1(d_1(this),{mapper:e,inner:null})}})});var Hg1=o(function(){"use strict";var O_=q(),m_1=m(),A_1=mr1(),w_1=_(),b_1=A1(),x_1=er1(),C_1=M(),P_1=Or1(),Ku1=P_1("forEach",TypeError);O_({target:"Iterator",proto:!0,real:!0,forced:Ku1},{forEach:function forEach(e){b_1(this);try{w_1(e)}catch(i){C_1(this,"throw",i)}if(Ku1)return m_1(Ku1,this,e);var t=x_1(this),a=0;A_1(t,function(i){e(i,a++)},{IS_RECORD:!0})}})});var zg1=o(function(){"use strict";var __1=q(),Gg1=m(),N_=_(),Wg1=A1(),L_=er1(),D_=It1(),F_=Ha1(),U_=M(),B_=Rt(),M_=Or1(),Ju1=D(),Vg1=!Ju1&&!B_("map",function(){}),Yu1=!Ju1&&!Vg1&&M_("map",TypeError),k_1=Ju1||Vg1||Yu1,j_=D_(function(){var r=this.iterator,e=Wg1(Gg1(this.next,r)),t=this.done=!!e.done;if(!t)return F_(r,this.mapper,[e.value,this.counter++],!0)});__1({target:"Iterator",proto:!0,real:!0,forced:k_1},{map:function map(e){Wg1(this);try{N_(e)}catch(t){U_(this,"throw",t)}return Yu1?Gg1(Yu1,this,e):new j_(L_(this),{mapper:e})}})});var Jg1=o(function(){"use strict";var $_=q(),H_=mr1(),G_=_(),W_=A1(),V_=er1(),z_=M(),K_=Or1(),Y_=qt1(),J_1=R(),Kg1=TypeError,Yg1=J_1(function(){[].keys().reduce(function(){},void 0)}),Xu1=!Yg1&&K_("reduce",Kg1);$_({target:"Iterator",proto:!0,real:!0,forced:Yg1||Xu1},{reduce:function reduce(e){W_(this);try{G_(e)}catch(u){z_(this,"throw",u)}var t=arguments.length<2,a=t?void 0:arguments[1];if(Xu1)return Y_(Xu1,this,t?[e]:[e,a]);var i=V_(this),n=0;if(H_(i,function(u){t?(t=!1,a=u):a=e(a,u,n),n++},{IS_RECORD:!0}),t)throw new Kg1("Reduce of empty iterator with no initial value");return a}})});var Xg1=o(function(){"use strict";var X_1=q(),Q_=m(),Z_=mr1(),r11=_(),e11=A1(),t11=er1(),a11=M(),i11=Or1(),Qu1=i11("some",TypeError);X_1({target:"Iterator",proto:!0,real:!0,forced:Qu1},{some:function some(e){e11(this);try{r11(e)}catch(i){a11(this,"throw",i)}if(Qu1)return Q_(Qu1,this,e);var t=t11(this),a=0;return Z_(t,function(i,n){if(e(i,a++))return n()},{IS_RECORD:!0,INTERRUPTED:!0}).stopped}})});var Qg1=o(function(){"use strict";var n11=q(),u11=A1(),o11=mr1(),s11=er1(),v11=[].push;n11({target:"Iterator",proto:!0,real:!0},{toArray:function toArray(){var e=[];return o11(s11(u11(this)),v11,{that:e,IS_RECORD:!0}),e}})});var ry1=o(function(AW1,Zg1){"use strict";var c11=P1(),f11=_$X().get;Zg1.exports=function(e){if(!c11(e))return!1;var t=f11(e);return!!t&&t.type==="RawJSON"}});var ny1=o(function(wW1,iy1){"use strict";var Zu1=S(),l11=C(),Ga=SyntaxError,h11=parseInt,p11=String.fromCharCode,g11=Zu1("".charAt),ey1=Zu1("".slice),ty1=Zu1(/./.exec),ay1={'\\"':'"',"\\\\":"\\","\\/":"/","\\b":"\b","\\f":"\f","\\n":"\n","\\r":"\r","\\t":" "},y11=/^[\da-f]{4}$/i,d11=/^[\u0000-\u001F]$/;iy1.exports=function(r,e){for(var t=!0,a="";e0?(v=s/u,a+=v*v):a+=s;return u===1/0?1/0:u*D11(a)}})});var Oy1=o(function(){"use strict";var U1=q(),B11=mr1(),M1=Et1();U1({target:"Object",stat:!0},{fromEntries:function fromEntries(e){var t={};return B11(e,function(a,i){M1(t,a,i)},{AS_ENTRIES:!0}),t}})});var my1=o(function(){"use strict";var k11=q(),j1=C();k11({target:"Object",stat:!0},{hasOwn:j1})});var no1=o(function(UW1,wy1){"use strict";var Ay1=_(),$1=TypeError,H11=function H11(r){var e,t;this.promise=new r(function(a,i){if(e!==void 0||t!==void 0)throw new $1("Bad Promise constructor");e=a,t=i}),this.resolve=Ay1(e),this.reject=Ay1(t)};wy1.exports.f=function(r){return new H11(r)}});var xy1=o(function(BW1,by1){"use strict";by1.exports=function(r){try{return{error:!1,value:r()}}catch(e){return{error:!0,value:e}}}});var za1=o(function(MW1,Cy1){"use strict";var G11=I();Cy1.exports=G11.Promise});var oo1=o(function(kW1,Ly1){"use strict";var W11=x(),_y1=W11("iterator"),Ny1=!1;try{Py1=0,uo1={next:function next(){return{done:!!Py1++}},return:function _return(){Ny1=!0}},uo1[_y1]=function(){return this},Array.from(uo1,function(){throw 2})}catch(r){}var Py1,uo1;Ly1.exports=function(r,e){try{if(!e&&!Ny1)return!1}catch(i){return!1}var t=!1;try{var a={};a[_y1]=function(){return{next:function next(){return{done:t=!0}}}},r(a)}catch(i){}return t}});var My1=o(function(jW1,By1){"use strict";var V11=I(),Ot1=za1(),z11=b(),K11=Pn1(),Y11=aa1(),J11=x(),Dy1=Ca1(),X11=D(),so1=se1(),Fy1=Ot1&&Ot1.prototype,Q11=J11("species"),vo1=!1,Uy1=z11(V11.PromiseRejectionEvent),Z11=K11("Promise",function(){var r=Y11(Ot1),e=r!==String(Ot1);if(!e&&so1===66||X11&&!(Fy1.catch&&Fy1.finally))return!0;if(!so1||so1<51||!/native code/.test(r)){var t=new Ot1(function(n){n(1)}),a=function a(n){n(function(){},function(){})},i=t.constructor={};if(i[Q11]=a,vo1=_instanceof(t.then(function(){}),a),!vo1)return!0}return!e&&(Dy1==="BROWSER"||Dy1==="DENO")&&!Uy1});By1.exports={CONSTRUCTOR:Z11,REJECTION_EVENT:Uy1,SUBCLASSING:vo1}});var jy1=o(function($W1,ky1){"use strict";var rN1=za1(),eN1=oo1(),tN1=My1().CONSTRUCTOR;ky1.exports=tN1||!eN1(function(r){rN1.all(r).then(void 0,function(){})})});var $y1=o(function(){"use strict";var aN1=q(),iN1=m(),nN1=_(),uN1=no1(),oN1=xy1(),sN1=mr1(),vN1=jy1();aN1({target:"Promise",stat:!0,forced:vN1},{allSettled:function allSettled(e){var t=this,a=uN1.f(t),i=a.resolve,n=a.reject,u=oN1(function(){var s=nN1(t.resolve),v=[],f10=0,l=1;sN1(e,function(c){var h=f10++,y=!1;l++,iN1(s,t,c).then(function(g){y||(y=!0,v[h]={status:"fulfilled",value:g},--l||i(v))},function(g){y||(y=!0,v[h]={status:"rejected",reason:g},--l||i(v))})}),--l||i(v)});return u.error&&n(u.value),a.promise}})});var At1=o(function(WW1,zy1){"use strict";var cN=S(),fN1=R(),Hy1=b(),lN1=Ir1(),hN1=W10(),pN1=aa1(),Gy1=function Gy1(){},Wy1=hN1("Reflect","construct"),co1=/^\s*(?:class|function)\b/,gN1=cN(co1.exec),yN1=!co1.test(Gy1),_$mt=function mt1(e){if(!Hy1(e))return!1;try{return Wy1(Gy1,[],e),!0}catch(t){return!1}},Vy1=function Vy1(e){if(!Hy1(e))return!1;switch(lN1(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return yN1||!!gN1(co1,pN1(e))}catch(t){return!0}};Vy1.sham=!0;zy1.exports=!Wy1||fN1(function(){var r;return _$mt(_$mt.call)||!_$mt(Object)||!_$mt(function(){r=!0})||r})?Vy1:_$mt});var _$fo=o(function(VW1,Ky1){"use strict";var dN1=At1(),qN1=ve(),EN1=TypeError;Ky1.exports=function(r){if(dN1(r))return r;throw new EN1(qN1(r)+" is not a constructor")}});var lo1=o(function(zW1,Jy1){"use strict";var Yy1=A1(),SN1=_$fo(),IN1=we(),RN1=x(),TN1=RN1("species");Jy1.exports=function(r,e){var t=Yy1(r).constructor,a;return t===void 0||IN1(a=Yy1(t)[TN1])?e:SN1(a)}});var Qy1=o(function(KW1,Xy1){"use strict";var ON1=A1(),mN1=P1(),AN1=no1();Xy1.exports=function(r,e){if(ON1(r),mN1(e)&&e.constructor===r)return e;var t=AN1.f(r),a=t.resolve;return a(e),t.promise}});var td1=o(function(){"use strict";var wN1=q(),bN=D(),Ka1=za1(),xN1=R(),rd1=W10(),ed1=b(),CN1=lo1(),Zy1=Qy1(),PN1=Z(),po1=Ka1&&Ka1.prototype,_N1=!!Ka1&&xN1(function(){po1.finally.call({then:function then(){}},function(){})});wN1({target:"Promise",proto:!0,real:!0,forced:_N1},{finally:function _finally(r){var e=CN1(this,rd1("Promise")),t=ed1(r);return this.then(t?function(a){return Zy1(e,r()).then(function(){return a})}:r,t?function(a){return Zy1(e,r()).then(function(){throw a})}:r)}});!bN&&ed1(Ka1)&&(ho1=rd1("Promise").prototype.finally,po1.finally!==ho1&&PN1(po1,"finally",ho1,{unsafe:!0}));var ho1});var ad=o(function(){"use strict";var NN1=q(),LN=I(),DN1=Hr();NN1({global:!0},{Reflect:{}});DN1(LN.Reflect,"Reflect",!0)});var nd1=o(function(ZW1,id1){"use strict";var FN1=TypeError;id1.exports=function(r){if(typeof r=="string")return r;throw new FN1("Argument is not a string")}});var od1=o(function(r31,ud){"use strict";var UN1=k(),BN1=N(),MN1=ir1(),kN1=RangeError;ud.exports=function(e){var t=BN1(MN1(this)),a="",i=UN1(e);if(i<0||i===1/0)throw new kN1("Wrong number of repetitions");for(;i>0;(i>>>=1)&&(t+=t))i&1&&(a+=t);return a}});var ld=o(function(e31,fd){"use strict";var cd=S(),jN1=_r1(),sd=N(),$N=od1(),HN1=ir1(),GN1=cd($N),WN1=cd("".slice),VN1=Math.ceil,vd1=function vd1(r){return function(e,t,a){var i=sd(HN1(e)),n=jN1(t),u=i.length,s=a===void 0?" ":sd(a),v,f10;return n<=u||s===""?i:(v=n-u,f10=GN1(s,VN1(v/s.length)),f10.length>v&&(f10=WN1(f10,0,v)),r?i+f10:f10+i)}};fd.exports={start:vd1(!1),end:vd1(!0)}});var Ya1=o(function(t31,hd){"use strict";hd.exports=" \n\v\f\r \xa0               \u2028\u2029\uFEFF"});var Ed1=o(function(){"use strict";var zN1=q(),wt1=S(),KN1=nd1(),YN1=C(),pd=ld().start,JN1=Ya1(),XN1=Array,gd=RegExp.escape,yd1=wt1("".charAt),qo=wt1("".charCodeAt),QN1=wt1(1.1.toString),ZN1=wt1([].join),_$qd=/^[0-9a-z]/i,rL1=/^[$()*+./?[\\\]^{|}]/,eL1=RegExp("^[!\"#%&',\\-:;<=>@`~"+JN1+"]"),go1=wt1(_$qd.exec),dd={" ":"t","\n":"n","\v":"v","\f":"f","\r":"r"},yo1=function yo1(r){var e=QN1(qo(r,0),16);return e.length<3?"\\x"+pd(e,2,"0"):"\\u"+pd(e,4,"0")},tL1=!gd||gd("ab")!=="\\x61b";zN1({target:"RegExp",stat:!0,forced:tL1},{escape:function escape1(e){KN1(e);for(var t=e.length,a=XN1(t),i=0;i=56320||i+1>=t||(qo(e,i+1)&64512)!==56320?a[i]=yo1(n):(a[i]=n,a[++i]=yd1(e,i))}}return ZN1(a,"")}})});var Eo=o(function(n31,Id1){"use strict";var aL1=I(),iL1=R(),Sd1=aL1.RegExp,nL1=!iL1(function(){var r=!0;try{Sd1(".","d")}catch(v){r=!1}var e={},t="",a=r?"dgimsy":"gimsy",i=function i(v,f10){Object.defineProperty(e,v,{get:function get1(){return t+=f10,!0}})},n={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};r&&(n.hasIndices="d");for(var u in n)i(u,n[u]);var s=Object.getOwnPropertyDescriptor(Sd1.prototype,"flags").get.call(e);return s!==a||t!==a});Id1.exports={correct:nL1}});var Ja1=o(function(u31,Rd1){"use strict";var uL1=A1();Rd1.exports=function(){var r=uL1(this),e="";return r.hasIndices&&(e+="d"),r.global&&(e+="g"),r.ignoreCase&&(e+="i"),r.multiline&&(e+="m"),r.dotAll&&(e+="s"),r.unicode&&(e+="u"),r.unicodeSets&&(e+="v"),r.sticky&&(e+="y"),e}});var Od1=o(function(){"use strict";var oL1=w(),sL1=Q(),Td=Eo(),vL1=Ja1();oL1&&!Td.correct&&(sL1(RegExp.prototype,"flags",{configurable:!0,get:vL1}),Td.correct=!0)});var nr1=o(function(v31,md){"use strict";var So1=S(),Xa1=Set.prototype;md.exports={Set:Set,add:So1(Xa1.add),has:So1(Xa1.has),remove:So1(Xa1.delete),proto:Xa1}});var Jr=o(function(c31,Ad1){"use strict";var cL1=nr1().has;Ad1.exports=function(r){return cL1(r),r}});var Xr=o(function(f31,wd1){"use strict";var fL1=m();wd1.exports=function(r,e,t){for(var a=t?r:r.iterator,i=r.next,n,u;!(n=fL1(i,a)).done;)if(u=e(n.value),u!==void 0)return u}});var _$qe=o(function(l31,_d1){"use strict";var bd1=S(),lL1=Xr(),xd1=nr1(),hL1=xd1.Set,Cd1=xd1.proto,pL1=bd1(Cd1.forEach),Pd1=bd1(Cd1.keys),gL1=Pd1(new hL1).next;_d1.exports=function(r,e,t){return t?lL1({iterator:Pd1(r),next:gL1},e):pL1(r,e)}});var Qa1=o(function(h31,Ld1){"use strict";var Nd1=nr1(),yL1=_$qe(),dL1=Nd1.Set,qL1=Nd1.add;Ld1.exports=function(r){var e=new dL1;return yL1(r,function(t){qL1(e,t)}),e}});var Me1=o(function(p31,Dd1){"use strict";var EL1=_$ut(),SL1=nr1();Dd1.exports=EL1(SL1.proto,"size","get")||function(r){return r.size}});var Qr1=o(function(g31,jd1){"use strict";var Fd1=_(),Md1=A1(),Ud1=m(),IL1=k(),RL1=er1(),Bd1="Invalid size",TL1=RangeError,OL1=TypeError,mL1=Math.max,kd1=function kd1(r,e){this.set=r,this.size=mL1(e,0),this.has=Fd1(r.has),this.keys=Fd1(r.keys)};kd1.prototype={getIterator:function getIterator(){return RL1(Md1(Ud1(this.keys,this.set)))},includes:function includes(r){return Ud1(this.has,this.set,r)}};jd1.exports=function(r){Md1(r);var e=+r.size;if(e!==e)throw new OL1(Bd1);var t=IL1(e);if(t<0)throw new TL1(Bd1);return new kd1(r,t)}});var Wd1=o(function(y31,Gd1){"use strict";var AL1=Jr(),Hd1=nr1(),wL1=Qa1(),bL1=Me1(),xL1=Qr1(),CL1=_$qe(),PL1=Xr(),_L1=Hd1.has,$d1=Hd1.remove;Gd1.exports=function(e){var t=AL1(this),a=xL1(e),i=wL1(t);return bL1(t)<=a.size?CL1(t,function(n){a.includes(n)&&$d1(i,n)}):PL1(a.getIterator(),function(n){_L1(i,n)&&$d1(i,n)}),i}});var Zr1=o(function(d31,Kd1){"use strict";var NL1=W10(),Vd1=function Vd1(r){return{size:r,has:function has(){return!1},keys:function keys(){return{next:function next(){return{done:!0}}}}}},zd1=function zd1(r){return{size:r,has:function has(){return!0},keys:function keys(){throw new Error("e")}}};Kd1.exports=function(r,e){var t=NL1("Set");try{new t()[r](Vd1(0));try{return new t()[r](Vd1(-1)),!1}catch(i){if(!e)return!0;try{return new t()[r](zd1(-1/0)),!1}catch(n){var a=new t([1,2]);return e(a[r](zd1(1/0)))}}}catch(i){return!1}}});var Yd1=o(function(){"use strict";var LL1=q(),DL1=Wd1(),FL1=R(),UL1=Zr1(),BL1=!UL1("difference",function(r){return r.size===0}),ML1=BL1||FL1(function(){var r={size:1,has:function has(){return!0},keys:function keys(){var t=0;return{next:function next(){var a=t++>1;return e.has(1)&&e.clear(),{done:a,value:2}}}}},e=new Set([1,2,3,4]);return e.difference(r).size!==3});LL1({target:"Set",proto:!0,real:!0,forced:ML1},{difference:DL1})});var Qd1=o(function(S31,Xd1){"use strict";var kL1=Jr(),Io1=nr1(),jL1=Me1(),$L1=Qr1(),HL1=_$qe(),GL1=Xr(),WL1=Io1.Set,Jd1=Io1.add,VL1=Io1.has;Xd1.exports=function(e){var t=kL1(this),a=$L1(e),i=new WL1;return jL1(t)>a.size?GL1(a.getIterator(),function(n){VL1(t,n)&&Jd1(i,n)}):HL1(t,function(n){a.includes(n)&&Jd1(i,n)}),i}});var _$Zd=o(function(){"use strict";var zL1=q(),KL1=R(),YL1=Qd1(),JL1=Zr1(),XL1=!JL1("intersection",function(r){return r.size===2&&r.has(1)&&r.has(2)})||KL1(function(){return String(Array.from(new Set([1,2,3]).intersection(new Set([3,2]))))!=="3,2"});zL1({target:"Set",proto:!0,real:!0,forced:XL1},{intersection:YL1})});var eq1=o(function(T31,rq1){"use strict";var QL1=Jr(),ZL1=nr1().has,rD1=Me1(),eD1=Qr1(),tD1=_$qe(),aD1=Xr(),iD1=M();rq1.exports=function(e){var t=QL1(this),a=eD1(e);if(rD1(t)<=a.size)return tD1(t,function(n){if(a.includes(n))return!1},!0)!==!1;var i=a.getIterator();return aD1(i,function(n){if(ZL1(t,n))return iD1(i,"normal",!1)})!==!1}});var tq1=o(function(){"use strict";var nD1=q(),uD1=eq1(),oD1=Zr1(),sD1=!oD1("isDisjointFrom",function(r){return!r});nD1({target:"Set",proto:!0,real:!0,forced:sD1},{isDisjointFrom:uD1})});var iq1=o(function(A31,aq1){"use strict";var vD1=Jr(),cD1=Me1(),fD1=_$qe(),lD1=Qr1();aq1.exports=function(e){var t=vD1(this),a=lD1(e);return cD1(t)>a.size?!1:fD1(t,function(i){if(!a.includes(i))return!1},!0)!==!1}});var nq1=o(function(){"use strict";var hD1=q(),pD1=iq1(),gD1=Zr1(),yD1=!gD1("isSubsetOf",function(r){return r});hD1({target:"Set",proto:!0,real:!0,forced:yD1},{isSubsetOf:pD1})});var oq1=o(function(x31,uq1){"use strict";var dD1=Jr(),qD1=nr1().has,ED1=Me1(),SD1=Qr1(),ID1=Xr(),RD1=M();uq1.exports=function(e){var t=dD1(this),a=SD1(e);if(ED1(t)=0?i:a+i;return n<0||n>=a?void 0:eF1(t,n)}})});var Za1=o(function(j31,dq1){"use strict";var aF1=St1().IteratorPrototype,iF1=Vr1(),nF1=Pr1(),uF1=Hr(),oF1=Be1(),sF1=function sF1(){return this};dq1.exports=function(r,e,t,a){var i=e+" Iterator";return r.prototype=iF1(aF1,{next:nF1(+!a,t)}),uF1(r,i,!1,!0),oF1[i]=sF1,r}});var Oo1=o(function($31,qq1){"use strict";var vF1=P1(),cF1=pr1(),fF1=x(),lF1=fF1("match");qq1.exports=function(r){var e;return vF1(r)&&((e=r[lF1])!==void 0?!!e:cF1(r)==="RegExp")}});var bt1=o(function(H31,Sq1){"use strict";var hF1=m(),pF1=C(),gF1=Cr(),Eq1=Eo(),yF1=Ja1(),dF1=RegExp.prototype;Sq1.exports=Eq1.correct?function(r){return r.flags}:function(r){return!Eq1.correct&&gF1(dF1,r)&&!pF1(r,"flags")?hF1(yF1,r):r.flags}});var ri=o(function(G31,Tq1){"use strict";var mo1=S(),qF1=k(),EF1=N(),SF1=ir1(),IF1=mo1("".charAt),Iq1=mo1("".charCodeAt),RF1=mo1("".slice),Rq1=function Rq1(r){return function(e,t){var a=EF1(SF1(e)),i=qF1(t),n=a.length,u,s;return i<0||i>=n?r?"":void 0:(u=Iq1(a,i),u<55296||u>56319||i+1===n||(s=Iq1(a,i+1))<56320||s>57343?r?IF1(a,i):u:r?RF1(a,i,i+2):(u-55296<<10)+(s-56320)+65536)}};Tq1.exports={codeAt:Rq1(!1),charAt:Rq1(!0)}});var Ao1=o(function(W31,Oq1){"use strict";var TF1=ri().charAt;Oq1.exports=function(r,e,t){return e+(t?TF1(r,e).length:1)}});var Aq1=o(function(V31,mq1){"use strict";var wo=R(),OF1=I(),bo1=OF1.RegExp,xo1=wo(function(){var r=bo1("a","y");return r.lastIndex=2,r.exec("abcd")!==null}),mF1=xo1||wo(function(){return!bo1("a","y").sticky}),AF1=xo1||wo(function(){var r=bo1("^r","gy");return r.lastIndex=2,r.exec("str")!==null});mq1.exports={BROKEN_CARET:AF1,MISSED_STICKY:mF1,UNSUPPORTED_Y:xo1}});var bq1=o(function(z31,wq1){"use strict";var wF1=R(),bF1=I(),xF1=bF1.RegExp;wq1.exports=wF1(function(){var r=xF1(".","s");return!(r.dotAll&&r.test("\n")&&r.flags==="s")})});var Cq1=o(function(K31,xq1){"use strict";var CF1=R(),PF1=I(),_F1=PF1.RegExp;xq1.exports=CF1(function(){var r=_F1("(?b)","g");return r.exec("b").groups.a!=="b"||"b".replace(r,"$c")!=="bc"})});var ai1=o(function(Y31,_q1){"use strict";var ke1=m(),ti1=S(),NF1=N(),LF1=Ja1(),DF1=Aq1(),FF1=sa1(),UF1=Vr1(),BF1=_$X().get,MF1=bq1(),kF1=Cq1(),jF1=FF1("native-string-replace",String.prototype.replace),ei1=RegExp.prototype.exec,Po1=ei1,$F1=ti1("".charAt),HF1=ti1("".indexOf),GF1=ti1("".replace),Co=ti1("".slice),_o1=function(){var r=/a/,e=/b*/g;return ke1(ei1,r,"a"),ke1(ei1,e,"a"),r.lastIndex!==0||e.lastIndex!==0}(),Pq1=DF1.BROKEN_CARET,No=/()??/.exec("")[1]!==void 0,WF=_o1||No||Pq1||MF1||kF1;WF&&(Po1=function(e){var t=this,a=BF1(t),i=NF1(e),n=a.raw,u,s,v,f10,l,c,h;if(n)return n.lastIndex=t.lastIndex,u=ke1(Po1,n,i),t.lastIndex=n.lastIndex,u;var y=a.groups,g=Pq1&&t.sticky,d=ke1(LF1,t),E=t.source,T=0,O=i;if(g&&(d=GF1(d,"y",""),HF1(d,"g")===-1&&(d+="g"),O=Co(i,t.lastIndex),t.lastIndex>0&&(!t.multiline||t.multiline&&$F1(i,t.lastIndex-1)!=="\n")&&(E="(?: "+E+")",O=" "+O,T++),s=new RegExp("^(?:"+E+")",d)),No&&(s=new RegExp("^"+E+"$(?!\\s)",d)),_o1&&(v=t.lastIndex),f10=ke1(ei1,g?s:t,O),g?f10?(f10.input=Co(f10.input,T),f10[0]=Co(f10[0],T),f10.index=t.lastIndex,t.lastIndex+=f10[0].length):t.lastIndex=0:_o1&&f10&&(t.lastIndex=t.global?f10.index+f10[0].length:v),No&&f10&&f10.length>1&&ke1(jF1,f10[0],s,function(){for(l=1;l]*>)/g,qU1=/\$([$&'`]|\d{1,2})/g;Wq1.exports=function(r,e,t,a,i,n){var u=t+r.length,s=a.length,v=qU1;return i!==void 0&&(i=pU1(i),v=dU1),yU1(n,v,function(f10,l){var c;switch(_$Mo(l,0)){case"$":return"$";case"&":return r;case"`":return ko(e,0,t);case"'":return ko(e,u);case"<":c=i[ko(l,1,-1)];break;default:var h=+l;if(h===0)return f10;if(h>s){var y=gU1(h/10);return y===0?f10:y<=s?a[y-1]===void 0?_$Mo(l,1):a[y-1]+_$Mo(l,1):f10}c=a[h-1]}return c===void 0?"":c})}});var Kq1=o(function(){"use strict";var EU=q(),SU1=m(),Go1=S(),Vq1=ir1(),IU1=b(),RU1=P1(),TU=Oo1(),_$je=N(),OU1=$r1(),_$mU=bt1(),AU=$o1(),wU=x(),bU=D(),xU=wU("replace"),CU=TypeError,Ho1=Go1("".indexOf),PU1=Go1("".replace),zq1=Go1("".slice),_U=Math.max;EU({target:"String",proto:!0},{replaceAll:function replaceAll(e,t){var a=Vq1(this),i,n,u,s,v,f10,l,c,h,y,g=0,d="";if(RU1(e)){if(i=TU(e),i&&(n=_$je(Vq1(_$mU(e))),!~Ho1(n,"g")))throw new CU("`.replaceAll` does not allow non-global regexes");if(u=OU1(e,xU),u)return SU1(u,e,a,t);if(bU&&i)return PU1(_$je(a),e,t)}for(s=_$je(a),v=_$je(e),f10=IU1(t),f10||(t=_$je(t)),l=v.length,c=_U(1,l),h=Ho1(s,v);h!==-1;)y=f10?_$je(t(v,h,s)):AU(v,s,h,[],void 0,t),d+=zq1(s,g,h)+y,g=h+l,h=h+c>s.length?-1:Ho1(s,v,h+c);return g")!=="7"});BU1("replace",function(r,e,t){var a=nE1?"$":"$0";return[function(n,u){var s=WU1(this),v=$U1(n)?zU1(n,zo1):void 0;return v?aE1(v,n,s,u):aE1(e,Ee(s),n,u)},function(i,n){var u=kU(this),s=Ee(i);if(typeof n=="string"&&_$oi(n,a)===-1&&_$oi(n,"$<")===-1){var v=t(e,u,s,n);if(v.done)return v.value}var f10=jU1(n);f10||(n=Ee(n));var l=Ee(YU1(u)),c=_$oi(l,"g")!==-1,h;c&&(h=_$oi(l,"u")!==-1,u.lastIndex=0);for(var y=[],g;g=JU1(u,s),!(g===null||(Vo1(y,g),!c));){var d=Ee(g[0]);d===""&&(u.lastIndex=VU1(s,GU1(u.lastIndex),h))}for(var E="",T=0,O=0;O=T&&(E+=iE1(s,T,G)+ar,T=G+_$tr.length)}return E+iE1(s,T)}]},!a21||!t21||nE1)});var Jo1=o(function(o61,sE1){"use strict";var i21=S(),n21=ir1(),u21=N(),Yo1=Ya1(),oE1=i21("".replace),o21=RegExp("^["+Yo1+"]+"),s21=RegExp("(^|[^"+Yo1+"])["+Yo1+"]+$"),Ko1=function Ko1(r){return function(e){var t=u21(n21(e));return r&1&&(t=oE1(t,o21,"")),r&2&&(t=oE1(t,s21,"$1")),t}};sE1.exports={start:Ko1(1),end:Ko1(2),trim:Ko1(3)}});var Xo1=o(function(s61,fE1){"use strict";var v21=at().PROPER,c21=R(),vE1=Ya1(),cE1="​\x85᠎";fE1.exports=function(r){return c21(function(){return!!vE1[r]()||cE1[r]()!==cE1||v21&&vE1[r].name!==r})}});var Qo1=o(function(v61,lE1){"use strict";var f21=Jo1().end,l21=Xo1();lE1.exports=l21("trimEnd")?function(){return f21(this)}:"".trimEnd});var pE1=o(function(){"use strict";var h21=q(),hE1=Qo1();h21({target:"String",proto:!0,name:"trimEnd",forced:"".trimRight!==hE1},{trimRight:hE1})});var yE1=o(function(){"use strict";pE1();var p21=q(),gE1=Qo1();p21({target:"String",proto:!0,name:"trimEnd",forced:"".trimEnd!==gE1},{trimEnd:gE1})});var dE1=o(function(){"use strict";var g21=q(),y21=Jo1().trim,d21=Xo1();g21({target:"String",proto:!0,forced:d21("trim")},{trim:function trim(){return y21(this)}})});var OE1=o(function(){"use strict";var q21=q(),E21=w(),S21=I(),vi1=S(),I21=C(),R21=b(),T21=Cr(),O21=N(),m21=Q(),A21=st1(),Dr=S21.Symbol,Se1=Dr&&Dr.prototype;E21&&R21(Dr)&&(!("description"in Se1)||Dr().description!==void 0)&&(Zo1={},Ct1=function Ct1(){var e=arguments.length<1||arguments[0]===void 0?void 0:O21(arguments[0]),t=T21(Se1,this)?new Dr(e):e===void 0?Dr():Dr(e);return e===""&&(Zo1[t]=!0),t},A21(Ct1,Dr),Ct1.prototype=Se1,Se1.constructor=Ct1,qE1=String(Dr("description detection"))==="Symbol(description detection)",EE1=vi1(Se1.valueOf),SE1=vi1(Se1.toString),_$IE=/^Symbol\((.*)\)[^)]+$/,RE1=vi1("".replace),TE1=vi1("".slice),m21(Se1,"description",{configurable:!0,get:function get1(){var e=EE1(this);if(I21(Zo1,e))return"";var t=SE1(e),a=qE1?TE1(t,7,-1):RE1(t,_$IE,"$1");return a===""?void 0:a}}),q21({global:!0,constructor:!0,forced:!0},{Symbol:Ct1}));var Zo1,Ct1,qE1,EE1,SE1,_$IE,RE1,TE1});var AE1=o(function(q61,mE1){"use strict";var _$w2=I();mE1.exports=_$w2});var bE1=o(function(wE1){"use strict";var b21=x();wE1.f=b21});var PE1=o(function(S61,CE1){"use strict";var xE1=AE1(),x21=C(),C21=bE1(),P21=V().f;CE1.exports=function(r){var e=xE1.Symbol||(xE1.Symbol={});x21(e,r)||P21(e,r,{value:C21.f(r)})}});var _E1=o(function(){"use strict";var _21=PE1();_21("matchAll")});var Y=o(function(T61,$E1){"use strict";var N21=da(),as1=w(),j=I(),FE1=b(),li1=P1(),ee=C(),is1=Ir1(),L21=ve(),D21=z(),rs1=Z(),F21=Q(),U21=Cr(),hi1=Ne1(),He1=he1(),B21=x(),M21=Ce1(),UE1=_$X(),BE1=UE1.enforce,k21=UE1.get,ci1=j.Int8Array,es1=ci1&&ci1.prototype,NE1=j.Uint8ClampedArray,LE1=NE1&&NE1.prototype,Ar=ci1&&hi1(ci1),yr=es1&&hi1(es1),j21=Object.prototype,ns1=j.TypeError,DE1=B21("toStringTag"),ts1=M21("TYPED_ARRAY_TAG"),fi="TypedArrayConstructor",Fr1=N21&&!!He1&&is1(j.opera)!=="Opera",ME1=!1,K,re,_$$e,Ur1={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},us1={BigInt64Array:8,BigUint64Array:8},$21=function $21(e){if(!li1(e))return!1;var t=is1(e);return t==="DataView"||ee(Ur1,t)||ee(us1,t)},kE1=function kE2(r){var e=hi1(r);if(li1(e)){var t=k21(e);return t&&ee(t,fi)?t[fi]:kE1(e)}},jE1=function jE1(r){if(!li1(r))return!1;var e=is1(r);return ee(Ur1,e)||ee(us1,e)},H21=function H21(r){if(jE1(r))return r;throw new ns1("Target is not a typed array")},G21=function G21(r){if(FE1(r)&&(!He1||U21(Ar,r)))return r;throw new ns1(L21(r)+" is not a typed array constructor")},W21=function W21(r,e,t,a){if(as1){if(t)for(var i in Ur1){var n=j[i];if(n&&ee(n.prototype,r))try{delete n.prototype[r]}catch(u){try{n.prototype[r]=e}catch(s){}}}(!yr[r]||t)&&rs1(yr,r,t?e:Fr1&&es1[r]||e,a)}},_$V2=function V21(r,e,t){var a,i;if(as1){if(He1){if(t){for(a in Ur1)if(i=j[a],i&&ee(i,r))try{delete i[r]}catch(n){}}if(!Ar[r]||t)try{return rs1(Ar,r,t?e:Fr1&&Ar[r]||e)}catch(n){}else return}for(a in Ur1)i=j[a],i&&(!i[r]||t)&&rs1(i,r,e)}};for(K in Ur1)re=j[K],_$$e=re&&re.prototype,_$$e?BE1(_$$e)[fi]=re:Fr1=!1;for(K in us1)re=j[K],_$$e=re&&re.prototype,_$$e&&(BE1(_$$e)[fi]=re);if((!Fr1||!FE1(Ar)||Ar===Function.prototype)&&(Ar=function Ar(){throw new ns1("Incorrect invocation")},Fr1))for(K in Ur1)j[K]&&He1(j[K],Ar);if((!Fr1||!yr||yr===j21)&&(yr=Ar.prototype,Fr1))for(K in Ur1)j[K]&&He1(j[K].prototype,yr);Fr1&&hi1(LE1)!==yr&&He1(LE1,yr);if(as1&&!ee(yr,DE1)){ME1=!0,F21(yr,DE1,{configurable:!0,get:function get1(){return li1(this)?this[ts1]:void 0}});for(K in Ur1)j[K]&&D21(j[K],ts1,K)}$E1.exports={NATIVE_ARRAY_BUFFER_VIEWS:Fr1,TYPED_ARRAY_TAG:ME1&&ts1,aTypedArray:H21,aTypedArrayConstructor:G21,exportTypedArrayMethod:W21,exportTypedArrayStaticMethod:_$V2,getTypedArrayConstructor:kE1,isView:$21,isTypedArray:jE1,TypedArray:Ar,TypedArrayPrototype:yr}});var _$GE=o(function(){"use strict";var HE1=Y(),z21=L(),K21=k(),Y21=HE1.aTypedArray,J21=HE1.exportTypedArrayMethod;J21("at",function(e){var t=Y21(this),a=z21(t),i=K21(e),n=i>=0?i:a+i;return n<0||n>=a?void 0:t[n]})});var pi=o(function(A61,WE1){"use strict";var X21=ln1(),Q21=TypeError;WE1.exports=function(r){var e=X21(r,"number");if(typeof e=="number")throw new Q21("Can't convert number to bigint");return BigInt(e)}});var zE1=o(function(){"use strict";var VE1=Y(),Z21=Nn(),rB1=pi(),eB1=Ir1(),tB1=m(),aB1=S(),iB1=R(),nB1=VE1.aTypedArray,uB1=VE1.exportTypedArrayMethod,oB1=aB1("".slice),sB1=iB1(function(){var r=0;return new Int8Array(2).fill({valueOf:function valueOf(){return r++}}),r!==1});uB1("fill",function(e){var t=arguments.length;nB1(this);var a=oB1(eB1(this),0,3)==="Big"?rB1(e):+e;return tB1(Z21,this,a,t>1?arguments[1]:void 0,t>2?arguments[2]:void 0)},sB1)});var os1=o(function(x61,YE1){"use strict";var vB1=_$Kr(),cB1=_e1(),fB1=B(),lB1=L(),KE1=function KE1(r){var e=r===1;return function(t,a,i){for(var n=fB1(t),u=cB1(n),s=lB1(u),v=vB1(a,i),f10,l;s-- >0;)if(f10=u[s],l=v(f10,s,n),l)switch(r){case 0:return f10;case 1:return s}return e?-1:void 0}};YE1.exports={findLast:KE1(0),findLastIndex:KE1(1)}});var _$XE=o(function(){"use strict";var JE1=Y(),hB1=os1().findLastIndex,pB1=JE1.aTypedArray,gB1=JE1.exportTypedArrayMethod;gB1("findLastIndex",function(e){return hB1(pB1(this),e,arguments.length>1?arguments[1]:void 0)})});var ZE1=o(function(){"use strict";var QE1=Y(),yB1=os1().findLast,dB1=QE1.aTypedArray,qB1=QE1.exportTypedArrayMethod;qB1("findLast",function(e){return yB1(dB1(this),e,arguments.length>1?arguments[1]:void 0)})});var vs1=o(function(L61,eS1){"use strict";var rS1=I(),ss1=R(),EB1=oo1(),SB1=Y().NATIVE_ARRAY_BUFFER_VIEWS,IB1=rS1.ArrayBuffer,Ie=rS1.Int8Array;eS1.exports=!SB1||!ss1(function(){Ie(1)})||!ss1(function(){new Ie(-1)})||!EB1(function(r){new Ie,new Ie(null),new Ie(1.5),new Ie(r)},!0)||ss1(function(){return new Ie(new IB1(2),1,void 0).length!==1})});var aS1=o(function(D61,tS1){"use strict";var RB1=P1(),TB1=Math.floor;tS1.exports=Number.isInteger||function(e){return!RB1(e)&&isFinite(e)&&TB1(e)===e}});var cs1=o(function(F61,iS1){"use strict";var OB1=Nu1(),mB1=RangeError;iS1.exports=function(r,e){var t=OB1(r);if(t%e)throw new mB1("Wrong offset");return t}});var uS1=o(function(U61,nS1){"use strict";var AB1=Math.round;nS1.exports=function(r){var e=AB1(r);return e<0?0:e>255?255:e&255}});var fs=o(function(B61,oS1){"use strict";var wB1=Ir1();oS1.exports=function(r){var e=wB1(r);return e==="BigInt64Array"||e==="BigUint64Array"}});var ls1=o(function(M61,sS1){"use strict";var bB1=_$Kr(),xB1=m(),CB1=_$fo(),PB1=B(),_B1=L(),NB1=Tt(),LB1=ye(),DB1=ja1(),FB1=fs(),UB1=Y().aTypedArrayConstructor,BB1=pi();sS1.exports=function(e){var t=CB1(this),a=PB1(e),i=arguments.length,n=i>1?arguments[1]:void 0,u=n!==void 0,s=LB1(a),v,f10,l,c,h,y,g,d;if(s&&!DB1(s))for(g=NB1(a,s),d=g.next,a=[];!(y=xB1(d,g)).done;)a.push(y.value);for(u&&i>2&&(n=bB1(n,arguments[2])),f10=_B1(a),l=new(UB1(t))(f10),c=FB1(l),v=0;f10>v;v++)h=u?n(a[v],v):a[v],l[v]=c?BB1(h):+h;return l}});var lS1=o(function(k61,fS1){"use strict";var vS1=dt1(),MB1=At1(),kB1=P1(),jB1=x(),$B1=jB1("species"),cS1=Array;fS1.exports=function(r){var e;return vS1(r)&&(e=r.constructor,MB1(e)&&(e===cS1||vS1(e.prototype))?e=void 0:kB1(e)&&(e=e[$B1],e===null&&(e=void 0))),e===void 0?cS1:e}});var pS1=o(function(j61,hS1){"use strict";var HB1=lS1();hS1.exports=function(r,e){return new(HB1(r))(e===0?0:e)}});var dS1=o(function($61,yS1){"use strict";var GB1=_$Kr(),WB1=S(),VB1=_e1(),zB1=B(),KB1=L(),YB1=pS1(),gS1=WB1([].push),te1=function te1(r){var e=r===1,t=r===2,a=r===3,i=r===4,n=r===6,u=r===7,s=r===5||n;return function(v,f10,l,c){for(var h=zB1(v),y=VB1(h),g=KB1(y),d=GB1(f10,l),E=0,T=c||YB1,O=e?T(v,g):t||u?T(v,0):void 0,_$tr,G;g>E;E++)if((s||E in y)&&(_$tr=y[E],G=d(_$tr,E,h),r))if(e)O[E]=G;else if(G)switch(r){case 3:return!0;case 5:return _$tr;case 6:return E;case 2:gS1(O,_$tr)}else switch(r){case 4:return!1;case 7:gS1(O,_$tr)}return n?-1:a||i?i:O}};yS1.exports={forEach:te1(0),map:te1(1),filter:te1(2),some:te1(3),every:te1(4),find:te1(5),findIndex:te1(6),filterReject:te1(7)}});var SS1=o(function(H61,ES1){"use strict";var JB1=W10(),XB1=Q(),QB1=x(),ZB1=w(),qS1=QB1("species");ES1.exports=function(r){var e=JB1(r);ZB1&&e&&!e[qS1]&&XB1(e,qS1,{configurable:!0,get:function get1(){return this}})}});var hs1=o(function(G61,IS1){"use strict";var rM=L();IS1.exports=function(r,e,t){for(var a=0,i=arguments.length>2?t:rM(e),n=new r(i);i>a;)n[a]=e[a++];return n}});var wr1=o(function(W61,Ss1){"use strict";var RS1=q(),NS1=I(),TS1=m(),eM=w(),tM=vs1(),_$Lt=Y(),LS1=kn(),OS1=le1(),aM1=Pr1(),Pt1=z(),iM1=aS1(),nM1=_r1(),mS1=_$Ra(),ps=cs1(),uM1=uS1(),DS1=va1(),_t1=C(),oM1=Ir1(),ds=P1(),sM1=xe(),vM1=Vr1(),cM1=Cr(),gi=he1(),fM1=xn().f,AS1=ls1(),lM1=dS1().forEach,hM1=SS1(),pM1=Q(),FS1=V(),US1=qa(),wS1=hs1(),Is1=_$X(),gM=_$lt(),qs1=Is1.get,yM1=Is1.set,dM1=Is1.enforce,BS1=FS1.f,qM1=US1.f,gs1=NS1.RangeError,MS1=LS1.ArrayBuffer,EM1=MS1.prototype,SM1=LS1.DataView,yi1=_$Lt.NATIVE_ARRAY_BUFFER_VIEWS,bS1=_$Lt.TYPED_ARRAY_TAG,xS1=_$Lt.TypedArray,Nt1=_$Lt.TypedArrayPrototype,Es1=_$Lt.isTypedArray,di1="BYTES_PER_ELEMENT",ys1="Wrong length",qi=function qi(r,e){pM1(r,e,{configurable:!0,get:function get1(){return qs1(this)[e]}})},CS1=function CS1(r){var e;return cM1(EM1,r)||(e=oM1(r))==="ArrayBuffer"||e==="SharedArrayBuffer"},kS1=function kS1(r,e){return Es1(r)&&!sM1(e)&&e in r&&iM1(+e)&&e>=0},_$PS=function PS1(e,t){return t=DS1(t),kS1(e,t)?aM1(2,e[t]):qM1(e,t)},_S1=function _S1(e,t,a){return t=DS1(t),kS1(e,t)&&ds(a)&&_t1(a,"value")&&!_t1(a,"get")&&!_t1(a,"set")&&!a.configurable&&(!_t1(a,"writable")||a.writable)&&(!_t1(a,"enumerable")||a.enumerable)?(e[t]=a.value,e):BS1(e,t,a)};eM?(yi1||(US1.f=_$PS,FS1.f=_S1,qi(Nt1,"buffer"),qi(Nt1,"byteOffset"),qi(Nt1,"byteLength"),qi(Nt1,"length")),RS1({target:"Object",stat:!0,forced:!yi1},{getOwnPropertyDescriptor:_$PS,defineProperty:_S1}),Ss1.exports=function(r,e,t){var a=r.match(/\d+/)[0]/8,i=r+(t?"Clamped":"")+"Array",n="get"+r,u="set"+r,s=NS1[i],v=s,f10=v&&v.prototype,l={},c=function c(d,E){var T=qs1(d);return T.view[n](E*a+T.byteOffset,!0)},h=function h(d,E,T){var O=qs1(d);O.view[u](E*a+O.byteOffset,t?uM1(T):T,!0)},y=function y(d,E){BS1(d,E,{get:function get1(){return c(this,E)},set:function set1(T){return h(this,E,T)},enumerable:!0})};yi1?tM&&(v=e(function(d,E,T,O){return OS1(d,f10),gM(function(){return ds(E)?CS1(E)?O!==void 0?new s(E,ps(T,a),O):T!==void 0?new s(E,ps(T,a)):new s(E):Es1(E)?wS1(v,E):TS1(AS1,v,E):new s(mS1(E))}(),d,v)}),gi&&gi(v,xS1),lM1(fM1(s),function(d){d in v||Pt1(v,d,s[d])}),v.prototype=f10):(v=e(function(d,E,T,O){OS1(d,f10);var _$tr=0,G=0,jr1,ar,xr;if(!ds(E))xr=mS1(E),ar=xr*a,jr1=new MS1(ar);else if(CS1(E)){jr1=E,G=ps(T,a);var oe=E.byteLength;if(O===void 0){if(oe%a)throw new gs1(ys1);if(ar=oe-G,ar<0)throw new gs1(ys1)}else if(ar=nM1(O)*a,ar+G>oe)throw new gs1(ys1);xr=ar/a}else return Es1(E)?wS1(v,E):TS1(AS1,v,E);for(yM1(d,{buffer:jr1,byteOffset:G,byteLength:ar,length:xr,view:new SM1(jr1)});_$tr1?arguments[1]:void 0,1),a=PM1(e);if(Ts1)return YS1(XS1,this,a,t);var i=this.length,n=xM(a),u=0;if(n+t>i)throw new _M1("Wrong length");for(;u0&&1/t<0?1:-1:e>t}};$M1("sort",function(e){return e!==void 0&&BM1(e),tI1?Ge(this,e):MM1(jM1(this),GM1(e))},!tI1||HM1)});var uI1=o(function(sV1,nI1){"use strict";var WM1=L();nI1.exports=function(r,e){for(var t=WM1(r),a=new e(t),i=0;i=e.length)return r.target=null,_$Ri(void 0,!0);switch(r.kind){case"keys":return _$Ri(t,!1);case"values":return _$Ri(e[t],!1)}return _$Ri([t,e[t]],!1)},"values");var PI=CI1.Arguments=CI1.Array;Ps1("keys");Ps1("values");Ps1("entries");if(!bk&&xk&&PI.name!=="values")try{Ak1(PI,"name",{value:"values"})}catch(r){}});var MI1=o(function(){"use strict";var DI1=I(),UI1=yI1(),_k=EI1(),Bt=_s1(),FI1=z(),Nk1=Hr(),Lk1=x(),Ns1=Lk1("iterator"),Ls=Bt.values,BI1=function BI1(r,e){if(r){if(r[Ns1]!==Ls)try{FI1(r,Ns1,Ls)}catch(a){r[Ns1]=Ls}if(Nk1(r,e,!0),UI1[e]){for(var t in Bt)if(r[t]!==Bt[t])try{FI1(r,t,Bt[t])}catch(a){r[t]=Bt[t]}}}};for(Ti in UI1)BI1(DI1[Ti]&&DI1[Ti].prototype,Ti);var Ti;BI1(_k,"DOMTokenList")});var jI1=o(function(xV1,kI1){"use strict";kI1.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 KI1=o(function(){"use strict";var Dk1=q(),Fk1=I(),$s1=W10(),ks1=Pr1(),js=V().f,$I1=C(),Uk1=le1(),Bk1=_$lt(),HI1=Su1(),Ds1=jI1(),Mk1=Iu1(),kk1=w(),VI1=D(),kt="DOMException",zI1=$s1("Error"),jt1=$s1(kt),Hs1=function Hs2(){Uk1(this,jk1);var e=arguments.length,t=HI1(e<1?void 0:arguments[0]),a=HI1(e<2?void 0:arguments[1],"Error"),i=new jt1(t,a),n=new zI1(t);return n.name=kt,js(i,"stack",ks1(1,Mk1(n.stack,1))),Bk1(i,this,Hs1),i},jk1=Hs1.prototype=jt1.prototype,$k1="stack"in new zI1(kt),Hk="stack"in new jt1(1,2),Fs=jt1&&kk1&&Object.getOwnPropertyDescriptor(Fk1,kt),Gk1=!!Fs&&!(Fs.writable&&Fs.configurable),GI1=$k1&&!Gk1&&!Hk;Dk1({global:!0,constructor:!0,forced:VI1||GI1},{DOMException:GI1?Hs1:jt1});var Mt=$s1(kt),WI1=Mt.prototype;if(WI1.constructor!==Mt){VI1||js(WI1,"constructor",ks1(1,Mt));for(Us in Ds1)$I1(Ds1,Us)&&(Bs=Ds1[Us],Ms1=Bs.s,$I1(Mt,Ms1)||js(Mt,Ms1,ks1(6,Bs.c)))}var Bs,Ms1,Us});var JI1=o(function(){"use strict";var Wk1=q(),ae=I(),Vk1=Q(),zk1=w(),Kk1=TypeError,Yk1=Object.defineProperty,YI1=ae.self!==ae;try{zk1?(Oi1=Object.getOwnPropertyDescriptor(ae,"self"),(YI1||!Oi1||!Oi1.get||!Oi1.enumerable)&&Vk1(ae,"self",{get:function get1(){return ae},set:function set1(e){if(this!==ae)throw new Kk1("Illegal invocation");Yk1(ae,"self",{value:e,writable:!0,configurable:!0,enumerable:!0})},configurable:!0,enumerable:!0})):Wk1({global:!0,simple:!0,forced:YI1},{self:ae})}catch(r){}var Oi1});var Re=o(function(LV1,XI1){"use strict";var Jk1=TypeError;XI1.exports=function(r,e){if(r1&&!ej1(arguments[1])?tR1(arguments[1]):void 0,a=t?t.transfer:void 0,i,n;a!==void 0&&(i=new zs,n=mj1(a,i));var u=F10(e,i);return n&&Aj1(n),u}})});var pR1=o(function(){"use strict";var wj1=Z(),_i1=S(),fR1=N(),bj1=Re(),hR1=URLSearchParams,Ni1=hR1.prototype,xj1=_i1(Ni1.append),lR1=_i1(Ni1.delete),Cj1=_i1(Ni1.forEach),Pj1=_i1([].push),Zs1=new hR1("a=1&a=2&b=3");Zs1.delete("a",1);Zs1.delete("b",void 0);Zs1+""!="a=2"&&wj1(Ni1,"delete",function(r){var e=arguments.length,t=e<2?void 0:arguments[1];if(e&&t===void 0)return lR1(this,r);var a=[];Cj1(this,function(c,h){Pj1(a,{key:h,value:c})}),bj1(e,1);for(var i=fR1(r),n=fR1(t),u=0,s=0,v=!1,f10=a.length,l;ui;){if(n=+arguments[i++],Mj1(n,1114111)!==n)throw new kj1(n+" is not a valid code point");t[i]=n<65536?ER(n):ER(((n-=65536)>>10)+55296,n%1024+56320)}return jj1(t,"")}})});var OR=o(function(GV1,TR){"use strict";var RR=I(),Hj1=w(),Gj1=Object.getOwnPropertyDescriptor;TR.exports=function(r){if(!Hj1)return RR[r];var e=Gj1(RR,r);return e&&e.value}});var Li=o(function(WV1,AR){"use strict";var Wj1=R(),Vj1=x(),zj1=w(),mR1=D(),Kj1=Vj1("iterator");AR.exports=!Wj1(function(){var r=new URL("b?a=1&b=2&c=3","https://a"),e=r.searchParams,t=new URLSearchParams("a=1&a=2&b=3"),a="";return r.pathname="c%20d",e.forEach(function(i,n){e.delete("b"),a+=n+i}),t.delete("a",2),t.delete("b",void 0),mR1&&(!r.toJSON||!t.has("a",1)||t.has("a",2)||!t.has("a",void 0)||t.has("b"))||!e.size&&(mR1||!zj1)||!e.sort||r.href!=="https://a/c%20d?a=1&c=3"||e.get("c")!=="3"||String(new URLSearchParams("?a=1"))!=="a=1"||!e[Kj1]||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"||a!=="a1c3"||new URL("https://x",void 0).host!=="x"})});var vv1=o(function(VV1,YR){"use strict";_s1();IR();var uv1=q(),MR=I(),ov1=OR(),Yj1=W10(),Di=m(),dr1=S(),zt1=w(),kR=Li(),jR=Z(),Jj1=Q(),Xj1=Ia1(),Qj1=Hr(),Zj1=Za1(),sv1=_$X(),$R=le1(),ev1=b(),r$1=C(),e$=_$Kr(),t$1=Ir1(),a$1=A1(),HR=P1(),$=N(),i$=Vr1(),wR1=Pr1(),bR1=Tt(),n$1=ye(),Fi=Ue(),ze=Re(),u$1=x(),o$=Ua(),s$1=u$1("iterator"),Ye1="URLSearchParams",GR1=Ye1+"Iterator",WR=sv1.set,ur1=sv1.getterFor(Ye1),v$1=sv1.getterFor(GR1),xR1=ov1("fetch"),Mi1=ov1("Request"),Kt1=ov1("Headers"),tv1=Mi1&&Mi1.prototype,CR=Kt1&&Kt1.prototype,c$1=MR.TypeError,f$1=MR.encodeURIComponent,l$1=String.fromCharCode,h$1=Yj1("String","fromCodePoint"),p$1=parseInt,Bi1=dr1("".charAt),PR=dr1([].join),ie=dr1([].push),VR=dr1("".replace),g$=dr1([].shift),_R1=dr1([].splice),NR1=dr1("".split),zR=dr1("".slice),y$1=dr1(/./.exec),d$1=/\+/g,av1="�",q$1=/^[0-9a-f]+$/i,LR1=function LR1(r,e){var t=zR(r,e,e+2);return y$1(q$1,t)?p$1(t,16):NaN},E$1=function E$1(r){for(var e=0,t=128;t>0&&r&t;t>>=1)e++;return e},S$1=function S$1(r){var e=null;switch(r.length){case 1:e=r[0];break;case 2:e=(r[0]&31)<<6|r[1]&63;break;case 3:e=(r[0]&15)<<12|(r[1]&63)<<6|r[2]&63;break;case 4:e=(r[0]&7)<<18|(r[1]&63)<<12|(r[2]&63)<<6|r[3]&63;break}return e>1114111?null:e},DR=function DR(r){r=VR(r,d$1," ");for(var e=r.length,t="",a=0;ae){t+="%",a++;continue}var n=LR1(r,a+1);if(n!==n){t+=i,a++;continue}a+=2;var u=E$1(n);if(u===0)i=l$1(n);else{if(u===1||u>4){t+=av1,a++;continue}for(var s=[n],v=1;ve||Bi1(r,a)!=="%"));){var f10=LR1(r,a+1);if(f10!==f10){a+=3;break}if(f10>191||f10<128)break;ie(s,f10),a+=2,v++}if(s.length!==u){t+=av1;continue}var l=S$1(s);l===null?t+=av1:i=h$1(l)}}t+=i,a++}return t},I$1=/[!'()~]|%20/g,R$={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},T$=function T$(r){return R$[r]},FR=function FR(r){return VR(f$1(r),I$1,T$)},iv1=Zj1(function(e,t){WR(this,{type:GR1,target:ur1(e).entries,index:0,kind:t})},Ye1,function(){var e=v$1(this),t=e.target,a=e.index++;if(!t||a>=t.length)return e.target=null,Fi(void 0,!0);var i=t[a];switch(e.kind){case"keys":return Fi(i.key,!1);case"values":return Fi(i.value,!1)}return Fi([i.key,i.value],!1)},!0),KR=function KR(r){this.entries=[],this.url=null,r!==void 0&&(HR(r)?this.parseObject(r):this.parseQuery(typeof r=="string"?Bi1(r,0)==="?"?zR(r,1):r:$(r)))};KR.prototype={type:Ye1,bindURL:function bindURL(r){this.url=r,this.update()},parseObject:function parseObject(r){var e=this.entries,t=n$1(r),a,i,n,u,s,v,f10;if(t)for(a=bR1(r,t),i=a.next;!(n=Di(i,a)).done;){if(u=bR1(a$1(n.value)),s=u.next,(v=Di(s,u)).done||(f10=Di(s,u)).done||!Di(s,u).done)throw new c$1("Expected sequence with length 2");ie(e,{key:$(v.value),value:$(f10.value)})}else for(var l in r)r$1(r,l)&&ie(e,{key:l,value:$(r[l])})},parseQuery:function parseQuery(r){if(r)for(var e=this.entries,t=NR1(r,"&"),a=0,i,n;a0?arguments[0]:void 0,t=WR(this,new KR(e));zt1||(this.size=t.entries.length)},Ke1=ki1.prototype;Xj1(Ke1,{append:function append(e,t){var a=ur1(this);ze(arguments.length,2),ie(a.entries,{key:$(e),value:$(t)}),zt1||this.size++,a.updateURL()},delete:function _delete(r){for(var e=ur1(this),t=ze(arguments.length,1),a=e.entries,i=$(r),n=t<2?void 0:arguments[1],u=n===void 0?n:$(n),s=0;sa.key?1:-1}),e.updateURL()},forEach:function forEach(e){for(var t=ur1(this).entries,a=e$(e,arguments.length>1?arguments[1]:void 0),i=0,n;i1?nv1(arguments[1]):{})}}),ev1(Mi1)&&(Ui1=function Ui1(e){return $R(this,tv1),new Mi1(e,arguments.length>1?nv1(arguments[1]):{})},tv1.constructor=Ui1,Ui1.prototype=tv1,uv1({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:Ui1})));var UR,BR,nv1,Ui1;YR.exports={URLSearchParams:ki1,getState:ur1}});var JR=o(function(){"use strict";vv1()});var XR=o(function(){"use strict";var O$=w(),m$=S(),A$1=Q(),cv1=URLSearchParams.prototype,w$1=m$(cv1.forEach);O$&&!("size"in cv1)&&A$1(cv1,"size",{get:function get1(){var e=0;return w$1(this,function(){e++}),e},configurable:!0,enumerable:!0})});var rT1=o(function(){"use strict";var b$=q(),x$1=W10(),ZR=R(),C$1=Re(),QR=N(),P$=Li(),fv1=x$1("URL"),_$1=P$&&ZR(function(){fv1.canParse()}),N$1=ZR(function(){return fv1.canParse.length!==1});b$({target:"URL",stat:!0,forced:!_$1||N$1},{canParse:function canParse(e){var t=C$1(arguments.length,1),a=QR(e),i=t<2||arguments[1]===void 0?void 0:QR(arguments[1]);try{return!!new fv1(a,i)}catch(n){return!1}}})});var iT1=o(function(){"use strict";var L$1=ri().charAt,D$1=N(),tT1=_$X(),F$1=Cs1(),eT1=Ue(),aT1="String Iterator",U$1=tT1.set,B$1=tT1.getterFor(aT1);F$1(String,"String",function(r){U$1(this,{type:aT1,string:D$1(r),index:0})},function(){var e=B$1(this),t=e.string,a=e.index,i;return a>=t.length?eT1(void 0,!0):(i=L$1(t,a),e.index+=i.length,eT1(i,!1))})});var sT1=o(function(e71,oT1){"use strict";var nT1=w(),M$1=S(),k$1=m(),j$1=R(),lv1=iu1(),$$1=Cn(),H$1=mn1(),G$1=B(),W$1=_e1(),Je1=Object.assign,uT1=Object.defineProperty,V$1=M$1([].concat);oT1.exports=!Je1||j$1(function(){if(nT1&&Je1({b:1},Je1(uT1({},"a",{enumerable:!0,get:function get1(){uT1(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var r={},e={},t=Symbol("assign detection"),a="abcdefghijklmnopqrst";return r[t]=7,a.split("").forEach(function(i){e[i]=i}),Je1({},r)[t]!==7||lv1(Je1({},e)).join("")!==a})?function(e,t){for(var a=G$1(e),i=arguments.length,n=1,u=$$1.f,s=H$1.f;i>n;)for(var v=W$1(arguments[n++]),f10=u?V$1(lv1(v),u(v)):lv1(v),l=f10.length,c=0,h;l>c;)h=f10[c++],(!nT1||k$1(s,v,h))&&(a[h]=v[h]);return a}:Je1});var lT1=o(function(t71,fT1){"use strict";var z$1=_$Kr(),K$1=m(),Y$1=B(),J$1=Ha1(),X$1=ja1(),Q$1=At1(),Z$1=L(),vT1=Et1(),r81=Tt(),e81=ye(),cT1=Array;fT1.exports=function(e){var t=Y$1(e),a=Q$1(this),i=arguments.length,n=i>1?arguments[1]:void 0,u=n!==void 0;u&&(n=z$1(n,i>2?arguments[2]:void 0));var s=e81(t),v=0,f10,l,c,h,y,g;if(s&&!(this===cT1&&X$1(s)))for(l=a?new this:[],h=r81(t,s),y=h.next;!(c=K$1(y,h)).done;v++)g=u?J$1(h,n,[c.value,v],!0):c.value,vT1(l,v,g);else for(f10=Z$1(t),l=a?new this(f10):cT1(f10);f10>v;v++)g=u?n(t[v],v):t[v],vT1(l,v,g);return l.length=v,l}});var IT1=o(function(a71,ST1){"use strict";var Oe=S(),hv1=0x7fffffff,_$Yt=36,dT1=1,yv1=26,t81=38,a81=700,i81=72,n81=128,u81="-",o81=/[^\0-\u007E]/,qT1=/[.\u3002\uFF0E\uFF61]/g,hT1="Overflow: input needs wider integers to process",pv1=_$Yt-dT1,pT1=RangeError,s81=Oe(qT1.exec),_$Xe=Math.floor,gv1=String.fromCharCode,gT1=Oe("".charCodeAt),ET1=Oe([].join),_$ne=Oe([].push),v81=Oe("".replace),c81=Oe("".split),f81=Oe("".toLowerCase),l81=function l81(r){for(var e=[],t=0,a=r.length;t=55296&&i<=56319&&t>1,r+=_$Xe(r/e);r>pv1*yv1>>1;)r=_$Xe(r/pv1),a+=_$Yt;return _$Xe(a+(pv1+1)*r/(r+t81))},p81=function p81(r){var e=[];r=l81(r);var t=r.length,a=n81,i=0,n=i81,u,s;for(u=0;u=a&&s_$Xe((hv1-i)/c))throw new pT1(hT1);for(i+=(l-a)*c,a=l,u=0;uhv1)throw new pT1(hT1);if(s===a){for(var h=i,y=_$Yt;;){var g=y<=n?dT1:y>=n+yv1?yv1:y-n;if(h?@[\\\]^|]/,U81=/[\0\t\n\r #/:<>?@[\\\]^|]/,B8=/^[\u0000-\u0020]+/,M81=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,k81=/[\t\n\r]/g,sr1,j81=function j81(r){var e=x81(r,"."),t,a,i,n,u,s,v;if(e.length&&e[e.length-1]===""&&e.length--,t=e.length,t>4)return r;for(a=[],i=0;i1&&cr(n,0)==="0"&&(u=Er1(N81,n)?16:8,n=ra1(n,u===8?1:2)),n==="")s=0;else{if(!Er1(u===10?D81:u===8?L81:FT1,n))return r;s=zi1(n,u)}rt1(a,s)}for(i=0;i=TT1(256,5-t))return null}else if(s>255)return null;for(v=_$w8(a),i=0;i6))return;for(s=0;h();){if(v=null,s>0)if(h()==="."&&s<4)i++;else return;if(!Er1(_v1,h()))return;for(;Er1(_v1,h());){if(f10=zi1(h(),10),v===null)v=f10;else{if(v===0)return;v=v*10+f10}if(v>255)return;i++}e[t]=e[t]*256+v,s++,(s===2||s===4)&&t++}if(s!==4)return;break}else if(h()===":"){if(i++,!h())return}else if(h())return;e[t++]=n}if(a!==null)for(l=t-a,t=7;t!==0&&l>0;)c=e[t],e[t--]=e[a+l-1],e[a+--l]=c;else if(t!==8)return;return e},H81=function H81(r){for(var e=null,t=1,a=null,i=0,n=0;n<8;n++)r[n]!==0?(i>t&&(e=a,t=i),a=null,i=0):(a===null&&(a=n),++i);return i>t?a:e},Xt1=function Xt1(r){var e,t,a,i;if(typeof r=="number"){for(e=[],t=0;t<4;t++)C81(e,r%256),r=m81(r/256);return Qt1(e,".")}if((typeof r==="undefined"?"undefined":_type_of(r))=="object"){for(e="",a=H81(r),t=0;t<8;t++)i&&r[t]===0||(i&&(i=!1),a===t?(e+=t?":":"::",i=!0):(e+=A81(r[t],16),t<7&&(e+=":")));return"["+e+"]"}return r},Gi1={},UT1=Dv1({},Gi1,{" ":1,'"':1,"<":1,">":1,"`":1}),BT1=Dv1({},UT1,{"#":1,"?":1,"{":1,"}":1}),Ev1=Dv1({},BT1,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),ue=function ue(r,e){var t=q81(r,0);return t>32&&t<127&&!Cv1(e,r)?r:encodeURIComponent(r)},ji1={ftp:21,file:null,http:80,https:443,ws:80,wss:443},Zt1=function Zt1(r,e){var t;return r.length===2&&Er1(DT1,cr(r,0))&&((t=cr(r,1))===":"||!e&&t==="|")},mT1=function mT1(r){var e;return r.length>1&&Zt1(ra1(r,0,2))&&(r.length===2||(e=cr(r,2))==="/"||e==="\\"||e==="?"||e==="#")},G81=function G81(r){return r==="."||Ki1(r)==="%2e"},W81=function W81(r){return r=Ki1(r),r===".."||r==="%2e."||r===".%2e"||r==="%2e%2e"},Sv1={},AT1={},Iv1={},wT1={},bT1={},Rv1={},xT1={},_$CT={},$i1={},Hi1={},Tv1={},Ov1={},mv1={},Av1={},PT1={},wv1={},Ze1={},br1={},_T1={},Ae1={},Mr1={},Fv1=function Fv2(r,e,t){var a=kr1(r),i,n,u;if(e){if(n=this.parse(a),n)throw new Pv1(n);this.searchParams=null}else{if(t!==void 0&&(i=new Fv1(t,!0)),n=this.parse(a,null,i),n)throw new Pv1(n);u=O81(new T81),u.bindURL(this),this.searchParams=u}};Fv1.prototype={type:"URL",parse:function parse(r,e,t){var a=this,i=e||Sv1,n=0,u="",s=!1,v=!1,f10=!1,l,c,h,y;for(r=kr1(r),e||(a.scheme="",a.username="",a.password="",a.host=null,a.port=null,a.path=[],a.query=null,a.fragment=null,a.cannotBeABaseURL=!1,r=dv1(r,B8,""),r=dv1(r,M81,"$1")),r=dv1(r,k81,""),l=Qe1(r);n<=l.length;){switch(c=l[n],i){case Sv1:if(c&&Er1(DT1,c))u+=Ki1(c),i=AT1;else{if(e)return qv1;i=Iv1;continue}break;case AT1:if(c&&(Er1(_81,c)||c==="+"||c==="-"||c==="."))u+=Ki1(c);else if(c===":"){if(e&&(a.isSpecial()!==Cv1(ji1,u)||u==="file"&&(a.includesCredentials()||a.port!==null)||a.scheme==="file"&&!a.host))return;if(a.scheme=u,e){a.isSpecial()&&ji1[a.scheme]===a.port&&(a.port=null);return}u="",a.scheme==="file"?i=Av1:a.isSpecial()&&t&&t.scheme===a.scheme?i=wT1:a.isSpecial()?i=_$CT:l[n+1]==="/"?(i=bT1,n++):(a.cannotBeABaseURL=!0,rt1(a.path,""),i=_T1)}else{if(e)return qv1;u="",i=Iv1,n=0;continue}break;case Iv1:if(!t||t.cannotBeABaseURL&&c!=="#")return qv1;if(t.cannotBeABaseURL&&c==="#"){a.scheme=t.scheme,a.path=qr1(t.path),a.query=t.query,a.fragment="",a.cannotBeABaseURL=!0,i=Mr1;break}i=t.scheme==="file"?Av1:Rv1;continue;case wT1:if(c==="/"&&l[n+1]==="/")i=$i1,n++;else{i=Rv1;continue}break;case bT1:if(c==="/"){i=Hi1;break}else{i=br1;continue}case Rv1:if(a.scheme=t.scheme,c===sr1)a.username=t.username,a.password=t.password,a.host=t.host,a.port=t.port,a.path=qr1(t.path),a.query=t.query;else if(c==="/"||c==="\\"&&a.isSpecial())i=xT1;else if(c==="?")a.username=t.username,a.password=t.password,a.host=t.host,a.port=t.port,a.path=qr1(t.path),a.query="",i=Ae1;else if(c==="#")a.username=t.username,a.password=t.password,a.host=t.host,a.port=t.port,a.path=qr1(t.path),a.query=t.query,a.fragment="",i=Mr1;else{a.username=t.username,a.password=t.password,a.host=t.host,a.port=t.port,a.path=qr1(t.path),a.path.length--,i=br1;continue}break;case xT1:if(a.isSpecial()&&(c==="/"||c==="\\"))i=$i1;else if(c==="/")i=Hi1;else{a.username=t.username,a.password=t.password,a.host=t.host,a.port=t.port,i=br1;continue}break;case _$CT:if(i=$i1,c!=="/"||cr(u,n+1)!=="/")continue;n++;break;case $i1:if(c!=="/"&&c!=="\\"){i=Hi1;continue}break;case Hi1:if(c==="@"){s&&(u="%40"+u),s=!0,h=Qe1(u);for(var g=0;g65535)return OT1;a.port=a.isSpecial()&&T===ji1[a.scheme]?null:T,u=""}if(e)return;i=Ze1;continue}else return OT1;break;case Av1:if(a.scheme="file",c==="/"||c==="\\")i=PT1;else if(t&&t.scheme==="file")switch(c){case sr1:a.host=t.host,a.path=qr1(t.path),a.query=t.query;break;case"?":a.host=t.host,a.path=qr1(t.path),a.query="",i=Ae1;break;case"#":a.host=t.host,a.path=qr1(t.path),a.query=t.query,a.fragment="",i=Mr1;break;default:mT1(Qt1(qr1(l,n),""))||(a.host=t.host,a.path=qr1(t.path),a.shortenPath()),i=br1;continue}else{i=br1;continue}break;case PT1:if(c==="/"||c==="\\"){i=wv1;break}t&&t.scheme==="file"&&!mT1(Qt1(qr1(l,n),""))&&(Zt1(t.path[0],!0)?rt1(a.path,t.path[0]):a.host=t.host),i=br1;continue;case wv1:if(c===sr1||c==="/"||c==="\\"||c==="?"||c==="#"){if(!e&&Zt1(u))i=br1;else if(u===""){if(a.host="",e)return;i=Ze1}else{if(y=a.parseHost(u),y)return y;if(a.host==="localhost"&&(a.host=""),e)return;u="",i=Ze1}continue}else u+=c;break;case Ze1:if(a.isSpecial()){if(i=br1,c!=="/"&&c!=="\\")continue}else if(!e&&c==="?")a.query="",i=Ae1;else if(!e&&c==="#")a.fragment="",i=Mr1;else if(c!==sr1&&(i=br1,c!=="/"))continue;break;case br1:if(c===sr1||c==="/"||c==="\\"&&a.isSpecial()||!e&&(c==="?"||c==="#")){if(W81(u)?(a.shortenPath(),c!=="/"&&!(c==="\\"&&a.isSpecial())&&rt1(a.path,"")):G81(u)?c!=="/"&&!(c==="\\"&&a.isSpecial())&&rt1(a.path,""):(a.scheme==="file"&&!a.path.length&&Zt1(u)&&(a.host&&(a.host=""),u=cr(u,0)+":"),rt1(a.path,u)),u="",a.scheme==="file"&&(c===sr1||c==="?"||c==="#"))for(;a.path.length>1&&a.path[0]==="";)b81(a.path);c==="?"?(a.query="",i=Ae1):c==="#"&&(a.fragment="",i=Mr1)}else u+=ue(c,BT1);break;case _T1:c==="?"?(a.query="",i=Ae1):c==="#"?(a.fragment="",i=Mr1):c!==sr1&&(a.path[0]+=ue(c,Gi1));break;case Ae1:!e&&c==="#"?(a.fragment="",i=Mr1):c!==sr1&&(c==="'"&&a.isSpecial()?a.query+="%27":c==="#"?a.query+="%23":a.query+=ue(c,Gi1));break;case Mr1:c!==sr1&&(a.fragment+=ue(c,UT1));break}n++}},parseHost:function parseHost(r){var e,t,a;if(cr(r,0)==="["){if(cr(r,r.length-1)!=="]"||(e=$81(ra1(r,1,-1)),!e))return me;this.host=e}else if(this.isSpecial()){if(r=E81(r),Er1(F81,r)||(e=j81(r),e===null))return me;this.host=e}else{if(Er1(U81,r))return me;for(e="",t=Qe1(r),a=0;a1?arguments[1]:void 0,i=R81(t,new Fv1(e,!1,a));Nv1||(t.href=i.serialize(),t.origin=i.getOrigin(),t.protocol=i.getProtocol(),t.username=i.getUsername(),t.password=i.getPassword(),t.host=i.getHost(),t.hostname=i.getHostname(),t.port=i.getPort(),t.pathname=i.getPathname(),t.search=i.getSearch(),t.searchParams=i.getSearchParams(),t.hash=i.getHash())},H=et.prototype,vr1=function vr1(r,e){return{get:function get1(){return Vi1(this)[r]()},set:e&&function(t){return Vi1(this)[e](t)},configurable:!0,enumerable:!0}};Nv1&&(or1(H,"href",vr1("serialize","setHref")),or1(H,"origin",vr1("getOrigin")),or1(H,"protocol",vr1("getProtocol","setProtocol")),or1(H,"username",vr1("getUsername","setUsername")),or1(H,"password",vr1("getPassword","setPassword")),or1(H,"host",vr1("getHost","setHost")),or1(H,"hostname",vr1("getHostname","setHostname")),or1(H,"port",vr1("getPort","setPort")),or1(H,"pathname",vr1("getPathname","setPathname")),or1(H,"search",vr1("getSearch","setSearch")),or1(H,"searchParams",vr1("getSearchParams")),or1(H,"hash",vr1("getHash","setHash")));Wi1(H,"toJSON",function(){return Vi1(this).serialize()},{enumerable:!0});Wi1(H,"toString",function(){return Vi1(this).serialize()},{enumerable:!0});Jt&&(bv1=Jt.createObjectURL,xv1=Jt.revokeObjectURL,bv1&&Wi1(et,"createObjectURL",RT1(bv1,Jt)),xv1&&Wi1(et,"revokeObjectURL",RT1(xv1,Jt)));var bv1,xv1;_$S8(et,"URL");g81({global:!0,constructor:!0,forced:!y81,sham:!Nv1},{URL:et})});var _$kT=o(function(){"use strict";MT1()});var jT1=o(function(){"use strict";var V81=q(),z81=m();V81({target:"URL",proto:!0,enumerable:!0},{toJSON:function toJSON(){return z81(URL.prototype.toString,this)}})});var c71=p(yf1()),f71=p(Gl1()),l71=p(ch1()),h71=p(lh1()),p71=p(Ah1()),g71=p(Ch1()),y71=p(Bh1()),d71=p(kh1()),q71=p(vp1()),E71=p(cp1()),S71=p(fp()),I71=p(lp1()),R71=p(pp1()),T71=p($p1()),O71=p(Hp1()),m71=p(Zp1()),A71=p(Eg1()),w71=p(Pg1()),_$b7=p(Fg1()),x71=p(Ug1()),C71=p($g1()),P71=p(Hg1()),_71=p(zg1()),N71=p(Jg1()),L71=p(Xg1()),D71=p(Qg1()),F71=p(_$Iy()),U71=p(Ty1()),B71=p(Oy1()),M71=p(my1()),k71=p($y1()),j71=p(td1()),$71=p(ad()),H71=p(Ed1()),G71=p(Od1()),W71=p(Yd1()),V71=p(_$Zd()),z71=p(tq1()),K71=p(nq1()),_$Y7=p(sq1()),J71=p(lq1()),_$X7=p(gq1()),_$Q7=p(yq1()),Z71=p(Gq1()),rz1=p(Kq1()),ez1=p(uE1()),tz1=p(yE1()),az=p(dE1()),iz1=p(OE1()),nz1=p(_E1()),uz=p(_$GE()),oz=p(zE1()),sz=p(_$XE()),vz1=p(ZE1()),cz1=p(jS1()),fz1=p($S1()),lz=p(HS1()),hz1=p(GS1()),pz1=p(WS1()),gz1=p(VS1()),yz1=p(QS1()),dz1=p(iI1()),qz1=p(oI1()),Ez1=p(sI1()),Sz1=p(vI1()),Iz1=p(cI1()),Rz1=p(fI1()),Tz1=p(lI1()),Oz1=p(pI1()),mz1=p(MI1()),Az1=p(KI1()),wz1=p(JI1()),bz1=p(cR1()),xz1=p(pR1()),Cz1=p(qR()),Pz1=p(JR()),_z1=p(XR()),Nz1=p(rT1()),Lz1=p(_$kT()),Dz1=p(jT1())})();"use strict";var IPe=Object.create;var J_=Object.defineProperty;var PPe=Object.getOwnPropertyDescriptor;var RPe=Object.getOwnPropertyNames;var MPe=Object.getPrototypeOf,OPe=Object.prototype.hasOwnProperty;var $Pe=function(e,t,r){return t in e?J_(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r};var Be=function(e,t){return function(){return t||e((t={exports:{}}).exports,t),t.exports}},$l=function(e,t){for(var r in t)J_(e,r,{get:t[r],enumerable:!0})},YK=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;!OPe.call(e,i)&&i!==r&&J_(e,i,{get:function(){return t[i]},enumerable:!(n=PPe(t,i))||n.enumerable})};for(var _iterator=RPe(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 nr=function(e,t,r){return r=e!=null?IPe(MPe(e)):{},YK(t||!e||!e.__esModule?J_(r,"default",{value:e,enumerable:!0}):r,e)},NPe=function(e){return YK(J_({},"__esModule",{value:!0}),e)};var A=function(e,t,r){return $Pe(e,(typeof t==="undefined"?"undefined":_type_of(t))!="symbol"?t+"":t,r),r},yM=function(e,t,r){if(!t.has(e))throw TypeError("Cannot "+r)};var fe=function(e,t,r){return yM(e,t,"read from private field"),r?r.call(e):t.get(e)},Ht=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)},Zt=function(e,t,r,n){return yM(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r};var Nt=function(e,t,r){return yM(e,t,"access private method"),r};var eQ=Be(function(Y_){var XK=function XK(e){for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",r=[],n=0;n>2,d=(i&3)<<4|a>>4,u=(a&15)<<2|l>>6,p=l&63;s||(p=64,o||(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 Y_==="undefined"?"undefined":_type_of(Y_))=="object"&&typeof Y_.nodeName!="string"?t(Y_):t(e)})(function(t){"use strict";var r=e.BlobBuilder||e.WebKitBlobBuilder||e.MSBlobBuilder||e.MozBlobBuilder,n=e.URL||e.webkitURL||function(C,T){return T=document.createElement("a"),T.href=C,T},i=e.Blob,o=n.createObjectURL,a=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(C){}function u(C){return C.map(function(T){if(_instanceof(T.buffer,ArrayBuffer)){var I=T.buffer;if(T.byteLength!==I.byteLength){var O=new Uint8Array(T.byteLength);O.set(new Uint8Array(I,T.byteOffset,T.byteLength)),I=O.buffer}return I}return T})}function p(C,T){T=T||{};var I=new r;return u(C).forEach(function(O){I.append(O)}),T.type?I.getBlob(T.type):I.getBlob()}function m(C,T){return new i(u(C),T||{})}e.Blob&&(p.prototype=e.Blob.prototype,m.prototype=e.Blob.prototype);function h(C){for(var T=0,I=C.length,O=e.Uint8Array||Array,M=0,R=Math.max(32,I+(I>>1)+7),$=new O(R>>3<<3);T=55296&&z<=56319){if(T=55296&&z<=56319)continue}if(M+4>$.length){R+=8,R*=1+T/C.length*2,R=R>>3<<3;var L=new Uint8Array(R);L.set($),$=L}if(z&0xffffff80)if(!(z&0xfffff800))$[M++]=z>>6&31|192;else if(!(z&0xffff0000))$[M++]=z>>12&15|224,$[M++]=z>>6&63|128;else if(!(z&0xffe00000))$[M++]=z>>18&7|240,$[M++]=z>>12&63|128,$[M++]=z>>6&63|128;else continue;else{$[M++]=z;continue}$[M++]=z&63|128}return $.slice(0,M)}function g(C){for(var T=C.length,I=[],O=0;O239?4:M>223?3:M>191?2:1;if(O+$<=T){var z,D,L,ee;switch($){case 1:M<128&&(R=M);break;case 2:z=C[O+1],(z&192)===128&&(ee=(M&31)<<6|z&63,ee>127&&(R=ee));break;case 3:z=C[O+1],D=C[O+2],(z&192)===128&&(D&192)===128&&(ee=(M&15)<<12|(z&63)<<6|D&63,ee>2047&&(ee<55296||ee>57343)&&(R=ee));break;case 4:z=C[O+1],D=C[O+2],L=C[O+3],(z&192)===128&&(D&192)===128&&(L&192)===128&&(ee=(M&15)<<18|(z&63)<<12|(D&63)<<6|L&63,ee>65535&&ee<1114112&&(R=ee))}}R===null?(R=65533,$=1):R>65535&&(R-=65536,I.push(R>>>10&1023|55296),R=56320|R&1023),I.push(R),O+=$}for(var pe=I.length,N="",U=0;U=I.size&&O.close()})}})}}catch(C){try{new ReadableStream({}),k=function k(I){var O=0;return new ReadableStream({pull:function pull(M){var R=I.slice(O,O+524288);return R.arrayBuffer().then(function($){O+=$.byteLength;var z=new Uint8Array($);M.enqueue(z),O==I.size&&M.close()})}})}}catch(T){try{new Response("").body.getReader().read(),k=function k(){return new Response(this).body}}catch(I){k=function k(){throw new Error("Include https://github.com/MattiasBuelens/web-streams-polyfill")}}}}function E(C){return new Promise(function(T,I){C.onload=C.onerror=function(O){C.onload=C.onerror=null,O.type==="load"?T(C.result||C):I(new Error("Failed to read the blob/file"))}})}S.arrayBuffer||(S.arrayBuffer=function(){var T=new t.FileReader;return T.readAsArrayBuffer(this),E(T)}),S.text||(S.text=function(){var T=new t.FileReader;return T.readAsText(this),E(T)}),S.stream||(S.stream=k)})})(typeof self!="undefined"&&self||typeof window!="undefined"&&window||typeof global!="undefined"&&global||Y_)});var rQ=Be(function(q1){"use strict";Object.defineProperty(q1,"__esModule",{value:!0});q1.reasonPhraseToStatusCode=q1.statusCodeToReasonPhrase=void 0;q1.statusCodeToReasonPhrase={202:"Accepted",502:"Bad Gateway",400:"Bad Request",409:"Conflict",100:"Continue",201:"Created",417:"Expectation Failed",424:"Failed Dependency",403:"Forbidden",504:"Gateway Timeout",410:"Gone",505:"HTTP Version Not Supported",418:"I'm a teapot",419:"Insufficient Space on Resource",507:"Insufficient Storage",500:"Internal Server Error",411:"Length Required",423:"Locked",420:"Method Failure",405:"Method Not Allowed",301:"Moved Permanently",302:"Moved Temporarily",207:"Multi-Status",300:"Multiple Choices",511:"Network Authentication Required",204:"No Content",203:"Non Authoritative Information",406:"Not Acceptable",404:"Not Found",501:"Not Implemented",304:"Not Modified",200:"OK",206:"Partial Content",402:"Payment Required",308:"Permanent Redirect",412:"Precondition Failed",428:"Precondition Required",102:"Processing",103:"Early Hints",426:"Upgrade Required",407:"Proxy Authentication Required",431:"Request Header Fields Too Large",408:"Request Timeout",413:"Request Entity Too Large",414:"Request-URI Too Long",416:"Requested Range Not Satisfiable",205:"Reset Content",303:"See Other",503:"Service Unavailable",101:"Switching Protocols",307:"Temporary Redirect",429:"Too Many Requests",401:"Unauthorized",451:"Unavailable For Legal Reasons",422:"Unprocessable Entity",415:"Unsupported Media Type",305:"Use Proxy",421:"Misdirected Request"};q1.reasonPhraseToStatusCode={Accepted:202,"Bad Gateway":502,"Bad Request":400,Conflict:409,Continue:100,Created:201,"Expectation Failed":417,"Failed Dependency":424,Forbidden:403,"Gateway Timeout":504,Gone:410,"HTTP Version Not Supported":505,"I'm a teapot":418,"Insufficient Space on Resource":419,"Insufficient Storage":507,"Internal Server Error":500,"Length Required":411,Locked:423,"Method Failure":420,"Method Not Allowed":405,"Moved Permanently":301,"Moved Temporarily":302,"Multi-Status":207,"Multiple Choices":300,"Network Authentication Required":511,"No Content":204,"Non Authoritative Information":203,"Not Acceptable":406,"Not Found":404,"Not Implemented":501,"Not Modified":304,OK:200,"Partial Content":206,"Payment Required":402,"Permanent Redirect":308,"Precondition Failed":412,"Precondition Required":428,Processing:102,"Early Hints":103,"Upgrade Required":426,"Proxy Authentication Required":407,"Request Header Fields Too Large":431,"Request Timeout":408,"Request Entity Too Large":413,"Request-URI Too Long":414,"Requested Range Not Satisfiable":416,"Reset Content":205,"See Other":303,"Service Unavailable":503,"Switching Protocols":101,"Temporary Redirect":307,"Too Many Requests":429,Unauthorized:401,"Unavailable For Legal Reasons":451,"Unprocessable Entity":422,"Unsupported Media Type":415,"Use Proxy":305,"Misdirected Request":421}});var oQ=Be(function(tm){"use strict";var iQ=function iQ(e){var t=nQ.statusCodeToReasonPhrase[e.toString()];if(!t)throw new Error("Status code does not exist: "+e);return t};var DPe=function DPe(e){var t=nQ.reasonPhraseToStatusCode[e];if(!t)throw new Error("Reason phrase does not exist: "+e);return t};Object.defineProperty(tm,"__esModule",{value:!0});tm.getStatusText=tm.getStatusCode=tm.getReasonPhrase=void 0;var nQ=rQ();tm.getReasonPhrase=iQ;tm.getStatusCode=DPe;tm.getStatusText=iQ});var ln=Be(function(DHt,Ste){"use strict";var Td=function Td(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))};var wte=function wte(e,t){for(var r="",n=0,i=-1,o=0,a,s=0;s<=e.length;++s){if(s2){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,o=0;continue}}else if(r.length===2||r.length===1){r="",n=0,i=s,o=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,o=0}else a===46&&o!==-1?++o:o=-1}return r};var dUe=function dUe(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 Rx={resolve:function resolve(){for(var t="",r=!1,n,i=arguments.length-1;i>=-1&&!r;i--){var o;i>=0?o=arguments[i]:(n===void 0&&(n=process.cwd()),o=n),Td(o),o.length!==0&&(t=o+"/"+t,r=o.charCodeAt(0)===47)}return t=wte(t,!r),r?t.length>0?"/"+t:"/":t.length>0?t:"."},normalize:function normalize(t){if(Td(t),t.length===0)return".";var r=t.charCodeAt(0)===47,n=t.charCodeAt(t.length-1)===47;return t=wte(t,!r),t.length===0&&!r&&(t="."),t.length>0&&n&&(t+="/"),r?"/"+t:t},isAbsolute:function isAbsolute(t){return Td(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?".":Rx.normalize(t)},relative:function relative(t,r){if(Td(t),Td(r),t===r||(t=Rx.resolve(t),r=Rx.resolve(r),t===r))return"";for(var n=1;nc){if(r.charCodeAt(a+u)===47)return r.slice(a+u+1);if(u===0)return r.slice(a+u)}else o>c&&(t.charCodeAt(n+u)===47?d=u:u===0&&(d=0));break}var p=t.charCodeAt(n+u),m=r.charCodeAt(a+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(a+d):(a+=d,r.charCodeAt(a)===47&&++a,r.slice(a))},_makeLong:function _makeLong(t){return t},dirname:function dirname(t){if(Td(t),t.length===0)return".";for(var r=t.charCodeAt(0),n=r===47,i=-1,o=!0,a=t.length-1;a>=1;--a)if(r=t.charCodeAt(a),r===47){if(!o){i=a;break}}else o=!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');Td(t);var n=0,i=-1,o=!0,a;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(a=t.length-1;a>=0;--a){var c=t.charCodeAt(a);if(c===47){if(!o){n=a+1;break}}else l===-1&&(o=!1,l=a+1),s>=0&&(c===r.charCodeAt(s)?--s===-1&&(i=a):(s=-1,i=l))}return n===i?i=l:i===-1&&(i=t.length),t.slice(n,i)}else{for(a=t.length-1;a>=0;--a)if(t.charCodeAt(a)===47){if(!o){n=a+1;break}}else i===-1&&(o=!1,i=a+1);return i===-1?"":t.slice(n,i)}},extname:function extname(t){Td(t);for(var r=-1,n=0,i=-1,o=!0,a=0,s=t.length-1;s>=0;--s){var l=t.charCodeAt(s);if(l===47){if(!o){n=s+1;break}continue}i===-1&&(o=!1,i=s+1),l===46?r===-1?r=s:a!==1&&(a=1):r!==-1&&(a=-1)}return r===-1||i===-1||a===0||a===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 dUe("/",t)},parse:function parse(t){Td(t);var r={root:"",dir:"",base:"",ext:"",name:""};if(t.length===0)return r;var n=t.charCodeAt(0),i=n===47,o;i?(r.root="/",o=1):o=0;for(var a=-1,s=0,l=-1,c=!0,d=t.length-1,u=0;d>=o;--d){if(n=t.charCodeAt(d),n===47){if(!c){s=d+1;break}continue}l===-1&&(c=!1,l=d+1),n===46?a===-1?a=d:u!==1&&(u=1):a!==-1&&(u=-1)}return a===-1||l===-1||u===0||u===1&&a===l-1&&a===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,a),r.base=t.slice(1,l)):(r.name=t.slice(s,a),r.base=t.slice(s,l)),r.ext=t.slice(a,l)),s>0?r.dir=t.slice(0,s-1):i&&(r.dir="/"),r},sep:"/",delimiter:":",win32:null,posix:null};Rx.posix=Rx;Ste.exports=Rx});var Tte=Be(function(Ete,e$){(function(e){if((typeof Ete==="undefined"?"undefined":_type_of(Ete))=="object"&&typeof e$!="undefined")e$.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,o,a){function s(d,u){if(!o[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=o[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,o,a)}return o[d].exports}for(var l=typeof require=="function"&&require,c=0;c=43)}}).catch(function(){return!1})}function C(B){return typeof y=="boolean"?p.resolve(y):E(B).then(function(ae){return y=ae,y})}function T(B){var ae=_[B.name],Z={};Z.promise=new p(function(ve,be){Z.resolve=ve,Z.reject=be}),ae.deferredOperations.push(Z),ae.dbReady?ae.dbReady=ae.dbReady.then(function(){return Z.promise}):ae.dbReady=Z.promise}function I(B){var ae=_[B.name],Z=ae.deferredOperations.pop();if(Z)return Z.resolve(),Z.promise}function O(B,ae){var Z=_[B.name],ve=Z.deferredOperations.pop();if(ve)return ve.reject(ae),ve.promise}function M(B,ae){return new p(function(Z,ve){if(_[B.name]=_[B.name]||G(),B.db)if(ae)T(B),B.db.close();else return Z(B.db);var be=[B.name];ae&&be.push(B.version);var ge=c.open.apply(c,be);ae&&(ge.onupgradeneeded=function(ye){var Re=ge.result;try{Re.createObjectStore(B.storeName),ye.oldVersion<=1&&Re.createObjectStore(v)}catch(ze){if(ze.name==="ConstraintError")console.warn('The database "'+B.name+'" has been upgraded from version '+ye.oldVersion+" to version "+ye.newVersion+', but the storage "'+B.storeName+'" already exists.');else throw ze}}),ge.onerror=function(ye){ye.preventDefault(),ve(ge.error)},ge.onsuccess=function(){var ye=ge.result;ye.onversionchange=function(Re){Re.target.close()},Z(ye),I(B)}})}function R(B){return M(B,!1)}function $(B){return M(B,!0)}function z(B,ae){if(!B.db)return!0;var Z=!B.db.objectStoreNames.contains(B.storeName),ve=B.versionB.db.version;if(ve&&(B.version!==ae&&console.warn('The database "'+B.name+"\" can't be downgraded from version "+B.db.version+" to version "+B.version+"."),B.version=B.db.version),be||Z){if(Z){var ge=B.db.version+1;ge>B.version&&(B.version=ge)}return!0}return!1}function D(B){return new p(function(ae,Z){var ve=new FileReader;ve.onerror=Z,ve.onloadend=function(be){var ge=btoa(be.target.result||"");ae({__local_forage_encoded_blob:!0,data:ge,type:B.type})},ve.readAsBinaryString(B)})}function L(B){var ae=k(atob(B.data));return u([ae],{type:B.type})}function ee(B){return B&&B.__local_forage_encoded_blob}function pe(B){var ae=this,Z=ae._initReady().then(function(){var ve=_[ae._dbInfo.name];if(ve&&ve.dbReady)return ve.dbReady});return h(Z,B,B),Z}function N(B){T(B);for(var ae=_[B.name],Z=ae.forages,ve=0;ve0&&(!B.db||ge.name==="InvalidStateError"||ge.name==="NotFoundError"))return p.resolve().then(function(){if(!B.db||ge.name==="NotFoundError"&&!B.db.objectStoreNames.contains(B.storeName)&&B.version<=B.db.version)return B.db&&(B.version=B.db.version+1),$(B)}).then(function(){return N(B).then(function(){U(B,ae,Z,ve-1)})}).catch(Z);Z(ge)}}function G(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function K(B){var ae=this,Z={db:null};if(B)for(var ve in B)Z[ve]=B[ve];var be=_[Z.name];be||(be=G(),_[Z.name]=be),be.forages.push(ae),ae._initReady||(ae._initReady=ae.ready,ae.ready=pe);var ge=[];function ye(){return p.resolve()}for(var Re=0;Re>4,Ge[be++]=(ye&15)<<4|Re>>2,Ge[be++]=(Re&3)<<6|ze&63;return Ue}function Uo(B){var ae=new Uint8Array(B),Z="",ve;for(ve=0;ve>2],Z+=Q[(ae[ve]&3)<<4|ae[ve+1]>>4],Z+=Q[(ae[ve+1]&15)<<2|ae[ve+2]>>6],Z+=Q[ae[ve+2]&63];return ae.length%3===2?Z=Z.substring(0,Z.length-1)+"=":ae.length%3===1&&(Z=Z.substring(0,Z.length-2)+"=="),Z}function Ea(B,ae){var Z="";if(B&&(Z=Di.call(B)),B&&(Z==="[object ArrayBuffer]"||B.buffer&&Di.call(B.buffer)==="[object ArrayBuffer]")){var ve,be=pt;_instanceof(B,ArrayBuffer)?(ve=B,be+=gt):(ve=B.buffer,Z==="[object Int8Array]"?be+=we:Z==="[object Uint8Array]"?be+=Oe:Z==="[object Uint8ClampedArray]"?be+=Pe:Z==="[object Int16Array]"?be+=tt:Z==="[object Uint16Array]"?be+=Ut:Z==="[object Int32Array]"?be+=We:Z==="[object Uint32Array]"?be+=Rt:Z==="[object Float32Array]"?be+=Ve:Z==="[object Float64Array]"?be+=Tr:ae(new Error("Failed to get type for BinaryArray"))),ae(be+Uo(ve))}else if(Z==="[object Blob]"){var ge=new FileReader;ge.onload=function(){var _$ye=Fe+B.type+"~"+Uo(this.result);ae(pt+Ie+_$ye)},ge.readAsArrayBuffer(B)}else try{ae(JSON.stringify(B))}catch(ye){console.error("Couldn't convert value into a JSON string: ",B),ae(null,ye)}}function Nn(B){if(B.substring(0,nt)!==pt)return JSON.parse(B);var ae=B.substring(yn),Z=B.substring(nt,yn),ve;if(Z===Ie&&it.test(ae)){var be=ae.match(it);ve=be[1],ae=ae.substring(be[0].length)}var ge=Rn(ae);switch(Z){case gt:return ge;case Ie:return u([ge],{type:ve});case we:return new Int8Array(ge);case Oe:return new Uint8Array(ge);case Pe:return new Uint8ClampedArray(ge);case tt:return new Int16Array(ge);case Ut:return new Uint16Array(ge);case We:return new Int32Array(ge);case Rt:return new Uint32Array(ge);case Ve:return new Float32Array(ge);case Tr:return new Float64Array(ge);default:throw new Error("Unkown type: "+Z)}}var Ar={serialize:Ea,deserialize:Nn,stringToBuffer:Rn,bufferToString:Uo};function q(B,ae,Z,ve){B.executeSql("CREATE TABLE IF NOT EXISTS "+ae.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],Z,ve)}function Ee(B){var ae=this,Z={db:null};if(B)for(var ve in B)Z[ve]=typeof B[ve]!="string"?B[ve].toString():B[ve];var be=new p(function(ge,ye){try{Z.db=openDatabase(Z.name,String(Z.version),Z.description,Z.size)}catch(Re){return ye(Re)}Z.db.transaction(function(Re){q(Re,Z,function(){ae._dbInfo=Z,ge()},function(ze,Ue){ye(Ue)})},ye)});return Z.serializer=Ar,be}function Mt(B,ae,Z,ve,be,ge){B.executeSql(Z,ve,be,function(ye,Re){Re.code===Re.SYNTAX_ERR?ye.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[ae.storeName],function(ze,Ue){Ue.rows.length?ge(ze,Re):q(ze,ae,function(){ze.executeSql(Z,ve,be,ge)},ge)},ge):ge(ye,Re)},ge)}function xr(B,ae){var Z=this;B=g(B);var ve=new p(function(be,ge){Z.ready().then(function(){var ye=Z._dbInfo;ye.db.transaction(function(Re){Mt(Re,ye,"SELECT * FROM "+ye.storeName+" WHERE key = ? LIMIT 1",[B],function(ze,Ue){var Ge=Ue.rows.length?Ue.rows.item(0).value:null;Ge&&(Ge=ye.serializer.deserialize(Ge)),be(Ge)},function(ze,Ue){ge(Ue)})})}).catch(ge)});return m(ve,ae),ve}function Yr(B,ae){var Z=this,ve=new p(function(be,ge){Z.ready().then(function(){var ye=Z._dbInfo;ye.db.transaction(function(Re){Mt(Re,ye,"SELECT * FROM "+ye.storeName,[],function(ze,Ue){for(var Ge=Ue.rows,Tt=Ge.length,kt=0;kt0){ye(Bo.apply(be,[B,ze,Z,ve-1]));return}Re(kt)}})})}).catch(Re)});return m(ge,Z),ge}function mu(B,ae,Z){return Bo.apply(this,[B,ae,Z,1])}function xt(B,ae){var Z=this;B=g(B);var ve=new p(function(be,ge){Z.ready().then(function(){var ye=Z._dbInfo;ye.db.transaction(function(Re){Mt(Re,ye,"DELETE FROM "+ye.storeName+" WHERE key = ?",[B],function(){be()},function(ze,Ue){ge(Ue)})})}).catch(ge)});return m(ve,ae),ve}function Xr(B){var ae=this,Z=new p(function(ve,be){ae.ready().then(function(){var ge=ae._dbInfo;ge.db.transaction(function(ye){Mt(ye,ge,"DELETE FROM "+ge.storeName,[],function(){ve()},function(Re,ze){be(ze)})})}).catch(be)});return m(Z,B),Z}function zs(B){var ae=this,Z=new p(function(ve,be){ae.ready().then(function(){var ge=ae._dbInfo;ge.db.transaction(function(ye){Mt(ye,ge,"SELECT COUNT(key) as c FROM "+ge.storeName,[],function(Re,ze){var Ue=ze.rows.item(0).c;ve(Ue)},function(Re,ze){be(ze)})})}).catch(be)});return m(Z,B),Z}function pd(B,ae){var Z=this,ve=new p(function(be,ge){Z.ready().then(function(){var ye=Z._dbInfo;ye.db.transaction(function(Re){Mt(Re,ye,"SELECT key FROM "+ye.storeName+" WHERE id = ? LIMIT 1",[B+1],function(ze,Ue){var Ge=Ue.rows.length?Ue.rows.item(0).key:null;be(Ge)},function(ze,Ue){ge(Ue)})})}).catch(ge)});return m(ve,ae),ve}function mc(B){var ae=this,Z=new p(function(ve,be){ae.ready().then(function(){var ge=ae._dbInfo;ge.db.transaction(function(ye){Mt(ye,ge,"SELECT key FROM "+ge.storeName,[],function(Re,ze){for(var Ue=[],Ge=0;Ge '__WebKitDatabaseInfoTable__'",[],function(be,ge){for(var ye=[],Re=0;Re0}function Ii(B){var ae=this,Z={};if(B)for(var ve in B)Z[ve]=B[ve];return Z.keyPrefix=Ga(B,ae._defaultConfig),bn()?(ae._dbInfo=Z,Z.serializer=Ar,p.resolve()):p.reject()}function da(B){var ae=this,Z=ae.ready().then(function(){for(var ve=ae._dbInfo.keyPrefix,be=localStorage.length-1;be>=0;be--){var ge=localStorage.key(be);ge.indexOf(ve)===0&&localStorage.removeItem(ge)}});return m(Z,B),Z}function Zn(B,ae){var Z=this;B=g(B);var ve=Z.ready().then(function(){var be=Z._dbInfo,ge=localStorage.getItem(be.keyPrefix+B);return ge&&(ge=be.serializer.deserialize(ge)),ge});return m(ve,ae),ve}function fi(B,ae){var Z=this,ve=Z.ready().then(function(){for(var be=Z._dbInfo,ge=be.keyPrefix,ye=ge.length,Re=localStorage.length,ze=1,Ue=0;Ue=0;ye--){var Re=localStorage.key(ye);Re.indexOf(ge)===0&&localStorage.removeItem(Re)}}):be=p.reject("Invalid arguments"),m(be,ae),be}var at={_driver:"localStorageWrapper",_initStorage:Ii,_support:Br(),iterate:fi,getItem:Zn,setItem:ue,removeItem:Jf,clear:da,length:Qf,key:fd,keys:Kf,dropInstance:De},Jt=function Jt(ae,Z){return ae===Z||typeof ae=="number"&&typeof Z=="number"&&isNaN(ae)&&isNaN(Z)},bi=function bi(ae,Z){for(var ve=ae.length,be=0;be=n.val||r>=e.length-1)return n}};var Mte=function Mte(e,t){if(typeof e=="number"&&!isNaN(e))return e;if(typeof e!="string")return null;var r=t&&t.mode||"metric";r=o$(r);var n=kUe.exec(e),i,o;if(!n)return null;i=parseFloat(n[1]),o=n[4],o===void 0&&(o="b"),o=o.toLowerCase();var a;return r=="jedec"&&(a=Ox["_"+o]),a===void 0&&(a=Ox[o]),Math.floor(a.val*i)};Ote.exports=Pte("metric");var vUe=/\B(?=(\d{3})+(?!\d))/g,_Ue=/(?:\.0*|(\.[^0]+)0+)$/,Ox={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 bUe=i$(["b","kb","mb","gb","tb","pb","eb","zb","yb"]),wUe=i$(["b","kib","mib","gib","tib","pib","eib","zib","yib"]),SUe=i$(["b","_kb","_mb","_gb","_tb"]),kUe=/^((-|\+)?(\d+(?:\.\d+)?)) *((k|m|g|t|p|e|z|y)?i?(b))?$/i;function Pte(e){e=o$(e);function t(n){return n=n!==void 0?n:{},n.mode===void 0&&(n.mode=e),n}function r(n,i){return CUe(n,t(i))}return r.format=function(i,o){return Rte(i,t(o))},r.parse=function(i,o){return Mte(i,t(o))},r.withDefaultMode=Pte,r}});var p$=Be(function(LZt,jx){var et=function et(){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},ii=-1,gi=1,Dr=0;et.Diff=function(e,t){return[e,t]};et.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 et.Diff(Dr,e)]:[];typeof r=="undefined"&&(r=!0);var o=r,a=this.diff_commonPrefix(e,t),s=e.substring(0,a);e=e.substring(a),t=t.substring(a),a=this.diff_commonSuffix(e,t);var l=e.substring(e.length-a);e=e.substring(0,e.length-a),t=t.substring(0,t.length-a);var c=this.diff_compute_(e,t,o,i);return s&&c.unshift(new et.Diff(Dr,s)),l&&c.push(new et.Diff(Dr,l)),this.diff_cleanupMerge(c),c};et.prototype.diff_compute_=function(e,t,r,n){var i;if(!e)return[new et.Diff(gi,t)];if(!t)return[new et.Diff(ii,e)];var o=e.length>t.length?e:t,a=e.length>t.length?t:e,s=o.indexOf(a);if(s!=-1)return i=[new et.Diff(gi,o.substring(0,s)),new et.Diff(Dr,a),new et.Diff(gi,o.substring(s+a.length))],e.length>t.length&&(i[0][0]=i[2][0]=ii),i;if(a.length==1)return[new et.Diff(ii,e),new et.Diff(gi,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 et.Diff(Dr,m)],g)}return r&&e.length>100&&t.length>100?this.diff_lineMode_(e,t,n):this.diff_bisect_(e,t,n)};et.prototype.diff_lineMode_=function(e,t,r){var n=this.diff_linesToChars_(e,t);e=n.chars1,t=n.chars2;var i=n.lineArray,o=this.diff_main(e,t,!1,r);this.diff_charsToLines_(o,i),this.diff_cleanupSemantic(o),o.push(new et.Diff(Dr,""));for(var a=0,s=0,l=0,c="",d="";a=1&&l>=1){o.splice(a-s-l,s+l),a=a-s-l;for(var u=this.diff_main(c,d,!1,r),p=u.length-1;p>=0;p--)o.splice(a,0,u[p]);a=a+u.length}l=0,s=0,c="",d="";break}a++}return o.pop(),o};et.prototype.diff_bisect_=function(e,t,r){for(var n=e.length,i=t.length,o=Math.ceil((n+i)/2),a=o,s=2*o,l=new Array(s),c=new Array(s),d=0;dr);v++){for(var y=-v+m;y<=v-h;y+=2){var _=a+y,b;y==-v||y!=v&&l[_-1]n)h+=2;else if(w>i)m+=2;else if(p){var S=a+u-y;if(S>=0&&S=k)return this.diff_bisectSplit_(e,t,b,w,r)}}}for(var E=-v+g;E<=v-x;E+=2){var S=a+E,k;E==-v||E!=v&&c[S-1]n)x+=2;else if(C>i)g+=2;else if(!p){var _=a+u-E;if(_>=0&&_=k)return this.diff_bisectSplit_(e,t,b,w,r)}}}}return[new et.Diff(ii,e),new et.Diff(gi,t)]};et.prototype.diff_bisectSplit_=function(e,t,r,n,i){var o=e.substring(0,r),a=t.substring(0,n),s=e.substring(r),l=t.substring(n),c=this.diff_main(o,a,!1,i),d=this.diff_main(s,l,!1,i);return c.concat(d)};et.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,w,S,k,_]:null}var a=o(r,n,Math.ceil(r.length/4)),s=o(r,n,Math.ceil(r.length/2)),l;if(!a&&!s)return null;s?a?l=a[4].length>s[4].length?a:s:l=s:l=a;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]};et.prototype.diff_cleanupSemantic=function(e){for(var t=!1,r=[],n=0,i=null,o=0,a=0,s=0,l=0,c=0;o0?r[n-1]:-1,a=0,s=0,l=0,c=0,i=null,t=!0)),o++;for(t&&this.diff_cleanupMerge(e),this.diff_cleanupSemanticLossless(e),o=1;o=m?(p>=d.length/2||p>=u.length/2)&&(e.splice(o,0,new et.Diff(Dr,u.substring(0,p))),e[o-1][1]=d.substring(0,d.length-p),e[o+1][1]=u.substring(p),o++):(m>=d.length/2||m>=u.length/2)&&(e.splice(o,0,new et.Diff(Dr,d.substring(0,m))),e[o-1][0]=gi,e[o-1][1]=u.substring(0,u.length-m),e[o+1][0]=ii,e[o+1][1]=d.substring(m),o++),o++}o++}};et.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),v=g.match(et.nonAlphaNumericRegex_),y=x.match(et.nonAlphaNumericRegex_),_=v&&g.match(et.whitespaceRegex_),b=y&&x.match(et.whitespaceRegex_),w=_&&g.match(et.linebreakRegex_),S=b&&x.match(et.linebreakRegex_),k=w&&m.match(et.blanklineEndRegex_),E=S&&h.match(et.blanklineStartRegex_);return k||E?5:w||S?4:v&&!_&&b?3:_||b?2:v||y?1:0}for(var r=1;r=u&&(u=p,l=n,c=i,d=o)}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++}};et.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/;et.whitespaceRegex_=/\s/;et.linebreakRegex_=/[\r\n]/;et.blanklineEndRegex_=/\n\r?\n$/;et.blanklineStartRegex_=/^\r?\n\r?\n/;et.prototype.diff_cleanupEfficiency=function(e){for(var t=!1,r=[],n=0,i=null,o=0,a=!1,s=!1,l=!1,c=!1;o0?r[n-1]:-1,l=c=!1),t=!0)),o++;t&&this.diff_cleanupMerge(e)};et.prototype.diff_cleanupMerge=function(e){e.push(new et.Diff(Dr,""));for(var t=0,r=0,n=0,i="",o="",a;t1?(r!==0&&n!==0&&(a=this.diff_commonPrefix(o,i),a!==0&&(t-r-n>0&&e[t-r-n-1][0]==Dr?e[t-r-n-1][1]+=o.substring(0,a):(e.splice(0,0,new et.Diff(Dr,o.substring(0,a))),t++),o=o.substring(a),i=i.substring(a)),a=this.diff_commonSuffix(o,i),a!==0&&(e[t][1]=o.substring(o.length-a)+e[t][1],o=o.substring(0,o.length-a),i=i.substring(0,i.length-a))),t-=r+n,e.splice(t,r+n),i.length&&(e.splice(t,0,new et.Diff(ii,i)),t++),o.length&&(e.splice(t,0,new et.Diff(gi,o)),t++),t++):t!==0&&e[t-1][0]==Dr?(e[t-1][1]+=e[t][1],e.splice(t,1)):t++,n=0,r=0,i="",o="";break}e[e.length-1][1]===""&&e.pop();var s=!1;for(t=1;tt));a++)i=r,o=n;return e.length!=a&&e[a][0]===ii?o:o+(t-i)};et.prototype.diff_prettyHtml=function(e){for(var t=[],r=/&/g,n=//g,o=/\n/g,a=0;a");switch(s){case gi:t[a]=''+c+"";break;case ii:t[a]=''+c+"";break;case Dr:t[a]=""+c+"";break}}return t.join("")};et.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 o(b,w){var S=b/t.length,k=Math.abs(r-w);return i.Match_Distance?S+k/i.Match_Distance:k?1:S}var a=this.Match_Threshold,s=e.indexOf(t,r);s!=-1&&(a=Math.min(o(0,s),a),s=e.lastIndexOf(t,r+t.length),s!=-1&&(a=Math.min(o(0,s),a)));var l=1<=h;v--){var y=n[e.charAt(v-1)];if(m===0?x[v]=(x[v+1]<<1|1)&y:x[v]=(x[v+1]<<1|1)&y|((p[v+1]|p[v])<<1|1)|p[v+1],x[v]&l){var _=o(m,v-1);if(_<=a)if(a=_,s=v-1,s>r)h=Math.max(1,2*r-s);else break}}if(o(m+1,r)>a)break;p=x}return s};et.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 o=[],a=new et.patch_obj,s=0,l=0,c=0,d=n,u=n,p=0;p=2*this.Patch_Margin&&s&&(this.patch_addContext_(a,d),o.push(a),a=new et.patch_obj,s=0,d=u,l=c);break}m!==gi&&(l+=h.length),m!==ii&&(c+=h.length)}return s&&(this.patch_addContext_(a,d),o.push(a)),o};et.prototype.patch_deepCopy=function(e){for(var t=[],r=0;rthis.Match_MaxBits?(l=this.match_main(t,s.substring(0,this.Match_MaxBits),a),l!=-1&&(c=this.match_main(t,s.substring(s.length-this.Match_MaxBits),a+s.length-this.Match_MaxBits),(c==-1||l>=c)&&(l=-1))):l=this.match_main(t,s,a),l==-1)i[o]=!1,n-=e[o].length2-e[o].length1;else{i[o]=!0,n=l-a;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[o].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[o]=!1;else{this.diff_cleanupSemanticLossless(u);for(var p=0,m,h=0;ho[0][1].length){var a=t-o[0][1].length;o[0][1]=r.substring(o[0][1].length)+o[0][1],i.start1-=a,i.start2-=a,i.length1+=a,i.length2+=a}if(i=e[e.length-1],o=i.diffs,o.length==0||o[o.length-1][0]!=Dr)o.push(new et.Diff(Dr,r)),i.length1+=t,i.length2+=t;else if(t>o[o.length-1][1].length){var a=t-o[o.length-1][1].length;o[o.length-1][1]+=r.substring(0,a),i.length1+=a,i.length2+=a}return r};et.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 et.Diff(c,d)),n.diffs.shift()):(d=d.substring(0,t-s.length1-this.Patch_Margin),s.length1+=d.length,i+=d.length,c===Dr?(s.length2+=d.length,o+=d.length):l=!1,s.diffs.push(new et.Diff(c,d)),d==n.diffs[0][1]?n.diffs.shift():n.diffs[0][1]=n.diffs[0][1].substring(d.length))}a=this.diff_text2(s.diffs),a=a.substring(a.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]===Dr?s.diffs[s.diffs.length-1][1]+=u:s.diffs.push(new et.Diff(Dr,u))),l||e.splice(++r,0,s)}}};et.prototype.patch_toText=function(e){for(var t=[],r=0;r2&&arguments[2]!==void 0?arguments[2]:{};var n,i,o;for(n in t)o=t[n],r[n]=(i=e[n])!=null?i:o;return r};xU.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 yU=Be(function(pmr,dge){"use strict";var cge;cge=/*#__PURE__*/function(){function cge(t,r){_class_call_check(this,cge);this.incr=t,this.decr=r,this._first=null,this._last=null,this.length=0}_create_class(cge,[{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,o;for(t=this._first,o=[];t!=null;)o.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 o}}]);return cge}();dge.exports=cge});var A0=Be(function(mmr,hge){"use strict";var pge=function pge(e,t,r,n,i,o,a){try{var s=e[o](a),l=s.value}catch(c){r(c);return}s.done?t(l):Promise.resolve(l).then(n,i)};var fge=function fge(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var o=e.apply(t,r);function a(l){pge(o,n,i,a,s,"next",l)}function s(l){pge(o,n,i,a,s,"throw",l)}a(void 0)})}};var mge;mge=/*#__PURE__*/function(){function mge(t){var _this=this;var _this1=this;_class_call_check(this,mge);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(mge,[{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 fge(function(){var i,o,_tmp,a;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(a){return a.status!=="none"}),o=n._events[t].map(function(){var _$a=fge(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 _$a.apply(this,arguments)}}());return[4,Promise.all(o)];case 2:_tmp=_state.sent().find(function(a){return a!=null});_state.label=3;case 3:return[2,_tmp];case 4:a=_state.sent();return[2,(i=a,n.trigger("error",i),null)];case 5:return[2]}})})()}}]);return mge}();hge.exports=mge});var _ge=Be(function(gmr,vge){"use strict";var gge,xge,yge;gge=yU();xge=A0();yge=/*#__PURE__*/function(){function yge(t){_class_call_check(this,yge);var r;this.Events=new xge(this),this._length=0,this._lists=(function(){var _this=this;var n,i,o;for(o=[],r=n=1,i=t;1<=i?n<=i:n>=i;r=1<=i?++n:--n)o.push(new gge(function(){return _this.incr()},function(){return _this.decr()}));return o}).call(this)}_create_class(yge,[{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 yge}();vge.exports=yge});var hv=Be(function(ymr,wge){"use strict";var bge;bge=/*#__PURE__*/function(Error1){_inherits(bge,Error1);function bge(){_class_call_check(this,bge);return _call_super(this,bge,arguments)}return bge}(_wrap_native_super(Error));wge.exports=bge});var Ige=Be(function(_mr,Age){"use strict";var Sge=function Sge(e,t,r,n,i,o,a){try{var s=e[o](a),l=s.value}catch(c){r(c);return}s.done?t(l):Promise.resolve(l).then(n,i)};var kge=function kge(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var o=e.apply(t,r);function a(l){Sge(o,n,i,a,s,"next",l)}function s(l){Sge(o,n,i,a,s,"throw",l)}a(void 0)})}};var hA,Cge,Ege,vU,Tge;vU=10;Cge=5;Tge=_f();hA=hv();Ege=/*#__PURE__*/function(){function Ege(t,r,n,i,o,a,s,l){var _this=this;_class_call_check(this,Ege);this.task=t,this.args=r,this.rejectOnDrop=o,this.Events=a,this._states=s,this.Promise=l,this.options=Tge.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(Ege,[{key:"_sanitizePriority",value:function _sanitizePriority(t){var r;return r=~~t!==t?Cge:t,r<0?0:r>vU-1?vU-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 hA(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 hA("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 o=this;return kge(function(){var a,s,l,_t1,_o1,c;return _ts_generator(this,function(_state){switch(_state.label){case 0:o.retryCount===0?(o._assertStatus("RUNNING"),o._states.next(o.options.id)):o._assertStatus("EXECUTING"),s={args:o.args,options:o.options,retryCount:o.retryCount},o.Events.trigger("executing",s);_state.label=1;case 1:_state.trys.push([1,5,,6]);return[4,t!=null?(_t1=t).schedule.apply(_t1,[o.options,o.task].concat(_to_consumable_array(o.args))):(_o1=o).task.apply(_o1,_to_consumable_array(o.args))];case 2:if(!(l=_state.sent(),r()))return[3,4];o.doDone(s);return[4,i(o.options,s)];case 3:return[2,(_state.sent(),o._assertStatus("DONE"),o._resolve(l))];case 4:return[3,6];case 5:c=_state.sent();return[2,(a=c,o._onFailure(a,s,r,n,i))];case 6:return[2]}})})()}},{key:"doExpire",value:function doExpire(t,r,n){var i,o;return this._states.jobStatus(this.options.id==="RUNNING")&&this._states.next(this.options.id),this._assertStatus("EXECUTING"),o={args:this.args,options:this.options,retryCount:this.retryCount},i=new hA("This job timed out after ".concat(this.options.expiration," ms.")),this._onFailure(i,o,t,r,n)}},{key:"_onFailure",value:function _onFailure(t,r,n,i,o){var a=this;return kge(function(){var s,l,_tmp;return _ts_generator(this,function(_state){switch(_state.label){case 0:if(!n())return[3,5];return[4,a.Events.trigger("failed",t,r)];case 1:s=_state.sent();if(!(s!=null))return[3,2];_tmp=(l=~~s,a.Events.trigger("retry","Retrying ".concat(a.options.id," after ").concat(l," ms"),r),a.retryCount++,i(l));return[3,4];case 2:a.doDone(r);return[4,o(a.options,r)];case 3:_tmp=(_state.sent(),a._assertStatus("DONE"),a._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 Ege}();Age.exports=Ege});var $ge=Be(function(wmr,Oge){"use strict";var Pge=function Pge(e,t,r,n,i,o,a){try{var s=e[o](a),l=s.value}catch(c){r(c);return}s.done?t(l):Promise.resolve(l).then(n,i)};var tu=function tu(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var o=e.apply(t,r);function a(l){Pge(o,n,i,a,s,"next",l)}function s(l){Pge(o,n,i,a,s,"throw",l)}a(void 0)})}};var Rge,Mge,_U;_U=_f();Rge=hv();Mge=/*#__PURE__*/function(){function Mge(t,r,n){_class_call_check(this,Mge);this.instance=t,this.storeOptions=r,this.clientId=this.instance._randomIndex(),_U.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(Mge,[{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,o,a;if(o=Date.now(),_this.storeOptions.reservoirRefreshInterval!=null&&o>=_this._lastReservoirRefresh+_this.storeOptions.reservoirRefreshInterval&&(_this._lastReservoirRefresh=o,_this.storeOptions.reservoir=_this.storeOptions.reservoirRefreshAmount,_this.instance._drainAll(_this.computeCapacity())),_this.storeOptions.reservoirIncreaseInterval!=null&&o>=_this._lastReservoirIncrease+_this.storeOptions.reservoirIncreaseInterval){var s=_this.storeOptions;if(r=s.reservoirIncreaseAmount,i=s.reservoirIncreaseMaximum,a=s.reservoir,_this._lastReservoirIncrease=o,n=i!=null?Math.min(r,i-a):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 tu(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 tu(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 tu(function(){return _ts_generator(this,function(_state){switch(_state.label){case 0:return[4,r.yieldLoop()];case 1:return[2,(_state.sent(),_U.overwrite(t,t,r.storeOptions),r._startHeartbeat(),r.instance._drainAll(r.computeCapacity()),!0)]}})})()}},{key:"__running__",value:function __running__(){var t=this;return tu(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 tu(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 tu(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 tu(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 tu(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 tu(function(){var o,a;return _ts_generator(this,function(_state){switch(_state.label){case 0:return[4,i.yieldLoop()];case 1:return[2,(_state.sent(),o=Date.now(),i.conditionsCheck(r)?(i._running+=r,i.storeOptions.reservoir!=null&&(i.storeOptions.reservoir-=r),a=Math.max(i._nextRequest-o,0),i._nextRequest=o+a+i.storeOptions.minTime,{success:!0,wait:a,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 tu(function(){var i,o,a;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 Rge("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,(o=Date.now(),a=n.storeOptions.highWater!=null&&t===n.storeOptions.highWater&&!n.check(r,o),i=n.strategyIsBlock()&&(a||n.isBlocked(o)),i&&(n._unblockTime=o+n.computePenalty(),n._nextRequest=n._unblockTime+n.storeOptions.minTime,n.instance._dropAllQueued()),{reachedHWM:a,blocked:i,strategy:n.storeOptions.strategy})]}})})()}},{key:"__free__",value:function __free__(t,r){var n=this;return tu(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 Mge}();Oge.exports=Mge});var Nge=Be(function(Smr,Dst){Dst.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 yA=Be(function(No){"use strict";var gA,qi,xA;qi=Nge();gA={refs:qi["refs.lua"],validate_keys:qi["validate_keys.lua"],validate_client:qi["validate_client.lua"],refresh_expiration:qi["refresh_expiration.lua"],process_tick:qi["process_tick.lua"],conditions_check:qi["conditions_check.lua"],get_time:qi["get_time.lua"]};No.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")]};xA={init:{keys:No.allKeys,headers:["process_tick"],refresh_expiration:!0,code:qi["init.lua"]},group_check:{keys:No.allKeys,headers:[],refresh_expiration:!1,code:qi["group_check.lua"]},register_client:{keys:No.allKeys,headers:["validate_keys"],refresh_expiration:!1,code:qi["register_client.lua"]},blacklist_client:{keys:No.allKeys,headers:["validate_keys","validate_client"],refresh_expiration:!1,code:qi["blacklist_client.lua"]},heartbeat:{keys:No.allKeys,headers:["validate_keys","validate_client","process_tick"],refresh_expiration:!1,code:qi["heartbeat.lua"]},update_settings:{keys:No.allKeys,headers:["validate_keys","validate_client","process_tick"],refresh_expiration:!0,code:qi["update_settings.lua"]},running:{keys:No.allKeys,headers:["validate_keys","validate_client","process_tick"],refresh_expiration:!1,code:qi["running.lua"]},queued:{keys:No.allKeys,headers:["validate_keys","validate_client"],refresh_expiration:!1,code:qi["queued.lua"]},done:{keys:No.allKeys,headers:["validate_keys","validate_client","process_tick"],refresh_expiration:!1,code:qi["done.lua"]},check:{keys:No.allKeys,headers:["validate_keys","validate_client","process_tick","conditions_check"],refresh_expiration:!1,code:qi["check.lua"]},submit:{keys:No.allKeys,headers:["validate_keys","validate_client","process_tick","conditions_check"],refresh_expiration:!0,code:qi["submit.lua"]},register:{keys:No.allKeys,headers:["validate_keys","validate_client","process_tick","conditions_check"],refresh_expiration:!0,code:qi["register.lua"]},free:{keys:No.allKeys,headers:["validate_keys","validate_client","process_tick"],refresh_expiration:!0,code:qi["free.lua"]},current_reservoir:{keys:No.allKeys,headers:["validate_keys","validate_client","process_tick"],refresh_expiration:!1,code:qi["current_reservoir.lua"]},increment_reservoir:{keys:No.allKeys,headers:["validate_keys","validate_client","process_tick"],refresh_expiration:!0,code:qi["increment_reservoir.lua"]}};No.names=Object.keys(xA);No.keys=function(e,t){return xA[e].keys(t)};No.payload=function(e){var t;return t=xA[e],Array.prototype.concat(gA.refs,t.headers.map(function(r){return gA[r]}),t.refresh_expiration?gA.refresh_expiration:"",t.code).join("\n")}});var vA=Be(function(exports,module){"use strict";var asyncGeneratorStep=function asyncGeneratorStep(e,t,r,n,i,o,a){try{var s=e[o](a),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 o=e.apply(t,r);function a(l){asyncGeneratorStep(o,n,i,a,s,"next",l)}function s(l){asyncGeneratorStep(o,n,i,a,s,"throw",l)}a(void 0)})}};var Events,RedisConnection,Scripts,parser;parser=_f();Events=A0();Scripts=yA();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,o){var a;return(a=_this.limiters[i])!=null?a._store.onMessage(i,o):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,o){return i!=null?r(i):(_this.shas[e]=o[0],t(o[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,o){return i!=null?n(i):r(o[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(o){if(o===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,o){return t.subscriber.unsubscribe(n,function(a,s){if(a!=null)return o(a);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,o){var a;return(a=_this.limiters[i])!=null?a._store.onMessage(i,o):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,o,a;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(),o=_slicedToArray(i,1),a=_slicedToArray(o[0],2);return[2,(r=a[0],n=a[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?~~a:void 0)];case 1:return[2,_state.sent()];case 2:if(!(m==="capacity-priority"))return[3,7];g=a.split(":"),x=bA(g,3);p=x[0],u=x[1],o=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(o))];case 4:_tmp=_state.sent();return[3,6];case 5:_tmp=u===""?(clearTimeout(n.capacityPriorityCounters[o]),delete n.capacityPriorityCounters[o],n.instance._drainAll(i)):n.capacityPriorityCounters[o]=setTimeout(ip(function(){var _$v,y;return _ts_generator(this,function(_state){switch(_state.label){case 0:_state.trys.push([0,3,,4]);delete n.capacityPriorityCounters[o];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:y=_state.sent();return[2,(_$v=y,n.instance.Events.trigger("error",_$v))];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",a)];if(!(m==="blocked"))return[3,9];return[4,n.instance._dropAllQueued()];case 8:return[2,_state.sent()];case 9:return[3,11];case 10:v=_state.sent();return[2,(l=v,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 ip(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,o){var a,s;return a=[Date.now(),n.clientId].concat(r),n.instance.Events.trigger("debug","Calling Redis script: ".concat(t,".lua"),a),s=n.connection.__scriptArgs__(t,n.originalId,a,function(l,c){return l!=null?o(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,o;for(i=[],r=0,n=t.length;r0))return[3,2];t._running++;c=t._queue.shift();l=c.task,r=c.args,a=c.resolve,o=c.reject;return[4,Zge(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 a(s)})];case 2:d=_state.sent();return[2,(i=d,function(){return o(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,o;return o=i=null,n=new this.Promise(function(a,s){return o=a,i=s}),this._queue.push({task:t,args:r,resolve:o,reject:i}),this._tryToRun(),n}}]);return Qge}();Jge.exports=Qge});var Xge=Be(function(Rmr,jst){jst.exports={version:"2.19.5"}});var s0e=Be(function(Mmr,a0e){"use strict";var Ust=function Ust(e,t){return Wst(e)||qst(e,t)||Bst()};var Bst=function Bst(){throw new TypeError("Invalid attempt to destructure non-iterable instance")};var qst=function qst(e,t){var r=[],n=!0,i=!1,o=void 0;try{for(var a=e[Symbol.iterator](),s;!(n=(s=a.next()).done)&&(r.push(s.value),!(t&&r.length===t));n=!0);}catch(l){i=!0,o=l}finally{try{!n&&a.return!=null&&a.return()}finally{if(i)throw o}}return r};var Wst=function Wst(e){if(Array.isArray(e))return e};var e0e=function e0e(e,t,r,n,i,o,a){try{var s=e[o](a),l=s.value}catch(c){r(c);return}s.done?t(l):Promise.resolve(l).then(n,i)};var wU=function wU(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var o=e.apply(t,r);function a(l){e0e(o,n,i,a,s,"next",l)}function s(l){e0e(o,n,i,a,s,"throw",l)}a(void 0)})}};var t0e,r0e,n0e,i0e,o0e,wA;wA=_f();t0e=A0();i0e=vA();n0e=_A();o0e=yA();r0e=(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,wA.load(this.limiterOptions,this.defaults,this),this.Events=new t0e(this),this.instances={},this.Bottleneck=SU(),this._startAutoCleanup(),this.sharedConnection=this.connection!=null,this.connection==null&&(this.limiterOptions.datastore==="redis"?this.connection=new i0e(Object.assign({},this.limiterOptions,{Events:this.Events})):this.limiterOptions.datastore==="ioredis"&&(this.connection=new n0e(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 wU(function(){var i,o,_tmp,_tmp1;return _ts_generator(this,function(_state){switch(_state.label){case 0:o=n.instances[r];_tmp=n.connection;if(!_tmp)return[3,2];return[4,n.connection.__runCommand__(["del"].concat(_to_consumable_array(o0e.allKeys("".concat(n.id,"-").concat(r)))))];case 1:_tmp=i=_state.sent();_state.label=2;case 2:_tmp;_tmp1=o!=null;if(!_tmp1)return[3,4];delete n.instances[r];return[4,o.disconnect()];case 3:_tmp1=_state.sent();_state.label=4;case 4:return[2,(_tmp1,o!=null||i>0)]}})})()}},{key:"limiters",value:function limiters(){var r,n,i,o;n=this.instances,i=[];for(r in n)o=n[r],i.push({key:r,limiter:o});return i}},{key:"keys",value:function keys(){return Object.keys(this.instances)}},{key:"clusterKeys",value:function clusterKeys(){var r=this;return wU(function(){var n,i,o,a,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=Ust(p,2);for(d=m[0],o=m[1],n=~~d,a=0,c=o.length;a0&&arguments[0]!==void 0?arguments[0]:{};if(wA.overwrite(r,this.defaults,this),wA.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);a0e.exports=r0e});var p0e=Be(function(Omr,d0e){"use strict";var l0e,u0e,c0e;c0e=_f();u0e=A0();l0e=(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,c0e.load(this.options,this.defaults,this),this.Events=new u0e(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);d0e.exports=l0e});var SU=Be(function($mr,k0e){"use strict";var f0e=function f0e(e,t){return x0e(e)||Vst(e,t)||g0e()};var Vst=function Vst(e,t){var r=[],n=!0,i=!1,o=void 0;try{for(var a=e[Symbol.iterator](),s;!(n=(s=a.next()).done)&&(r.push(s.value),!(t&&r.length===t));n=!0);}catch(l){i=!0,o=l}finally{try{!n&&a.return!=null&&a.return()}finally{if(i)throw o}}return r};var SA=function SA(e){return x0e(e)||Gst(e)||g0e()};var g0e=function g0e(){throw new TypeError("Invalid attempt to destructure non-iterable instance")};var Gst=function Gst(e){if(Symbol.iterator in Object(e)||Object.prototype.toString.call(e)==="[object Arguments]")return Array.from(e)};var x0e=function x0e(e){if(Array.isArray(e))return e};var m0e=function m0e(e,t,r,n,i,o,a){try{var s=e[o](a),l=s.value}catch(c){r(c);return}s.done?t(l):Promise.resolve(l).then(n,i)};var kU=function kU(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var o=e.apply(t,r);function a(l){m0e(o,n,i,a,s,"next",l)}function s(l){m0e(o,n,i,a,s,"throw",l)}a(void 0)})}};var y0e,v0e,CU,EU,_0e,TU,b0e,w0e,S0e,AU,op,h0e=[].splice;TU=10;v0e=5;op=_f();b0e=_ge();EU=Ige();_0e=$ge();w0e=Bge();CU=A0();S0e=Gge();AU=Yge();y0e=(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,o;this._addToQueue=this._addToQueue.bind(this),this._validateOptions(r,n),op.load(r,this.instanceDefaults,this),this._queues=new b0e(TU),this._scheduled={},this._states=new S0e(["RECEIVED","QUEUED","RUNNING","EXECUTING"].concat(this.trackDoneStatus?["DONE"]:[])),this._limiter=null,this.Events=new CU(this),this._submitLock=new AU("submit",this.Promise),this._registerLock=new AU("register",this.Promise),o=op.load(r,this.storeDefaults,{}),this._store=(function(){if(this.datastore==="redis"||this.datastore==="ioredis"||this.connection!=null)return i=op.load(r,this.redisStoreDefaults,{}),new w0e(this,o,i);if(this.datastore==="local")return i=op.load(r,this.localStoreDefaults,{}),new _0e(this,o,i);throw new e.prototype.BottleneckError("Invalid datastore type: ".concat(this.datastore))}).call(this),this._queues.on("leftzero",function(){var a;return(a=_this._store.heartbeat)!=null&&typeof a.ref=="function"?a.ref():void 0}),this._queues.on("zero",function(){var a;return(a=_this._store.heartbeat)!=null&&typeof a.unref=="function"?a.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,o){var a=this;return kU(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,a._store.__free__(r,i.weight)];case 1:c=_state.sent();if(l=c.running,a.Events.trigger("debug","Freed ".concat(i.id),o),l===0&&a.empty())return[2,a.Events.trigger("idle")];return[3,3];case 2:d=_state.sent();return[2,(s=d,a.Events.trigger("error",s))];case 3:return[2]}})})()}},{key:"_run",value:function _run(r,n,i){var _this=this;var o,a,s;return n.doRun(),o=this._clearGlobalState.bind(this,r),s=this._run.bind(this,r,n),a=this._free.bind(this,r,n),this._scheduled[r]={timeout:setTimeout(function(){return n.doExecute(_this._limiter,o,s,a)},i),expiration:n.options.expiration!=null?setTimeout(function(){return n.doExpire(o,s,a)},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,o,a,s;if(_this.queued()===0)return _this.Promise.resolve(null);s=_this._queues.getFirst();var l=o=s.first();return a=l.options,n=l.args,r!=null&&a.weight>r?_this.Promise.resolve(null):(_this.Events.trigger("debug","Draining ".concat(a.id),{args:n,options:a}),i=_this._randomIndex(),_this._store.__register__(i,a.weight,a.expiration).then(function(param){var c=param.success,d=param.wait,u=param.reservoir;var p;return _this.Events.trigger("debug","Drained ".concat(a.id),{success:c,args:n,options:a}),c?(s.shift(),p=_this.empty(),p&&_this.Events.trigger("empty"),u===0&&_this.Events.trigger("depleted",p),_this._run(i,o,d),_this.Promise.resolve(a.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 o;return i!=null?(o=r!=null?r-i:r,_this._drainAll(o,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=op.load(r,this.stopDefaults),i=function(o){var a;return a=function(){var s;return s=_this._states.counts,s[0]+s[1]+s[2]+s[3]===o},new _this.Promise(function(s,l){return a()?s():_this.on("done",function(){if(a())return _this.removeAllListeners("done"),s()})})},n=r.dropWaitingJobs?(this._run=function n(o,a){return a.doDrop({message:r.dropErrorMessage})},this._drainOne=function(){return _this.Promise.resolve(null)},this._registerLock.schedule(function(){return _this._submitLock.schedule(function(){var o,a,s;a=_this._scheduled;for(o in a)s=a[o],_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:TU-1,weight:0},function(){return i(1)}),this._receive=function(o){return o._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 kU(function(){var i,o,a,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,o=u.blocked,d=u.strategy;return[3,4];case 3:p=_state.sent();return[2,(a=p,n.Events.trigger("debug","Could not queue ".concat(s.id),{args:i,options:s,error:a}),r.doDrop({error:a}),!1)];case 4:if(!o)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,o),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,o,a,s,l,c;if(typeof r[0]=="function"){var d,u,p,m;s=r,d=s,u=SA(d),i=u[0],r=u.slice(1),p=h0e.call(r,-1),m=f0e(p,1),n=m[0],a=op.load({},this.jobDefaults)}else{var h,g,x,v;l=r,h=l,g=SA(h),a=g[0],i=g[1],r=g.slice(2),x=h0e.call(r,-1),v=f0e(x,1),n=v[0],a=op.load(a,this.jobDefaults)}return c=function(){for(var _len=arguments.length,y=new Array(_len),_key=0;_key<_len;_key++){y[_key]=arguments[_key]}return new _this.Promise(function(_,b){return i.apply(void 0,_to_consumable_array(y).concat([function(){for(var _len=arguments.length,w=new Array(_len),_key=0;_key<_len;_key++){w[_key]=arguments[_key]}return(w[0]!=null?b:_)(w)}]))})},o=new EU(c,r,a,this.jobDefaults,this.rejectOnDrop,this.Events,this._states,this.Promise),o.promise.then(function(y){return typeof n=="function"?n.apply(void 0,_to_consumable_array(y)):void 0}).catch(function(y){return Array.isArray(y)?typeof n=="function"?n.apply(void 0,_to_consumable_array(y)):void 0:typeof n=="function"?n(y):void 0}),this._receive(o)}},{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,o;if(typeof r[0]=="function"){var a=r,s=SA(a);o=s[0],r=s.slice(1),i={}}else{var l=r,c=SA(l);i=c[0],o=c[1],r=c.slice(2)}return n=new EU(o,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,a=new Array(_len),_key=0;_key<_len;_key++){a[_key]=arguments[_key]}return n.apply(void 0,[r.bind(this)].concat(_to_consumable_array(a)))},i.withOptions=function(o){for(var _len=arguments.length,a=new Array(_len>1?_len-1:0),_key=1;_key<_len;_key++){a[_key-1]=arguments[_key]}return n.apply(void 0,[o,r].concat(_to_consumable_array(a)))},i}},{key:"updateSettings",value:function updateSettings(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};var n=this;return kU(function(){return _ts_generator(this,function(_state){switch(_state.label){case 0:return[4,n._store.__updateSettings__(op.overwrite(r,n.storeDefaults))];case 1:return[2,(_state.sent(),op.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=CU,e.version=e.prototype.version=Xge().version,e.strategy=e.prototype.strategy={LEAK:1,OVERFLOW:2,OVERFLOW_PRIORITY:4,BLOCK:3},e.BottleneckError=e.prototype.BottleneckError=hv(),e.Group=e.prototype.Group=s0e(),e.RedisConnection=e.prototype.RedisConnection=vA(),e.IORedisConnection=e.prototype.IORedisConnection=_A(),e.Batcher=e.prototype.Batcher=p0e(),e.prototype.jobDefaults={priority:v0e,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);k0e.exports=y0e});var E0e=Be(function(Nmr,C0e){"use strict";C0e.exports=SU()});var wxe=Be(function(PI){(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(a){return n(o(a),arguments)}function r(a,s){return t.apply(null,[a].concat(s||[]))}function n(a,s){var l=1,c=a.length,d,u="",p,m,h,g,x,v,y,_;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)&&(!y||h.sign)?(_=y?"+":"-",d=d.toString().replace(e.sign,"")):_="",x=h.pad_char?h.pad_char==="0"?"0":h.pad_char.charAt(1):" ",v=h.width-(_+d).length,g=h.width&&v>0?x.repeat(v):"",u+=h.align?_+d+g:x==="0"?_+g+d:g+_+d)}return u}var i=Object.create(null);function o(a){if(i[a])return i[a];for(var s=a,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[a]=c}typeof PI!="undefined"&&(PI.sprintf=t,PI.vsprintf=r),typeof window!="undefined"&&(window.sprintf=t,window.vsprintf=r,typeof define=="function"&&define.amd&&define(function(){return{sprintf:t,vsprintf:r}}))})()});var K5=Be(function(kn){"use strict";var JTe=function JTe(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=[Z5(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,C1)&&(r[n.str]=(r[n.str]||0)+1),r},{})}}]);return cc}(H5);kn._Code=cc;kn.nil=new cc("");kn._=JTe;var qH=new cc("+");kn.str=YTe;kn.addCodeArg=WH;kn.strConcat=oAt;kn.stringify=sAt;kn.safeStringify=Z5;kn.getProperty=lAt;kn.getEsmExportName=uAt;kn.regexpCode=cAt});var HH=Be(function(Il){"use strict";Object.defineProperty(Il,"__esModule",{value:!0});Il.ValueScope=Il.ValueScopeName=Il.Scope=Il.varKinds=Il.UsedValueState=void 0;var Al=K5(),VH=/*#__PURE__*/function(Error1){_inherits(VH,Error1);function VH(t){_class_call_check(this,VH);var _this;_this=_call_super(this,VH,['CodeGen: "code" for '.concat(t," not defined")]),_this.value=t.value;return _this}return VH}(_wrap_native_super(Error)),SR;(function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"})(SR||(Il.UsedValueState=SR={}));Il.varKinds={const:new Al.Name("const"),let:new Al.Name("let"),var:new Al.Name("var")};var kR=/*#__PURE__*/function(){function kR(){var _ref=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=_ref.prefixes,r=_ref.parent;_class_call_check(this,kR);this._names={},this._prefixes=t,this._parent=r}_create_class(kR,[{key:"toName",value:function toName(t){return _instanceof(t,Al.Name)?t:this.name(t)}},{key:"name",value:function name(t){return new Al.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 kR}();Il.Scope=kR;var CR=/*#__PURE__*/function(_Al_Name){_inherits(CR,_Al_Name);function CR(t,r){_class_call_check(this,CR);var _this;_this=_call_super(this,CR,[r]),_this.prefix=t;return _this}_create_class(CR,[{key:"setValue",value:function setValue(t,param){var r=param.property,n=param.itemIndex;this.value=t,this.scopePath=(0,Al._)(_templateObject2(),new Al.Name(r),n)}}]);return CR}(Al.Name);Il.ValueScopeName=CR;var dAt=(0,Al._)(_templateObject3()),GH=/*#__PURE__*/function(kR){_inherits(GH,kR);function GH(t){_class_call_check(this,GH);var _this;_this=_call_super(this,GH,[t]),_this._values={},_this._scope=t.scope,_this.opts=_object_spread_props(_object_spread({},t),{_n:t.lines?dAt:Al.nil});return _this}_create_class(GH,[{key:"get",value:function get1(){return this._scope}},{key:"name",value:function name(t){return new CR(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),o=i.prefix,a=(n=r.key)!==null&&n!==void 0?n:r.ref,s=this._values[o];if(s){var d=s.get(a);if(d)return d}else s=this._values[o]=new Map;s.set(a,i);var l=this._scope[o]||(this._scope[o]=[]),c=l.length;return l[c]=r.ref,i.setValue(r,{property:o,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,Al._)(_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(a){var s=t[a];if(!s)return"continue";var l=n[a]=n[a]||new Map;s.forEach(function(c){if(l.has(c))return;l.set(c,SR.Started);var d=r(c);if(d){var u=_this.opts.es5?Il.varKinds.var:Il.varKinds.const;o=(0,Al._)(_templateObject5(),o,u,c,d,_this.opts._n)}else if(d=i==null?void 0:i(c))o=(0,Al._)(_templateObject6(),o,d,_this.opts._n);else throw new VH(c);l.set(c,SR.Completed)})};var _this=this;var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;var o=Al.nil;for(var a in t)_loop(a);return o}}]);return GH}(kR);Il.ValueScope=GH});var Ur=Be(function(Gr){"use strict";var T1=function T1(e,t){for(var r in t)e[r]=(e[r]||0)+(t[r]||0);return e};var AR=function AR(e,t){return _instanceof(t,xn._CodeOrName)?T1(e,t.names):e};var M_=function M_(e,t,r){var _o1;if(_instanceof(e,xn.Name))return n(e);if(!i(e))return e;return new xn._Code(e._items.reduce(function(o,a){return _instanceof(a,xn.Name)&&(a=n(a)),_instanceof(a,xn._Code)?(_o1=o).push.apply(_o1,_to_consumable_array(a._items)):o.push(a),o},[]));function n(o){var a=r[o.str];return a===void 0||t[o.str]!==1?o:(delete t[o.str],a)}function i(o){return _instanceof(o,xn._Code)&&o._items.some(function(a){return _instanceof(a,xn.Name)&&t[a.str]===1&&r[a.str]!==void 0})}};var pAt=function pAt(e,t){for(var r in t)e[r]=(e[r]||0)-(t[r]||0)};var XTe=function XTe(e){return typeof e=="boolean"||typeof e=="number"||e===null?!e:(0,xn._)(_templateObject7(),oZ(e))};var mAt=function mAt(){for(var _len=arguments.length,e=new Array(_len),_key=0;_key<_len;_key++){e[_key]=arguments[_key]}return e.reduce(fAt)};var gAt=function gAt(){for(var _len=arguments.length,e=new Array(_len),_key=0;_key<_len;_key++){e[_key]=arguments[_key]}return e.reduce(hAt)};var eAe=function eAe(e){return function(t,r){return t===xn.nil?r:r===xn.nil?t:(0,xn._)(_templateObject8(),oZ(t),e,oZ(r))}};var oZ=function oZ(e){return _instanceof(e,xn.Name)?e:(0,xn._)(_templateObject9(),e)};Object.defineProperty(Gr,"__esModule",{value:!0});Gr.or=Gr.and=Gr.not=Gr.CodeGen=Gr.operators=Gr.varKinds=Gr.ValueScopeName=Gr.ValueScope=Gr.Scope=Gr.Name=Gr.regexpCode=Gr.stringify=Gr.getProperty=Gr.nil=Gr.strConcat=Gr.str=Gr._=void 0;var xn=K5(),ad=HH(),Xh=K5();Object.defineProperty(Gr,"_",{enumerable:!0,get:function get1(){return Xh._}});Object.defineProperty(Gr,"str",{enumerable:!0,get:function get1(){return Xh.str}});Object.defineProperty(Gr,"strConcat",{enumerable:!0,get:function get1(){return Xh.strConcat}});Object.defineProperty(Gr,"nil",{enumerable:!0,get:function get1(){return Xh.nil}});Object.defineProperty(Gr,"getProperty",{enumerable:!0,get:function get1(){return Xh.getProperty}});Object.defineProperty(Gr,"stringify",{enumerable:!0,get:function get1(){return Xh.stringify}});Object.defineProperty(Gr,"regexpCode",{enumerable:!0,get:function get1(){return Xh.regexpCode}});Object.defineProperty(Gr,"Name",{enumerable:!0,get:function get1(){return Xh.Name}});var IR=HH();Object.defineProperty(Gr,"Scope",{enumerable:!0,get:function get1(){return IR.Scope}});Object.defineProperty(Gr,"ValueScope",{enumerable:!0,get:function get1(){return IR.ValueScope}});Object.defineProperty(Gr,"ValueScopeName",{enumerable:!0,get:function get1(){return IR.ValueScopeName}});Object.defineProperty(Gr,"varKinds",{enumerable:!0,get:function get1(){return IR.varKinds}});Gr.operators={GT:new xn._Code(">"),GTE:new xn._Code(">="),LT:new xn._Code("<"),LTE:new xn._Code("<="),EQ:new xn._Code("==="),NEQ:new xn._Code("!=="),NOT:new xn._Code("!"),OR:new xn._Code("||"),AND:new xn._Code("&&"),ADD:new xn._Code("+")};var qf=/*#__PURE__*/function(){function qf(){_class_call_check(this,qf)}_create_class(qf,[{key:"optimizeNodes",value:function optimizeNodes(){return this}},{key:"optimizeNames",value:function optimizeNames(t,r){return this}}]);return qf}(),ZH=/*#__PURE__*/function(qf){_inherits(ZH,qf);function ZH(t,r,n){_class_call_check(this,ZH);var _this;_this=_call_super(this,ZH),_this.varKind=t,_this.name=r,_this.rhs=n;return _this}_create_class(ZH,[{key:"render",value:function render(param){var t=param.es5,r=param._n;var n=t?ad.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=M_(this.rhs,t,r)),this}},{key:"names",get:function get1(){return _instanceof(this.rhs,xn._CodeOrName)?this.rhs.names:{}}}]);return ZH}(qf),ER=/*#__PURE__*/function(qf){_inherits(ER,qf);function ER(t,r,n){_class_call_check(this,ER);var _this;_this=_call_super(this,ER),_this.lhs=t,_this.rhs=r,_this.sideEffects=n;return _this}_create_class(ER,[{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,xn.Name)&&!t[this.lhs.str]&&!this.sideEffects))return this.rhs=M_(this.rhs,t,r),this}},{key:"names",get:function get1(){var t=_instanceof(this.lhs,xn.Name)?{}:_object_spread({},this.lhs.names);return AR(t,this.rhs)}}]);return ER}(qf),KH=/*#__PURE__*/function(ER){_inherits(KH,ER);function KH(t,r,n,i){_class_call_check(this,KH);var _this;_this=_call_super(this,KH,[t,n,i]),_this.op=r;return _this}_create_class(KH,[{key:"render",value:function render(param){var t=param._n;return"".concat(this.lhs," ").concat(this.op,"= ").concat(this.rhs,";")+t}}]);return KH}(ER),QH=/*#__PURE__*/function(qf){_inherits(QH,qf);function QH(t){_class_call_check(this,QH);var _this;_this=_call_super(this,QH),_this.label=t,_this.names={};return _this}_create_class(QH,[{key:"render",value:function render(param){var t=param._n;return"".concat(this.label,":")+t}}]);return QH}(qf),JH=/*#__PURE__*/function(qf){_inherits(JH,qf);function JH(t){_class_call_check(this,JH);var _this;_this=_call_super(this,JH),_this.label=t,_this.names={};return _this}_create_class(JH,[{key:"render",value:function render(param){var t=param._n;return"break".concat(this.label?" ".concat(this.label):"",";")+t}}]);return JH}(qf),YH=/*#__PURE__*/function(qf){_inherits(YH,qf);function YH(t){_class_call_check(this,YH);var _this;_this=_call_super(this,YH),_this.error=t;return _this}_create_class(YH,[{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 YH}(qf),XH=/*#__PURE__*/function(qf){_inherits(XH,qf);function XH(t){_class_call_check(this,XH);var _this;_this=_call_super(this,XH),_this.code=t;return _this}_create_class(XH,[{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=M_(this.code,t,r),this}},{key:"names",get:function get1(){return _instanceof(this.code,xn._CodeOrName)?this.code.names:{}}}]);return XH}(qf),Q5=/*#__PURE__*/function(qf){_inherits(Q5,qf);function Q5(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];_class_call_check(this,Q5);var _this;_this=_call_super(this,Q5),_this.nodes=t;return _this}_create_class(Q5,[{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 _t1;var n=t[r].optimizeNodes();Array.isArray(n)?(_t1=t).splice.apply(_t1,[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 o=n[i];o.optimizeNames(t,r)||(pAt(t,o.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 T1(t,r.names)},{})}}]);return Q5}(qf),Wf=/*#__PURE__*/function(Q5){_inherits(Wf,Q5);function Wf(){_class_call_check(this,Wf);return _call_super(this,Wf,arguments)}_create_class(Wf,[{key:"render",value:function render(t){return"{"+t._n+_get(_get_prototype_of(Wf.prototype),"render",this).call(this,t)+"}"+t._n}}]);return Wf}(Q5),eZ=/*#__PURE__*/function(Q5){_inherits(eZ,Q5);function eZ(){_class_call_check(this,eZ);return _call_super(this,eZ,arguments)}return eZ}(Q5),R_=/*#__PURE__*/function(Wf){_inherits(R_,Wf);function R_(){_class_call_check(this,R_);return _call_super(this,R_,arguments)}return R_}(Wf);R_.kind="else";var sd=/*#__PURE__*/function(Wf){_inherits(sd1,Wf);function sd1(t,r){_class_call_check(this,sd1);var _this;_this=_call_super(this,sd1,[r]),_this.condition=t;return _this}_create_class(sd1,[{key:"render",value:function render(t){var r="if(".concat(this.condition,")")+_get(_get_prototype_of(sd1.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(sd1.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 R_(n):n}if(r)return t===!1?_instanceof(r,sd)?r:r.nodes:this.nodes.length?this:new sd(XTe(t),_instanceof(r,sd)?[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(sd1.prototype),"optimizeNames",this).call(this,t,r)||this.else))return this.condition=M_(this.condition,t,r),this}},{key:"names",get:function get1(){var t=_get(_get_prototype_of(sd1.prototype),"names",this);return AR(t,this.condition),this.else&&T1(t,this.else.names),t}}]);return sd1}(Wf);sd.kind="if";var E1=/*#__PURE__*/function(Wf){_inherits(E1,Wf);function E1(){_class_call_check(this,E1);return _call_super(this,E1,arguments)}return E1}(Wf);E1.kind="for";var tZ=/*#__PURE__*/function(E1){_inherits(tZ,E1);function tZ(t){_class_call_check(this,tZ);var _this;_this=_call_super(this,tZ),_this.iteration=t;return _this}_create_class(tZ,[{key:"render",value:function render(t){return"for(".concat(this.iteration,")")+_get(_get_prototype_of(tZ.prototype),"render",this).call(this,t)}},{key:"optimizeNames",value:function optimizeNames(t,r){if(_get(_get_prototype_of(tZ.prototype),"optimizeNames",this).call(this,t,r))return this.iteration=M_(this.iteration,t,r),this}},{key:"names",get:function get1(){return T1(_get(_get_prototype_of(tZ.prototype),"names",this),this.iteration.names)}}]);return tZ}(E1),rZ=/*#__PURE__*/function(E1){_inherits(rZ,E1);function rZ(t,r,n,i){_class_call_check(this,rZ);var _this;_this=_call_super(this,rZ),_this.varKind=t,_this.name=r,_this.from=n,_this.to=i;return _this}_create_class(rZ,[{key:"render",value:function render(t){var r=t.es5?ad.varKinds.var:this.varKind,_this=this,n=_this.name,i=_this.from,o=_this.to;return"for(".concat(r," ").concat(n,"=").concat(i,"; ").concat(n,"<").concat(o,"; ").concat(n,"++)")+_get(_get_prototype_of(rZ.prototype),"render",this).call(this,t)}},{key:"names",get:function get1(){var t=AR(_get(_get_prototype_of(rZ.prototype),"names",this),this.from);return AR(t,this.to)}}]);return rZ}(E1),TR=/*#__PURE__*/function(E1){_inherits(TR,E1);function TR(t,r,n,i){_class_call_check(this,TR);var _this;_this=_call_super(this,TR),_this.loop=t,_this.varKind=r,_this.name=n,_this.iterable=i;return _this}_create_class(TR,[{key:"render",value:function render(t){return"for(".concat(this.varKind," ").concat(this.name," ").concat(this.loop," ").concat(this.iterable,")")+_get(_get_prototype_of(TR.prototype),"render",this).call(this,t)}},{key:"optimizeNames",value:function optimizeNames(t,r){if(_get(_get_prototype_of(TR.prototype),"optimizeNames",this).call(this,t,r))return this.iterable=M_(this.iterable,t,r),this}},{key:"names",get:function get1(){return T1(_get(_get_prototype_of(TR.prototype),"names",this),this.iterable.names)}}]);return TR}(E1),J5=/*#__PURE__*/function(Wf){_inherits(J5,Wf);function J5(t,r,n){_class_call_check(this,J5);var _this;_this=_call_super(this,J5),_this.name=t,_this.args=r,_this.async=n;return _this}_create_class(J5,[{key:"render",value:function render(t){return"".concat(this.async?"async ":"","function ").concat(this.name,"(").concat(this.args,")")+_get(_get_prototype_of(J5.prototype),"render",this).call(this,t)}}]);return J5}(Wf);J5.kind="func";var Y5=/*#__PURE__*/function(Q5){_inherits(Y5,Q5);function Y5(){_class_call_check(this,Y5);return _call_super(this,Y5,arguments)}_create_class(Y5,[{key:"render",value:function render(t){return"return "+_get(_get_prototype_of(Y5.prototype),"render",this).call(this,t)}}]);return Y5}(Q5);Y5.kind="return";var nZ=/*#__PURE__*/function(Wf){_inherits(nZ,Wf);function nZ(){_class_call_check(this,nZ);return _call_super(this,nZ,arguments)}_create_class(nZ,[{key:"render",value:function render(t){var r="try"+_get(_get_prototype_of(nZ.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(nZ.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(nZ.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(nZ.prototype),"names",this);return this.catch&&T1(t,this.catch.names),this.finally&&T1(t,this.finally.names),t}}]);return nZ}(Wf),X5=/*#__PURE__*/function(Wf){_inherits(X5,Wf);function X5(t){_class_call_check(this,X5);var _this;_this=_call_super(this,X5),_this.error=t;return _this}_create_class(X5,[{key:"render",value:function render(t){return"catch(".concat(this.error,")")+_get(_get_prototype_of(X5.prototype),"render",this).call(this,t)}}]);return X5}(Wf);X5.kind="catch";var ek=/*#__PURE__*/function(Wf){_inherits(ek,Wf);function ek(){_class_call_check(this,ek);return _call_super(this,ek,arguments)}_create_class(ek,[{key:"render",value:function render(t){return"finally"+_get(_get_prototype_of(ek.prototype),"render",this).call(this,t)}}]);return ek}(Wf);ek.kind="finally";var iZ=/*#__PURE__*/function(){function iZ(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};_class_call_check(this,iZ);this._values={},this._blockStarts=[],this._constants={},this.opts=_object_spread_props(_object_spread({},r),{_n:r.lines?"\n":""}),this._extScope=t,this._scope=new ad.Scope({parent:t}),this._nodes=[new eZ]}_create_class(iZ,[{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 o=this._scope.toName(r);return n!==void 0&&i&&(this._constants[o.str]=n),this._leafNode(new ZH(t,o,n)),o}},{key:"const",value:function _const(t,r,n){return this._def(ad.varKinds.const,t,r,n)}},{key:"let",value:function _let(t,r,n){return this._def(ad.varKinds.let,t,r,n)}},{key:"var",value:function _var(t,r,n){return this._def(ad.varKinds.var,t,r,n)}},{key:"assign",value:function assign(t,r,n){return this._leafNode(new ER(t,r,n))}},{key:"add",value:function add(t,r){return this._leafNode(new KH(t,Gr.operators.ADD,r))}},{key:"code",value:function code(t){return typeof t=="function"?t():t!==xn.nil&&this._leafNode(new XH(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,xn.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 xn._Code(r)}},{key:"if",value:function _if(t,r,n){if(this._blockNode(new sd(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 sd(t))}},{key:"else",value:function _else(){return this._elseNode(new R_)}},{key:"endIf",value:function endIf(){return this._endBlockNode(sd,R_)}},{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 tZ(t),r)}},{key:"forRange",value:function forRange(t,r,n,i){var o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.opts.es5?ad.varKinds.var:ad.varKinds.let;var a=this._scope.toName(t);return this._for(new rZ(o,a,r,n),function(){return i(a)})}},{key:"forOf",value:function forOf(t,r,n){var _this=this;var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:ad.varKinds.const;var o=this._scope.toName(t);if(this.opts.es5){var a=_instanceof(r,xn.Name)?r:this.var("_arr",r);return this.forRange("_i",0,(0,xn._)(_templateObject10(),a),function(s){_this.var(o,(0,xn._)(_templateObject11(),a,s)),n(o)})}return this._for(new TR("of",i,o,r),function(){return n(o)})}},{key:"forIn",value:function forIn(t,r,n){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:this.opts.es5?ad.varKinds.var:ad.varKinds.const;if(this.opts.ownProperties)return this.forOf(t,(0,xn._)(_templateObject12(),r),n);var o=this._scope.toName(t);return this._for(new TR("in",i,o,r),function(){return n(o)})}},{key:"endFor",value:function endFor(){return this._endBlockNode(E1)}},{key:"label",value:function label(t){return this._leafNode(new QH(t))}},{key:"break",value:function _break(t){return this._leafNode(new JH(t))}},{key:"return",value:function _return(t){var r=new Y5;if(this._blockNode(r),this.code(t),r.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(Y5)}},{key:"try",value:function _try(t,r,n){if(!r&&!n)throw new Error('CodeGen: "try" without "catch" and "finally"');var i=new nZ;if(this._blockNode(i),this.code(t),r){var o=this.name("e");this._currNode=i.catch=new X5(o),r(o)}return n&&(this._currNode=i.finally=new ek,this.code(n)),this._endBlockNode(X5,ek)}},{key:"throw",value:function _throw(t){return this._leafNode(new YH(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]:xn.nil,n=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0;return this._blockNode(new J5(t,r,n)),i&&this.code(i).endFunc(),this}},{key:"endFunc",value:function endFunc(){return this._endBlockNode(J5)}},{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,sd))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 iZ}();Gr.CodeGen=iZ;Gr.not=XTe;var fAt=eAe(Gr.operators.AND);Gr.and=mAt;var hAt=eAe(Gr.operators.OR);Gr.or=gAt});var vn=Be(function(Jr){"use strict";var yAt=function yAt(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 vAt=function vAt(e,t){return typeof t=="boolean"?t:Object.keys(t).length===0?!0:(nAe(e,t),!iAe(t,e.self.RULES.all))};var nAe=function nAe(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 o in t)i[o]||sAe(e,'unknown keyword: "'.concat(o,'"'))};var iAe=function iAe(e,t){if(typeof e=="boolean")return!e;for(var r in e)if(t[r])return!0;return!1};var _At=function _At(e,t){if(typeof e=="boolean")return!e;for(var r in e)if(r!=="$ref"&&t.all[r])return!0;return!1};var bAt=function bAt(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,pi._)(_templateObject13(),r)}return(0,pi._)(_templateObject14(),e,t,(0,pi.getProperty)(n))};var wAt=function wAt(e){return oAe(decodeURIComponent(e))};var SAt=function SAt(e){return encodeURIComponent(sZ(e))};var sZ=function sZ(e){return typeof e=="number"?"".concat(e):e.replace(/~/g,"~0").replace(/\//g,"~1")};var oAe=function oAe(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")};var kAt=function kAt(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 tAe=function tAe(param){var e=param.mergeNames,t=param.mergeToName,r=param.mergeValues,n=param.resultToName;return function(i,o,a,s){var l=a===void 0?o:_instanceof(a,pi.Name)?(_instanceof(o,pi.Name)?e(i,o,a):t(i,o,a),a):_instanceof(o,pi.Name)?(t(i,a,o),o):r(o,a);return s===pi.Name&&!_instanceof(l,pi.Name)?n(i,l):l}};var aAe=function aAe(e,t){if(t===!0)return e.var("props",!0);var r=e.var("props",(0,pi._)(_templateObject15()));return t!==void 0&&lZ(e,r,t),r};var lZ=function lZ(e,t,r){Object.keys(r).forEach(function(n){return e.assign((0,pi._)(_templateObject16(),t,(0,pi.getProperty)(n)),!0)})};var CAt=function CAt(e,t){return e.scopeValue("func",{ref:t,code:rAe[t.code]||(rAe[t.code]=new xAt._Code(t.code))})};var EAt=function EAt(e,t,r){if(_instanceof(e,pi.Name)){var n=t===aZ.Num;return r?n?(0,pi._)(_templateObject17(),e):(0,pi._)(_templateObject18(),e):n?(0,pi._)(_templateObject19(),e):(0,pi._)(_templateObject20(),e)}return r?(0,pi.getProperty)(e).toString():"/"+sZ(e)};var sAe=function sAe(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(Jr,"__esModule",{value:!0});Jr.checkStrictMode=Jr.getErrorPath=Jr.Type=Jr.useFunc=Jr.setEvaluated=Jr.evaluatedPropsToName=Jr.mergeEvaluated=Jr.eachItem=Jr.unescapeJsonPointer=Jr.escapeJsonPointer=Jr.escapeFragment=Jr.unescapeFragment=Jr.schemaRefOrVal=Jr.schemaHasRulesButRef=Jr.schemaHasRules=Jr.checkUnknownRules=Jr.alwaysValidSchema=Jr.toHash=void 0;var pi=Ur(),xAt=K5();Jr.toHash=yAt;Jr.alwaysValidSchema=vAt;Jr.checkUnknownRules=nAe;Jr.schemaHasRules=iAe;Jr.schemaHasRulesButRef=_At;Jr.schemaRefOrVal=bAt;Jr.unescapeFragment=wAt;Jr.escapeFragment=SAt;Jr.escapeJsonPointer=sZ;Jr.unescapeJsonPointer=oAe;Jr.eachItem=kAt;Jr.mergeEvaluated={props:tAe({mergeNames:function(e,t,r){return e.if((0,pi._)(_templateObject21(),r,t),function(){e.if((0,pi._)(_templateObject22(),t),function(){return e.assign(r,!0)},function(){return e.assign(r,(0,pi._)(_templateObject23(),r)).code((0,pi._)(_templateObject24(),r,t))})})},mergeToName:function(e,t,r){return e.if((0,pi._)(_templateObject25(),r),function(){t===!0?e.assign(r,!0):(e.assign(r,(0,pi._)(_templateObject26(),r)),lZ(e,r,t))})},mergeValues:function(e,t){return e===!0?!0:_object_spread({},e,t)},resultToName:aAe}),items:tAe({mergeNames:function(e,t,r){return e.if((0,pi._)(_templateObject27(),r,t),function(){return e.assign(r,(0,pi._)(_templateObject28(),t,r,t,r,t))})},mergeToName:function(e,t,r){return e.if((0,pi._)(_templateObject29(),r),function(){return e.assign(r,t===!0?!0:(0,pi._)(_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)}})};Jr.evaluatedPropsToName=aAe;Jr.setEvaluated=lZ;var rAe={};Jr.useFunc=CAt;var aZ;(function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"})(aZ||(Jr.Type=aZ={}));Jr.getErrorPath=EAt;Jr.checkStrictMode=sAe});var Vf=Be(function(uZ){"use strict";Object.defineProperty(uZ,"__esModule",{value:!0});var ds=Ur(),TAt={data:new ds.Name("data"),valCxt:new ds.Name("valCxt"),instancePath:new ds.Name("instancePath"),parentData:new ds.Name("parentData"),parentDataProperty:new ds.Name("parentDataProperty"),rootData:new ds.Name("rootData"),dynamicAnchors:new ds.Name("dynamicAnchors"),vErrors:new ds.Name("vErrors"),errors:new ds.Name("errors"),this:new ds.Name("this"),self:new ds.Name("self"),scope:new ds.Name("scope"),json:new ds.Name("json"),jsonPos:new ds.Name("jsonPos"),jsonLen:new ds.Name("jsonLen"),jsonPart:new ds.Name("jsonPart")};uZ.default=TAt});var tk=Be(function(ps){"use strict";var AAt=function AAt(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ps.keywordError,r=arguments.length>2?arguments[2]:void 0,n=arguments.length>3?arguments[3]:void 0;var i=e.it,o=i.gen,a=i.compositeRule,s=i.allErrors,l=cAe(e,t,r);(n!=null?n:a||s)?lAe(o,l):uAe(i,(0,_n._)(_templateObject31(),l))};var IAt=function IAt(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ps.keywordError,r=arguments.length>2?arguments[2]:void 0;var n=e.it,i=n.gen,o=n.compositeRule,a=n.allErrors,s=cAe(e,t,r);lAe(i,s),o||a||uAe(n,Ls.default.vErrors)};var PAt=function PAt(e,t){e.assign(Ls.default.errors,t),e.if((0,_n._)(_templateObject32(),Ls.default.vErrors),function(){return e.if(t,function(){return e.assign((0,_n._)(_templateObject33(),Ls.default.vErrors),t)},function(){return e.assign(Ls.default.vErrors,null)})})};var RAt=function RAt(param){var e=param.gen,t=param.keyword,r=param.schemaValue,n=param.data,i=param.errsCount,o=param.it;if(i===void 0)throw new Error("ajv implementation error");var a=e.name("err");e.forRange("i",i,Ls.default.errors,function(s){e.const(a,(0,_n._)(_templateObject34(),Ls.default.vErrors,s)),e.if((0,_n._)(_templateObject35(),a),function(){return e.assign((0,_n._)(_templateObject36(),a),(0,_n.strConcat)(Ls.default.instancePath,o.errorPath))}),e.assign((0,_n._)(_templateObject37(),a),(0,_n.str)(_templateObject38(),o.errSchemaPath,t)),o.opts.verbose&&(e.assign((0,_n._)(_templateObject39(),a),r),e.assign((0,_n._)(_templateObject40(),a),n))})};var lAe=function lAe(e,t){var r=e.const("err",t);e.if((0,_n._)(_templateObject41(),Ls.default.vErrors),function(){return e.assign(Ls.default.vErrors,(0,_n._)(_templateObject42(),r))},(0,_n._)(_templateObject43(),Ls.default.vErrors,r)),e.code((0,_n._)(_templateObject44(),Ls.default.errors))};var uAe=function uAe(e,t){var r=e.gen,n=e.validateName,i=e.schemaEnv;i.$async?r.throw((0,_n._)(_templateObject45(),e.ValidationError,t)):(r.assign((0,_n._)(_templateObject46(),n),t),r.return(!1))};var cAe=function cAe(e,t,r){var _e_it=e.it,n=_e_it.createErrors;return n===!1?(0,_n._)(_templateObject47()):MAt(e,t,r)};var MAt=function MAt(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};var _n;var n=e.gen,i=e.it,o=[OAt(i,r),$At(e,r)];return NAt(e,t,o),(_n=n).object.apply(_n,_to_consumable_array(o))};var OAt=function OAt(param,param1){var e=param.errorPath,t=param1.instancePath;var r=t?(0,_n.str)(_templateObject48(),e,(0,PR.getErrorPath)(t,PR.Type.Str)):e;return[Ls.default.instancePath,(0,_n.strConcat)(Ls.default.instancePath,r)]};var $At=function $At(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,_n.str)(_templateObject49(),t,e);return r&&(i=(0,_n.str)(_templateObject50(),i,(0,PR.getErrorPath)(r,PR.Type.Str))),[A1.schemaPath,i]};var NAt=function NAt(e,param,n){var t=param.params,r=param.message;var i=e.keyword,o=e.data,a=e.schemaValue,s=e.it,l=s.opts,c=s.propertyName,d=s.topSchemaRef,u=s.schemaPath;n.push([A1.keyword,i],[A1.params,typeof t=="function"?t(e):t||(0,_n._)(_templateObject51())]),l.messages&&n.push([A1.message,typeof r=="function"?r(e):r]),l.verbose&&n.push([A1.schema,a],[A1.parentSchema,(0,_n._)(_templateObject52(),d,u)],[Ls.default.data,o]),c&&n.push([A1.propertyName,c])};Object.defineProperty(ps,"__esModule",{value:!0});ps.extendErrors=ps.resetErrorsCount=ps.reportExtraError=ps.reportError=ps.keyword$DataError=ps.keywordError=void 0;var _n=Ur(),PR=vn(),Ls=Vf();ps.keywordError={message:function(param){var e=param.keyword;return(0,_n.str)(_templateObject53(),e)}};ps.keyword$DataError={message:function(param){var e=param.keyword,t=param.schemaType;return t?(0,_n.str)(_templateObject54(),e,t):(0,_n.str)(_templateObject55(),e)}};ps.reportError=AAt;ps.reportExtraError=IAt;ps.resetErrorsCount=PAt;ps.extendErrors=RAt;var A1={keyword:new _n.Name("keyword"),schemaPath:new _n.Name("schemaPath"),params:new _n.Name("params"),propertyName:new _n.Name("propertyName"),message:new _n.Name("message"),schema:new _n.Name("schema"),parentSchema:new _n.Name("parentSchema")}});var pAe=Be(function(O_){"use strict";var jAt=function jAt(e){var t=e.gen,r=e.schema,n=e.validateName;r===!1?dAe(e,!1):(typeof r==="undefined"?"undefined":_type_of(r))=="object"&&r.$async===!0?t.return(FAt.default.data):(t.assign((0,LAt._)(_templateObject56(),n),null),t.return(!0))};var UAt=function UAt(e,t){var r=e.gen,n=e.schema;n===!1?(r.var(t,!1),dAe(e)):r.var(t,!0)};var dAe=function dAe(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,DAt.reportError)(i,zAt,void 0,t)};Object.defineProperty(O_,"__esModule",{value:!0});O_.boolOrEmptySchema=O_.topBoolOrEmptySchema=void 0;var DAt=tk(),LAt=Ur(),FAt=Vf(),zAt={message:"boolean schema is false"};O_.topBoolOrEmptySchema=jAt;O_.boolOrEmptySchema=UAt});var cZ=Be(function($_){"use strict";var WAt=function WAt(e){return typeof e=="string"&&qAt.has(e)};var VAt=function VAt(){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($_,"__esModule",{value:!0});$_.getRules=$_.isJSONType=void 0;var BAt=["string","number","integer","boolean","null","object","array"],qAt=new Set(BAt);$_.isJSONType=WAt;$_.getRules=VAt});var dZ=Be(function(eg){"use strict";var GAt=function GAt(param,r){var e=param.schema,t=param.self;var n=t.RULES.types[r];return n&&n!==!0&&fAe(e,n)};var fAe=function fAe(e,t){return t.rules.some(function(r){return mAe(e,r)})};var mAe=function mAe(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(eg,"__esModule",{value:!0});eg.shouldUseRule=eg.shouldUseGroup=eg.schemaHasRulesForType=void 0;eg.schemaHasRulesForType=GAt;eg.shouldUseGroup=fAe;eg.shouldUseRule=mAe});var rk=Be(function(fs){"use strict";var QAt=function QAt(e){var t=gAe(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 gAe=function gAe(e){var t=Array.isArray(e)?e:e?[e]:[];if(t.every(HAt.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))};var JAt=function JAt(e,t){var r=e.gen,n=e.data,i=e.opts,o=YAt(t,i.coerceTypes),a=t.length>0&&!(o.length===0&&t.length===1&&(0,ZAt.schemaHasRulesForType)(e,t[0]));if(a){var s=fZ(t,n,i.strictNumbers,N_.Wrong);r.if(s,function(){o.length?XAt(e,t,o):mZ(e)})}return a};var YAt=function YAt(e,t){return t?e.filter(function(r){return xAe.has(r)||t==="array"&&r==="array"}):[]};var XAt=function XAt(e,t,r){var n=e.gen,i=e.data,o=e.opts,a=n.let("dataType",(0,Lr._)(_templateObject57(),i)),s=n.let("coerced",(0,Lr._)(_templateObject58()));o.coerceTypes==="array"&&n.if((0,Lr._)(_templateObject59(),a,i,i),function(){return n.assign(i,(0,Lr._)(_templateObject60(),i)).assign(a,(0,Lr._)(_templateObject61(),i)).if(fZ(t,i,o.strictNumbers),function(){return n.assign(s,i)})}),n.if((0,Lr._)(_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;(xAe.has(c)||c==="array"&&o.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(),mZ(e),n.endIf(),n.if((0,Lr._)(_templateObject63(),s),function(){n.assign(i,s),eIt(e,s)});function l(c){switch(c){case"string":n.elseIf((0,Lr._)(_templateObject64(),a,a)).assign(s,(0,Lr._)(_templateObject65(),i)).elseIf((0,Lr._)(_templateObject66(),i)).assign(s,(0,Lr._)(_templateObject67()));return;case"number":n.elseIf((0,Lr._)(_templateObject68(),a,i,a,i,i,i)).assign(s,(0,Lr._)(_templateObject69(),i));return;case"integer":n.elseIf((0,Lr._)(_templateObject70(),a,i,a,i,i,i,i)).assign(s,(0,Lr._)(_templateObject71(),i));return;case"boolean":n.elseIf((0,Lr._)(_templateObject72(),i,i,i)).assign(s,!1).elseIf((0,Lr._)(_templateObject73(),i,i)).assign(s,!0);return;case"null":n.elseIf((0,Lr._)(_templateObject74(),i,i,i)),n.assign(s,null);return;case"array":n.elseIf((0,Lr._)(_templateObject75(),a,a,a,i)).assign(s,(0,Lr._)(_templateObject76(),i))}}};var eIt=function eIt(param,n){var e=param.gen,t=param.parentData,r=param.parentDataProperty;e.if((0,Lr._)(_templateObject77(),t),function(){return e.assign((0,Lr._)(_templateObject78(),t,r),n)})};var pZ=function pZ(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:N_.Correct;var i=n===N_.Correct?Lr.operators.EQ:Lr.operators.NEQ,o;switch(e){case"null":return(0,Lr._)(_templateObject79(),t,i);case"array":o=(0,Lr._)(_templateObject80(),t);break;case"object":o=(0,Lr._)(_templateObject81(),t,t,t);break;case"integer":o=a((0,Lr._)(_templateObject82(),t,t));break;case"number":o=a();break;default:return(0,Lr._)(_templateObject83(),t,i,e)}return n===N_.Correct?o:(0,Lr.not)(o);function a(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Lr.nil;return(0,Lr.and)((0,Lr._)(_templateObject84(),t),s,r?(0,Lr._)(_templateObject85(),t):Lr.nil)}};var fZ=function fZ(e,t,r,n){if(e.length===1)return pZ(e[0],t,r,n);var i,o=(0,hAe.toHash)(e);if(o.array&&o.object){var a=(0,Lr._)(_templateObject86(),t);i=o.null?a:(0,Lr._)(_templateObject87(),t,a),delete o.null,delete o.array,delete o.object}else i=Lr.nil;o.number&&delete o.integer;for(var a9 in o)i=(0,Lr.and)(i,pZ(a9,t,r,n));return i};var mZ=function mZ(e){var t=rIt(e);(0,KAt.reportError)(t,tIt)};var rIt=function rIt(e){var t=e.gen,r=e.data,n=e.schema,i=(0,hAe.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(fs,"__esModule",{value:!0});fs.reportTypeError=fs.checkDataTypes=fs.checkDataType=fs.coerceAndCheckDataType=fs.getJSONTypes=fs.getSchemaTypes=fs.DataType=void 0;var HAt=cZ(),ZAt=dZ(),KAt=tk(),Lr=Ur(),hAe=vn(),N_;(function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"})(N_||(fs.DataType=N_={}));fs.getSchemaTypes=QAt;fs.getJSONTypes=gAe;fs.coerceAndCheckDataType=JAt;var xAe=new Set(["string","number","integer","boolean","null"]);fs.checkDataType=pZ;fs.checkDataTypes=fZ;var tIt={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,Lr._)(_templateObject88(),e):(0,Lr._)(_templateObject89(),t)}};fs.reportTypeError=mZ});var vAe=Be(function(RR){"use strict";var iIt=function iIt(e,t){var _e_schema=e.schema,r=_e_schema.properties,n=_e_schema.items;if(t==="object"&&r)for(var i in r)yAe(e,i,r[i].default);else t==="array"&&Array.isArray(n)&&n.forEach(function(i,o){return yAe(e,o,i.default)})};var yAe=function yAe(e,t,r){var n=e.gen,i=e.compositeRule,o=e.data,a=e.opts;if(r===void 0)return;var s=(0,D_._)(_templateObject90(),o,(0,D_.getProperty)(t));if(i){(0,nIt.checkStrictMode)(e,"default is ignored for: ".concat(s));return}var l=(0,D_._)(_templateObject91(),s);a.useDefaults==="empty"&&(l=(0,D_._)(_templateObject92(),l,s,s)),n.if(l,(0,D_._)(_templateObject93(),s,(0,D_.stringify)(r)))};Object.defineProperty(RR,"__esModule",{value:!0});RR.assignDefaults=void 0;var D_=Ur(),nIt=vn();RR.assignDefaults=iIt});var dc=Be(function(ri){"use strict";var aIt=function aIt(e,t){var r=e.gen,n=e.data,i=e.it;r.if(xZ(r,n,t,i.opts.ownProperties),function(){e.setParams({missingProperty:(0,Ti._)(_templateObject94(),t)},!0),e.error()})};var sIt=function sIt(param,n,i){var e=param.gen,t=param.data,_param_it=param.it,r=_param_it.opts;return(0,Ti.or).apply(this,_to_consumable_array(n.map(function(o){return(0,Ti.and)(xZ(e,t,o,r.ownProperties),(0,Ti._)(_templateObject95(),i,o))})))};var lIt=function lIt(e,t){e.setParams({missingProperty:t},!0),e.error()};var _Ae=function _Ae(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,Ti._)(_templateObject96())})};var gZ=function gZ(e,t,r){return(0,Ti._)(_templateObject97(),_Ae(e),t,r)};var uIt=function uIt(e,t,r,n){var i=(0,Ti._)(_templateObject98(),t,(0,Ti.getProperty)(r));return n?(0,Ti._)(_templateObject99(),i,gZ(e,t,r)):i};var xZ=function xZ(e,t,r,n){var i=(0,Ti._)(_templateObject100(),t,(0,Ti.getProperty)(r));return n?(0,Ti.or)(i,(0,Ti.not)(gZ(e,t,r))):i};var bAe=function bAe(e){return e?Object.keys(e).filter(function(t){return t!=="__proto__"}):[]};var cIt=function cIt(e,t){return bAe(t).filter(function(r){return!(0,hZ.alwaysValidSchema)(e,t[r])})};var dIt=function dIt(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,o=_param_it.errorPath,a=param.it;var _r1;var d=c?(0,Ti._)(_templateObject101(),e,t,n,i):t,u=[[tg.default.instancePath,(0,Ti.strConcat)(tg.default.instancePath,o)],[tg.default.parentData,a.parentData],[tg.default.parentDataProperty,a.parentDataProperty],[tg.default.rootData,tg.default.rootData]];a.opts.dynamicRef&&u.push([tg.default.dynamicAnchors,tg.default.dynamicAnchors]);var p=(0,Ti._)(_templateObject102(),d,(_r1=r).object.apply(_r1,_to_consumable_array(u)));return l!==Ti.nil?(0,Ti._)(_templateObject103(),s,l,p):(0,Ti._)(_templateObject104(),s,p)};var fIt=function fIt(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,o=i(r,n);return e.scopeValue("pattern",{key:o.toString(),ref:o,code:(0,Ti._)(_templateObject105(),i.code==="new RegExp"?pIt:(0,oIt.useFunc)(e,i),r,n)})};var mIt=function mIt(e){var t=e.gen,r=e.data,n=e.keyword,i=e.it,o=t.name("valid");if(i.allErrors){var s=t.let("valid",!0);return a(function(){return t.assign(s,!1)}),s}return t.var(o,!0),a(function(){return t.break()}),o;function a(s){var l=t.const("len",(0,Ti._)(_templateObject106(),r));t.forRange("i",0,l,function(c){e.subschema({keyword:n,dataProp:c,dataPropType:hZ.Type.Num},o),t.if((0,Ti.not)(o),s)})}};var hIt=function hIt(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,hZ.alwaysValidSchema)(i,l)})&&!i.opts.unevaluated)return;var a=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(a,(0,Ti._)(_templateObject107(),a,s)),e.mergeValidEvaluated(d,s)||t.if((0,Ti.not)(a))})}),e.result(a,function(){return e.reset()},function(){return e.error(!0)})};Object.defineProperty(ri,"__esModule",{value:!0});ri.validateUnion=ri.validateArray=ri.usePattern=ri.callValidateCode=ri.schemaProperties=ri.allSchemaProperties=ri.noPropertyInData=ri.propertyInData=ri.isOwnProperty=ri.hasPropFunc=ri.reportMissingProp=ri.checkMissingProp=ri.checkReportMissingProp=void 0;var Ti=Ur(),hZ=vn(),tg=Vf(),oIt=vn();ri.checkReportMissingProp=aIt;ri.checkMissingProp=sIt;ri.reportMissingProp=lIt;ri.hasPropFunc=_Ae;ri.isOwnProperty=gZ;ri.propertyInData=uIt;ri.noPropertyInData=xZ;ri.allSchemaProperties=bAe;ri.schemaProperties=cIt;ri.callValidateCode=dIt;var pIt=(0,Ti._)(_templateObject108());ri.usePattern=fIt;ri.validateArray=mIt;ri.validateUnion=hIt});var kAe=Be(function(Cp){"use strict";var yIt=function yIt(e,t){var r=e.gen,n=e.keyword,i=e.schema,o=e.parentSchema,a=e.it,s=t.macro.call(a.self,i,o,a),l=SAe(r,n,s);a.opts.validateSchema!==!1&&a.self.validateSchema(s,!0);var c=r.name("valid");e.subschema({schema:s,schemaPath:Fs.nil,errSchemaPath:"".concat(a.errSchemaPath,"/").concat(n),topSchemaRef:l,compositeRule:!0},c),e.pass(c,function(){return e.error(!0)})};var vIt=function vIt(e,t){var r;var n=e.gen,i=e.keyword,o=e.schema,a=e.parentSchema,s=e.$data,l=e.it;bIt(l,t);var c=!s&&t.compile?t.compile.call(l.self,o,a,l):t.validate,d=SAe(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&&wAe(e),x(function(){return e.error()});else{var v=t.async?m():h();t.modifying&&wAe(e),x(function(){return _It(e,v)})}}function m(){var v=n.let("ruleErrs",null);return n.try(function(){return g((0,Fs._)(_templateObject109()))},function(y){return n.assign(u,!1).if((0,Fs._)(_templateObject110(),y,l.ValidationError),function(){return n.assign(v,(0,Fs._)(_templateObject111(),y))},function(){return n.throw(y)})}),v}function h(){var v=(0,Fs._)(_templateObject112(),d);return n.assign(v,null),g(Fs.nil),v}function g(){var v=arguments.length>0&&arguments[0]!==void 0?arguments[0]:t.async?(0,Fs._)(_templateObject113()):Fs.nil;var y=l.opts.passContext?I1.default.this:I1.default.self,_=!("compile"in t&&!s||t.schema===!1);n.assign(u,(0,Fs._)(_templateObject114(),v,(0,gIt.callValidateCode)(e,d,y,_)),t.modifying)}function x(v){var y;n.if((0,Fs.not)((y=t.valid)!==null&&y!==void 0?y:u),v)}};var wAe=function wAe(e){var t=e.gen,r=e.data,n=e.it;t.if(n.parentData,function(){return t.assign(r,(0,Fs._)(_templateObject115(),n.parentData,n.parentDataProperty))})};var _It=function _It(e,t){var r=e.gen;r.if((0,Fs._)(_templateObject116(),t),function(){r.assign(I1.default.vErrors,(0,Fs._)(_templateObject117(),I1.default.vErrors,t,I1.default.vErrors,t)).assign(I1.default.errors,(0,Fs._)(_templateObject118(),I1.default.vErrors)),(0,xIt.extendErrors)(e)},function(){return e.error()})};var bIt=function bIt(param,t){var e=param.schemaEnv;if(t.async&&!e.$async)throw new Error("async keyword in sync schema")};var SAe=function SAe(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,Fs.stringify)(r)})};var wIt=function wIt(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 SIt=function SIt(param,i,o){var e=param.schema,t=param.opts,r=param.self,n=param.errSchemaPath;if(Array.isArray(i.keyword)?!i.keyword.includes(o):i.keyword!==o)throw new Error("ajv implementation error");var a=i.dependencies;if(a!=null&&a.some(function(s){return!Object.prototype.hasOwnProperty.call(e,s)}))throw new Error("parent schema must have dependencies of ".concat(o,": ").concat(a.join(",")));if(i.validateSchema&&!i.validateSchema(e[o])){var l='keyword "'.concat(o,'" 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(Cp,"__esModule",{value:!0});Cp.validateKeywordUsage=Cp.validSchemaType=Cp.funcKeywordCode=Cp.macroKeywordCode=void 0;var Fs=Ur(),I1=Vf(),gIt=dc(),xIt=tk();Cp.macroKeywordCode=yIt;Cp.funcKeywordCode=vIt;Cp.validSchemaType=wIt;Cp.validateKeywordUsage=SIt});var EAe=Be(function(rg){"use strict";var kIt=function kIt(e,param){var t=param.keyword,r=param.schemaProp,n=param.schema,i=param.schemaPath,o=param.errSchemaPath,a=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,Ep._)(_templateObject119(),e.schemaPath,(0,Ep.getProperty)(t)),errSchemaPath:"".concat(e.errSchemaPath,"/").concat(t)}:{schema:s[r],schemaPath:(0,Ep._)(_templateObject120(),e.schemaPath,(0,Ep.getProperty)(t),(0,Ep.getProperty)(r)),errSchemaPath:"".concat(e.errSchemaPath,"/").concat(t,"/").concat((0,CAe.escapeFragment)(r))}}if(n!==void 0){if(i===void 0||o===void 0||a===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:n,schemaPath:i,topSchemaRef:a,errSchemaPath:o}}throw new Error('either "keyword" or "schema" must be passed')};var CIt=function CIt(e,t,param){var r=param.dataProp,n=param.dataPropType,i=param.data,o=param.dataTypes,a=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,Ep._)(_templateObject121(),t.data,(0,Ep.getProperty)(r)),!0);l(p),e.errorPath=(0,Ep.str)(_templateObject122(),c,(0,CAe.getErrorPath)(r,n,u.jsPropertySyntax)),e.parentDataProperty=(0,Ep._)(_templateObject123(),r),e.dataPathArr=_to_consumable_array(d).concat([e.parentDataProperty])}if(i!==void 0){var c10=_instanceof(i,Ep.Name)?i:s.let("data",i,!0);l(c10),a!==void 0&&(e.propertyName=a)}o&&(e.dataTypes=o);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 EIt=function EIt(e,param){var t=param.jtdDiscriminator,r=param.jtdMetadata,n=param.compositeRule,i=param.createErrors,o=param.allErrors;n!==void 0&&(e.compositeRule=n),i!==void 0&&(e.createErrors=i),o!==void 0&&(e.allErrors=o),e.jtdDiscriminator=t,e.jtdMetadata=r};Object.defineProperty(rg,"__esModule",{value:!0});rg.extendSubschemaMode=rg.extendSubschemaData=rg.getSubschema=void 0;var Ep=Ur(),CAe=vn();rg.getSubschema=kIt;rg.extendSubschemaData=CIt;rg.extendSubschemaMode=EIt});var yZ=Be(function(DMr,TAe){"use strict";TAe.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,o;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(o=Object.keys(t),n=o.length,n!==Object.keys(r).length)return!1;for(i=n;i--!==0;)if(!Object.prototype.hasOwnProperty.call(r,o[i]))return!1;for(i=n;i--!==0;){var a=o[i];if(!e(t[a],r[a]))return!1}return!0}return t!==t&&r!==r}});var IAe=Be(function(LMr,AAe){"use strict";var TIt=function TIt(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")};var ng=AAe.exports=function ng(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(){};MR(t,n,i,e,"",e)};ng.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};ng.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};ng.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};ng.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 MR(e,t,r,n,i,o,a,s,l,c){if(n&&(typeof n==="undefined"?"undefined":_type_of(n))=="object"&&!Array.isArray(n)){t(n,i,o,a,s,l,c);for(var d in n){var u=n[d];if(Array.isArray(u)){if(d in ng.arrayKeywords)for(var p=0;p1&&arguments[1]!==void 0?arguments[1]:!0;return typeof e=="boolean"?!0:t===!0?!vZ(e):t?PAe(e)<=t:!1};var RAe=function RAe(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",r=arguments.length>2?arguments[2]:void 0;r!==!1&&(t=L_(t));var n=e.parse(t);return MAe(e,n)};var MAe=function MAe(e,t){return e.serialize(t).split("#")[0]+"#"};var L_=function L_(e){return e?e.replace($It,""):""};var NIt=function NIt(e,t,r){return r=L_(r),e.resolve(t,r)};var LIt=function LIt(e,t){var _this=this;if(typeof e=="boolean")return{};var _this_opts=this.opts,r=_this_opts.schemaId,n=_this_opts.uriResolver,i=L_(e[r]||t),o={"":i},a=RAe(n,i,!1),s={},l=new Set;return PIt(e,{allKeys:!0},function(u,p,m,h){var v=function v(_){var b=this.opts.uriResolver.resolve;if(_=L_(x?b(x,_):_),l.has(_))throw d(_);l.add(_);var w=this.refs[_];return typeof w=="string"&&(w=this.refs[w]),(typeof w==="undefined"?"undefined":_type_of(w))=="object"?c(u,w.schema,_):_!==L_(g)&&(_[0]==="#"?(c(u,s[_],_),s[_]=u):this.refs[_]=g),_};var y=function y(_){if(typeof _=="string"){if(!DIt.test(_))throw new Error('invalid anchor "'.concat(_,'"'));v.call(this,"#".concat(_))}};if(h===void 0)return;var g=a+p,x=o[h];typeof u[r]=="string"&&(x=v.call(_this,u[r])),y.call(_this,u.$anchor),y.call(_this,u.$dynamicAnchor),o[p]=x}),s;function c(u,p,m){if(p!==void 0&&!IIt(u,p))throw d(m)}function d(u){return new Error('reference "'.concat(u,'" resolves to more than one schema'))}};Object.defineProperty(Pl,"__esModule",{value:!0});Pl.getSchemaRefs=Pl.resolveUrl=Pl.normalizeId=Pl._getFullPath=Pl.getFullPath=Pl.inlineRef=void 0;var AIt=vn(),IIt=yZ(),PIt=IAe(),RIt=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);Pl.inlineRef=MIt;var OIt=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function vZ(e){for(var t in e){if(OIt.has(t))return!0;var r=e[t];if(Array.isArray(r)&&r.some(vZ)||(typeof r==="undefined"?"undefined":_type_of(r))=="object"&&vZ(r))return!0}return!1}function PAe(e){var t=0;for(var r in e){if(r==="$ref")return 1/0;if(t++,!RIt.has(r)&&(_type_of(e[r])=="object"&&(0,AIt.eachItem)(e[r],function(n){return t+=PAe(n)}),t===1/0))return 1/0}return t}Pl.getFullPath=RAe;Pl._getFullPath=MAe;var $It=/#\/?$/;Pl.normalizeId=L_;Pl.resolveUrl=NIt;var DIt=/^[a-z_][-a-z0-9._]*$/i;Pl.getSchemaRefs=LIt});var ak=Be(function(ig){"use strict";var jIt=function jIt(e){if(jAe(e)&&(UAe(e),zAe(e))){qIt(e);return}FAe(e,function(){return(0,LAe.topBoolOrEmptySchema)(e)})};var FAe=function FAe(param,o){var e=param.gen,t=param.validateName,r=param.schema,n=param.schemaEnv,i=param.opts;i.code.es5?e.func(t,(0,Gt._)(_templateObject124(),yr.default.data,yr.default.valCxt),n.$async,function(){e.code((0,Gt._)(_templateObject125(),$Ae(r,i))),BIt(e,i),e.code(o)}):e.func(t,(0,Gt._)(_templateObject126(),yr.default.data,UIt(i)),n.$async,function(){return e.code($Ae(r,i)).code(o)})};var UIt=function UIt(e){return(0,Gt._)(_templateObject128(),yr.default.instancePath,yr.default.parentData,yr.default.parentDataProperty,yr.default.rootData,yr.default.data,e.dynamicRef?(0,Gt._)(_templateObject127(),yr.default.dynamicAnchors):Gt.nil)};var BIt=function BIt(e,t){e.if(yr.default.valCxt,function(){e.var(yr.default.instancePath,(0,Gt._)(_templateObject129(),yr.default.valCxt,yr.default.instancePath)),e.var(yr.default.parentData,(0,Gt._)(_templateObject130(),yr.default.valCxt,yr.default.parentData)),e.var(yr.default.parentDataProperty,(0,Gt._)(_templateObject131(),yr.default.valCxt,yr.default.parentDataProperty)),e.var(yr.default.rootData,(0,Gt._)(_templateObject132(),yr.default.valCxt,yr.default.rootData)),t.dynamicRef&&e.var(yr.default.dynamicAnchors,(0,Gt._)(_templateObject133(),yr.default.valCxt,yr.default.dynamicAnchors))},function(){e.var(yr.default.instancePath,(0,Gt._)(_templateObject134())),e.var(yr.default.parentData,(0,Gt._)(_templateObject135())),e.var(yr.default.parentDataProperty,(0,Gt._)(_templateObject136())),e.var(yr.default.rootData,yr.default.data),t.dynamicRef&&e.var(yr.default.dynamicAnchors,(0,Gt._)(_templateObject137()))})};var qIt=function qIt(e){var t=e.schema,r=e.opts,n=e.gen;FAe(e,function(){r.$comment&&t.$comment&&qAe(e),ZIt(e),n.let(yr.default.vErrors,null),n.let(yr.default.errors,0),r.unevaluated&&WIt(e),BAe(e),JIt(e)})};var WIt=function WIt(e){var t=e.gen,r=e.validateName;e.evaluated=t.const("evaluated",(0,Gt._)(_templateObject138(),r)),t.if((0,Gt._)(_templateObject139(),e.evaluated),function(){return t.assign((0,Gt._)(_templateObject140(),e.evaluated),(0,Gt._)(_templateObject141()))}),t.if((0,Gt._)(_templateObject142(),e.evaluated),function(){return t.assign((0,Gt._)(_templateObject143(),e.evaluated),(0,Gt._)(_templateObject144()))})};var $Ae=function $Ae(e,t){var r=(typeof e==="undefined"?"undefined":_type_of(e))=="object"&&e[t.schemaId];return r&&(t.code.source||t.code.process)?(0,Gt._)(_templateObject145(),r):Gt.nil};var VIt=function VIt(e,t){if(jAe(e)&&(UAe(e),zAe(e))){GIt(e,t);return}(0,LAe.boolOrEmptySchema)(e,t)};var zAe=function zAe(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 jAe=function jAe(e){return typeof e.schema!="boolean"};var GIt=function GIt(e,t){var r=e.schema,n=e.gen,i=e.opts;i.$comment&&r.$comment&&qAe(e),KIt(e),QIt(e);var o=n.const("_errs",yr.default.errors);BAe(e,o),n.var(t,(0,Gt._)(_templateObject146(),o,yr.default.errors))};var UAe=function UAe(e){(0,Gf.checkUnknownRules)(e),HIt(e)};var BAe=function BAe(e,t){if(e.opts.jtd)return NAe(e,[],!1,t);var r=(0,OAe.getSchemaTypes)(e.schema),n=(0,OAe.coerceAndCheckDataType)(e,r);NAe(e,r,!n,t)};var HIt=function HIt(e){var t=e.schema,r=e.errSchemaPath,n=e.opts,i=e.self;t.$ref&&n.ignoreKeywordsWithRef&&(0,Gf.schemaHasRulesButRef)(t,i.RULES)&&i.logger.warn('$ref: keywords ignored in schema at path "'.concat(r,'"'))};var ZIt=function ZIt(e){var t=e.schema,r=e.opts;t.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,Gf.checkStrictMode)(e,"default is ignored in the schema root")};var KIt=function KIt(e){var t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,zIt.resolveUrl)(e.opts.uriResolver,e.baseId,t))};var QIt=function QIt(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")};var qAe=function qAe(param){var e=param.gen,t=param.schemaEnv,r=param.schema,n=param.errSchemaPath,i=param.opts;var o=r.$comment;if(i.$comment===!0)e.code((0,Gt._)(_templateObject147(),yr.default.self,o));else if(typeof i.$comment=="function"){var a=(0,Gt.str)(_templateObject148(),n),s=e.scopeValue("root",{ref:t.root});e.code((0,Gt._)(_templateObject149(),yr.default.self,o,a,s))}};var JIt=function JIt(e){var t=e.gen,r=e.schemaEnv,n=e.validateName,i=e.ValidationError,o=e.opts;r.$async?t.if((0,Gt._)(_templateObject150(),yr.default.errors),function(){return t.return(yr.default.data)},function(){return t.throw((0,Gt._)(_templateObject151(),i,yr.default.vErrors))}):(t.assign((0,Gt._)(_templateObject152(),n),yr.default.vErrors),o.unevaluated&&YIt(e),t.return((0,Gt._)(_templateObject153(),yr.default.errors)))};var YIt=function YIt(param){var e=param.gen,t=param.evaluated,r=param.props,n=param.items;_instanceof(r,Gt.Name)&&e.assign((0,Gt._)(_templateObject154(),t),r),_instanceof(n,Gt.Name)&&e.assign((0,Gt._)(_templateObject155(),t),n)};var NAe=function NAe(e,t,r,n){var i=e.gen,o=e.schema,a=e.data,s=e.allErrors,l=e.opts,c=e.self,d=c.RULES;if(o.$ref&&(l.ignoreKeywordsWithRef||!(0,Gf.schemaHasRulesButRef)(o,d))){i.block(function(){return VAe(e,"$ref",d.all.$ref.definition)});return}l.jtd||XIt(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,bZ.shouldUseGroup)(o,p)&&(p.type?(i.if((0,OR.checkDataType)(p.type,a,l.strictNumbers)),DAe(e,p),t.length===1&&t[0]===p.type&&r&&(i.else(),(0,OR.reportTypeError)(e)),i.endIf()):DAe(e,p),s||i.if((0,Gt._)(_templateObject156(),yr.default.errors,n||0)))}};var DAe=function DAe(e,t){var r=e.gen,n=e.schema,_e_opts=e.opts,i=_e_opts.useDefaults;i&&(0,FIt.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 o=_step.value;(0,bZ.shouldUseRule)(n,o)&&VAe(e,o.keyword,o.definition,t.type)}}catch(err){_didIteratorError=true;_iteratorError=err}finally{try{if(!_iteratorNormalCompletion&&_iterator.return!=null){_iterator.return()}}finally{if(_didIteratorError){throw _iteratorError}}}})};var XIt=function XIt(e,t){e.schemaEnv.meta||!e.opts.strictTypes||(e9t(e,t),e.opts.allowUnionTypes||t9t(e,t),r9t(e,e.dataTypes))};var e9t=function e9t(e,t){if(t.length){if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach(function(r){WAe(e.dataTypes,r)||wZ(e,'type "'.concat(r,'" not allowed by context "').concat(e.dataTypes.join(","),'"'))}),i9t(e,t)}};var t9t=function t9t(e,t){t.length>1&&!(t.length===2&&t.includes("null"))&&wZ(e,"use allowUnionTypes to allow union type keyword")};var r9t=function r9t(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,bZ.shouldUseRule)(e.schema,i)){var _i_definition=i.definition,o=_i_definition.type;o.length&&!o.some(function(a){return n9t(t,a)})&&wZ(e,'missing type "'.concat(o.join(","),'" for keyword "').concat(n,'"'))}}};var n9t=function n9t(e,t){return e.includes(t)||t==="number"&&e.includes("integer")};var WAe=function WAe(e,t){return e.includes(t)||t==="integer"&&e.includes("number")};var i9t=function i9t(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;WAe(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 wZ=function wZ(e,t){var r=e.schemaEnv.baseId+e.errSchemaPath;t+=' at "'.concat(r,'" (strictTypes)'),(0,Gf.checkStrictMode)(e,t,e.opts.strictTypes)};var VAe=function VAe(e,t,r,n){var i=new $R(e,r,t);"code"in r?r.code(i,n):i.$data&&r.validate?(0,ok.funcKeywordCode)(i,r):"macro"in r?(0,ok.macroKeywordCode)(i,r):(r.compile||r.validate)&&(0,ok.funcKeywordCode)(i,r)};var GAe=function GAe(e,param){var t=param.dataLevel,r=param.dataNames,n=param.dataPathArr;var i,o;if(e==="")return yr.default.rootData;if(e[0]==="/"){if(!o9t.test(e))throw new Error("Invalid JSON-pointer: ".concat(e));i=e,o=yr.default.rootData}else{var c=a9t.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(o=r[t-d],!i)return o}var a=o,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 c10=_step.value;c10&&(o=(0,Gt._)(_templateObject157(),o,(0,Gt.getProperty)((0,Gf.unescapeJsonPointer)(c10))),a=(0,Gt._)(_templateObject158(),a,o))}}catch(err){_didIteratorError=true;_iteratorError=err}finally{try{if(!_iteratorNormalCompletion&&_iterator.return!=null){_iterator.return()}}finally{if(_didIteratorError){throw _iteratorError}}}return a;function l(c,d){return"Cannot access ".concat(c," ").concat(d," levels up, current level is ").concat(t)}};Object.defineProperty(ig,"__esModule",{value:!0});ig.getData=ig.KeywordCxt=ig.validateFunctionCode=void 0;var LAe=pAe(),OAe=rk(),bZ=dZ(),OR=rk(),FIt=vAe(),ok=kAe(),_Z=EAe(),Gt=Ur(),yr=Vf(),zIt=nk(),Gf=vn(),ik=tk();ig.validateFunctionCode=jIt;var $R=/*#__PURE__*/function(){function $R(t,r,n){_class_call_check(this,$R);if((0,ok.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,Gf.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",GAe(this.$data,t));else if(this.schemaCode=this.schemaValue,!(0,ok.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",yr.default.errors))}_create_class($R,[{key:"result",value:function result(t,r,n){this.failResult((0,Gt.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,Gt.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,Gt._)(_templateObject159(),r,(0,Gt.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?ik.reportExtraError:ik.reportError)(this,this.def.error,r)}},{key:"$dataError",value:function $dataError(){(0,ik.reportError)(this,this.def.$dataError||ik.keyword$DataError)}},{key:"reset",value:function reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,ik.resetErrorsCount)(this.gen,this.errsCount)}},{key:"ok",value:function ok(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]:Gt.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]:Gt.nil,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Gt.nil;if(!this.$data)return;var _this=this,n=_this.gen,i=_this.schemaCode,o=_this.schemaType,a=_this.def;n.if((0,Gt.or)((0,Gt._)(_templateObject160(),i),r)),t!==Gt.nil&&n.assign(t,!0),(o.length||a.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),t!==Gt.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,o=_this.it;return(0,Gt.or)(a(),s());function a(){if(n.length){if(!_instanceof(r,Gt.Name))throw new Error("ajv implementation error");var l=Array.isArray(n)?n:[n];return(0,Gt._)(_templateObject161(),(0,OR.checkDataTypes)(l,r,o.opts.strictNumbers,OR.DataType.Wrong))}return Gt.nil}function s(){if(i.validateSchema){var l=t.scopeValue("validate$data",{ref:i.validateSchema});return(0,Gt._)(_templateObject162(),l,r)}return Gt.nil}}},{key:"subschema",value:function subschema(t,r){var n=(0,_Z.getSubschema)(this.it,t);(0,_Z.extendSubschemaData)(n,this.it,t),(0,_Z.extendSubschemaMode)(n,t);var i=_object_spread_props(_object_spread({},this.it,n),{items:void 0,props:void 0});return VIt(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=Gf.mergeEvaluated.props(i,t.props,n.props,r)),n.items!==!0&&t.items!==void 0&&(n.items=Gf.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,Gt.Name)}),!0}}]);return $R}();ig.KeywordCxt=$R;var o9t=/^\/(?:[^~]|~0|~1)*$/,a9t=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;ig.getData=GAe});var NR=Be(function(kZ){"use strict";Object.defineProperty(kZ,"__esModule",{value:!0});var SZ=/*#__PURE__*/function(Error1){_inherits(SZ,Error1);function SZ(t){_class_call_check(this,SZ);var _this;_this=_call_super(this,SZ,["validation failed"]),_this.errors=t,_this.ajv=_this.validation=!0;return _this}return SZ}(_wrap_native_super(Error));kZ.default=SZ});var sk=Be(function(TZ){"use strict";Object.defineProperty(TZ,"__esModule",{value:!0});var CZ=nk(),EZ=/*#__PURE__*/function(Error1){_inherits(EZ,Error1);function EZ(t,r,n,i){_class_call_check(this,EZ);var _this;_this=_call_super(this,EZ,[i||"can't resolve reference ".concat(n," from id ").concat(r)]),_this.missingRef=(0,CZ.resolveUrl)(t,r,n),_this.missingSchema=(0,CZ.normalizeId)((0,CZ.getFullPath)(t,_this.missingRef));return _this}return EZ}(_wrap_native_super(Error));TZ.default=EZ});var LR=Be(function(pc){"use strict";var IZ=function IZ(e){var t=ZAe.call(this,e);if(t)return t;var r=(0,ud.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,o=_this_opts.ownProperties,a=new ld.CodeGen(this.scope,{es5:n,lines:i,ownProperties:o}),s;e.$async&&(s=a.scopeValue("Error",{ref:s9t.default,code:(0,ld._)(_templateObject163())}));var l=a.scopeName("validate");e.validateName=l;var c={gen:a,allErrors:this.opts.allErrors,data:P1.default.data,parentData:P1.default.parentData,parentDataProperty:P1.default.parentDataProperty,dataNames:[P1.default.data],dataPathArr:[ld.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:a.scopeValue("schema",this.opts.code.source===!0?{ref:e.schema,code:(0,ld.stringify)(e.schema)}:{ref:e.schema}),validateName:l,ValidationError:s,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:ld.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,ld._)(_templateObject164()),opts:this.opts,self:this},d;try{this._compilations.add(e),(0,l9t.validateFunctionCode)(c),a.optimize(this.opts.code.optimize);var _$u=a.toString();d="".concat(a.scopeRefs(P1.default.scope),"return ").concat(_$u),this.opts.code.process&&(d=this.opts.code.process(d,e));var m=new Function("".concat(P1.default.self),"".concat(P1.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:a._values}),this.opts.unevaluated){var h=c.props,g=c.items;m.evaluated={props:_instanceof(h,ld.Name)?void 0:h,items:_instanceof(g,ld.Name)?void 0:g,dynamicProps:_instanceof(h,ld.Name),dynamicItems:_instanceof(g,ld.Name)},m.source&&(m.source.evaluated=(0,ld.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 u9t=function u9t(e,t,r){var n;r=(0,ud.resolveUrl)(this.opts.uriResolver,t,r);var i=e.refs[r];if(i)return i;var o=p9t.call(this,e,r);if(o===void 0){var a=(n=e.localRefs)===null||n===void 0?void 0:n[r],_this_opts=this.opts,s=_this_opts.schemaId;a&&(o=new F_({schema:a,schemaId:s,root:e,baseId:t}))}if(o!==void 0)return e.refs[r]=c9t.call(this,o)};var c9t=function c9t(e){return(0,ud.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:IZ.call(this,e)};var ZAe=function ZAe(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(d9t(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 d9t=function d9t(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId};var p9t=function p9t(e,t){var r;for(;typeof(r=this.refs[t])=="string";)t=r;return r||this.schemas[t]||DR.call(this,e,t)};var AZ=function AZ(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,HAe.unescapeFragment)(s)];if(l===void 0)return;r=l;var c=(typeof r==="undefined"?"undefined":_type_of(r))=="object"&&r[this.opts.schemaId];!f9t.has(s)&&c&&(t=(0,ud.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 o;if(typeof r!="boolean"&&r.$ref&&!(0,HAe.schemaHasRulesButRef)(r,this.RULES)){var s10=(0,ud.resolveUrl)(this.opts.uriResolver,t,r.$ref);o=DR.call(this,n,s10)}var _this_opts=this.opts,a=_this_opts.schemaId;if(o=o||new F_({schema:r,schemaId:a,root:n,baseId:t}),o.schema!==o.root.schema)return o};Object.defineProperty(pc,"__esModule",{value:!0});pc.resolveSchema=pc.getCompilingSchema=pc.resolveRef=pc.compileSchema=pc.SchemaEnv=void 0;var ld=Ur(),s9t=NR(),P1=Vf(),ud=nk(),HAe=vn(),l9t=ak(),F_=function F_(t){_class_call_check(this,F_);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,ud.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={}};pc.SchemaEnv=F_;pc.compileSchema=IZ;pc.resolveRef=u9t;pc.getCompilingSchema=ZAe;function DR(e,t){var r=this.opts.uriResolver.parse(t),n=(0,ud._getFullPath)(this.opts.uriResolver,r),i=(0,ud.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&n===i)return AZ.call(this,r,e);var o=(0,ud.normalizeId)(n),a=this.refs[o]||this.schemas[o];if(typeof a=="string"){var s=DR.call(this,e,a);return _type_of(s==null?void 0:s.schema)!="object"?void 0:AZ.call(this,r,s)}if(_type_of(a==null?void 0:a.schema)=="object"){if(a.validate||IZ.call(this,a),o===(0,ud.normalizeId)(t)){var s10=a.schema,_this_opts=this.opts,l=_this_opts.schemaId,c=s10[l];return c&&(i=(0,ud.resolveUrl)(this.opts.uriResolver,i,c)),new F_({schema:s10,schemaId:l,root:e,baseId:i})}return AZ.call(this,r,a)}}pc.resolveSchema=DR;var f9t=new Set(["properties","patternProperties","enum","dependencies","definitions"])});var KAe=Be(function(qMr,m9t){m9t.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 MZ=Be(function(WMr,tIe){"use strict";var RZ=function RZ(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 QAe=function QAe(e){return e.length=0,!0};var y9t=function y9t(e,t,r){if(e.length){var n=RZ(e);if(n!=="")t.push(n);else return r.error=!0,!1;e.length=0}return!0};var v9t=function v9t(e){var t=0,r={error:!1,address:"",zone:""},n=[],i=[],o=!1,a=!1,s=y9t;for(var l=0;l7){r.error=!0;break}l>0&&e[l-1]===":"&&(o=!0),n.push(":");continue}else if(c==="%"){if(!s(i,n,r))break;s=QAe}else{i.push(c);continue}}return i.length&&(s===QAe?r.zone=i.join(""):a?n.push(i.join("")):n.push(RZ(i))),r.address=n.join(""),r};var XAe=function XAe(e){if(_9t(e,":")<2)return{host:e,isIPV6:!1};var t=v9t(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 _9t=function _9t(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 cIe=function cIe(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,o=!1;r.reference==="suffix"&&(r.scheme?e=r.scheme+":"+e:e="//"+e);var a=e.match(rPt);a!==null&&a[1].indexOf("\\")!==-1&&(n.error="URI authority must not contain a literal backslash.",i=!0);var s=e.match(tPt);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=nPt(n,s);if(l!==void 0&&(n.error=n.error||l,i=!0),n.host)if(K9t(n.host)===!1){var u=q9t(n.host);n.host=u.host.toLowerCase(),o=u.isIPV6}else o=!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=lIe(r.scheme||n.scheme);if(!r.unicodeSupport&&(!c||!c.unicodeSupport)&&n.host&&(r.domainHost||c&&c.domainHost)&&o===!1&&Q9t(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=Z9t(unescape(n.host),o))),n.path&&(n.path=G9t(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 z_=function z_(e,t){return cIe(e,t).parsed};var iPt=function iPt(e,t){return dIe(e,t).normalized};var dIe=function dIe(e,t){var _cIe=cIe(e,t),r=_cIe.parsed,n=_cIe.malformedAuthorityOrPort;return{normalized:n?e:R1(r,t),malformedAuthorityOrPort:n}};var sIe=function sIe(e,t){if(typeof e=="string"){var _dIe=dIe(e,t),r=_dIe.normalized,n=_dIe.malformedAuthorityOrPort;return n?void 0:r}if((typeof e==="undefined"?"undefined":_type_of(e))=="object")return R1(e,t)};var _MZ=MZ(),q9t=_MZ.normalizeIPv6,lk=_MZ.removeDotSegments,W9t=_MZ.recomposeAuthority,V9t=_MZ.normalizePercentEncoding,G9t=_MZ.normalizePathEncoding,H9t=_MZ.escapePreservingEscapes,Z9t=_MZ.reescapeHostDelimiters,K9t=_MZ.isIPv4,Q9t=_MZ.nonSimpleDomain,_aIe=aIe(),J9t=_aIe.SCHEMES,lIe=_aIe.getSchemeHandler;var tPt=RegExp("^(?:([^#/:?]+):)?(?:\\/\\/((?:([^#/?@]*)@)?(\\[[^#/?\\]]+\\]|[^#/:?]*)(?::(\\d*))?))?([^#?]*)(?:\\?([^#]*))?(?:#((?:.|[\\n\\r])*))?","u"),rPt=/^(?:[^#/:?]+:)?\/\/([^/?#]*)/;var NZ={SCHEMES:J9t,normalize:Y9t,resolve:X9t,resolveComponent:uIe,equal:ePt,serialize:R1,parse:z_};jR.exports=NZ;jR.exports.default=NZ;jR.exports.fastUri=NZ});var mIe=Be(function(DZ){"use strict";Object.defineProperty(DZ,"__esModule",{value:!0});var fIe=pIe();fIe.code='require("ajv/dist/runtime/uri").default';DZ.default=fIe});var wIe=Be(function(Ba){"use strict";var mPt=function mPt(e){var t,r,n,i,o,a,s,l,c,d,u,p,m,h,g,x,v,y,_,b,w,S,k,E,C;var T=e.strict,I=(t=e.code)===null||t===void 0?void 0:t.optimize,O=I===!0||I===void 0?1:I||0,M=(n=(r=e.code)===null||r===void 0?void 0:r.regExp)!==null&&n!==void 0?n:_Ie,R=(i=e.uriResolver)!==null&&i!==void 0?i:uPt.default;return{strictSchema:(a=(o=e.strictSchema)!==null&&o!==void 0?o:T)!==null&&a!==void 0?a:!0,strictNumbers:(l=(s=e.strictNumbers)!==null&&s!==void 0?s:T)!==null&&l!==void 0?l:!0,strictTypes:(d=(c=e.strictTypes)!==null&&c!==void 0?c:T)!==null&&d!==void 0?d:"log",strictTuples:(p=(u=e.strictTuples)!==null&&u!==void 0?u:T)!==null&&p!==void 0?p:"log",strictRequired:(h=(m=e.strictRequired)!==null&&m!==void 0?m:T)!==null&&h!==void 0?h:!1,code:e.code?_object_spread_props(_object_spread({},e.code),{optimize:O,regExp:M}):{optimize:O,regExp:M},loopRequired:(g=e.loopRequired)!==null&&g!==void 0?g:gIe,loopEnum:(x=e.loopEnum)!==null&&x!==void 0?x:gIe,meta:(v=e.meta)!==null&&v!==void 0?v:!0,messages:(y=e.messages)!==null&&y!==void 0?y:!0,inlineRefs:(_=e.inlineRefs)!==null&&_!==void 0?_:!0,schemaId:(b=e.schemaId)!==null&&b!==void 0?b:"$id",addUsedSchema:(w=e.addUsedSchema)!==null&&w!==void 0?w:!0,validateSchema:(S=e.validateSchema)!==null&&S!==void 0?S:!0,validateFormats:(k=e.validateFormats)!==null&&k!==void 0?k:!0,unicodeRegExp:(E=e.unicodeRegExp)!==null&&E!==void 0?E:!0,int32range:(C=e.int32range)!==null&&C!==void 0?C:!0,uriResolver:R}};var xIe=function xIe(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"error";for(var i in e){var o=i;o in t&&this.logger[n]("".concat(r,": option ").concat(i,". ").concat(e[o]))}};var yIe=function yIe(e){return e=(0,ck.normalizeId)(e),this.schemas[e]||this.refs[e]};var hPt=function hPt(){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 gPt=function gPt(){for(var e in this.opts.formats){var t=this.opts.formats[e];t&&this.addFormat(e,t)}};var xPt=function xPt(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 yPt=function yPt(){var e=_object_spread({},this.opts);var _iteratorNormalCompletion=true,_didIteratorError=false,_iteratorError=undefined;try{for(var _iterator=cPt[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 _Pt=function _Pt(e){if(e===!1)return vPt;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 wPt=function wPt(e,t){var _this=this,r=_this.RULES;if((0,FZ.eachItem)(e,function(n){if(r.keywords[n])throw new Error("Keyword ".concat(n," is already defined"));if(!bPt.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 LZ=function LZ(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,o=_this1.RULES,a=i?o.post:o.rules.find(function(param){var l=param.type;return l===r});if(a||(a={type:r,rules:[]},o.rules.push(a)),o.keywords[e]=!0,!t)return;var s={keyword:e,definition:_object_spread_props(_object_spread({},t),{type:(0,UR.getJSONTypes)(t.type),schemaType:(0,UR.getJSONTypes)(t.schemaType)})};t.before?SPt.call(this,a,s,t.before):a.rules.push(s),o.all[e]=s,(n=t.implements)===null||n===void 0||n.forEach(function(l){return _this.addKeyword(l)})};var SPt=function SPt(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 kPt=function kPt(e){var t=e.metaSchema;t!==void 0&&(e.$data&&this.opts.$data&&(t=bIe(t)),e.validateSchema=this.compile(t,!0))};var bIe=function bIe(e){return{anyOf:[e,CPt]}};Object.defineProperty(Ba,"__esModule",{value:!0});Ba.CodeGen=Ba.Name=Ba.nil=Ba.stringify=Ba.str=Ba._=Ba.KeywordCxt=void 0;var oPt=ak();Object.defineProperty(Ba,"KeywordCxt",{enumerable:!0,get:function get1(){return oPt.KeywordCxt}});var j_=Ur();Object.defineProperty(Ba,"_",{enumerable:!0,get:function get1(){return j_._}});Object.defineProperty(Ba,"str",{enumerable:!0,get:function get1(){return j_.str}});Object.defineProperty(Ba,"stringify",{enumerable:!0,get:function get1(){return j_.stringify}});Object.defineProperty(Ba,"nil",{enumerable:!0,get:function get1(){return j_.nil}});Object.defineProperty(Ba,"Name",{enumerable:!0,get:function get1(){return j_.Name}});Object.defineProperty(Ba,"CodeGen",{enumerable:!0,get:function get1(){return j_.CodeGen}});var aPt=NR(),vIe=sk(),sPt=cZ(),uk=LR(),lPt=Ur(),ck=nk(),UR=rk(),FZ=vn(),hIe=KAe(),uPt=mIe(),_Ie=function(e,t){return new RegExp(e,t)};_Ie.code="new RegExp";var cPt=["removeAdditional","useDefaults","coerceTypes"],dPt=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),pPt={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."},fPt={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},gIe=200;var dk=/*#__PURE__*/function(){function dk(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};_class_call_check(this,dk);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,mPt(t));var _this_opts_code=this.opts.code,r=_this_opts_code.es5,n=_this_opts_code.lines;this.scope=new lPt.ValueScope({scope:{},prefixes:dPt,es5:r,lines:n}),this.logger=_Pt(t.logger);var i=t.validateFormats;t.validateFormats=!1,this.RULES=(0,sPt.getRules)(),xIe.call(this,pPt,t,"NOT SUPPORTED"),xIe.call(this,fPt,t,"DEPRECATED","warn"),this._metaOpts=yPt.call(this),t.formats&&gPt.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),t.keywords&&xPt.call(this,t.keywords),_type_of(t.meta)=="object"&&this.addMetaSchema(t.meta),hPt.call(this),t.validateFormats=i}_create_class(dk,[{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=hIe;n==="id"&&(i=_object_spread({},hIe),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,o.call(this,d.$schema)];case 1:_state.sent();p=this._addSchema(d,u);return[2,p.validate||a.call(this,p)]}})}).call(this)}function o(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 a(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,vIe.default))throw u;s.call(this,u);return[4,l.call(this,u.missingSchema)];case 2:return[2,(_state.sent(),a.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,o.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 a=_step.value;this.addSchema(a,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 o;if((typeof t==="undefined"?"undefined":_type_of(t))=="object"){var _this_opts=this.opts,a9=_this_opts.schemaId;if(o=t[a9],o!==void 0&&typeof o!="string")throw new Error("schema ".concat(a9," must be string"))}return r=(0,ck.normalizeId)(r||o),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 o="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(o);else throw new Error(o)}return i}},{key:"getSchema",value:function getSchema(t){var r;for(;typeof(r=yIe.call(this,t))=="string";)t=r;if(r===void 0){var _this_opts=this.opts,n=_this_opts.schemaId,i=new uk.SchemaEnv({schema:{},schemaId:n});if(r=uk.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=yIe.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 r10=t;this._cache.delete(r10);var n=t[this.opts.schemaId];return n&&(n=(0,ck.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(wPt.call(this,n,r),!r)return(0,FZ.eachItem)(n,function(o){return LZ.call(_this,o)}),this;kPt.call(this,r);var i=_object_spread_props(_object_spread({},r),{type:(0,UR.getJSONTypes)(r.type),schemaType:(0,UR.getJSONTypes)(r.schemaType)});return(0,FZ.eachItem)(n,i.type.length===0?function(o){return LZ.call(_this,o,i)}:function(o){return i.type.forEach(function(a){return LZ.call(_this,o,i,a)})}),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(o){return o.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,o){return i+r+o})}},{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 o=i.split("/").slice(1),a=t;var _iteratorNormalCompletion1=true,_didIteratorError1=false,_iteratorError1=undefined;try{for(var _iterator1=o[Symbol.iterator](),_step1;!(_iteratorNormalCompletion1=(_step1=_iterator1.next()).done);_iteratorNormalCompletion1=true){var s=_step1.value;a=a[s]}}catch(err){_didIteratorError1=true;_iteratorError1=err}finally{try{if(!_iteratorNormalCompletion1&&_iterator1.return!=null){_iterator1.return()}}finally{if(_didIteratorError1){throw _iteratorError1}}}for(var s10 in n){var l=n[s10];if((typeof l==="undefined"?"undefined":_type_of(l))!="object")continue;var _l_definition=l.definition,c=_l_definition.$data,d=a[s10];c&&d&&(a[s10]=bIe(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,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.opts.addUsedSchema;var a,_this_opts=this.opts,s=_this_opts.schemaId;if((typeof t==="undefined"?"undefined":_type_of(t))=="object")a=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,ck.normalizeId)(a||n);var c=ck.getSchemaRefs.call(this,t,n);return l=new uk.SchemaEnv({schema:t,schemaId:s,meta:r,baseId:n,localRefs:c}),this._cache.set(l.schema,l),o&&!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):uk.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{uk.compileSchema.call(this,t)}finally{this.opts=r}}}]);return dk}();dk.ValidationError=aPt.default;dk.MissingRefError=vIe.default;Ba.default=dk;var vPt={log:function log(){},warn:function warn(){},error:function error(){}};var bPt=/^[a-z_$][a-z0-9_$:-]*$/i;var CPt={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"}});var SIe=Be(function(zZ){"use strict";Object.defineProperty(zZ,"__esModule",{value:!0});var EPt={keyword:"id",code:function code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};zZ.default=EPt});var TIe=Be(function(M1){"use strict";var EIe=function EIe(e,t){var r=e.gen;return t.validate?r.scopeValue("validate",{ref:t.validate}):(0,Rl._)(_templateObject165(),r.scopeValue("wrapper",{ref:t}))};var qR=function qR(e,t,r,n){var i=e.gen,o=e.it,a=o.allErrors,s=o.schemaEnv,l=o.opts,c=l.passContext?U_.default.this:Rl.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,Rl._)(_templateObject166(),(0,kIe.callValidateCode)(e,t,c))),m(t),a||i.assign(h,!0)},function(g){i.if((0,Rl._)(_templateObject167(),g,o.ValidationError),function(){return i.throw(g)}),p(g),a||i.assign(h,!1)}),e.ok(h)}function u(){e.result((0,kIe.callValidateCode)(e,t,c),function(){return m(t)},function(){return p(t)})}function p(h){var g=(0,Rl._)(_templateObject168(),h);i.assign(U_.default.vErrors,(0,Rl._)(_templateObject169(),U_.default.vErrors,g,U_.default.vErrors,g)),i.assign(U_.default.errors,(0,Rl._)(_templateObject170(),U_.default.vErrors))}function m(h){var g;if(!o.opts.unevaluated)return;var x=(g=r==null?void 0:r.validate)===null||g===void 0?void 0:g.evaluated;if(o.props!==!0)if(x&&!x.dynamicProps)x.props!==void 0&&(o.props=BR.mergeEvaluated.props(i,x.props,o.props));else{var v=i.var("props",(0,Rl._)(_templateObject171(),h));o.props=BR.mergeEvaluated.props(i,v,o.props,Rl.Name)}if(o.items!==!0)if(x&&!x.dynamicItems)x.items!==void 0&&(o.items=BR.mergeEvaluated.items(i,x.items,o.items));else{var v10=i.var("items",(0,Rl._)(_templateObject172(),h));o.items=BR.mergeEvaluated.items(i,v10,o.items,Rl.Name)}}};Object.defineProperty(M1,"__esModule",{value:!0});M1.callRef=M1.getValidate=void 0;var TPt=sk(),kIe=dc(),Rl=Ur(),U_=Vf(),CIe=LR(),BR=vn(),APt={keyword:"$ref",schemaType:"string",code:function code(e){var t=e.gen,r=e.schema,n=e.it,i=n.baseId,o=n.schemaEnv,a=n.validateName,s=n.opts,l=n.self,c=o.root;if((r==="#"||r==="#/")&&i===c.baseId)return u();var d=CIe.resolveRef.call(l,c,i,r);if(d===void 0)throw new TPt.default(n.opts.uriResolver,i,r);if(_instanceof(d,CIe.SchemaEnv))return p(d);return m(d);function u(){if(o===c)return qR(e,a,o,o.$async);var h=t.scopeValue("root",{ref:c});return qR(e,(0,Rl._)(_templateObject173(),h),c,c.$async)}function p(h){var g=EIe(e,h);qR(e,g,h,h.$async)}function m(h){var g=t.scopeValue("schema",s.code.source===!0?{ref:h,code:(0,Rl.stringify)(h)}:{ref:h}),x=t.name("valid"),v=e.subschema({schema:h,dataTypes:[],schemaPath:Rl.nil,topSchemaRef:g,errSchemaPath:r},x);e.mergeEvaluated(v),e.ok(x)}}};M1.getValidate=EIe;M1.callRef=qR;M1.default=APt});var AIe=Be(function(jZ){"use strict";Object.defineProperty(jZ,"__esModule",{value:!0});var IPt=SIe(),PPt=TIe(),RPt=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",IPt.default,PPt.default];jZ.default=RPt});var IIe=Be(function(UZ){"use strict";Object.defineProperty(UZ,"__esModule",{value:!0});var WR=Ur(),og=WR.operators,VR={maximum:{okStr:"<=",ok:og.LTE,fail:og.GT},minimum:{okStr:">=",ok:og.GTE,fail:og.LT},exclusiveMaximum:{okStr:"<",ok:og.LT,fail:og.GTE},exclusiveMinimum:{okStr:">",ok:og.GT,fail:og.LTE}},MPt={message:function(param){var e=param.keyword,t=param.schemaCode;return(0,WR.str)(_templateObject174(),VR[e].okStr,t)},params:function(param){var e=param.keyword,t=param.schemaCode;return(0,WR._)(_templateObject175(),VR[e].okStr,t)}},OPt={keyword:Object.keys(VR),type:"number",schemaType:"number",$data:!0,error:MPt,code:function code(e){var t=e.keyword,r=e.data,n=e.schemaCode;e.fail$data((0,WR._)(_templateObject176(),r,VR[t].fail,n,r))}};UZ.default=OPt});var PIe=Be(function(BZ){"use strict";Object.defineProperty(BZ,"__esModule",{value:!0});var pk=Ur(),$Pt={message:function(param){var e=param.schemaCode;return(0,pk.str)(_templateObject177(),e)},params:function(param){var e=param.schemaCode;return(0,pk._)(_templateObject178(),e)}},NPt={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:$Pt,code:function code(e){var t=e.gen,r=e.data,n=e.schemaCode,i=e.it,o=i.opts.multipleOfPrecision,a=t.let("res"),s=o?(0,pk._)(_templateObject179(),a,a,o):(0,pk._)(_templateObject180(),a,a);e.fail$data((0,pk._)(_templateObject181(),n,a,r,n,s))}};BZ.default=NPt});var MIe=Be(function(qZ){"use strict";var RIe=function RIe(e){var t=e.length,r=0,n=0,i;for(;n=55296&&i<=56319&&n=s.loopRequired;if(a.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=a.schemaEnv.baseId+a.errSchemaPath,v='required property "'.concat(g,'" is not defined at "').concat(x,'" (strictRequired)');(0,GPt.checkStrictMode)(a,v,a.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||o)e.block$data(hk.nil,u);else try{for(var _iterator=r[Symbol.iterator](),_step;!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=true){var m=_step.value;(0,mk.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||o){var h=t.let("valid",!0);e.block$data(h,function(){return p(m,h)}),e.ok(h)}else t.if((0,mk.checkMissingProp)(e,r,m)),(0,mk.reportMissingProp)(e,m),t.else()}function u(){t.forOf("prop",n,function(m){e.setParams({missingProperty:m}),t.if((0,mk.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,mk.propertyInData)(t,i,m,s.ownProperties)),t.if((0,hk.not)(h),function(){e.error(),t.break()})},hk.nil)}}};HZ.default=ZPt});var LIe=Be(function(ZZ){"use strict";Object.defineProperty(ZZ,"__esModule",{value:!0});var gk=Ur(),KPt={message:function message(param){var e=param.keyword,t=param.schemaCode;var r=e==="maxItems"?"more":"fewer";return(0,gk.str)(_templateObject198(),r,t)},params:function(param){var e=param.schemaCode;return(0,gk._)(_templateObject199(),e)}},QPt={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:KPt,code:function code(e){var t=e.keyword,r=e.data,n=e.schemaCode,i=t==="maxItems"?gk.operators.GT:gk.operators.LT;e.fail$data((0,gk._)(_templateObject200(),r,i,n))}};ZZ.default=QPt});var GR=Be(function(KZ){"use strict";Object.defineProperty(KZ,"__esModule",{value:!0});var FIe=yZ();FIe.code='require("ajv/dist/runtime/equal").default';KZ.default=FIe});var zIe=Be(function(JZ){"use strict";Object.defineProperty(JZ,"__esModule",{value:!0});var QZ=rk(),qa=Ur(),JPt=vn(),YPt=GR(),XPt={message:function(param){var _param_params=param.params,e=_param_params.i,t=_param_params.j;return(0,qa.str)(_templateObject201(),t,e)},params:function(param){var _param_params=param.params,e=_param_params.i,t=_param_params.j;return(0,qa._)(_templateObject202(),e,t)}},eRt={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:XPt,code:function code(e){var t=e.gen,r=e.data,n=e.$data,i=e.schema,o=e.parentSchema,a=e.schemaCode,s=e.it;if(!n&&!i)return;var l=t.let("valid"),c=o.items?(0,QZ.getSchemaTypes)(o.items):[];e.block$data(l,d,(0,qa._)(_templateObject203(),a)),e.ok(l);function d(){var h=t.let("i",(0,qa._)(_templateObject204(),r)),g=t.let("j");e.setParams({i:h,j:g}),t.assign(l,!0),t.if((0,qa._)(_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"),v=(0,QZ.checkDataTypes)(c,x,s.opts.strictNumbers,QZ.DataType.Wrong),y=t.const("indices",(0,qa._)(_templateObject206()));t.for((0,qa._)(_templateObject207(),h),function(){t.let(x,(0,qa._)(_templateObject208(),r,h)),t.if(v,(0,qa._)(_templateObject209())),c.length>1&&t.if((0,qa._)(_templateObject210(),x),(0,qa._)(_templateObject211(),x)),t.if((0,qa._)(_templateObject212(),y,x),function(){t.assign(g,(0,qa._)(_templateObject213(),y,x)),e.error(),t.assign(l,!1).break()}).code((0,qa._)(_templateObject214(),y,x,h))})}function m(h,g){var x=(0,JPt.useFunc)(t,YPt.default),v=t.name("outer");t.label(v).for((0,qa._)(_templateObject215(),h),function(){return t.for((0,qa._)(_templateObject216(),g,h,g),function(){return t.if((0,qa._)(_templateObject217(),x,r,h,r,g),function(){e.error(),t.assign(l,!1).break(v)})})})}}};JZ.default=eRt});var jIe=Be(function(XZ){"use strict";Object.defineProperty(XZ,"__esModule",{value:!0});var YZ=Ur(),tRt=vn(),rRt=GR(),nRt={message:"must be equal to constant",params:function(param){var e=param.schemaCode;return(0,YZ._)(_templateObject218(),e)}},iRt={keyword:"const",$data:!0,error:nRt,code:function code(e){var t=e.gen,r=e.data,n=e.$data,i=e.schemaCode,o=e.schema;n||o&&(typeof o==="undefined"?"undefined":_type_of(o))=="object"?e.fail$data((0,YZ._)(_templateObject219(),(0,tRt.useFunc)(t,rRt.default),r,i)):e.fail((0,YZ._)(_templateObject220(),o,r))}};XZ.default=iRt});var UIe=Be(function(eK){"use strict";Object.defineProperty(eK,"__esModule",{value:!0});var xk=Ur(),oRt=vn(),aRt=GR(),sRt={message:"must be equal to one of the allowed values",params:function(param){var e=param.schemaCode;return(0,xk._)(_templateObject221(),e)}},lRt={keyword:"enum",schemaType:"array",$data:!0,error:sRt,code:function code(e){var t=e.gen,r=e.data,n=e.$data,i=e.schema,o=e.schemaCode,a=e.it;if(!n&&i.length===0)throw new Error("enum must have non-empty array");var s=i.length>=a.opts.loopEnum,l,c=function(){return l!=null?l:l=(0,oRt.useFunc)(t,aRt.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",o);d=(0,xk.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",o,function(m){return t.if((0,xk._)(_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,xk._)(_templateObject223(),c(),r,m,h):(0,xk._)(_templateObject224(),r,g)}}};eK.default=lRt});var BIe=Be(function(tK){"use strict";Object.defineProperty(tK,"__esModule",{value:!0});var uRt=IIe(),cRt=PIe(),dRt=OIe(),pRt=$Ie(),fRt=NIe(),mRt=DIe(),hRt=LIe(),gRt=zIe(),xRt=jIe(),yRt=UIe(),vRt=[uRt.default,cRt.default,dRt.default,pRt.default,fRt.default,mRt.default,hRt.default,gRt.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},xRt.default,yRt.default];tK.default=vRt});var nK=Be(function(yk){"use strict";var qIe=function qIe(e,t){var r=e.gen,n=e.schema,i=e.data,o=e.keyword,a=e.it;a.items=!0;var s=r.const("len",(0,$1._)(_templateObject225(),i));if(n===!1)e.setParams({len:t.length}),e.pass((0,$1._)(_templateObject226(),s,t.length));else if((typeof n==="undefined"?"undefined":_type_of(n))=="object"&&!(0,rK.alwaysValidSchema)(a,n)){var c=r.var("valid",(0,$1._)(_templateObject227(),s,t.length));r.if((0,$1.not)(c),function(){return l(c)}),e.ok(c)}function l(c){r.forRange("i",t.length,s,function(d){e.subschema({keyword:o,dataProp:d,dataPropType:rK.Type.Num},c),a.allErrors||r.if((0,$1.not)(c),function(){return r.break()})})}};Object.defineProperty(yk,"__esModule",{value:!0});yk.validateAdditionalItems=void 0;var $1=Ur(),rK=vn(),_Rt={message:function(param){var _param_params=param.params,e=_param_params.len;return(0,$1.str)(_templateObject228(),e)},params:function(param){var _param_params=param.params,e=_param_params.len;return(0,$1._)(_templateObject229(),e)}},bRt={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:_Rt,code:function code(e){var t=e.parentSchema,r=e.it,n=t.items;if(!Array.isArray(n)){(0,rK.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}qIe(e,n)}};yk.validateAdditionalItems=qIe;yk.default=bRt});var iK=Be(function(vk){"use strict";var VIe=function VIe(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.schema;var n=e.gen,i=e.parentSchema,o=e.data,a=e.keyword,s=e.it;d(i),s.opts.unevaluated&&r.length&&s.items!==!0&&(s.items=HR.mergeEvaluated.items(n,r.length,s.items));var l=n.name("valid"),c=n.const("len",(0,WIe._)(_templateObject230(),o));r.forEach(function(u,p){(0,HR.alwaysValidSchema)(s,u)||(n.if((0,WIe._)(_templateObject231(),c,p),function(){return e.subschema({keyword:a,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(a,'" is ').concat(h,"-tuple, but minItems or maxItems/").concat(t,' are not specified or different at path "').concat(m,'"');(0,HR.checkStrictMode)(s,x,p.strictTuples)}}};Object.defineProperty(vk,"__esModule",{value:!0});vk.validateTuple=void 0;var WIe=Ur(),HR=vn(),wRt=dc(),SRt={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 VIe(e,"additionalItems",t);r.items=!0,!(0,HR.alwaysValidSchema)(r,t)&&e.ok((0,wRt.validateArray)(e))}};vk.validateTuple=VIe;vk.default=SRt});var GIe=Be(function(oK){"use strict";Object.defineProperty(oK,"__esModule",{value:!0});var kRt=iK(),CRt={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:function(e){return(0,kRt.validateTuple)(e,"items")}};oK.default=CRt});var ZIe=Be(function(aK){"use strict";Object.defineProperty(aK,"__esModule",{value:!0});var HIe=Ur(),ERt=vn(),TRt=dc(),ARt=nK(),IRt={message:function(param){var _param_params=param.params,e=_param_params.len;return(0,HIe.str)(_templateObject232(),e)},params:function(param){var _param_params=param.params,e=_param_params.len;return(0,HIe._)(_templateObject233(),e)}},PRt={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:IRt,code:function code(e){var t=e.schema,r=e.parentSchema,n=e.it,i=r.prefixItems;n.items=!0,!(0,ERt.alwaysValidSchema)(n,t)&&(i?(0,ARt.validateAdditionalItems)(e,i):e.ok((0,TRt.validateArray)(e)))}};aK.default=PRt});var KIe=Be(function(sK){"use strict";Object.defineProperty(sK,"__esModule",{value:!0});var fc=Ur(),ZR=vn(),RRt={message:function(param){var _param_params=param.params,e=_param_params.min,t=_param_params.max;return t===void 0?(0,fc.str)(_templateObject234(),e):(0,fc.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,fc._)(_templateObject236(),e):(0,fc._)(_templateObject237(),e,t)}},MRt={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:RRt,code:function code(e){var t=e.gen,r=e.schema,n=e.parentSchema,i=e.data,o=e.it,a,s,l=n.minContains,c=n.maxContains;o.opts.next?(a=l===void 0?1:l,s=c):a=1;var d=t.const("len",(0,fc._)(_templateObject238(),i));if(e.setParams({min:a,max:s}),s===void 0&&a===0){(0,ZR.checkStrictMode)(o,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(s!==void 0&&a>s){(0,ZR.checkStrictMode)(o,'"minContains" > "maxContains" is always invalid'),e.fail();return}if((0,ZR.alwaysValidSchema)(o,r)){var g=(0,fc._)(_templateObject239(),d,a);s!==void 0&&(g=(0,fc._)(_templateObject240(),g,d,s)),e.pass(g);return}o.items=!0;var u=t.name("valid");s===void 0&&a===1?m(u,function(){return t.if(u,function(){return t.break()})}):a===0?(t.let(u,!0),s!==void 0&&t.if((0,fc._)(_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(v){e.subschema({keyword:"contains",dataProp:v,dataPropType:ZR.Type.Num,compositeRule:!0},g),x()})}function h(g){t.code((0,fc._)(_templateObject242(),g)),s===void 0?t.if((0,fc._)(_templateObject243(),g,a),function(){return t.assign(u,!0).break()}):(t.if((0,fc._)(_templateObject244(),g,s),function(){return t.assign(u,!1).break()}),a===1?t.assign(u,!0):t.if((0,fc._)(_templateObject245(),g,a),function(){return t.assign(u,!0)}))}}};sK.default=MRt});var YIe=Be(function(Tp){"use strict";var NRt=function NRt(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 QIe=function QIe(e){var _loop=function(a){var s=t[a];if(s.length===0)return"continue";var l=(0,_k.propertyInData)(r,n,a,i.opts.ownProperties);e.setParams({property:a,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,_k.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,lK._)(_templateObject246(),l,(0,_k.checkMissingProp)(e,s,o))),(0,_k.reportMissingProp)(e,o),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 o=r.let("missing");for(var a in t)_loop(a)};var JIe=function JIe(e){var _loop=function(s){(0,ORt.alwaysValidSchema)(o,t[s])||(r.if((0,_k.propertyInData)(r,n,s,o.opts.ownProperties),function(){var l=e.subschema({keyword:i,schemaProp:s},a);e.mergeValidEvaluated(l,a)},function(){return r.var(a,!0)}),e.ok(a))};var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e.schema;var r=e.gen,n=e.data,i=e.keyword,o=e.it,a=r.name("valid");for(var s in t)_loop(s)};Object.defineProperty(Tp,"__esModule",{value:!0});Tp.validateSchemaDeps=Tp.validatePropertyDeps=Tp.error=void 0;var lK=Ur(),ORt=vn(),_k=dc();Tp.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,lK.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,lK._)(_templateObject248(),e,n,t,r)}};var $Rt={keyword:"dependencies",type:"object",schemaType:"object",error:Tp.error,code:function code(e){var _NRt=_sliced_to_array(NRt(e),2),t=_NRt[0],r=_NRt[1];QIe(e,t),JIe(e,r)}};Tp.validatePropertyDeps=QIe;Tp.validateSchemaDeps=JIe;Tp.default=$Rt});var e9e=Be(function(uK){"use strict";Object.defineProperty(uK,"__esModule",{value:!0});var XIe=Ur(),DRt=vn(),LRt={message:"property name must be valid",params:function(param){var e=param.params;return(0,XIe._)(_templateObject249(),e.propertyName)}},FRt={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:LRt,code:function code(e){var t=e.gen,r=e.schema,n=e.data,i=e.it;if((0,DRt.alwaysValidSchema)(i,r))return;var o=t.name("valid");t.forIn("key",n,function(a){e.setParams({propertyName:a}),e.subschema({keyword:"propertyNames",data:a,dataTypes:["string"],propertyName:a,compositeRule:!0},o),t.if((0,XIe.not)(o),function(){e.error(!0),i.allErrors||t.break()})}),e.ok(o)}};uK.default=FRt});var dK=Be(function(cK){"use strict";Object.defineProperty(cK,"__esModule",{value:!0});var KR=dc(),cd=Ur(),zRt=Vf(),QR=vn(),jRt={message:"must NOT have additional properties",params:function(param){var e=param.params;return(0,cd._)(_templateObject250(),e.additionalProperty)}},URt={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:jRt,code:function code(e){var t=e.gen,r=e.schema,n=e.parentSchema,i=e.data,o=e.errsCount,a=e.it;if(!o)throw new Error("ajv implementation error");var s=a.allErrors,l=a.opts;if(a.props=!0,l.removeAdditional!=="all"&&(0,QR.alwaysValidSchema)(a,r))return;var c=(0,KR.allSchemaProperties)(n.properties),d=(0,KR.allSchemaProperties)(n.patternProperties);u(),e.ok((0,cd._)(_templateObject251(),o,zRt.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 v;if(c.length>8){var y=(0,QR.schemaRefOrVal)(a,n.properties,"properties");v=(0,KR.isOwnProperty)(t,y,x)}else c.length?v=(0,cd.or).apply(this,_to_consumable_array(c.map(function(y){return(0,cd._)(_templateObject252(),x,y)}))):v=cd.nil;return d.length&&(v=(0,cd.or).apply(this,[v].concat(_to_consumable_array(d.map(function(y){return(0,cd._)(_templateObject253(),(0,KR.usePattern)(e,y),x)}))))),(0,cd.not)(v)}function m(x){t.code((0,cd._)(_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,QR.alwaysValidSchema)(a,r)){var v=t.name("valid");l.removeAdditional==="failing"?(g(x,v,!1),t.if((0,cd.not)(v),function(){e.reset(),m(x)})):(g(x,v),s||t.if((0,cd.not)(v),function(){return t.break()}))}}function g(x,v,y){var _={keyword:"additionalProperties",dataProp:x,dataPropType:QR.Type.Str};y===!1&&Object.assign(_,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(_,v)}}};cK.default=URt});var n9e=Be(function(fK){"use strict";Object.defineProperty(fK,"__esModule",{value:!0});var BRt=ak(),t9e=dc(),pK=vn(),r9e=dK(),qRt={keyword:"properties",type:"object",schemaType:"object",code:function code(e){var t=e.gen,r=e.schema,n=e.parentSchema,i=e.data,o=e.it;o.opts.removeAdditional==="all"&&n.additionalProperties===void 0&&r9e.default.code(new BRt.KeywordCxt(o,r9e.default,"additionalProperties"));var a=(0,t9e.allSchemaProperties)(r);var _iteratorNormalCompletion=true,_didIteratorError=false,_iteratorError=undefined;try{for(var _iterator=a[Symbol.iterator](),_step;!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=true){var u=_step.value;o.definedProperties.add(u)}}catch(err){_didIteratorError=true;_iteratorError=err}finally{try{if(!_iteratorNormalCompletion&&_iterator.return!=null){_iterator.return()}}finally{if(_didIteratorError){throw _iteratorError}}}o.opts.unevaluated&&a.length&&o.props!==!0&&(o.props=pK.mergeEvaluated.props(t,(0,pK.toHash)(a),o.props));var s=a.filter(function(u){return!(0,pK.alwaysValidSchema)(o,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 u10=_step1.value;c(u10)?d(u10):(t.if((0,t9e.propertyInData)(t,i,u10,o.opts.ownProperties)),d(u10),o.allErrors||t.else().var(l,!0),t.endIf()),e.it.definedProperties.add(u10),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 o.opts.useDefaults&&!o.compositeRule&&r[u].default!==void 0}function d(u){e.subschema({keyword:"properties",schemaProp:u,dataProp:u},l)}}};fK.default=qRt});var s9e=Be(function(mK){"use strict";Object.defineProperty(mK,"__esModule",{value:!0});var i9e=dc(),JR=Ur(),o9e=vn(),a9e=vn(),WRt={keyword:"patternProperties",type:"object",schemaType:"object",code:function code(e){var t=e.gen,r=e.schema,n=e.data,i=e.parentSchema,o=e.it,a=o.opts,s=(0,i9e.allSchemaProperties)(r),l=s.filter(function(g){return(0,o9e.alwaysValidSchema)(o,r[g])});if(s.length===0||l.length===s.length&&(!o.opts.unevaluated||o.props===!0))return;var c=a.strictSchema&&!a.allowMatchingProperties&&i.properties,d=t.name("valid");o.props!==!0&&!_instanceof(o.props,JR.Name)&&(o.props=(0,a9e.evaluatedPropsToName)(t,o.props));var u=o.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),o.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,o9e.checkStrictMode)(o,"property ".concat(x," matches pattern ").concat(g," (use allowMatchingProperties)"))}function h(g){t.forIn("key",n,function(x){t.if((0,JR._)(_templateObject255(),(0,i9e.usePattern)(e,g),x),function(){var v=l.includes(g);v||e.subschema({keyword:"patternProperties",schemaProp:g,dataProp:x,dataPropType:a9e.Type.Str},d),o.opts.unevaluated&&u!==!0?t.assign((0,JR._)(_templateObject256(),u,x),!0):!v&&!o.allErrors&&t.if((0,JR.not)(d),function(){return t.break()})})})}}};mK.default=WRt});var l9e=Be(function(hK){"use strict";Object.defineProperty(hK,"__esModule",{value:!0});var VRt=vn(),GRt={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code:function code(e){var t=e.gen,r=e.schema,n=e.it;if((0,VRt.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"}};hK.default=GRt});var u9e=Be(function(gK){"use strict";Object.defineProperty(gK,"__esModule",{value:!0});var HRt=dc(),ZRt={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:HRt.validateUnion,error:{message:"must match a schema in anyOf"}};gK.default=ZRt});var c9e=Be(function(xK){"use strict";Object.defineProperty(xK,"__esModule",{value:!0});var YR=Ur(),KRt=vn(),QRt={message:"must match exactly one schema in oneOf",params:function(param){var e=param.params;return(0,YR._)(_templateObject257(),e.passing)}},JRt={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:QRt,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 o=r,a=t.let("valid",!1),s=t.let("passing",null),l=t.name("_valid");e.setParams({passing:s}),t.block(c),e.result(a,function(){return e.reset()},function(){return e.error(!0)});function c(){o.forEach(function(d,u){var p;(0,KRt.alwaysValidSchema)(i,d)?t.var(l,!0):p=e.subschema({keyword:"oneOf",schemaProp:u,compositeRule:!0},l),u>0&&t.if((0,YR._)(_templateObject258(),l,a)).assign(a,!1).assign(s,(0,YR._)(_templateObject259(),s,u)).else(),t.if(l,function(){t.assign(a,!0),t.assign(s,u),p&&e.mergeEvaluated(p,YR.Name)})})}}};xK.default=JRt});var d9e=Be(function(yK){"use strict";Object.defineProperty(yK,"__esModule",{value:!0});var YRt=vn(),XRt={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(o,a){if((0,YRt.alwaysValidSchema)(n,o))return;var s=e.subschema({keyword:"allOf",schemaProp:a},i);e.ok(i),e.mergeEvaluated(s)})}};yK.default=XRt});var m9e=Be(function(vK){"use strict";var p9e=function p9e(e,t){var r=e.schema[t];return r!==void 0&&!(0,f9e.alwaysValidSchema)(e,r)};Object.defineProperty(vK,"__esModule",{value:!0});var XR=Ur(),f9e=vn(),eMt={message:function(param){var e=param.params;return(0,XR.str)(_templateObject260(),e.ifClause)},params:function(param){var e=param.params;return(0,XR._)(_templateObject261(),e.ifClause)}},tMt={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:eMt,code:function code(e){var t=e.gen,r=e.parentSchema,n=e.it;r.then===void 0&&r.else===void 0&&(0,f9e.checkStrictMode)(n,'"if" without "then" and "else" is ignored');var i=p9e(n,"then"),o=p9e(n,"else");if(!i&&!o)return;var a=t.let("valid",!0),s=t.name("_valid");if(l(),e.reset(),i&&o){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,XR.not)(s),c("else"));e.pass(a,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(a,s),e.mergeValidEvaluated(p,a),u?t.assign(u,(0,XR._)(_templateObject262(),d)):e.setParams({ifClause:d})}}}};vK.default=tMt});var h9e=Be(function(_K){"use strict";Object.defineProperty(_K,"__esModule",{value:!0});var rMt=vn(),nMt={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,rMt.checkStrictMode)(r,'"'.concat(e,'" without "if" is ignored'))}};_K.default=nMt});var g9e=Be(function(bK){"use strict";var _Mt=function _Mt(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;var t=[mMt.default,hMt.default,gMt.default,xMt.default,yMt.default,vMt.default,cMt.default,dMt.default,uMt.default,pMt.default,fMt.default];return e?t.push(oMt.default,sMt.default):t.push(iMt.default,aMt.default),t.push(lMt.default),t};Object.defineProperty(bK,"__esModule",{value:!0});var iMt=nK(),oMt=GIe(),aMt=iK(),sMt=ZIe(),lMt=KIe(),uMt=YIe(),cMt=e9e(),dMt=dK(),pMt=n9e(),fMt=s9e(),mMt=l9e(),hMt=u9e(),gMt=c9e(),xMt=d9e(),yMt=m9e(),vMt=h9e();bK.default=_Mt});var x9e=Be(function(wK){"use strict";Object.defineProperty(wK,"__esModule",{value:!0});var wo=Ur(),bMt={message:function(param){var e=param.schemaCode;return(0,wo.str)(_templateObject263(),e)},params:function(param){var e=param.schemaCode;return(0,wo._)(_templateObject264(),e)}},wMt={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:bMt,code:function code(e,t){var r=e.gen,n=e.data,i=e.$data,o=e.schema,a=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,wo._)(_templateObject265(),h,a)),x=r.let("fType"),v=r.let("format");r.if((0,wo._)(_templateObject266(),g,g),function(){return r.assign(x,(0,wo._)(_templateObject267(),g)).assign(v,(0,wo._)(_templateObject268(),g))},function(){return r.assign(x,(0,wo._)(_templateObject269())).assign(v,g)}),e.fail$data((0,wo.or)(y(),_()));function y(){return l.strictSchema===!1?wo.nil:(0,wo._)(_templateObject270(),a,v)}function _(){var b=d.$async?(0,wo._)(_templateObject271(),g,v,n,v,n):(0,wo._)(_templateObject272(),v,n),w=(0,wo._)(_templateObject273(),v,b,v,n);return(0,wo._)(_templateObject274(),v,v,x,t,w)}}function m(){var h=u.formats[o];if(!h){y();return}if(h===!0)return;var _$_=_sliced_to_array(_(h),3),g=_$_[0],x=_$_[1],v=_$_[2];g===t&&e.pass(b());function y(){if(l.strictSchema===!1){u.logger.warn(w());return}throw new Error(w());function w(){return'unknown format "'.concat(o,'" ignored in schema at path "').concat(c,'"')}}function _(w){var S=_instanceof(w,RegExp)?(0,wo.regexpCode)(w):l.code.formats?(0,wo._)(_templateObject275(),l.code.formats,(0,wo.getProperty)(o)):void 0,k=r.scopeValue("formats",{key:o,ref:w,code:S});return(typeof w==="undefined"?"undefined":_type_of(w))=="object"&&!_instanceof(w,RegExp)?[w.type||"string",w.validate,(0,wo._)(_templateObject276(),k)]:["string",w,k]}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,wo._)(_templateObject277(),v,n)}return typeof x=="function"?(0,wo._)(_templateObject278(),v,n):(0,wo._)(_templateObject279(),v,n)}}}};wK.default=wMt});var y9e=Be(function(SK){"use strict";Object.defineProperty(SK,"__esModule",{value:!0});var SMt=x9e(),kMt=[SMt.default];SK.default=kMt});var v9e=Be(function(q_){"use strict";Object.defineProperty(q_,"__esModule",{value:!0});q_.contentVocabulary=q_.metadataVocabulary=void 0;q_.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];q_.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var b9e=Be(function(kK){"use strict";Object.defineProperty(kK,"__esModule",{value:!0});var CMt=AIe(),EMt=BIe(),TMt=g9e(),AMt=y9e(),_9e=v9e(),IMt=[CMt.default,EMt.default,(0,TMt.default)(),AMt.default,_9e.metadataVocabulary,_9e.contentVocabulary];kK.default=IMt});var S9e=Be(function(eM){"use strict";Object.defineProperty(eM,"__esModule",{value:!0});eM.DiscrError=void 0;var w9e;(function(e){e.Tag="tag",e.Mapping="mapping"})(w9e||(eM.DiscrError=w9e={}))});var C9e=Be(function(EK){"use strict";Object.defineProperty(EK,"__esModule",{value:!0});var W_=Ur(),CK=S9e(),k9e=LR(),PMt=sk(),RMt=vn(),MMt={message:function(param){var _param_params=param.params,e=_param_params.discrError,t=_param_params.tagName;return e===CK.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,W_._)(_templateObject280(),e,r,t)}},OMt={keyword:"discriminator",type:"object",schemaType:"object",error:MMt,code:function code(e){var t=e.gen,r=e.data,n=e.schema,i=e.parentSchema,o=e.it,a=i.oneOf;if(!o.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(!a)throw new Error("discriminator: requires oneOf keyword");var l=t.let("valid",!1),c=t.const("tag",(0,W_._)(_templateObject281(),r,(0,W_.getProperty)(s)));t.if((0,W_._)(_templateObject282(),c),function(){return d()},function(){return e.error(!1,{discrError:CK.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,W_._)(_templateObject283(),c,h)),t.assign(l,u(m[h]));t.else(),e.error(!1,{discrError:CK.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,W_.Name),h}function p(){var m;var h={},g=v(i),x=!0;for(var b=0;b=1&&n<=12&&i>=1&&i<=(n===2&&BMt(r)?29:WMt[n])};var MK=function MK(e,t){if(e&&t)return e>t?1:e23||d>59||e&&!s)return!1;if(i<=23&&o<=59&&a<60)return!0;var u=o-d*l,p=i-c*l-(u<0?1:0);return(p===23||p===-1)&&(u===59||u===-1)&&a<61}};var OK=function OK(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 M9e=function M9e(e,t){if(!(e&&t))return;var r=IK.exec(e),n=IK.exec(t);if(r&&n)return e=r[1]+r[2]+r[3],t=n[1]+n[2]+n[3],e>t?1:e=KMt};var YMt=function YMt(e){return Number.isInteger(e)};var P9e=function P9e(){return!0};var eOt=function eOt(e){if(XMt.test(e))return!1;try{return new RegExp(e),!0}catch(t){return!1}};Object.defineProperty(Ip,"__esModule",{value:!0});Ip.formatNames=Ip.fastFormats=Ip.fullFormats=void 0;Ip.fullFormats={date:Ap(R9e,MK),time:Ap(PK(!0),OK),"date-time":Ap(A9e(!0),O9e),"iso-time":Ap(PK(),M9e),"iso-date-time":Ap(A9e(),$9e),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:HMt,"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:eOt,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:ZMt,int32:{type:"number",validate:JMt},int64:{type:"number",validate:YMt},float:{type:"number",validate:P9e},double:{type:"number",validate:P9e},password:!0,binary:!0};Ip.fastFormats=_object_spread_props(_object_spread({},Ip.fullFormats),{date:Ap(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,MK),time:Ap(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,OK),"date-time":Ap(/^\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,O9e),"iso-time":Ap(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,M9e),"iso-date-time":Ap(/^\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,$9e),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});Ip.formatNames=Object.keys(Ip.fullFormats);var qMt=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,WMt=[0,31,28,31,30,31,30,31,31,30,31,30,31];var IK=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;var RK=/t|\s/i;var VMt=/\/|:/,GMt=/^(?:[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 I9e=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;var KMt=-Math.pow(2,31),QMt=Math.pow(2,31)-1;var XMt=/[^\\]\\Z/});var D9e=Be(function(H_){"use strict";Object.defineProperty(H_,"__esModule",{value:!0});H_.formatLimitDefinition=void 0;var tOt=AK(),dd=Ur(),ag=dd.operators,rM={formatMaximum:{okStr:"<=",ok:ag.LTE,fail:ag.GT},formatMinimum:{okStr:">=",ok:ag.GTE,fail:ag.LT},formatExclusiveMaximum:{okStr:"<",ok:ag.LT,fail:ag.GTE},formatExclusiveMinimum:{okStr:">",ok:ag.GT,fail:ag.LTE}},rOt={message:function(param){var e=param.keyword,t=param.schemaCode;return(0,dd.str)(_templateObject284(),rM[e].okStr,t)},params:function(param){var e=param.keyword,t=param.schemaCode;return(0,dd._)(_templateObject285(),rM[e].okStr,t)}};H_.formatLimitDefinition={keyword:Object.keys(rM),type:"string",schemaType:"string",$data:!0,error:rOt,code:function code(e){var t=e.gen,r=e.data,n=e.schemaCode,i=e.keyword,o=e.it,a=o.opts,s=o.self;if(!a.validateFormats)return;var l=new tOt.KeywordCxt(o,s.RULES.all.format.definition,"format");l.$data?c():d();function c(){var p=t.scopeValue("formats",{ref:s.formats,code:a.code.formats}),m=t.const("fmt",(0,dd._)(_templateObject286(),p,l.schemaCode));e.fail$data((0,dd.or)((0,dd._)(_templateObject287(),m),(0,dd._)(_templateObject288(),m),(0,dd._)(_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:a.code.formats?(0,dd._)(_templateObject290(),a.code.formats,(0,dd.getProperty)(p)):void 0});e.fail$data(u(h))}function u(p){return(0,dd._)(_templateObject291(),p,r,n,rM[i].fail)}},dependencies:["format"]};var nOt=function(e){return e.addKeyword(H_.formatLimitDefinition),e};H_.default=nOt});var j9e=Be(function(bk,z9e){"use strict";var F9e=function F9e(e,t,r,n){var i,o;(i=(o=e.opts.code).formats)!==null&&i!==void 0||(o.formats=(0,$K._)(_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 a=_step.value;e.addFormat(a,r[a])}}catch(err){_didIteratorError=true;_iteratorError=err}finally{try{if(!_iteratorNormalCompletion&&_iterator.return!=null){_iterator.return()}}finally{if(_didIteratorError){throw _iteratorError}}}};Object.defineProperty(bk,"__esModule",{value:!0});var Z_=N9e(),iOt=D9e(),$K=Ur(),L9e=new $K.Name("fullFormats"),oOt=new $K.Name("fastFormats"),NK=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{keywords:!0};if(Array.isArray(t))return F9e(e,t,Z_.fullFormats,L9e),e;var _ref=_sliced_to_array(t.mode==="fast"?[Z_.fastFormats,oOt]:[Z_.fullFormats,L9e],2),r=_ref[0],n=_ref[1],i=t.formats||Z_.formatNames;return F9e(e,i,r,n),t.keywords&&(0,iOt.default)(e),e};NK.get=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"full";var n=(t==="fast"?Z_.fastFormats:Z_.fullFormats)[e];if(!n)throw new Error('Unknown format "'.concat(e,'"'));return n};z9e.exports=bk=NK;Object.defineProperty(bk,"__esModule",{value:!0});bk.default=NK});var Z9e=Be(function(DK){"use strict";var dOt=function dOt(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||!H9e.test(r))throw new TypeError("invalid type");var n=r;if(t&&(typeof t==="undefined"?"undefined":_type_of(t))=="object")for(var i,o=Object.keys(t).sort(),a=0;a0&&!lOt.test(t))throw new TypeError("invalid parameter value");return'"'+t.replace(cOt,"\\$1")+'"'};var hOt=function hOt(e){this.parameters=Object.create(null),this.type=e};var V9e=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g,lOt=/^[\u000b\u0020-\u007e\u0080-\u00ff]+$/,G9e=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/,uOt=/\\([\u000b\u0020-\u00ff])/g,cOt=/([\\"])/g,H9e=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;DK.format=dOt;DK.parse=pOt});var e$t={};$l(e$t,{default:function(){return mM}});module.exports=NPe(e$t);var ADr=nr(eQ(),1);var X_=typeof window=="undefined"?globalThis:window,tQ,B1=(tQ=X_.process)!=null?tQ:{cwd:function cwd(){return"/"},env:{}};typeof B1.cwd!="function"&&(B1.cwd=function(){return"/"});(!B1.env||_type_of(B1.env)!="object")&&(B1.env={});X_.process=B1;if(typeof X_.queueMicrotask!="function"){var e=Promise.resolve();X_.queueMicrotask=function(t){if(typeof t!="function")throw new TypeError("queueMicrotask callback must be a function");e.then(t).catch(function(r){var n=_instanceof(r,Error)?r:new Error(String(r));X_.setTimeout(function(){throw n},0)})}}var IJ=nr(oQ(),1),PJ=require("obsidian");var LPe={2:function(e){function t(i,o,a){_instanceof(i,RegExp)&&(i=r(i,a)),_instanceof(o,RegExp)&&(o=r(o,a));var s=n(i,o,a);return s&&{start:s[0],end:s[1],pre:a.slice(0,s[0]),body:a.slice(s[0]+i.length,s[1]),post:a.slice(s[1]+o.length)}}function r(i,o){var a=o.match(i);return a?a[0]:null}function n(i,o,a){var s,l,c,d,u,p=a.indexOf(i),m=a.indexOf(o,p+1),h=p;if(p>=0&&m>0){for(s=[],c=a.length;h>=0&&!u;)h==p?(s.push(h),p=a.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(){var i=(e&&e.exports,(typeof global==="undefined"?"undefined":_type_of(global))=="object"&&global);i.global!==i&&i.window;var o=function o(d){this.message=d};(o.prototype=new Error).name="InvalidCharacterError";var a=function a(d){throw new o(d)},s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",l=/[\t\n\f\r ]/g,c={encode:function encode(d){d=String(d),/[^\0-\xFF]/.test(d)&&a("The string to be encoded contains characters outside of the Latin1 range.");for(var u,p,m,h,g=d.length%3,x="",v=-1,y=d.length-g;++v>18&63)+s.charAt(h>>12&63)+s.charAt(h>>6&63)+s.charAt(63&h);return g==2?(u=d.charCodeAt(v)<<8,p=d.charCodeAt(++v),x+=s.charAt((h=u+p)>>10)+s.charAt(h>>4&63)+s.charAt(h<<2&63)+"="):g==1&&(h=d.charCodeAt(v),x+=s.charAt(h>>2)+s.charAt(h<<4&63)+"=="),x},decode:function decode(d){var u=(d=String(d).replace(l,"")).length;u%4==0&&(u=(d=d.replace(/==?$/,"")).length),(u%4==1||/[^+a-zA-Z0-9/]/.test(d))&&a("Invalid character: the string to be decoded is not correctly encoded.");for(var p,m,h=0,g="",x=-1;++x>(-2*h&6)));return g},version:"1.0.0"};(n=(function(){return c}).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 o=r.charCodeAt(i);56320<=o&&o<=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=[],o=0,a=0;o>>5]|=n[o]<<24-a%32;return i},wordsToBytes:function wordsToBytes(n){for(var i=[],o=0;o<32*n.length;o+=8)i.push(n[o>>>5]>>>24-o%32&255);return i},bytesToHex:function bytesToHex(n){for(var i=[],o=0;o>>4).toString(16)),i.push((15&n[o]).toString(16));return i.join("")},hexToBytes:function hexToBytes(n){for(var i=[],o=0;o>>6*(3-s)&63)):i.push("=");return i.join("")},base64ToBytes:function base64ToBytes(n){n=n.replace(/[^A-Z0-9+\/]/gi,"");for(var i=[],o=0,a=0;o>>6-2*a);return i}},e.exports=r},135:function(e){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,o=r(135),a=r(526).bin,s=function s10(l,c){l.constructor==String?l=c&&c.encoding==="binary"?a.stringToBytes(l):i.stringToBytes(l):o(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 v=s._ff,y=s._gg,_=s._hh,b=s._ii;for(x=0;x>>0,m=m+S>>>0,h=h+k>>>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?a.bytesToString(d):n.bytesToHex(d)}})()},285:function(e,t,r){var n=r(2);e.exports=function(v,y){if(!v)return[];var _=(y=y||{}).max==null?1/0:y.max;return v.substr(0,2)==="{}"&&(v="\\{\\}"+v.substr(2)),x(function(b){return b.split("\\\\").join(i).split("\\{").join(o).split("\\}").join(a).split("\\,").join(s).split("\\.").join(l)}(v),_,!0).map(d)};var i="\0SLASH"+Math.random()+"\0",o="\0OPEN"+Math.random()+"\0",a="\0CLOSE"+Math.random()+"\0",s="\0COMMA"+Math.random()+"\0",l="\0PERIOD"+Math.random()+"\0";function c(v){return parseInt(v,10)==v?parseInt(v,10):v.charCodeAt(0)}function d(v){return v.split(i).join("\\").split(o).join("{").split(a).join("}").split(s).join(",").split(l).join(".")}function u(v){if(!v)return[""];var y=[],_=n("{","}",v);if(!_)return v.split(",");var b=_.pre,w=_.body,S=_.post,k=b.split(",");k[k.length-1]+="{"+w+"}";var E=u(S);return S.length&&(k[k.length-1]+=E.shift(),k.push.apply(k,E)),y.push.apply(y,k),y}function p(v){return"{"+v+"}"}function m(v){return/^-?0\d/.test(v)}function h(v,y){return v<=y}function g(v,y){return v>=y}function x(v,y,_){var b=[],w=n("{","}",v);if(!w)return[v];var S=w.pre,k=w.post.length?x(w.post,y,!1):[""];if(/\$$/.test(w.pre))for(var E=0;E=0;if(!R&&!$)return w.post.match(/,(?!,).*\}/)?x(v=w.pre+"{"+w.body+a+w.post,y,!0):[v];if(R)T=w.body.split(/\.\./);else if((T=u(w.body)).length===1&&(T=x(T[0],y,!1).map(p)).length===1)return k.map(function(ie){return w.pre+T[0]+ie});if(R){var z=c(T[0]),D=c(T[1]),L=Math.max(T[0].length,T[1].length),ee=T.length==3?Math.max(Math.abs(c(T[2])),1):1,pe=h;D0){var me=new Array(K+1).join("0");G=U<0?"-"+me+G.slice(1):me+G}}I.push(G)}}else{I=[];for(var V=0;V2&&arguments[2]!==void 0?arguments[2]:function u(){},p=d.split("."),m=p.length,h=function h(v){var y=p[v];if(!c)return{v:void 0};if(y==="+"){if(Array.isArray(c))return{v:c.map(function(b,w){var S=p.slice(v+1);return S.length>0?s(b,S.join("."),u):u(c,w,p,v)})};var _=p.slice(0,v).join(".");throw new Error("Object at wildcard (".concat(_,") is not an array"))}c=u(c,y,p,v)},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,v,y){return m=m||g===u||!!g&&g[x]===u,h=l(v,y)&&t(g)==="object"&&x in g,g&&g[x]}),p.validPath?m&&h:m}catch(g){return!1}},ObjectPrototypeMutationError:a}},47:function(e,t,r){var n=r(410),i=function i(c){return typeof c=="string"};function o(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=o(c.split("/"),!d).join("/"))||"."},s.normalize=function(c){var d=s.isAbsolute(c),u=c.substr(-1)==="/";return(c=o(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&&y[b]==="";b--);return _>b?[]:y.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;x=2&&(b=b.slice(2)):g(S)?b=w[4]:S?k&&(b=b.slice(2)):C>=2&&g(_.protocol)&&(b=w[4]),{protocol:S,slashes:k||g(S),slashesCount:C,rest:b}}function v(y,_,b){if(y=(y=u(y)).replace(a,""),!_instanceof(this,v))return new v(y,_,b);var w,S,k,E,C,T,I=p.slice(),O=typeof _==="undefined"?"undefined":_type_of(_),M=this,R=0;for(O!=="object"&&O!=="string"&&(b=_,_=null),b&&typeof b!="function"&&(b=i.parse),w=!(S=x(y||"",_=h(_))).protocol&&!S.slashes,M.slashes=S.slashes||w&&_.slashes,M.protocol=S.protocol||_.protocol||"",y=S.rest,(S.protocol==="file:"&&(S.slashesCount!==2||d.test(y))||!S.slashes&&(S.protocol||S.slashesCount<2||!g(M.protocol)))&&(I[3]=[/(.*)/,"pathname"]);R1){var o=n.shift();n[0]=o+n[0]}n[0].match(/^file:\/\/\//)?n[0]=n[0].replace(/^([^/:]+):\/*/,"$1:///"):n[0]=n[0].replace(/^([^/:]+):\/*/,"$1://");for(var a=0;a0&&(s=s.replace(/^[\/]+/,"")),s=a0?"?":"")+c.join("&")}(_type_of(arguments[0])=="object"?arguments[0]:[].slice.call(arguments))}(t.reduce(function(n,i,o){return(o===0||i!=="/"||i==="/"&&n[n.length-1]!=="/")&&n.push(i),n},[]))}var BPe=wi(542),eb=wi.n(BPe);function cQ(e,t){var r=e.url.replace("//",""),n=r.indexOf("/")==-1?"/":r.slice(r.indexOf("/")),i=e.method?e.method.toUpperCase():"GET",o=!!/(^|,)\s*auth\s*($|,)/.test(t.qop)&&"auth",a="00000000".concat(t.nc).slice(-8),s=function(p,m,h,g,x,v,y){var _=y||eb()("".concat(m,":").concat(h,":").concat(g));return p&&p.toLowerCase()==="md5-sess"?eb()("".concat(_,":").concat(x,":").concat(v)):_}(t.algorithm,t.username,t.realm,t.password,t.nonce,t.cnonce,t.ha1),l=eb()("".concat(i,":").concat(n)),c=o?eb()("".concat(s,":").concat(t.nonce,":").concat(a,":").concat(t.cnonce,":").concat(o,":").concat(l)):eb()("".concat(s,":").concat(t.nonce,":").concat(l)),d={username:t.username,realm:t.realm,nonce:t.nonce,uri:n,qop:o,response:c,nc:a,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 NQ(e){return(e.headers&&e.headers.get("www-authenticate")||"").split(/\s/)[0].toLowerCase()==="digest"}var qPe=wi(101),DQ=wi.n(qPe);function dQ(e){return DQ().decode(e)}function pQ(e,t){var r;return"Basic ".concat((r="".concat(e,":").concat(t),DQ().encode(r)))}var sb=typeof WorkerGlobalScope!="undefined"&&_instanceof(self,WorkerGlobalScope)?self:typeof window!="undefined"?window:globalThis,WPe=sb.fetch.bind(sb),o$t=(sb.Headers,sb.Request),a$t=sb.Response,Vs=function(e){return e.Auto="auto",e.Digest="digest",e.None="none",e.Password="password",e.Token="token",e}({}),om=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 LQ(e,t,r,n,i){switch(e.authType){case Vs.Auto:t&&r&&(e.headers.Authorization=pQ(t,r));break;case Vs.Digest:e.digest=function(a,s,l){return{username:a,password:s,ha1:l,nc:0,algorithm:"md5",hasDigestAuth:!1}}(t,r,i);break;case Vs.None:break;case Vs.Password:e.headers.Authorization=pQ(t,r);break;case Vs.Token:e.headers.Authorization="".concat((o=n).token_type," ").concat(o.access_token);break;default:throw new Aa({info:{code:om.InvalidAuthType}},"Invalid auth type: ".concat(e.authType))}var o}wi(345),wi(800);var fQ="@@HOTPATCHER",VPe=function(){};function _M(e){return{original:e,methods:[e],final:!1}}var MM=/*#__PURE__*/function(){"use strict";function MM1(){_class_call_check(this,MM1);this._configuration={registry:{},getEmptyAction:"null"},this.__type__=fQ}_create_class(MM1,[{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__!==fQ)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)||VPe;for(var n=arguments.length,i=new Array(n>1?n-1:0),o=1;o0;)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]=_M(r);else if(this.isPatched(t)){var _this_configuration_registry_t=this.configuration.registry[t],o=_this_configuration_registry_t.original;this.configuration.registry[t]=Object.assign(_M(r),{original:o})}else this.configuration.registry[t]=_M(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),o=2;o1?r-1:0),i=1;i0;){var o=i.shift();n=n?FQ(n,o):e7(o)}return n}function FQ(e,t){var r=e7(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]?FQ(r[n],t[n]):e7(t[n]):r[n]=t[n]:r[n]=t[n]}),r}function GPe(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 OM(){for(var e=arguments.length,t=new Array(e),r=0;r65536)throw new TypeError("pattern is too long")},JPe={"[: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]},tb=function(e){return e.replace(/[[\]\\-]/g,"\\$&")},hQ=function(e){return e.join("")},YPe=function(e,t){var r=t;if(e.charAt(r)!=="[")throw new Error("not in a brace expression");var n=[],i=[],o=r+1,a=!1,s=!1,l=!1,c=!1,d=r,u="";e:for(;ou?n.push(tb(u)+"-"+tb(g)):g===u&&n.push(tb(g)),u="",o++):e.startsWith("-]",o+1)?(n.push(tb(g+"-")),o+=2):e.startsWith("-",o+1)?(u=g,o+=2):(n.push(tb(g)),o++)}else l=!0,o++}else c=!0,o++}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")},Ws,XPe=new Set(["!","?","+","*","@"]),NM=function(e){return XPe.has(e)},gQ=function(e){return NM(e.type)},eRe=new Map([["!",["@"]],["?",["?","@"]],["@",["@"]],["*",["*","+","?","@"]],["+",["+","@"]]]),tRe=new Map([["!",["?"]],["@",["?"]],["+",["?","*"]]]),rRe=new Map([["!",["?","@"]],["?",["?","@"]],["@",["?","@"]],["*",["*","+","?","@"]],["+",["+","@","?","*"]]]),xQ=new Map([["!",new Map([["!","@"]])],["?",new Map([["*","*"],["+","*"]])],["@",new Map([["!","!"],["?","?"],["@","@"],["*","*"],["+","+"]])],["+",new Map([["?","*"],["*","*"]])]]),wM="(?!\\.)",nRe=new Set(["[","."]),iRe=new Set(["..","."]),oRe=new Set("().*{}+?[]^$\\!"),JM="[^/]",yQ=JM+"*?",vQ=JM+"+?",Vo,pa,Op,Ir,Qi,rm,mg,nm,xd,yd,Z1,a7,BQ,K1,Qk,s7,qQ,ub,DM,Q1,Jk,l7,WQ,cb,LM,u7,VQ,c7,GQ,d7,HQ,J1,Yk,db,FM,p7,ZQ,fg=/*#__PURE__*/function(){"use strict";function fg1(t,r){_class_call_check(this,fg1);Ht(this,a7);Ht(this,s7);Ht(this,ub);Ht(this,Q1);Ht(this,l7);Ht(this,cb);Ht(this,u7);Ht(this,c7);Ht(this,d7);Ht(this,J1);Ht(this,db);A(this,"type");Ht(this,Vo,void 0);Ht(this,pa,void 0);Ht(this,Op,!1);Ht(this,Ir,[]);Ht(this,Qi,void 0);Ht(this,rm,void 0);Ht(this,mg,void 0);Ht(this,nm,!1);Ht(this,xd,void 0);Ht(this,yd,void 0);Ht(this,Z1,!1);var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.type=t,t&&Zt(this,pa,!0),Zt(this,Qi,r),Zt(this,Vo,fe(this,Qi)?fe(fe(this,Qi),Vo):this),Zt(this,xd,fe(this,Vo)===this?n:fe(fe(this,Vo),xd)),Zt(this,mg,fe(this,Vo)===this?[]:fe(fe(this,Vo),mg)),t!=="!"||fe(fe(this,Vo),nm)||fe(this,mg).push(this),Zt(this,rm,fe(this,Qi)?fe(fe(this,Qi),Ir).length:0)}_create_class(fg1,[{key:"hasMagic",get:function get1(){if(fe(this,pa)!==void 0)return fe(this,pa);var _iteratorNormalCompletion=true,_didIteratorError=false,_iteratorError=undefined;try{for(var _iterator=fe(this,Ir)[Symbol.iterator](),_step;!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=true){var t=_step.value;if(typeof t!="string"&&(t.type||t.hasMagic))return Zt(this,pa,!0)}}catch(err){_didIteratorError=true;_iteratorError=err}finally{try{if(!_iteratorNormalCompletion&&_iterator.return!=null){_iterator.return()}}finally{if(_didIteratorError){throw _iteratorError}}}return fe(this,pa)}},{key:"toString",value:function toString(){return fe(this,yd)!==void 0?fe(this,yd):this.type?Zt(this,yd,this.type+"("+fe(this,Ir).map(function(t){return String(t)}).join("|")+")"):Zt(this,yd,fe(this,Ir).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 Ws(null,void 0,r);return Nt(i=Ws,K1,Qk).call(i,t,n,0,r,0),n}}]);return fg1}();Vo=new WeakMap,pa=new WeakMap,Op=new WeakMap,Ir=new WeakMap,Qi=new WeakMap,rm=new WeakMap,mg=new WeakMap,nm=new WeakMap,xd=new WeakMap,yd=new WeakMap,Z1=new WeakMap,a7=new WeakSet,BQ=function BQ1(){if(this!==fe(this,Vo))throw new Error("should only call on root");if(fe(this,nm))return this;var t;for(this.toString(),Zt(this,nm,!0);t=fe(this,mg).pop();){if(t.type!=="!")continue;var r=t,n=fe(r,Qi);for(;n;){var _iteratorNormalCompletion=true,_didIteratorError=false,_iteratorError=undefined;for(var i=fe(r,rm)+1;!n.type&&i1&&arguments[1]!==void 0?arguments[1]:eRe;if(!t||(typeof t==="undefined"?"undefined":_type_of(t))!="object"||t.type!==null||fe(t,Ir).length!==1||this.type===null)return!1;var n=fe(t,Ir)[0];return!(!n||(typeof n==="undefined"?"undefined":_type_of(n))!="object"||n.type===null)&&Nt(this,Q1,Jk).call(this,n.type,r)},Q1=new WeakSet,Jk=function Jk1(t){var n;return!!((n=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:rRe).get(this.type))!=null&&n.includes(t))},l7=new WeakSet,WQ=function WQ1(t,r){var n=fe(t,Ir)[0],i=new Ws(null,n,this.options);fe(i,Ir).push(""),n.push(i),Nt(this,cb,LM).call(this,t,r)},cb=new WeakSet,LM=function LM1(t,r){var _fe1;var n=fe(t,Ir)[0];(_fe1=fe(this,Ir)).splice.apply(_fe1,[r,1].concat(_to_consumable_array(fe(n,Ir))));var _iteratorNormalCompletion=true,_didIteratorError=false,_iteratorError=undefined;try{for(var _iterator=fe(n,Ir)[Symbol.iterator](),_step;!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=true){var i=_step.value;(typeof i==="undefined"?"undefined":_type_of(i))=="object"&&Zt(i,Qi,this)}}catch(err){_didIteratorError=true;_iteratorError=err}finally{try{if(!_iteratorNormalCompletion&&_iterator.return!=null){_iterator.return()}}finally{if(_didIteratorError){throw _iteratorError}}}Zt(this,yd,void 0)},u7=new WeakSet,VQ=function VQ1(t){var r=xQ.get(this.type);return!!(r!=null&&r.has(t))},c7=new WeakSet,GQ=function GQ1(t){if(!t||(typeof t==="undefined"?"undefined":_type_of(t))!="object"||t.type!==null||fe(t,Ir).length!==1||this.type===null||fe(this,Ir).length!==1)return!1;var r=fe(t,Ir)[0];return!(!r||(typeof r==="undefined"?"undefined":_type_of(r))!="object"||r.type===null)&&Nt(this,u7,VQ).call(this,r.type)},d7=new WeakSet,HQ=function HQ1(t){var r=xQ.get(this.type),n=fe(t,Ir)[0],i=r==null?void 0:r.get(n.type);if(!i)return!1;Zt(this,Ir,fe(n,Ir));var _iteratorNormalCompletion=true,_didIteratorError=false,_iteratorError=undefined;try{for(var _iterator=fe(this,Ir)[Symbol.iterator](),_step;!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=true){var o=_step.value;(typeof o==="undefined"?"undefined":_type_of(o))=="object"&&Zt(o,Qi,this)}}catch(err){_didIteratorError=true;_iteratorError=err}finally{try{if(!_iteratorNormalCompletion&&_iterator.return!=null){_iterator.return()}}finally{if(_didIteratorError){throw _iteratorError}}}this.type=i,Zt(this,yd,void 0),Zt(this,Z1,!1)},J1=new WeakSet,Yk=function(){var t,r;var _iteratorNormalCompletion=true,_didIteratorError=false,_iteratorError=undefined;if(gQ(this)){var n=0,i=!1;do{i=!0;for(var o=0;o2&&arguments[2]!==void 0&&arguments[2],i=!1,o="",a=!1,s=!1;for(var l=0;l2&&arguments[2]!==void 0?arguments[2]:{};return r7(t),!(!r.nocomment&&t.charAt(0)==="#")&&new Y1(t,r).match(e)},aRe=/^\*+([^+@!?\*\[\(]*)$/,sRe=function(e){return function(t){return!t.startsWith(".")&&t.endsWith(e)}},lRe=function(e){return function(t){return t.endsWith(e)}},uRe=function(e){return e=e.toLowerCase(),function(t){return!t.startsWith(".")&&t.toLowerCase().endsWith(e)}},cRe=function(e){return e=e.toLowerCase(),function(t){return t.toLowerCase().endsWith(e)}},dRe=/^\*+\.\*+$/,pRe=function(e){return!e.startsWith(".")&&e.includes(".")},fRe=function(e){return e!=="."&&e!==".."&&e.includes(".")},mRe=/^\.\*+$/,hRe=function(e){return e!=="."&&e!==".."&&e.startsWith(".")},gRe=/^\*+$/,xRe=function(e){return e.length!==0&&!e.startsWith(".")},yRe=function(e){return e.length!==0&&e!=="."&&e!==".."},vRe=/^\?+([^+@!?\*\[\(]*)?$/,_Re=function(e){var _e1=_sliced_to_array(e,2),t=_e1[0],tmp=_e1[1],r=tmp===void 0?"":tmp,n=KQ([t]);return r?(r=r.toLowerCase(),function(i){return n(i)&&i.toLowerCase().endsWith(r)}):n},bRe=function(e){var _e1=_sliced_to_array(e,2),t=_e1[0],tmp=_e1[1],r=tmp===void 0?"":tmp,n=QQ([t]);return r?(r=r.toLowerCase(),function(i){return n(i)&&i.toLowerCase().endsWith(r)}):n},wRe=function(e){var _e1=_sliced_to_array(e,2),t=_e1[0],tmp=_e1[1],r=tmp===void 0?"":tmp,n=QQ([t]);return r?function(i){return n(i)&&i.endsWith(r)}:n},SRe=function(e){var _e1=_sliced_to_array(e,2),t=_e1[0],tmp=_e1[1],r=tmp===void 0?"":tmp,n=KQ([t]);return r?function(i){return n(i)&&i.endsWith(r)}:n},KQ=function(e){var _e1=_sliced_to_array(e,1),t=_e1[0],r=t.length;return function(n){return n.length===r&&!n.startsWith(".")}},QQ=function(e){var _e1=_sliced_to_array(e,1),t=_e1[0],r=t.length;return function(n){return n.length===r&&n!=="."&&n!==".."}},JQ=(typeof process==="undefined"?"undefined":_type_of(process))=="object"&&process?_type_of(process.env)=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix";Za.sep=JQ==="win32"?"\\":"/";var Ha=Symbol("globstar **");Za.GLOBSTAR=Ha,Za.filter=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function(r){return Za(r,e,t)}};var bu=function bu1(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Object.assign({},e,t)};Za.defaults=function(e){if(!e||(typeof e==="undefined"?"undefined":_type_of(e))!="object"||!Object.keys(e).length)return Za;var t=Za;return Object.assign(function(r,n){return t(r,n,bu(e,arguments.length>2&&arguments[2]!==void 0?arguments[2]:{}))},{Minimatch:/*#__PURE__*/function(_t_Minimatch){"use strict";_inherits(Minimatch,_t_Minimatch);function Minimatch(r){_class_call_check(this,Minimatch);return _call_super(this,Minimatch,[r,bu(e,arguments.length>1&&arguments[1]!==void 0?arguments[1]:{})])}_create_class(Minimatch,null,[{key:"defaults",value:function defaults(r){return t.defaults(bu(e,r)).Minimatch}}]);return Minimatch}(t.Minimatch),AST:/*#__PURE__*/function(_t_AST){"use strict";_inherits(AST,_t_AST);function AST(r,n){_class_call_check(this,AST);return _call_super(this,AST,[r,n,bu(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,bu(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,bu(e,n))},escape:function escape1(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t.escape(r,bu(e,n))},filter:function filter(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t.filter(r,bu(e,n))},defaults:function(r){return t.defaults(bu(e,r))},makeRe:function makeRe(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t.makeRe(r,bu(e,n))},braceExpand:function braceExpand(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t.braceExpand(r,bu(e,n))},match:function match(r,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return t.match(r,n,bu(e,i))},sep:t.sep,GLOBSTAR:Ha})};var YQ=function YQ1(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return r7(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:QPe(e)};Za.braceExpand=YQ,Za.makeRe=function(e){return new Y1(e,arguments.length>1&&arguments[1]!==void 0?arguments[1]:{}).makeRe()},Za.match=function(e,t){var r=new Y1(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 _Q=/[?*]|[+@!]\(.*?\)|\[|\]/,f7,XQ,pb,zM,im,W1,Y1=/*#__PURE__*/function(){"use strict";function Y11(t){_class_call_check(this,Y11);Ht(this,f7);Ht(this,pb);Ht(this,im);A(this,"options");A(this,"set");A(this,"pattern");A(this,"windowsPathsNoEscape");A(this,"nonegate");A(this,"negate");A(this,"comment");A(this,"empty");A(this,"preserveMultipleSlashes");A(this,"partial");A(this,"globSet");A(this,"globParts");A(this,"nocase");A(this,"isWindows");A(this,"platform");A(this,"windowsNoMagicRoot");A(this,"maxGlobstarRecursion");A(this,"regexp");var n;var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};r7(t),r=r||{},this.options=r,this.maxGlobstarRecursion=(n=r.maxGlobstarRecursion)!=null?n:200,this.pattern=t,this.platform=r.platform||JQ,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(Y11,[{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(o){return _this.slashSplit(o)});this.globParts=this.preprocess(n),this.debug(this.pattern,this.globParts);var i=this.globParts.map(function(o,a,s){if(_this.isWindows&&_this.windowsNoMagicRoot){var l=!(o[0]!==""||o[1]!==""||o[2]!=="?"&&_Q.test(o[2])||_Q.test(o[3])),c=/^[a-z]:/i.test(o[0]);if(l)return _to_consumable_array(o.slice(0,4)).concat(_to_consumable_array(o.slice(4).map(function(d){return _this.parse(d)})));if(c)return[o[0]].concat(_to_consumable_array(o.slice(1).map(function(d){return _this.parse(d)})))}return o.map(function(l){return _this.parse(l)})});if(this.debug(this.pattern,i),this.set=i.filter(function(o){return o.indexOf(!1)===-1}),this.isWindows)for(var o=0;o=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 o=n[n.length-1];return i==="**"&&o==="**"?n:i===".."&&o&&o!==".."&&o!=="."&&o!=="**"?(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,a-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 a9=1;a92&&arguments[2]!==void 0&&arguments[2],i=0,o=0,a=[],s="";for(;i2&&arguments[2]!==void 0&&arguments[2],i=0,o=0;if(this.isWindows){var s=typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]),l=!s&&t[0]===""&&t[1]===""&&t[2]==="?"&&/^[a-z]:$/i.test(t[3]),c=typeof r[0]=="string"&&/^[a-z]:$/i.test(r[0]),d=l?3:s?0:void 0,u=!c&&r[0]===""&&r[1]===""&&r[2]==="?"&&typeof r[3]=="string"&&/^[a-z]:$/i.test(r[3])?3:c?0:void 0;if(typeof d=="number"&&typeof u=="number"){var _ref=[t[d],r[u]],p=_ref[0],m=_ref[1];p.toLowerCase()===m.toLowerCase()&&(r[u]=p,o=u,i=d)}}var _this_options=this.options,tmp=_this_options.optimizationLevel,a=tmp===void 0?1:tmp;return a>=2&&(t=this.levelTwoFileOptimize(t)),r.includes(Ha)?Nt(this,f7,XQ).call(this,t,r,n,i,o):Nt(this,im,W1).call(this,t,r,n,i,o)}},{key:"braceExpand",value:function braceExpand(){return YQ(this.pattern,this.options)}},{key:"parse",value:function parse(t){r7(t);var r=this.options;if(t==="**")return Ha;if(t==="")return"";var n,i=null;(n=t.match(gRe))?i=r.dot?yRe:xRe:(n=t.match(aRe))?i=(r.nocase?r.dot?cRe:uRe:r.dot?lRe:sRe)(n[1]):(n=t.match(vRe))?i=(r.nocase?r.dot?bRe:_Re:r.dot?wRe:SRe)(n):(n=t.match(dRe))?i=r.dot?fRe:pRe:(n=t.match(mRe))&&(i=hRe);var o=fg.fromGlob(t,this.options).toMMPattern();return i&&(typeof o==="undefined"?"undefined":_type_of(o))=="object"&&Reflect.defineProperty(o,"test",{value:i}),o}},{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"]:[]),o=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===Ha?Ha:d._src});return c.forEach(function(d,u){var p=c[u+1],m=c[u-1];d===Ha&&m!==Ha&&(m===void 0?p!==void 0&&p!==Ha?c[u+1]="(?:\\/|"+n+"\\/)?"+p:c[u]=n:p===void 0?c[u-1]=m+"(?:\\/|"+n+")?":p!==Ha&&(c[u-1]=m+"(?:\\/|\\/"+n+"\\/)"+p,c[u+1]=Ha))}),c.filter(function(d){return d!==Ha}).join("/")}).join("|"),_ref=_sliced_to_array(t.length>1?["(?:",")"]:["",""],2),a=_ref[0],s=_ref[1];o="^"+a+o+s+"$",this.negate&&(o="^(?!"+o+").+$");try{this.regexp=new RegExp(o,_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 o=this.set;this.debug(this.pattern,"set",o);var a=i[i.length-1];if(!a)for(var s=i.length-2;!a&&s>=0;s--)a=i[s];for(var s10=0;s10t.length)return!1;var y10=t.length-d.length;if(Nt(this,im,W1).call(this,t,d,n,y10,0))u=d.length;else{if(t[t.length-1]!==""||i+d.length===t.length||(y10--,!Nt(this,im,W1).call(this,t,d,n,y10,0)))return!1;u=d.length+1}}if(!c.length){var y11=!!u;for(var _=i;_1&&arguments[1]!==void 0?arguments[1]:"","Invalid response: ").concat(e.status," ").concat(e.statusText));return t.status=e.status,t.response=e,t}function Zo(e,t){var r=t.status;if(r===401&&e.digest)return t;if(r>=400)throw YM(t);return t}function X1(e,t){return arguments.length>2&&arguments[2]!==void 0&&arguments[2]?{data:t,headers:e.headers?GPe(e.headers):{},status:e.status,statusText:e.statusText}:t}Za.AST=fg,Za.Minimatch=Y1,Za.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,"\\$&")},Za.unescape=ib;var kRe=(bQ=function bQ1(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},i=Ho({url:ji(e.remoteURL,zi(t)),method:"COPY",headers:{Destination:ji(e.remoteURL,zi(r)),Overwrite:n.overwrite===!1?"F":"T",Depth:n.shallow?"0":"infinity"}},e,n);return a=function a(s){Zo(e,s)},(o=Go(i,e))&&o.then||(o=Promise.resolve(o)),a?o.then(a):o;var o,a},function kRe1(){for(var e=[],t=0;t0?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)),r!==void 0&&(this.child[this.child.length-1][jM]={startIndex:r})}}],[{key:"getMetaDataSymbol",value:function getMetaDataSymbol(){return jM}}]);return vd1}(),UM=/*#__PURE__*/function(){"use strict";function UM1(t){_class_call_check(this,UM1);this.suppressValidationErr=!t,this.options=t}_create_class(UM1,[{key:"readDocType",value:function readDocType(t,r){var n=Object.create(null),i=0;if(t[r+3]!=="O"||t[r+4]!=="C"||t[r+5]!=="T"||t[r+6]!=="Y"||t[r+7]!=="P"||t[r+8]!=="E")throw new Error("Invalid Tag instead of DOCTYPE");{r+=9;var o=1,a=!1,s=!1,l="";for(;r"){if(s?t[r-1]==="-"&&t[r-2]==="-"&&(s=!1,o--):o--,o===0)break}else t[r]==="["?a=!0:l+=t[r];else{if(a&&dg(t,"!ENTITY",r)){var c=void 0,d=void 0;var ref;if(r+=7,ref=_sliced_to_array(this.readEntityExp(t,r+1,this.suppressValidationErr),3),c=ref[0],d=ref[1],r=ref[2],ref,d.indexOf("&")===-1){if(this.options.enabled!==!1&&this.options.maxEntityCount!=null&&i>=this.options.maxEntityCount)throw new Error("Entity count (".concat(i+1,") exceeds maximum allowed (").concat(this.options.maxEntityCount,")"));n[c]=d,i++}}else if(a&&dg(t,"!ELEMENT",r)){r+=8;var _this_readElementExp=this.readElementExp(t,r+1),c10=_this_readElementExp.index;r=c10}else if(a&&dg(t,"!ATTLIST",r))r+=8;else if(a&&dg(t,"!NOTATION",r)){r+=9;var _this_readNotationExp=this.readNotationExp(t,r+1,this.suppressValidationErr),c11=_this_readNotationExp.index;r=c11}else{if(!dg(t,"!--",r))throw new Error("Invalid DOCTYPE");s=!0}o++,l=""}if(o!==0)throw new Error("Unclosed DOCTYPE")}return{entities:n,i:r}}},{key:"readEntityExp",value:function readEntityExp(t,r){var n=r=qs(t,r);for(;rthis.options.maxEntitySize)throw new Error('Entity "'.concat(i,'" size (').concat(o.length,") exceeds maximum allowed size (").concat(this.options.maxEntitySize,")"));return[i,o,--r]}},{key:"readNotationExp",value:function readNotationExp(t,r){var n=r=qs(t,r);for(;r0?t[t.length-1].tag:void 0}},{key:"getCurrentNamespace",value:function getCurrentNamespace(){var t=this._matcher.path;return t.length>0?t[t.length-1].namespace:void 0}},{key:"getAttrValue",value:function getAttrValue(t){var n;var r=this._matcher.path;if(r.length!==0)return(n=r[r.length-1].values)==null?void 0:n[t]}},{key:"hasAttr",value:function hasAttr(t){var r=this._matcher.path;if(r.length===0)return!1;var n=r[r.length-1];return n.values!==void 0&&t in n.values}},{key:"getPosition",value:function getPosition(){var r;var t=this._matcher.path;return t.length===0?-1:(r=t[t.length-1].position)!=null?r:0}},{key:"getCounter",value:function getCounter(){var r;var t=this._matcher.path;return t.length===0?-1:(r=t[t.length-1].counter)!=null?r:0}},{key:"getIndex",value:function getIndex(){return this.getPosition()}},{key:"getDepth",value:function getDepth(){return this._matcher.path.length}},{key:"toString",value:function toString(t){var r=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];return this._matcher.toString(t,r)}},{key:"toArray",value:function toArray(){return this._matcher.path.map(function(t){return t.tag})}},{key:"matches",value:function matches(t){return this._matcher.matches(t)}},{key:"matchesAny",value:function matchesAny(t){return t.matchesAny(this._matcher)}}]);return BM1}(),lb=/*#__PURE__*/function(){"use strict";function lb1(){_class_call_check(this,lb1);var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.separator=t.separator||".",this.path=[],this.siblingStacks=[],this._pathStringCache=null,this._view=new BM(this)}_create_class(lb1,[{key:"push",value:function push(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;this._pathStringCache=null,this.path.length>0&&(this.path[this.path.length-1].values=void 0);var i=this.path.length;this.siblingStacks[i]||(this.siblingStacks[i]=new Map);var o=this.siblingStacks[i],a=n?"".concat(n,":").concat(t):t,s=o.get(a)||0,l=0;var _iteratorNormalCompletion=true,_didIteratorError=false,_iteratorError=undefined;try{for(var _iterator=o.values()[Symbol.iterator](),_step;!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=true){var d=_step.value;l+=d}}catch(err){_didIteratorError=true;_iteratorError=err}finally{try{if(!_iteratorNormalCompletion&&_iterator.return!=null){_iterator.return()}}finally{if(_didIteratorError){throw _iteratorError}}}o.set(a,s+1);var c={tag:t,position:l,counter:s};n!=null&&(c.namespace=n),r!=null&&(c.values=r),this.path.push(c)}},{key:"pop",value:function pop(){if(this.path.length===0)return;this._pathStringCache=null;var t=this.path.pop();return this.siblingStacks.length>this.path.length+1&&(this.siblingStacks.length=this.path.length+1),t}},{key:"updateCurrent",value:function updateCurrent(t){if(this.path.length>0){var r=this.path[this.path.length-1];t!=null&&(r.values=t)}}},{key:"getCurrentTag",value:function getCurrentTag(){return this.path.length>0?this.path[this.path.length-1].tag:void 0}},{key:"getCurrentNamespace",value:function getCurrentNamespace(){return this.path.length>0?this.path[this.path.length-1].namespace:void 0}},{key:"getAttrValue",value:function getAttrValue(t){var r;if(this.path.length!==0)return(r=this.path[this.path.length-1].values)==null?void 0:r[t]}},{key:"hasAttr",value:function hasAttr(t){if(this.path.length===0)return!1;var r=this.path[this.path.length-1];return r.values!==void 0&&t in r.values}},{key:"getPosition",value:function getPosition(){var t;return this.path.length===0?-1:(t=this.path[this.path.length-1].position)!=null?t:0}},{key:"getCounter",value:function getCounter(){var t;return this.path.length===0?-1:(t=this.path[this.path.length-1].counter)!=null?t:0}},{key:"getIndex",value:function getIndex(){return this.getPosition()}},{key:"getDepth",value:function getDepth(){return this.path.length}},{key:"toString",value:function toString(t){var r=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],n=t||this.separator;if(n===this.separator&&r===!0){if(this._pathStringCache!==null)return this._pathStringCache;var i=this.path.map(function(o){return o.namespace?"".concat(o.namespace,":").concat(o.tag):o.tag}).join(n);return this._pathStringCache=i,i}return this.path.map(function(i){return r&&i.namespace?"".concat(i.namespace,":").concat(i.tag):i.tag}).join(n)}},{key:"toArray",value:function toArray(){return this.path.map(function(t){return t.tag})}},{key:"reset",value:function reset(){this._pathStringCache=null,this.path=[],this.siblingStacks=[]}},{key:"matches",value:function matches(t){var r=t.segments;return r.length!==0&&(t.hasDeepWildcard()?this._matchWithDeepWildcard(r):this._matchSimple(r))}},{key:"_matchSimple",value:function _matchSimple(t){if(this.path.length!==t.length)return!1;for(var r=0;r=0&&r>=0;){var i=t[n];if(i.type==="deep-wildcard"){if(n--,n<0)return!0;var o=t[n],a=!1;for(var s=r;s>=0;s--)if(this._matchSegment(o,this.path[s],s===this.path.length-1)){r=s-1,n--,a=!0;break}if(!a)return!1}else{if(!this._matchSegment(i,this.path[r],r===this.path.length-1))return!1;r--,n--}}return n<0}},{key:"_matchSegment",value:function _matchSegment(t,r,n){var i;if(t.tag!=="*"&&t.tag!==r.tag||t.namespace!==void 0&&t.namespace!=="*"&&t.namespace!==r.namespace||t.attrName!==void 0&&(!n||!r.values||!(t.attrName in r.values)||t.attrValue!==void 0&&String(r.values[t.attrName])!==String(t.attrValue)))return!1;if(t.position!==void 0){if(!n)return!1;var o=(i=r.counter)!=null?i:0;if(t.position==="first"&&o!==0||t.position==="odd"&&o%2!=1||t.position==="even"&&o%2!=0||t.position==="nth"&&o!==t.positionValue)return!1}return!0}},{key:"matchesAny",value:function matchesAny(t){return t.matchesAny(this)}},{key:"snapshot",value:function snapshot(){return{path:this.path.map(function(t){return _object_spread({},t)}),siblingStacks:this.siblingStacks.map(function(t){return new Map(t)})}}},{key:"restore",value:function restore(t){this._pathStringCache=null,this.path=t.path.map(function(r){return _object_spread({},r)}),this.siblingStacks=t.siblingStacks.map(function(r){return new Map(r)})}},{key:"readOnly",value:function readOnly(){return this._view}}]);return lb1}(),am=/*#__PURE__*/function(){"use strict";function am1(t){_class_call_check(this,am1);var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;this.pattern=t,this.separator=r.separator||".",this.segments=this._parse(t),this.data=n,this._hasDeepWildcard=this.segments.some(function(i){return i.type==="deep-wildcard"}),this._hasAttributeCondition=this.segments.some(function(i){return i.attrName!==void 0}),this._hasPositionSelector=this.segments.some(function(i){return i.position!==void 0})}_create_class(am1,[{key:"_parse",value:function _parse(t){var r=[],n=0,i="";for(;n",lt:"<",quot:'"'},$Re={nbsp:"\xa0",copy:"\xa9",reg:"\xae",trade:"™",mdash:"—",ndash:"–",hellip:"…",laquo:"\xab",raquo:"\xbb",lsquo:"‘",rsquo:"’",ldquo:"“",rdquo:"”",bull:"•",para:"\xb6",sect:"\xa7",deg:"\xb0",frac12:"\xbd",frac14:"\xbc",frac34:"\xbe"},NRe=new Set("!?\\\\/[]$%{}^&*()<>|+");function SQ(e){if(e[0]==="#")throw new Error("[EntityReplacer] Invalid character '#' in entity name: \"".concat(e,'"'));var _iteratorNormalCompletion=true,_didIteratorError=false,_iteratorError=undefined;try{for(var _iterator=e[Symbol.iterator](),_step;!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=true){var t=_step.value;if(NRe.has(t))throw new Error("[EntityReplacer] Invalid character '".concat(t,"' in entity name: \"").concat(e,'"'))}}catch(err){_didIteratorError=true;_iteratorError=err}finally{try{if(!_iteratorNormalCompletion&&_iterator.return!=null){_iterator.return()}}finally{if(_didIteratorError){throw _iteratorError}}}return e}function SM(){var e=Object.create(null);for(var t=arguments.length,r=new Array(t),n=0;n0&&arguments[0]!==void 0?arguments[0]:{};var r;this._limit=t.limit||{},this._maxTotalExpansions=this._limit.maxTotalExpansions||0,this._maxExpandedLength=this._limit.maxExpandedLength||0,this._postCheck=typeof t.postCheck=="function"?t.postCheck:function(a){return a},this._limitTiers=(r=(i=this._limit.applyLimitsTo)!=null?i:pg)&&r!==pg?r===kM?new Set([kM]):r===Zk?new Set([Zk]):Array.isArray(r)?new Set(r):new Set([pg]):new Set([pg]),this._numericAllowed=(o=t.numericAllowed)!=null?o:!0,this._baseMap=SM(iJ,t.namedEntities||null),this._externalMap=Object.create(null),this._inputMap=Object.create(null),this._totalExpansions=0,this._expandedLength=0,this._removeSet=new Set(t.remove&&Array.isArray(t.remove)?t.remove:[]),this._leaveSet=new Set(t.leave&&Array.isArray(t.leave)?t.leave:[]);var n=function(a){var d,u;if(!a)return{xmlVersion:1,onLevel:Nl.allow,nullLevel:Nl.remove};var s=a.xmlVersion===1.1?1.1:1,l=(d=Nl[a.onNCR])!=null?d:Nl.allow,c=(u=Nl[a.nullNCR])!=null?u:Nl.remove;return{xmlVersion:s,onLevel:l,nullLevel:Math.max(c,Nl.remove)}}(t.ncr);this._ncrXmlVersion=n.xmlVersion,this._ncrOnLevel=n.onLevel,this._ncrNullLevel=n.nullLevel}_create_class(n71,[{key:"setExternalEntities",value:function setExternalEntities(t){var _iteratorNormalCompletion=true,_didIteratorError=false,_iteratorError=undefined;if(t)try{for(var _iterator=Object.keys(t)[Symbol.iterator](),_step;!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=true){var r=_step.value;SQ(r)}}catch(err){_didIteratorError=true;_iteratorError=err}finally{try{if(!_iteratorNormalCompletion&&_iterator.return!=null){_iterator.return()}}finally{if(_didIteratorError){throw _iteratorError}}}this._externalMap=SM(t)}},{key:"addExternalEntity",value:function addExternalEntity(t,r){SQ(t),typeof r=="string"&&r.indexOf("&")===-1&&(this._externalMap[t]=r)}},{key:"addInputEntities",value:function addInputEntities(t){this._totalExpansions=0,this._expandedLength=0,this._inputMap=SM(t)}},{key:"reset",value:function reset(){return this._inputMap=Object.create(null),this._totalExpansions=0,this._expandedLength=0,this}},{key:"setXmlVersion",value:function setXmlVersion(t){this._ncrXmlVersion=t===1.1?1.1:1}},{key:"decode",value:function decode(t){if(typeof t!="string"||t.length===0)return t;var r=t,n=[],i=t.length,o=0,a=0,s=this._maxTotalExpansions>0,l=this._maxExpandedLength>0,c=s||l;for(;a=i||t.charCodeAt(u)!==59){a++;continue}var p=t.slice(a+1,u);if(p.length===0){a++;continue}var m=void 0,h=void 0;if(this._removeSet.has(p))m="",h===void 0&&(h=pg);else{if(this._leaveSet.has(p)){a++;continue}if(p.charCodeAt(0)===35){var g=this._resolveNCR(p);if(g===void 0){a++;continue}m=g,h=Zk}else{var g10=this._resolveName(p);m=g10==null?void 0:g10.value,h=g10==null?void 0:g10.tier}}if(m!==void 0){if(a>o&&n.push(t.slice(o,a)),n.push(m),o=u+1,a=o,c&&this._tierCounts(h)){if(s&&(this._totalExpansions++,this._totalExpansions>this._maxTotalExpansions))throw new Error("[EntityReplacer] Entity expansion count limit exceeded: ".concat(this._totalExpansions," > ").concat(this._maxTotalExpansions));if(l){var g11=m.length-(p.length+2);if(g11>0&&(this._expandedLength+=g11,this._expandedLength>this._maxExpandedLength))throw new Error("[EntityReplacer] Expanded content length limit exceeded: ".concat(this._expandedLength," > ").concat(this._maxExpandedLength))}}}else a++}o=55296&&t<=57343||this._ncrXmlVersion===1&&t>=1&&t<=31&&!DRe.has(t)?Nl.remove:-1}},{key:"_applyNCRAction",value:function _applyNCRAction(t,r,n){switch(t){case Nl.allow:return String.fromCodePoint(n);case Nl.remove:return"";case Nl.leave:return;case Nl.throw:throw new Error("[EntityDecoder] Prohibited numeric character reference &".concat(r,"; (U+").concat(n.toString(16).toUpperCase().padStart(4,"0"),")"));default:return String.fromCodePoint(n)}}},{key:"_resolveNCR",value:function _resolveNCR(t){var r=t.charCodeAt(1),n;if(n=r===120||r===88?parseInt(t.slice(2),16):parseInt(t.slice(1),10),Number.isNaN(n)||n<0||n>1114111)return;var i=this._classifyNCR(n);if(!this._numericAllowed&&i0){var r=e.substring(0,t);if(r!=="xmlns")return r}}var WM=function WM1(t,r){"use strict";_class_call_check(this,WM1);var n;this.options=t,this.currentNode=null,this.tagsNodeStack=[],this.parseXml=qRe,this.parseTextData=zRe,this.resolveNameSpace=jRe,this.buildAttributesMap=BRe,this.isItStopNode=HRe,this.replaceEntitiesValue=VRe,this.readStopNodeData=KRe,this.saveTextToParentTag=GRe,this.addChild=WRe,this.ignoreAttributesFn=typeof(n=this.options.ignoreAttributes)=="function"?n:Array.isArray(n)?function(a){var _iteratorNormalCompletion=true,_didIteratorError=false,_iteratorError=undefined;try{for(var _iterator=n[Symbol.iterator](),_step;!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=true){var s=_step.value;if(typeof s=="string"&&a===s||_instanceof(s,RegExp)&&s.test(a))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},this.entityExpansionCount=0,this.currentExpandedLength=0;var i=_object_spread({},iJ);this.options.entityDecoder?this.entityDecoder=this.options.entityDecoder:(_type_of(this.options.htmlEntities)=="object"?i=this.options.htmlEntities:this.options.htmlEntities===!0&&(i=_object_spread({},$Re,ORe)),this.entityDecoder=new n7({namedEntities:_object_spread({},i,r),numericAllowed:this.options.htmlEntities,limit:{maxTotalExpansions:this.options.processEntities.maxTotalExpansions,maxExpandedLength:this.options.processEntities.maxExpandedLength,applyLimitsTo:this.options.processEntities.appliesTo}})),this.matcher=new lb,this.readonlyMatcher=this.matcher.readOnly(),this.isCurrentNodeStopNode=!1,this.stopNodeExpressionsSet=new qM;var o=this.options.stopNodes;if(o&&o.length>0){for(var a=0;a0)){a||(e=this.replaceEntitiesValue(e,t,r));var l=s.jPath?r.toString():r,c=s.tagValueProcessor(t,e,l,i,o);return c==null?e:(typeof c==="undefined"?"undefined":_type_of(c))!=(typeof e==="undefined"?"undefined":_type_of(e))||c!==e?c:s.trimValues||e.trim()===e?oJ(e,s.parseTagValue,s.numberParseOptions):e}}function jRe(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 URe=new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?","gm");function BRe(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0&&arguments[3],i=this.options;if(n===!0||i.ignoreAttributes!==!0&&typeof e=="string"){var o=eJ(e,URe),a=o.length,s={},l=new Array(a),c=!1,d={};for(var m=0;m",s,"Closing Tag is not closed."),d=e.substring(s+2,c).trim();if(i.removeNSPrefix){var p=d.indexOf(":");p!==-1&&(d=d.substr(p+1))}d=CM(i.transformTagName,d,"",i).tagName,r&&(n=this.saveTextToParentTag(n,r,this.readonlyMatcher));var u=this.matcher.getCurrentTag();if(d&&i.unpairedTagsSet.has(d))throw new Error("Unpaired tag can not be used as closing tag: "));u&&i.unpairedTagsSet.has(u)&&(this.matcher.pop(),this.tagsNodeStack.pop()),this.matcher.pop(),this.isCurrentNodeStopNode=!1,r=this.tagsNodeStack.pop(),n="",s=c}else if(l===63){var c10=VM(e,s,!1,"?>");if(!c10)throw new Error("Pi Tag is not closed.");n=this.saveTextToParentTag(n,r,this.readonlyMatcher);var d10=this.buildAttributesMap(c10.tagExp,this.matcher,c10.tagName,!0);if(d10){var u10=d10[this.options.attributeNamePrefix+"version"];this.entityDecoder.setXmlVersion(Number(u10)||1)}if(!(i.ignoreDeclaration&&c10.tagName==="?xml"||i.ignorePiTags)){var u11=new vd(c10.tagName);u11.add(i.textNodeName,""),c10.tagName!==c10.tagExp&&c10.attrExpPresent&&i.ignoreAttributes!==!0&&(u11[":@"]=d10),this.addChild(r,u11,this.readonlyMatcher,s)}s=c10.closeIndex+1}else if(l===33&&e.charCodeAt(s+2)===45&&e.charCodeAt(s+3)===45){var c11=H1(e,"-->",s+4,"Comment is not closed.");if(i.commentPropName){var d11=e.substring(s+4,c11-2);n=this.saveTextToParentTag(n,r,this.readonlyMatcher),r.add(i.commentPropName,[_define_property({},i.textNodeName,d11)])}s=c11}else if(l===33&&e.charCodeAt(s+2)===68){var c12=o.readDocType(e,s);this.entityDecoder.addInputEntities(c12.entities),s=c12.i}else if(l===33&&e.charCodeAt(s+2)===91){var c13=H1(e,"]]>",s,"CDATA is not closed.")-2,d12=e.substring(s+9,c13);n=this.saveTextToParentTag(n,r,this.readonlyMatcher);var u12=this.parseTextData(d12,r.tagname,this.readonlyMatcher,!0,!1,!0,!0);u12==null&&(u12=""),i.cdataPropName?r.add(i.cdataPropName,[_define_property({},i.textNodeName,d12)]):r.add(i.textNodeName,u12),s=c13+2}else{var c14=VM(e,s,i.removeNSPrefix);if(!c14){var w=e.substring(Math.max(0,s-50),Math.min(a,s+50));throw new Error("readTagExp returned undefined at position ".concat(s,'. Context: "').concat(w,'"'))}var d13=c14.tagName,u13=c14.rawTagName,p10=c14.tagExp,m=c14.attrExpPresent,h=c14.closeIndex;var ref;if(ref=CM(i.transformTagName,d13,p10,i),d13=ref.tagName,p10=ref.tagExp,ref,i.strictReservedNames&&(d13===i.commentPropName||d13===i.cdataPropName||d13===i.textNodeName||d13===i.attributesGroupName))throw new Error("Invalid tag name: ".concat(d13));r&&n&&r.tagname!=="!xml"&&(n=this.saveTextToParentTag(n,r,this.readonlyMatcher,!1));var g=r;g&&i.unpairedTagsSet.has(g.tagname)&&(r=this.tagsNodeStack.pop(),this.matcher.pop());var x=!1;p10.length>0&&p10.lastIndexOf("/")===p10.length-1&&(x=!0,d13[d13.length-1]==="/"?(d13=d13.substr(0,d13.length-1),p10=d13):p10=p10.substr(0,p10.length-1),m=d13!==p10);var v=void 0,y=null,_={};v=FRe(u13),d13!==t.tagname&&this.matcher.push(d13,{},v),d13!==p10&&m&&(y=this.buildAttributesMap(p10,this.matcher,d13),y&&(_=LRe(y,i))),d13!==t.tagname&&(this.isCurrentNodeStopNode=this.isItStopNode());var b=s;if(this.isCurrentNodeStopNode){var w10="";if(x)s=c14.closeIndex;else if(i.unpairedTagsSet.has(d13))s=c14.closeIndex;else{var k=this.readStopNodeData(e,u13,h+1);if(!k)throw new Error("Unexpected end of ".concat(u13));s=k.i,w10=k.tagContent}var S=new vd(d13);y&&(S[":@"]=y),S.add(i.textNodeName,w10),this.matcher.pop(),this.isCurrentNodeStopNode=!1,this.addChild(r,S,this.readonlyMatcher,b)}else{if(x){var ref1;ref1=CM(i.transformTagName,d13,p10,i),d13=ref1.tagName,p10=ref1.tagExp,ref1;var w11=new vd(d13);y&&(w11[":@"]=y),this.addChild(r,w11,this.readonlyMatcher,b),this.matcher.pop(),this.isCurrentNodeStopNode=!1}else{if(i.unpairedTagsSet.has(d13)){var w12=new vd(d13);y&&(w12[":@"]=y),this.addChild(r,w12,this.readonlyMatcher,b),this.matcher.pop(),this.isCurrentNodeStopNode=!1,s=c14.closeIndex;continue}{var w13=new vd(d13);if(this.tagsNodeStack.length>i.maxNestedTags)throw new Error("Maximum nested tags exceeded");this.tagsNodeStack.push(r),y&&(w13[":@"]=y),this.addChild(r,w13,this.readonlyMatcher,b),r=w13}}n="",s=h}}}else n+=e[s];return t.child};function WRe(e,t,r,n){this.options.captureMetaData||(n=void 0);var i=this.options.jPath?r.toString():r,o=this.options.updateTag(t.tagname,i,t[":@"]);o===!1||(typeof o=="string"&&(t.tagname=o),e.addChild(t,n))}function VRe(e,t,r){var n=this.options.processEntities;if(!n||!n.enabled)return e;if(n.allowedTags){var i=this.options.jPath?r.toString():r;if(!(Array.isArray(n.allowedTags)?n.allowedTags.includes(t):n.allowedTags(t,i)))return e}if(n.tagFilter){var i10=this.options.jPath?r.toString():r;if(!n.tagFilter(t,i10))return e}return this.entityDecoder.decode(e)}function GRe(e,t,r,n){return e&&(n===void 0&&(n=t.child.length===0),(e=this.parseTextData(e,t.tagname,r,!1,!!t[":@"]&&Object.keys(t[":@"]).length!==0,n))!==void 0&&e!==""&&t.add(this.options.textNodeName,e),e=""),e}function HRe(){return this.stopNodeExpressionsSet.size!==0&&this.matcher.matchesAny(this.stopNodeExpressionsSet)}function H1(e,t,r,n){var i=e.indexOf(t,r);if(i===-1)throw new Error(n);return i+t.length-1}function ZRe(e,t,r,n){var i=e.indexOf(t,r);if(i===-1)throw new Error(n);return i}function VM(e,t,r){var n=function(d,u){var p=arguments.length>2&&arguments[2]!==void 0?arguments[2]:">",m=0,h=d.length,g=p.charCodeAt(0),x=p.length>1?p.charCodeAt(1):-1,v="",y=u;for(var _=u;_3&&arguments[3]!==void 0?arguments[3]:">");if(!n)return;var i=n.data,o=n.index,a=i.search(/\s/),s=i,l=!0;a!==-1&&(s=i.substring(0,a),i=i.substring(a+1).trimStart());var c=s;if(r){var d=s.indexOf(":");d!==-1&&(s=s.substr(d+1),l=s!==n.data.substr(d+1))}return{tagName:s,tagExp:i,closeIndex:o,attrExpPresent:l,rawTagName:c}}function KRe(e,t,r){var n=r,i=1,o=e.length;for(;r",r,"".concat(t," is not closed"));if(e.substring(r+2,s).trim()===t&&(i--,i===0))return{tagContent:e.substring(n,r),i:s};r=s}else if(a===63)r=H1(e,"?>",r+1,"StopNode is not closed.");else if(a===33&&e.charCodeAt(r+2)===45&&e.charCodeAt(r+3)===45)r=H1(e,"-->",r+3,"StopNode is not closed.");else if(a===33&&e.charCodeAt(r+2)===91)r=H1(e,"]]>",r,"StopNode is not closed.")-2;else{var s10=VM(e,r,">");s10&&((s10&&s10.tagName)===t&&s10.tagExp[s10.tagExp.length-1]!=="/"&&i++,r=s10.closeIndex)}}}function oJ(e,t,r){if(t&&typeof e=="string"){var n=e.trim();return n==="true"||n!=="false"&&function(i){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(o=Object.assign({},RRe,o),!i||typeof i!="string")return i;var a=i.trim();if(a.length===0||o.skipLike!==void 0&&o.skipLike.test(a))return i;if(a==="0")return 0;if(o.hex&&IRe.test(a))return function(l){if(parseInt)return parseInt(l,16);if(Number.parseInt)return Number.parseInt(l,16);if(window&&window.parseInt)return window.parseInt(l,16);throw new Error("parseInt, Number.parseInt, window.parseInt are not supported")}(a);if(isFinite(a)){if(a.includes("e")||a.includes("E"))return function(l,c,d){if(!d.eNotation)return l;var u=c.match(MRe);if(u){var p=u[1]||"",m=u[3].indexOf("e")===-1?"E":"e",h=u[2],g=p?l[h.length+1]===m:l[h.length]===m;return h.length>1&&g?l:(h.length!==1||!u[3].startsWith(".".concat(m))&&u[3][0]!==m)&&h.length>0?d.leadingZeros&&!g?(c=(u[1]||"")+u[3],Number(c)):l:Number(c)}return l}(i,a,o);{var l=PRe.exec(a);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.substring(0,s.length-1))),s),p=c?i[d.length+1]===".":i[d.length]===".";if(!o.leadingZeros&&(d.length>1||d.length===1&&!p))return i;{var m=Number(a),h=String(m);if(m===0)return m;if(h.search(/[eE]/)!==-1)return o.eNotation?m:i;if(a.indexOf(".")!==-1)return h==="0"||h===u||h==="".concat(c).concat(u)?m:i;var g=d?u:a;return d?g===h||c+g===h?m:i:g===h||g===c+h?m:i}}return i}}var s;return function(l,c,d){var u=c===1/0;switch(d.infinity.toLowerCase()){case"null":return null;case"infinity":return c;case"string":return u?"Infinity":"-Infinity";default:return l}}(i,Number(a),o)}(e,r)}return e!==void 0?e:""}function CM(e,t,r,n){if(e){var i=e(t);r===t&&(r=i),t=i}return{tagName:t=aJ(t,n),tagExp:r}}function aJ(e,t){if(tJ.includes(e))throw new Error('[SECURITY] Invalid name: "'.concat(e,'" is a reserved JavaScript keyword that could cause prototype pollution'));return XM.includes(e)?t.onDangerousProperty(e):e}var EM=vd.getMetaDataSymbol();function QRe(e,t){if(!e||(typeof e==="undefined"?"undefined":_type_of(e))!="object")return{};if(!t)return e;var r={};for(var n in e)n.startsWith(t)?r[n.substring(t.length)]=e[n]:r[n]=e[n];return r}function JRe(e,t,r,n){return sJ(e,t,r,n)}function sJ(e,t,r,n){var i,o={};for(var a=0;a0&&(o[t.textNodeName]=i):i!==void 0&&(o[t.textNodeName]=i),o}function YRe(e){var t=Object.keys(e);for(var r=0;r5&&n==="xml")return oo("InvalidXml","XML declaration allowed only at the start of the document.",ms(e,t));if(e[t]=="?"&&e[t+1]==">"){t++;break}}return t}function EQ(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}function rMe(e,t){var r="",n="",i=!1;for(;t"&&n===""){i=!0;break}r+=e[t]}return n===""&&{value:r,index:t,tagClosed:i}}var nMe=new RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?","g");function TQ(e,t){var r=eJ(e,nMe),n={};for(var i=0;i"&&a[u]!==" "&&a[u]!==" "&&a[u]!=="\n"&&a[u]!=="\r";u++)h+=a[u];if(h=h.trim(),h[h.length-1]==="/"&&(h=h.substring(0,h.length-1),u--),!m7(h)){var v=void 0;return v=h.trim().length===0?"Invalid space after '<'.":"Tag '"+h+"' is an invalid name.",oo("InvalidTag",v,ms(a,u))}var g=rMe(a,u);if(g===!1)return oo("InvalidAttr","Attributes for '"+h+"' have open quote.",ms(a,u));var x=g.value;if(u=g.index,x[x.length-1]==="/"){var v10=u-x.length;x=x.substring(0,x.length-1);var y=TQ(x,s);if(y!==!0)return oo(y.err.code,y.err.msg,ms(a,v10+y.err.line));c=!0}else if(m){if(!g.tagClosed)return oo("InvalidTag","Closing tag '"+h+"' doesn't have proper closing.",ms(a,u));if(x.trim().length>0)return oo("InvalidTag","Closing tag '"+h+"' can't have attributes or invalid starting.",ms(a,p));if(l.length===0)return oo("InvalidTag","Closing tag '"+h+"' has not been opened.",ms(a,p));{var v11=l.pop();if(h!==v11.tagName){var y10=ms(a,v11.tagStartPos);return oo("InvalidTag","Expected closing tag '"+v11.tagName+"' (opened in line "+y10.line+", col "+y10.col+") instead of closing tag '"+h+"'.",ms(a,p))}l.length==0&&(d=!0)}}else{var v12=TQ(x,s);if(v12!==!0)return oo(v12.err.code,v12.err.msg,ms(a,u-x.length+v12.err.line));if(d===!0)return oo("InvalidXml","Multiple possible root nodes found.",ms(a,u));s.unpairedTags.indexOf(h)!==-1||l.push({tagName:h,tagStartPos:p}),c=!0}for(u++;u0)||oo("InvalidXml","Invalid '"+JSON.stringify(l.map(function(u){return u.tagName}),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):oo("InvalidXml","Start tag expected.",1)}(t,r);if(o!==!0)throw Error("".concat(o.err.msg,":").concat(o.err.line,":").concat(o.err.col))}var n=new WM(this.options,this.externalEntities),i=n.parseXml(t);return this.options.preserveOrder||i===void 0?i:JRe(i,this.options,n.matcher,n.readonlyMatcher)}},{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}}],[{key:"getMetaDataSymbol",value:function getMetaDataSymbol(){return vd.getMetaDataSymbol()}}]);return i71}(),aMe=wi(829),Mp=wi.n(aMe),V1=function(e){return e.Array="array",e.Object="object",e.Original="original",e}(V1||{});function AQ(e){return typeof e=="string"?e:e.toString(".",!1)}function lJ(e,t){if(!e.endsWith("propstat.prop.displayname"))return t}function Kk(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:V1.Original,n=Mp().get(e,t);return r==="array"&&Array.isArray(n)===!1?[n]:r==="object"&&Array.isArray(n)?n[0]:n}function h7(e,t){return t=t!=null?t:{attributeNamePrefix:"@",attributeParsers:[],tagParsers:[lJ]},new Promise(function(r){r(function(n){var i=n.multistatus;if(i==="")return{multistatus:{response:[]}};if(!i)throw new Error("Invalid response: No root multistatus found");var o={multistatus:Array.isArray(i)?i[0]:i};return Mp().set(o,"multistatus.response",Kk(o,"multistatus.response",V1.Array)),Mp().set(o,"multistatus.response",Mp().get(o,"multistatus.response").map(function(a){return function(s){var l=Object.assign({},s);return l.status?Mp().set(l,"status",Kk(l,"status",V1.Object)):(Mp().set(l,"propstat",Kk(l,"propstat",V1.Object)),Mp().set(l,"propstat.prop",Kk(l,"propstat.prop",V1.Object))),l}(a)})),o}((function(n){var c,d,u,p;var i=n.attributeNamePrefix,o=n.attributeParsers,a=n.entityDecoder,s=n.tagParsers,l={allowBooleanAttributes:!0,attributeNamePrefix:i,textNodeName:"text",ignoreAttributes:!1,removeNSPrefix:!0,jPath:!1,numberParseOptions:{hex:!0,leadingZeros:!1},attributeValueProcessor:function attributeValueProcessor(m,h,g){var x=AQ(g);var _iteratorNormalCompletion=true,_didIteratorError=false,_iteratorError=undefined;try{for(var _iterator=o[Symbol.iterator](),_step;!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=true){var v=_step.value;try{var y=v(x,h);if(y!==h)return y}catch(y){}}}catch(err){_didIteratorError=true;_iteratorError=err}finally{try{if(!_iteratorNormalCompletion&&_iterator.return!=null){_iterator.return()}}finally{if(_didIteratorError){throw _iteratorError}}}return h},tagValueProcessor:function tagValueProcessor(m,h,g){var x=AQ(g);var _iteratorNormalCompletion=true,_didIteratorError=false,_iteratorError=undefined;try{for(var _iterator=s[Symbol.iterator](),_step;!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=true){var v=_step.value;try{var y=v(x,h);if(y!==h)return y}catch(y){}}}catch(err){_didIteratorError=true;_iteratorError=err}finally{try{if(!_iteratorNormalCompletion&&_iterator.return!=null){_iterator.return()}}finally{if(_didIteratorError){throw _iteratorError}}}return h}};return a&&(l.entityDecoder=new n7({limit:{maxTotalExpansions:(d=(c=a.limit)==null?void 0:c.maxTotalExpansions)!=null?d:0,maxExpandedLength:(p=(u=a.limit)==null?void 0:u.maxExpandedLength)!=null?p:0}})),new i7(l)})(t).parse(e)))})}function eO(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,o=tmp2===void 0?null:tmp2,tmp3=e.getcontenttype,a=tmp3===void 0?null:tmp3,tmp4=e.getetag,s=tmp4===void 0?null:tmp4,l=o&&(typeof o==="undefined"?"undefined":_type_of(o))=="object"&&o.collection!==void 0?"directory":"file",c={filename:t,basename:Xk().basename(t),lastmod:n,size:parseInt(i,10),type:l,etag:typeof s=="string"?s.replace(/"/g,""):null};return l==="file"&&(c.mime=a&&typeof a=="string"?a.split(";")[0]:""),r&&(e.displayname!==void 0&&(e.displayname=String(e.displayname)),c.props=e),c}function sMe(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,o=_n_propstat.status,_o_split=_sliced_to_array(o.split(" ",3),3),a=_o_split[0],s=_o_split[1],l=_o_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 eO(i,ab(t),r)}function lMe(e){switch(String(e)){case"-3":return"unlimited";case"-2":case"-1":return"unknown";default:return parseInt(String(e),10)}}function TM(e,t,r){return r?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}var tO=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=Ho({url:ji(e.remoteURL,zi(t)),method:"PROPFIND",headers:{Accept:"text/plain,application/xml",Depth:"0"}},e,r);return TM(Go(i,e),function(o){return Zo(e,o),TM(o.text(),function(a){return TM(h7(a,e.parsing),function(s){var l=sMe(s,t,n);return X1(o,l,n)})})})});function uJ(e,t,r){return r?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}var uMe=cJ(function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=function(o){if(!o||o==="/")return[];var a=o,s=[];do s.push(a),a=Xk().dirname(a);while(a&&a!=="/");return s}(ab(t));n.sort(function(o,a){return o.length>a.length?1:a.length>o.length?-1:0});var i=!1;return function(o,a,s){if(typeof o[PQ]=="function"){var g=function g10(x){try{for(;!(l=u.next()).done;)if((x=a(l.value))&&x.then){if(!RQ(x))return void x.then(g,d||(d=hs.bind(null,c=new G1,2)));x=x.v}c?hs(c,1,x):c=x}catch(v){hs(c||(c=new G1),2,v)}};var l,c,d,u=o[PQ]();if(g(),u.return){var p=function p(x){try{l.done||u.return()}catch(v){}return x};if(c&&c.then)return c.then(p,function(x){throw p(x)});p()}return c}if(!("length"in o))throw new TypeError("Object is not iterable");for(var m=[],h=0;h2&&arguments[2]!==void 0?arguments[2]:{};if(r.recursive===!0)return uMe(e,t,r);var n=Ho({url:ji(e.remoteURL,(i=zi(t),i.endsWith("/")?i:i+"/")),method:"MKCOL"},e,r);var i;return uJ(Go(n,e),function(o){Zo(e,o)})}),dMe=wi(388),MQ=wi.n(dMe),pMe=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=Ho({url:ji(e.remoteURL,zi(t)),method:"GET",headers:n},e,r);return a=function a(s){if(Zo(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},(o=Go(i,e))&&o.then||(o=Promise.resolve(o)),a?o.then(a):o;var o,a}),fMe=function(){},mMe=function(e){return function(){for(var t=[],r=0;r2&&arguments[2]!==void 0?arguments[2]:{},n=Ho({url:ji(e.remoteURL,zi(t)),method:"DELETE"},e,r);return o=function o(a){Zo(e,a)},(i=Go(n,e))&&i.then||(i=Promise.resolve(i)),o?i.then(o):i;var i,o}),gMe=function(e){return function(){for(var t=[],r=0;r2&&arguments[2]!==void 0?arguments[2]:{};return function(n,i){try{var o=(a=tO(e,t,r),s=function s(){return!0},l?s?s(a):a:(a&&a.then||(a=Promise.resolve(a)),s?a.then(s):a))}catch(c){return i(c)}var a,s,l;return o&&o.then?o.then(void 0,i):o}(0,function(n){if(n.status===404)return!1;throw n})});function AM(e,t,r){return r?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}var xMe=function(e){return function(){for(var t=[],r=0;r2&&arguments[2]!==void 0?arguments[2]:{},n=Ho({url:ji(e.remoteURL,zi(t),"/"),method:"PROPFIND",headers:{Accept:"text/plain,application/xml",Depth:r.deep?"infinity":"1"}},e,r);return AM(Go(n,e),function(i){return Zo(e,i),AM(i.text(),function(o){if(!o)throw new Error("Failed parsing directory contents: Empty response");return AM(h7(o,e.parsing),function(a){var s=uQ(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=Xk().join(d,"/"),_c_multistatus=c.multistatus,g=_c_multistatus.response,x=g.map(function(v){var y=function(b){try{return b.replace(/^https?:\/\/[^\/]+/,"")}catch(w){throw new Aa(w,"Failed normalising HREF")}}(v.href),_v_propstat=v.propstat,_=_v_propstat.prop;return eO(_,h==="/"?decodeURIComponent(ab(y)):ab(Xk().relative(decodeURIComponent(h),decodeURIComponent(y))),p)});return m?x:x.filter(function(v){return v.basename&&(v.type==="file"||v.filename!==u.replace(/\/$/,""))})}(a,uQ(e.remoteBasePath||e.remotePath),s,r.details,r.includeSelf);return r.glob&&(l=function(c,d){return c.filter(function(u){return Za(u.filename,d,{matchBase:!0})})}(l,r.glob)),X1(i,l,r.details)})})})});function rO(e){return function(){for(var t=[],r=0;r2&&arguments[2]!==void 0?arguments[2]:{},n=Ho({url:ji(e.remoteURL,zi(t)),method:"GET",headers:{Accept:"text/plain"},transformResponse:[bMe]},e,r);return o7(Go(n,e),function(i){return Zo(e,i),o7(i.text(),function(o){return X1(i,o,r.details)})})});function o7(e,t,r){return r?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}var vMe=rO(function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=Ho({url:ji(e.remoteURL,zi(t)),method:"GET"},e,r);return o7(Go(n,e),function(i){var o;return Zo(e,i),function(a,s){var l=a();return l&&l.then?l.then(s):s()}(function(){return o7(i.arrayBuffer(),function(a){o=a})},function(){return X1(i,o,r.details)})})}),_Me=rO(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 Aa({info:{code:om.InvalidOutputFormat}},"Invalid output format: ".concat(n));return n==="text"?yMe(e,t,r):vMe(e,t,r)}),bMe=function(e){return e};function wMe(e,t){var r="";t.format&&t.indentBy.length>0&&(r="\n");var n=[];if(t.stopNodes&&Array.isArray(t.stopNodes))for(var i=0;it.maxNestedTags)throw new Error("Maximum nested tags exceeded");if(!Array.isArray(e)){if(e!=null){var s=e.toString();return s=HM(s,t),s}return""}for(var s10=0;s10/g,"]]]]>"),"]]>"),a=!1,n.pop();continue}if(c===t.commentPropName){var g11=l[c][0][t.textNodeName];o+=r+""),a=!0,n.pop();continue}if(c[0]==="?"){var g12=OQ(l[":@"],t,u),x=c==="?xml"?"":r,v=l[c][0][t.textNodeName];v=v.length!==0?" "+v:"",o+=x+"<".concat(c).concat(v).concat(g12,"?>"),a=!0,n.pop();continue}var p=r;p!==""&&(p+=t.indentBy);var m=r+"<".concat(c).concat(OQ(l[":@"],t,u)),h=void 0;h=u?pJ(l[c],t):dJ(l[c],t,p,n,i),t.unpairedTags.indexOf(c)!==-1?t.suppressUnpairedNode?o+=m+">":o+=m+"/>":h&&h.length!==0||!t.suppressEmptyNode?h&&h.endsWith(">")?o+=m+">".concat(h).concat(r,""):(o+=m+">",h&&r!==""&&(h.includes("/>")||h.includes("")):o+=m+"/>",a=!0,n.pop()}return o}function SMe(e,t){if(!e||t.ignoreAttributes)return null;var r={},n=!1;for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(r[i.startsWith(t.attributeNamePrefix)?i.substr(t.attributeNamePrefix.length):i]=e[i],n=!0);return n?r:null}function pJ(e,t){if(!Array.isArray(e))return e!=null?e.toString():"";var r="";for(var n=0;n").concat(s,""):r+="<".concat(o).concat(a,"/>")}}}return r}function kMe(e,t){var r="";if(e&&!t.ignoreAttributes)for(var n in e){if(!Object.prototype.hasOwnProperty.call(e,n))continue;var i=e[n];i===!0&&t.suppressBooleanAttributes?r+=" ".concat(n.substr(t.attributeNamePrefix.length)):r+=" ".concat(n.substr(t.attributeNamePrefix.length),'="').concat(i,'"')}return r}function fJ(e){var t=Object.keys(e);for(var r=0;r0&&t.processEntities)for(var r=0;r","g"),val:">"},{regex:new RegExp("<","g"),val:"<"},{regex:new RegExp("'","g"),val:"'"},{regex:new RegExp('"',"g"),val:"""}],processEntities:!0,stopNodes:[],oneListGroup:!1,maxNestedTags:100,jPath:!0};function wu(e){if(this.options=Object.assign({},EMe,e),this.options.stopNodes&&Array.isArray(this.options.stopNodes)&&(this.options.stopNodes=this.options.stopNodes.map(function(r){return typeof r=="string"&&r.startsWith("*.")?".."+r.substring(2):r})),this.stopNodeExpressions=[],this.options.stopNodes&&Array.isArray(this.options.stopNodes))for(var r=0;r\n",this.newLine="\n"):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function TMe(e,t,r,n){var i=this.extractAttributes(e);if(n.push(t,i),this.checkStopNode(n)){var a=this.buildRawContent(e),s=this.buildAttributesForStopNode(e);return n.pop(),this.buildObjectNode(a,t,s,r)}var o=this.j2x(e,r+1,n);return n.pop(),e[this.options.textNodeName]!==void 0&&Object.keys(e).length===1?this.buildTextValNode(e[this.options.textNodeName],t,o.attrStr,r,n):this.buildObjectNode(o.val,t,o.attrStr,r)}function AMe(e){return this.options.indentBy.repeat(e)}function IMe(e){return!(!e.startsWith(this.options.attributeNamePrefix)||e===this.options.textNodeName)&&e.substr(this.attrPrefixLen)}wu.prototype.build=function(e){if(this.options.preserveOrder)return wMe(e,this.options);{Array.isArray(e)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(e=_define_property({},this.options.arrayNodeName,e));var t=new lb;return this.j2x(e,0,t).val}},wu.prototype.j2x=function(e,t,r){var n="",i="";if(this.options.maxNestedTags&&r.getDepth()>=this.options.maxNestedTags)throw new Error("Maximum nested tags exceeded");var o=this.options.jPath?r.toString():r,a=this.checkStopNode(r);for(var s in e)if(Object.prototype.hasOwnProperty.call(e,s))if(e[s]===void 0)this.isAttribute(s)&&(i+="");else if(e[s]===null)this.isAttribute(s)||s===this.options.cdataPropName?i+="":s[0]==="?"?i+=this.indentate(t)+"<"+s+"?"+this.tagEndChar:i+=this.indentate(t)+"<"+s+"/"+this.tagEndChar;else if(_instanceof(e[s],Date))i+=this.buildTextValNode(e[s],s,"",t,r);else if(_type_of(e[s])!="object"){var l=this.isAttribute(s);if(l&&!this.ignoreAttributesFn(l,o))n+=this.buildAttrPairStr(l,""+e[s],a);else if(!l)if(s===this.options.textNodeName){var c=this.options.tagValueProcessor(s,""+e[s]);i+=this.replaceEntitiesValue(c)}else{r.push(s);var c10=this.checkStopNode(r);if(r.pop(),c10){var d=""+e[s];i+=d===""?this.indentate(t)+"<"+s+this.closeTag(s)+this.tagEndChar:this.indentate(t)+"<"+s+">"+d+""+h+"").concat(i,"");else if((typeof i==="undefined"?"undefined":_type_of(i))=="object"&&i!==null){var o=this.buildRawContent(i),a=this.buildAttributesForStopNode(i);t+=o===""?"<".concat(r).concat(a,"/>"):"<".concat(r).concat(a,">").concat(o,"")}}}catch(err){_didIteratorError=true;_iteratorError=err}finally{try{if(!_iteratorNormalCompletion&&_iterator.return!=null){_iterator.return()}}finally{if(_didIteratorError){throw _iteratorError}}}}else if((typeof n==="undefined"?"undefined":_type_of(n))=="object"&&n!==null){var i10=this.buildRawContent(n),o10=this.buildAttributesForStopNode(n);t+=i10===""?"<".concat(r).concat(o10,"/>"):"<".concat(r).concat(o10,">").concat(i10,"")}else t+="<".concat(r,">").concat(n,"")}return t},wu.prototype.buildAttributesForStopNode=function(e){if(!e||(typeof e==="undefined"?"undefined":_type_of(e))!="object")return"";var t="";if(this.options.attributesGroupName&&e[this.options.attributesGroupName]){var r=e[this.options.attributesGroupName];for(var n in r){if(!Object.prototype.hasOwnProperty.call(r,n))continue;var i=n.startsWith(this.options.attributeNamePrefix)?n.substring(this.options.attributeNamePrefix.length):n,o=r[n];o===!0&&this.options.suppressBooleanAttributes?t+=" "+i:t+=" "+i+'="'+o+'"'}}else for(var r10 in e){if(!Object.prototype.hasOwnProperty.call(e,r10))continue;var n10=this.isAttribute(r10);if(n10){var i10=e[r10];i10===!0&&this.options.suppressBooleanAttributes?t+=" "+n10:t+=" "+n10+'="'+i10+'"'}}return t},wu.prototype.buildObjectNode=function(e,t,r,n){if(e==="")return t[0]==="?"?this.indentate(n)+"<"+t+r+"?"+this.tagEndChar:this.indentate(n)+"<"+t+r+this.closeTag(t)+this.tagEndChar;{var i="")+this.newLine:this.indentate(n)+"<"+t+r+o+this.tagEndChar+e+this.indentate(n)+i:this.indentate(n)+"<"+t+r+o+">"+e+i}},wu.prototype.closeTag=function(e){var t="";return this.options.unpairedTags.indexOf(e)!==-1?this.options.suppressUnpairedNode||(t="/"):t=this.options.suppressEmptyNode?"/":">/g,"]]]]>");return this.indentate(n)+"")+this.newLine}if(this.options.commentPropName!==!1&&t===this.options.commentPropName){var o10=String(e).replace(/--/g,"- -").replace(/-$/,"- ");return this.indentate(n)+"")+this.newLine}if(t[0]==="?")return this.indentate(n)+"<"+t+r+"?"+this.tagEndChar;{var o11=this.options.tagValueProcessor(t,e);return o11=this.replaceEntitiesValue(o11),o11===""?this.indentate(n)+"<"+t+r+this.closeTag(t)+this.tagEndChar:this.indentate(n)+"<"+t+r+">"+o11+"0&&this.options.processEntities)for(var t=0;t3&&arguments[3]!==void 0?arguments[3]:{},i=Ho({url:ji(e.remoteURL,zi(t)),method:"UNLOCK",headers:{"Lock-Token":r}},e,n);return ZM(Go(i,e),function(o){if(Zo(e,o),o.status!==204&&o.status!==200)throw YM(o)})}),OMe=hJ(function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=r.refreshToken,tmp=r.timeout,i=tmp===void 0?$Me:tmp,o={Accept:"text/plain,application/xml",Timeout:i};n&&(o.If=n);var a=Ho({url:ji(e.remoteURL,zi(t)),method:"LOCK",headers:o,data:RMe(e.contactHref)},e,r);return ZM(Go(a,e),function(s){return Zo(e,s),ZM(s.text(),function(l){var c=(p=l,new i7({removeNSPrefix:!0,parseAttributeValue:!0,parseTagValue:!0}).parse(p)),d=Mp().get(c,"prop.lockdiscovery.activelock.locktoken.href"),u=Mp().get(c,"prop.lockdiscovery.activelock.timeout");var p;if(!d)throw YM(s,"No lock token received: ");return{token:d,serverTimeout:u}})})}),$Me="Infinite, Second-4100000000";function IM(e,t,r){return r?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}var NMe=function(e){return function(){for(var t=[],r=0;r1&&arguments[1]!==void 0?arguments[1]:{},r=t.path||"/",n=Ho({url:ji(e.remoteURL,r),method:"PROPFIND",headers:{Accept:"text/plain,application/xml",Depth:"0"}},e,t);return IM(Go(n,e),function(i){return Zo(e,i),IM(i.text(),function(o){return IM(h7(o,e.parsing),function(a){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:lMe(u)}:null}catch(c){}return null}(a);return X1(i,s,t.details)})})})});function PM(e,t,r){return r?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}var DMe=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=Ho({url:ji(e.remoteURL,zi(t)),method:"SEARCH",headers:{Accept:"text/plain,application/xml","Content-Type":e.headers["Content-Type"]||"application/xml; charset=utf-8"}},e,r);return PM(Go(i,e),function(o){return Zo(e,o),PM(o.text(),function(a){return PM(h7(a,e.parsing),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(zi(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(eO(m.propstat.prop,h,u))}),p}(s,t,n);return X1(o,l,n)})})})}),LMe=function(e){return function(){for(var t=[],r=0;r3&&arguments[3]!==void 0?arguments[3]:{},i=Ho({url:ji(e.remoteURL,zi(t)),method:"MOVE",headers:{Destination:ji(e.remoteURL,zi(r)),Overwrite:n.overwrite===!1?"F":"T"}},e,n);return a=function a(s){Zo(e,s)},(o=Go(i,e))&&o.then||(o=Promise.resolve(o)),a?o.then(a):o;var o,a}),FMe=wi(172);function zMe(e){if(zQ(e))return e.byteLength;if(jQ(e))return e.length;if(typeof e=="string")return(0,FMe.d)(e);throw new Aa({info:{code:om.DataTypeNoLength}},"Cannot calculate data length: Invalid type")}var jMe=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,o=tmp1===void 0?!0:tmp1,a={"Content-Type":"application/octet-stream"};i===!1||(a["Content-Length"]=typeof i=="number"?"".concat(i):"".concat(zMe(r))),o||(a["If-None-Match"]="*");var s=Ho({url:ji(e.remoteURL,zi(t)),method:"PUT",headers:a,data:r},e,n);return c=function c(d){try{Zo(e,d)}catch(u){var p=u;if(p.status!==412||o)throw p;return!1}return!0},(l=Go(s,e))&&l.then||(l=Promise.resolve(l)),c?l.then(c):l;var l,c}),gJ=function(e){return function(){for(var t=[],r=0;r2&&arguments[2]!==void 0?arguments[2]:{},n=Ho({url:ji(e.remoteURL,zi(t)),method:"OPTIONS"},e,r);return o=function o(a){var s,l;try{Zo(e,a)}catch(c){throw c}return{compliance:((s=a.headers.get("DAV"))!=null?s:"").split(",").map(function(c){return c.trim()}),server:(l=a.headers.get("Server"))!=null?l:""}},(i=Go(n,e))&&i.then||(i=Promise.resolve(i)),o?i.then(o):i;var i,o});function ob(e,t,r){return r?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}var UMe=nO(function(e,t,r,n,i){var o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{};if(r>n||r<0)throw new Aa({info:{code:om.InvalidUpdateRange}},"Invalid update range ".concat(r," for partial update"));var a={"Content-Type":"application/octet-stream","Content-Length":""+(n-r+1),"Content-Range":"bytes ".concat(r,"-").concat(n,"/*")},s=Ho({url:ji(e.remoteURL,zi(t)),method:"PUT",headers:a,data:i},e,o);return ob(Go(s,e),function(l){Zo(e,l)})});function $Q(e,t){var r=e();return r&&r.then?r.then(t):t(r)}var BMe=nO(function(e,t,r,n,i){var o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{};if(r>n||r<0)throw new Aa({info:{code:om.InvalidUpdateRange}},"Invalid update range ".concat(r," for partial update"));var a={"Content-Type":"application/x-sabredav-partialupdate","Content-Length":""+(n-r+1),"X-Update-Range":"bytes=".concat(r,"-").concat(n)},s=Ho({url:ji(e.remoteURL,zi(t)),method:"PATCH",headers:a,data:i},e,o);return ob(Go(s,e),function(l){Zo(e,l)})});function nO(e){return function(){for(var t=[],r=0;r5&&arguments[5]!==void 0?arguments[5]:{};return ob(gJ(e,t,o),function(a){var s=!1;return $Q(function(){if(a.compliance.includes("sabredav-partialupdate"))return ob(BMe(e,t,r,n,i,o),function(l){return s=!0,l})},function(l){var c=!1;return s?l:$Q(function(){if(a.server.includes("Apache")&&a.compliance.includes(""))return ob(UMe(e,t,r,n,i,o),function(d){return c=!0,d})},function(d){if(c)return d;throw new Aa({info:{code:om.NotSupported}},"Not supported")})})})}),WMe="https://github.com/perry-mitchell/webdav-client/blob/master/LOCK_CONTACT.md";function iO(e){var x;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?WMe:tmp1,o=t.entityDecoder,a=t.ha1,tmp2=t.headers,s=tmp2===void 0?{}:tmp2,l=t.httpAgent,c=t.httpsAgent,d=t.password,u=t.token,p=t.username,m=t.withCredentials,h=r;h||(h=p||d?Vs.Password:Vs.None);var g={authType:h,remoteBasePath:n,contactHref:i,ha1:a,headers:Object.assign({},s),httpAgent:l,httpsAgent:c,password:d,parsing:{attributeNamePrefix:(x=t.attributeNamePrefix)!=null?x:"@",attributeParsers:[],entityDecoder:o,tagParsers:[lJ]},remotePath:UPe(e),remoteURL:e,token:u,username:p,withCredentials:m};return LQ(g,p,d,u,a),{copyFile:function(v,y,_){return kRe(g,v,y,_)},createDirectory:function(v,y){return GM(g,v,y)},createReadStream:function(v,y){return function(_,b){var w=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},S=new(MQ()).PassThrough;return pMe(_,b,w).then(function(k){k.pipe(S)}).catch(function(k){S.emit("error",k)}),S}(g,v,y)},createWriteStream:function(v,y,_){return function(b,w){var S=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},k=arguments.length>3&&arguments[3]!==void 0?arguments[3]:fMe,E=new(MQ()).PassThrough,C={};S.overwrite===!1&&(C["If-None-Match"]="*");var T=Ho({url:ji(b.remoteURL,zi(w)),method:"PUT",headers:C,data:E,maxRedirects:0},b,S);return Go(T,b).then(function(I){return Zo(b,I)}).then(function(I){setTimeout(function(){k(I)},0)}).catch(function(I){E.emit("error",I)}),E}(g,v,y,_)},customRequest:function(v,y){return mMe(g,v,y)},deleteFile:function(v,y){return hMe(g,v,y)},exists:function(v,y){return gMe(g,v,y)},getDirectoryContents:function(v,y){return xMe(g,v,y)},getFileContents:function(v,y){return _Me(g,v,y)},getFileDownloadLink:function(v){return function(y,_){var b=ji(y.remoteURL,zi(_)),w=/^https:/i.test(b)?"https":"http";switch(y.authType){case Vs.None:break;case Vs.Password:{var S=dQ(y.headers.Authorization.replace(/^Basic /i,"").trim());b=b.replace(/^https?:\/\//,"".concat(w,"://").concat(S,"@"));break}default:throw new Aa({info:{code:om.LinkUnsupportedAuthType}},"Unsupported auth type for file link: ".concat(y.authType))}return b}(g,v)},getFileUploadLink:function(v){return function(y,_){var b="".concat(ji(y.remoteURL,zi(_)),"?Content-Type=application/octet-stream"),w=/^https:/i.test(b)?"https":"http";switch(y.authType){case Vs.None:break;case Vs.Password:{var S=dQ(y.headers.Authorization.replace(/^Basic /i,"").trim());b=b.replace(/^https?:\/\//,"".concat(w,"://").concat(S,"@"));break}default:throw new Aa({info:{code:om.LinkUnsupportedAuthType}},"Unsupported auth type for file link: ".concat(y.authType))}return b}(g,v)},getHeaders:function(){return Object.assign({},g.headers)},getQuota:function(v){return NMe(g,v)},lock:function(v,y){return OMe(g,v,y)},moveFile:function(v,y,_){return LMe(g,v,y,_)},putFileContents:function(v,y,_){return jMe(g,v,y,_)},partialUpdateFileContents:function(v,y,_,b,w){return qMe(g,v,y,_,b,w)},getDAVCompliance:function(v){return gJ(g,v)},search:function(v,y){return DMe(g,v,y)},setHeaders:function(v){g.headers=Object.assign({},v)},stat:function(v,y){return tO(g,v,y)},unlock:function(v,y,_){return MMe(g,v,y,_)},registerAttributeParser:function(v){g.parsing.attributeParsers.push(v)},registerTagParser:function(v){g.parsing.tagParsers.push(v)}}}var ex=require("obsidian");var VMe="0.13.26",GMe="0.14.6";var xJ=!ex.Platform.isAndroidApp&&(0,ex.requireApiVersion)(VMe)||ex.Platform.isAndroidApp&&(0,ex.requireApiVersion)(GMe);var TJ=require("obsidian");var Ka={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},lO={silent:{level:-1},fatal:{level:Ka.fatal},error:{level:Ka.error},warn:{level:Ka.warn},log:{level:Ka.log},info:{level:Ka.info},success:{level:Ka.success},fail:{level:Ka.fail},ready:{level:Ka.info},start:{level:Ka.info},box:{level:Ka.info},debug:{level:Ka.debug},trace:{level:Ka.trace},verbose:{level:Ka.verbose}};function oO(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 uO(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".",n=arguments.length>3?arguments[3]:void 0;if(!oO(t))return uO(e,{},r,n);var i=Object.assign({},t);for(var o in e){if(o==="__proto__"||o==="constructor")continue;var a=e[o];a!=null&&(n&&n(i,o,a,r)||(Array.isArray(a)&&Array.isArray(i[o])?i[o]=_to_consumable_array(a).concat(_to_consumable_array(i[o])):oO(a)&&oO(i[o])?i[o]=uO(a,i[o],(r?"".concat(r,"."):"")+o.toString(),n):i[o]=a))}return i}function HMe(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 uO(r,n,"",e)},{})}}var ZMe=HMe();function KMe(e){return Object.prototype.toString.call(e)==="[object Object]"}function QMe(e){return!(!KMe(e)||!e.message&&!e.args||e.stack)}var aO=!1,yJ=[],To=/*#__PURE__*/function(){"use strict";function To1(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};_class_call_check(this,To1);A(this,"options");A(this,"_lastLog");A(this,"_mockFn");var r=t.types||lO;this.options=ZMe(_object_spread_props(_object_spread({},t),{defaults:_object_spread({},t.defaults),level:sO(t.level,r),reporters:_to_consumable_array(t.reporters||[])}),{types:lO,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(To1,[{key:"level",get:function get1(){return this.options.level},set:function set1(t){this.options.level=sO(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 To(_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(){aO=!0}},{key:"resumeLogs",value:function resumeLogs(){aO=!1;var t=yJ.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(aO){yJ.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:sO(t.level,this.options.types)});!n&&r.length===1&&QMe(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 o=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 a=this._lastLog.time&&i.date?i.date.getTime()-this._lastLog.time.getTime():0;if(this._lastLog.time=i.date,athis.options.throttleMin)){this._lastLog.timeout=setTimeout(o,this.options.throttle);return}}catch(s){}o(!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 To1}();function sO(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}To.prototype.add=To.prototype.addReporter;To.prototype.remove=To.prototype.removeReporter;To.prototype.clear=To.prototype.removeReporter;To.prototype.withScope=To.prototype.withTag;To.prototype.mock=To.prototype.mockTypes;To.prototype.pause=To.prototype.pauseLogs;To.prototype.resume=To.prototype.resumeLogs;function vJ(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return new To(e)}var cO=/*#__PURE__*/function(){"use strict";function cO1(t){_class_call_check(this,cO1);A(this,"options");A(this,"defaultColor");A(this,"levelColorMap");A(this,"typeColorMap");this.options=_object_spread({},t),this.defaultColor="#7f8c8d",this.levelColorMap={0:"#c0392b",1:"#f39c12",3:"#00BCD4"},this.typeColorMap={success:"#2ecc71"}}_create_class(cO1,[{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||"",a="\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]),a,""].concat(_to_consumable_array(t.args.slice(1)))):r.apply(void 0,[s,a].concat(_to_consumable_array(t.args)))}}]);return cO1}();function dO(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return vJ(_object_spread({reporters:e.reporters||[new cO({})],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 h$t=dO();var JMe=dO({level:Ka.verbose,formatOptions:{date:!0,colors:!1}}),Me=JMe;var bd=require("obsidian");var _J="https://dav.jianguoyun.com/nsdav",bJ="https://dav.jianguoyun.com/dav",wJ="1.5.0",SJ="dc_obsidian_dp0gymrn",_d="nutstore-llm-gateway";function YMe(){return bd.Platform.isWin?"Windows":bd.Platform.isMacOS?"macOS":bd.Platform.isLinux?"Linux":bd.Platform.isAndroidApp?"Android":bd.Platform.isIosApp?"iOS":"Unknown"}function XMe(){return bd.Platform.isTablet?"Tablet":bd.Platform.isPhone?"Phone":bd.Platform.isDesktopApp?"Desktop":bd.Platform.isMobileApp?"Mobile":"Unknown"}function kJ(e){try{return new URL(e).hostname.toLowerCase().includes("jianguoyun")}catch(t){return!1}}var CJ="Obsidian (".concat(YMe(),"; ").concat(XMe(),"; ObsidianNutstoreSync/").concat(wJ,")"),EJ="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36";var pO=/*#__PURE__*/function(Error1){"use strict";_inherits(pO1,Error1);function pO1(r){_class_call_check(this,pO1);var _this;_this=_call_super(this,pO1,["".concat(r.status,": ").concat(r.text)]);_this.res=r;return _this}return pO1}(_wrap_native_super(Error));function Su(e){return _async_to_generator(function(){var t,r,n,i,o;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=kJ(t)?_object_spread_props(_object_spread({},r),{"User-Agent":CJ}):_object_spread_props(_object_spread({},r),{"User-Agent":EJ}),i=typeof e=="string"?{url:t,throw:!1,headers:n}:_object_spread_props(_object_spread({},e),{throw:!1,headers:n});return[4,(0,TJ.requestUrl)(i)];case 1:o=_state.sent();if(o.status>=400&&(Me.error(o),typeof e=="string"||e.throw!==!1))throw new pO(o);return[2,o]}})})()}function AJ(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 eOe(e){return!/[^\u0000-\u00ff]/g.test(e)}xJ&&KM().patch("request",function(e){return _async_to_generator(function(){var d,t,r,n,i,o,a,_tmp,s,u,l,c;return _ts_generator(this,function(_state){switch(_state.label){case 0:t=e,r=AJ(_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="");o={url:t.url,method:t.method,body:t.data,headers:r,contentType:n,throw:!1};return[4,Su(o)];case 1:a=_state.sent();_tmp=a.status===401&&PJ.Platform.isIosApp&&!t.url.endsWith("/")&&!t.url.endsWith(".md")&&t.method.toUpperCase()==="PROPFIND";if(!_tmp)return[3,3];o.url="".concat(t.url,"/");return[4,Su(o)];case 2:_tmp=a=_state.sent();_state.label=3;case 3:_tmp;s=AJ(_object_spread({},a.headers));for(var u in s)Object.prototype.hasOwnProperty.call(s,u)&&(eOe(s[u])||(s[u]=encodeURIComponent(s[u])));c=(0,IJ.getReasonPhrase)(a.status);return[2,([101,103,204,205,304].includes(a.status)?l=new Response(null,{status:a.status,statusText:c,headers:s}):l=new Response(a.arrayBuffer,{status:a.status,statusText:c,headers:s}),l)]}})})()});var mb=typeof Buffer=="function",D$t=typeof TextDecoder=="function"?new TextDecoder:void 0,RJ=typeof TextEncoder=="function"?new TextEncoder:void 0,tOe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",fb=Array.prototype.slice.call(tOe),g7=function(e){var t={};return e.forEach(function(r,n){return t[r]=n}),t}(fb),rOe=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,Dl=String.fromCharCode.bind(String),MJ=typeof Uint8Array.from=="function"?Uint8Array.from.bind(Uint8Array):function(e){return new Uint8Array(Array.prototype.slice.call(e,0))},$J=function(e){return e.replace(/=/g,"").replace(/[+\/]/g,function(t){return t=="+"?"-":"_"})},NJ=function(e){return e.replace(/[^A-Za-z0-9\+\/]/g,"")},nOe=function(e){var t,r,n,i,o="",a=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,o+=fb[t>>18&63]+fb[t>>12&63]+fb[t>>6&63]+fb[t&63]}return a?o.slice(0,a-3)+"===".substring(a):o},DJ=typeof btoa=="function"?function(e){return btoa(e)}:mb?function(e){return Buffer.from(e,"binary").toString("base64")}:nOe,fO=mb?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?$J(fO(e)):fO(e)},iOe=function(e){if(e.length<2){var t=e.charCodeAt(0);return t<128?e:t<2048?Dl(192|t>>>6)+Dl(128|t&63):Dl(224|t>>>12&15)+Dl(128|t>>>6&63)+Dl(128|t&63)}else{var t=65536+(e.charCodeAt(0)-55296)*1024+(e.charCodeAt(1)-56320);return Dl(240|t>>>18&7)+Dl(128|t>>>12&63)+Dl(128|t>>>6&63)+Dl(128|t&63)}},oOe=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,aOe=function(e){return e.replace(oOe,iOe)},OJ=mb?function(e){return Buffer.from(e,"utf8").toString("base64")}:RJ?function(e){return fO(RJ.encode(e))}:function(e){return DJ(aOe(e))},LJ=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return t?$J(OJ(e)):OJ(e)};var sOe=function(e){if(e=e.replace(/\s+/g,""),!rOe.test(e))throw new TypeError("malformed base64.");e+="==".slice(2-(e.length&3));var t,r,n,i=[];for(var o=0;o>16&255)):n===64?i.push(Dl(t>>16&255,t>>8&255)):i.push(Dl(t>>16&255,t>>8&255,t&255));return i.join("")},lOe=typeof atob=="function"?function(e){return atob(NJ(e))}:mb?function(e){return Buffer.from(e,"base64").toString("binary")}:sOe,uOe=mb?function(e){return MJ(Buffer.from(e,"base64"))}:function(e){return MJ(lOe(e).split("").map(function(t){return t.charCodeAt(0)}))},hb=function(e){return uOe(cOe(e))};var cOe=function(e){return NJ(e.replace(/[-_]/g,function(t){return t=="-"?"+":"/"}))};var hM=require("obsidian");var FJ=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 gb(e,t){t?t=_object_spread({},FJ,t):t=FJ;var r=jJ(t);return r.dispatch(e),r.toString()}var dOe=Object.freeze(["prototype","__proto__","constructor"]);function jJ(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 o=Object.prototype.toString.call(i),a="",s=o.length;s<10?a="unknown:["+o+"]":a=o.slice(8,s-1),a=a.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(a!=="object"&&a!=="function"&&a!=="asyncfunction")this[a]?this[a](i):e.ignoreUnknown||this.unkown(i,a);else{var c=Object.keys(i);e.unorderedObjects&&(c=c.sort());var d=[];e.respectType!==!1&&!zJ(i)&&(d=dOe),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 p10=_step1.value;u(p10)}}catch(err){_didIteratorError1=true;_iteratorError1=err}finally{try{if(!_iteratorNormalCompletion1&&_iterator1.return!=null){_iterator1.return()}}finally{if(_didIteratorError1){throw _iteratorError1}}}}},array:function array(i,o){if(o=o===void 0?e.unorderedArrays!==!1:o,n("array:"+i.length+":"),!o||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 a=new Map,s=i.map(function(l){var c=jJ(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];a.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=a,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,o){if(n(o),!!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:"),zJ(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 o=_to_consumable_array(i);return this.array(o,e.unorderedSets!==!1)},set:function set1(i){n("set:");var o=_to_consumable_array(i);return this.array(o,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 UJ="[native code] }",pOe=UJ.length;function zJ(e){return typeof e!="function"?!1:Function.prototype.toString.call(e).slice(-pOe)===UJ}var wd=/*#__PURE__*/function(){"use strict";function wd1(t,r){_class_call_check(this,wd1);A(this,"words");A(this,"sigBytes");t=this.words=t||[],this.sigBytes=r===void 0?t.length*4:r}_create_class(wd1,[{key:"toString",value:function toString(t){return(t||fOe).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 r10=0;r10>>2]=t.words[r10>>>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 wd(_to_consumable_array(this.words))}}]);return wd1}(),fOe={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("")}},mOe={stringify:function stringify(e){var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=[];for(var n=0;n>>2]>>>24-n%4*8&255,o=e.words[n+1>>>2]>>>24-(n+1)%4*8&255,a=e.words[n+2>>>2]>>>24-(n+2)%4*8&255,s=i<<16|o<<8|a;for(var l=0;l<4&&n*8+l*6>>6*(3-l)&63))}return r.join("")}},hOe={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 wd(r,t)}},gOe={parse:function parse(e){return hOe.parse(unescape(encodeURIComponent(e)))}},mO=/*#__PURE__*/function(){"use strict";function mO1(){_class_call_check(this,mO1);A(this,"_data",new wd);A(this,"_nDataBytes",0);A(this,"_minBufferSize",0);A(this,"blockSize",512/32)}_create_class(mO1,[{key:"reset",value:function reset(){this._data=new wd,this._nDataBytes=0}},{key:"_append",value:function _append(t){typeof t=="string"&&(t=gOe.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,o=Math.min(i*4,this._data.sigBytes);if(i){for(var a=0;a>>7)^(b<<14|b>>>18)^b>>>3,S=hg[m-2],k=(S<<15|S>>>17)^(S<<13|S>>>19)^S>>>10;hg[m]=w+hg[m-7]+k+hg[m-16]}var h=c&d^~c&u,g=o&a^o&s^a&s,x=(o<<30|o>>>2)^(o<<19|o>>>13)^(o<<10|o>>>22),v=(c<<26|c>>>6)^(c<<21|c>>>11)^(c<<7|c>>>25),y=p+v+h+xOe[m]+hg[m],_=x+g;p=u,u=d,d=c,c=l+y|0,l=s,s=a,a=o,o=y+_|0}i[0]=i[0]+o|0,i[1]=i[1]+a|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(gO1.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 gO1}(hO);function yOe(e){return new gO().finalize(e).toString(mOe)}function Qa(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};var r=typeof e=="string"?e:gb(e,t);return yOe(r).slice(0,10)}function rx(e,t){return{hash:Qa({type:"vault-path",kind:t,path:e}),type:"vault-path",kind:t,path:e}}function x7(e){return _object_spread_props(_object_spread({},e),{range:{from:_object_spread({},e.range.from),to:_object_spread({},e.range.to)},hash:Qa(e)})}function y7(e,t){return _async_to_generator(function(){var a,r,n,i,o;return _ts_generator(this,function(_state){switch(_state.label){case 0:r=(t==null?void 0:t.mimeType)||e.type||"image/png",n=(a=t==null?void 0:t.size)!=null?a:e.size,i=e.type===r?e:new Blob([e],{type:r});return[4,_Oe(i)];case 1:o=_state.sent();return[2,{hash:Qa({type:"image",mimeType:r,size:n,dataUrl:o}),type:"image",blob:e,mimeType:r,name:t==null?void 0:t.name,size:n}]}})})()}function WJ(e,t){var o;var r=t.mimeType||e.type||"application/octet-stream",n=(o=t.size)!=null?o:e.size,i="lastModified"in e&&typeof e.lastModified=="number"?e.lastModified:void 0;return{hash:Qa({type:"file",mimeType:r,filename:t.filename,size:n,lastModified:i}),type:"file",blob:e,mimeType:r,filename:t.filename,size:n}}var qJ=0;function v7(e,t){qJ+=1;var r="pending-context-".concat(Date.now().toString(36),"-").concat(qJ);return{type:"pending-context",placeholderType:e,id:r,placeholder:t}}function Sd(e){return e.type==="pending-context"?e.id:e.hash?e.hash:e.type==="vault-path"?Qa({type:"vault-path",kind:e.kind,path:e.path}):e.type==="selection"?Qa({type:"selection",filePath:e.filePath,range:e.range,selectedText:e.selectedText}):e.type==="file"?Qa({type:"file",mimeType:e.mimeType,filename:e.filename,size:e.size}):Qa({type:"image",mimeType:e.mimeType,size:e.size})}function vOe(e){if(e.type==="pending-context")return _object_spread({},e);var t=Sd(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 sm(e){var t=vOe(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 gg(e){return e.map(sm)}function _Oe(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 _7(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 GJ=require("obsidian");var VJ='';var xg="nutstore-ai",wOe=VJ.replaceAll("#000000","currentColor"),SOe=wOe.replace(/^]*>/,"").replace(/<\/svg>\s*$/,""),kOe=''.concat(SOe,"");function HJ(){(0,GJ.addIcon)(xg,kOe)}var nxe=require("obsidian");function xO(){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(xO.apply(void 0,_to_consumable_array(t))))}function Dn(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(xO.apply(void 0,_to_consumable_array(t))))}function $p(e,t,r){var _iteratorNormalCompletion=true,_didIteratorError=false,_iteratorError=undefined;try{for(var _iterator=xO(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 yO=function yO1(e,t){return yO=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])},yO(e,t)};function ku(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");yO(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}function xb(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 Np(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o}function Dp(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,o;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,o=i.hasError,a=i.isStopped,s=i.observers;return o||a?vO:(this.currentObservers=null,s.push(r),new lm(function(){n.currentObservers=null,yg(s,r)}))},t.prototype._checkFinalizedStatuses=function(r){var n=this,i=n.hasError,o=n.thrownError,a=n.isStopped;i?r.error(o):a&&r.complete()},t.prototype.asObservable=function(){var r=new yb;return r.source=this,r},t.create=function(r,n){return new oY(r,n)},t}(yb);var oY=function(e){ku(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:vO},t}(Ln);var CO={now:function now(){return(CO.delegate||Date).now()},delegate:void 0};var aY=function(e){ku(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}(lm);var vb={setInterval:function setInterval1(e,t){for(var r=[],n=2;n-1?e.replace(OOe,"."):e},PY=function(e){return!e||vr(e)},wb=function(e,t,r){var n=vr(t)?t.split("."):t,i=0;for(;i":">",'"':""","'":"'","/":"/"},LOe=function(e){return vr(e)?e.replace(/[&<>"'\/]/g,function(t){return DOe[t]}):e},AO=/*#__PURE__*/function(){"use strict";function AO1(t){_class_call_check(this,AO1);this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}_create_class(AO1,[{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 AO1}(),FOe=[" ",",","?","!",";"],zOe=new AO(20),jOe=function(e,t,r){t=t||"",r=r||"";var n=FOe.filter(function(a){return t.indexOf(a)<0&&r.indexOf(a)<0});if(n.length===0)return!0;var i=zOe.getRegExp("(".concat(n.map(function(a){return a==="?"?"\\?":a}).join("|"),")")),o=!i.test(e);if(!o){var a=e.indexOf(r);a>0&&!i.test(e.substring(0,a))&&(o=!0)}return o},IO=function IO1(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 o=0;o-1&&l1&&arguments[1]!==void 0?arguments[1]:{};this.init(t,r)}_create_class(sx1,[{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||UOe,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,U71),_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(U71,[{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]:{},o=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,a=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)):vr(n)&&o?(_s2=s).push.apply(_s2,_to_consumable_array(n.split(o))):s.push(n)));var l=z7(this.data,s);return!l&&!r&&!n&&t.indexOf(".")>-1&&(t=s[0],r=s[1],n=s.slice(2).join(".")),l||!a||!vr(n)?l:IO((d=(c=this.data)==null?void 0:c[t])==null?void 0:d[r],n,o)}},{key:"addResource",value:function addResource(t,r,n,i){var o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1},a=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,s=[t,r];n&&(s=s.concat(a?n.split(a):n)),t.indexOf(".")>-1&&(s=t.split("."),i=r,r=s[1]),this.addNamespaces(r),RY(this.data,s,i),o.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 o in n)(vr(n[o])||Array.isArray(n[o]))&&this.addResource(t,r,o,n[o],{silent:!0});i.silent||this.emit("added",t,r,n)}},{key:"addResourceBundle",value:function addResourceBundle(t,r,n,i,o){var a=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=z7(this.data,s)||{};a.skipCopy||(n=JSON.parse(JSON.stringify(n))),i?zY(l,n,o):l=_object_spread({},l,n),RY(this.data,s,l),a.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 U71}(lx),jY={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(o){var a,s;t=(s=(a=_this.processors[o])==null?void 0:a.process(t,r,n,i))!=null?s:t}),t}},MY={},OY=function(e){return!vr(e)&&typeof e!="boolean"&&typeof e!="number"},ux=/*#__PURE__*/function(lx1){"use strict";_inherits(ux1,lx1);function ux1(t){_class_call_check(this,ux1);var _this;var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};_this=_call_super(this,ux1),MOe(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,_this),_this.options=r,_this.options.keySeparator===void 0&&(_this.options.keySeparator="."),_this.logger=kd.create("translator");return _this}_create_class(ux1,[{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,o=r.ns||this.options.defaultNS||[],a=n&&t.indexOf(n)>-1,s=!this.options.userDefinedKeySeparator&&!r.keySeparator&&!this.options.userDefinedNsSeparator&&!r.nsSeparator&&!jOe(t,n,i);if(a&&!s){var l=t.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:t,namespaces:vr(o)?[o]:o};var c=t.split(n);(n!==i||n===i&&this.options.ns.indexOf(c[0])>-1)&&(o=c.shift()),t=c.join(i)}return{key:t,namespaces:vr(o)?[o]:o}}},{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,o=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator,_this_extractFromKey=this.extractFromKey(t[t.length-1],r),a=_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 I=r.nsSeparator||this.options.nsSeparator;return i?{res:"".concat(l).concat(I).concat(a),usedKey:a,exactUsedKey:a,usedLng:c,usedNS:l,usedParams:this.getUsedParamsDetails(r)}:"".concat(l).concat(I).concat(a)}return i?{res:a,usedKey:a,exactUsedKey:a,usedLng:c,usedNS:l,usedParams:this.getUsedParamsDetails(r)}:a}var u=this.resolve(t,r),p=u==null?void 0:u.res,m=(u==null?void 0:u.usedKey)||a,h=(u==null?void 0:u.exactUsedKey)||a,g=["[object Number]","[object Function]","[object RegExp]"],x=r.joinArrays!==void 0?r.joinArrays:this.options.joinArrays,v=!this.i18nFormat||this.i18nFormat.handleAsObject,y=r.count!==void 0&&!vr(r.count),_=ux.hasDefaultValue(r),b=y?this.pluralResolver.getSuffix(c,r.count,r):"",w=r.ordinal&&y?this.pluralResolver.getSuffix(c,r.count,{ordinal:!1}):"",S=y&&!r.ordinal&&r.count===0,k=S&&r["defaultValue".concat(this.options.pluralSeparator,"zero")]||r["defaultValue".concat(b)]||r["defaultValue".concat(w)]||r.defaultValue,E=p;v&&!p&&_&&(E=k);var C=OY(E),T=Object.prototype.toString.apply(E);if(v&&E&&C&&g.indexOf(T)<0&&!(vr(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 I1=this.options.returnedObjectHandler?this.options.returnedObjectHandler(m,E,_object_spread_props(_object_spread({},r),{ns:s})):"key '".concat(a," (").concat(this.language,")' returned an object instead of string.");return i?(u.res=I1,u.usedParams=this.getUsedParamsDetails(r),u):I1}if(o){var I10=Array.isArray(E),O=I10?[]:{},M=I10?h:m;for(var R in E)if(Object.prototype.hasOwnProperty.call(E,R)){var $="".concat(M).concat(o).concat(R);_&&!p?O[R]=this.translate($,_object_spread_props(_object_spread({},r),{defaultValue:OY(k)?k[R]:void 0,joinArrays:!1,ns:s})):O[R]=this.translate($,_object_spread_props(_object_spread({},r),{joinArrays:!1,ns:s})),O[R]===$&&(O[R]=E[R])}p=O}}else if(v&&vr(x)&&Array.isArray(p))p=p.join(x),p&&(p=this.extendTranslation(p,t,r,n));else{var I11=!1,O1=!1;!this.isValidLookup(p)&&_&&(I11=!0,p=k),this.isValidLookup(p)||(O1=!0,p=a);var R1=(r.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&O1?void 0:p,$1=_&&k!==p&&this.options.updateMissing;if(O1||I11||$1){if(this.logger.log($1?"updateKey":"missingKey",c,l,a,$1?k:p),o){var ee=this.resolve(a,_object_spread_props(_object_spread({},r),{keySeparator:!1}));ee&&ee.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 z=[],D=this.languageUtils.getFallbackCodes(this.options.fallbackLng,r.lng||this.language);if(this.options.saveMissingTo==="fallback"&&D&&D[0])for(var ee1=0;ee11&&arguments[1]!==void 0?arguments[1]:{},n,i,o,a,s;return vr(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&&!vr(r.count),m=p&&!r.ordinal&&r.count===0,h=r.context!==void 0&&(vr(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 v,y;_this.isValidLookup(n)||(s=x,!MY["".concat(g[0],"-").concat(x)]&&(v=_this.utils)!=null&&v.hasLoadedNamespace&&!((y=_this.utils)!=null&&y.hasLoadedNamespace(s))&&(MY["".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 S;if(_this.isValidLookup(n))return;a=_;var b=[d];if((S=_this.i18nFormat)!=null&&S.addLookupKeys)_this.i18nFormat.addLookupKeys(b,d,_,x,r);else{var k;p&&(k=_this.pluralResolver.getSuffix(_,r.count,r));var E="".concat(_this.options.pluralSeparator,"zero"),C="".concat(_this.options.pluralSeparator,"ordinal").concat(_this.options.pluralSeparator);if(p&&(b.push(d+k),r.ordinal&&k.indexOf(C)===0&&b.push(d+k.replace(C,_this.options.pluralSeparator)),m&&b.push(d+E)),h){var T="".concat(d).concat(_this.options.contextSeparator).concat(r.context);b.push(T),p&&(b.push(T+k),r.ordinal&&k.indexOf(C)===0&&b.push(T+k.replace(C,_this.options.pluralSeparator)),m&&b.push(T+E))}}var w;for(;w=b.pop();)_this.isValidLookup(n)||(o=w,n=_this.getResource(_,x,w,r))}))})}),{res:n,usedKey:i,exactUsedKey:o,usedLng:a,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 o;var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return(o=this.i18nFormat)!=null&&o.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&&!vr(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 o=_step.value;delete i[o]}}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 ux1}(lx),B7=/*#__PURE__*/function(){"use strict";function B71(t){_class_call_check(this,B71);this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=kd.create("languageUtils")}_create_class(B71,[{key:"getScriptPartFromCode",value:function getScriptPartFromCode(t){if(t=j7(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=j7(t),!t||t.indexOf("-")<0)return t;var r=t.split("-");return this.formatLanguageCode(r[0])}},{key:"formatLanguageCode",value:function formatLanguageCode(t){if(vr(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(o){if(o===i)return o;if(!(o.indexOf("-")<0&&i.indexOf("-")<0)&&(o.indexOf("-")>0&&i.indexOf("-")<0&&o.substring(0,o.indexOf("-"))===i||o.indexOf(i)===0&&i.length>1))return o})}),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)),vr(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=[],o=function(a){a&&(_this.isSupportedCode(a)?i.push(a):_this.logger.warn("rejecting language code not found in supportedLngs: ".concat(a)))};return vr(t)&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&o(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&o(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&o(this.getLanguagePartFromCode(t))):vr(t)&&o(this.formatLanguageCode(t)),n.forEach(function(a){i.indexOf(a)<0&&o(_this.formatLanguageCode(a))}),i}}]);return B71}(),$Y={zero:0,one:1,two:2,few:3,many:4,other:5},NY={select:function(e){return e===1?"one":"other"},resolvedOptions:function(){return{pluralCategories:["one","other"]}}},PO=/*#__PURE__*/function(){"use strict";function PO1(t){_class_call_check(this,PO1);var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=t,this.options=r,this.logger=kd.create("pluralResolver"),this.pluralRulesCache={}}_create_class(PO1,[{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=j7(t==="dev"?"en":t),i=r.ordinal?"ordinal":"cardinal",o=JSON.stringify({cleanedCode:n,type:i});if(o in this.pluralRulesCache)return this.pluralRulesCache[o];var a;try{a=new Intl.PluralRules(n,{type:i})}catch(s){if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),NY;if(!t.match(/-|_/))return NY;var l=this.languageUtils.getLanguagePartFromCode(t);a=this.getRule(l,r)}return this.pluralRulesCache[o]=a,a}},{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,o){return $Y[i]-$Y[o]}).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 PO1}(),DY=function DY1(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,o=NOe(e,t,r);return!o&&i&&vr(r)&&(o=IO(e,r,n),o===void 0&&(o=IO(t,r,n))),o},TO=function(e){return e.replace(/\$/g,"$$$$")},RO=/*#__PURE__*/function(){"use strict";function RO1(){_class_call_check(this,RO1);var r;var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=kd.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(RO1,[{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,o=_t_interpolation.prefix,a=_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,v=_t_interpolation.maxReplaces,y=_t_interpolation.alwaysFormat;this.escape=r!==void 0?r:LOe,this.escapeValue=n!==void 0?n:!0,this.useRawValueToEscape=i!==void 0?i:!1,this.prefix=o?ox(o):a||"{{",this.suffix=s?ox(s):l||"}}",this.formatSeparator=c||",",this.unescapePrefix=d?"":u||"-",this.unescapeSuffix=this.unescapePrefix?"":d||"",this.nestingPrefix=p?ox(p):m||ox("$t("),this.nestingSuffix=h?ox(h):g||ox(")"),this.nestingOptionsSeparator=x||",",this.maxReplaces=v||1e3,this.alwaysFormat=y!==void 0?y:!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 o,a,s,l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=function(h){if(h.indexOf(_this.formatSeparator)<0){var y=DY(r,l,h,_this.options.keySeparator,_this.options.ignoreJSONStructure);return _this.alwaysFormat?_this.format(y,void 0,n,_object_spread_props(_object_spread({},i,r),{interpolationkey:h})):y}var g=h.split(_this.formatSeparator),x=g.shift().trim(),v=g.join(_this.formatSeparator).trim();return _this.format(DY(r,l,x,_this.options.keySeparator,_this.options.ignoreJSONStructure),v,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 TO(h)}},{regex:this.regexp,safeValue:function(h){return _this.escapeValue?TO(_this.escape(h)):TO(h)}}].forEach(function(h){for(s=0;o=h.regex.exec(t);){var g=o[1].trim();if(a=c(g),a===void 0)if(typeof d=="function"){var v=d(t,o,i);a=vr(v)?v:""}else if(i&&Object.prototype.hasOwnProperty.call(i,g))a="";else if(u){a=o[0];continue}else _this.logger.warn("missed to pass in variable ".concat(g," for interpolating ").concat(t)),a="";else!vr(a)&&!_this.useRawValueToEscape&&(a=AY(a));var x=h.safeValue(a);if(t=t.replace(o[0],x),u?(h.regex.lastIndex+=a.length,h.regex.lastIndex-=o[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,o,a,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,a);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{a=JSON.parse(p),c&&(a=_object_spread({},c,a))}catch(x){return _this.logger.warn("failed parsing options string in nesting for key ".concat(l),x),"".concat(l).concat(d).concat(p)}return a.defaultValue&&a.defaultValue.indexOf(_this.prefix)>-1&&delete a.defaultValue,l};for(;i=this.nestingRegexp.exec(t);){var l=[];a=_object_spread({},n),a=a.replace&&!vr(a.replace)?a.replace:a,a.applyPostProcessor=!1,delete a.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(o=r(s.call(this,i[1].trim(),a),a),o&&i[0]===t&&!vr(o))return o;vr(o)||(o=AY(o)),o||(this.logger.warn("missed to resolve ".concat(i[1]," for nesting ").concat(t)),o=""),c&&(o=l.reduce(function(d,u){return _this.format(d,u,n.lng,_object_spread_props(_object_spread({},n),{interpolationkey:i[1].trim()}))},o.trim())),t=t.replace(i[0],o),this.regexp.lastIndex=0}return t}}]);return RO1}(),BOe=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(a){if(a){var _a_split=_to_array(a.split(":")),s=_a_split[0],l=_a_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}},ax=function(e){var t={};return function(r,n,i){var o=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(o=_object_spread_props(_object_spread({},o),_define_property({},i.interpolationkey,void 0)));var a=n+JSON.stringify(o),s=t[a];return s||(s=e(j7(n),i),t[a]=s),s(r)}},MO=/*#__PURE__*/function(){"use strict";function MO1(){_class_call_check(this,MO1);var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=kd.create("formatter"),this.options=t,this.formats={number:ax(function(r,n){var i=new Intl.NumberFormat(r,_object_spread({},n));return function(o){return i.format(o)}}),currency:ax(function(r,n){var i=new Intl.NumberFormat(r,_object_spread_props(_object_spread({},n),{style:"currency"}));return function(o){return i.format(o)}}),datetime:ax(function(r,n){var i=new Intl.DateTimeFormat(r,_object_spread({},n));return function(o){return i.format(o)}}),relativetime:ax(function(r,n){var i=new Intl.RelativeTimeFormat(r,_object_spread({},n));return function(o){return i.format(o,n.range||"day")}}),list:ax(function(r,n){var i=new Intl.ListFormat(r,_object_spread({},n));return function(o){return i.format(o)}})},this.init(t)}_create_class(MO1,[{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()]=ax(r)}},{key:"format",value:function format(t,r,n){var _this=this;var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},o=r.split(this.formatSeparator);if(o.length>1&&o[0].indexOf("(")>1&&o[0].indexOf(")")<0&&o.find(function(s){return s.indexOf(")")>-1})){var s=o.findIndex(function(l){return l.indexOf(")")>-1});o[0]=[o[0]].concat(_to_consumable_array(o.splice(1,s))).join(this.formatSeparator)}return o.reduce(function(s,l){var u;var _BOe=BOe(l),c=_BOe.formatName,d=_BOe.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 MO1}(),qOe=function(e,t){e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)},OO=/*#__PURE__*/function(lx1){"use strict";_inherits(OO1,lx1);function OO1(t,r,n){_class_call_check(this,OO1);var _this;var o,a;var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};_this=_call_super(this,OO1),_this.backend=t,_this.store=r,_this.services=n,_this.languageUtils=n.languageUtils,_this.options=i,_this.logger=kd.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=[],(a=(o=_this.backend)==null?void 0:o.init)==null||a.call(o,n,i.backend,i);return _this}_create_class(OO1,[{key:"queueLoad",value:function queueLoad(t,r,n,i){var _this=this;var o={},a={},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?a[p]===void 0&&(a[p]=!0):(_this.state[p]=1,d=!1,a[p]===void 0&&(a[p]=!0),o[p]===void 0&&(o[p]=!0),l[u]===void 0&&(l[u]=!0)))}),d||(s[c]=!0)}),(Object.keys(o).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(o),pending:Object.keys(a),toLoadLanguages:Object.keys(s),toLoadNamespaces:Object.keys(l)}}},{key:"loaded",value:function loaded(t,r,n){var i=t.split("|"),o=i[0],a=i[1];r&&this.emit("failedLoading",o,a,r),!r&&n&&this.store.addResourceBundle(o,a,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){$Oe(l.loaded,[o],a),qOe(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,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,a=arguments.length>5?arguments[5]:void 0;if(!t.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:r,fcName:n,tried:i,wait:o,callback:a});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,o*2,a)},o);return}a(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();vr(t)&&(t=this.languageUtils.toResolveHierarchy(t)),vr(r)&&(r=[r]);var o=this.queueLoad(t,r,n,i);if(!o.toLoad.length)return o.pending.length||i(),null;o.toLoad.forEach(function(a){_this.loadOne(a)})}},{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],o=n[1];this.read(i,o,"read",void 0,void 0,function(a,s){a&&_this.logger.warn("".concat(r,"loading namespace ").concat(o," for language ").concat(i," failed"),a),!a&&s&&_this.logger.log("".concat(r,"loaded namespace ").concat(o," for language ").concat(i),s),_this.loaded(t,a,s)})}},{key:"saveMissing",value:function saveMissing(t,r,n,i,o){var l,c,d,u,p;var a=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({},a),{isUpdate:o}),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 OO1}(lx),LY=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]),vr(e[1])&&(t.defaultValue=e[1]),vr(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}}},FY=function(e){var t,r;return vr(e.ns)&&(e.ns=[e.ns]),vr(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),vr(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},F7=function(){},WOe=function(e){Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(function(r){typeof e[r]=="function"&&(e[r]=e[r].bind(e))})},bg=/*#__PURE__*/function(lx1){"use strict";_inherits(bg1,lx1);function bg1(){_class_call_check(this,bg1);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,bg1),_this.options=FY(t),_this.services={},_this.logger=kd,_this.modules={external:[]},WOe(_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(bg1,[{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&&(vr(r.ns)?r.defaultNS=r.ns:r.ns.indexOf("translation")<0&&(r.defaultNS=r.ns[0]));var i=LY();this.options=_object_spread({},i,this.options,FY(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 o=function(d){return d?typeof d=="function"?new d:d:null};if(!this.options.isClone){this.modules.logger?kd.init(o(this.modules.logger),this.options):kd.init(null,this.options);var d;this.modules.formatter?d=this.modules.formatter:d=MO;var u=new B7(this.options);this.store=new U7(this.options.resources,this.options);var p=this.services;p.logger=kd,p.resourceStore=this.store,p.languageUtils=u,p.pluralResolver=new PO(u,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),d&&(!this.options.interpolation.format||this.options.interpolation.format===i.interpolation.format)&&(p.formatter=o(d),p.formatter.init(p,this.options),this.options.interpolation.format=p.formatter.format.bind(p.formatter)),p.interpolator=new RO(this.options),p.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},p.backendConnector=new OO(o(this.modules.backend),p.resourceStore,p,this.options),p.backendConnector.on("*",function(m){var _t1;for(var h=arguments.length,g=new Array(h>1?h-1:0),x=1;x1?h-1:0),x=1;x0&&d10[0]!=="dev"&&(this.options.lng=d10[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=bb(),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 o,a;var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:F7,i=vr(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)}),(a=(o=this.options.preload)==null?void 0:o.forEach)==null||a.call(o,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=bb();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=F7),this.services.backendConnector.reload(t,r,function(o){i.resolve(),n(o)}),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"&&jY.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=bb();this.emit("languageChanging",t);var o=function(l){_this.language=l,_this.languages=_this.services.languageUtils.toResolveHierarchy(l),_this.resolvedLanguage=void 0,_this.setResolvedLanguage(l)},a=function(l,c){c?(o(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 _n;return(_n=n).t.apply(_n,arguments)}),r&&r(l,function(){var _n;return(_n=n).t.apply(_n,arguments)})},s=function(l){var d,u;!t&&!l&&_this.services.languageDetector&&(l=[]);var c=vr(l)?l:_this.services.languageUtils.getBestMatchFromCodes(l);c&&(_this.language||o(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){a(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 o=function o10(a,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,o=this.languages[this.languages.length-1];if(n.toLowerCase()==="cimode")return!0;var a=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,a);if(s!==void 0)return s}return!!(this.hasResourceBundle(n,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(n,t)&&(!i||a(o,t)))}},{key:"loadNamespaces",value:function loadNamespaces(t,r){var _this=this;var n=bb();return this.options.ns?(vr(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=bb();vr(t)&&(t=[t]);var i=this.options.preload||[],o=t.filter(function(a){return i.indexOf(a)<0&&_this.services.languageUtils.isSupportedCode(a)});return o.length?(this.options.preload=i.concat(o),this.loadResources(function(a){n.resolve(),r&&r(a)}),n):(r&&r(),Promise.resolve())}},{key:"dir",value:function dir(t){var i,o;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=((o=this.services)==null?void 0:o.languageUtils)||new B7(LY());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]:F7,n=t.forkResourceStore;n&&delete t.forkResourceStore;var i=_object_spread_props(_object_spread({},this.options,t),{isClone:!0}),o=new bg(i);if((t.debug!==void 0||t.prefix!==void 0)&&(o.logger=o.logger.clone(t)),["store","services","language"].forEach(function(s){o[s]=_this[s]}),o.services=_object_spread({},this.services),o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},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},{})},{});o.store=new U7(s,i),o.services.resourceStore=o.store}return o.translator=new ux(o.services,i),o.translator.on("*",function(s){var _o1;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 bg(t,r)}}]);return bg1}(lx),fa=bg.createInstance();fa.createInstance=bg.createInstance;var iLt=fa.createInstance,oLt=fa.dir,aLt=fa.init,sLt=fa.loadResources,lLt=fa.reloadResources,uLt=fa.use,cLt=fa.changeLanguage,dLt=fa.getFixedT,pLt=fa.t,fLt=fa.exists,mLt=fa.setDefaultNamespace,hLt=fa.hasLoadedNamespace,gLt=fa.loadNamespaces,xLt=fa.loadLanguages;var q7={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:"Sync rules: two-way sync\n\n• Local-only change → update the cloud\n• Cloud-only change → update the local vault\n• Both local and cloud changed → use the configured conflict strategy\n• One side deleted, the other unchanged → propagate the deletion\n• One side deleted, the other changed → keep the changed copy and restore the deleted side",sendOnlyDesc:"Sync rules: local → cloud (protect cloud-side changes)\n\n• Local new or modified file, unless the cloud copy was independently deleted → upload to the cloud\n• Cloud-only new or modified file → preserve it; do not download it\n• Both local and cloud changed → skip and preserve the cloud copy\n• Local deleted, cloud unchanged → delete the cloud copy\n• Local deleted, cloud also changed → skip and preserve the cloud copy\n• A file with sync history that was deleted in the cloud → preserve the cloud deletion; it is not restored unless you choose “Send Only: Override Changes”\n\nBest for: local as source of truth while protecting independent cloud changes.",sendOnlyOverrideChangesDesc:"Sync rules: cloud ← current local state\n\n• Local files → create or overwrite the cloud copy\n• Cloud exists, local does not → delete the cloud copy\n• Same path differs on both sides → use the local copy\n\n⚠️ May delete cloud-only content.\nUse when you need the cloud to match this device exactly.",receiveOnlyDesc:"Sync rules: cloud → local (protect local-side changes)\n\n• Cloud new or modified file, unless the local copy has a deletion to protect → download to the local vault\n• Local-only new or modified file → preserve it; do not upload it\n• Both local and cloud changed → skip and preserve the local copy\n• Cloud deleted, local unchanged → delete the local copy\n• Cloud deleted, local also changed → skip and preserve the local copy\n• A file with sync history that was deleted locally → preserve the local deletion; it is not restored unless you choose “Receive Only: Revert Local Changes”\n\nBest for: cloud as source of truth while protecting independent local changes.",receiveOnlyRevertLocalChangesDesc:"Sync rules: local ← current cloud state\n\n• Cloud files → create or overwrite the local copy\n• Local exists, cloud does not → delete the local copy\n• Same path differs on both sides → use the cloud copy\n\n⚠️ May delete local-only content.\nUse when you need the local vault to match the cloud exactly.",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."},subagents:{heading:"Subagents",explorer:{name:"Explorer",desc:"A read-only agent for investigating vault contents.",model:{name:"Explorer model",desc:"Leave blank to inherit the model of the agent that dispatches the task."}},memory:{name:"Memory",desc:"An agent for retrieving and maintaining cross-session preferences, conventions and decisions.",model:{name:"Memory model",desc:"Leave blank to inherit the model of the agent that dispatches the task."}}},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:",purpose:"Purpose",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",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",progressCompleteTitle:"Sync complete",progressLabel:"Sync progress",cacheProgressLabel:"Cache update progress",syncingFiles:"Syncing files...",updatingCache:"Updating local cache...",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",policyBasis:"Basis for the decision: current local and cloud states are compared with the last sync record.\nWithout a sync record, Loose mode treats same-path, same-type files with the same size as equal; Strict mode follows the selected policy.",policyRecordNote:"Preserved or skipped items are not marked as synchronized; the next sync will evaluate them again against the sync record.",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",duration:"Duration"},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:{loading:"Restoring chat…",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",contextCompressionFailed:"Context compression returned no summary"}},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 W7={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 可自动修改文件和插件设置,不再逐次询问确认"},subagents:{heading:"子 Agent",explorer:{name:"Explorer",desc:"用于只读调查库内内容的 Agent。",model:{name:"Explorer 模型",desc:"留空时继承派发该任务的 Agent 所使用的模型。"}},memory:{name:"Memory",desc:"用于检索和维护跨会话偏好、约定和决定的 Agent。",model:{name:"Memory 模型",desc:"留空时继承派发该任务的 Agent 所使用的模型。"}}},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\n• 仅本地变更 → 更新云端\n• 仅云端变更 → 更新本地\n• 本地和云端都变更 → 按已配置的冲突策略处理\n• 一侧删除、另一侧未变更 → 将删除同步到另一侧\n• 一侧删除、另一侧已变更 → 保留已变更内容,并恢复被删除的一侧",sendOnlyDesc:"同步规则:本地 → 云端(保护云端独立变更)\n\n• 本地新增或修改,且云端未独立删除 → 上传到云端\n• 云端独立新增或修改 → 保留云端,不下载\n• 本地和云端都修改 → 跳过并保留云端\n• 本地删除、云端未变更 → 删除云端\n• 本地删除、云端也变更 → 跳过并保留云端\n• 已有同步记录的文件若已在云端删除 → 保留云端删除,不自动恢复;需要“仅发送:覆盖云端”才恢复\n\n适合:以本地为主,同时保护云端独立变更。",sendOnlyOverrideChangesDesc:"同步规则:云端 ← 本地当前状态\n\n• 本地存在的文件 → 创建或覆盖云端文件\n• 云端存在、本地不存在 → 删除云端\n• 同一路径两边不一致 → 以本地为准\n\n⚠️ 可能删除云端多余文件。\n适合:需要让云端与本地完全一致时使用。",receiveOnlyDesc:"同步规则:云端 → 本地(保护本地独立变更)\n\n• 云端新增或修改,且本地没有需要保护的删除 → 下载到本地\n• 本地独立新增或修改 → 保留本地,不上传\n• 本地和云端都修改 → 跳过并保留本地\n• 云端删除、本地未变更 → 删除本地\n• 云端删除、本地也变更 → 跳过并保留本地\n• 已有同步记录的文件若已在本地删除 → 保留本地删除,不自动恢复;需要“仅接收:还原本地”才恢复\n\n适合:以云端为主,同时保护本地独立变更。",receiveOnlyRevertLocalChangesDesc:"同步规则:本地 ← 云端当前状态\n\n• 云端存在的文件 → 创建或覆盖本地文件\n• 本地存在、云端不存在 → 删除本地\n• 同一路径两边不一致 → 以云端为准\n\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 正在请求执行以下文件操作:",purpose:"用途",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:"✅ 同步完成",completeWithFailed:"❌ 同步完成,但有 {{failedCount}} 个任务失败",failedWithError:"同步失败,错误信息: {{error}}",progress:"同步进度: {{percent}}%",blockedBySync:"同步正在进行中,请稍后再试。",stoppingGcForSync:"检测到垃圾回收正在进行,正在停止清理并开始同步。",startButton:"开始同步",stopButton:"停止同步",hideButton:"隐藏",closeButton:"关闭",showProgressButton:"显示同步进度",notSyncing:"尚未开始同步",percentComplete:"{{percent}}%",currentFile:"{{path}}",filePath:"{{path}}",progressTitle:"同步进度",progressCompleteTitle:"同步完成",progressLabel:"同步进度",cacheProgressLabel:"缓存更新进度",syncingFiles:"正在同步文件...",updatingCache:"正在更新本地缓存...",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:"本次同步策略",policyBasis:"判断基准:将当前本地与云端状态分别和上次同步记录比较。\n没有同步记录时,宽松模式会把同路径、同类型且大小相同的文件视为一致;严格模式按所选策略处理。",policyRecordNote:"“保留”或“跳过”不会标记为已同步,下一次仍会按同步记录重新判断。",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",duration:"运行时间"},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:{loading:"正在恢复聊天…",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:"任务对应的会话或模型配置已不可用",contextCompressionFailed:"上下文压缩未返回摘要"}},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 HOe="translation",ZOe={zh:{translation:W7},en:{translation:q7}};fa.init({ns:["translation"],defaultNS:HOe,resources:ZOe,fallbackLng:"en",interpolation:{escapeValue:!1}});var P=fa;var Pr=/*#__PURE__*/function(){"use strict";function Pr1(){_class_call_check(this,Pr1)}_create_class(Pr1,[{key:"onload",value:function onload(){}},{key:"onunload",value:function onunload(){}}]);return Pr1}();var KOe=(typeof global==="undefined"?"undefined":_type_of(global))=="object"&&global&&global.Object===Object&&global,V7=KOe;var QOe=(typeof self==="undefined"?"undefined":_type_of(self))=="object"&&self&&self.Object===Object&&self,JOe=V7||QOe||Function("return this")(),En=JOe;var YOe=En.Symbol,Cu=YOe;var UY=Object.prototype,XOe=UY.hasOwnProperty,e$e=UY.toString,Sb=Cu?Cu.toStringTag:void 0;function t$e(e){var t=XOe.call(e,Sb),r=e[Sb];try{e[Sb]=void 0;var n=!0}catch(o){}var i=e$e.call(e);return n&&(t?e[Sb]=r:delete e[Sb]),i}var BY=t$e;var r$e=Object.prototype,n$e=r$e.toString;function i$e(e){return n$e.call(e)}var qY=i$e;var o$e="[object Null]",a$e="[object Undefined]",WY=Cu?Cu.toStringTag:void 0;function s$e(e){return e==null?e===void 0?a$e:o$e:WY&&WY in Object(e)?BY(e):qY(e)}var ao=s$e;function l$e(e){return e!=null&&(typeof e==="undefined"?"undefined":_type_of(e))=="object"}var ni=l$e;var u$e="[object Symbol]";function c$e(e){return(typeof e==="undefined"?"undefined":_type_of(e))=="symbol"||ni(e)&&ao(e)==u$e}var kb=c$e;var d$e=Array.isArray,Ll=d$e;var p$e=/\s/;function f$e(e){for(var t=e.length;t--&&p$e.test(e.charAt(t)););return t}var VY=f$e;var m$e=/^\s+/;function h$e(e){return e&&e.slice(0,VY(e)+1).replace(m$e,"")}var GY=h$e;function g$e(e){var t=typeof e==="undefined"?"undefined":_type_of(e);return e!=null&&(t=="object"||t=="function")}var so=g$e;var HY=0/0,x$e=/^[-+]0x[0-9a-f]+$/i,y$e=/^0b[01]+$/i,v$e=/^0o[0-7]+$/i,_$e=parseInt;function b$e(e){if(typeof e=="number")return e;if(kb(e))return HY;if(so(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=so(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=GY(e);var r=y$e.test(e);return r||v$e.test(e)?_$e(e.slice(2),r?2:8):x$e.test(e)?HY:+e}var Lp=b$e;var ZY=1/0,w$e=17976931348623157e292;function S$e(e){if(!e)return e===0?e:0;if(e=Lp(e),e===ZY||e===-ZY){var t=e<0?-1:1;return t*w$e}return e===e?e:0}var KY=S$e;function k$e(e){var t=KY(e),r=t%1;return t===t?r?t-r:t:0}var Cb=k$e;function C$e(e){return e}var cx=C$e;var E$e="[object AsyncFunction]",T$e="[object Function]",A$e="[object GeneratorFunction]",I$e="[object Proxy]";function P$e(e){if(!so(e))return!1;var t=ao(e);return t==T$e||t==A$e||t==E$e||t==I$e}var wg=P$e;var R$e=En["__core-js_shared__"],G7=R$e;var QY=function(){var e=/[^.]+$/.exec(G7&&G7.keys&&G7.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function M$e(e){return!!QY&&QY in e}var JY=M$e;var O$e=Function.prototype,$$e=O$e.toString;function N$e(e){if(e!=null){try{return $$e.call(e)}catch(t){}try{return e+""}catch(t){}}return""}var Fp=N$e;var D$e=/[\\^$.*+?()[\]{}|]/g,L$e=/^\[object .+?Constructor\]$/,F$e=Function.prototype,z$e=Object.prototype,j$e=F$e.toString,U$e=z$e.hasOwnProperty,B$e=RegExp("^"+j$e.call(U$e).replace(D$e,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function q$e(e){if(!so(e)||JY(e))return!1;var t=wg(e)?B$e:L$e;return t.test(Fp(e))}var YY=q$e;function W$e(e,t){return e==null?void 0:e[t]}var XY=W$e;function V$e(e,t){var r=XY(e,t);return YY(r)?r:void 0}var Hs=V$e;var G$e=Hs(En,"WeakMap"),Sg=G$e;var H$e=Sg&&new Sg,dx=H$e;var Z$e=dx?function Z$e1(e,t){return dx.set(e,t),e}:cx,H7=Z$e;var eX=Object.create,K$e=function(){function e(){}return function(t){if(!so(t))return{};if(eX)return eX(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}(),cm=K$e;function Q$e(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=cm(e.prototype),n=e.apply(r,t);return so(n)?n:r}}var zp=Q$e;var J$e=1;function Y$e(e,t,r){var n=t&J$e,i=zp(e);function o(){var a=this&&this!==En&&_instanceof(this,o)?i:e;return a.apply(n?r:this,arguments)}return o}var tX=Y$e;function X$e(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 px=X$e;var eNe=Math.max;function tNe(e,t,r,n){for(var i=-1,o=e.length,a=r.length,s=-1,l=t.length,c=eNe(o-a,0),d=Array(l+c),u=!n;++s0){if(++t>=yNe)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var e8=bNe;var wNe=e8(H7),t8=wNe;var SNe=/\{\n\/\* \[wrapped with (.+)\] \*/,kNe=/,? & /;function CNe(e){var t=e.match(SNe);return t?t[1].split(kNe):[]}var lX=CNe;var ENe=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;function TNe(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(ENe,"{\n/* [wrapped with "+t+"] */\n")}var uX=TNe;function ANe(e){return function(){return e}}var cX=ANe;var INe=function(){try{var e=Hs(Object,"defineProperty");return e({},"",{}),e}catch(t){}}(),gx=INe;var PNe=gx?function PNe1(e,t){return gx(e,"toString",{configurable:!0,enumerable:!1,value:cX(t),writable:!0})}:cx,dX=PNe;var RNe=e8(dX),r8=RNe;function MNe(e,t){for(var r=-1,n=e==null?0:e.length;++r-1}var gX=LNe;var FNe=1,zNe=2,jNe=8,UNe=16,BNe=32,qNe=64,WNe=128,VNe=256,GNe=512,HNe=[["ary",WNe],["bind",FNe],["bindKey",zNe],["curry",jNe],["curryRight",UNe],["flip",GNe],["partial",BNe],["partialRight",qNe],["rearg",VNe]];function ZNe(e,t){return n8(HNe,function(r){var n="_."+r[0];t&r[1]&&!gX(e,n)&&e.push(n)}),e.sort()}var xX=ZNe;function KNe(e,t,r){var n=t+"";return r8(e,uX(n,xX(lX(n),r)))}var i8=KNe;var QNe=1,JNe=2,YNe=4,XNe=8,yX=32,vX=64;function eDe(e,t,r,n,i,o,a,s,l,c){var d=t&XNe,u=d?a:void 0,p=d?void 0:a,m=d?o:void 0,h=d?void 0:o;t|=d?yX:vX,t&=~(d?vX:yX),t&YNe||(t&=~(QNe|JNe));var g=[e,t,i,m,u,h,p,s,l,c],x=r.apply(void 0,g);return sX(e)&&t8(x,g),x.placeholder=n,i8(x,e,t)}var o8=eDe;function tDe(e){var t=e;return t.placeholder}var xx=tDe;var rDe=0x1fffffffffffff,nDe=/^(?:0|[1-9]\d*)$/;function iDe(e,t){var r=typeof e==="undefined"?"undefined":_type_of(e);return t=t==null?rDe:t,!!t&&(r=="number"||r!="symbol"&&nDe.test(e))&&e>-1&&e%1==0&&e1&&y.reverse(),d&&l-1&&e%1==0&&e<=MDe}var u8=ODe;function $De(e){return e!=null&&u8(e.length)&&!wg(e)}var vx=$De;function NDe(e,t,r){if(!so(r))return!1;var n=typeof t==="undefined"?"undefined":_type_of(t);return(n=="number"?vx(r)&&yx(t,r.length):n=="string"&&t in r)?dm(r[t],e):!1}var DX=NDe;var DDe=Object.prototype;function LDe(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||DDe;return e===r}var _x=LDe;function FDe(e,t){for(var r=-1,n=Array(e);++r-1}var oee=tFe;function rFe(e,t){var r=this.__data__,n=fm(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var aee=rFe;function kx(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 o=Array(i);++n=t?e:t)),e}var mee=xFe;function yFe(e,t,r){return r===void 0&&(r=t,t=void 0),r!==void 0&&(r=Lp(r),r=r===r?r:0),t!==void 0&&(t=Lp(t),t=t===t?t:0),mee(Lp(e),t,r)}var Ed=yFe;function vFe(){this.__data__=new mm,this.size=0}var hee=vFe;function _Fe(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var gee=_Fe;function bFe(e){return this.__data__.get(e)}var xee=bFe;function wFe(e){return this.__data__.has(e)}var yee=wFe;var SFe=200;function kFe(e,t){var r=this.__data__;if(_instanceof(r,mm)){var n=r.__data__;if(!hm||n.lengths))return!1;var c=o.get(e),d=o.get(t);if(c&&d)return c==t&&d==e;var u=-1,p=!0,m=r&mje?new ite:void 0;for(o.set(e,t),o.set(t,e);++u=t||k<0||u&&E>=o}function v(){var S=E8();if(x(S))return y(S);s=setTimeout(v,g(S))}function y(S){return s=void 0,p&&n?m(S):(n=i=void 0,a)}function _(){s!==void 0&&clearTimeout(s),c=0,n=l=i=s=void 0}function b(){return s===void 0?a:y(E8())}function w(){var S=E8(),k=x(S);if(n=arguments,i=this,l=S,k){if(s===void 0)return h(l);if(u)return clearTimeout(s),s=setTimeout(v,t),m(l)}return s===void 0&&(s=setTimeout(v,t)),a}return w.cancel=_,w.flush=b,w}var qp=qje;var Wje="[object String]";function Vje(e){return typeof e=="string"||!Ll(e)&&ni(e)&&ao(e)==Wje}var qO=Vje;var Gje="[object Boolean]";function Hje(e){return e===!0||e===!1||ni(e)&&ao(e)==Gje}var WO=Hje;var Zje="[object Date]";function Kje(e){return ni(e)&&ao(e)==Zje}var yte=Kje;var vte=gs&&gs.isDate,Qje=vte?Cd(vte):yte,VO=Qje;function Jje(e,t){return xte(e,t)}var GO=Jje;var Yje=En.isFinite;function Xje(e){return typeof e=="number"&&Yje(e)}var T8=Xje;var eUe="[object Number]";function tUe(e){return typeof e=="number"||ni(e)&&ao(e)==eUe}var Rb=tUe;function rUe(e){return e==null}var lo=rUe;function nUe(e){return e===null}var HO=nUe;var iUe="[object RegExp]";function oUe(e){return ni(e)&&ao(e)==iUe}var _te=oUe;var bte=gs&&gs.isRegExp,aUe=bte?Cd(bte):_te,ZO=aUe;function sUe(e){return e===void 0}var KO=sUe;var lUe=32,QO=NX(function(e,t){var r=jp(t,xx(QO));return MX(e,lUe,void 0,t,r)});QO.placeholder={};var JO=QO;var uUe="Expected a function";function cUe(e,t,r){var n=!0,i=!0;if(typeof e!="function")throw new TypeError(uUe);return so(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),qp(e,t,{leading:n,maxWait:t,trailing:i})}var YO=cUe;var iu=require("obsidian"),hS=nr(ln(),1);var A8=require("obsidian");var Mb=/*#__PURE__*/function(_A8_Modal){"use strict";_inherits(Mb1,_A8_Modal);function Mb1(r,n){_class_call_check(this,Mb1);var _this;_this=_call_super(this,Mb1,[r]);_this.tasks=n;A(_this,"confirmed",!1);A(_this,"selectedTasks",[]);_this.selectedTasks=Array.from({length:n.length},function(){return!0});return _this}_create_class(Mb1,[{key:"onOpen",value:function onOpen(){var _this=this;this.setTitle(P.t("deleteConfirm.title"));var _this1=this,r=_this1.contentEl;r.empty(),r.createEl("p",{cls:"ns-24abin"}).setText(P.t("deleteConfirm.instruction"));var o=r.createDiv({cls:"ns-tjnmw4"}).createEl("table",{cls:"task-list-table"}),s=o.createEl("thead").createEl("tr");s.createEl("th",{cls:"ns-6cuyp4",text:P.t("deleteConfirm.select")}),s.createEl("th",{text:P.t("deleteConfirm.filePath")});var l=o.createEl("tbody");this.tasks.forEach(function(d,u){var p=l.createEl("tr"),h=p.createEl("td",{cls:"ns-6cuyp4"}).createEl("input");h.type="checkbox",h.checked=_this.selectedTasks[u],h.addEventListener("change",function(g){_this.selectedTasks[u]=h.checked,g.stopPropagation()}),p.addEventListener("click",function(g){g.target!==h&&(h.checked=!h.checked,_this.selectedTasks[u]=h.checked,g.stopPropagation())}),p.createEl("td",{text:d.localPath})});var c=r.createDiv({cls:"ns-842365"});new A8.Setting(c).addButton(function(d){d.setButtonText(P.t("deleteConfirm.deleteAndReupload")).setCta().onClick(function(){_this.confirmed=!0,_this.close()})}).addButton(function(d){d.setButtonText(P.t("deleteConfirm.skipForNow")).onClick(function(){_this.confirmed=!1,_this.close()})})}},{key:"openAndWait",value:function openAndWait(){var _this=this;return _get(_get_prototype_of(Mb1.prototype),"open",this).call(this),new Promise(function(r){_this.onClose=function(){if(!_this.confirmed){r({tasksToDelete:[],tasksToReupload:[]});return}var n=_this.tasks.filter(function(o,a){return _this.selectedTasks[a]}),i=_this.tasks.filter(function(o,a){return!_this.selectedTasks[a]});r({tasksToDelete:n,tasksToReupload:i})}})}}]);return Mb1}(A8.Modal);var I8=require("obsidian");var Ob=/*#__PURE__*/function(_I8_Modal){"use strict";_inherits(Ob1,_I8_Modal);function Ob1(r,n){_class_call_check(this,Ob1);var _this;_this=_call_super(this,Ob1,[r]);_this.failedTasks=n;return _this}_create_class(Ob1,[{key:"onOpen",value:function onOpen(){var _this=this;this.setTitle(P.t("failedTasks.title"));var _this1=this,r=_this1.contentEl;r.empty(),r.createEl("p",{cls:"ns-24abin",text:P.t("failedTasks.instruction")});var i=r.createDiv({cls:"ns-tjnmw4"}).createEl("table",{cls:"task-list-table"}),a=i.createEl("thead").createEl("tr");a.createEl("th",{text:P.t("failedTasks.taskName")}),a.createEl("th",{text:P.t("failedTasks.localPath")}),a.createEl("th",{text:P.t("failedTasks.errorMessage")});var s=i.createEl("tbody");this.failedTasks.forEach(function(c){var d=s.createEl("tr");d.createEl("td",{text:c.taskName}),d.createEl("td",{text:c.localPath}),d.createEl("td",{text:c.errorMessage})});var l=r.createDiv({cls:"ns-842365"});new I8.Setting(l).addButton(function(c){c.setButtonText(P.t("failedTasks.close")).setCta().onClick(function(){return _this.close()})})}},{key:"onClose",value:function onClose(){var _this=this,r=_this.contentEl;r.empty()}}]);return Ob1}(I8.Modal);var eA=require("obsidian");var P8=nr(ln(),1);function xm(e){return e?e.replace(/[\\/]+/g,"/").replace(/^\/+/,"").replace(/\/+$/,""):""}var Kn=/*#__PURE__*/function(){"use strict";function Kn1(t){_class_call_check(this,Kn1);this.options=t}_create_class(Kn1,[{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,P8.isAbsolute)(this.options.remotePath)?this.options.remotePath:(0,P8.join)(this.remoteBaseDir,this.options.remotePath)}},{key:"localPath",get:function get1(){return xm(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 Kn1}(),Eg=/*#__PURE__*/function(Error1){"use strict";_inherits(Eg1,Error1);function Eg1(r,n,i){_class_call_check(this,Eg1);var _this;_this=_call_super(this,Eg1,[r]);_this.task=n;_this.cause=i;_this.name="TaskError";return _this}return Eg1}(_wrap_native_super(Error));function hi(e,t){if(_instanceof(e,Eg))return e;var r=_instanceof(e,Error)?e.message:String(e);return new Eg(r,t,_instanceof(e,Error)?e:void 0)}var Zs=/*#__PURE__*/function(Kn1){"use strict";_inherits(Zs1,Kn1);function Zs1(){_class_call_check(this,Zs1);return _call_super(this,Zs1,arguments)}_create_class(Zs1,[{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:hi(t,this)})];case 3:return[2]}})}).call(this)}}]);return Zs1}(Kn);function kte(e){return _async_to_generator(function(){return _ts_generator(this,function(_state){return[2,crypto.subtle.digest("SHA-256",e)]})})()}function Cte(e){return _async_to_generator(function(){var t;return _ts_generator(this,function(_state){switch(_state.label){case 0:return[4,kte(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 XO(e){return _async_to_generator(function(){var t;return _ts_generator(this,function(_state){switch(_state.label){case 0:return[4,kte(e)];case 1:t=_state.sent();return[2,tx(new Uint8Array(t),!1)]}})})()}var Ate=nr(Tte(),1);var pUe=[/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 fUe(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?pUe.some(function(o){return o.test(i)}):!1}function mUe(e){return(typeof e==="undefined"?"undefined":_type_of(e))=="object"&&e!==null&&"getFreshInstance"in e&&typeof e.getFreshInstance=="function"}function t$(e){var m,h;var t=mUe(e)?e:{getFreshInstance:function(){return e},maxRetries:0},r=t.getFreshInstance(),n=(m=t.shouldRecover)!=null?m:fUe,i=Math.max(0,(h=t.maxRetries)!=null?h:0);function o(g){return _async_to_generator(function(){var x,v,y;return _ts_generator(this,function(_state){switch(_state.label){case 0:v=0;_state.label=1;case 1:if(!(v<=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:y=_state.sent();if(v===0&&(x=y),!(v>2;if(o>0){var a=new Uint32Array(r.buffer,r.byteOffset,o),s=new Uint32Array(n.buffer,n.byteOffset,o);for(var l=0;l2&&_arguments[2]!==void 0?_arguments[2]:!1;n=(0,xs.normalizePath)(t);if(!Nx(e,n))return[3,5];return[4,e.adapter.stat(n)];case 1:o=_state.sent();if(!o)return[2];if(!(o.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 O8=nr(ln(),1);function Ja(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,O8.normalize)(t);_tmp=!(n==="/"||n===".");if(!_tmp)return[3,2];return[4,Fl(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,Fl(e,n)];case 4:_tmp1=!_state.sent();_state.label=5;case 5:if(!_tmp1)return[3,7];r.push(n),n=(0,O8.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,Fl(e,i)];case 8:_tmp3=_state.sent();if(_tmp3)return[3,13];if(!_m(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 $8(e){return _async_to_generator(function(){return _ts_generator(this,function(_state){switch(_state.label){case 0:if(!!Lb.Platform.isMobileApp)return[3,2];return[4,OUe(e)];case 1:_state.sent();return[2];case 2:return[4,$Ue(e)];case 3:_state.sent();return[2]}})})()}function RUe(e){return _instanceof(e,ArrayBuffer)?e:DUe(e)}function MUe(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 o=_step.value;n.set(new Uint8Array(o),i),i+=o.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 OUe(_01){return _async_to_generator(function(param){var e,t,r,n,i,o,a;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:o=_state.sent(),a=RUe(o);if(a.byteLength!==i)throw new Error("Remote Size Not Match!");return[4,Ja(e,(0,d$.dirname)(n))];case 2:_state.sent();return[4,Wp(e,n,a)];case 3:_state.sent();return[2]}})}).apply(this,arguments)}function $Ue(_01){return _async_to_generator(function(param){var e,t,r,n,i,o,m,a,s,l,c,d,u,p,_$h,g,x,v,_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,o=param.mobileAppDownloadFileChunkSize;a=(0,Lb.normalizePath)(n);return[4,Ja(e,(0,d$.dirname)(a))];case 1:if(!(_state.sent(),i===0))return[3,3];return[4,Wp(e,a,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=Dte(o),d=(0,Lb.normalizePath)("".concat(a,".nutstore-sync-").concat(Date.now(),"-").concat(Math.random().toString(36).slice(2),".download")),u=0,p=0;Me.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(pa&&(o.push({stable:!0,buffer:"o",bufferStart:a,bufferLength:l-a,bufferContent:t.slice(a,l)}),a=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 p10=l.ab==="a"?e:r;o.push({stable:!0,buffer:l.ab,bufferStart:l.abStart,bufferLength:l.abLength,bufferContent:p10.slice(l.abStart,l.abStart+l.abLength)})}}else{var p11={a:[e.length,-1,t.length,-1],b:[r.length,-1,t.length,-1]};for(;u.length;){l=u.shift();var y=l.oStart,_=y+l.oLength,b=l.abStart,w=b+l.abLength,S=p11[l.ab];S[0]=Math.min(b,S[0]),S[1]=Math.max(w,S[1]),S[2]=Math.min(y,S[2]),S[3]=Math.max(_,S[3])}var m10=p11.a[0]+(c-p11.a[2]),h=p11.a[1]+(d-p11.a[3]),g=p11.b[0]+(c-p11.b[2]),x=p11.b[1]+(d-p11.b[3]),v={stable:!1,aStart:m10,aLength:h-m10,aContent:e.slice(m10,h),oStart:c,oLength:d-c,oContent:t.slice(c,d),bStart:g,bLength:x-g,bContent:r.slice(g,x)};o.push(v)}a=d}return s(t.length),o}function f$(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 o=[],a=FUe(e,t,r),s=[];function l(){s.length&&o.push({ok:s}),s=[]}function c(d,u){if(d.length!==u.length)return!1;for(var p=0;pt?e:t},jZt=Number.isNaN;var U8=function(e){return e!==0?e<0:1/e<0};var Ux=Number.MAX_SAFE_INTEGER,h$=Number.MIN_SAFE_INTEGER,UZt=1<<31;var Vte=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&vs(e)===e},BZt=Number.isNaN,qZt=Number.parseInt;var x$=String.fromCharCode,zUe=String.fromCodePoint,WZt=x$(65535),jUe=function(e){return e.toLowerCase()},UUe=/^\s*/g,BUe=function(e){return e.replace(UUe,"")},qUe=/([A-Z])/g,y$=function(e,t){return BUe(e.replace(qUe,function(r){return"".concat(t).concat(jUe(r))}))};var WUe=function(e){var t=unescape(encodeURIComponent(e)),r=t.length,n=new Uint8Array(r);for(var i=0;i127;)ma(e,128|127&t),t=vs(t/128);ma(e,127&t)},V8=function(e,t){var r=U8(t);for(r&&(t=-t),ma(e,(t>63?128:0)|(r?64:0)|63&t),t=vs(t/64);t>0;)ma(e,(t>127?128:0)|127&t),t=vs(t/128)},v$=new Uint8Array(3e4),ZUe=v$.length/3,KUe=function(e,t){if(t.length0&&(e.bufs.push(e.cbuf),e.cbuf=new Uint8Array(Gp(r*2,o)),e.cbuf.set(t.subarray(i)),e.cpos=o)},Ks=function(e,t){en(e,t.byteLength),Wb(e,t)},_$=function(e,t){HUe(e,t);var r=new DataView(e.cbuf.buffer,e.cpos,t);return e.cpos+=t,r},JUe=function(e,t){return _$(e,4).setFloat32(0,t,!1)},YUe=function(e,t){return _$(e,8).setFloat64(0,t,!1)},XUe=function(e,t){return _$(e,8).setBigInt64(0,t,!1)};var Kte=new DataView(new ArrayBuffer(4)),eBe=function(e){return Kte.setFloat32(0,e),Kte.getFloat32(0)===e},Vx=function(e,t){switch(typeof t==="undefined"?"undefined":_type_of(t)){case"string":ma(e,119),Mg(e,t);break;case"number":Vte(t)&&Pg(t)<=0x7fffffff?(ma(e,125),V8(e,t)):eBe(t)?(ma(e,124),JUe(e,t)):(ma(e,123),YUe(e,t));break;case"bigint":ma(e,122),XUe(e,t);break;case"object":if(t===null)ma(e,126);else if(Ig(t)){ma(e,117),en(e,t.length);for(var r=0;r0&&en(this,this.count-1),this.count=1,this.w(this,t),this.s=t)}}]);return Bb1}(Rg);var Qte=function(e){e.count>0&&(V8(e.encoder,e.count===1?e.s:-e.s),e.count>1&&en(e.encoder,e.count-2))},Og=/*#__PURE__*/function(){"use strict";function Og1(){_class_call_check(this,Og1);this.encoder=new Rg,this.s=0,this.count=0}_create_class(Og1,[{key:"write",value:function write(t){this.s===t?this.count++:(Qte(this),this.count=1,this.s=t)}},{key:"toUint8Array",value:function toUint8Array(){return Qte(this),yc(this.encoder)}}]);return Og1}();var Jte=function(e){if(e.count>0){var t=e.diff*2+(e.count===1?0:1);V8(e.encoder,t),e.count>1&&en(e.encoder,e.count-2)}},Gx=/*#__PURE__*/function(){"use strict";function Gx1(){_class_call_check(this,Gx1);this.encoder=new Rg,this.s=0,this.count=0,this.diff=0}_create_class(Gx1,[{key:"write",value:function write(t){this.diff===t-this.s?(this.s=t,this.count++):(Jte(this),this.count=1,this.diff=t-this.s,this.s=t)}},{key:"toUint8Array",value:function toUint8Array(){return Jte(this),yc(this.encoder)}}]);return Gx1}(),q8=/*#__PURE__*/function(){"use strict";function q81(){_class_call_check(this,q81);this.sarr=[],this.s="",this.lensE=new Og}_create_class(q81,[{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 Rg;return this.sarr.push(this.s),this.s="",Mg(t,this.sarr.join("")),Wb(t,this.lensE.toUint8Array()),yc(t)}}]);return q81}();var zl=function(e){return new Error(e)},jl=function(){throw zl("Method unimplemented")},Qs=function(){throw zl("Unexpected case")};var Yte=zl("Unexpected end of array"),Xte=zl("Integer out of Range"),Hx=function Hx1(t){"use strict";_class_call_check(this,Hx1);this.arr=t,this.pos=0},Lg=function(e){return new Hx(e)},ere=function(e){return e.pos!==e.arr.length};var rBe=function(e,t){var r=new Uint8Array(e.arr.buffer,e.pos+e.arr.byteOffset,t);return e.pos+=t,r},Js=function(e){return rBe(e,qr(e))};var $g=function(e){return e.arr[e.pos++]};var qr=function(e){var t=0,r=1,n=e.arr.length;for(;e.posUx)throw Xte}throw Yte},H8=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 o=e.arr.length;for(;e.posUx)throw Xte}throw Yte};var nBe=function(e){var t=qr(e);if(t===0)return"";{var r=String.fromCodePoint($g(e));if(--t<100)for(;t--;)r+=String.fromCodePoint($g(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))}},iBe=function(e){return Bx.decode(Js(e))},Ng=Bx?iBe:nBe;var w$=function(e,t){var r=new DataView(e.arr.buffer,e.arr.byteOffset+e.pos,t);return e.pos+=t,r},oBe=function(e){return w$(e,4).getFloat32(0,!1)},aBe=function(e){return w$(e,8).getFloat64(0,!1)},sBe=function(e){return w$(e,8).getBigInt64(0,!1)};var lBe=[function(e){},function(e){return null},H8,oBe,aBe,sBe,function(e){return!1},function(e){return!0},Ng,function(e){var t=qr(e),r={};for(var n=0;n>e/4).toString(16)})};var nre=Date.now;var k$=function(e){return new Promise(e)};var QZt=Promise.all.bind(Promise);var C$=function(e){return e===void 0?null:e};var E$=/*#__PURE__*/function(){"use strict";function E$1(){_class_call_check(this,E$1);this.map=new Map}_create_class(E$1,[{key:"setItem",value:function setItem(t,r){this.map.set(t,r)}},{key:"getItem",value:function getItem(t){return this.map.get(t)}}]);return E$1}(),ire=new E$,hBe=!0;try{typeof localStorage!="undefined"&&localStorage&&(ire=localStorage,hBe=!1)}catch(e){}var ore=ire;var Fg=Symbol("Equality"),Z8=function(e,t){var r;return e===t||!!((r=e==null?void 0:e[Fg])!=null&&r.call(e,t))||!1};var are=function(e){return(typeof e==="undefined"?"undefined":_type_of(e))=="object"},sre=Object.assign,xBe=Object.keys;var lre=function(e,t){for(var r in e)t(e[r],r)};var Gb=function(e){return xBe(e).length};var ure=function(e){for(var t in e)return!1;return!0},Qx=function(e,t){for(var r in e)if(!t(e[r],r))return!1;return!0},Hb=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},A$=function(e,t){return e===t||Gb(e)===Gb(t)&&Qx(e,function(r,n){return(r!==void 0||Hb(t,n))&&Z8(t[n],r)})},yBe=Object.freeze,I$=function(e){for(var t in e){var r=e[t];((typeof r==="undefined"?"undefined":_type_of(r))=="object"||typeof r=="function")&&I$(e[t])}return yBe(e)};var Kb=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;try{var _e1;for(;r=.5},K8=function(e,t,r){return vs(e.next()*(r+1-t)+t)};var D$=function(e,t,r){return vs(e.next()*(r+1-t)+t)};var L$=function(e,t,r){return D$(e,t,r)};var CBe=function(e){return x$(L$(e,97,122))},gre=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=L$(e,t,r),i="";for(var o=0;o3&&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(Hte(" ",(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 F$1}(),z$=function(e,t){return e===t?!0:e==null||t==null||e.constructor!==t.constructor?!1:e[Fg]?Z8(e,t):Ig(e)?L8(e,function(r){return F8(t,function(n){return z$(r,n)})}):are(e)?Qx(e,function(r,n){return z$(r,t[n])}):!1},ha=/*#__PURE__*/function(){"use strict";function ha1(){_class_call_check(this,ha1)}_create_class(ha1,[{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),z$(r,n)}},{key:"equals",value:function equals(t){return this.constructor===t.constructor&&Zb(this.shape,t.shape)}},{key:TBe,value:function value(){return!0}},{key:Fg,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){jl()}},{key:"nullable",get:function get1(){return ry(this,sC)}},{key:"optional",get:function get1(){return new J8(this)}},{key:"cast",value:function cast(t){return xre(t,this),t}},{key:"expect",value:function expect(t){return xre(t,this),t}}]);return ha1}();A(ha,"_dilutes",!1);var Xb=/*#__PURE__*/function(ha1){"use strict";_inherits(Xb1,ha1);function Xb1(t,r){_class_call_check(this,Xb1);var _this;_this=_call_super(this,Xb1),_this.shape=t,_this._c=r;return _this}_create_class(Xb1,[{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 Xb1}(ha),Ao=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return new Xb(e,t)},XZt=Ao(Xb),ew=/*#__PURE__*/function(ha1){"use strict";_inherits(ew1,ha1);function ew1(t){_class_call_check(this,ew1);var _this;_this=_call_super(this,ew1),_this.shape=t;return _this}_create_class(ew1,[{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 ew1}(ha),Qo=function(e){return new ew(e)},eKt=Ao(ew),ey=/*#__PURE__*/function(ha1){"use strict";_inherits(ey1,ha1);function ey1(t){_class_call_check(this,ey1);var _this;_this=_call_super(this,ey1),_this.shape=t;return _this}_create_class(ey1,[{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 ey1}(ha),oC=function(){for(var _len=arguments.length,e=new Array(_len),_key=0;_key<_len;_key++){e[_key]=arguments[_key]}return new ey(e)},yre=Ao(ey),ABe=RegExp.escape||function(e){return e.replace(/[().|&,$^[\]]/g,function(t){return"\\"+t})},vre=function(e){if(ty.check(e))return[ABe(e)];if(yre.check(e))return e.shape.map(function(t){return t+""});if(kre.check(e))return["[+-]?\\d+.?\\d*"];if(Cre.check(e))return[".*"];if(nC.check(e))return e.shape.map(vre).flat(1);Qs()},j$=/*#__PURE__*/function(ha1){"use strict";_inherits(j$1,ha1);function j$1(t){_class_call_check(this,j$1);var _this;_this=_call_super(this,j$1),_this.shape=t,_this._r=new RegExp("^"+t.map(vre).map(function(r){return"(".concat(r.join("|"),")")}).join("")+"$");return _this}_create_class(j$1,[{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 j$1}(ha);var tKt=Ao(j$),IBe=Symbol("optional"),J8=/*#__PURE__*/function(ha1){"use strict";_inherits(J81,ha1);function J81(t){_class_call_check(this,J81);var _this;_this=_call_super(this,J81),_this.shape=t;return _this}_create_class(J81,[{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:IBe,get:function get1(){return!0}}]);return J81}(ha),PBe=Ao(J8),Y8=/*#__PURE__*/function(ha1){"use strict";_inherits(Y81,ha1);function Y81(){_class_call_check(this,Y81);return _call_super(this,Y81,arguments)}_create_class(Y81,[{key:"check",value:function check(t,r){return r==null||r.extend(null,"never",typeof t==="undefined"?"undefined":_type_of(t)),!1}}]);return Y81}(ha),rKt=new Y8,nKt=Ao(Y8),V$=/*#__PURE__*/function(ha1){"use strict";_inherits(V$1,ha1);function V$1(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;_class_call_check(this,V$1);var _this;_this=_call_super(this,V$1),_this.shape=t,_this._isPartial=r;return _this}_create_class(V$1,[{key:"partial",get:function get1(){return new V$(this.shape,!0)}},{key:"check",value:function check(t,r){var _this=this;return t==null?(r==null||r.extend(null,"object","null"),!1):Qx(this.shape,function(n,i){var o=_this._isPartial&&!Hb(t,i)||n.check(t[i],r);return!o&&(r==null||r.extend(i.toString(),n.toString(),_type_of(t[i]),"Object property does not match")),o})}}]);return V$1}(ha),Yb=V$;A(Yb,"_dilutes",!0);var RBe=function(e){return new Yb(e)},MBe=Ao(Yb),OBe=Qo(function(e){return e!=null&&(e.constructor===Object||e.constructor==null)}),X8=/*#__PURE__*/function(ha1){"use strict";_inherits(X81,ha1);function X81(t,r){_class_call_check(this,X81);var _this;_this=_call_super(this,X81),_this.shape={keys:t,values:r};return _this}_create_class(X81,[{key:"check",value:function check(t,r){var _this=this;return t!=null&&Qx(t,function(n,i){var o=_this.shape.keys.check(i,r);return!o&&(r==null||r.extend(i+"","Record",typeof t==="undefined"?"undefined":_type_of(t),o?"Key doesn't match schema":"Value doesn't match value")),o&&_this.shape.values.check(n,r)})}}]);return X81}(ha),_re=function(e,t){return new X8(e,t)},$Be=Ao(X8),eC=/*#__PURE__*/function(ha1){"use strict";_inherits(eC1,ha1);function eC1(t){_class_call_check(this,eC1);var _this;_this=_call_super(this,eC1),_this.shape=t;return _this}_create_class(eC1,[{key:"check",value:function check(t,r){return t!=null&&Qx(this.shape,function(n,i){var o=n.check(t[i],r);return!o&&(r==null||r.extend(i.toString(),"Tuple",typeof n==="undefined"?"undefined":_type_of(n))),o})}}]);return eC1}(ha),NBe=function(){for(var _len=arguments.length,e=new Array(_len),_key=0;_key<_len;_key++){e[_key]=arguments[_key]}return new eC(e)},iKt=Ao(eC),tC=/*#__PURE__*/function(ha1){"use strict";_inherits(tC1,ha1);function tC1(t){_class_call_check(this,tC1);var _this;_this=_call_super(this,tC1),_this.shape=t.length===1?t[0]:new Yx(t);return _this}_create_class(tC1,[{key:"check",value:function check(t,r){var _this=this;var n=Ig(t)&&L8(t,function(i){return _this.shape.check(i)});return!n&&(r==null||r.extend(null,"Array","")),n}}]);return tC1}(ha),bre=function(){for(var _len=arguments.length,e=new Array(_len),_key=0;_key<_len;_key++){e[_key]=arguments[_key]}return new tC(e)},DBe=Ao(tC),LBe=Qo(function(e){return Ig(e)}),rC=/*#__PURE__*/function(ha1){"use strict";_inherits(rC1,ha1);function rC1(t,r){_class_call_check(this,rC1);var _this;_this=_call_super(this,rC1),_this.shape=t,_this._c=r;return _this}_create_class(rC1,[{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 rC1}(ha),FBe=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return new rC(e,t)},oKt=Ao(rC),zBe=FBe(ha),U$=/*#__PURE__*/function(ha1){"use strict";_inherits(U$1,ha1);function U$1(t){_class_call_check(this,U$1);var _this;_this=_call_super(this,U$1),_this.len=t.length-1,_this.args=NBe.apply(void 0,_to_consumable_array(t.slice(-1))),_this.res=t[_this.len];return _this}_create_class(U$1,[{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 U$1}(ha);var jBe=Ao(U$),UBe=Qo(function(e){return typeof e=="function"}),B$=/*#__PURE__*/function(ha1){"use strict";_inherits(B$1,ha1);function B$1(t){_class_call_check(this,B$1);var _this;_this=_call_super(this,B$1),_this.shape=t;return _this}_create_class(B$1,[{key:"check",value:function check(t,r){var n=L8(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 B$1}(ha);var aKt=Ao(B$,function(e){return e.shape.length>0}),Yx=/*#__PURE__*/function(ha1){"use strict";_inherits(Yx1,ha1);function Yx1(t){_class_call_check(this,Yx1);var _this;_this=_call_super(this,Yx1),_this.shape=t;return _this}_create_class(Yx1,[{key:"check",value:function check(t,r){var n=F8(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 Yx1}(ha);A(Yx,"_dilutes",!0);var ry=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 nC.check(t)})>=0?ry.apply(void 0,_to_consumable_array(e.map(function(t){return tw(t)}).map(function(t){return nC.check(t)?t.shape:[t]}).flat(1))):e.length===1?e[0]:new Yx(e)},nC=Ao(Yx),wre=function(){return!0},iC=Qo(wre),BBe=Ao(ew,function(e){return e.shape===wre}),W$=Qo(function(e){return(typeof e==="undefined"?"undefined":_type_of(e))=="bigint"}),qBe=Qo(function(e){return e===W$}),Sre=Qo(function(e){return(typeof e==="undefined"?"undefined":_type_of(e))=="symbol"}),sKt=Qo(function(e){return e===Sre}),Xx=Qo(function(e){return typeof e=="number"}),kre=Qo(function(e){return e===Xx}),ty=Qo(function(e){return typeof e=="string"}),Cre=Qo(function(e){return e===ty}),aC=Qo(function(e){return typeof e=="boolean"}),WBe=Qo(function(e){return e===aC}),Ere=oC(void 0),lKt=Ao(ey,function(e){return e.shape.length===1&&e.shape[0]===void 0}),uKt=oC(void 0);var sC=oC(null),VBe=Ao(ey,function(e){return e.shape.length===1&&e.shape[0]===null}),cKt=Ao(Uint8Array),dKt=Ao(Xb,function(e){return e.shape===Uint8Array}),GBe=ry(Xx,ty,sC,Ere,W$,aC,Sre),pKt=function(){var e=bre(iC),t=_re(ty,iC),r=ry(Xx,ty,sC,aC,e,t);return e.shape=r,t.shape.values=r,r}(),tw=function(e){if(zBe.check(e))return e;if(OBe.check(e)){var t={};for(var r in e)t[r]=tw(e[r]);return RBe(t)}else{if(LBe.check(e))return ry.apply(void 0,_to_consumable_array(e.map(tw)));if(GBe.check(e))return oC(e);if(UBe.check(e))return Ao(e)}Qs()},xre=fre?function(){}:function(e,t){var r=new F$;if(!t.check(e,r))throw zl("Expected value to be of type ".concat(t.constructor.name,".\n").concat(r.toString()))},q$=/*#__PURE__*/function(){"use strict";function q$1(t){_class_call_check(this,q$1);this.patterns=[],this.$state=t}_create_class(q$1,[{key:"if",value:function _if(t,r){return this.patterns.push({if:tw(t),h:r}),this}},{key:"else",value:function _else(t){return this.if(iC,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 zl("Unhandled pattern")}}}]);return q$1}(),HBe=function(e){return new q$(e)},Tre=HBe(iC).if(kre,function(e,t){return K8(t,h$,Ux)}).if(Cre,function(e,t){return gre(t)}).if(WBe,function(e,t){return N$(t)}).if(qBe,function(e,t){return BigInt(K8(t,h$,Ux))}).if(nC,function(e,t){return Jx(t,Q8(t,e.shape))}).if(MBe,function(e,t){var r={};for(var n in e.shape){var i=e.shape[n];if(PBe.check(i)){if(N$(t))continue;i=i.shape}r[n]=Tre(i,t)}return r}).if(DBe,function(e,t){var r=[],n=D$(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(o>0&&(i=r,i.unshift(t.join("")));o=o.clock?t[n-1]=new oy(i.clock,Gp(i.len,o.clock+o.len-i.clock)):(n0&&t.clients.set(n,i)}),t},cy=function(e,t){en(e.restEncoder,t.clients.size),Rd(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(),en(e.restEncoder,r);var i=n.length;en(e.restEncoder,i);for(var o=0;o0){var a=Pd(t.clients,i,function(){return[]});for(var s=0;s0){var o10=new Hp;return en(o10.restEncoder,0),cy(o10,n),o10.toUint8Array()}return null};var Yre=S$,vc=/*#__PURE__*/function(z81){"use strict";_inherits(vc1,z81);function vc1(){var _ref=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},tmp=_ref.guid,t=tmp===void 0?rre():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,o=tmp4===void 0?null:tmp4,tmp5=_ref.autoLoad,a=tmp5===void 0?!1:tmp5,tmp6=_ref.shouldLoad,s=tmp6===void 0?!0:tmp6;_class_call_check(this,vc1);var _this;_this=_call_super(this,vc1),_this.gc=n,_this.gcFilter=i,_this.clientID=Yre(),_this.guid=t,_this.collectionid=r,_this.share=new Map,_this.store=new vC,_this._transaction=null,_this._transactionCleanups=[],_this.subdocs=new Set,_this._item=null,_this.shouldLoad=s,_this.autoLoad=a,_this.meta=o,_this.isLoaded=!1,_this.isSynced=!1,_this.isDestroyed=!1,_this.whenLoaded=k$(function(c){_this.on("load",function(){_this.isLoaded=!0,c(_this)})});var l=function(){return k$(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(vc1,[{key:"load",value:function load(){var _this=this;var t=this._item;t!==null&&!this.shouldLoad&&xi(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(Rd(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 xi(this,t,r)}},{key:"get",value:function get1(t){var _this=this;var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Jo;var n=Pd(this.share,t,function(){var o=new r;return o._integrate(_this,null),o}),i=n.constructor;if(r!==Jo&&i!==r)if(i===Jo){var o=new r;o._map=n._map,n._map.forEach(function(a){for(;a!==null;a=a.left)a.parent=o}),o._start=n._start;for(var a=o._start;a!==null;a=a.right)a.parent=o;return o._length=n._length,this.share.set(t,o),o._integrate(this,null),o}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,Cm)}},{key:"getText",value:function getText(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return this.get(t,Im)}},{key:"getMap",value:function getMap(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return this.get(t,Am)}},{key:"getXmlElement",value:function getXmlElement(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return this.get(t,Pm)}},{key:"getXmlFragment",value:function getXmlFragment(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return this.get(t,Zp)}},{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,Rd(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 vc(_object_spread_props(_object_spread({guid:this.guid},r.opts),{shouldLoad:!1})),r.doc._item=t,xi(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(vc1.prototype),"destroy",this).call(this)}}]);return vc1}(z8),hC=/*#__PURE__*/function(){"use strict";function hC1(t){_class_call_check(this,hC1);this.restDecoder=t}_create_class(hC1,[{key:"resetDsCurVal",value:function resetDsCurVal(){}},{key:"readDsClock",value:function readDsClock(){return qr(this.restDecoder)}},{key:"readDsLen",value:function readDsLen(){return qr(this.restDecoder)}}]);return hC1}(),gC=/*#__PURE__*/function(hC1){"use strict";_inherits(gC1,hC1);function gC1(){_class_call_check(this,gC1);return _call_super(this,gC1,arguments)}_create_class(gC1,[{key:"readLeftID",value:function readLeftID(){return dn(qr(this.restDecoder),qr(this.restDecoder))}},{key:"readRightID",value:function readRightID(){return dn(qr(this.restDecoder),qr(this.restDecoder))}},{key:"readClient",value:function readClient(){return qr(this.restDecoder)}},{key:"readInfo",value:function readInfo(){return $g(this.restDecoder)}},{key:"readString",value:function readString(){return Ng(this.restDecoder)}},{key:"readParentInfo",value:function readParentInfo(){return qr(this.restDecoder)===1}},{key:"readTypeRef",value:function readTypeRef(){return qr(this.restDecoder)}},{key:"readLen",value:function readLen(){return qr(this.restDecoder)}},{key:"readAny",value:function readAny(){return Zx(this.restDecoder)}},{key:"readBuf",value:function readBuf(){return hre(Js(this.restDecoder))}},{key:"readJSON",value:function readJSON(){return JSON.parse(Ng(this.restDecoder))}},{key:"readKey",value:function readKey(){return Ng(this.restDecoder)}}]);return gC1}(hC),X$=/*#__PURE__*/function(){"use strict";function X$1(t){_class_call_check(this,X$1);this.dsCurrVal=0,this.restDecoder=t}_create_class(X$1,[{key:"resetDsCurVal",value:function resetDsCurVal(){this.dsCurrVal=0}},{key:"readDsClock",value:function readDsClock(){return this.dsCurrVal+=qr(this.restDecoder),this.dsCurrVal}},{key:"readDsLen",value:function readDsLen(){var t=qr(this.restDecoder)+1;return this.dsCurrVal+=t,t}}]);return X$1}(),Em=/*#__PURE__*/function(X$1){"use strict";_inherits(Em1,X$1);function Em1(t){_class_call_check(this,Em1);var _this;_this=_call_super(this,Em1,[t]),_this.keys=[],qr(t),_this.keyClockDecoder=new Kx(Js(t)),_this.clientDecoder=new Dg(Js(t)),_this.leftClockDecoder=new Kx(Js(t)),_this.rightClockDecoder=new Kx(Js(t)),_this.infoDecoder=new Vb(Js(t),$g),_this.stringDecoder=new G8(Js(t)),_this.parentInfoDecoder=new Vb(Js(t),$g),_this.typeRefDecoder=new Dg(Js(t)),_this.lenDecoder=new Dg(Js(t));return _this}_create_class(Em1,[{key:"readLeftID",value:function readLeftID(){return new km(this.clientDecoder.read(),this.leftClockDecoder.read())}},{key:"readRightID",value:function readRightID(){return new km(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 Zx(this.restDecoder)}},{key:"readBuf",value:function readBuf(){return Js(this.restDecoder)}},{key:"readJSON",value:function readJSON(){return Zx(this.restDecoder)}},{key:"readKey",value:function readKey(){var t=this.keyClockDecoder.read();if(ti&&n.set(o,i)}),kC(t).forEach(function(i,o){r.has(o)||n.set(o,0)}),en(e.restEncoder,n.size),Rd(n.entries()).sort(function(i,o){return o[0]-i[0]}).forEach(function(param){var _param=_sliced_to_array(param,2),i=_param[0],o=_param[1];dqe(e,t.clients.get(i),i,o)})},pqe=function(e,t){var r=ys(),n=qr(e.restDecoder);for(var i=0;i0)m=r.get(i[i.length-1]);else return null;return m},a=o();if(a===null)return null;var s=new vC,l=new Map,c=function(m,h){var g=l.get(m);(g==null||g>h)&&l.set(m,h)},d=a.refs[a.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!==Xs){var h=Pd(u,d.id.client,function(){return ga(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,ga(t,g)),p();else{d=x.refs[x.i++];continue}}else(h===0||h0)d=n.pop();else if(a!==null&&a.i0){var m=new Hp;return fN(m,s,new Map),en(m.restEncoder,0),{missing:l,update:m.toUint8Array()}}return null},mqe=function(e,t){return fN(e,t.doc.store,t.beforeState)},hqe=function(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:new Em(e);return xi(t,function(i){i.local=!1;var o=!1,a=i.doc,s=a.store,l=pqe(n,a),c=fqe(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(mm10)&&d.missing.set(p10,m10)}}catch(err){_didIteratorError1=true;_iteratorError1=err}finally{try{if(!_iteratorNormalCompletion1&&_iterator1.return!=null){_iterator1.return()}}finally{if(_didIteratorError1){throw _iteratorError1}}}d.update=_C([d.update,c.update])}}else s.pendingStructs=c;var u=Fre(n,i,s);if(s.pendingDs){var p11=new Em(Lg(s.pendingDs));qr(p11.restDecoder);var m11=Fre(p11,i,s);u&&m11?s.pendingDs=_C([u,m11]):s.pendingDs=u||m11}else s.pendingDs=u;if(o){var p12=s.pendingStructs.update;s.pendingStructs=null,Xre(i.doc,p12)}},r,!1)};var Xre=function(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:Em;var i=Lg(t);hqe(i,e,r,new n(i))},pw=function(e,t,r){return Xre(e,t,r,gC)},gqe=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:new Map;fN(e,t.store,r),cy(e,cqe(t.store))},xqe=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 Hp;var n=ene(t);gqe(r,e,n);var i=[r.toUint8Array()];if(e.store.pendingDs&&i.push(e.store.pendingDs),e.store.pendingStructs&&i.push(Pqe(e.store.pendingStructs.update,t)),i.length>1){if(r.constructor===Ug)return Aqe(i.map(function(o,a){return a===0?o:Mqe(o)}));if(r.constructor===Hp)return _C(i)}return i[0]},mN=function(e,t){return xqe(e,t,new Ug)},yqe=function(e){var t=new Map,r=qr(e.restDecoder);for(var n=0;n1&&arguments[1]!==void 0?arguments[1]:new yC;return _instanceof(e,Map)?tne(t,e):vqe(t,e),t.toUint8Array()},rne=function(e){return _qe(e,new xC)},eN=function eN1(){"use strict";_class_call_check(this,eN1);this.l=[]},zre=function(){return new eN},jre=function(e,t){return e.l.push(t)},Ure=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.")},nne=function(e,t,r){return Kb(e.l,[t,r])},km=function km1(t,r){"use strict";_class_call_check(this,km1);this.client=t,this.clock=r},uC=function(e,t){return e===t||e!==null&&t!==null&&e.client===t.client&&e.clock===t.clock},dn=function(e,t){return new km(e,t)};var bqe=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 Qs()};var tN=function tN1(t,r){"use strict";_class_call_check(this,tN1);this.ds=t,this.sv=r};var wqe=function(e,t){return new tN(e,t)},OKt=wqe(Jre(),new Map);var iy=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&&!Qre(t.ds,e.id)},rN=function(e,t){var r=Pd(e.meta,rN,Vp),n=e.doc.store;r.has(t)||(t.sv.forEach(function(i,o){i0;r=n,n=e[--i-1]){if(n.deleted===r.deleted&&n.constructor===r.constructor&&n.mergeWith(r)){_instanceof(r,uo)&&r.parentSub!==null&&r.parent._map.get(r.parentSub)===r&&r.parent._map.set(r.parentSub,n);continue}break}var o=t-i;return o&&e.splice(t+1-o,o),o},Cqe=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 o=t.clients.get(n);for(var a=i.length-1;a>=0;a--){var s=i[a],l=s.clock+s.len;for(var c=Nd(o,s.clock),d=o[c];c=0;o--){var a=r[o],s=j8(i.length-1,1+Nd(i,a.clock+a.len-1));for(var l=s,c=i[l];l>0&&c.id.clock>=a.clock;c=i[l])l-=1+pC(i,l)}})};var ane=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(){nne(c._dEH,l,r)}))}),s.push(function(){return n.emit("afterTransaction",[r,n])}),s.push(function(){r._needFormattingCleanup&&qqe(r)})}),Kb(s,[])}finally{n.gc&&Cqe(o,i,n.gcFilter),Eqe(o,i),r.afterState.forEach(function(d,u){var p=r.beforeState.get(u)||0;if(p!==d){var m=i.clients.get(u),h=Gp(Nd(m,p),1);for(var g=m.length-1;g>=h;)g-=1+pC(m,g)}});for(var d=a.length-1;d>=0;d--){var _a_d_id=a[d].id,u=_a_d_id.client,p=_a_d_id.clock,m=i.clients.get(u),h=Nd(m,p);h+11||h>0&&pC(m,h)}if(!r.local&&r.afterState.get(n.clientID)!==r.beforeState.get(n.clientID)&&(Rre(ny,rw,"[yjs] ",nw,iw,"Changed the client-id because another client seems to be using it."),n.clientID=Yre()),n.emit("afterTransactionCleanup",[r,n]),n._observers.has("update")){var d10=new Ug;qre(d10,r)&&n.emit("update",[d10.toUint8Array(),r.origin,n,r])}if(n._observers.has("updateV2")){var d11=new Hp;qre(d11,r)&&n.emit("updateV2",[d11.toUint8Array(),r.origin,n,r])}var s10=r.subdocsAdded,l=r.subdocsLoaded,c=r.subdocsRemoved;(s10.size>0||c.size>0||l.size>0)&&(s10.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:s10,removed:c},n,r]),c.forEach(function(d){return d.destroy()})),e.length<=t+1?(n._transactionCleanups=[],n.emit("afterAllTransactions",[n,e])):ane(e,t+1)}}},xi=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,o=!1,a=null;e._transaction===null&&(o=!0,e._transaction=new iN(e,r,n),i.push(e._transaction),i.length===1&&e.emit("beforeAllTransactions",[e]),e.emit("beforeTransaction",[e._transaction,e]));try{a=t(e._transaction)}finally{if(o){var s=e._transaction===i[0];e._transaction=null,s&&ane(i,0)}}return a};function Tqe(e){var t,r,n,i,o,a,s,l,l10,c,l11;return _ts_generator(this,function(_state){switch(_state.label){case 0:t=qr(e.restDecoder);r=0;_state.label=1;case 1:if(!(r1&&arguments[1]!==void 0?arguments[1]:Em,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Hp;if(e.length===1)return e[0];var n=e.map(function(d){return new t(Lg(d))}),i=n.map(function(d){return new aw(d,!0)}),o=null,a=new r,s=new sw(a);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===Xs?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(o!==null){var p=d.curr,m=!1;for(;p!==null&&p.id.clock+p.length<=o.struct.id.clock+o.struct.length&&p.id.client>=o.struct.id.client;)p=d.next(),m=!0;if(p===null||p.id.client!==u||m&&p.id.clock>o.struct.id.clock+o.struct.length)continue;if(u!==o.struct.id.client)wm(s,o.struct,o.offset),o={struct:p,offset:0},d.next();else if(o.struct.id.clock+o.struct.length0&&(o.struct.constructor===Xs?o.struct.length-=h10:p=Iqe(p,h10)),o.struct.mergeWith(p)||(wm(s,o.struct,o.offset),o={struct:p,offset:0},d.next())}}else o={struct:d.curr,offset:0},d.next();for(var p10=d.curr;p10!==null&&p10.id.client===u&&p10.id.clock===o.struct.id.clock+o.struct.length&&p10.constructor!==Xs;p10=d.next())wm(s,o.struct,o.offset),o={struct:p10,offset:0}}o!==null&&(wm(s,o.struct,o.offset),o=null),hN(s);var l=n.map(function(d){return pN(d)}),c=uqe(l);return cy(a,c),a.toUint8Array()},Pqe=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Em,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:Hp;var i=ene(t),o=new n,a=new sw(o),s=new r(Lg(e)),l=new aw(s,!1);for(;l.curr;){var d=l.curr,u=d.id.client,p=i.get(u)||0;if(l.curr.constructor===Xs){l.next();continue}if(d.id.clock+d.length>p)for(wm(a,d,Gp(p-d.id.clock,0)),l.next();l.curr&&l.curr.id.client===u;)wm(a,l.curr,0),l.next();else for(;l.curr&&l.curr.id.client===u&&l.curr.id.clock+l.curr.length<=p;)l.next()}hN(a);var c=pN(s);return cy(o,c),o.toUint8Array()};var sne=function(e){e.written>0&&(e.clientStructs.push({written:e.written,restEncoder:yc(e.encoder.restEncoder)}),e.encoder.restEncoder=qb(),e.written=0)},wm=function(e,t,r){e.written>0&&e.currClient!==t.id.client&&sne(e),e.written===0&&(e.currClient=t.id.client,e.encoder.writeClient(t.id.client),en(e.encoder.restEncoder,t.id.clock+r)),t.write(e.encoder,r),e.written++},hN=function(e){sne(e);var t=e.encoder.restEncoder;en(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 zl(Vre);var r=this.target,n=Vp(),i=Vp(),o=[];if(t={added:n,deleted:i,delta:o,keys:this.keys},this.transaction.changed.get(r).has(null)){var s=null,l=function(){s&&o.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 ay1}(),Oqe=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},Xa=function(){Mre("Invalid access: Add Yjs type to a document before reading data.")},lne=80,gN=0,oN=function oN1(t,r){"use strict";_class_call_check(this,oN1);t.marker=!0,this.p=t,this.index=r,this.timestamp=gN++},$qe=function(e){e.timestamp=gN++},une=function(e,t,r){e.p.marker=!1,e.p=t,t.marker=!0,e.index=r,e.timestamp=gN++},Nqe=function(e,t,r){if(e.length>=lne){var n=e.reduce(function(i,o){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&&Pg(r.index-i)=0;n--){var i=e[n];if(r>0){var o=i.p;for(o.marker=!1;o&&(o.deleted||!o.countable);)o=o.left,o&&!o.deleted&&o.countable&&(i.index-=o.length);if(o===null||o.marker===!0){e.splice(n,1);continue}i.p=o,o.marker=!0}(t0&&t===i.index)&&(i.index=Gp(t,i.index+r))}};var EC=function(e,t,r){var n=e,i=t.changedParentTypes;for(;Pd(i,e,function(){return[]}).push(r),e._item!==null;)e=e._item.parent;nne(n._eH,r,t)},Jo=/*#__PURE__*/function(){"use strict";function Jo1(){_class_call_check(this,Jo1);this._item=null,this._map=new Map,this._start=null,this.doc=null,this._length=0,this._eH=zre(),this._dEH=zre(),this._searchMarker=null}_create_class(Jo1,[{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 jl()}},{key:"clone",value:function clone(){throw jl()}},{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){jre(this._eH,t)}},{key:"observeDeep",value:function observeDeep(t){jre(this._dEH,t)}},{key:"unobserve",value:function unobserve(t){Ure(this._eH,t)}},{key:"unobserveDeep",value:function unobserveDeep(t){Ure(this._dEH,t)}},{key:"toJSON",value:function toJSON(){}}]);return Jo1}(),cne=function(e,t,r){var a;(a=e.doc)!=null||Xa(),t<0&&(t=e._length+t),r<0&&(r=e._length+r);var n=r-t,i=[],o=e._start;for(;o!==null&&n>0;){if(o.countable&&!o.deleted){var s=o.content.getContent();if(s.length<=t)t-=s.length;else{for(var l=t;l0;l++)i.push(s[l]),n--;t=0}}o=o.right}return i},dne=function(e){var n;(n=e.doc)!=null||Xa();var t=[],r=e._start;for(;r!==null;){if(r.countable&&!r.deleted){var i=r.content.getContent();for(var o=0;o0&&(i=new uo(dn(a,ga(s,a)),i,i&&i.lastId,l,l&&l.id,t,null,new Qp(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 uo(dn(a,ga(s,a)),i,i&&i.lastId,l,l&&l.id,t,null,new Bg(new Uint8Array(u))),i.integrate(e,0);break;case vc:i=new uo(dn(a,ga(s,a)),i,i&&i.lastId,l,l&&l.id,t,null,new Wg(u)),i.integrate(e,0);break;default:if(_instanceof(u,Jo))i=new uo(dn(a,ga(s,a)),i,i&&i.lastId,l,l&&l.id,t,null,new _c(u)),i.integrate(e,0);else throw new Error("Unexpected content type in insert operation")}}}),d()},mne=function(){return zl("Length exceeded!")},hne=function(e,t,r,n){if(r>t._length)throw mne();if(r===0)return t._searchMarker&&lw(t._searchMarker,r,n.length),bC(e,t,null,n);var i=r,o=CC(t,r),a=t._start;for(o!==null&&(a=o.p,r-=o.index,r===0&&(a=a.prev,r+=a&&a.countable&&!a.deleted?a.length:0));a!==null;a=a.right)if(!a.deleted&&a.countable){if(r<=a.length){ro.index?a:o},{index:0,p:t._start}).p;if(i)for(;i.right;)i=i.right;return bC(e,t,i,r)},gne=function(e,t,r,n){if(n===0)return;var i=r,o=n,a=CC(t,r),s=t._start;for(a!==null&&(s=a.p,r-=a.index);s!==null&&r>0;s=s.right)!s.deleted&&s.countable&&(r0&&s!==null;)s.deleted||(n0)throw mne();t._searchMarker&&lw(t._searchMarker,i,-o+n)},wC=function(e,t,r){var n=t._map.get(r);n!==void 0&&n.delete(e)},xN=function(e,t,r,n){var i=t._map.get(r)||null,o=e.doc,a=o.clientID,s;if(n==null)s=new Qp([n]);else switch(n.constructor){case Number:case Object:case Boolean:case Array:case String:case Date:case BigInt:s=new Qp([n]);break;case Uint8Array:s=new Bg(n);break;case vc:s=new Wg(n);break;default:if(_instanceof(n,Jo))s=new _c(n);else throw new Error("Unexpected content type")}new uo(dn(a,ga(o.store,a)),i,i&&i.lastId,null,null,t,r,s).integrate(e,0)},yN=function(e,t){var n;(n=e.doc)!=null||Xa();var r=e._map.get(t);return r!==void 0&&!r.deleted?r.content.getContent()[r.length-1]:void 0},xne=function(e){var r;var t={};return(r=e.doc)!=null||Xa(),e._map.forEach(function(n,i){n.deleted||(t[i]=n.content.getContent()[n.length-1])}),t},yne=function(e,t){var n;(n=e.doc)!=null||Xa();var r=e._map.get(t);return r!==void 0&&!r.deleted};var Fqe=function(e,t){var r={};return e._map.forEach(function(n,i){var o=n;for(;o!==null&&(!t.sv.has(o.id.client)||o.id.clock>=(t.sv.get(o.id.client)||0));)o=o.left;o!==null&&iy(o,t)&&(r[i]=o.content.getContent()[o.length-1])}),r},cC=function(e){var t;return(t=e.doc)!=null||Xa(),Nre(e._map.entries(),function(r){return!r[1].deleted})},aN=/*#__PURE__*/function(ay1){"use strict";_inherits(aN1,ay1);function aN1(){_class_call_check(this,aN1);return _call_super(this,aN1,arguments)}return aN1}(ay),Cm=/*#__PURE__*/function(Jo1){"use strict";_inherits(Cm1,Jo1);function Cm1(){_class_call_check(this,Cm1);var _this;_this=_call_super(this,Cm1),_this._prelimContent=[],_this._searchMarker=[];return _this}_create_class(Cm1,[{key:"_integrate",value:function _integrate(t,r){_get(_get_prototype_of(Cm1.prototype),"_integrate",this).call(this,t,r),this.insert(0,this._prelimContent),this._prelimContent=null}},{key:"_copy",value:function _copy(){return new Cm}},{key:"clone",value:function clone(){var t=new Cm;return t.insert(0,this.toArray().map(function(r){return _instanceof(r,Jo)?r.clone():r})),t}},{key:"length",get:function get1(){var t;return(t=this.doc)!=null||Xa(),this._length}},{key:"_callObserver",value:function _callObserver(t,r){_get(_get_prototype_of(Cm1.prototype),"_callObserver",this).call(this,t,r),EC(this,t,new aN(this,t))}},{key:"insert",value:function insert(t,r){var _this=this;var _this__prelimContent;this.doc!==null?xi(this.doc,function(n){hne(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?xi(this.doc,function(r){Lqe(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?xi(this.doc,function(n){gne(n,_this,t,r)}):this._prelimContent.splice(t,r)}},{key:"get",value:function get1(t){return fne(this,t)}},{key:"toArray",value:function toArray(){return dne(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 cne(this,t,r)}},{key:"toJSON",value:function toJSON(){return this.map(function(t){return _instanceof(t,Jo)?t.toJSON():t})}},{key:"map",value:function map(t){return pne(this,t)}},{key:"forEach",value:function forEach(t){uw(this,t)}},{key:Symbol.iterator,value:function value(){return Dqe(this)}},{key:"_write",value:function _write(t){t.writeTypeRef(aWe)}}],[{key:"from",value:function from(t){var r=new Cm;return r.push(t),r}}]);return Cm1}(Jo),zqe=function(e){return new Cm},sN=/*#__PURE__*/function(ay1){"use strict";_inherits(sN1,ay1);function sN1(t,r,n){_class_call_check(this,sN1);var _this;_this=_call_super(this,sN1,[t,r]),_this.keysChanged=n;return _this}return sN1}(ay),Am=/*#__PURE__*/function(Jo1){"use strict";_inherits(Am1,Jo1);function Am1(t){_class_call_check(this,Am1);var _this;_this=_call_super(this,Am1),_this._prelimContent=null,t===void 0?_this._prelimContent=new Map:_this._prelimContent=new Map(t);return _this}_create_class(Am1,[{key:"_integrate",value:function _integrate(t,r){var _this=this;_get(_get_prototype_of(Am1.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 Am}},{key:"clone",value:function clone(){var t=new Am;return this.forEach(function(r,n){t.set(n,_instanceof(r,Jo)?r.clone():r)}),t}},{key:"_callObserver",value:function _callObserver(t,r){EC(this,t,new sN(this,t,r))}},{key:"toJSON",value:function toJSON(){var r;(r=this.doc)!=null||Xa();var t={};return this._map.forEach(function(n,i){if(!n.deleted){var o=n.content.getContent()[n.length-1];t[i]=_instanceof(o,Jo)?o.toJSON():o}}),t}},{key:"size",get:function get1(){return _to_consumable_array(cC(this)).length}},{key:"keys",value:function keys(){return lC(cC(this),function(t){return t[0]})}},{key:"values",value:function values(){return lC(cC(this),function(t){return t[1].content.getContent()[t[1].length-1]})}},{key:"entries",value:function entries(){return lC(cC(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||Xa(),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?xi(this.doc,function(r){wC(r,_this,t)}):this._prelimContent.delete(t)}},{key:"set",value:function set1(t,r){var _this=this;return this.doc!==null?xi(this.doc,function(n){xN(n,_this,t,r)}):this._prelimContent.set(t,r),r}},{key:"get",value:function get1(t){return yN(this,t)}},{key:"has",value:function has(t){return yne(this,t)}},{key:"clear",value:function clear(){var _this=this;this.doc!==null?xi(this.doc,function(t){_this.forEach(function(r,n,i){wC(t,i,n)})}):this._prelimContent.clear()}},{key:"_write",value:function _write(t){t.writeTypeRef(sWe)}}]);return Am1}(Jo),jqe=function(e){return new Am},Sm=function(e,t){return e===t||(typeof e==="undefined"?"undefined":_type_of(e))=="object"&&(typeof t==="undefined"?"undefined":_type_of(t))=="object"&&e&&t&&A$(e,t)},cw=/*#__PURE__*/function(){"use strict";function cw1(t,r,n,i){_class_call_check(this,cw1);this.left=t,this.right=r,this.index=n,this.currentAttributes=i}_create_class(cw1,[{key:"forward",value:function forward(){switch(this.right===null&&Qs(),this.right.content.constructor){case co:this.right.deleted||dy(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 cw1}(),Gre=function(e,t,r){for(;t.right!==null&&r>0;){switch(t.right.content.constructor){case co:t.right.deleted||dy(t.currentAttributes,t.right.content);break;default:t.right.deleted||(r0||s.size>0&&(r.right.deleted||r.right.content.constructor===co));){if(!r.right.deleted)switch(r.right.content.constructor){case co:{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(Sm(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 l10="";for(;n>0;n--)l10+="\n";r.right=new uo(dn(a,ga(o.store,a)),r.left,r.left&&r.left.lastId,r.right,r.right&&r.right.id,t,null,new Au(l10)),r.right.integrate(e,0),r.forward()}vne(e,t,r,s)},wne=function(e,t,r,n,i){var c,d;var o=t,a=ys();for(;o&&(!o.countable||o.deleted);){if(!o.deleted&&o.content.constructor===co){var u=o.content;a.set(u.key,u)}o=o.right}var s=0,l=!1;for(;t!==o;){if(r===t&&(l=!0),!t.deleted){var u10=t.content;switch(u10.constructor){case co:{var p=u10.key,m=u10.value,h=(c=n.get(p))!=null?c:null;(a.get(p)!==u10||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&&dy(i,u10);break}}}t=t.right}return s},Uqe=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===co){var n=t.content.key;r.has(n)?t.delete(e):r.add(n)}t=t.left}},Bqe=function(e){var t=0;return xi(e.doc,function(r){var n=e._start,i=e._start,o=ys(),a=N8(o);for(;i;){if(i.deleted===!1)switch(i.content.constructor){case co:dy(a,i.content);break;default:t+=wne(r,n,i,o,a),o=N8(a),n=i;break}i=i.right}}),t},qqe=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 o=e.beforeState.get(n)||0;i!==o&&one(e,r.store.clients.get(n),o,i,function(a){!a.deleted&&a.content.constructor===co&&a.constructor!==Ys&&t.add(a.parent)})}}catch(err){_didIteratorError=true;_iteratorError=err}finally{try{if(!_iteratorNormalCompletion&&_iterator.return!=null){_iterator.return()}}finally{if(_didIteratorError){throw _iteratorError}}}xi(r,function(n){Kre(e,e.deleteSet,function(i){if(_instanceof(i,Ys)||!i.parent._hasFormatting||t.has(i.parent))return;var o=i.parent;i.content.constructor===co?t.add(o):Uqe(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;Bqe(i)}}catch(err){_didIteratorError=true;_iteratorError=err}finally{try{if(!_iteratorNormalCompletion&&_iterator.return!=null){_iterator.return()}}finally{if(_didIteratorError){throw _iteratorError}}}})},Zre=function(e,t,r){var n=r,i=N8(t.currentAttributes),o=t.right;for(;r>0&&t.right!==null;){if(t.right.deleted===!1)switch(t.right.content.constructor){case _c:case Kp:case Au: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(v,y){v!==null&&(x.attributes[y]=v)}))),c="";break;case"retain":d>0&&(x={retain:d},ure(l)||(x.attributes=sre({},l))),d=0;break}x&&r.push(x),s=null}};for(;a!==null;){switch(a.content.constructor){case _c:case Kp:_this.adds(a)?_this.deletes(a)||(p(),s="insert",c=a.content.getContent()[0],p()):_this.deletes(a)?(s!=="delete"&&(p(),s="delete"),u+=1):a.deleted||(s!=="retain"&&(p(),s="retain"),d+=1);break;case Au:_this.adds(a)?_this.deletes(a)||(s!=="insert"&&(p(),s="insert"),c+=a.content.str):_this.deletes(a)?(s!=="delete"&&(p(),s="delete"),u+=a.length):a.deleted||(s!=="retain"&&(p(),s="retain"),d+=a.length);break;case co:{var _a_content=a.content,x=_a_content.key,v=_a_content.value;if(_this.adds(a)){if(!_this.deletes(a)){var y=(m=i.get(x))!=null?m:null;Sm(y,v)?v!==null&&a.delete(n):(s==="retain"&&p(),Sm(v,(h=o.get(x))!=null?h:null)?delete l[x]:l[x]=v)}}else if(_this.deletes(a)){o.set(x,v);var y10=(g=i.get(x))!=null?g:null;Sm(y10,v)||(s==="retain"&&p(),l[x]=y10)}else if(!a.deleted){o.set(x,v);var y11=l[x];y11!==void 0&&(Sm(y11,v)?y11!==null&&a.delete(n):(s==="retain"&&p(),v===null?delete l[x]:l[x]=v))}a.deleted||(s==="insert"&&p(),dy(i,a.content));break}}a=a.right}for(p();r.length>0;){var x10=r[r.length-1];if(x10.retain!==void 0&&x10.attributes===void 0)r.pop();else break}}),this._delta=r}return this._delta}}]);return lN1}(ay),Im=/*#__PURE__*/function(Jo1){"use strict";_inherits(Im1,Jo1);function Im1(t){_class_call_check(this,Im1);var _this;_this=_call_super(this,Im1),_this._pending=t!==void 0?[function(){return _this.insert(0,t)}]:[],_this._searchMarker=[],_this._hasFormatting=!1;return _this}_create_class(Im1,[{key:"length",get:function get1(){var t;return(t=this.doc)!=null||Xa(),this._length}},{key:"_integrate",value:function _integrate(t,r){_get(_get_prototype_of(Im1.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 Im}},{key:"clone",value:function clone(){var t=new Im;return t.applyDelta(this.toDelta()),t}},{key:"_callObserver",value:function _callObserver(t,r){_get(_get_prototype_of(Im1.prototype),"_callObserver",this).call(this,t,r);var n=new lN(this,t,r);EC(this,t,n),!t.local&&this._hasFormatting&&(t._needFormattingCleanup=!0)}},{key:"toString",value:function toString(){var n;(n=this.doc)!=null||Xa();var t="",r=this._start;for(;r!==null;)!r.deleted&&r.countable&&r.content.constructor===Au&&(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?xi(this.doc,function(n){var i=new cw(null,_this._start,0,new Map);for(var o=0;o0)&&Y$(n,_this,i,s,a.attributes||{})}else a.retain!==void 0?Hre(n,_this,i,a.retain,a.attributes||{}):a.delete!==void 0&&Zre(n,i,a.delete)}}):this._pending.push(function(){return _this.applyDelta(t)})}},{key:"toDelta",value:function toDelta(t,r,n){var u;(u=this.doc)!=null||Xa();var i=[],o=new Map,a=this.doc,s="",l=this._start;function c(){if(s.length>0){var p={},m=!1;o.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(iy(l,t)||r!==void 0&&iy(l,r))switch(l.content.constructor){case Au:{var p=o.get("ychange");t!==void 0&&!iy(l,t)?(p===void 0||p.user!==l.id.client||p.type!=="removed")&&(c(),o.set("ychange",n?n("removed",l.id):{type:"removed"})):r!==void 0&&!iy(l,r)?(p===void 0||p.user!==l.id.client||p.type!=="added")&&(c(),o.set("ychange",n?n("added",l.id):{type:"added"})):p!==void 0&&(c(),o.delete("ychange")),s+=l.content.str;break}case _c:case Kp:{c();var p10={insert:l.content.getContent()[0]};if(o.size>0){var m={};p10.attributes=m,o.forEach(function(h,g){m[g]=h})}i.push(p10);break}case co:iy(l,t)&&(c(),dy(o,l.content));break}l=l.right};for(;l!==null;)_loop();c()};return t||r?xi(a,function(p){t&&rN(p,t),r&&rN(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?xi(i,function(o){var a=dC(o,_this,t,!n);n||(n={},a.currentAttributes.forEach(function(s,l){n[l]=s})),Y$(o,_this,a,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?xi(i,function(o){var a=dC(o,_this,t,!n);Y$(o,_this,a,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?xi(n,function(i){Zre(i,dC(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?xi(i,function(o){var a=dC(o,_this,t,!1);a.right!==null&&Hre(o,_this,a,r,n)}):this._pending.push(function(){return _this.format(t,r,n)})}},{key:"removeAttribute",value:function removeAttribute(t){var _this=this;this.doc!==null?xi(this.doc,function(r){wC(r,_this,t)}):this._pending.push(function(){return _this.removeAttribute(t)})}},{key:"setAttribute",value:function setAttribute(t,r){var _this=this;this.doc!==null?xi(this.doc,function(n){xN(n,_this,t,r)}):this._pending.push(function(){return _this.setAttribute(t,r)})}},{key:"getAttribute",value:function getAttribute(t){return yN(this,t)}},{key:"getAttributes",value:function getAttributes(){return xne(this)}},{key:"_write",value:function _write(t){t.writeTypeRef(lWe)}}]);return Im1}(Jo),Wqe=function(e){return new Im},ow=/*#__PURE__*/function(){"use strict";function ow1(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:function(){return!0};_class_call_check(this,ow1);var n;this._filter=r,this._root=t,this._currentNode=t._start,this._firstCall=!0,(n=t.doc)!=null||Xa()}_create_class(ow1,[{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===Pm||r.constructor===Zp)&&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 ow1}(),Zp=/*#__PURE__*/function(Jo1){"use strict";_inherits(Zp1,Jo1);function Zp1(){_class_call_check(this,Zp1);var _this;_this=_call_super(this,Zp1),_this._prelimContent=[];return _this}_create_class(Zp1,[{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(Zp1.prototype),"_integrate",this).call(this,t,r),this.insert(0,this._prelimContent),this._prelimContent=null}},{key:"_copy",value:function _copy(){return new Zp}},{key:"clone",value:function clone(){var t=new Zp;return t.insert(0,this.toArray().map(function(r){return _instanceof(r,Jo)?r.clone():r})),t}},{key:"length",get:function get1(){var t;return(t=this.doc)!=null||Xa(),this._prelimContent===null?this._length:this._prelimContent.length}},{key:"createTreeWalker",value:function createTreeWalker(t){return new ow(this,t)}},{key:"querySelector",value:function querySelector(t){t=t.toUpperCase();var n=new ow(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(),Rd(new ow(this,function(r){return r.nodeName&&r.nodeName.toUpperCase()===t}))}},{key:"_callObserver",value:function _callObserver(t,r){EC(this,t,new uN(this,r,t))}},{key:"toString",value:function toString(){return pne(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),uw(this,function(o){i.insertBefore(o.toDOM(t,r,n),null)}),i}},{key:"insert",value:function insert(t,r){var _this=this;var _this__prelimContent;this.doc!==null?xi(this.doc,function(n){hne(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)xi(this.doc,function(n){var i=t&&_instanceof(t,Jo)?t._item:t;bC(n,_this,i,r)});else{var _n;var n=this._prelimContent,i=t===null?0:n.findIndex(function(o){return o===t})+1;if(i===0&&t!==null)throw zl("Reference item not found");(_n=n).splice.apply(_n,[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?xi(this.doc,function(n){gne(n,_this,t,r)}):this._prelimContent.splice(t,r)}},{key:"toArray",value:function toArray(){return dne(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 fne(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 cne(this,t,r)}},{key:"forEach",value:function forEach(t){uw(this,t)}},{key:"_write",value:function _write(t){t.writeTypeRef(cWe)}}]);return Zp1}(Jo),Vqe=function(e){return new Zp},Pm=/*#__PURE__*/function(Zp1){"use strict";_inherits(Pm1,Zp1);function Pm1(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"UNDEFINED";_class_call_check(this,Pm1);var _this;_this=_call_super(this,Pm1),_this.nodeName=t,_this._prelimAttrs=new Map;return _this}_create_class(Pm1,[{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(Pm1.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 Pm(this.nodeName)}},{key:"clone",value:function clone(){var t=new Pm(this.nodeName),r=this.getAttributes();return lre(r,function(n,i){t.setAttribute(i,n)}),t.insert(0,this.toArray().map(function(n){return _instanceof(n,Jo)?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 s10=0;s100?" "+r.join(" "):"";return"<".concat(o).concat(a,">").concat(_get(_get_prototype_of(Pm1.prototype),"toString",this).call(this),"")}},{key:"removeAttribute",value:function removeAttribute(t){var _this=this;this.doc!==null?xi(this.doc,function(r){wC(r,_this,t)}):this._prelimAttrs.delete(t)}},{key:"setAttribute",value:function setAttribute(t,r){var _this=this;this.doc!==null?xi(this.doc,function(n){xN(n,_this,t,r)}):this._prelimAttrs.set(t,r)}},{key:"getAttribute",value:function getAttribute(t){return yN(this,t)}},{key:"hasAttribute",value:function hasAttribute(t){return yne(this,t)}},{key:"getAttributes",value:function getAttributes(t){return t?Fqe(this,t):xne(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),o=this.getAttributes();for(var a in o){var s=o[a];typeof s=="string"&&i.setAttribute(a,s)}return uw(this,function(a){i.appendChild(a.toDOM(t,r,n))}),n!==void 0&&n._createAssociation(i,this),i}},{key:"_write",value:function _write(t){t.writeTypeRef(uWe),t.writeKey(this.nodeName)}}]);return Pm1}(Zp),Gqe=function(e){return new Pm(e.readKey())},uN=/*#__PURE__*/function(ay1){"use strict";_inherits(uN1,ay1);function uN1(t,r,n){_class_call_check(this,uN1);var _this;_this=_call_super(this,uN1,[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 uN1}(ay),sy=/*#__PURE__*/function(Am1){"use strict";_inherits(sy1,Am1);function sy1(t){_class_call_check(this,sy1);var _this;_this=_call_super(this,sy1),_this.hookName=t;return _this}_create_class(sy1,[{key:"_copy",value:function _copy(){return new sy(this.hookName)}},{key:"clone",value:function clone(){var t=new sy(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],o;return i!==void 0?o=i.createDom(this):o=document.createElement(this.hookName),o.setAttribute("data-yjs-hook",this.hookName),n!==void 0&&n._createAssociation(o,this),o}},{key:"_write",value:function _write(t){t.writeTypeRef(dWe),t.writeKey(this.hookName)}}]);return sy1}(Am),Hqe=function(e){return new sy(e.readKey())},ly=/*#__PURE__*/function(Im1){"use strict";_inherits(ly1,Im1);function ly1(){_class_call_check(this,ly1);return _call_super(this,ly1,arguments)}_create_class(ly1,[{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 ly}},{key:"clone",value:function clone(){var t=new ly;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 o=[];for(var a in t.attributes[i])o.push({key:a,value:t.attributes[i][a]});o.sort(function(a,s){return a.key=0;i11--)n+="");return n}).join("")}},{key:"toJSON",value:function toJSON(){return this.toString()}},{key:"_write",value:function _write(t){t.writeTypeRef(pWe)}}]);return ly1}(Im),Zqe=function(e){return new ly},dw=/*#__PURE__*/function(){"use strict";function dw1(t,r){_class_call_check(this,dw1);this.id=t,this.length=r}_create_class(dw1,[{key:"deleted",get:function get1(){throw jl()}},{key:"mergeWith",value:function mergeWith(t){return!1}},{key:"write",value:function write(t,r,n){throw jl()}},{key:"integrate",value:function integrate(t,r){throw jl()}}]);return dw1}(),Kqe=0,Ys=/*#__PURE__*/function(dw1){"use strict";_inherits(Ys1,dw1);function Ys1(){_class_call_check(this,Ys1);return _call_super(this,Ys1,arguments)}_create_class(Ys1,[{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),ine(t.doc.store,this)}},{key:"write",value:function write(t,r){t.writeInfo(Kqe),t.writeLen(this.length-r)}},{key:"getMissing",value:function getMissing(t,r){return null}}]);return Ys1}(dw),Bg=/*#__PURE__*/function(){"use strict";function Bg1(t){_class_call_check(this,Bg1);this.content=t}_create_class(Bg1,[{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 Bg(this.content)}},{key:"splice",value:function splice(t){throw jl()}},{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 gc1(t){}},{key:"write",value:function write(t,r){t.writeBuf(this.content)}},{key:"getRef",value:function getRef(){return 3}}]);return Bg1}(),Qqe=function(e){return new Bg(e.readBuf())},qg=/*#__PURE__*/function(){"use strict";function qg1(t){_class_call_check(this,qg1);this.len=t}_create_class(qg1,[{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 qg(this.len)}},{key:"splice",value:function splice(t){var r=new qg(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){mC(t.deleteSet,r.id.client,r.id.clock,this.len),r.markDeleted()}},{key:"delete",value:function _delete(t){}},{key:"gc",value:function gc1(t){}},{key:"write",value:function write(t,r){t.writeLen(this.len-r)}},{key:"getRef",value:function getRef(){return 1}}]);return qg1}(),Jqe=function(e){return new qg(e.readLen())},Sne=function(e,t){return new vc(_object_spread_props(_object_spread({guid:e},t),{shouldLoad:t.shouldLoad||t.autoLoad||!1}))},Wg=/*#__PURE__*/function(){"use strict";function Wg1(t){_class_call_check(this,Wg1);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(Wg1,[{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 Wg(Sne(this.doc.guid,this.opts))}},{key:"splice",value:function splice(t){throw jl()}},{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 gc1(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 Wg1}(),Yqe=function(e){return new Wg(Sne(e.readString(),e.readAny()))},Kp=/*#__PURE__*/function(){"use strict";function Kp1(t){_class_call_check(this,Kp1);this.embed=t}_create_class(Kp1,[{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 Kp(this.embed)}},{key:"splice",value:function splice(t){throw jl()}},{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 gc1(t){}},{key:"write",value:function write(t,r){t.writeJSON(this.embed)}},{key:"getRef",value:function getRef(){return 5}}]);return Kp1}(),Xqe=function(e){return new Kp(e.readJSON())},co=/*#__PURE__*/function(){"use strict";function co1(t,r){_class_call_check(this,co1);this.key=t,this.value=r}_create_class(co1,[{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 co(this.key,this.value)}},{key:"splice",value:function splice(t){throw jl()}},{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 gc1(t){}},{key:"write",value:function write(t,r){t.writeKey(this.key),t.writeJSON(this.value)}},{key:"getRef",value:function getRef(){return 6}}]);return co1}(),eWe=function(e){return new co(e.readKey(),e.readJSON())},uy=/*#__PURE__*/function(){"use strict";function uy1(t){_class_call_check(this,uy1);this.arr=t}_create_class(uy1,[{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 uy(this.arr)}},{key:"splice",value:function splice(t){var r=new uy(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 gc1(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 gc1(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 Au1}(),iWe=function(e){return new Au(e.readString())},oWe=[zqe,jqe,Wqe,Gqe,Vqe,Hqe,Zqe],aWe=0,sWe=1,lWe=2,uWe=3,cWe=4,dWe=5,pWe=6,_c=/*#__PURE__*/function(){"use strict";function _c1(t){_class_call_check(this,_c1);this.type=t}_create_class(_c1,[{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 _c(this.type._copy())}},{key:"splice",value:function splice(t){throw jl()}},{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 gc1(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 _c1}(),fWe=function(e){return new _c(oWe[e.readTypeRef()](e))};var SC=function(e,t,r){var _t_id=t.id,n=_t_id.client,i=_t_id.clock,o=new uo(dn(n,i+r),t,dn(n,i+r-1),t.right,t.rightOrigin,t.parent,t.parentSub,t.content.splice(r));return t.deleted&&o.markDeleted(),t.keep&&(o.keep=!0),t.redone!==null&&(o.redone=dn(t.redone.client,t.redone.clock+r)),t.right=o,o.right!==null&&(o.right.left=o),e._mergeStructs.push(o),o.parentSub!==null&&o.right===null&&o.parent._map.set(o.parentSub,o),t.length=r,o};var uo=/*#__PURE__*/function(dw1){"use strict";_inherits(uo1,dw1);function uo1(t,r,n,i,o,a,s,l){_class_call_check(this,uo1);var _this;_this=_call_super(this,uo1,[t,l.getLength()]),_this.origin=n,_this.left=r,_this.right=i,_this.rightOrigin=o,_this.parent=a,_this.parentSub=s,_this.redone=null,_this.content=l,_this.info=_this.content.isCountable()?2:0;return _this}_create_class(uo1,[{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>=ga(r,this.origin.client))return this.origin.client;if(this.rightOrigin&&this.rightOrigin.client!==this.id.client&&this.rightOrigin.clock>=ga(r,this.rightOrigin.client))return this.rightOrigin.client;if(this.parent&&this.parent.constructor===km&&this.id.client!==this.parent.client&&this.parent.clock>=ga(r,this.parent.client))return this.parent.client;if(this.origin&&(this.left=Bre(t,r,this.origin),this.origin=this.left.lastId),this.rightOrigin&&(this.right=Tm(t,this.rightOrigin),this.rightOrigin=this.right.id),this.left&&this.left.constructor===Ys||this.right&&this.right.constructor===Ys)this.parent=null;else if(!this.parent)this.left&&this.left.constructor===uo?(this.parent=this.left.parent,this.parentSub=this.left.parentSub):this.right&&this.right.constructor===uo&&(this.parent=this.right.parent,this.parentSub=this.right.parentSub);else if(this.parent.constructor===km){var n=J$(r,this.parent);n.constructor===Ys?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=Bre(t,t.doc.store,dn(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 o=new Set,a=new Set;for(;i!==null&&i!==this.right;){if(a.add(i),o.add(i),uC(this.origin,i.origin)){if(i.id.client0?dn(this.id.client,this.id.clock+r-1):this.origin,i=this.rightOrigin,o=this.parentSub,a=this.content.getRef()&31|(n===null?0:128)|(i===null?0:64)|(o===null?0:32);if(t.writeInfo(a),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=bqe(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===km?(t.writeParentInfo(!1),t.writeLeftID(s)):Qs();o!==null&&t.writeString(o)}this.content.write(t,r)}}]);return uo1}(dw),kne=function(e,t){return mWe[t&31](e)},mWe=[function(){Qs()},Jqe,tWe,Qqe,iWe,Xqe,eWe,fWe,nWe,Yqe,function(){Qs()}],hWe=10,Xs=/*#__PURE__*/function(dw1){"use strict";_inherits(Xs1,dw1);function Xs1(){_class_call_check(this,Xs1);return _call_super(this,Xs1,arguments)}_create_class(Xs1,[{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){Qs()}},{key:"write",value:function write(t,r){t.writeInfo(hWe),en(t.restEncoder,this.length-r)}},{key:"getMissing",value:function getMissing(t,r){return null}}]);return Xs1}(dw),Cne=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:{},Ene="__ $YJS$ __";Cne[Ene]===!0&&console.error("Yjs was already imported. This breaks constructor checks and will lead to issues! - https://github.com/yjs/yjs/issues/438");Cne[Ene]=!0;function xWe(e,t,r){var n=f$(t,e,r,{excludeFalseConflicts:!0,stringSeparator:"\n"});if(n.some(function(o){return!o.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 o=_step.value;o.ok&&i.push(o.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 Tne(param){var e=param.localContentText,t=param.remoteContentText,r=param.baseContentText;if(e===t)return{success:!0,isIdentical:!0};var _jte=jte(e,r,t,{excludeFalseConflicts:!0,stringSeparator:"\n",label:{a:"LOCAL",o:"BASE",b:"REMOTE"}}),n=_jte.result;return{success:!0,mergedText:n.join("\n")}}var Dd=Symbol("missing-json-value");function vN(e){return e!==null&&(typeof e==="undefined"?"undefined":_type_of(e))=="object"&&!Array.isArray(e)}function _N(e,t){return e===Dd||t===Dd?e===t:GO(e,t)}function Ane(e,t,r){if(_N(t,r))return t;if(_N(t,e))return r;if(_N(r,e))return t;if(vN(t)&&vN(r)&&(vN(e)||e===Dd)){var n=e===Dd?{}:e,i=new Set(_to_consumable_array(Object.keys(t)).concat(_to_consumable_array(Object.keys(r)),_to_consumable_array(Object.keys(n)))),o=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 a=_step.value;var s=Ane(Object.hasOwn(n,a)?n[a]:Dd,Object.hasOwn(t,a)?t[a]:Dd,Object.hasOwn(r,a)?r[a]:Dd);s!==Dd&&(o[a]=s)}}catch(err){_didIteratorError=true;_iteratorError=err}finally{try{if(!_iteratorNormalCompletion&&_iterator.return!=null){_iterator.return()}}finally{if(_didIteratorError){throw _iteratorError}}}return o}return t}function yWe(e){if(!e.includes("\n"))return;var t=e.match(/\n([\t ]+)\S/);return t?t[1].startsWith(" ")?" ":t[1].length:2}function vWe(e,t,r,n){try{var i=JSON.parse(t),o=JSON.parse(r),a=n?JSON.parse(e):Dd,s=Ane(a,i,o);if(s===Dd)return;var l=t.endsWith("\n")?"\n":"";return JSON.stringify(s,null,yWe(t))+l}catch(i){return}}function _We(e,t,r){var i=new fw.diff_match_patch().diff_main(t,r),o=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),a=_step_value[0],s=_step_value[1];switch(a){case fw.diff_match_patch.DIFF_EQUAL:o+=s.length;break;case fw.diff_match_patch.DIFF_DELETE:e.delete(o,s.length);break;case fw.diff_match_patch.DIFF_INSERT:e.insert(o,s),o+=s.length}}}catch(err){_didIteratorError=true;_iteratorError=err}finally{try{if(!_iteratorNormalCompletion&&_iterator.return!=null){_iterator.return()}}finally{if(_didIteratorError){throw _iteratorError}}}})}function bWe(e,t,r){var n=new vc;n.getText("content").insert(0,e);var i=mN(n),o=rne(n),a=function(c){var d=new vc;return pw(d,i),_We(d.getText("content"),e,c),mN(d,o)},s=new vc;return pw(s,i),pw(s,a(t)),pw(s,a(r)),s.getText("content").toJSON()}function Ine(e){return _async_to_generator(function(){var t,r,n,i,tmp,o,_$s,a;return _ts_generator(this,function(_state){t=e.localContentText,r=e.remoteContentText,n=e.baseContentText,i=e.filePath,tmp=e.hasBase,o=tmp===void 0?!0:tmp;if(t===r)return[2,{success:!0,isIdentical:!0}];if(i!=null&&i.trim().toLowerCase().endsWith(".json")){_$s=vWe(n,t,r,o);if(_$s!==void 0)return[2,{success:!0,mergedText:_$s}]}a=xWe(n,t,r);if(a!==!1)return[2,{success:!0,mergedText:a}];try{return[2,{success:!0,mergedText:bWe(n,t,r)}]}catch(s){return[2,{success:!1,error:_instanceof(s,Error)?s.message:String(s)}]}return[2]})})()}var py=function(i){return i.NoConflictMerge="no-conflict-merge",i.Diff3="diff3",i.LocalPriority="local-priority",i.ServerPriority="server-priority",i}(py||{}),Iu=/*#__PURE__*/function(Kn1){"use strict";_inherits(Iu1,Kn1);function Iu1(r){_class_call_check(this,Iu1);var _this;_this=_call_super(this,Iu1,[r]);_this.options=r;return _this}_create_class(Iu1,[{key:"exec",value:function exec(){return _async_to_generator(function(){var r,n,_$i,_tmp,o,_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,Ya(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,Fte(this.webdav,this.remotePath)];case 5:_tmp1=_state.sent();_state.label=6;case 6:o=_tmp1;if(o.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&&o.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(Ine,"NoConflictMerge")];case 8:return[2,_state.sent()];case 9:return[4,this.execMerge(Tne,"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(o)];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:hi(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,Fl(this.vault,this.localPath)];case 1:if(!_state.sent())return[2,{success:!1,error:hi(new Error("cannot find file in local fs: "+this.localPath),this)}];return[4,xc(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:hi(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,$8({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:hi(n,this)})];case 3:return[2]}})}).call(this)}},{key:"execMerge",value:function execMerge(r,n){return _async_to_generator(function(){var i,o,s,l,_this_options,c,d,u,_tmp,p,m,h,g,x,v,y,_tmp1,_tmp2,a;return _ts_generator(this,function(_state){switch(_state.label){case 0:_state.trys.push([0,16,,17]);return[4,Fl(this.vault,this.localPath)];case 1:if(!_state.sent())throw new Error("cannot find file in local fs: "+this.localPath);return[4,xc(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(M8(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,vm.get(u)];case 4:_tmp=d=_state.sent();_state.label=5;case 5:_tmp;p=$b(this.localPath),m=$b(this.remotePath);if(!(p&&m))throw new Error(P.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=(o=_state.sent())!=null?o:"";return[4,r({localContentText:h,remoteContentText:g,baseContentText:x,filePath:this.localPath,hasBase:d!==null})];case 9:v=_state.sent();if(this.logger.info("[ConflictResolve/".concat(n,"] ").concat(this.localPath,": merge ").concat(v.success?"ok":"failed")),!v.success)throw new Error(P.t("sync.error.failedToAutoMerge"));if(v.isIdentical)return[2,{success:!0}];y=v.mergedText;if(!(y===g))return[3,12];_tmp1=y!==h;if(!_tmp1)return[3,11];return[4,Dx(this.vault,this.localPath,y)];case 10:_tmp1=_state.sent();_state.label=11;case 11:return[2,(_tmp1,{success:!0})];case 12:return[4,this.webdav.putFileContents(this.remotePath,y,{overwrite:!0})];case 13:if(!_state.sent())throw new Error(P.t("sync.error.failedToUploadMerged"));_tmp2=h!==y;if(!_tmp2)return[3,15];return[4,Dx(this.vault,this.localPath,y)];case 14:_tmp2=_state.sent();_state.label=15;case 15:return[2,(_tmp2,{success:!0})];case 16:a=_state.sent();return[2,(this.logger.error("[ConflictResolve/".concat(n,"] failed: ").concat(this.localPath),a),{success:!1,error:hi(a,this)})];case 17:return[2]}})}).call(this)}}]);return Iu1}(Kn);var wWe=':*?"<>|',Pne=wWe.split("");function Pu(e){return Pne.some(function(t){return e.includes(t)})}function Rne(e){return Pne.filter(function(t){return e.includes(t)})}var mw=/*#__PURE__*/function _target(Error1){"use strict";_inherits(mw1,Error1);function mw1(r,n){_class_call_check(this,mw1);var _this;var i;_this=_call_super(this,mw1);_this.invalidChars=r;_this.filePath=n;_this.name="FilenameError",(i=Object.setPrototypeOf)==null||i.call(Object,_this,(_instanceof(this,mw1)?this.constructor:void 0).prototype),Object.defineProperty(_this,"message",{configurable:!0,get:function(){return mw.format(_this.invalidChars,_this.filePath)}});return _this}_create_class(mw1,null,[{key:"format",value:function format(r,n){var o=Array.from(new Set(r)).map(function(a){return"'".concat(a,"'")}).join(", ");return P.t("errors.filenameUnsupportedChars",{chars:o,path:n})}}]);return mw1}(_wrap_native_super(Error)),Jp=/*#__PURE__*/function(Kn1){"use strict";_inherits(Jp1,Kn1);function Jp1(){_class_call_check(this,Jp1);return _call_super(this,Jp1,arguments)}_create_class(Jp1,[{key:"exec",value:function exec(){var t=Rne(this.localPath);return{success:!1,error:hi(new mw(t,this.localPath),this)}}}]);return Jp1}(Kn);var bc=/*#__PURE__*/function(Kn1){"use strict";_inherits(bc1,Kn1);function bc1(){_class_call_check(this,bc1);return _call_super(this,bc1,arguments)}_create_class(bc1,[{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,Ja(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:hi(t,this)})];case 3:return[2]}})}).call(this)}}]);return bc1}(Kn);var Ia=/*#__PURE__*/function(Kn1){"use strict";_inherits(Ia1,Kn1);function Ia1(){_class_call_check(this,Ia1);return _call_super(this,Ia1,arguments)}_create_class(Ia1,[{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,Ya(this.vault,this.localPath)];case 1:if(!_state.sent())throw this.logger.debug("[MkdirRemote] local path not found:",this.localPath),new Error(P.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:hi(t,this)})];case 4:return[2]}})}).call(this)}}]);return Ia1}(Kn);var Ru=/*#__PURE__*/function(Kn1){"use strict";_inherits(Ru1,Kn1);function Ru1(r){_class_call_check(this,Ru1);var _this;_this=_call_super(this,Ru1,[r]);A(_this,"additionalPaths");_this.additionalPaths=r.additionalPaths;return _this}_create_class(Ru1,[{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,Ya(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(P.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:hi(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(Ru1.prototype),"toJSON",this).call(this)),{additionalPaths:this.additionalPaths,totalDirs:this.getAllPaths().length})}}]);return Ru1}(Kn);var el=/*#__PURE__*/function(Kn1){"use strict";_inherits(el1,Kn1);function el1(){_class_call_check(this,el1);return _call_super(this,el1,arguments)}_create_class(el1,[{key:"exec",value:function exec(){return{success:!0}}}]);return el1}(Kn);var Mu=/*#__PURE__*/function(Kn1){"use strict";_inherits(Mu1,Kn1);function Mu1(r){_class_call_check(this,Mu1);var _this;_this=_call_super(this,Mu1,[r]);_this.options=r;return _this}_create_class(Mu1,[{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,$8({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:hi(r,this)})];case 3:return[2]}})}).call(this)}}]);return Mu1}(Kn);var Ou=/*#__PURE__*/function(Kn1){"use strict";_inherits(Ou1,Kn1);function Ou1(){_class_call_check(this,Ou1);return _call_super(this,Ou1,arguments)}_create_class(Ou1,[{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,Fl(this.vault,this.localPath)];case 1:if(!_state.sent())throw new Error("cannot find file in local fs: "+this.localPath);return[4,xc(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:hi(t,this)})];case 5:return[2]}})}).call(this)}}]);return Ou1}(Kn);var tl=/*#__PURE__*/function(Kn1){"use strict";_inherits(tl1,Kn1);function tl1(r){_class_call_check(this,tl1);var _this;_this=_call_super(this,tl1,[r]);_this.options=r;return _this}_create_class(tl1,[{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,Ya(this.vault,this.localPath)];case 1:if(!_state.sent())return[3,3];this.logger.info("[RemoveLocal] ".concat(this.localPath));return[4,Lx(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:hi(r,this)})];case 6:return[2]}})}).call(this)}}]);return tl1}(Kn);var wc=/*#__PURE__*/function(Kn1){"use strict";_inherits(wc1,Kn1);function wc1(){_class_call_check(this,wc1);return _call_super(this,wc1,arguments)}_create_class(wc1,[{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:hi(t,this)})];case 3:return[2]}})}).call(this)}}]);return wc1}(Kn);var Ul=/*#__PURE__*/function(Kn1){"use strict";_inherits(Ul1,Kn1);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]);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:hi(t,this)})];case 3:return[2]}})}).call(this)}}]);return Ul1}(Kn);var Bl=/*#__PURE__*/function(Kn1){"use strict";_inherits(Bl1,Kn1);function Bl1(r){_class_call_check(this,Bl1);var _this;_this=_call_super(this,Bl1,[r]);_this.options=r;return _this}_create_class(Bl1,[{key:"exec",value:function exec(){return{success:!0,skipRecord:!0}}}]);return Bl1}(Kn);function Yp(e){if(_instanceof(e,Zs))return P.t("sync.fileOp.cleanRecord");if(_instanceof(e,Iu))return P.t("sync.fileOp.merge");if(_instanceof(e,Jp))return P.t("sync.fileOp.filenameError");if(_instanceof(e,bc))return P.t("sync.fileOp.createLocalDir");if(_instanceof(e,Ia))return P.t("sync.fileOp.createRemoteDir");if(_instanceof(e,Ru))return P.t("sync.fileOp.createRemoteDirs");if(_instanceof(e,el))return P.t("sync.fileOp.noop");if(_instanceof(e,Mu))return P.t("sync.fileOp.download");if(_instanceof(e,Ou))return P.t("sync.fileOp.upload");if(_instanceof(e,tl))return P.t("sync.fileOp.removeLocal");if(_instanceof(e,Ul))return P.t("sync.fileOp.removeRemote");if(_instanceof(e,wc))return P.t("sync.fileOp.removeRemoteRecursively");if(_instanceof(e,Bl)){var t=function(){if(e.options.reason==="file-too-large")return P.t("sync.skipReason.file-too-large");if(e.options.reason==="folder-contains-ignored-items")return P.t("sync.skipReason.folder-contains-ignored-items");if(e.options.reason==="conflict-in-send-only-mode")return P.t("sync.skipReason.conflict-in-send-only-mode");if(e.options.reason==="conflict-in-receive-only-mode")return P.t("sync.skipReason.conflict-in-receive-only-mode");if(e.options.reason==="deleted-locally-but-changed-remotely")return P.t("sync.skipReason.deleted-locally-but-changed-remotely");if(e.options.reason==="deleted-remotely-but-changed-locally")return P.t("sync.skipReason.deleted-remotely-but-changed-locally")}();return"".concat(P.t("sync.fileOp.skip"),": ").concat(t)}return P.t("sync.fileOp.sync")}var Tn={context:void 0,registry:void 0,effects:void 0,done:!1,getContextId:function getContextId(){return Mne(this.context.count)},getNextContextId:function getNextContextId(){return Mne(this.context.count++)}};function Mne(e){var t=String(e),r=t.length-1;return Tn.context.id+(r?String.fromCharCode(96+r):"")+t}function SN(e){Tn.context=e}function SWe(){return _object_spread_props(_object_spread({},Tn.context),{id:Tn.getNextContextId(),count:0})}var kWe=!1,CWe=function(e,t){return e===t},Mm=Symbol("solid-proxy");var PC=Symbol("solid-track"),JQt=Symbol("solid-dev-component"),AC={equals:CWe},One=null,zne=Hne,ql=1,hw=2,jne={owned:null,cleanups:null,context:null,owner:null},wN={},Zr=null,rt=null,hy=null,fy=null,An=null,Io=null,es=null,RC=0;function my(e,t){var r=An,n=Zr,i=e.length===0,o=t===void 0?n:t,a=i?jne:{owned:null,cleanups:null,context:o?o.context:null,owner:o},s=i?e:function(){return e(function(){return Pa(function(){return Rm(a)})})};Zr=a,An=null;try{return rl(s,!0)}finally{An=r,Zr=n}}function Yt(e,t){t=t?Object.assign({},AC,t):AC;var r={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0},n=function(i){return typeof i=="function"&&(rt&&rt.running&&rt.sources.has(r)?i=i(r.tValue):i=i(r.value)),Gne(r,i)};return[Vne.bind(r),n]}function $ne(e,t,r){var n=NC(e,t,!0,ql);hy&&rt&&rt.running?Io.push(n):gy(n)}function yt(e,t,r){var n=NC(e,t,!1,ql);hy&&rt&&rt.running?Io.push(n):gy(n)}function ki(e,t,r){zne=RWe;var n=NC(e,t,!1,ql),i=gw&&Wne(gw);i&&(n.suspense=i),(!r||!r.render)&&(n.user=!0),es?es.push(n):gy(n)}function Bn(e,t,r){r=r?Object.assign({},AC,r):AC;var n=NC(e,t,!0,0);return n.observers=null,n.observerSlots=null,n.comparator=r.equals||void 0,hy&&rt&&rt.running?(n.tState=ql,Io.push(n)):gy(n),Vne.bind(n)}function EWe(e){return e&&(typeof e==="undefined"?"undefined":_type_of(e))=="object"&&"then"in e}function Une(e,t,r){var n,i,o;typeof t=="function"?(n=e,i=t,o=r||{}):(n=!0,i=e,o=t||{});var a=null,s=wN,l=null,c=!1,d=!1,u="initialValue"in o,p=typeof n=="function"&&Bn(n),m=new Set,_ref=_sliced_to_array((o.storage||Yt)(o.initialValue),2),h=_ref[0],g=_ref[1],_Yt=_sliced_to_array(Yt(void 0),2),x=_Yt[0],v=_Yt[1],_Yt1=_sliced_to_array(Yt(void 0,{equals:!1}),2),y=_Yt1[0],_=_Yt1[1],_Yt2=_sliced_to_array(Yt(u?"ready":"unresolved"),2),b=_Yt2[0],w=_Yt2[1];Zr&&po(function(){var _iteratorNormalCompletion=true,_didIteratorError=false,_iteratorError=undefined;try{for(var _iterator=m.keys()[Symbol.iterator](),_step;!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=true){var I=_step.value;I.decrement()}}catch(err){_didIteratorError=true;_iteratorError=err}finally{try{if(!_iteratorNormalCompletion&&_iterator.return!=null){_iterator.return()}}finally{if(_didIteratorError){throw _iteratorError}}}m.clear(),rt&&a&&rt.promises.delete(a),a=null}),Tn.context&&(l=Tn.getNextContextId(),o.ssrLoadFrom==="initial"?s=o.initialValue:Tn.load&&Tn.has(l)&&(s=Tn.load(l)));function S(I,O,M,R){return a===I&&(a=null,R!==void 0&&(u=!0),(I===s||O===s)&&o.onHydrated&&queueMicrotask(function(){return o.onHydrated(R,{value:O})}),s=wN,rt&&I&&c?(rt.promises.delete(I),c=!1,rl(function(){rt.running=!0,k(O,M)},!1)):k(O,M)),O}function k(I,O){rl(function(){O===void 0&&g(function(){return I}),w(O!==void 0?"errored":u?"ready":"unresolved"),v(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 M=_step.value;M.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 I=gw&&Wne(gw),O=h(),M=x();if(M!==void 0&&!a)throw M;return An&&!An.user&&I&&$ne(function(){y(),a&&(I.resolved&&rt&&c?rt.promises.add(a):m.has(I)||(I.increment(),m.add(I)))}),O}function C(){var I=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;if(I!==!1&&d)return;d=!1;var O=p?p():n;if(c=rt&&rt.running,O==null||O===!1){S(a,Pa(h));return}rt&&a&&rt.promises.delete(a);var M,R=s!==wN?s:Pa(function(){try{return i(O,{value:h(),refetching:I})}catch($){M=$}});if(M!==void 0){S(a,void 0,TC(M),O);return}else if(!EWe(R))return S(a,R,void 0,O),R;return a=R,"v"in R?(R.s===1?S(a,R.v,void 0,O):S(a,void 0,TC(R.v),O),R):(d=!0,queueMicrotask(function(){return d=!1}),rl(function(){w(u?"refreshing":"pending"),_()},!1),R.then(function($){return S(R,$,void 0,O)},function($){return S(R,void 0,TC($),O)}))}Object.defineProperties(E,{state:{get:function(){return b()}},error:{get:function(){return x()}},loading:{get:function get1(){var I=b();return I==="pending"||I==="refreshing"}},latest:{get:function get1(){if(!u)return E();var I=x();if(I&&!a)throw I;return h()}}});var T=Zr;return p?$ne(function(){return T=Zr,C(!1)}):C(!1),[E,{refetch:function(I){return CN(T,function(){return C(I)})},mutate:g}]}function Bne(e){return rl(e,!1)}function Pa(e){if(!fy&&An===null)return e();var t=An;An=null;try{return fy?fy.untrack(e):e()}finally{An=t}}function MC(e,t,r){var n=Array.isArray(e),i,o=r&&r.defer;return function(a){var s;if(n){s=Array(e.length);for(var c=0;c1e6)throw Io=[],new Error},!1)}return t}function gy(e){if(!e.fn)return;Rm(e);var t=RC;Dne(e,rt&&rt.running&&rt.sources.has(e)?e.tValue:e.value,t),rt&&!rt.running&&rt.sources.has(e)&&queueMicrotask(function(){rl(function(){rt&&(rt.running=!0),An=Zr=e,Dne(e,e.tValue,t),An=Zr=null},!1)})}function Dne(e,t,r){var n,i=Zr,o=An;An=Zr=e;try{n=e.fn(t)}catch(a){return e.pure&&(rt&&rt.running?(e.tState=ql,e.tOwned&&e.tOwned.forEach(Rm),e.tOwned=void 0):(e.state=ql,e.owned&&e.owned.forEach(Rm),e.owned=null)),e.updatedAt=r+1,DC(a)}finally{An=o,Zr=i}(!e.updatedAt||e.updatedAt<=r)&&(e.updatedAt!=null&&"observers"in e?Gne(e,n,!0):rt&&rt.running&&e.pure?(rt.sources.has(e)||(e.value=n),rt.sources.add(e),e.tValue=n):e.value=n,e.updatedAt=r)}function NC(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:ql,i=arguments.length>4?arguments[4]:void 0;var o={fn:e,state:n,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:Zr,context:Zr?Zr.context:null,pure:r};if(rt&&rt.running&&(o.state=0,o.tState=n),Zr===null||Zr!==jne&&(rt&&rt.running&&Zr.pure?Zr.tOwned?Zr.tOwned.push(o):Zr.tOwned=[o]:Zr.owned?Zr.owned.push(o):Zr.owned=[o]),fy&&o.fn){var a=o.fn,_Yt=_sliced_to_array(Yt(void 0,{equals:!1}),2),s=_Yt[0],l=_Yt[1],c=fy.factory(a,l);po(function(){return c.dispose()});var d,u=!1,p=function(){return TWe(l).then(function(){d&&(d.dispose(),d=void 0,u||l())})};o.fn=function(m){return s(),rt&&rt.running?(d||(d=fy.factory(a,p)),d.track(m)):(u=!0,c.track(m))}}return o}function xw(e){var t=rt&&rt.running;if((t?e.tState:e.state)===0)return;if((t?e.tState:e.state)===hw)return IC(e);if(e.suspense&&Pa(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,o=r[n+1];for(;(i=i.owner)&&i!==o;)if(rt.disposed.has(i))return}if((t?e.tState:e.state)===ql)gy(e);else if((t?e.tState:e.state)===hw){var i10=Io;Io=null,rl(function(){return IC(e,r[0])},!1),Io=i10}}}function rl(e,t){if(Io)return e();var r=!1;t||(Io=[]),es?r=!0:es=[],RC++;try{var _$n=e();return IWe(r),_$n}catch(n){r||(es=null),Io=null,DC(n)}}function IWe(e){if(Io&&(hy&&rt&&rt.running?PWe(Io):Hne(Io),Io=null),e)return;var t;if(rt){if(!rt.promises.size&&!rt.queue.size){var n=rt.sources,i=rt.disposed;es.push.apply(es,rt.effects),t=rt.resolve;var _iteratorNormalCompletion=true,_didIteratorError=false,_iteratorError=undefined;try{for(var _iterator=es[Symbol.iterator](),_step;!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=true){var o=_step.value;"tState"in o&&(o.state=o.tState),delete o.tState}}catch(err){_didIteratorError=true;_iteratorError=err}finally{try{if(!_iteratorNormalCompletion&&_iterator.return!=null){_iterator.return()}}finally{if(_didIteratorError){throw _iteratorError}}}rt=null,rl(function(){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;Rm(o)}}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 o10=_step1.value;if(o10.value=o10.tValue,o10.owned)for(var a=0,s=o10.owned.length;a=0;t--)Rm(e.tOwned[t]);delete e.tOwned}if(rt&&rt.running&&e.pure)Kne(e,!0);else if(e.owned){for(t=e.owned.length-1;t>=0;t--)Rm(e.owned[t]);e.owned=null}if(e.cleanups){for(t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null}rt&&rt.running?e.tState=0:e.state=0}function Kne(e,t){if(t||(e.tState=0,rt.disposed.add(e)),e.owned)for(var r=0;r1&&arguments[1]!==void 0?arguments[1]:Zr;var r=One&&t&&t.context&&t.context[One],n=TC(e);if(!r)throw n;es?es.push({fn:function fn1(){Lne(n,r,t)},state:ql}):Lne(n,r,t)}function kN(e){if(typeof e=="function"&&!e.length)return kN(e());if(Array.isArray(e)){var t=[];for(var r=0;r2&&arguments[2]!==void 0?arguments[2]:{};var n=[],i=[],o=[],a=0,s=t.length>1?[]:null;return po(function(){return Fne(o)}),function(){var p=function p(m){if(o[u]=m,s){var _Yt=_sliced_to_array(Yt(u),2),h=_Yt[0],g=_Yt[1];return s[u]=g,t(l[u],h)}return t(l[u])};var l=e()||[],c=l.length,d,u;return l[PC],Pa(function(){var m,h,g,x,v,y,_,b,w;if(c===0)a!==0&&(Fne(o),o=[],n=[],i=[],a=0,s&&(s=[])),r.fallback&&(n=[MWe],i[0]=my(function(S){return o[0]=S,r.fallback()}),a=1);else if(a===0){for(i=new Array(c),u=0;u=y&&b>=y&&n[_]===l[b];_--,b--)g[b]=i[_],x[b]=o[_],s&&(v[b]=s[_]);for(m=new Map,h=new Array(b+1),u=b;u>=y;u--)w=l[u],d=m.get(w),h[u]=d===void 0?-1:d,m.set(w,u);for(d=y;d<=_;d++)w=n[d],u=m.get(w),u!==void 0&&u!==-1?(g[u]=i[d],x[u]=o[d],s&&(v[u]=s[d]),u=h[u],m.set(w,u)):o[d]();for(u=y;u.")};function In(e){var t="fallback"in e&&{fallback:function(){return e.fallback}};return Bn(OWe(function(){return e.each},e.children,t||void 0))}function Ct(e){var t=e.keyed,r=Bn(function(){return e.when},void 0,void 0),n=t?r:Bn(r,void 0,{equals:function(i,o){return!i==!o}});return Bn(function(){var i=n();if(i){var o=e.children;return typeof o=="function"&&o.length>0?Pa(function(){return o(t?i:function(){if(!Pa(n))throw Qne("Show");return r()})}):o}return e.fallback},void 0,void 0)}function Vg(e){var t=AWe(function(){return e.children}),r=Bn(function(){var _loop=function(a){var s=a,l=i[a],c=o,d=Bn(function(){return c()?void 0:l.when},void 0,void 0),u=l.keyed?d:Bn(d,void 0,{equals:function(p,m){return!p==!m}});o=function(){return c()||(u()?[s,d,l]:void 0)}};var n=t(),i=Array.isArray(n)?n:[n],o=function(){};for(var a=0;a0?Pa(function(){return s(a.keyed?o():function(){var c;if(((c=Pa(r)())==null?void 0:c[0])!==i)throw Qne("Match");return o()})}):s},void 0,void 0)}function nl(e){return e}var NWe=["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"],lJt=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(NWe)));var Xne=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 Qn=function(e){return Bn(function(){return e()})};function DWe(e,t,r){var n=r.length,i=t.length,o=n,a=0,s=0,l=t[i-1].nextSibling,c=null;for(;ad11-s){var h=t[a];for(;s3&&arguments[3]!==void 0?arguments[3]:{};var i;return my(function(o){i=o,t===document?e():_e(t,e(),t.firstChild?null:void 0,r)},n.owner),function(){i(),t.textContent=""}}function je(e,t,r,n){var i,o=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},a=t?function(){return Pa(function(){return document.importNode(i||(i=o()),!0)})}:function(){return(i||(i=o())).cloneNode(!0)};return a.cloneNode=a,a}function Kr(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:window.document;var r=t[Jne]||(t[Jne]=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;a--){var s=t[a];if(i!==s){var l=s.parentNode===e;!o&&!a?l?e.replaceChild(i,s):e.insertBefore(i,r):l&&s.remove()}else o=!0}}else e.insertBefore(i,r);return[i]}var uJt=Symbol();var FWe="http://www.w3.org/2000/svg";function zWe(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(FWe,e):document.createElement(e,{is:r})}function Ld(e){var t=e.useShadow,r=document.createTextNode(""),n=function(){return e.mount||document.body},i=$C(),o,a=!!Tn.context;return ki(function(){a&&($C().user=a=!1),o||(o=CN(i,function(){return Bn(function(){return e.children})}));var s=n();if(_instanceof(s,HTMLHeadElement)){var _Yt=_sliced_to_array(Yt(!1),2),l=_Yt[0],c=_Yt[1],d=function(){return c(!0)};my(function(u){return _e(s,function(){return l()?u():o()},null)}),po(d)}else{var l10=zWe(e.isSVG?"g":"div",e.isSVG),c10=t&&l10.attachShadow?l10.attachShadow({mode:"open"}):l10;Object.defineProperty(l10,"_$host",{get:function get1(){return r.parentNode},configurable:!0}),_e(c10,o),s.appendChild(l10),e.ref&&e.ref(l10),po(function(){return s.contains(l10)&&s.removeChild(l10)})}},void 0,{render:!a}),r}var IN=Symbol("store-raw"),vy=Symbol("store-node"),Xp=Symbol("store-has"),nie=Symbol("store-self");function iie(e){var t=e[Mm];if(!t&&(Object.defineProperty(e,Mm,{value:t=new Proxy(e,BWe)}),!Array.isArray(e))){var r=Object.keys(e),n=Object.getOwnPropertyDescriptors(e),i=Object.getPrototypeOf(e),o=i!==null&&e!==null&&(typeof e==="undefined"?"undefined":_type_of(e))=="object"&&!Array.isArray(e)&&i!==Object.prototype;if(o){var _r1;var a=Object.getOwnPropertyDescriptors(i);(_r1=r).push.apply(_r1,_to_consumable_array(Object.keys(a))),Object.assign(n,a)}for(var a9=0,s=r.length;a91&&arguments[1]!==void 0?arguments[1]:new Set;var r,n,i,o;if(r=e!=null&&e[IN])return r;if(!Om(e)||t.has(e))return e;if(Array.isArray(e)){Object.isFrozen(e)?e=e.slice(0):t.add(e);for(var a=0,s=e.length;a3&&arguments[3]!==void 0?arguments[3]:!1;if(t==="__proto__"||!n&&e[t]===r)return;var i=e[t],o=e.length;r===void 0?(delete e[t],e[Xp]&&e[Xp][t]&&i!==void 0&&e[Xp][t].$()):(e[t]=r,e[Xp]&&e[Xp][t]&&i===void 0&&e[Xp][t].$());var a=zC(e,vy),s;if((s=vw(a,t,i))&&s.$(function(){return r}),Array.isArray(e)&&e.length!==o){for(var l=e.length;l2&&arguments[2]!==void 0?arguments[2]:[];var n,i=e;if(t.length>1){n=t.shift();var a=typeof n==="undefined"?"undefined":_type_of(n),s=Array.isArray(e);if(a==="string"&&(n==="__proto__"||t.length>1&&sie(n)))return;if(Array.isArray(n)){for(var l=0;l1){yw(e[n],t,[n].concat(r));return}i=e[n],r=[n].concat(r)}var o=t[0];typeof o=="function"&&(o=o(i,r),o===i)||n===void 0&&o==null||(o=_y(o),n===void 0||Om(i)&&Om(o)&&!Array.isArray(o)?aie(i,o):$u(e,n,o))}function lie(){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=_y(e||{}),n=Array.isArray(r),i=iie(r);function o(){for(var _len=arguments.length,a=new Array(_len),_key=0;_key<_len;_key++){a[_key]=arguments[_key]}Bne(function(){n&&a.length===1?qWe(r,a[0]):yw(r,a)})}return[i,o]}var PN=Symbol("store-root");function rie(e){return e==="__proto__"||e==="constructor"||e==="prototype"}function yy(e,t,r,n,i){if(rie(r))return;var o=t[r];if(e===o)return;var a=Array.isArray(e);if(r!==PN&&(!Om(e)||!Om(o)||a!==Array.isArray(o)||i&&e[i]!==o[i])){$u(t,r,e);return}if(a){if(e.length&&o.length&&(!n||i&&e[0]&&e[0][i]!=null)){var c,d,u,p,m,h,g,x;for(u=0,p=Math.min(o.length,e.length);u=u&&m>=u&&(o[p]===e[m]||i&&o[p]&&e[m]&&o[p][i]&&o[p][i]===e[m][i]);p--,m--)v[m]=o[p];if(u>m||u>p){for(d=u;d<=m;d++)$u(o,d,e[d]);for(;de.length&&$u(o,"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=y.get(x),g[d]=c===void 0?-1:c,y.set(x,d);for(c=u;c<=p;c++)h=o[c],x=i&&h?h[i]:h,d=y.get(x),d!==void 0&&d!==-1&&(v[d]=o[c],d=g[d],y.set(x,d));for(d=u;de.length&&$u(o,"length",e.length);return}var s=Object.keys(e);for(var c11=0,d11=s.length;c111&&arguments[1]!==void 0?arguments[1]:{};var r=t.merge,tmp=t.key,n=tmp===void 0?"id":tmp,i=_y(e);return function(o){if(!Om(o)||!Om(i))return i;var a=yy(i,_define_property({},PN,o),PN,r,n);return a===void 0?o:a}}function by(e,t,r){var o;Kr(Array.from(Xne),(o=t.ownerDocument)!=null?o:document);var n,i=eie(function(){var _lie=_sliced_to_array(lie(r),2),a=_lie[0],s=_lie[1];return n=function(l){return s(uie(l))},Se(e,a)},t);return{update:function(a){return n(a)},destroy:i}}var Hme=require("obsidian");function jC(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 Yo(e){return e.subagents.master}function WWe(e){return Yo(e).timeline}function cie(e){return Object.values(e.subagents).flatMap(function(t){return[t].concat(_to_consumable_array(cie(t)))})}function Fd(e){return cie(Yo(e)).sort(function(t,r){return r.createdAt-t.createdAt})}function UC(e){var r;var t=WWe(e);for(var n=t.length-1;n>=0;n-=1){var i=(r=t[n])==null?void 0:r.parts.find(function(o){return o.type==="data-todos"});if((i==null?void 0:i.type)==="data-todos")return i.data.items.map(function(o){return _object_spread({},o)})}return[]}function Vl(e){return e.status==="completed"||e.status==="failed"||e.status==="cancelled"}function die(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 pie(e){var n,i;var t=(n=e==null?void 0:e.ownerDocument)!=null?n:document,r=die(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 zd(e,t){var u,p,m,h,g;if(!t)return;var r=e,n=r.containerEl;if(!n)return;var i=r.modalEl,o=n.classList.contains("mod-dim"),a=(u=t.hostEl)!=null?u:t.contained?t.mountEl:void 0,s=(m=(p=a==null?void 0:a.ownerDocument)==null?void 0:p.body)!=null?m:t.mountEl,l=function(){var x=!!(a!=null&&a.isConnected)&&die(a)>=486,v=x?a:s;v!=null&&v.isConnected&&n.parentElement!==v&&v.appendChild(n),n.classList.toggle("ns-chatbox-contained-modal-container",x),o&&n.classList.toggle("mod-dim",!x),i==null||i.classList.toggle("ns-chatbox-contained-modal",x)};if(l(),!a)return;var c=(g=(h=a.ownerDocument)==null?void 0:h.defaultView)==null?void 0:g.ResizeObserver;if(!c)return;var d=new c(l);return d.observe(a),function(){d.disconnect(),o&&n.classList.add("mod-dim")}}var fie=function(e){return e!=null&&(e=Object.getPrototypeOf(e),e===Array.prototype||e===Object.prototype)};function mie(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 o="".concat(r,".").concat(n);e[o]=i,fie(i)&&mie(e,i,o)}}catch(err){_didIteratorError=true;_iteratorError=err}finally{try{if(!_iteratorNormalCompletion&&_iterator.return!=null){_iterator.return()}}finally{if(_didIteratorError){throw _iteratorError}}}}function hie(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];fie(n)&&mie(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 gie=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},VWe=function(e){return e};function xie(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:VWe;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 o;r[0]==="."&&(r=r.slice(1));var i=(o=e())==null?void 0:o[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 HWe={en:q7,zh:W7};function ZWe(e){switch(e.split("-")[0].toLowerCase()){case"zh":return"zh";default:return"en"}}var KWe=hie(HWe[ZWe(typeof navigator=="undefined"?"en":navigator.language)]),Te=xie(function(){return KWe},gie);var yie=je("