svgedit/dist/editor/extensions/ext-storage/ext-storage.js

13 lines
75 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function createCommonjsModule(t,e,r){return t(r={path:e,exports:{},require:function(t,e){return function commonjsRequire(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==e&&r.path)}},r.exports),r.exports}var check=function(t){return t&&t.Math==Math&&t},e=check("object"==typeof globalThis&&globalThis)||check("object"==typeof window&&window)||check("object"==typeof self&&self)||check("object"==typeof t&&t)||Function("return this")(),fails=function(t){try{return!!t()}catch(t){return!0}},r=!fails((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),n={}.propertyIsEnumerable,o=Object.getOwnPropertyDescriptor,i={f:o&&!n.call({1:2},1)?function propertyIsEnumerable(t){var e=o(this,t);return!!e&&e.enumerable}:n},createPropertyDescriptor=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},a={}.toString,classofRaw=function(t){return a.call(t).slice(8,-1)},c="".split,u=fails((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==classofRaw(t)?c.call(t,""):Object(t)}:Object,requireObjectCoercible=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t},toIndexedObject=function(t){return u(requireObjectCoercible(t))},isObject=function(t){return"object"==typeof t?null!==t:"function"==typeof t},toPrimitive=function(t,e){if(!isObject(t))return t;var r,n;if(e&&"function"==typeof(r=t.toString)&&!isObject(n=r.call(t)))return n;if("function"==typeof(r=t.valueOf)&&!isObject(n=r.call(t)))return n;if(!e&&"function"==typeof(r=t.toString)&&!isObject(n=r.call(t)))return n;throw TypeError("Can't convert object to primitive value")},s={}.hasOwnProperty,has=function(t,e){return s.call(t,e)},f=e.document,l=isObject(f)&&isObject(f.createElement),documentCreateElement=function(t){return l?f.createElement(t):{}},h=!r&&!fails((function(){return 7!=Object.defineProperty(documentCreateElement("div"),"a",{get:function(){return 7}}).a})),p=Object.getOwnPropertyDescriptor,v={f:r?p:function getOwnPropertyDescriptor(t,e){if(t=toIndexedObject(t),e=toPrimitive(e,!0),h)try{return p(t,e)}catch(t){}if(has(t,e))return createPropertyDescriptor(!i.f.call(t,e),t[e])}},anObject=function(t){if(!isObject(t))throw TypeError(String(t)+" is not an object");return t},d=Object.defineProperty,g={f:r?d:function defineProperty(t,e,r){if(anObject(t),e=toPrimitive(e,!0),anObject(r),h)try{return d(t,e,r)}catch(t){}if("get"in r||"set"in r)throw TypeError("Accessors not supported");return"value"in r&&(t[e]=r.value),t}},y=r?function(t,e,r){return g.f(t,e,createPropertyDescriptor(1,r))}:function(t,e,r){return t[e]=r,t},setGlobal=function(t,r){try{y(e,t,r)}catch(n){e[t]=r}return r},m=e["__core-js_shared__"]||setGlobal("__core-js_shared__",{}),b=Function.toString;"function"!=typeof m.inspectSource&&(m.inspectSource=function(t){return b.call(t)});var w,S,x,E=m.inspectSource,O=e.WeakMap,P="function"==typeof O&&/native code/.test(E(O)),A=createCommonjsModule((function(t){(t.exports=function(t,e){return m[t]||(m[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.6.5",mode:"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})})),j=0,L=Math.random(),uid=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++j+L).toString(36)},k=A("keys"),sharedKey=function(t){return k[t]||(k[t]=uid(t))},R={},I=e.WeakMap;if(P){var T=new I,_=T.get,C=T.has,U=T.set;w=function(t,e){return U.call(T,t,e),e},S=function(t){return _.call(T,t)||{}},x=function(t){return C.call(T,t)}}else{var M=sharedKey("state");R[M]=!0,w=function(t,e){return y(t,M,e),e},S=function(t){return has(t,M)?t[M]:{}},x=function(t){return has(t,M)}}var G={set:w,get:S,has:x,enforce:function(t){return x(t)?S(t):w(t,{})},getterFor:function(t){return function(e){var r;if(!isObject(e)||(r=S(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return r}}},N=createCommonjsModule((function(t){var r=G.get,n=G.enforce,o=String(String).split("String");(t.exports=function(t,r,i,a){var c=!!a&&!!a.unsafe,u=!!a&&!!a.enumerable,s=!!a&&!!a.noTargetGet;"function"==typeof i&&("string"!=typeof r||has(i,"name")||y(i,"name",r),n(i).source=o.join("string"==typeof r?r:"")),t!==e?(c?!s&&t[r]&&(u=!0):delete t[r],u?t[r]=i:y(t,r,i)):u?t[r]=i:setGlobal(r,i)})(Function.prototype,"toString",(function toString(){return"function"==typeof this&&r(this).source||E(this)}))})),q=e,aFunction=function(t){return"function"==typeof t?t:void 0},getBuiltIn=function(t,r){return arguments.length<2?aFunction(q[t])||aFunction(e[t]):q[t]&&q[t][r]||e[t]&&e[t][r]},B=Math.ceil,D=Math.floor,toInteger=function(t){return isNaN(t=+t)?0:(t>0?D:B)(t)},$=Math.min,toLength=function(t){return t>0?$(toInteger(t),9007199254740991):0},V=Math.max,W=Math.min,toAbsoluteIndex=function(t,e){var r=toInteger(t);return r<0?V(r+e,0):W(r,e)},createMethod=function(t){return function(e,r,n){var o,i=toIndexedObject(e),a=toLength(i.length),c=toAbsoluteIndex(n,a);if(t&&r!=r){for(;a>c;)if((o=i[c++])!=o)return!0}else for(;a>c;c++)if((t||c in i)&&i[c]===r)return t||c||0;return!t&&-1}},K={includes:createMethod(!0),indexOf:createMethod(!1)},Y=K.indexOf,objectKeysInternal=function(t,e){var r,n=toIndexedObject(t),o=0,i=[];for(r in n)!has(R,r)&&has(n,r)&&i.push(r);for(;e.length>o;)has(n,r=e[o++])&&(~Y(i,r)||i.push(r));return i},z=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],H=z.concat("length","prototype"),J={f:Object.getOwnPropertyNames||function getOwnPropertyNames(t){return objectKeysInternal(t,H)}},X={f:Object.getOwnPropertySymbols},Q=getBuiltIn("Reflect","ownKeys")||function ownKeys(t){var e=J.f(anObject(t)),r=X.f;return r?e.concat(r(t)):e},copyConstructorProperties=function(t,e){for(var r=Q(e),n=g.f,o=v.f,i=0;i<r.length;i++){var a=r[i];has(t,a)||n(t,a,o(e,a))}},Z=/#|\.prototype\./,isForced=function(t,e){var r=et[tt(t)];return r==nt||r!=rt&&("function"==typeof e?fails(e):!!e)},tt=isForced.normalize=function(t){return String(t).replace(Z,".").toLowerCase()},et=isForced.data={},rt=isForced.NATIVE="N",nt=isForced.POLYFILL="P",ot=isForced,it=v.f,_export=function(t,r){var n,o,i,a,c,u=t.target,s=t.global,f=t.stat;if(n=s?e:f?e[u]||setGlobal(u,{}):(e[u]||{}).prototype)for(o in r){if(a=r[o],i=t.noTargetGet?(c=it(n,o))&&c.value:n[o],!ot(s?o:u+(f?".":"#")+o,t.forced)&&void 0!==i){if(typeof a==typeof i)continue;copyConstructorProperties(a,i)}(t.sham||i&&i.sham)&&y(a,"sham",!0),N(n,o,a,t)}},aFunction$1=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t},functionBindContext=function(t,e,r){if(aFunction$1(t),void 0===e)return t;switch(r){case 0:return function(){return t.call(e)};case 1:return function(r){return t.call(e,r)};case 2:return function(r,n){return t.call(e,r,n)};case 3:return function(r,n,o){return t.call(e,r,n,o)}}return function(){return t.apply(e,arguments)}},toObject=function(t){return Object(requireObjectCoercible(t))},at=Array.isArray||function isArray(t){return"Array"==classofRaw(t)},ct=!!Object.getOwnPropertySymbols&&!fails((function(){return!String(Symbol())})),ut=ct&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,st=A("wks"),ft=e.Symbol,lt=ut?ft:ft&&ft.withoutSetter||uid,wellKnownSymbol=function(t){return has(st,t)||(ct&&has(ft,t)?st[t]=ft[t]:st[t]=lt("Symbol."+t)),st[t]},ht=wellKnownSymbol("species"),arraySpeciesCreate=function(t,e){var r;return at(t)&&("function"!=typeof(r=t.constructor)||r!==Array&&!at(r.prototype)?isObject(r)&&null===(r=r[ht])&&(r=void 0):r=void 0),new(void 0===r?Array:r)(0===e?0:e)},pt=[].push,createMethod$1=function(t){var e=1==t,r=2==t,n=3==t,o=4==t,i=6==t,a=5==t||i;return function(c,s,f,l){for(var h,p,v=toObject(c),d=u(v),g=functionBindContext(s,f,3),y=toLength(d.length),m=0,b=l||arraySpeciesCreate,w=e?b(c,y):r?b(c,0):void 0;y>m;m++)if((a||m in d)&&(p=g(h=d[m],m,v),t))if(e)w[m]=p;else if(p)switch(t){case 3:return!0;case 5:return h;case 6:return m;case 2:pt.call(w,h)}else if(o)return!1;return i?-1:n||o?o:w}},vt={forEach:createMethod$1(0),map:createMethod$1(1),filter:createMethod$1(2),some:createMethod$1(3),every:createMethod$1(4),find:createMethod$1(5),findIndex:createMethod$1(6)},arrayMethodIsStrict=function(t,e){var r=[][t];return!!r&&fails((function(){r.call(null,e||function(){throw 1},1)}))},dt=Object.defineProperty,gt={},thrower=function(t){throw t},arrayMethodUsesToLength=function(t,e){if(has(gt,t))return gt[t];e||(e={});var n=[][t],o=!!has(e,"ACCESSORS")&&e.ACCESSORS,i=has(e,0)?e[0]:thrower,a=has(e,1)?e[1]:void 0;return gt[t]=!!n&&!fails((function(){if(o&&!r)return!0;var t={length:-1};o?dt(t,1,{enumerable:!0,get:thrower}):t[1]=1,n.call(t,i,a)}))},yt=vt.forEach,mt=arrayMethodIsStrict("forEach"),bt=arrayMethodUsesToLength("forEach"),wt=mt&&bt?[].forEach:function forEach(t){return yt(this,t,arguments.length>1?arguments[1]:void 0)};_export({target:"Array",proto:!0,forced:[].forEach!=wt},{forEach:wt});var St,xt=Object.keys||function keys(t){return objectKeysInternal(t,z)},Et=r?Object.defineProperties:function defineProperties(t,e){anObject(t);for(var r,n=xt(e),o=n.length,i=0;o>i;)g.f(t,r=n[i++],e[r]);return t},Ot=getBuiltIn("document","documentElement"),Pt=sharedKey("IE_PROTO"),EmptyConstructor=function(){},scriptTag=function(t){return"<script>"+t+"<\/script>"},NullProtoObject=function(){try{St=document.domain&&new ActiveXObject("htmlfile")}catch(t){}var t,e;NullProtoObject=St?function(t){t.write(scriptTag("")),t.close();var e=t.parentWindow.Object;return t=null,e}(St):((e=documentCreateElement("iframe")).style.display="none",Ot.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(scriptTag("document.F=Object")),t.close(),t.F);for(var r=z.length;r--;)delete NullProtoObject.prototype[z[r]];return NullProtoObject()};R[Pt]=!0;var At=Object.create||function create(t,e){var r;return null!==t?(EmptyConstructor.prototype=anObject(t),r=new EmptyConstructor,EmptyConstructor.prototype=null,r[Pt]=t):r=NullProtoObject(),void 0===e?r:Et(r,e)},jt=wellKnownSymbol("unscopables"),Lt=Array.prototype;null==Lt[jt]&&g.f(Lt,jt,{configurable:!0,value:At(null)});var addToUnscopables=function(t){Lt[jt][t]=!0},kt=K.includes,Rt=arrayMethodUsesToLength("indexOf",{ACCESSORS:!0,1:0});_export({target:"Array",proto:!0,forced:!Rt},{includes:function includes(t){return kt(this,t,arguments.length>1?arguments[1]:void 0)}}),addToUnscopables("includes");var It,Tt,_t,Ct={},Ut=!fails((function(){function F(){}return F.prototype.constructor=null,Object.getPrototypeOf(new F)!==F.prototype})),Ft=sharedKey("IE_PROTO"),Mt=Object.prototype,Gt=Ut?Object.getPrototypeOf:function(t){return t=toObject(t),has(t,Ft)?t[Ft]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?Mt:null},Nt=wellKnownSymbol("iterator"),qt=!1;[].keys&&("next"in(_t=[].keys())?(Tt=Gt(Gt(_t)))!==Object.prototype&&(It=Tt):qt=!0),null==It&&(It={}),has(It,Nt)||y(It,Nt,(function(){return this}));var Bt={IteratorPrototype:It,BUGGY_SAFARI_ITERATORS:qt},Dt=g.f,$t=wellKnownSymbol("toStringTag"),setToStringTag=function(t,e,r){t&&!has(t=r?t:t.prototype,$t)&&Dt(t,$t,{configurable:!0,value:e})},Vt=Bt.IteratorPrototype,returnThis$1=function(){return this},createIteratorConstructor=function(t,e,r){var n=e+" Iterator";return t.prototype=At(Vt,{next:createPropertyDescriptor(1,r)}),setToStringTag(t,n,!1),Ct[n]=returnThis$1,t},Wt=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,r={};try{(t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(r,[]),e=r instanceof Array}catch(t){}return function setPrototypeOf(r,n){return anObject(r),function(t){if(!isObject(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype")}(n),e?t.call(r,n):r.__proto__=n,r}}():void 0),Kt=Bt.IteratorPrototype,Yt=Bt.BUGGY_SAFARI_ITERATORS,zt=wellKnownSymbol("iterator"),returnThis$2=function(){return this},defineIterator=function(t,e,r,n,o,i,a){createIteratorConstructor(r,e,n);var c,u,s,getIterationMethod=function(t){if(t===o&&v)return v;if(!Yt&&t in h)return h[t];switch(t){case"keys":return function keys(){return new r(this,t)};case"values":return function values(){return new r(this,t)};case"entries":return function entries(){return new r(this,t)}}return function(){return new r(this)}},f=e+" Iterator",l=!1,h=t.prototype,p=h[zt]||h["@@iterator"]||o&&h[o],v=!Yt&&p||getIterationMethod(o),d="Array"==e&&h.entries||p;if(d&&(c=Gt(d.call(new t)),Kt!==Object.prototype&&c.next&&(Gt(c)!==Kt&&(Wt?Wt(c,Kt):"function"!=typeof c[zt]&&y(c,zt,returnThis$2)),setToStringTag(c,f,!0))),"values"==o&&p&&"values"!==p.name&&(l=!0,v=function values(){return p.call(this)}),h[zt]!==v&&y(h,zt,v),Ct[e]=v,o)if(u={values:getIterationMethod("values"),keys:i?v:getIterationMethod("keys"),entries:getIterationMethod("entries")},a)for(s in u)(Yt||l||!(s in h))&&N(h,s,u[s]);else _export({target:e,proto:!0,forced:Yt||l},u);return u},Ht=G.set,Jt=G.getterFor("Array Iterator"),Xt=defineIterator(Array,"Array",(function(t,e){Ht(this,{type:"Array Iterator",target:toIndexedObject(t),index:0,kind:e})}),(function(){var t=Jt(this),e=t.target,r=t.kind,n=t.index++;return!e||n>=e.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==r?{value:n,done:!1}:"values"==r?{value:e[n],done:!1}:{value:[n,e[n]],done:!1}}),"values");Ct.Arguments=Ct.Array,addToUnscopables("keys"),addToUnscopables("values"),addToUnscopables("entries");var Qt=i.f,createMethod$2=function(t){return function(e){for(var n,o=toIndexedObject(e),i=xt(o),a=i.length,c=0,u=[];a>c;)n=i[c++],r&&!Qt.call(o,n)||u.push(t?[n,o[n]]:o[n]);return u}},Zt={entries:createMethod$2(!0),values:createMethod$2(!1)}.entries;_export({target:"Object",stat:!0},{entries:function entries(t){return Zt(t)}});var te=fails((function(){xt(1)}));_export({target:"Object",stat:!0,forced:te},{keys:function keys(t){return xt(toObject(t))}});var ee={};ee[wellKnownSymbol("toStringTag")]="z";var re="[object z]"===String(ee),ne=wellKnownSymbol("toStringTag"),oe="Arguments"==classofRaw(function(){return arguments}()),ie=re?classofRaw:function(t){var e,r,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),ne))?r:oe?classofRaw(e):"Object"==(n=classofRaw(e))&&"function"==typeof e.callee?"Arguments":n},ae=re?{}.toString:function toString(){return"[object "+ie(this)+"]"};re||N(Object.prototype,"toString",ae,{unsafe:!0});var regexpFlags=function(){var t=anObject(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e};function RE(t,e){return RegExp(t,e)}var ce,ue,se={UNSUPPORTED_Y:fails((function(){var t=RE("a","y");return t.lastIndex=2,null!=t.exec("abcd")})),BROKEN_CARET:fails((function(){var t=RE("^r","gy");return t.lastIndex=2,null!=t.exec("str")}))},fe=RegExp.prototype.exec,le=String.prototype.replace,he=fe,pe=(ce=/a/,ue=/b*/g,fe.call(ce,"a"),fe.call(ue,"a"),0!==ce.lastIndex||0!==ue.lastIndex),ve=se.UNSUPPORTED_Y||se.BROKEN_CARET,de=void 0!==/()??/.exec("")[1];(pe||de||ve)&&(he=function exec(t){var e,r,n,o,i=this,a=ve&&i.sticky,c=regexpFlags.call(i),u=i.source,s=0,f=t;return a&&(-1===(c=c.replace("y","")).indexOf("g")&&(c+="g"),f=String(t).slice(i.lastIndex),i.lastIndex>0&&(!i.multiline||i.multiline&&"\n"!==t[i.lastIndex-1])&&(u="(?: "+u+")",f=" "+f,s++),r=new RegExp("^(?:"+u+")",c)),de&&(r=new RegExp("^"+u+"$(?!\\s)",c)),pe&&(e=i.lastIndex),n=fe.call(a?r:i,f),a?n?(n.input=n.input.slice(s),n[0]=n[0].slice(s),n.index=i.lastIndex,i.lastIndex+=n[0].length):i.lastIndex=0:pe&&n&&(i.lastIndex=i.global?n.index+n[0].length:e),de&&n&&n.length>1&&le.call(n[0],r,(function(){for(o=1;o<arguments.length-2;o++)void 0===arguments[o]&&(n[o]=void 0)})),n});var ge=he;_export({target:"RegExp",proto:!0,forced:/./.exec!==ge},{exec:ge});var ye=wellKnownSymbol("match"),isRegexp=function(t){var e;return isObject(t)&&(void 0!==(e=t[ye])?!!e:"RegExp"==classofRaw(t))},notARegexp=function(t){if(isRegexp(t))throw TypeError("The method doesn't accept regular expressions");return t},me=wellKnownSymbol("match");_export({target:"String",proto:!0,forced:!function(t){var e=/./;try{"/./"[t](e)}catch(r){try{return e[me]=!1,"/./"[t](e)}catch(t){}}return!1}("includes")},{includes:function includes(t){return!!~String(requireObjectCoercible(this)).indexOf(notARegexp(t),arguments.length>1?arguments[1]:void 0)}});var createMethod$3=function(t){return function(e,r){var n,o,i=String(requireObjectCoercible(e)),a=toInteger(r),c=i.length;return a<0||a>=c?t?"":void 0:(n=i.charCodeAt(a))<55296||n>56319||a+1===c||(o=i.charCodeAt(a+1))<56320||o>57343?t?i.charAt(a):n:t?i.slice(a,a+2):o-56320+(n-55296<<10)+65536}},be={codeAt:createMethod$3(!1),charAt:createMethod$3(!0)},we=be.charAt,Se=G.set,xe=G.getterFor("String Iterator");defineIterator(String,"String",(function(t){Se(this,{type:"String Iterator",string:String(t),index:0})}),(function next(){var t,e=xe(this),r=e.string,n=e.index;return n>=r.length?{value:void 0,done:!0}:(t=we(r,n),e.index+=t.length,{value:t,done:!1})}));var Ee=wellKnownSymbol("species"),Oe=!fails((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")})),Pe="$0"==="a".replace(/./,"$0"),Ae=wellKnownSymbol("replace"),je=!!/./[Ae]&&""===/./[Ae]("a","$0"),Le=!fails((function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var r="ab".split(t);return 2!==r.length||"a"!==r[0]||"b"!==r[1]})),fixRegexpWellKnownSymbolLogic=function(t,e,r,n){var o=wellKnownSymbol(t),i=!fails((function(){var e={};return e[o]=function(){return 7},7!=""[t](e)})),a=i&&!fails((function(){var e=!1,r=/a/;return"split"===t&&((r={}).constructor={},r.constructor[Ee]=function(){return r},r.flags="",r[o]=/./[o]),r.exec=function(){return e=!0,null},r[o](""),!e}));if(!i||!a||"replace"===t&&(!Oe||!Pe||je)||"split"===t&&!Le){var c=/./[o],u=r(o,""[t],(function(t,e,r,n,o){return e.exec===ge?i&&!o?{done:!0,value:c.call(e,r,n)}:{done:!0,value:t.call(r,e,n)}:{done:!1}}),{REPLACE_KEEPS_$0:Pe,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:je}),s=u[0],f=u[1];N(String.prototype,t,s),N(RegExp.prototype,o,2==e?function(t,e){return f.call(t,this,e)}:function(t){return f.call(t,this)})}n&&y(RegExp.prototype[o],"sham",!0)},ke=be.charAt,advanceStringIndex=function(t,e,r){return e+(r?ke(t,e).length:1)},regexpExecAbstract=function(t,e){var r=t.exec;if("function"==typeof r){var n=r.call(t,e);if("object"!=typeof n)throw TypeError("RegExp exec method returned something other than an Object or null");return n}if("RegExp"!==classofRaw(t))throw TypeError("RegExp#exec called on incompatible receiver");return ge.call(t,e)};fixRegexpWellKnownSymbolLogic("match",1,(function(t,e,r){return[function match(e){var r=requireObjectCoercible(this),n=null==e?void 0:e[t];return void 0!==n?n.call(e,r):new RegExp(e)[t](String(r))},function(t){var n=r(e,t,this);if(n.done)return n.value;var o=anObject(t),i=String(this);if(!o.global)return regexpExecAbstract(o,i);var a=o.unicode;o.lastIndex=0;for(var c,u=[],s=0;null!==(c=regexpExecAbstract(o,i));){var f=String(c[0]);u[s]=f,""===f&&(o.lastIndex=advanceStringIndex(i,toLength(o.lastIndex),a)),s++}return 0===s?null:u}]}));var Re=Math.max,Ie=Math.min,Te=Math.floor,_e=/\$([$&'`]|\d\d?|<[^>]*>)/g,Ce=/\$([$&'`]|\d\d?)/g;fixRegexpWellKnownSymbolLogic("replace",2,(function(t,e,r,n){var o=n.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,i=n.REPLACE_KEEPS_$0,a=o?"$":"$0";return[function replace(r,n){var o=requireObjectCoercible(this),i=null==r?void 0:r[t];return void 0!==i?i.call(r,o,n):e.call(String(o),r,n)},function(t,n){if(!o&&i||"string"==typeof n&&-1===n.indexOf(a)){var c=r(e,t,this,n);if(c.done)return c.value}var u=anObject(t),s=String(this),f="function"==typeof n;f||(n=String(n));var l=u.global;if(l){var h=u.unicode;u.lastIndex=0}for(var p=[];;){var v=regexpExecAbstract(u,s);if(null===v)break;if(p.push(v),!l)break;""===String(v[0])&&(u.lastIndex=advanceStringIndex(s,toLength(u.lastIndex),h))}for(var d,g="",y=0,m=0;m<p.length;m++){v=p[m];for(var b=String(v[0]),w=Re(Ie(toInteger(v.index),s.length),0),S=[],x=1;x<v.length;x++)S.push(void 0===(d=v[x])?d:String(d));var E=v.groups;if(f){var O=[b].concat(S,w,s);void 0!==E&&O.push(E);var P=String(n.apply(void 0,O))}else P=getSubstitution(b,s,w,S,E,n);w>=y&&(g+=s.slice(y,w)+P,y=w+b.length)}return g+s.slice(y)}];function getSubstitution(t,r,n,o,i,a){var c=n+t.length,u=o.length,s=Ce;return void 0!==i&&(i=toObject(i),s=_e),e.call(a,s,(function(e,a){var s;switch(a.charAt(0)){case"$":return"$";case"&":return t;case"`":return r.slice(0,n);case"'":return r.slice(c);case"<":s=i[a.slice(1,-1)];break;default:var f=+a;if(0===f)return e;if(f>u){var l=Te(f/10);return 0===l?e:l<=u?void 0===o[l-1]?a.charAt(1):o[l-1]+a.charAt(1):e}s=o[f-1]}return void 0===s?"":s}))}}));var Ue={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0};for(var Fe in Ue){var Me=e[Fe],Ge=Me&&Me.prototype;if(Ge&&Ge.forEach!==wt)try{y(Ge,"forEach",wt)}catch(t){Ge.forEach=wt}}var Ne=wellKnownSymbol("iterator"),qe=wellKnownSymbol("toStringTag"),Be=Xt.values;for(var De in Ue){var $e=e[De],Ve=$e&&$e.prototype;if(Ve){if(Ve[Ne]!==Be)try{y(Ve,Ne,Be)}catch(t){Ve[Ne]=Be}if(Ve[qe]||y(Ve,qe,De),Ue[De])for(var We in Xt)if(Ve[We]!==Xt[We])try{y(Ve,We,Xt[We])}catch(t){Ve[We]=Xt[We]}}}var Ke=wellKnownSymbol("iterator"),Ye=!fails((function(){var t=new URL("b?a=1&b=2&c=3","http://a"),e=t.searchParams,r="";return t.pathname="c%20d",e.forEach((function(t,n){e.delete("b"),r+=n+t})),!e.sort||"http://a/c%20d?a=1&c=3"!==t.href||"3"!==e.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!e[Ke]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==r||"x"!==new URL("http://x",void 0).host})),anInstance=function(t,e,r){if(!(t instanceof e))throw TypeError("Incorrect "+(r?r+" ":"")+"invocation");return t},ze=Object.assign,He=Object.defineProperty,Je=!ze||fails((function(){if(r&&1!==ze({b:1},ze(He({},"a",{enumerable:!0,get:function(){He(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},n=Symbol(),o="abcdefghijklmnopqrst";return t[n]=7,o.split("").forEach((function(t){e[t]=t})),7!=ze({},t)[n]||xt(ze({},e)).join("")!=o}))?function assign(t,e){for(var n=toObject(t),o=arguments.length,a=1,c=X.f,s=i.f;o>a;)for(var f,l=u(arguments[a++]),h=c?xt(l).concat(c(l)):xt(l),p=h.length,v=0;p>v;)f=h[v++],r&&!s.call(l,f)||(n[f]=l[f]);return n}:ze,callWithSafeIterationClosing=function(t,e,r,n){try{return n?e(anObject(r)[0],r[1]):e(r)}catch(e){var o=t.return;throw void 0!==o&&anObject(o.call(t)),e}},Xe=wellKnownSymbol("iterator"),Qe=Array.prototype,isArrayIteratorMethod=function(t){return void 0!==t&&(Ct.Array===t||Qe[Xe]===t)},createProperty=function(t,e,r){var n=toPrimitive(e);n in t?g.f(t,n,createPropertyDescriptor(0,r)):t[n]=r},Ze=wellKnownSymbol("iterator"),getIteratorMethod=function(t){if(null!=t)return t[Ze]||t["@@iterator"]||Ct[ie(t)]},tr=function from(t){var e,r,n,o,i,a,c=toObject(t),u="function"==typeof this?this:Array,s=arguments.length,f=s>1?arguments[1]:void 0,l=void 0!==f,h=getIteratorMethod(c),p=0;if(l&&(f=functionBindContext(f,s>2?arguments[2]:void 0,2)),null==h||u==Array&&isArrayIteratorMethod(h))for(r=new u(e=toLength(c.length));e>p;p++)a=l?f(c[p],p):c[p],createProperty(r,p,a);else for(i=(o=h.call(c)).next,r=new u;!(n=i.call(o)).done;p++)a=l?callWithSafeIterationClosing(o,f,[n.value,p],!0):n.value,createProperty(r,p,a);return r.length=p,r},er=/[^\0-\u007E]/,rr=/[.\u3002\uFF0E\uFF61]/g,nr="Overflow: input needs wider integers to process",or=Math.floor,ir=String.fromCharCode,digitToBasic=function(t){return t+22+75*(t<26)},adapt=function(t,e,r){var n=0;for(t=r?or(t/700):t>>1,t+=or(t/e);t>455;n+=36)t=or(t/35);return or(n+36*t/(t+38))},encode=function(t){var e,r,n=[],o=(t=function(t){for(var e=[],r=0,n=t.length;r<n;){var o=t.charCodeAt(r++);if(o>=55296&&o<=56319&&r<n){var i=t.charCodeAt(r++);56320==(64512&i)?e.push(((1023&o)<<10)+(1023&i)+65536):(e.push(o),r--)}else e.push(o)}return e}(t)).length,i=128,a=0,c=72;for(e=0;e<t.length;e++)(r=t[e])<128&&n.push(ir(r));var u=n.length,s=u;for(u&&n.push("-");s<o;){var f=2147483647;for(e=0;e<t.length;e++)(r=t[e])>=i&&r<f&&(f=r);var l=s+1;if(f-i>or((2147483647-a)/l))throw RangeError(nr);for(a+=(f-i)*l,i=f,e=0;e<t.length;e++){if((r=t[e])<i&&++a>2147483647)throw RangeError(nr);if(r==i){for(var h=a,p=36;;p+=36){var v=p<=c?1:p>=c+26?26:p-c;if(h<v)break;var d=h-v,g=36-v;n.push(ir(digitToBasic(v+d%g))),h=or(d/g)}n.push(ir(digitToBasic(h))),c=adapt(a,l,s==u),a=0,++s}}++a,++i}return n.join("")},redefineAll=function(t,e,r){for(var n in e)N(t,n,e[n],r);return t},getIterator=function(t){var e=getIteratorMethod(t);if("function"!=typeof e)throw TypeError(String(t)+" is not iterable");return anObject(e.call(t))},ar=getBuiltIn("fetch"),cr=getBuiltIn("Headers"),ur=wellKnownSymbol("iterator"),sr=G.set,fr=G.getterFor("URLSearchParams"),lr=G.getterFor("URLSearchParamsIterator"),hr=/\+/g,pr=Array(4),percentSequence=function(t){return pr[t-1]||(pr[t-1]=RegExp("((?:%[\\da-f]{2}){"+t+"})","gi"))},percentDecode=function(t){try{return decodeURIComponent(t)}catch(e){return t}},deserialize=function(t){var e=t.replace(hr," "),r=4;try{return decodeURIComponent(e)}catch(t){for(;r;)e=e.replace(percentSequence(r--),percentDecode);return e}},vr=/[!'()~]|%20/g,dr={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},replacer=function(t){return dr[t]},serialize=function(t){return encodeURIComponent(t).replace(vr,replacer)},parseSearchParams=function(t,e){if(e)for(var r,n,o=e.split("&"),i=0;i<o.length;)(r=o[i++]).length&&(n=r.split("="),t.push({key:deserialize(n.shift()),value:deserialize(n.join("="))}))},updateSearchParams=function(t){this.entries.length=0,parseSearchParams(this.entries,t)},validateArgumentsLength=function(t,e){if(t<e)throw TypeError("Not enough arguments")},gr=createIteratorConstructor((function Iterator(t,e){sr(this,{type:"URLSearchParamsIterator",iterator:getIterator(fr(t).entries),kind:e})}),"Iterator",(function next(){var t=lr(this),e=t.kind,r=t.iterator.next(),n=r.value;return r.done||(r.value="keys"===e?n.key:"values"===e?n.value:[n.key,n.value]),r})),yr=function URLSearchParams(){anInstance(this,yr,"URLSearchParams");var t,e,r,n,o,i,a,c,u,s=arguments.length>0?arguments[0]:void 0,f=this,l=[];if(sr(f,{type:"URLSearchParams",entries:l,updateURL:function(){},updateSearchParams:updateSearchParams}),void 0!==s)if(isObject(s))if("function"==typeof(t=getIteratorMethod(s)))for(r=(e=t.call(s)).next;!(n=r.call(e)).done;){if((a=(i=(o=getIterator(anObject(n.value))).next).call(o)).done||(c=i.call(o)).done||!i.call(o).done)throw TypeError("Expected sequence with length 2");l.push({key:a.value+"",value:c.value+""})}else for(u in s)has(s,u)&&l.push({key:u,value:s[u]+""});else parseSearchParams(l,"string"==typeof s?"?"===s.charAt(0)?s.slice(1):s:s+"")},mr=yr.prototype;redefineAll(mr,{append:function append(t,e){validateArgumentsLength(arguments.length,2);var r=fr(this);r.entries.push({key:t+"",value:e+""}),r.updateURL()},delete:function(t){validateArgumentsLength(arguments.length,1);for(var e=fr(this),r=e.entries,n=t+"",o=0;o<r.length;)r[o].key===n?r.splice(o,1):o++;e.updateURL()},get:function get(t){validateArgumentsLength(arguments.length,1);for(var e=fr(this).entries,r=t+"",n=0;n<e.length;n++)if(e[n].key===r)return e[n].value;return null},getAll:function getAll(t){validateArgumentsLength(arguments.length,1);for(var e=fr(this).entries,r=t+"",n=[],o=0;o<e.length;o++)e[o].key===r&&n.push(e[o].value);return n},has:function has(t){validateArgumentsLength(arguments.length,1);for(var e=fr(this).entries,r=t+"",n=0;n<e.length;)if(e[n++].key===r)return!0;return!1},set:function set(t,e){validateArgumentsLength(arguments.length,1);for(var r,n=fr(this),o=n.entries,i=!1,a=t+"",c=e+"",u=0;u<o.length;u++)(r=o[u]).key===a&&(i?o.splice(u--,1):(i=!0,r.value=c));i||o.push({key:a,value:c}),n.updateURL()},sort:function sort(){var t,e,r,n=fr(this),o=n.entries,i=o.slice();for(o.length=0,r=0;r<i.length;r++){for(t=i[r],e=0;e<r;e++)if(o[e].key>t.key){o.splice(e,0,t);break}e===r&&o.push(t)}n.updateURL()},forEach:function forEach(t){for(var e,r=fr(this).entries,n=functionBindContext(t,arguments.length>1?arguments[1]:void 0,3),o=0;o<r.length;)n((e=r[o++]).value,e.key,this)},keys:function keys(){return new gr(this,"keys")},values:function values(){return new gr(this,"values")},entries:function entries(){return new gr(this,"entries")}},{enumerable:!0}),N(mr,ur,mr.entries),N(mr,"toString",(function toString(){for(var t,e=fr(this).entries,r=[],n=0;n<e.length;)t=e[n++],r.push(serialize(t.key)+"="+serialize(t.value));return r.join("&")}),{enumerable:!0}),setToStringTag(yr,"URLSearchParams"),_export({global:!0,forced:!Ye},{URLSearchParams:yr}),Ye||"function"!=typeof ar||"function"!=typeof cr||_export({global:!0,enumerable:!0,forced:!0},{fetch:function fetch(t){var e,r,n,o=[t];return arguments.length>1&&(isObject(e=arguments[1])&&(r=e.body,"URLSearchParams"===ie(r)&&((n=e.headers?new cr(e.headers):new cr).has("content-type")||n.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"),e=At(e,{body:createPropertyDescriptor(0,String(r)),headers:createPropertyDescriptor(0,n)}))),o.push(e)),ar.apply(this,o)}});var br,wr={URLSearchParams:yr,getState:fr},Sr=be.codeAt,xr=e.URL,Er=wr.URLSearchParams,Or=wr.getState,Pr=G.set,Ar=G.getterFor("URL"),jr=Math.floor,Lr=Math.pow,kr=/[A-Za-z]/,Rr=/[\d+-.A-Za-z]/,Ir=/\d/,Tr=/^(0x|0X)/,_r=/^[0-7]+$/,Cr=/^\d+$/,Ur=/^[\dA-Fa-f]+$/,Fr=/[\u0000\u0009\u000A\u000D #%/:?@[\\]]/,Mr=/[\u0000\u0009\u000A\u000D #/:?@[\\]]/,Gr=/^[\u0000-\u001F ]+|[\u0000-\u001F ]+$/g,Nr=/[\u0009\u000A\u000D]/g,parseHost=function(t,e){var r,n,o;if("["==e.charAt(0)){if("]"!=e.charAt(e.length-1))return"Invalid host";if(!(r=parseIPv6(e.slice(1,-1))))return"Invalid host";t.host=r}else if(isSpecial(t)){if(e=function(t){var e,r,n=[],o=t.toLowerCase().replace(rr,".").split(".");for(e=0;e<o.length;e++)r=o[e],n.push(er.test(r)?"xn--"+encode(r):r);return n.join(".")}(e),Fr.test(e))return"Invalid host";if(null===(r=parseIPv4(e)))return"Invalid host";t.host=r}else{if(Mr.test(e))return"Invalid host";for(r="",n=tr(e),o=0;o<n.length;o++)r+=percentEncode(n[o],qr);t.host=r}},parseIPv4=function(t){var e,r,n,o,i,a,c,u=t.split(".");if(u.length&&""==u[u.length-1]&&u.pop(),(e=u.length)>4)return t;for(r=[],n=0;n<e;n++){if(""==(o=u[n]))return t;if(i=10,o.length>1&&"0"==o.charAt(0)&&(i=Tr.test(o)?16:8,o=o.slice(8==i?1:2)),""===o)a=0;else{if(!(10==i?Cr:8==i?_r:Ur).test(o))return t;a=parseInt(o,i)}r.push(a)}for(n=0;n<e;n++)if(a=r[n],n==e-1){if(a>=Lr(256,5-e))return null}else if(a>255)return null;for(c=r.pop(),n=0;n<r.length;n++)c+=r[n]*Lr(256,3-n);return c},parseIPv6=function(t){var e,r,n,o,i,a,c,u=[0,0,0,0,0,0,0,0],s=0,f=null,l=0,char=function(){return t.charAt(l)};if(":"==char()){if(":"!=t.charAt(1))return;l+=2,f=++s}for(;char();){if(8==s)return;if(":"!=char()){for(e=r=0;r<4&&Ur.test(char());)e=16*e+parseInt(char(),16),l++,r++;if("."==char()){if(0==r)return;if(l-=r,s>6)return;for(n=0;char();){if(o=null,n>0){if(!("."==char()&&n<4))return;l++}if(!Ir.test(char()))return;for(;Ir.test(char());){if(i=parseInt(char(),10),null===o)o=i;else{if(0==o)return;o=10*o+i}if(o>255)return;l++}u[s]=256*u[s]+o,2!=++n&&4!=n||s++}if(4!=n)return;break}if(":"==char()){if(l++,!char())return}else if(char())return;u[s++]=e}else{if(null!==f)return;l++,f=++s}}if(null!==f)for(a=s-f,s=7;0!=s&&a>0;)c=u[s],u[s--]=u[f+a-1],u[f+--a]=c;else if(8!=s)return;return u},serializeHost=function(t){var e,r,n,o;if("number"==typeof t){for(e=[],r=0;r<4;r++)e.unshift(t%256),t=jr(t/256);return e.join(".")}if("object"==typeof t){for(e="",n=function(t){for(var e=null,r=1,n=null,o=0,i=0;i<8;i++)0!==t[i]?(o>r&&(e=n,r=o),n=null,o=0):(null===n&&(n=i),++o);return o>r&&(e=n,r=o),e}(t),r=0;r<8;r++)o&&0===t[r]||(o&&(o=!1),n===r?(e+=r?":":"::",o=!0):(e+=t[r].toString(16),r<7&&(e+=":")));return"["+e+"]"}return t},qr={},Br=Je({},qr,{" ":1,'"':1,"<":1,">":1,"`":1}),Dr=Je({},Br,{"#":1,"?":1,"{":1,"}":1}),$r=Je({},Dr,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),percentEncode=function(t,e){var r=Sr(t,0);return r>32&&r<127&&!has(e,t)?t:encodeURIComponent(t)},Vr={ftp:21,file:null,http:80,https:443,ws:80,wss:443},isSpecial=function(t){return has(Vr,t.scheme)},includesCredentials=function(t){return""!=t.username||""!=t.password},cannotHaveUsernamePasswordPort=function(t){return!t.host||t.cannotBeABaseURL||"file"==t.scheme},isWindowsDriveLetter=function(t,e){var r;return 2==t.length&&kr.test(t.charAt(0))&&(":"==(r=t.charAt(1))||!e&&"|"==r)},startsWithWindowsDriveLetter=function(t){var e;return t.length>1&&isWindowsDriveLetter(t.slice(0,2))&&(2==t.length||"/"===(e=t.charAt(2))||"\\"===e||"?"===e||"#"===e)},shortenURLsPath=function(t){var e=t.path,r=e.length;!r||"file"==t.scheme&&1==r&&isWindowsDriveLetter(e[0],!0)||e.pop()},isSingleDot=function(t){return"."===t||"%2e"===t.toLowerCase()},Wr={},Kr={},Yr={},zr={},Hr={},Jr={},Xr={},Qr={},Zr={},tn={},en={},rn={},nn={},on={},an={},cn={},un={},sn={},fn={},ln={},hn={},parseURL=function(t,e,r,n){var o,i,a,c,u,s=r||Wr,f=0,l="",h=!1,p=!1,v=!1;for(r||(t.scheme="",t.username="",t.password="",t.host=null,t.port=null,t.path=[],t.query=null,t.fragment=null,t.cannotBeABaseURL=!1,e=e.replace(Gr,"")),e=e.replace(Nr,""),o=tr(e);f<=o.length;){switch(i=o[f],s){case Wr:if(!i||!kr.test(i)){if(r)return"Invalid scheme";s=Yr;continue}l+=i.toLowerCase(),s=Kr;break;case Kr:if(i&&(Rr.test(i)||"+"==i||"-"==i||"."==i))l+=i.toLowerCase();else{if(":"!=i){if(r)return"Invalid scheme";l="",s=Yr,f=0;continue}if(r&&(isSpecial(t)!=has(Vr,l)||"file"==l&&(includesCredentials(t)||null!==t.port)||"file"==t.scheme&&!t.host))return;if(t.scheme=l,r)return void(isSpecial(t)&&Vr[t.scheme]==t.port&&(t.port=null));l="","file"==t.scheme?s=on:isSpecial(t)&&n&&n.scheme==t.scheme?s=zr:isSpecial(t)?s=Qr:"/"==o[f+1]?(s=Hr,f++):(t.cannotBeABaseURL=!0,t.path.push(""),s=fn)}break;case Yr:if(!n||n.cannotBeABaseURL&&"#"!=i)return"Invalid scheme";if(n.cannotBeABaseURL&&"#"==i){t.scheme=n.scheme,t.path=n.path.slice(),t.query=n.query,t.fragment="",t.cannotBeABaseURL=!0,s=hn;break}s="file"==n.scheme?on:Jr;continue;case zr:if("/"!=i||"/"!=o[f+1]){s=Jr;continue}s=Zr,f++;break;case Hr:if("/"==i){s=tn;break}s=sn;continue;case Jr:if(t.scheme=n.scheme,i==br)t.username=n.username,t.password=n.password,t.host=n.host,t.port=n.port,t.path=n.path.slice(),t.query=n.query;else if("/"==i||"\\"==i&&isSpecial(t))s=Xr;else if("?"==i)t.username=n.username,t.password=n.password,t.host=n.host,t.port=n.port,t.path=n.path.slice(),t.query="",s=ln;else{if("#"!=i){t.username=n.username,t.password=n.password,t.host=n.host,t.port=n.port,t.path=n.path.slice(),t.path.pop(),s=sn;continue}t.username=n.username,t.password=n.password,t.host=n.host,t.port=n.port,t.path=n.path.slice(),t.query=n.query,t.fragment="",s=hn}break;case Xr:if(!isSpecial(t)||"/"!=i&&"\\"!=i){if("/"!=i){t.username=n.username,t.password=n.password,t.host=n.host,t.port=n.port,s=sn;continue}s=tn}else s=Zr;break;case Qr:if(s=Zr,"/"!=i||"/"!=l.charAt(f+1))continue;f++;break;case Zr:if("/"!=i&&"\\"!=i){s=tn;continue}break;case tn:if("@"==i){h&&(l="%40"+l),h=!0,a=tr(l);for(var d=0;d<a.length;d++){var g=a[d];if(":"!=g||v){var y=percentEncode(g,$r);v?t.password+=y:t.username+=y}else v=!0}l=""}else if(i==br||"/"==i||"?"==i||"#"==i||"\\"==i&&isSpecial(t)){if(h&&""==l)return"Invalid authority";f-=tr(l).length+1,l="",s=en}else l+=i;break;case en:case rn:if(r&&"file"==t.scheme){s=cn;continue}if(":"!=i||p){if(i==br||"/"==i||"?"==i||"#"==i||"\\"==i&&isSpecial(t)){if(isSpecial(t)&&""==l)return"Invalid host";if(r&&""==l&&(includesCredentials(t)||null!==t.port))return;if(c=parseHost(t,l))return c;if(l="",s=un,r)return;continue}"["==i?p=!0:"]"==i&&(p=!1),l+=i}else{if(""==l)return"Invalid host";if(c=parseHost(t,l))return c;if(l="",s=nn,r==rn)return}break;case nn:if(!Ir.test(i)){if(i==br||"/"==i||"?"==i||"#"==i||"\\"==i&&isSpecial(t)||r){if(""!=l){var m=parseInt(l,10);if(m>65535)return"Invalid port";t.port=isSpecial(t)&&m===Vr[t.scheme]?null:m,l=""}if(r)return;s=un;continue}return"Invalid port"}l+=i;break;case on:if(t.scheme="file","/"==i||"\\"==i)s=an;else{if(!n||"file"!=n.scheme){s=sn;continue}if(i==br)t.host=n.host,t.path=n.path.slice(),t.query=n.query;else if("?"==i)t.host=n.host,t.path=n.path.slice(),t.query="",s=ln;else{if("#"!=i){startsWithWindowsDriveLetter(o.slice(f).join(""))||(t.host=n.host,t.path=n.path.slice(),shortenURLsPath(t)),s=sn;continue}t.host=n.host,t.path=n.path.slice(),t.query=n.query,t.fragment="",s=hn}}break;case an:if("/"==i||"\\"==i){s=cn;break}n&&"file"==n.scheme&&!startsWithWindowsDriveLetter(o.slice(f).join(""))&&(isWindowsDriveLetter(n.path[0],!0)?t.path.push(n.path[0]):t.host=n.host),s=sn;continue;case cn:if(i==br||"/"==i||"\\"==i||"?"==i||"#"==i){if(!r&&isWindowsDriveLetter(l))s=sn;else if(""==l){if(t.host="",r)return;s=un}else{if(c=parseHost(t,l))return c;if("localhost"==t.host&&(t.host=""),r)return;l="",s=un}continue}l+=i;break;case un:if(isSpecial(t)){if(s=sn,"/"!=i&&"\\"!=i)continue}else if(r||"?"!=i)if(r||"#"!=i){if(i!=br&&(s=sn,"/"!=i))continue}else t.fragment="",s=hn;else t.query="",s=ln;break;case sn:if(i==br||"/"==i||"\\"==i&&isSpecial(t)||!r&&("?"==i||"#"==i)){if(".."===(u=(u=l).toLowerCase())||"%2e."===u||".%2e"===u||"%2e%2e"===u?(shortenURLsPath(t),"/"==i||"\\"==i&&isSpecial(t)||t.path.push("")):isSingleDot(l)?"/"==i||"\\"==i&&isSpecial(t)||t.path.push(""):("file"==t.scheme&&!t.path.length&&isWindowsDriveLetter(l)&&(t.host&&(t.host=""),l=l.charAt(0)+":"),t.path.push(l)),l="","file"==t.scheme&&(i==br||"?"==i||"#"==i))for(;t.path.length>1&&""===t.path[0];)t.path.shift();"?"==i?(t.query="",s=ln):"#"==i&&(t.fragment="",s=hn)}else l+=percentEncode(i,Dr);break;case fn:"?"==i?(t.query="",s=ln):"#"==i?(t.fragment="",s=hn):i!=br&&(t.path[0]+=percentEncode(i,qr));break;case ln:r||"#"!=i?i!=br&&("'"==i&&isSpecial(t)?t.query+="%27":t.query+="#"==i?"%23":percentEncode(i,qr)):(t.fragment="",s=hn);break;case hn:i!=br&&(t.fragment+=percentEncode(i,Br))}f++}},pn=function URL(t){var e,n,o=anInstance(this,pn,"URL"),i=arguments.length>1?arguments[1]:void 0,a=String(t),c=Pr(o,{type:"URL"});if(void 0!==i)if(i instanceof pn)e=Ar(i);else if(n=parseURL(e={},String(i)))throw TypeError(n);if(n=parseURL(c,a,null,e))throw TypeError(n);var u=c.searchParams=new Er,s=Or(u);s.updateSearchParams(c.query),s.updateURL=function(){c.query=String(u)||null},r||(o.href=serializeURL.call(o),o.origin=getOrigin.call(o),o.protocol=getProtocol.call(o),o.username=getUsername.call(o),o.password=getPassword.call(o),o.host=getHost.call(o),o.hostname=getHostname.call(o),o.port=getPort.call(o),o.pathname=getPathname.call(o),o.search=getSearch.call(o),o.searchParams=getSearchParams.call(o),o.hash=getHash.call(o))},vn=pn.prototype,serializeURL=function(){var t=Ar(this),e=t.scheme,r=t.username,n=t.password,o=t.host,i=t.port,a=t.path,c=t.query,u=t.fragment,s=e+":";return null!==o?(s+="//",includesCredentials(t)&&(s+=r+(n?":"+n:"")+"@"),s+=serializeHost(o),null!==i&&(s+=":"+i)):"file"==e&&(s+="//"),s+=t.cannotBeABaseURL?a[0]:a.length?"/"+a.join("/"):"",null!==c&&(s+="?"+c),null!==u&&(s+="#"+u),s},getOrigin=function(){var t=Ar(this),e=t.scheme,r=t.port;if("blob"==e)try{return new URL(e.path[0]).origin}catch(t){return"null"}return"file"!=e&&isSpecial(t)?e+"://"+serializeHost(t.host)+(null!==r?":"+r:""):"null"},getProtocol=function(){return Ar(this).scheme+":"},getUsername=function(){return Ar(this).username},getPassword=function(){return Ar(this).password},getHost=function(){var t=Ar(this),e=t.host,r=t.port;return null===e?"":null===r?serializeHost(e):serializeHost(e)+":"+r},getHostname=function(){var t=Ar(this).host;return null===t?"":serializeHost(t)},getPort=function(){var t=Ar(this).port;return null===t?"":String(t)},getPathname=function(){var t=Ar(this),e=t.path;return t.cannotBeABaseURL?e[0]:e.length?"/"+e.join("/"):""},getSearch=function(){var t=Ar(this).query;return t?"?"+t:""},getSearchParams=function(){return Ar(this).searchParams},getHash=function(){var t=Ar(this).fragment;return t?"#"+t:""},accessorDescriptor=function(t,e){return{get:t,set:e,configurable:!0,enumerable:!0}};if(r&&Et(vn,{href:accessorDescriptor(serializeURL,(function(t){var e=Ar(this),r=String(t),n=parseURL(e,r);if(n)throw TypeError(n);Or(e.searchParams).updateSearchParams(e.query)})),origin:accessorDescriptor(getOrigin),protocol:accessorDescriptor(getProtocol,(function(t){var e=Ar(this);parseURL(e,String(t)+":",Wr)})),username:accessorDescriptor(getUsername,(function(t){var e=Ar(this),r=tr(String(t));if(!cannotHaveUsernamePasswordPort(e)){e.username="";for(var n=0;n<r.length;n++)e.username+=percentEncode(r[n],$r)}})),password:accessorDescriptor(getPassword,(function(t){var e=Ar(this),r=tr(String(t));if(!cannotHaveUsernamePasswordPort(e)){e.password="";for(var n=0;n<r.length;n++)e.password+=percentEncode(r[n],$r)}})),host:accessorDescriptor(getHost,(function(t){var e=Ar(this);e.cannotBeABaseURL||parseURL(e,String(t),en)})),hostname:accessorDescriptor(getHostname,(function(t){var e=Ar(this);e.cannotBeABaseURL||parseURL(e,String(t),rn)})),port:accessorDescriptor(getPort,(function(t){var e=Ar(this);cannotHaveUsernamePasswordPort(e)||(""==(t=String(t))?e.port=null:parseURL(e,t,nn))})),pathname:accessorDescriptor(getPathname,(function(t){var e=Ar(this);e.cannotBeABaseURL||(e.path=[],parseURL(e,t+"",un))})),search:accessorDescriptor(getSearch,(function(t){var e=Ar(this);""==(t=String(t))?e.query=null:("?"==t.charAt(0)&&(t=t.slice(1)),e.query="",parseURL(e,t,ln)),Or(e.searchParams).updateSearchParams(e.query)})),searchParams:accessorDescriptor(getSearchParams),hash:accessorDescriptor(getHash,(function(t){var e=Ar(this);""!=(t=String(t))?("#"==t.charAt(0)&&(t=t.slice(1)),e.fragment="",parseURL(e,t,hn)):e.fragment=null}))}),N(vn,"toJSON",(function toJSON(){return serializeURL.call(this)}),{enumerable:!0}),N(vn,"toString",(function toString(){return serializeURL.call(this)}),{enumerable:!0}),xr){var dn=xr.createObjectURL,gn=xr.revokeObjectURL;dn&&N(pn,"createObjectURL",(function createObjectURL(t){return dn.apply(xr,arguments)})),gn&&N(pn,"revokeObjectURL",(function revokeObjectURL(t){return gn.apply(xr,arguments)}))}setToStringTag(pn,"URL"),_export({global:!0,forced:!Ye,sham:!r},{URL:pn});var yn=J.f,mn={}.toString,bn="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],wn={f:function getOwnPropertyNames(t){return bn&&"[object Window]"==mn.call(t)?function(t){try{return yn(t)}catch(t){return bn.slice()}}(t):yn(toIndexedObject(t))}},Sn={f:wellKnownSymbol},xn=g.f,defineWellKnownSymbol=function(t){var e=q.Symbol||(q.Symbol={});has(e,t)||xn(e,t,{value:Sn.f(t)})},En=vt.forEach,On=sharedKey("hidden"),Pn=wellKnownSymbol("toPrimitive"),An=G.set,jn=G.getterFor("Symbol"),Ln=Object.prototype,kn=e.Symbol,Rn=getBuiltIn("JSON","stringify"),In=v.f,Tn=g.f,_n=wn.f,Cn=i.f,Un=A("symbols"),Fn=A("op-symbols"),Mn=A("string-to-symbol-registry"),Gn=A("symbol-to-string-registry"),Nn=A("wks"),qn=e.QObject,Bn=!qn||!qn.prototype||!qn.prototype.findChild,Dn=r&&fails((function(){return 7!=At(Tn({},"a",{get:function(){return Tn(this,"a",{value:7}).a}})).a}))?function(t,e,r){var n=In(Ln,e);n&&delete Ln[e],Tn(t,e,r),n&&t!==Ln&&Tn(Ln,e,n)}:Tn,wrap=function(t,e){var n=Un[t]=At(kn.prototype);return An(n,{type:"Symbol",tag:t,description:e}),r||(n.description=e),n},$n=ut?function(t){return"symbol"==typeof t}:function(t){return Object(t)instanceof kn},Vn=function defineProperty(t,e,r){t===Ln&&Vn(Fn,e,r),anObject(t);var n=toPrimitive(e,!0);return anObject(r),has(Un,n)?(r.enumerable?(has(t,On)&&t[On][n]&&(t[On][n]=!1),r=At(r,{enumerable:createPropertyDescriptor(0,!1)})):(has(t,On)||Tn(t,On,createPropertyDescriptor(1,{})),t[On][n]=!0),Dn(t,n,r)):Tn(t,n,r)},Wn=function defineProperties(t,e){anObject(t);var n=toIndexedObject(e),o=xt(n).concat(Hn(n));return En(o,(function(e){r&&!Kn.call(n,e)||Vn(t,e,n[e])})),t},Kn=function propertyIsEnumerable(t){var e=toPrimitive(t,!0),r=Cn.call(this,e);return!(this===Ln&&has(Un,e)&&!has(Fn,e))&&(!(r||!has(this,e)||!has(Un,e)||has(this,On)&&this[On][e])||r)},Yn=function getOwnPropertyDescriptor(t,e){var r=toIndexedObject(t),n=toPrimitive(e,!0);if(r!==Ln||!has(Un,n)||has(Fn,n)){var o=In(r,n);return!o||!has(Un,n)||has(r,On)&&r[On][n]||(o.enumerable=!0),o}},zn=function getOwnPropertyNames(t){var e=_n(toIndexedObject(t)),r=[];return En(e,(function(t){has(Un,t)||has(R,t)||r.push(t)})),r},Hn=function getOwnPropertySymbols(t){var e=t===Ln,r=_n(e?Fn:toIndexedObject(t)),n=[];return En(r,(function(t){!has(Un,t)||e&&!has(Ln,t)||n.push(Un[t])})),n};if(ct||(N((kn=function Symbol(){if(this instanceof kn)throw TypeError("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?String(arguments[0]):void 0,e=uid(t),setter=function(t){this===Ln&&setter.call(Fn,t),has(this,On)&&has(this[On],e)&&(this[On][e]=!1),Dn(this,e,createPropertyDescriptor(1,t))};return r&&Bn&&Dn(Ln,e,{configurable:!0,set:setter}),wrap(e,t)}).prototype,"toString",(function toString(){return jn(this).tag})),N(kn,"withoutSetter",(function(t){return wrap(uid(t),t)})),i.f=Kn,g.f=Vn,v.f=Yn,J.f=wn.f=zn,X.f=Hn,Sn.f=function(t){return wrap(wellKnownSymbol(t),t)},r&&(Tn(kn.prototype,"description",{configurable:!0,get:function description(){return jn(this).description}}),N(Ln,"propertyIsEnumerable",Kn,{unsafe:!0}))),_export({global:!0,wrap:!0,forced:!ct,sham:!ct},{Symbol:kn}),En(xt(Nn),(function(t){defineWellKnownSymbol(t)})),_export({target:"Symbol",stat:!0,forced:!ct},{for:function(t){var e=String(t);if(has(Mn,e))return Mn[e];var r=kn(e);return Mn[e]=r,Gn[r]=e,r},keyFor:function keyFor(t){if(!$n(t))throw TypeError(t+" is not a symbol");if(has(Gn,t))return Gn[t]},useSetter:function(){Bn=!0},useSimple:function(){Bn=!1}}),_export({target:"Object",stat:!0,forced:!ct,sham:!r},{create:function create(t,e){return void 0===e?At(t):Wn(At(t),e)},defineProperty:Vn,defineProperties:Wn,getOwnPropertyDescriptor:Yn}),_export({target:"Object",stat:!0,forced:!ct},{getOwnPropertyNames:zn,getOwnPropertySymbols:Hn}),_export({target:"Object",stat:!0,forced:fails((function(){X.f(1)}))},{getOwnPropertySymbols:function getOwnPropertySymbols(t){return X.f(toObject(t))}}),Rn){var Jn=!ct||fails((function(){var t=kn();return"[null]"!=Rn([t])||"{}"!=Rn({a:t})||"{}"!=Rn(Object(t))}));_export({target:"JSON",stat:!0,forced:Jn},{stringify:function stringify(t,e,r){for(var n,o=[t],i=1;arguments.length>i;)o.push(arguments[i++]);if(n=e,(isObject(e)||void 0!==t)&&!$n(t))return at(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!$n(e))return e}),o[1]=e,Rn.apply(null,o)}})}kn.prototype[Pn]||y(kn.prototype,Pn,kn.prototype.valueOf),setToStringTag(kn,"Symbol"),R[On]=!0;var Xn=g.f,Qn=e.Symbol;if(r&&"function"==typeof Qn&&(!("description"in Qn.prototype)||void 0!==Qn().description)){var Zn={},to=function Symbol(){var t=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),e=this instanceof to?new Qn(t):void 0===t?Qn():Qn(t);return""===t&&(Zn[e]=!0),e};copyConstructorProperties(to,Qn);var eo=to.prototype=Qn.prototype;eo.constructor=to;var ro=eo.toString,no="Symbol(test)"==String(Qn("test")),oo=/^Symbol\((.*)\)[^)]+$/;Xn(eo,"description",{configurable:!0,get:function description(){var t=isObject(this)?this.valueOf():this,e=ro.call(t);if(has(Zn,t))return"";var r=no?e.slice(7,-1):e.replace(oo,"$1");return""===r?void 0:r}}),_export({global:!0,forced:!0},{Symbol:to})}defineWellKnownSymbol("asyncIterator"),defineWellKnownSymbol("iterator"),defineWellKnownSymbol("toStringTag");var io=[].reverse,ao=[1,2];_export({target:"Array",proto:!0,forced:String(ao)===String(ao.reverse())},{reverse:function reverse(){return at(this)&&(this.length=this.length),io.call(this)}});var co,uo,so=getBuiltIn("navigator","userAgent")||"",fo=e.process,lo=fo&&fo.versions,ho=lo&&lo.v8;ho?uo=(co=ho.split("."))[0]+co[1]:so&&(!(co=so.match(/Edge\/(\d+)/))||co[1]>=74)&&(co=so.match(/Chrome\/(\d+)/))&&(uo=co[1]);var po=uo&&+uo,vo=wellKnownSymbol("species"),arrayMethodHasSpeciesSupport=function(t){return po>=51||!fails((function(){var e=[];return(e.constructor={})[vo]=function(){return{foo:1}},1!==e[t](Boolean).foo}))},go=arrayMethodHasSpeciesSupport("slice"),yo=arrayMethodUsesToLength("slice",{ACCESSORS:!0,0:0,1:2}),mo=wellKnownSymbol("species"),bo=[].slice,wo=Math.max;_export({target:"Array",proto:!0,forced:!go||!yo},{slice:function slice(t,e){var r,n,o,i=toIndexedObject(this),a=toLength(i.length),c=toAbsoluteIndex(t,a),u=toAbsoluteIndex(void 0===e?a:e,a);if(at(i)&&("function"!=typeof(r=i.constructor)||r!==Array&&!at(r.prototype)?isObject(r)&&null===(r=r[mo])&&(r=void 0):r=void 0,r===Array||void 0===r))return bo.call(i,c,u);for(n=new(void 0===r?Array:r)(wo(u-c,0)),o=0;c<u;c++,o++)c in i&&createProperty(n,o,i[c]);return n.length=o,n}});var So=Date.prototype,xo=So.toString,Eo=So.getTime;new Date(NaN)+""!="Invalid Date"&&N(So,"toString",(function toString(){var t=Eo.call(this);return t==t?xo.call(this):"Invalid Date"}));var Oo=g.f,Po=Function.prototype,Ao=Po.toString,jo=/^\s*function ([^ (]*)/;r&&!("name"in Po)&&Oo(Po,"name",{configurable:!0,get:function(){try{return Ao.call(this).match(jo)[1]}catch(t){return""}}}),setToStringTag(e.JSON,"JSON",!0),setToStringTag(Math,"Math",!0),_export({target:"Object",stat:!0,sham:!r},{create:At}),_export({target:"Object",stat:!0,forced:!r,sham:!r},{defineProperty:g.f});var Lo=fails((function(){Gt(1)}));_export({target:"Object",stat:!0,forced:Lo,sham:!Ut},{getPrototypeOf:function getPrototypeOf(t){return Gt(toObject(t))}}),_export({target:"Object",stat:!0},{setPrototypeOf:Wt});var ko=e.Promise,Ro=wellKnownSymbol("species"),Io=createCommonjsModule((function(t){var Result=function(t,e){this.stopped=t,this.result=e};(t.exports=function(t,e,r,n,o){var i,a,c,u,s,f,l,h=functionBindContext(e,r,n?2:1);if(o)i=t;else{if("function"!=typeof(a=getIteratorMethod(t)))throw TypeError("Target is not iterable");if(isArrayIteratorMethod(a)){for(c=0,u=toLength(t.length);u>c;c++)if((s=n?h(anObject(l=t[c])[0],l[1]):h(t[c]))&&s instanceof Result)return s;return new Result(!1)}i=a.call(t)}for(f=i.next;!(l=f.call(i)).done;)if("object"==typeof(s=callWithSafeIterationClosing(i,h,l.value,n))&&s&&s instanceof Result)return s;return new Result(!1)}).stop=function(t){return new Result(!0,t)}})),To=wellKnownSymbol("iterator"),_o=!1;try{var Co=0,Uo={next:function(){return{done:!!Co++}},return:function(){_o=!0}};Uo[To]=function(){return this},Array.from(Uo,(function(){throw 2}))}catch(t){}var Fo,Mo,Go,No=wellKnownSymbol("species"),speciesConstructor=function(t,e){var r,n=anObject(t).constructor;return void 0===n||null==(r=anObject(n)[No])?e:aFunction$1(r)},qo=/(iphone|ipod|ipad).*applewebkit/i.test(so),Bo=e.location,Do=e.setImmediate,$o=e.clearImmediate,Vo=e.process,Wo=e.MessageChannel,Ko=e.Dispatch,Yo=0,zo={},run=function(t){if(zo.hasOwnProperty(t)){var e=zo[t];delete zo[t],e()}},runner=function(t){return function(){run(t)}},listener=function(t){run(t.data)},post=function(t){e.postMessage(t+"",Bo.protocol+"//"+Bo.host)};Do&&$o||(Do=function setImmediate(t){for(var e=[],r=1;arguments.length>r;)e.push(arguments[r++]);return zo[++Yo]=function(){("function"==typeof t?t:Function(t)).apply(void 0,e)},Fo(Yo),Yo},$o=function clearImmediate(t){delete zo[t]},"process"==classofRaw(Vo)?Fo=function(t){Vo.nextTick(runner(t))}:Ko&&Ko.now?Fo=function(t){Ko.now(runner(t))}:Wo&&!qo?(Go=(Mo=new Wo).port2,Mo.port1.onmessage=listener,Fo=functionBindContext(Go.postMessage,Go,1)):!e.addEventListener||"function"!=typeof postMessage||e.importScripts||fails(post)||"file:"===Bo.protocol?Fo="onreadystatechange"in documentCreateElement("script")?function(t){Ot.appendChild(documentCreateElement("script")).onreadystatechange=function(){Ot.removeChild(this),run(t)}}:function(t){setTimeout(runner(t),0)}:(Fo=post,e.addEventListener("message",listener,!1)));var Ho,Jo,Xo,Qo,Zo,ti,ei,ri,ni={set:Do,clear:$o},oi=v.f,ii=ni.set,ai=e.MutationObserver||e.WebKitMutationObserver,ci=e.process,ui=e.Promise,si="process"==classofRaw(ci),fi=oi(e,"queueMicrotask"),li=fi&&fi.value;li||(Ho=function(){var t,e;for(si&&(t=ci.domain)&&t.exit();Jo;){e=Jo.fn,Jo=Jo.next;try{e()}catch(t){throw Jo?Qo():Xo=void 0,t}}Xo=void 0,t&&t.enter()},si?Qo=function(){ci.nextTick(Ho)}:ai&&!qo?(Zo=!0,ti=document.createTextNode(""),new ai(Ho).observe(ti,{characterData:!0}),Qo=function(){ti.data=Zo=!Zo}):ui&&ui.resolve?(ei=ui.resolve(void 0),ri=ei.then,Qo=function(){ri.call(ei,Ho)}):Qo=function(){ii.call(e,Ho)});var hi,pi,vi,di,gi=li||function(t){var e={fn:t,next:void 0};Xo&&(Xo.next=e),Jo||(Jo=e,Qo()),Xo=e},PromiseCapability=function(t){var e,r;this.promise=new t((function(t,n){if(void 0!==e||void 0!==r)throw TypeError("Bad Promise constructor");e=t,r=n})),this.resolve=aFunction$1(e),this.reject=aFunction$1(r)},yi={f:function(t){return new PromiseCapability(t)}},promiseResolve=function(t,e){if(anObject(t),isObject(e)&&e.constructor===t)return e;var r=yi.f(t);return(0,r.resolve)(e),r.promise},perform=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}},mi=ni.set,bi=wellKnownSymbol("species"),wi="Promise",Si=G.get,xi=G.set,Ei=G.getterFor(wi),Oi=ko,Pi=e.TypeError,Ai=e.document,ji=e.process,Li=getBuiltIn("fetch"),ki=yi.f,Ri=ki,Ii="process"==classofRaw(ji),Ti=!!(Ai&&Ai.createEvent&&e.dispatchEvent),_i=ot(wi,(function(){if(!(E(Oi)!==String(Oi))){if(66===po)return!0;if(!Ii&&"function"!=typeof PromiseRejectionEvent)return!0}if(po>=51&&/native code/.test(Oi))return!1;var t=Oi.resolve(1),FakePromise=function(t){t((function(){}),(function(){}))};return(t.constructor={})[bi]=FakePromise,!(t.then((function(){}))instanceof FakePromise)})),Ci=_i||!function(t,e){if(!e&&!_o)return!1;var r=!1;try{var n={};n[To]=function(){return{next:function(){return{done:r=!0}}}},t(n)}catch(t){}return r}((function(t){Oi.all(t).catch((function(){}))})),isThenable=function(t){var e;return!(!isObject(t)||"function"!=typeof(e=t.then))&&e},notify$1=function(t,e,r){if(!e.notified){e.notified=!0;var n=e.reactions;gi((function(){for(var o=e.value,i=1==e.state,a=0;n.length>a;){var c,u,s,f=n[a++],l=i?f.ok:f.fail,h=f.resolve,p=f.reject,v=f.domain;try{l?(i||(2===e.rejection&&onHandleUnhandled(t,e),e.rejection=1),!0===l?c=o:(v&&v.enter(),c=l(o),v&&(v.exit(),s=!0)),c===f.promise?p(Pi("Promise-chain cycle")):(u=isThenable(c))?u.call(c,h,p):h(c)):p(o)}catch(t){v&&!s&&v.exit(),p(t)}}e.reactions=[],e.notified=!1,r&&!e.rejection&&onUnhandled(t,e)}))}},dispatchEvent=function(t,r,n){var o,i;Ti?((o=Ai.createEvent("Event")).promise=r,o.reason=n,o.initEvent(t,!1,!0),e.dispatchEvent(o)):o={promise:r,reason:n},(i=e["on"+t])?i(o):"unhandledrejection"===t&&function(t,r){var n=e.console;n&&n.error&&(1===arguments.length?n.error(t):n.error(t,r))}("Unhandled promise rejection",n)},onUnhandled=function(t,r){mi.call(e,(function(){var e,n=r.value;if(isUnhandled(r)&&(e=perform((function(){Ii?ji.emit("unhandledRejection",n,t):dispatchEvent("unhandledrejection",t,n)})),r.rejection=Ii||isUnhandled(r)?2:1,e.error))throw e.value}))},isUnhandled=function(t){return 1!==t.rejection&&!t.parent},onHandleUnhandled=function(t,r){mi.call(e,(function(){Ii?ji.emit("rejectionHandled",t):dispatchEvent("rejectionhandled",t,r.value)}))},bind=function(t,e,r,n){return function(o){t(e,r,o,n)}},internalReject=function(t,e,r,n){e.done||(e.done=!0,n&&(e=n),e.value=r,e.state=2,notify$1(t,e,!0))},internalResolve=function(t,e,r,n){if(!e.done){e.done=!0,n&&(e=n);try{if(t===r)throw Pi("Promise can't be resolved itself");var o=isThenable(r);o?gi((function(){var n={done:!1};try{o.call(r,bind(internalResolve,t,n,e),bind(internalReject,t,n,e))}catch(r){internalReject(t,n,r,e)}})):(e.value=r,e.state=1,notify$1(t,e,!1))}catch(r){internalReject(t,{done:!1},r,e)}}};_i&&(Oi=function Promise(t){anInstance(this,Oi,wi),aFunction$1(t),hi.call(this);var e=Si(this);try{t(bind(internalResolve,this,e),bind(internalReject,this,e))}catch(t){internalReject(this,e,t)}},(hi=function Promise(t){xi(this,{type:wi,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=redefineAll(Oi.prototype,{then:function then(t,e){var r=Ei(this),n=ki(speciesConstructor(this,Oi));return n.ok="function"!=typeof t||t,n.fail="function"==typeof e&&e,n.domain=Ii?ji.domain:void 0,r.parent=!0,r.reactions.push(n),0!=r.state&&notify$1(this,r,!1),n.promise},catch:function(t){return this.then(void 0,t)}}),pi=function(){var t=new hi,e=Si(t);this.promise=t,this.resolve=bind(internalResolve,t,e),this.reject=bind(internalReject,t,e)},yi.f=ki=function(t){return t===Oi||t===vi?new pi(t):Ri(t)},"function"==typeof ko&&(di=ko.prototype.then,N(ko.prototype,"then",(function then(t,e){var r=this;return new Oi((function(t,e){di.call(r,t,e)})).then(t,e)}),{unsafe:!0}),"function"==typeof Li&&_export({global:!0,enumerable:!0,forced:!0},{fetch:function fetch(t){return promiseResolve(Oi,Li.apply(e,arguments))}}))),_export({global:!0,wrap:!0,forced:_i},{Promise:Oi}),setToStringTag(Oi,wi,!1),function(t){var e=getBuiltIn(t),n=g.f;r&&e&&!e[Ro]&&n(e,Ro,{configurable:!0,get:function(){return this}})}(wi),vi=getBuiltIn(wi),_export({target:wi,stat:!0,forced:_i},{reject:function reject(t){var e=ki(this);return e.reject.call(void 0,t),e.promise}}),_export({target:wi,stat:!0,forced:_i},{resolve:function resolve(t){return promiseResolve(this,t)}}),_export({target:wi,stat:!0,forced:Ci},{all:function all(t){var e=this,r=ki(e),n=r.resolve,o=r.reject,i=perform((function(){var r=aFunction$1(e.resolve),i=[],a=0,c=1;Io(t,(function(t){var u=a++,s=!1;i.push(void 0),c++,r.call(e,t).then((function(t){s||(s=!0,i[u]=t,--c||n(i))}),o)})),--c||n(i)}));return i.error&&o(i.value),r.promise},race:function race(t){var e=this,r=ki(e),n=r.reject,o=perform((function(){var o=aFunction$1(e.resolve);Io(t,(function(t){o.call(e,t).then(r.resolve,n)}))}));return o.error&&n(o.value),r.promise}});var Ui=RegExp.prototype,Fi=Ui.toString,Mi=fails((function(){return"/a/b"!=Fi.call({source:"a",flags:"b"})})),Gi="toString"!=Fi.name;function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function asyncGeneratorStep(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function _asyncToGenerator(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function _next(t){asyncGeneratorStep(i,n,o,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(i,n,o,_next,_throw,"throw",t)}_next(void 0)}))}}function _slicedToArray(t,e){return function _arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function _iterableToArrayLimit(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var r=[],n=!0,o=!1,i=void 0;try{for(var a,c=t[Symbol.iterator]();!(n=(a=c.next()).done)&&(r.push(a.value),!e||r.length!==e);n=!0);}catch(t){o=!0,i=t}finally{try{n||null==c.return||c.return()}finally{if(o)throw i}}return r}(t,e)||function _unsupportedIterableToArray(t,e){if(!t)return;if("string"==typeof t)return _arrayLikeToArray(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _arrayLikeToArray(t,e)}(t,e)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _arrayLikeToArray(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}(Mi||Gi)&&N(RegExp.prototype,"toString",(function toString(){var t=anObject(this),e=String(t.source),r=t.flags;return"/"+e+"/"+String(void 0===r&&t instanceof RegExp&&!("flags"in Ui)?regexpFlags.call(t):r)}),{unsafe:!0});createCommonjsModule((function(t){var e=function(t){var e,r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function define(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{define({},"")}catch(t){define=function define(t,e,r){return t[e]=r}}function wrap(t,e,r,n){var o=e&&e.prototype instanceof Generator?e:Generator,i=Object.create(o.prototype),a=new Context(n||[]);return i._invoke=function makeInvokeMethod(t,e,r){var n=u;return function invoke(o,i){if(n===f)throw new Error("Generator is already running");if(n===l){if("throw"===o)throw i;return doneResult()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=maybeInvokeDelegate(a,r);if(c){if(c===h)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===u)throw n=l,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=f;var p=tryCatch(t,e,r);if("normal"===p.type){if(n=r.done?l:s,p.arg===h)continue;return{value:p.arg,done:r.done}}"throw"===p.type&&(n=l,r.method="throw",r.arg=p.arg)}}}(t,r,a),i}function tryCatch(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=wrap;var u="suspendedStart",s="suspendedYield",f="executing",l="completed",h={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var p={};p[i]=function(){return this};var v=Object.getPrototypeOf,d=v&&v(v(values([])));d&&d!==r&&n.call(d,i)&&(p=d);var g=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(p);function defineIteratorMethods(t){["next","throw","return"].forEach((function(e){define(t,e,(function(t){return this._invoke(e,t)}))}))}function AsyncIterator(t,e){var r;this._invoke=function enqueue(o,i){function callInvokeWithMethodAndArg(){return new e((function(r,a){!function invoke(r,o,i,a){var c=tryCatch(t[r],t,o);if("throw"!==c.type){var u=c.arg,s=u.value;return s&&"object"===_typeof(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){invoke("next",t,i,a)}),(function(t){invoke("throw",t,i,a)})):e.resolve(s).then((function(t){u.value=t,i(u)}),(function(t){return invoke("throw",t,i,a)}))}a(c.arg)}(o,i,r,a)}))}return r=r?r.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}}function maybeInvokeDelegate(t,r){var n=t.iterator[r.method];if(n===e){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=e,maybeInvokeDelegate(t,r),"throw"===r.method))return h;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var o=tryCatch(n,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,h;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,h):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,h)}function pushTryEntry(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function resetTryEntry(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(t){if(t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function next(){for(;++o<t.length;)if(n.call(t,o))return next.value=t[o],next.done=!1,next;return next.value=e,next.done=!0,next};return a.next=a}}return{next:doneResult}}function doneResult(){return{value:e,done:!0}}return GeneratorFunction.prototype=g.constructor=GeneratorFunctionPrototype,GeneratorFunctionPrototype.constructor=GeneratorFunction,GeneratorFunction.displayName=define(GeneratorFunctionPrototype,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===GeneratorFunction||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,c,"GeneratorFunction")),t.prototype=Object.create(g),t},t.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),AsyncIterator.prototype[a]=function(){return this},t.AsyncIterator=AsyncIterator,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new AsyncIterator(wrap(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},defineIteratorMethods(g),define(g,c,"Generator"),g[i]=function(){return this},g.toString=function(){return"[object Generator]"},t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function next(){for(;e.length;){var r=e.pop();if(r in t)return next.value=r,next.done=!1,next}return next.done=!0,next}},t.values=values,Context.prototype={constructor:Context,reset:function reset(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(resetTryEntry),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function dispatchException(t){if(this.done)throw t;var r=this;function handle(n,o){return a.type="throw",a.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return handle("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return handle(i.catchLoc,!0);if(this.prev<i.finallyLoc)return handle(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return handle(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return handle(i.finallyLoc)}}}},abrupt:function abrupt(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(a)},complete:function complete(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),h},finish:function finish(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),resetTryEntry(r),h}},catch:function _catch(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;resetTryEntry(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(t,r,n){return this.delegate={iterator:values(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),h}},t}(t.exports);try{regeneratorRuntime=e}catch(t){Function("r","regeneratorRuntime = r")(e)}}));var Ni=wellKnownSymbol("isConcatSpreadable"),qi=po>=51||!fails((function(){var t=[];return t[Ni]=!1,t.concat()[0]!==t})),Bi=arrayMethodHasSpeciesSupport("concat"),isConcatSpreadable=function(t){if(!isObject(t))return!1;var e=t[Ni];return void 0!==e?!!e:at(t)};_export({target:"Array",proto:!0,forced:!qi||!Bi},{concat:function concat(t){var e,r,n,o,i,a=toObject(this),c=arraySpeciesCreate(a,0),u=0;for(e=-1,n=arguments.length;e<n;e++)if(isConcatSpreadable(i=-1===e?a:arguments[e])){if(u+(o=toLength(i.length))>9007199254740991)throw TypeError("Maximum allowed index exceeded");for(r=0;r<o;r++,u++)r in i&&createProperty(c,u,i[r])}else{if(u>=9007199254740991)throw TypeError("Maximum allowed index exceeded");createProperty(c,u++,i)}return c.length=u,c}});var Di=vt.find,$i=!0,Vi=arrayMethodUsesToLength("find");"find"in[]&&Array(1).find((function(){$i=!1})),_export({target:"Array",proto:!0,forced:$i||!Vi},{find:function find(t){return Di(this,t,arguments.length>1?arguments[1]:void 0)}}),addToUnscopables("find");var Wi=[].join,Ki=u!=Object,Yi=arrayMethodIsStrict("join",",");_export({target:"Array",proto:!0,forced:Ki||!Yi},{join:function join(t){return Wi.call(toIndexedObject(this),void 0===t?",":t)}});var zi=vt.some,Hi=arrayMethodIsStrict("some"),Ji=arrayMethodUsesToLength("some");_export({target:"Array",proto:!0,forced:!Hi||!Ji},{some:function some(t){return zi(this,t,arguments.length>1?arguments[1]:void 0)}});var Xi=[].push,Qi=Math.min,Zi=!fails((function(){return!RegExp(4294967295,"y")}));fixRegexpWellKnownSymbolLogic("split",2,(function(t,e,r){var n;return n="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(t,r){var n=String(requireObjectCoercible(this)),o=void 0===r?4294967295:r>>>0;if(0===o)return[];if(void 0===t)return[n];if(!isRegexp(t))return e.call(n,t,o);for(var i,a,c,u=[],s=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),f=0,l=new RegExp(t.source,s+"g");(i=ge.call(l,n))&&!((a=l.lastIndex)>f&&(u.push(n.slice(f,i.index)),i.length>1&&i.index<n.length&&Xi.apply(u,i.slice(1)),c=i[0].length,f=a,u.length>=o));)l.lastIndex===i.index&&l.lastIndex++;return f===n.length?!c&&l.test("")||u.push(""):u.push(n.slice(f)),u.length>o?u.slice(0,o):u}:"0".split(void 0,0).length?function(t,r){return void 0===t&&0===r?[]:e.call(this,t,r)}:e,[function split(e,r){var o=requireObjectCoercible(this),i=null==e?void 0:e[t];return void 0!==i?i.call(e,o,r):n.call(String(o),e,r)},function(t,o){var i=r(n,t,this,o,n!==e);if(i.done)return i.value;var a=anObject(t),c=String(this),u=speciesConstructor(a,RegExp),s=a.unicode,f=(a.ignoreCase?"i":"")+(a.multiline?"m":"")+(a.unicode?"u":"")+(Zi?"y":"g"),l=new u(Zi?a:"^(?:"+a.source+")",f),h=void 0===o?4294967295:o>>>0;if(0===h)return[];if(0===c.length)return null===regexpExecAbstract(l,c)?[c]:[];for(var p=0,v=0,d=[];v<c.length;){l.lastIndex=Zi?v:0;var g,y=regexpExecAbstract(l,Zi?c:c.slice(v));if(null===y||(g=Qi(toLength(l.lastIndex+(Zi?0:v)),c.length))===p)v=advanceStringIndex(c,v,s);else{if(d.push(c.slice(p,v)),d.length===h)return d;for(var m=1;m<=y.length-1;m++)if(d.push(y[m]),d.length===h)return d;v=p=g}}return d.push(c.slice(p)),d}]}),!Zi);var ta="\t\n\v\f\r    \u2028\u2029\ufeff",ea="["+ta+"]",ra=RegExp("^"+ea+ea+"*"),na=RegExp(ea+ea+"*$"),createMethod$4=function(t){return function(e){var r=String(requireObjectCoercible(e));return 1&t&&(r=r.replace(ra,"")),2&t&&(r=r.replace(na,"")),r}},oa={start:createMethod$4(1),end:createMethod$4(2),trim:createMethod$4(3)},ia=oa.trim;_export({target:"String",proto:!0,forced:function(t){return fails((function(){return!!ta[t]()||"…"!="…"[t]()||ta[t].name!==t}))}("trim")},{trim:function trim(){return ia(this)}});var aa=/"/g;_export({target:"String",proto:!0,forced:function(t){return fails((function(){var e=""[t]('"');return e!==e.toLowerCase()||e.split('"').length>3}))}("bold")},{bold:function bold(){return t="b",e="",r="",n=String(requireObjectCoercible(this)),o="<"+t,""!==e&&(o+=" "+e+'="'+String(r).replace(aa,"&quot;")+'"'),o+">"+n+"</"+t+">";var t,e,r,n,o}});
/**
* Localizing script for SVG-edit UI.
* @module locale
* @license MIT
*
* @copyright 2010 Narendra Sisodya
* @copyright 2010 Alexis Deveria
*
*/
jQuery;var ca=function(){var t=_asyncToGenerator(regeneratorRuntime.mark((function _callee2(t,e){var r;return regeneratorRuntime.wrap((function _callee2$(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,import("./extensions/ext-".concat(t,"/locale/").concat(e,".js"));case 3:r=n.sent,n.next=12;break;case 6:return n.prev=6,n.t0=n.catch(0),console.error("Missing translation (".concat(e,") for extension ").concat(t," - using 'en'")),n.next=11,import("./extensions/ext-".concat(t,"/locale/en.js"));case 11:r=n.sent;case 12:return n.abrupt("return",r.default);case 13:case"end":return n.stop()}}),_callee2,null,[[0,6]])})));return function loadExtensionTranslation(e,r){return t.apply(this,arguments)}}(),ua={name:"storage",init:function init(t){var e=t.$,r=this,n=r.canvas,o=r.curConfig,i=o.emptyStorageOnDecline,a=o.noStorageOnLoad,c=o.forceStorage,u=r.storage,s=r.updateCanvas;function replaceStoragePrompt(t){t=t?"storagePrompt="+t:"";var e=top.location;e.href.includes("storagePrompt=")?e.href=e.href.replace(/([&?])storagePrompt=[^&]*(&?)/,(function(e,r,n){return(t?r:"")+t+(!t&&n?r:n||"")})):e.href+=(e.href.includes("?")?"&":"?")+t}function setSVGContentStorage(t){if(u){var e="svgedit-"+r.curConfig.canvasName;t?u.setItem(e,t):u.removeItem(e)}}function expireCookie(t){document.cookie=encodeURIComponent(t)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT"}function setupBeforeUnloadListener(){window.addEventListener("beforeunload",(function(t){if(document.cookie.match(/(?:^|;\s*)svgeditstore=(?:prefsAndContent|prefsOnly)/)){document.cookie.match(/(?:^|;\s*)svgeditstore=prefsAndContent/)&&setSVGContentStorage(n.getSvgString()),r.setConfig({no_save_warning:!0});var e=r.curPrefs;Object.entries(e).forEach((function(t){var e=_slicedToArray(t,2),r=e[0],n=e[1];r="svg-edit-"+r,void 0!==n&&(u?u.setItem(r,n):window.widget?window.widget.setPreferenceForKey(n,r):(n=encodeURIComponent(n),document.cookie=encodeURIComponent(r)+"="+n+"; expires=Fri, 31 Dec 9999 23:59:59 GMT"))}))}}))}var f=!1;return{name:"storage",langReady:function langReady(t){return _asyncToGenerator(regeneratorRuntime.mark((function _callee(){var n,o,l,h,p,v,d,g,y,m,b,w,S,x,E,O,P,A;return regeneratorRuntime.wrap((function _callee$(j){for(;;)switch(j.prev=j.next){case 0:return t.lang,n=new URL(top.location).searchParams.get("storagePrompt"),j.next=4,ca("storage",r.curPrefs.lang);case 4:if(o=j.sent,l=o.message,h=o.storagePrefsAndContent,p=o.storagePrefsOnly,v=o.storagePrefs,d=o.storageNoPrefsOrContent,g=o.storageNoPrefs,y=o.rememberLabel,m=o.rememberTooltip,!f){j.next=8;break}return j.abrupt("return");case 8:if(f=!0,c||"true"!==n&&("false"===n||document.cookie.match(/(?:^|;\s*)svgeditstore=(?:prefsAndContent|prefsOnly)/))){j.next=44;break}return b=[],u?b.unshift({value:"prefsAndContent",text:h},{value:"prefsOnly",text:p},{value:"noPrefsOrContent",text:d}):b.unshift({value:"prefsOnly",text:v},{value:"noPrefsOrContent",text:g}),w=e("#dialog_container")[0].style.width,S=e("#dialog_container")[0].style.marginLeft,x=e("#dialog_content")[0].style.height,E=e("#dialog_container")[0].style.height,e("#dialog_content")[0].style.height="120px",e("#dialog_container")[0].style.height="170px",e("#dialog_container")[0].style.width="800px",e("#dialog_container")[0].style.marginLeft="-400px",r.storagePromptState="waiting",j.next=20,e.select(l,b,null,null,{label:y,checked:!0,tooltip:m});case 20:if(O=j.sent,P=O.response,A=O.checked,!P||"noPrefsOrContent"===P){j.next=30;break}if(document.cookie="svgeditstore="+encodeURIComponent(P)+"; expires=Fri, 31 Dec 9999 23:59:59 GMT","true"!==n||!A){j.next=28;break}return replaceStoragePrompt(),j.abrupt("return");case 28:j.next=35;break;case 30:if(expireCookie("svgeditstore"),P&&i&&(setSVGContentStorage(""),Object.keys(r.curPrefs).forEach((function(t){t="svg-edit-"+t,u&&u.removeItem(t),expireCookie(t)}))),!P||!A){j.next=35;break}return replaceStoragePrompt("false"),j.abrupt("return");case 35:e("#dialog_container")[0].style.width=w,e("#dialog_container")[0].style.marginLeft=S,e("#dialog_content")[0].style.height=x,e("#dialog_container")[0].style.height=E,setupBeforeUnloadListener(),r.storagePromptState="closed",s(!0),j.next=45;break;case 44:a&&!c||setupBeforeUnloadListener();case 45:case"end":return j.stop()}}),_callee)})))()}}}};export default ua;
//# sourceMappingURL=ext-storage.js.map