Files
svgedit/dist/editor/system/extensions/ext-storage/ext-storage.js
2020-09-09 01:35:47 +02:00

22 lines
70 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
System.register([],(function(t,e){"use strict";return{execute:function(){var r="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},n=check("object"==typeof globalThis&&globalThis)||check("object"==typeof window&&window)||check("object"==typeof self&&self)||check("object"==typeof r&&r)||Function("return this")(),fails=function(t){try{return!!t()}catch(t){return!0}},o=!fails((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),i={}.propertyIsEnumerable,a=Object.getOwnPropertyDescriptor,c={f:a&&!i.call({1:2},1)?function propertyIsEnumerable(t){var e=a(this,t);return!!e&&e.enumerable}:i},createPropertyDescriptor=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},u={}.toString,classofRaw=function(t){return u.call(t).slice(8,-1)},s="".split,f=fails((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==classofRaw(t)?s.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 f(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")},l={}.hasOwnProperty,has=function(t,e){return l.call(t,e)},h=n.document,p=isObject(h)&&isObject(h.createElement),documentCreateElement=function(t){return p?h.createElement(t):{}},v=!o&&!fails((function(){return 7!=Object.defineProperty(documentCreateElement("div"),"a",{get:function(){return 7}}).a})),y=Object.getOwnPropertyDescriptor,d={f:o?y:function getOwnPropertyDescriptor(t,e){if(t=toIndexedObject(t),e=toPrimitive(e,!0),v)try{return y(t,e)}catch(t){}if(has(t,e))return createPropertyDescriptor(!c.f.call(t,e),t[e])}},anObject=function(t){if(!isObject(t))throw TypeError(String(t)+" is not an object");return t},g=Object.defineProperty,m={f:o?g:function defineProperty(t,e,r){if(anObject(t),e=toPrimitive(e,!0),anObject(r),v)try{return g(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}},b=o?function(t,e,r){return m.f(t,e,createPropertyDescriptor(1,r))}:function(t,e,r){return t[e]=r,t},setGlobal=function(t,e){try{b(n,t,e)}catch(r){n[t]=e}return e},w="__core-js_shared__",S=n[w]||setGlobal(w,{}),x=Function.toString;"function"!=typeof S.inspectSource&&(S.inspectSource=function(t){return x.call(t)});var E,O,P,A=S.inspectSource,L=n.WeakMap,k="function"==typeof L&&/native code/.test(A(L)),j=createCommonjsModule((function(t){(t.exports=function(t,e){return S[t]||(S[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.6.5",mode:"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})})),R=0,I=Math.random(),uid=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++R+I).toString(36)},T=j("keys"),sharedKey=function(t){return T[t]||(T[t]=uid(t))},_={},C=n.WeakMap;if(k){var U=new C,M=U.get,G=U.has,N=U.set;E=function(t,e){return N.call(U,t,e),e},O=function(t){return M.call(U,t)||{}},P=function(t){return G.call(U,t)}}else{var q=sharedKey("state");_[q]=!0,E=function(t,e){return b(t,q,e),e},O=function(t){return has(t,q)?t[q]:{}},P=function(t){return has(t,q)}}var B={set:E,get:O,has:P,enforce:function(t){return P(t)?O(t):E(t,{})},getterFor:function(t){return function(e){var r;if(!isObject(e)||(r=O(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return r}}},D=createCommonjsModule((function(t){var e=B.get,r=B.enforce,o=String(String).split("String");(t.exports=function(t,e,i,a){var c=!!a&&!!a.unsafe,u=!!a&&!!a.enumerable,s=!!a&&!!a.noTargetGet;"function"==typeof i&&("string"!=typeof e||has(i,"name")||b(i,"name",e),r(i).source=o.join("string"==typeof e?e:"")),t!==n?(c?!s&&t[e]&&(u=!0):delete t[e],u?t[e]=i:b(t,e,i)):u?t[e]=i:setGlobal(e,i)})(Function.prototype,"toString",(function toString(){return"function"==typeof this&&e(this).source||A(this)}))})),$=n,aFunction=function(t){return"function"==typeof t?t:void 0},getBuiltIn=function(t,e){return arguments.length<2?aFunction($[t])||aFunction(n[t]):$[t]&&$[t][e]||n[t]&&n[t][e]},V=Math.ceil,W=Math.floor,toInteger=function(t){return isNaN(t=+t)?0:(t>0?W:V)(t)},K=Math.min,toLength=function(t){return t>0?K(toInteger(t),9007199254740991):0},Y=Math.max,z=Math.min,toAbsoluteIndex=function(t,e){var r=toInteger(t);return r<0?Y(r+e,0):z(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}},H={includes:createMethod(!0),indexOf:createMethod(!1)},J=H.indexOf,objectKeysInternal=function(t,e){var r,n=toIndexedObject(t),o=0,i=[];for(r in n)!has(_,r)&&has(n,r)&&i.push(r);for(;e.length>o;)has(n,r=e[o++])&&(~J(i,r)||i.push(r));return i},X=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Z=X.concat("length","prototype"),Q={f:Object.getOwnPropertyNames||function getOwnPropertyNames(t){return objectKeysInternal(t,Z)}},tt={f:Object.getOwnPropertySymbols},et=getBuiltIn("Reflect","ownKeys")||function ownKeys(t){var e=Q.f(anObject(t)),r=tt.f;return r?e.concat(r(t)):e},copyConstructorProperties=function(t,e){for(var r=et(e),n=m.f,o=d.f,i=0;i<r.length;i++){var a=r[i];has(t,a)||n(t,a,o(e,a))}},rt=/#|\.prototype\./,isForced=function(t,e){var r=ot[nt(t)];return r==at||r!=it&&("function"==typeof e?fails(e):!!e)},nt=isForced.normalize=function(t){return String(t).replace(rt,".").toLowerCase()},ot=isForced.data={},it=isForced.NATIVE="N",at=isForced.POLYFILL="P",ct=isForced,ut=d.f,_export=function(t,e){var r,o,i,a,c,u=t.target,s=t.global,f=t.stat;if(r=s?n:f?n[u]||setGlobal(u,{}):(n[u]||{}).prototype)for(o in e){if(a=e[o],i=t.noTargetGet?(c=ut(r,o))&&c.value:r[o],!ct(s?o:u+(f?".":"#")+o,t.forced)&&void 0!==i){if(typeof a==typeof i)continue;copyConstructorProperties(a,i)}(t.sham||i&&i.sham)&&b(a,"sham",!0),D(r,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))},st=Array.isArray||function isArray(t){return"Array"==classofRaw(t)},ft=!!Object.getOwnPropertySymbols&&!fails((function(){return!String(Symbol())})),lt=ft&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,ht=j("wks"),pt=n.Symbol,vt=lt?pt:pt&&pt.withoutSetter||uid,wellKnownSymbol=function(t){return has(ht,t)||(ft&&has(pt,t)?ht[t]=pt[t]:ht[t]=vt("Symbol."+t)),ht[t]},yt=wellKnownSymbol("species"),arraySpeciesCreate=function(t,e){var r;return st(t)&&("function"!=typeof(r=t.constructor)||r!==Array&&!st(r.prototype)?isObject(r)&&null===(r=r[yt])&&(r=void 0):r=void 0),new(void 0===r?Array:r)(0===e?0:e)},dt=[].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,u,s,l){for(var h,p,v=toObject(c),y=f(v),d=functionBindContext(u,s,3),g=toLength(y.length),m=0,b=l||arraySpeciesCreate,w=e?b(c,g):r?b(c,0):void 0;g>m;m++)if((a||m in y)&&(p=d(h=y[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:dt.call(w,h)}else if(o)return!1;return i?-1:n||o?o:w}},gt={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)},mt=Object.defineProperty,bt={},thrower=function(t){throw t},arrayMethodUsesToLength=function(t,e){if(has(bt,t))return bt[t];e||(e={});var r=[][t],n=!!has(e,"ACCESSORS")&&e.ACCESSORS,i=has(e,0)?e[0]:thrower,a=has(e,1)?e[1]:void 0;return bt[t]=!!r&&!fails((function(){if(n&&!o)return!0;var t={length:-1};n?mt(t,1,{enumerable:!0,get:thrower}):t[1]=1,r.call(t,i,a)}))},wt=gt.forEach,St=function(t,e){var r=[][t];return!!r&&fails((function(){r.call(null,e||function(){throw 1},1)}))}("forEach"),xt=arrayMethodUsesToLength("forEach"),Et=St&&xt?[].forEach:function forEach(t){return wt(this,t,arguments.length>1?arguments[1]:void 0)};_export({target:"Array",proto:!0,forced:[].forEach!=Et},{forEach:Et});var Ot,Pt=Object.keys||function keys(t){return objectKeysInternal(t,X)},At=o?Object.defineProperties:function defineProperties(t,e){anObject(t);for(var r,n=Pt(e),o=n.length,i=0;o>i;)m.f(t,r=n[i++],e[r]);return t},Lt=getBuiltIn("document","documentElement"),kt=sharedKey("IE_PROTO"),EmptyConstructor=function(){},scriptTag=function(t){return"<script>"+t+"</"+"script>"},NullProtoObject=function(){try{Ot=document.domain&&new ActiveXObject("htmlfile")}catch(t){}var t,e;NullProtoObject=Ot?function(t){t.write(scriptTag("")),t.close();var e=t.parentWindow.Object;return t=null,e}(Ot):((e=documentCreateElement("iframe")).style.display="none",Lt.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(scriptTag("document.F=Object")),t.close(),t.F);for(var r=X.length;r--;)delete NullProtoObject.prototype[X[r]];return NullProtoObject()};_[kt]=!0;var jt=Object.create||function create(t,e){var r;return null!==t?(EmptyConstructor.prototype=anObject(t),r=new EmptyConstructor,EmptyConstructor.prototype=null,r[kt]=t):r=NullProtoObject(),void 0===e?r:At(r,e)},Rt=wellKnownSymbol("unscopables"),It=Array.prototype;null==It[Rt]&&m.f(It,Rt,{configurable:!0,value:jt(null)});var addToUnscopables=function(t){It[Rt][t]=!0},Tt=H.includes,_t=arrayMethodUsesToLength("indexOf",{ACCESSORS:!0,1:0});_export({target:"Array",proto:!0,forced:!_t},{includes:function includes(t){return Tt(this,t,arguments.length>1?arguments[1]:void 0)}}),addToUnscopables("includes");var Ct,Ut,Ft,Mt={},Gt=!fails((function(){function F(){}return F.prototype.constructor=null,Object.getPrototypeOf(new F)!==F.prototype})),Nt=sharedKey("IE_PROTO"),qt=Object.prototype,Bt=Gt?Object.getPrototypeOf:function(t){return t=toObject(t),has(t,Nt)?t[Nt]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?qt:null},Dt=wellKnownSymbol("iterator"),$t=!1;[].keys&&("next"in(Ft=[].keys())?(Ut=Bt(Bt(Ft)))!==Object.prototype&&(Ct=Ut):$t=!0),null==Ct&&(Ct={}),has(Ct,Dt)||b(Ct,Dt,(function(){return this}));var Vt={IteratorPrototype:Ct,BUGGY_SAFARI_ITERATORS:$t},Wt=m.f,Kt=wellKnownSymbol("toStringTag"),setToStringTag=function(t,e,r){t&&!has(t=r?t:t.prototype,Kt)&&Wt(t,Kt,{configurable:!0,value:e})},Yt=Vt.IteratorPrototype,returnThis$1=function(){return this},createIteratorConstructor=function(t,e,r){var n=e+" Iterator";return t.prototype=jt(Yt,{next:createPropertyDescriptor(1,r)}),setToStringTag(t,n,!1),Mt[n]=returnThis$1,t},zt=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),Ht=Vt.IteratorPrototype,Jt=Vt.BUGGY_SAFARI_ITERATORS,Xt=wellKnownSymbol("iterator"),Zt="keys",Qt="values",te="entries",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(!Jt&&t in h)return h[t];switch(t){case Zt:return function keys(){return new r(this,t)};case Qt:return function values(){return new r(this,t)};case te:return function entries(){return new r(this,t)}}return function(){return new r(this)}},f=e+" Iterator",l=!1,h=t.prototype,p=h[Xt]||h["@@iterator"]||o&&h[o],v=!Jt&&p||getIterationMethod(o),y="Array"==e&&h.entries||p;if(y&&(c=Bt(y.call(new t)),Ht!==Object.prototype&&c.next&&(Bt(c)!==Ht&&(zt?zt(c,Ht):"function"!=typeof c[Xt]&&b(c,Xt,returnThis$2)),setToStringTag(c,f,!0))),o==Qt&&p&&p.name!==Qt&&(l=!0,v=function values(){return p.call(this)}),h[Xt]!==v&&b(h,Xt,v),Mt[e]=v,o)if(u={values:getIterationMethod(Qt),keys:i?v:getIterationMethod(Zt),entries:getIterationMethod(te)},a)for(s in u)(Jt||l||!(s in h))&&D(h,s,u[s]);else _export({target:e,proto:!0,forced:Jt||l},u);return u},ee="Array Iterator",re=B.set,ne=B.getterFor(ee),oe=defineIterator(Array,"Array",(function(t,e){re(this,{type:ee,target:toIndexedObject(t),index:0,kind:e})}),(function(){var t=ne(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");Mt.Arguments=Mt.Array,addToUnscopables("keys"),addToUnscopables("values"),addToUnscopables("entries");var ie=c.f,createMethod$2=function(t){return function(e){for(var r,n=toIndexedObject(e),i=Pt(n),a=i.length,c=0,u=[];a>c;)r=i[c++],o&&!ie.call(n,r)||u.push(t?[r,n[r]]:n[r]);return u}},ae={entries:createMethod$2(!0),values:createMethod$2(!1)}.entries;_export({target:"Object",stat:!0},{entries:function entries(t){return ae(t)}});var ce=fails((function(){Pt(1)}));_export({target:"Object",stat:!0,forced:ce},{keys:function keys(t){return Pt(toObject(t))}});var ue={};ue[wellKnownSymbol("toStringTag")]="z";var se="[object z]"===String(ue),fe=wellKnownSymbol("toStringTag"),le="Arguments"==classofRaw(function(){return arguments}()),he=se?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),fe))?r:le?classofRaw(e):"Object"==(n=classofRaw(e))&&"function"==typeof e.callee?"Arguments":n},pe=se?{}.toString:function toString(){return"[object "+he(this)+"]"};se||D(Object.prototype,"toString",pe,{unsafe:!0});var ve=n.Promise,redefineAll=function(t,e,r){for(var n in e)D(t,n,e[n],r);return t},ye=wellKnownSymbol("species"),anInstance=function(t,e,r){if(!(t instanceof e))throw TypeError("Incorrect "+(r?r+" ":"")+"invocation");return t},de=wellKnownSymbol("iterator"),ge=Array.prototype,isArrayIteratorMethod=function(t){return void 0!==t&&(Mt.Array===t||ge[de]===t)},me=wellKnownSymbol("iterator"),getIteratorMethod=function(t){if(null!=t)return t[me]||t["@@iterator"]||Mt[he(t)]},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}},be=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)}})),we=wellKnownSymbol("iterator"),Se=!1;try{var xe=0,Ee={next:function(){return{done:!!xe++}},return:function(){Se=!0}};Ee[we]=function(){return this},Array.from(Ee,(function(){throw 2}))}catch(t){}var Oe,Pe,Ae,Le=wellKnownSymbol("species"),ke=getBuiltIn("navigator","userAgent")||"",je=/(iphone|ipod|ipad).*applewebkit/i.test(ke),Re=n.location,Ie=n.setImmediate,Te=n.clearImmediate,_e=n.process,Ce=n.MessageChannel,Ue=n.Dispatch,Fe=0,Me={},Ge="onreadystatechange",run=function(t){if(Me.hasOwnProperty(t)){var e=Me[t];delete Me[t],e()}},runner=function(t){return function(){run(t)}},listener=function(t){run(t.data)},post=function(t){n.postMessage(t+"",Re.protocol+"//"+Re.host)};Ie&&Te||(Ie=function setImmediate(t){for(var e=[],r=1;arguments.length>r;)e.push(arguments[r++]);return Me[++Fe]=function(){("function"==typeof t?t:Function(t)).apply(void 0,e)},Oe(Fe),Fe},Te=function clearImmediate(t){delete Me[t]},"process"==classofRaw(_e)?Oe=function(t){_e.nextTick(runner(t))}:Ue&&Ue.now?Oe=function(t){Ue.now(runner(t))}:Ce&&!je?(Ae=(Pe=new Ce).port2,Pe.port1.onmessage=listener,Oe=functionBindContext(Ae.postMessage,Ae,1)):!n.addEventListener||"function"!=typeof postMessage||n.importScripts||fails(post)||"file:"===Re.protocol?Oe=Ge in documentCreateElement("script")?function(t){Lt.appendChild(documentCreateElement("script")).onreadystatechange=function(){Lt.removeChild(this),run(t)}}:function(t){setTimeout(runner(t),0)}:(Oe=post,n.addEventListener("message",listener,!1)));var Ne,qe,Be,De,$e,Ve,We,Ke,Ye={set:Ie,clear:Te},ze=d.f,He=Ye.set,Je=n.MutationObserver||n.WebKitMutationObserver,Xe=n.process,Ze=n.Promise,Qe="process"==classofRaw(Xe),tr=ze(n,"queueMicrotask"),er=tr&&tr.value;er||(Ne=function(){var t,e;for(Qe&&(t=Xe.domain)&&t.exit();qe;){e=qe.fn,qe=qe.next;try{e()}catch(t){throw qe?De():Be=void 0,t}}Be=void 0,t&&t.enter()},Qe?De=function(){Xe.nextTick(Ne)}:Je&&!je?($e=!0,Ve=document.createTextNode(""),new Je(Ne).observe(Ve,{characterData:!0}),De=function(){Ve.data=$e=!$e}):Ze&&Ze.resolve?(We=Ze.resolve(void 0),Ke=We.then,De=function(){Ke.call(We,Ne)}):De=function(){He.call(n,Ne)});var rr,nr,or=er||function(t){var e={fn:t,next:void 0};Be&&(Be.next=e),qe||(qe=e,De()),Be=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)},ir={f:function(t){return new PromiseCapability(t)}},promiseResolve=function(t,e){if(anObject(t),isObject(e)&&e.constructor===t)return e;var r=ir.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}}},ar=n.process,cr=ar&&ar.versions,ur=cr&&cr.v8;ur?nr=(rr=ur.split("."))[0]+rr[1]:ke&&(!(rr=ke.match(/Edge\/(\d+)/))||rr[1]>=74)&&(rr=ke.match(/Chrome\/(\d+)/))&&(nr=rr[1]);var sr,fr,lr,hr,pr=nr&&+nr,vr=Ye.set,yr=wellKnownSymbol("species"),dr="Promise",gr=B.get,mr=B.set,br=B.getterFor(dr),wr=ve,Sr=n.TypeError,xr=n.document,Er=n.process,Or=getBuiltIn("fetch"),Pr=ir.f,Ar=Pr,Lr="process"==classofRaw(Er),kr=!!(xr&&xr.createEvent&&n.dispatchEvent),jr="unhandledrejection",Rr=ct(dr,(function(){if(!(A(wr)!==String(wr))){if(66===pr)return!0;if(!Lr&&"function"!=typeof PromiseRejectionEvent)return!0}if(pr>=51&&/native code/.test(wr))return!1;var t=wr.resolve(1),FakePromise=function(t){t((function(){}),(function(){}))};return(t.constructor={})[yr]=FakePromise,!(t.then((function(){}))instanceof FakePromise)})),Ir=Rr||!function(t,e){if(!e&&!Se)return!1;var r=!1;try{var n={};n[we]=function(){return{next:function(){return{done:r=!0}}}},t(n)}catch(t){}return r}((function(t){wr.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;or((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(Sr("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,e,r){var o,i;kr?((o=xr.createEvent("Event")).promise=e,o.reason=r,o.initEvent(t,!1,!0),n.dispatchEvent(o)):o={promise:e,reason:r},(i=n["on"+t])?i(o):t===jr&&function(t,e){var r=n.console;r&&r.error&&(1===arguments.length?r.error(t):r.error(t,e))}("Unhandled promise rejection",r)},onUnhandled=function(t,e){vr.call(n,(function(){var r,n=e.value;if(isUnhandled(e)&&(r=perform((function(){Lr?Er.emit("unhandledRejection",n,t):dispatchEvent(jr,t,n)})),e.rejection=Lr||isUnhandled(e)?2:1,r.error))throw r.value}))},isUnhandled=function(t){return 1!==t.rejection&&!t.parent},onHandleUnhandled=function(t,e){vr.call(n,(function(){Lr?Er.emit("rejectionHandled",t):dispatchEvent("rejectionhandled",t,e.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 Sr("Promise can't be resolved itself");var o=isThenable(r);o?or((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)}}};Rr&&(wr=function Promise(t){anInstance(this,wr,dr),aFunction$1(t),sr.call(this);var e=gr(this);try{t(bind(internalResolve,this,e),bind(internalReject,this,e))}catch(t){internalReject(this,e,t)}},(sr=function Promise(t){mr(this,{type:dr,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=redefineAll(wr.prototype,{then:function then(t,e){var r,n,o,i=br(this),a=Pr((r=wr,void 0===(o=anObject(this).constructor)||null==(n=anObject(o)[Le])?r:aFunction$1(n)));return a.ok="function"!=typeof t||t,a.fail="function"==typeof e&&e,a.domain=Lr?Er.domain:void 0,i.parent=!0,i.reactions.push(a),0!=i.state&&notify$1(this,i,!1),a.promise},catch:function(t){return this.then(void 0,t)}}),fr=function(){var t=new sr,e=gr(t);this.promise=t,this.resolve=bind(internalResolve,t,e),this.reject=bind(internalReject,t,e)},ir.f=Pr=function(t){return t===wr||t===lr?new fr(t):Ar(t)},"function"==typeof ve&&(hr=ve.prototype.then,D(ve.prototype,"then",(function then(t,e){var r=this;return new wr((function(t,e){hr.call(r,t,e)})).then(t,e)}),{unsafe:!0}),"function"==typeof Or&&_export({global:!0,enumerable:!0,forced:!0},{fetch:function fetch(t){return promiseResolve(wr,Or.apply(n,arguments))}}))),_export({global:!0,wrap:!0,forced:Rr},{Promise:wr}),setToStringTag(wr,dr,!1),function(t){var e=getBuiltIn(t),r=m.f;o&&e&&!e[ye]&&r(e,ye,{configurable:!0,get:function(){return this}})}(dr),lr=getBuiltIn(dr),_export({target:dr,stat:!0,forced:Rr},{reject:function reject(t){var e=Pr(this);return e.reject.call(void 0,t),e.promise}}),_export({target:dr,stat:!0,forced:Rr},{resolve:function resolve(t){return promiseResolve(this,t)}}),_export({target:dr,stat:!0,forced:Ir},{all:function all(t){var e=this,r=Pr(e),n=r.resolve,o=r.reject,i=perform((function(){var r=aFunction$1(e.resolve),i=[],a=0,c=1;be(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=Pr(e),n=r.reject,o=perform((function(){var o=aFunction$1(e.resolve);be(t,(function(t){o.call(e,t).then(r.resolve,n)}))}));return o.error&&n(o.value),r.promise}});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 Tr,_r,Cr={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")}))},Ur=RegExp.prototype.exec,Fr=String.prototype.replace,Mr=Ur,Gr=(Tr=/a/,_r=/b*/g,Ur.call(Tr,"a"),Ur.call(_r,"a"),0!==Tr.lastIndex||0!==_r.lastIndex),Nr=Cr.UNSUPPORTED_Y||Cr.BROKEN_CARET,qr=void 0!==/()??/.exec("")[1];(Gr||qr||Nr)&&(Mr=function exec(t){var e,r,n,o,i=this,a=Nr&&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)),qr&&(r=new RegExp("^"+u+"$(?!\\s)",c)),Gr&&(e=i.lastIndex),n=Ur.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:Gr&&n&&(i.lastIndex=i.global?n.index+n[0].length:e),qr&&n&&n.length>1&&Fr.call(n[0],r,(function(){for(o=1;o<arguments.length-2;o++)void 0===arguments[o]&&(n[o]=void 0)})),n});var Br=Mr;_export({target:"RegExp",proto:!0,forced:/./.exec!==Br},{exec:Br});var Dr=wellKnownSymbol("match"),notARegexp=function(t){if(function(t){var e;return isObject(t)&&(void 0!==(e=t[Dr])?!!e:"RegExp"==classofRaw(t))}(t))throw TypeError("The method doesn't accept regular expressions");return t},$r=wellKnownSymbol("match");_export({target:"String",proto:!0,forced:!function(t){var e=/./;try{"/./"[t](e)}catch(r){try{return e[$r]=!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}},Vr={codeAt:createMethod$3(!1),charAt:createMethod$3(!0)},Wr=Vr.charAt,Kr="String Iterator",Yr=B.set,zr=B.getterFor(Kr);defineIterator(String,"String",(function(t){Yr(this,{type:Kr,string:String(t),index:0})}),(function next(){var t,e=zr(this),r=e.string,n=e.index;return n>=r.length?{value:void 0,done:!0}:(t=Wr(r,n),e.index+=t.length,{value:t,done:!1})}));var Hr=wellKnownSymbol("species"),Jr=!fails((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")})),Xr="$0"==="a".replace(/./,"$0"),Zr=wellKnownSymbol("replace"),Qr=!!/./[Zr]&&""===/./[Zr]("a","$0"),tn=!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[Hr]=function(){return r},r.flags="",r[o]=/./[o]),r.exec=function(){return e=!0,null},r[o](""),!e}));if(!i||!a||"replace"===t&&(!Jr||!Xr||Qr)||"split"===t&&!tn){var c=/./[o],u=r(o,""[t],(function(t,e,r,n,o){return e.exec===Br?i&&!o?{done:!0,value:c.call(e,r,n)}:{done:!0,value:t.call(r,e,n)}:{done:!1}}),{REPLACE_KEEPS_$0:Xr,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:Qr}),s=u[0],f=u[1];D(String.prototype,t,s),D(RegExp.prototype,o,2==e?function(t,e){return f.call(t,this,e)}:function(t){return f.call(t,this)})}n&&b(RegExp.prototype[o],"sham",!0)},en=Vr.charAt,advanceStringIndex=function(t,e,r){return e+(r?en(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 Br.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 rn=Math.max,nn=Math.min,on=Math.floor,an=/\$([$&'`]|\d\d?|<[^>]*>)/g,cn=/\$([$&'`]|\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 y,d="",g=0,m=0;m<p.length;m++){v=p[m];for(var b=String(v[0]),w=rn(nn(toInteger(v.index),s.length),0),S=[],x=1;x<v.length;x++)S.push(void 0===(y=v[x])?y:String(y));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>=g&&(d+=s.slice(g,w)+P,g=w+b.length)}return d+s.slice(g)}];function getSubstitution(t,r,n,o,i,a){var c=n+t.length,u=o.length,s=cn;return void 0!==i&&(i=toObject(i),s=an),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=on(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 un={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 sn in un){var fn=n[sn],ln=fn&&fn.prototype;if(ln&&ln.forEach!==Et)try{b(ln,"forEach",Et)}catch(t){ln.forEach=Et}}var hn=wellKnownSymbol("iterator"),pn=wellKnownSymbol("toStringTag"),vn=oe.values;for(var yn in un){var dn=n[yn],gn=dn&&dn.prototype;if(gn){if(gn[hn]!==vn)try{b(gn,hn,vn)}catch(t){gn[hn]=vn}if(gn[pn]||b(gn,pn,yn),un[yn])for(var mn in oe)if(gn[mn]!==oe[mn])try{b(gn,mn,oe[mn])}catch(t){gn[mn]=oe[mn]}}}var bn=wellKnownSymbol("iterator"),wn=!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[bn]||"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})),Sn=Object.assign,xn=Object.defineProperty,En=!Sn||fails((function(){if(o&&1!==Sn({b:1},Sn(xn({},"a",{enumerable:!0,get:function(){xn(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},r=Symbol(),n="abcdefghijklmnopqrst";return t[r]=7,n.split("").forEach((function(t){e[t]=t})),7!=Sn({},t)[r]||Pt(Sn({},e)).join("")!=n}))?function assign(t,e){for(var r=toObject(t),n=arguments.length,i=1,a=tt.f,u=c.f;n>i;)for(var s,l=f(arguments[i++]),h=a?Pt(l).concat(a(l)):Pt(l),p=h.length,v=0;p>v;)s=h[v++],o&&!u.call(l,s)||(r[s]=l[s]);return r}:Sn,createProperty=function(t,e,r){var n=toPrimitive(e);n in t?m.f(t,n,createPropertyDescriptor(0,r)):t[n]=r},On=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},Pn=2147483647,An=/[^\0-\u007E]/,Ln=/[.\u3002\uFF0E\uFF61]/g,kn="Overflow: input needs wider integers to process",jn=Math.floor,Rn=String.fromCharCode,digitToBasic=function(t){return t+22+75*(t<26)},adapt=function(t,e,r){var n=0;for(t=r?jn(t/700):t>>1,t+=jn(t/e);t>455;n+=36)t=jn(t/35);return jn(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(Rn(r));var u=n.length,s=u;for(u&&n.push("-");s<o;){var f=Pn;for(e=0;e<t.length;e++)(r=t[e])>=i&&r<f&&(f=r);var l=s+1;if(f-i>jn((Pn-a)/l))throw RangeError(kn);for(a+=(f-i)*l,i=f,e=0;e<t.length;e++){if((r=t[e])<i&&++a>Pn)throw RangeError(kn);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 y=h-v,d=36-v;n.push(Rn(digitToBasic(v+y%d))),h=jn(y/d)}n.push(Rn(digitToBasic(h))),c=adapt(a,l,s==u),a=0,++s}}++a,++i}return n.join("")},getIterator=function(t){var e=getIteratorMethod(t);if("function"!=typeof e)throw TypeError(String(t)+" is not iterable");return anObject(e.call(t))},In=getBuiltIn("fetch"),Tn=getBuiltIn("Headers"),_n=wellKnownSymbol("iterator"),Cn="URLSearchParams",Un="URLSearchParamsIterator",Fn=B.set,Mn=B.getterFor(Cn),Gn=B.getterFor(Un),Nn=/\+/g,qn=Array(4),percentSequence=function(t){return qn[t-1]||(qn[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(Nn," "),r=4;try{return decodeURIComponent(e)}catch(t){for(;r;)e=e.replace(percentSequence(r--),percentDecode);return e}},Bn=/[!'()~]|%20/g,Dn={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},replacer=function(t){return Dn[t]},serialize=function(t){return encodeURIComponent(t).replace(Bn,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")},$n=createIteratorConstructor((function Iterator(t,e){Fn(this,{type:Un,iterator:getIterator(Mn(t).entries),kind:e})}),"Iterator",(function next(){var t=Gn(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})),Vn=function URLSearchParams(){anInstance(this,Vn,Cn);var t,e,r,n,o,i,a,c,u,s=arguments.length>0?arguments[0]:void 0,f=this,l=[];if(Fn(f,{type:Cn,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+"")},Wn=Vn.prototype;redefineAll(Wn,{append:function append(t,e){validateArgumentsLength(arguments.length,2);var r=Mn(this);r.entries.push({key:t+"",value:e+""}),r.updateURL()},delete:function(t){validateArgumentsLength(arguments.length,1);for(var e=Mn(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=Mn(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=Mn(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=Mn(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=Mn(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=Mn(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=Mn(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 $n(this,"keys")},values:function values(){return new $n(this,"values")},entries:function entries(){return new $n(this,"entries")}},{enumerable:!0}),D(Wn,_n,Wn.entries),D(Wn,"toString",(function toString(){for(var t,e=Mn(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(Vn,Cn),_export({global:!0,forced:!wn},{URLSearchParams:Vn}),wn||"function"!=typeof In||"function"!=typeof Tn||_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,he(r)===Cn&&((n=e.headers?new Tn(e.headers):new Tn).has("content-type")||n.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"),e=jt(e,{body:createPropertyDescriptor(0,String(r)),headers:createPropertyDescriptor(0,n)}))),o.push(e)),In.apply(this,o)}});var Kn,Yn={URLSearchParams:Vn,getState:Mn},zn=Vr.codeAt,Hn=n.URL,Jn=Yn.URLSearchParams,Xn=Yn.getState,Zn=B.set,Qn=B.getterFor("URL"),to=Math.floor,eo=Math.pow,ro="Invalid scheme",no="Invalid host",oo="Invalid port",io=/[A-Za-z]/,ao=/[\d+-.A-Za-z]/,co=/\d/,uo=/^(0x|0X)/,so=/^[0-7]+$/,fo=/^\d+$/,lo=/^[\dA-Fa-f]+$/,ho=/[\u0000\u0009\u000A\u000D #%/:?@[\\]]/,po=/[\u0000\u0009\u000A\u000D #/:?@[\\]]/,vo=/^[\u0000-\u001F ]+|[\u0000-\u001F ]+$/g,yo=/[\u0009\u000A\u000D]/g,parseHost=function(t,e){var r,n,o;if("["==e.charAt(0)){if("]"!=e.charAt(e.length-1))return no;if(!(r=parseIPv6(e.slice(1,-1))))return no;t.host=r}else if(isSpecial(t)){if(e=function(t){var e,r,n=[],o=t.toLowerCase().replace(Ln,".").split(".");for(e=0;e<o.length;e++)r=o[e],n.push(An.test(r)?"xn--"+encode(r):r);return n.join(".")}(e),ho.test(e))return no;if(null===(r=parseIPv4(e)))return no;t.host=r}else{if(po.test(e))return no;for(r="",n=On(e),o=0;o<n.length;o++)r+=percentEncode(n[o],go);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=uo.test(o)?16:8,o=o.slice(8==i?1:2)),""===o)a=0;else{if(!(10==i?fo:8==i?so:lo).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>=eo(256,5-e))return null}else if(a>255)return null;for(c=r.pop(),n=0;n<r.length;n++)c+=r[n]*eo(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&&lo.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(!co.test(char()))return;for(;co.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=to(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},go={},mo=En({},go,{" ":1,'"':1,"<":1,">":1,"`":1}),bo=En({},mo,{"#":1,"?":1,"{":1,"}":1}),wo=En({},bo,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),percentEncode=function(t,e){var r=zn(t,0);return r>32&&r<127&&!has(e,t)?t:encodeURIComponent(t)},So={ftp:21,file:null,http:80,https:443,ws:80,wss:443},isSpecial=function(t){return has(So,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&&io.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()},xo={},Eo={},Oo={},Po={},Ao={},Lo={},ko={},jo={},Ro={},Io={},To={},_o={},Co={},Uo={},Fo={},Mo={},Go={},No={},qo={},Bo={},Do={},parseURL=function(t,e,r,n){var o,i,a,c,u,s=r||xo,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(vo,"")),e=e.replace(yo,""),o=On(e);f<=o.length;){switch(i=o[f],s){case xo:if(!i||!io.test(i)){if(r)return ro;s=Oo;continue}l+=i.toLowerCase(),s=Eo;break;case Eo:if(i&&(ao.test(i)||"+"==i||"-"==i||"."==i))l+=i.toLowerCase();else{if(":"!=i){if(r)return ro;l="",s=Oo,f=0;continue}if(r&&(isSpecial(t)!=has(So,l)||"file"==l&&(includesCredentials(t)||null!==t.port)||"file"==t.scheme&&!t.host))return;if(t.scheme=l,r)return void(isSpecial(t)&&So[t.scheme]==t.port&&(t.port=null));l="","file"==t.scheme?s=Uo:isSpecial(t)&&n&&n.scheme==t.scheme?s=Po:isSpecial(t)?s=jo:"/"==o[f+1]?(s=Ao,f++):(t.cannotBeABaseURL=!0,t.path.push(""),s=qo)}break;case Oo:if(!n||n.cannotBeABaseURL&&"#"!=i)return ro;if(n.cannotBeABaseURL&&"#"==i){t.scheme=n.scheme,t.path=n.path.slice(),t.query=n.query,t.fragment="",t.cannotBeABaseURL=!0,s=Do;break}s="file"==n.scheme?Uo:Lo;continue;case Po:if("/"!=i||"/"!=o[f+1]){s=Lo;continue}s=Ro,f++;break;case Ao:if("/"==i){s=Io;break}s=No;continue;case Lo:if(t.scheme=n.scheme,i==Kn)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=ko;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=Bo;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=No;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=Do}break;case ko:if(!isSpecial(t)||"/"!=i&&"\\"!=i){if("/"!=i){t.username=n.username,t.password=n.password,t.host=n.host,t.port=n.port,s=No;continue}s=Io}else s=Ro;break;case jo:if(s=Ro,"/"!=i||"/"!=l.charAt(f+1))continue;f++;break;case Ro:if("/"!=i&&"\\"!=i){s=Io;continue}break;case Io:if("@"==i){h&&(l="%40"+l),h=!0,a=On(l);for(var y=0;y<a.length;y++){var d=a[y];if(":"!=d||v){var g=percentEncode(d,wo);v?t.password+=g:t.username+=g}else v=!0}l=""}else if(i==Kn||"/"==i||"?"==i||"#"==i||"\\"==i&&isSpecial(t)){if(h&&""==l)return"Invalid authority";f-=On(l).length+1,l="",s=To}else l+=i;break;case To:case _o:if(r&&"file"==t.scheme){s=Mo;continue}if(":"!=i||p){if(i==Kn||"/"==i||"?"==i||"#"==i||"\\"==i&&isSpecial(t)){if(isSpecial(t)&&""==l)return no;if(r&&""==l&&(includesCredentials(t)||null!==t.port))return;if(c=parseHost(t,l))return c;if(l="",s=Go,r)return;continue}"["==i?p=!0:"]"==i&&(p=!1),l+=i}else{if(""==l)return no;if(c=parseHost(t,l))return c;if(l="",s=Co,r==_o)return}break;case Co:if(!co.test(i)){if(i==Kn||"/"==i||"?"==i||"#"==i||"\\"==i&&isSpecial(t)||r){if(""!=l){var m=parseInt(l,10);if(m>65535)return oo;t.port=isSpecial(t)&&m===So[t.scheme]?null:m,l=""}if(r)return;s=Go;continue}return oo}l+=i;break;case Uo:if(t.scheme="file","/"==i||"\\"==i)s=Fo;else{if(!n||"file"!=n.scheme){s=No;continue}if(i==Kn)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=Bo;else{if("#"!=i){startsWithWindowsDriveLetter(o.slice(f).join(""))||(t.host=n.host,t.path=n.path.slice(),shortenURLsPath(t)),s=No;continue}t.host=n.host,t.path=n.path.slice(),t.query=n.query,t.fragment="",s=Do}}break;case Fo:if("/"==i||"\\"==i){s=Mo;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=No;continue;case Mo:if(i==Kn||"/"==i||"\\"==i||"?"==i||"#"==i){if(!r&&isWindowsDriveLetter(l))s=No;else if(""==l){if(t.host="",r)return;s=Go}else{if(c=parseHost(t,l))return c;if("localhost"==t.host&&(t.host=""),r)return;l="",s=Go}continue}l+=i;break;case Go:if(isSpecial(t)){if(s=No,"/"!=i&&"\\"!=i)continue}else if(r||"?"!=i)if(r||"#"!=i){if(i!=Kn&&(s=No,"/"!=i))continue}else t.fragment="",s=Do;else t.query="",s=Bo;break;case No:if(i==Kn||"/"==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==Kn||"?"==i||"#"==i))for(;t.path.length>1&&""===t.path[0];)t.path.shift();"?"==i?(t.query="",s=Bo):"#"==i&&(t.fragment="",s=Do)}else l+=percentEncode(i,bo);break;case qo:"?"==i?(t.query="",s=Bo):"#"==i?(t.fragment="",s=Do):i!=Kn&&(t.path[0]+=percentEncode(i,go));break;case Bo:r||"#"!=i?i!=Kn&&("'"==i&&isSpecial(t)?t.query+="%27":t.query+="#"==i?"%23":percentEncode(i,go)):(t.fragment="",s=Do);break;case Do:i!=Kn&&(t.fragment+=percentEncode(i,mo))}f++}},$o=function URL(t){var e,r,n=anInstance(this,$o,"URL"),i=arguments.length>1?arguments[1]:void 0,a=String(t),c=Zn(n,{type:"URL"});if(void 0!==i)if(i instanceof $o)e=Qn(i);else if(r=parseURL(e={},String(i)))throw TypeError(r);if(r=parseURL(c,a,null,e))throw TypeError(r);var u=c.searchParams=new Jn,s=Xn(u);s.updateSearchParams(c.query),s.updateURL=function(){c.query=String(u)||null},o||(n.href=serializeURL.call(n),n.origin=getOrigin.call(n),n.protocol=getProtocol.call(n),n.username=getUsername.call(n),n.password=getPassword.call(n),n.host=getHost.call(n),n.hostname=getHostname.call(n),n.port=getPort.call(n),n.pathname=getPathname.call(n),n.search=getSearch.call(n),n.searchParams=getSearchParams.call(n),n.hash=getHash.call(n))},Vo=$o.prototype,serializeURL=function(){var t=Qn(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=Qn(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 Qn(this).scheme+":"},getUsername=function(){return Qn(this).username},getPassword=function(){return Qn(this).password},getHost=function(){var t=Qn(this),e=t.host,r=t.port;return null===e?"":null===r?serializeHost(e):serializeHost(e)+":"+r},getHostname=function(){var t=Qn(this).host;return null===t?"":serializeHost(t)},getPort=function(){var t=Qn(this).port;return null===t?"":String(t)},getPathname=function(){var t=Qn(this),e=t.path;return t.cannotBeABaseURL?e[0]:e.length?"/"+e.join("/"):""},getSearch=function(){var t=Qn(this).query;return t?"?"+t:""},getSearchParams=function(){return Qn(this).searchParams},getHash=function(){var t=Qn(this).fragment;return t?"#"+t:""},accessorDescriptor=function(t,e){return{get:t,set:e,configurable:!0,enumerable:!0}};if(o&&At(Vo,{href:accessorDescriptor(serializeURL,(function(t){var e=Qn(this),r=String(t),n=parseURL(e,r);if(n)throw TypeError(n);Xn(e.searchParams).updateSearchParams(e.query)})),origin:accessorDescriptor(getOrigin),protocol:accessorDescriptor(getProtocol,(function(t){var e=Qn(this);parseURL(e,String(t)+":",xo)})),username:accessorDescriptor(getUsername,(function(t){var e=Qn(this),r=On(String(t));if(!cannotHaveUsernamePasswordPort(e)){e.username="";for(var n=0;n<r.length;n++)e.username+=percentEncode(r[n],wo)}})),password:accessorDescriptor(getPassword,(function(t){var e=Qn(this),r=On(String(t));if(!cannotHaveUsernamePasswordPort(e)){e.password="";for(var n=0;n<r.length;n++)e.password+=percentEncode(r[n],wo)}})),host:accessorDescriptor(getHost,(function(t){var e=Qn(this);e.cannotBeABaseURL||parseURL(e,String(t),To)})),hostname:accessorDescriptor(getHostname,(function(t){var e=Qn(this);e.cannotBeABaseURL||parseURL(e,String(t),_o)})),port:accessorDescriptor(getPort,(function(t){var e=Qn(this);cannotHaveUsernamePasswordPort(e)||(""==(t=String(t))?e.port=null:parseURL(e,t,Co))})),pathname:accessorDescriptor(getPathname,(function(t){var e=Qn(this);e.cannotBeABaseURL||(e.path=[],parseURL(e,t+"",Go))})),search:accessorDescriptor(getSearch,(function(t){var e=Qn(this);""==(t=String(t))?e.query=null:("?"==t.charAt(0)&&(t=t.slice(1)),e.query="",parseURL(e,t,Bo)),Xn(e.searchParams).updateSearchParams(e.query)})),searchParams:accessorDescriptor(getSearchParams),hash:accessorDescriptor(getHash,(function(t){var e=Qn(this);""!=(t=String(t))?("#"==t.charAt(0)&&(t=t.slice(1)),e.fragment="",parseURL(e,t,Do)):e.fragment=null}))}),D(Vo,"toJSON",(function toJSON(){return serializeURL.call(this)}),{enumerable:!0}),D(Vo,"toString",(function toString(){return serializeURL.call(this)}),{enumerable:!0}),Hn){var Wo=Hn.createObjectURL,Ko=Hn.revokeObjectURL;Wo&&D($o,"createObjectURL",(function createObjectURL(t){return Wo.apply(Hn,arguments)})),Ko&&D($o,"revokeObjectURL",(function revokeObjectURL(t){return Ko.apply(Hn,arguments)}))}setToStringTag($o,"URL"),_export({global:!0,forced:!wn,sham:!o},{URL:$o});var Yo=Q.f,zo={}.toString,Ho="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],Jo={f:function getOwnPropertyNames(t){return Ho&&"[object Window]"==zo.call(t)?function(t){try{return Yo(t)}catch(t){return Ho.slice()}}(t):Yo(toIndexedObject(t))}},Xo={f:wellKnownSymbol},Zo=m.f,defineWellKnownSymbol=function(t){var e=$.Symbol||($.Symbol={});has(e,t)||Zo(e,t,{value:Xo.f(t)})},Qo=gt.forEach,ti=sharedKey("hidden"),ei="Symbol",ri=wellKnownSymbol("toPrimitive"),ni=B.set,oi=B.getterFor(ei),ii=Object.prototype,ai=n.Symbol,ci=getBuiltIn("JSON","stringify"),ui=d.f,si=m.f,fi=Jo.f,li=c.f,hi=j("symbols"),pi=j("op-symbols"),vi=j("string-to-symbol-registry"),yi=j("symbol-to-string-registry"),di=j("wks"),gi=n.QObject,mi=!gi||!gi.prototype||!gi.prototype.findChild,bi=o&&fails((function(){return 7!=jt(si({},"a",{get:function(){return si(this,"a",{value:7}).a}})).a}))?function(t,e,r){var n=ui(ii,e);n&&delete ii[e],si(t,e,r),n&&t!==ii&&si(ii,e,n)}:si,wrap=function(t,e){var r=hi[t]=jt(ai.prototype);return ni(r,{type:ei,tag:t,description:e}),o||(r.description=e),r},wi=lt?function(t){return"symbol"==typeof t}:function(t){return Object(t)instanceof ai},Si=function defineProperty(t,e,r){t===ii&&Si(pi,e,r),anObject(t);var n=toPrimitive(e,!0);return anObject(r),has(hi,n)?(r.enumerable?(has(t,ti)&&t[ti][n]&&(t[ti][n]=!1),r=jt(r,{enumerable:createPropertyDescriptor(0,!1)})):(has(t,ti)||si(t,ti,createPropertyDescriptor(1,{})),t[ti][n]=!0),bi(t,n,r)):si(t,n,r)},xi=function defineProperties(t,e){anObject(t);var r=toIndexedObject(e),n=Pt(r).concat(Ai(r));return Qo(n,(function(e){o&&!Ei.call(r,e)||Si(t,e,r[e])})),t},Ei=function propertyIsEnumerable(t){var e=toPrimitive(t,!0),r=li.call(this,e);return!(this===ii&&has(hi,e)&&!has(pi,e))&&(!(r||!has(this,e)||!has(hi,e)||has(this,ti)&&this[ti][e])||r)},Oi=function getOwnPropertyDescriptor(t,e){var r=toIndexedObject(t),n=toPrimitive(e,!0);if(r!==ii||!has(hi,n)||has(pi,n)){var o=ui(r,n);return!o||!has(hi,n)||has(r,ti)&&r[ti][n]||(o.enumerable=!0),o}},Pi=function getOwnPropertyNames(t){var e=fi(toIndexedObject(t)),r=[];return Qo(e,(function(t){has(hi,t)||has(_,t)||r.push(t)})),r},Ai=function getOwnPropertySymbols(t){var e=t===ii,r=fi(e?pi:toIndexedObject(t)),n=[];return Qo(r,(function(t){!has(hi,t)||e&&!has(ii,t)||n.push(hi[t])})),n};if(ft||(D((ai=function Symbol(){if(this instanceof ai)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===ii&&setter.call(pi,t),has(this,ti)&&has(this[ti],e)&&(this[ti][e]=!1),bi(this,e,createPropertyDescriptor(1,t))};return o&&mi&&bi(ii,e,{configurable:!0,set:setter}),wrap(e,t)}).prototype,"toString",(function toString(){return oi(this).tag})),D(ai,"withoutSetter",(function(t){return wrap(uid(t),t)})),c.f=Ei,m.f=Si,d.f=Oi,Q.f=Jo.f=Pi,tt.f=Ai,Xo.f=function(t){return wrap(wellKnownSymbol(t),t)},o&&(si(ai.prototype,"description",{configurable:!0,get:function description(){return oi(this).description}}),D(ii,"propertyIsEnumerable",Ei,{unsafe:!0}))),_export({global:!0,wrap:!0,forced:!ft,sham:!ft},{Symbol:ai}),Qo(Pt(di),(function(t){defineWellKnownSymbol(t)})),_export({target:ei,stat:!0,forced:!ft},{for:function(t){var e=String(t);if(has(vi,e))return vi[e];var r=ai(e);return vi[e]=r,yi[r]=e,r},keyFor:function keyFor(t){if(!wi(t))throw TypeError(t+" is not a symbol");if(has(yi,t))return yi[t]},useSetter:function(){mi=!0},useSimple:function(){mi=!1}}),_export({target:"Object",stat:!0,forced:!ft,sham:!o},{create:function create(t,e){return void 0===e?jt(t):xi(jt(t),e)},defineProperty:Si,defineProperties:xi,getOwnPropertyDescriptor:Oi}),_export({target:"Object",stat:!0,forced:!ft},{getOwnPropertyNames:Pi,getOwnPropertySymbols:Ai}),_export({target:"Object",stat:!0,forced:fails((function(){tt.f(1)}))},{getOwnPropertySymbols:function getOwnPropertySymbols(t){return tt.f(toObject(t))}}),ci){var Li=!ft||fails((function(){var t=ai();return"[null]"!=ci([t])||"{}"!=ci({a:t})||"{}"!=ci(Object(t))}));_export({target:"JSON",stat:!0,forced:Li},{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)&&!wi(t))return st(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!wi(e))return e}),o[1]=e,ci.apply(null,o)}})}ai.prototype[ri]||b(ai.prototype,ri,ai.prototype.valueOf),setToStringTag(ai,ei),_[ti]=!0;var ki=m.f,ji=n.Symbol;if(o&&"function"==typeof ji&&(!("description"in ji.prototype)||void 0!==ji().description)){var Ri={},Ii=function Symbol(){var t=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),e=this instanceof Ii?new ji(t):void 0===t?ji():ji(t);return""===t&&(Ri[e]=!0),e};copyConstructorProperties(Ii,ji);var Ti=Ii.prototype=ji.prototype;Ti.constructor=Ii;var _i=Ti.toString,Ci="Symbol(test)"==String(ji("test")),Ui=/^Symbol\((.*)\)[^)]+$/;ki(Ti,"description",{configurable:!0,get:function description(){var t=isObject(this)?this.valueOf():this,e=_i.call(t);if(has(Ri,t))return"";var r=Ci?e.slice(7,-1):e.replace(Ui,"$1");return""===r?void 0:r}}),_export({global:!0,forced:!0},{Symbol:Ii})}defineWellKnownSymbol("asyncIterator"),defineWellKnownSymbol("iterator"),defineWellKnownSymbol("toStringTag");var Fi=[].reverse,Mi=[1,2];_export({target:"Array",proto:!0,forced:String(Mi)===String(Mi.reverse())},{reverse:function reverse(){return st(this)&&(this.length=this.length),Fi.call(this)}});var Gi=wellKnownSymbol("species"),Ni=function(t){return pr>=51||!fails((function(){var e=[];return(e.constructor={})[Gi]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}("slice"),qi=arrayMethodUsesToLength("slice",{ACCESSORS:!0,0:0,1:2}),Bi=wellKnownSymbol("species"),Di=[].slice,$i=Math.max;_export({target:"Array",proto:!0,forced:!Ni||!qi},{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(st(i)&&("function"!=typeof(r=i.constructor)||r!==Array&&!st(r.prototype)?isObject(r)&&null===(r=r[Bi])&&(r=void 0):r=void 0,r===Array||void 0===r))return Di.call(i,c,u);for(n=new(void 0===r?Array:r)($i(u-c,0)),o=0;c<u;c++,o++)c in i&&createProperty(n,o,i[c]);return n.length=o,n}});var Vi=Date.prototype,Wi="Invalid Date",Ki="toString",Yi=Vi.toString,zi=Vi.getTime;new Date(NaN)+""!=Wi&&D(Vi,Ki,(function toString(){var t=zi.call(this);return t==t?Yi.call(this):Wi}));var Hi=m.f,Ji=Function.prototype,Xi=Ji.toString,Zi=/^\s*function ([^ (]*)/,Qi="name";o&&!(Qi in Ji)&&Hi(Ji,Qi,{configurable:!0,get:function(){try{return Xi.call(this).match(Zi)[1]}catch(t){return""}}}),setToStringTag(n.JSON,"JSON",!0),setToStringTag(Math,"Math",!0),_export({target:"Object",stat:!0,sham:!o},{create:jt}),_export({target:"Object",stat:!0,forced:!o,sham:!o},{defineProperty:m.f});var ta=fails((function(){Bt(1)}));_export({target:"Object",stat:!0,forced:ta,sham:!Gt},{getPrototypeOf:function getPrototypeOf(t){return Bt(toObject(t))}}),_export({target:"Object",stat:!0},{setPrototypeOf:zt});var ea="toString",ra=RegExp.prototype,na=ra.toString,oa=fails((function(){return"/a/b"!=na.call({source:"a",flags:"b"})})),ia=na.name!=ea;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 _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}(oa||ia)&&D(RegExp.prototype,ea,(function toString(){var t=anObject(this),e=String(t.source),r=t.flags;return"/"+e+"/"+String(void 0===r&&t instanceof RegExp&&!("flags"in ra)?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,y=v&&v(v(values([])));y&&y!==r&&n.call(y,i)&&(p=y);var d=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=d.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(d),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(d),define(d,c,"Generator"),d[i]=function(){return this},d.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)}})),t("default",{name:"storage",init:function init(t){var r=t.$,n=this,o=n.canvas,i=n.curConfig,a=i.emptyStorageOnDecline,c=i.noStorageOnLoad,u=i.forceStorage,s=n.storage,f=n.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(s){var e="svgedit-"+n.curConfig.canvasName;t?s.setItem(e,t):s.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(o.getSvgString()),n.setConfig({no_save_warning:!0});var e=n.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&&(s?s.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 l=!1;return{name:"storage",langReady:function langReady(t){return 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)}))}}(regeneratorRuntime.mark((function _callee(){var o,i,h,p,v,y,d,g,m,b,w,S,x,E,O,P,A,L,k,j;return regeneratorRuntime.wrap((function _callee$(R){for(;;)switch(R.prev=R.next){case 0:return o=t.lang,i=new URL(top.location).searchParams.get("storagePrompt"),R.next=4,e.import("./locale/".concat(o,".js"));case 4:if(h=R.sent,p=h.default,v=p.message,y=p.storagePrefsAndContent,d=p.storagePrefsOnly,g=p.storagePrefs,m=p.storageNoPrefsOrContent,b=p.storageNoPrefs,w=p.rememberLabel,S=p.rememberTooltip,!l){R.next=9;break}return R.abrupt("return");case 9:if(l=!0,u||"true"!==i&&("false"===i||document.cookie.match(/(?:^|;\s*)svgeditstore=(?:prefsAndContent|prefsOnly)/))){R.next=45;break}return x=[],s?x.unshift({value:"prefsAndContent",text:y},{value:"prefsOnly",text:d},{value:"noPrefsOrContent",text:m}):x.unshift({value:"prefsOnly",text:g},{value:"noPrefsOrContent",text:b}),E=r("#dialog_container")[0].style.width,O=r("#dialog_container")[0].style.marginLeft,P=r("#dialog_content")[0].style.height,A=r("#dialog_container")[0].style.height,r("#dialog_content")[0].style.height="120px",r("#dialog_container")[0].style.height="170px",r("#dialog_container")[0].style.width="800px",r("#dialog_container")[0].style.marginLeft="-400px",n.storagePromptState="waiting",R.next=21,r.select(v,x,null,null,{label:w,checked:!0,tooltip:S});case 21:if(L=R.sent,k=L.response,j=L.checked,!k||"noPrefsOrContent"===k){R.next=31;break}if(document.cookie="svgeditstore="+encodeURIComponent(k)+"; expires=Fri, 31 Dec 9999 23:59:59 GMT","true"!==i||!j){R.next=29;break}return replaceStoragePrompt(),R.abrupt("return");case 29:R.next=36;break;case 31:if(expireCookie("svgeditstore"),k&&a&&(setSVGContentStorage(""),Object.keys(n.curPrefs).forEach((function(t){t="svg-edit-"+t,s&&s.removeItem(t),expireCookie(t)}))),!k||!j){R.next=36;break}return replaceStoragePrompt("false"),R.abrupt("return");case 36:r("#dialog_container")[0].style.width=E,r("#dialog_container")[0].style.marginLeft=O,r("#dialog_content")[0].style.height=P,r("#dialog_container")[0].style.height=A,setupBeforeUnloadListener(),n.storagePromptState="closed",f(!0),R.next=46;break;case 45:c&&!u||setupBeforeUnloadListener();case 46:case"end":return R.stop()}}),_callee)})))()}}}})
/**
* @file ext-storage.js
*
* This extension allows automatic saving of the SVG canvas contents upon
* page unload (which can later be automatically retrieved upon future
* editor loads).
*
* The functionality was originally part of the SVG Editor, but moved to a
* separate extension to make the setting behavior optional, and adapted
* to inform the user of its setting of local data.
*
* @license MIT
*
* @copyright 2010 Brett Zamir
* @todo Revisit on whether to use `svgEditor.pref` over directly setting
* `curConfig` in all extensions for a more public API (not only for `extPath`
* and `imagePath`, but other currently used config in the extensions)
* @todo We might provide control of storage settings through the UI besides the
* initial (or URL-forced) dialog. *
*/}}}));