Files
svgedit/dist/editor/system/extensions/ext-storage/ext-storage.js
2021-01-03 22:59:00 +01:00

2 lines
119 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
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(e){"use strict";return{execute:function(){var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function createCommonjsModule(e){var t={exports:{}};return e(t,t.exports),t.exports}var check=function(e){return e&&e.Math==Math&&e},r=check("object"==typeof globalThis&&globalThis)||check("object"==typeof window&&window)||check("object"==typeof self&&self)||check("object"==typeof t&&t)||function(){return this}()||Function("return this")(),fails=function(e){try{return!!e()}catch(e){return!0}},n=!fails((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),o={}.propertyIsEnumerable,i=Object.getOwnPropertyDescriptor,a={f:i&&!o.call({1:2},1)?function propertyIsEnumerable(e){var t=i(this,e);return!!t&&t.enumerable}:o},createPropertyDescriptor=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},c={}.toString,classofRaw=function(e){return c.call(e).slice(8,-1)},s="".split,u=fails((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==classofRaw(e)?s.call(e,""):Object(e)}:Object,requireObjectCoercible=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e},toIndexedObject=function(e){return u(requireObjectCoercible(e))},isObject=function(e){return"object"==typeof e?null!==e:"function"==typeof e},toPrimitive=function(e,t){if(!isObject(e))return e;var r,n;if(t&&"function"==typeof(r=e.toString)&&!isObject(n=r.call(e)))return n;if("function"==typeof(r=e.valueOf)&&!isObject(n=r.call(e)))return n;if(!t&&"function"==typeof(r=e.toString)&&!isObject(n=r.call(e)))return n;throw TypeError("Can't convert object to primitive value")},l={}.hasOwnProperty,has=function(e,t){return l.call(e,t)},f=r.document,p=isObject(f)&&isObject(f.createElement),documentCreateElement=function(e){return p?f.createElement(e):{}},h=!n&&!fails((function(){return 7!=Object.defineProperty(documentCreateElement("div"),"a",{get:function(){return 7}}).a})),d=Object.getOwnPropertyDescriptor,g={f:n?d:function getOwnPropertyDescriptor(e,t){if(e=toIndexedObject(e),t=toPrimitive(t,!0),h)try{return d(e,t)}catch(e){}if(has(e,t))return createPropertyDescriptor(!a.f.call(e,t),e[t])}},anObject=function(e){if(!isObject(e))throw TypeError(String(e)+" is not an object");return e},y=Object.defineProperty,v={f:n?y:function defineProperty(e,t,r){if(anObject(e),t=toPrimitive(t,!0),anObject(r),h)try{return y(e,t,r)}catch(e){}if("get"in r||"set"in r)throw TypeError("Accessors not supported");return"value"in r&&(e[t]=r.value),e}},m=n?function(e,t,r){return v.f(e,t,createPropertyDescriptor(1,r))}:function(e,t,r){return e[t]=r,e},setGlobal=function(e,t){try{m(r,e,t)}catch(n){r[e]=t}return t},b="__core-js_shared__",_=r[b]||setGlobal(b,{}),S=Function.toString;"function"!=typeof _.inspectSource&&(_.inspectSource=function(e){return S.call(e)});var w,O,x,k=_.inspectSource,P=r.WeakMap,E="function"==typeof P&&/native code/.test(k(P)),C=createCommonjsModule((function(e){(e.exports=function(e,t){return _[e]||(_[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.8.2",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})})),R=0,j=Math.random(),uid=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++R+j).toString(36)},A=C("keys"),sharedKey=function(e){return A[e]||(A[e]=uid(e))},T={},I=r.WeakMap;if(E){var L=_.state||(_.state=new I),M=L.get,D=L.has,N=L.set;w=function(e,t){return t.facade=e,N.call(L,e,t),t},O=function(e){return M.call(L,e)||{}},x=function(e){return D.call(L,e)}}else{var U=sharedKey("state");T[U]=!0,w=function(e,t){return t.facade=e,m(e,U,t),t},O=function(e){return has(e,U)?e[U]:{}},x=function(e){return has(e,U)}}var $={set:w,get:O,has:x,enforce:function(e){return x(e)?O(e):w(e,{})},getterFor:function(e){return function(t){var r;if(!isObject(t)||(r=O(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return r}}},B=createCommonjsModule((function(e){var t=$.get,n=$.enforce,o=String(String).split("String");(e.exports=function(e,t,i,a){var c,s=!!a&&!!a.unsafe,u=!!a&&!!a.enumerable,l=!!a&&!!a.noTargetGet;"function"==typeof i&&("string"!=typeof t||has(i,"name")||m(i,"name",t),(c=n(i)).source||(c.source=o.join("string"==typeof t?t:""))),e!==r?(s?!l&&e[t]&&(u=!0):delete e[t],u?e[t]=i:m(e,t,i)):u?e[t]=i:setGlobal(t,i)})(Function.prototype,"toString",(function toString(){return"function"==typeof this&&t(this).source||k(this)}))})),G=r,aFunction=function(e){return"function"==typeof e?e:void 0},getBuiltIn=function(e,t){return arguments.length<2?aFunction(G[e])||aFunction(r[e]):G[e]&&G[e][t]||r[e]&&r[e][t]},z=Math.ceil,q=Math.floor,toInteger=function(e){return isNaN(e=+e)?0:(e>0?q:z)(e)},V=Math.min,toLength=function(e){return e>0?V(toInteger(e),9007199254740991):0},K=Math.max,W=Math.min,toAbsoluteIndex=function(e,t){var r=toInteger(e);return r<0?K(r+t,0):W(r,t)},createMethod=function(e){return function(t,r,n){var o,i=toIndexedObject(t),a=toLength(i.length),c=toAbsoluteIndex(n,a);if(e&&r!=r){for(;a>c;)if((o=i[c++])!=o)return!0}else for(;a>c;c++)if((e||c in i)&&i[c]===r)return e||c||0;return!e&&-1}},H={includes:createMethod(!0),indexOf:createMethod(!1)},Z=H.indexOf,objectKeysInternal=function(e,t){var r,n=toIndexedObject(e),o=0,i=[];for(r in n)!has(T,r)&&has(n,r)&&i.push(r);for(;t.length>o;)has(n,r=t[o++])&&(~Z(i,r)||i.push(r));return i},Y=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],J=Y.concat("length","prototype"),X={f:Object.getOwnPropertyNames||function getOwnPropertyNames(e){return objectKeysInternal(e,J)}},Q={f:Object.getOwnPropertySymbols},ee=getBuiltIn("Reflect","ownKeys")||function ownKeys(e){var t=X.f(anObject(e)),r=Q.f;return r?t.concat(r(e)):t},copyConstructorProperties=function(e,t){for(var r=ee(t),n=v.f,o=g.f,i=0;i<r.length;i++){var a=r[i];has(e,a)||n(e,a,o(t,a))}},te=/#|\.prototype\./,isForced=function(e,t){var r=ne[re(e)];return r==ie||r!=oe&&("function"==typeof t?fails(t):!!t)},re=isForced.normalize=function(e){return String(e).replace(te,".").toLowerCase()},ne=isForced.data={},oe=isForced.NATIVE="N",ie=isForced.POLYFILL="P",ae=isForced,ce=g.f,_export=function(e,t){var n,o,i,a,c,s=e.target,u=e.global,l=e.stat;if(n=u?r:l?r[s]||setGlobal(s,{}):(r[s]||{}).prototype)for(o in t){if(a=t[o],i=e.noTargetGet?(c=ce(n,o))&&c.value:n[o],!ae(u?o:s+(l?".":"#")+o,e.forced)&&void 0!==i){if(typeof a==typeof i)continue;copyConstructorProperties(a,i)}(e.sham||i&&i.sham)&&m(a,"sham",!0),B(n,o,a,e)}},aFunction$1=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e},functionBindContext=function(e,t,r){if(aFunction$1(e),void 0===t)return e;switch(r){case 0:return function(){return e.call(t)};case 1:return function(r){return e.call(t,r)};case 2:return function(r,n){return e.call(t,r,n)};case 3:return function(r,n,o){return e.call(t,r,n,o)}}return function(){return e.apply(t,arguments)}},toObject=function(e){return Object(requireObjectCoercible(e))},se=Array.isArray||function isArray(e){return"Array"==classofRaw(e)},ue=!!Object.getOwnPropertySymbols&&!fails((function(){return!String(Symbol())})),le=ue&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,fe=C("wks"),pe=r.Symbol,he=le?pe:pe&&pe.withoutSetter||uid,wellKnownSymbol=function(e){return has(fe,e)||(ue&&has(pe,e)?fe[e]=pe[e]:fe[e]=he("Symbol."+e)),fe[e]},de=wellKnownSymbol("species"),arraySpeciesCreate=function(e,t){var r;return se(e)&&("function"!=typeof(r=e.constructor)||r!==Array&&!se(r.prototype)?isObject(r)&&null===(r=r[de])&&(r=void 0):r=void 0),new(void 0===r?Array:r)(0===t?0:t)},ge=[].push,createMethod$1=function(e){var t=1==e,r=2==e,n=3==e,o=4==e,i=6==e,a=7==e,c=5==e||i;return function(s,l,f,p){for(var h,d,g=toObject(s),y=u(g),v=functionBindContext(l,f,3),m=toLength(y.length),b=0,_=p||arraySpeciesCreate,S=t?_(s,m):r||a?_(s,0):void 0;m>b;b++)if((c||b in y)&&(d=v(h=y[b],b,g),e))if(t)S[b]=d;else if(d)switch(e){case 3:return!0;case 5:return h;case 6:return b;case 2:ge.call(S,h)}else switch(e){case 4:return!1;case 7:ge.call(S,h)}return i?-1:n||o?o:S}},ye={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),filterOut:createMethod$1(7)},arrayMethodIsStrict=function(e,t){var r=[][e];return!!r&&fails((function(){r.call(null,t||function(){throw 1},1)}))},ve=Object.defineProperty,me={},thrower=function(e){throw e},arrayMethodUsesToLength=function(e,t){if(has(me,e))return me[e];t||(t={});var r=[][e],o=!!has(t,"ACCESSORS")&&t.ACCESSORS,i=has(t,0)?t[0]:thrower,a=has(t,1)?t[1]:void 0;return me[e]=!!r&&!fails((function(){if(o&&!n)return!0;var e={length:-1};o?ve(e,1,{enumerable:!0,get:thrower}):e[1]=1,r.call(e,i,a)}))},be=ye.forEach,_e=arrayMethodIsStrict("forEach"),Se=arrayMethodUsesToLength("forEach"),we=_e&&Se?[].forEach:function forEach(e){return be(this,e,arguments.length>1?arguments[1]:void 0)};_export({target:"Array",proto:!0,forced:[].forEach!=we},{forEach:we});var Oe,xe=Object.keys||function keys(e){return objectKeysInternal(e,Y)},ke=n?Object.defineProperties:function defineProperties(e,t){anObject(e);for(var r,n=xe(t),o=n.length,i=0;o>i;)v.f(e,r=n[i++],t[r]);return e},Pe=getBuiltIn("document","documentElement"),Ee=sharedKey("IE_PROTO"),EmptyConstructor=function(){},scriptTag=function(e){return"<script>"+e+"</"+"script>"},NullProtoObject=function(){try{Oe=document.domain&&new ActiveXObject("htmlfile")}catch(e){}var e,t;NullProtoObject=Oe?function(e){e.write(scriptTag("")),e.close();var t=e.parentWindow.Object;return e=null,t}(Oe):((t=documentCreateElement("iframe")).style.display="none",Pe.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(scriptTag("document.F=Object")),e.close(),e.F);for(var r=Y.length;r--;)delete NullProtoObject.prototype[Y[r]];return NullProtoObject()};T[Ee]=!0;var Ce=Object.create||function create(e,t){var r;return null!==e?(EmptyConstructor.prototype=anObject(e),r=new EmptyConstructor,EmptyConstructor.prototype=null,r[Ee]=e):r=NullProtoObject(),void 0===t?r:ke(r,t)},Re=wellKnownSymbol("unscopables"),je=Array.prototype;null==je[Re]&&v.f(je,Re,{configurable:!0,value:Ce(null)});var addToUnscopables=function(e){je[Re][e]=!0},Ae=H.includes,Te=arrayMethodUsesToLength("indexOf",{ACCESSORS:!0,1:0});_export({target:"Array",proto:!0,forced:!Te},{includes:function includes(e){return Ae(this,e,arguments.length>1?arguments[1]:void 0)}}),addToUnscopables("includes");var Ie,Le,Me,Fe={},De=!fails((function(){function F(){}return F.prototype.constructor=null,Object.getPrototypeOf(new F)!==F.prototype})),Ne=sharedKey("IE_PROTO"),Ue=Object.prototype,$e=De?Object.getPrototypeOf:function(e){return e=toObject(e),has(e,Ne)?e[Ne]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?Ue:null},Be=wellKnownSymbol("iterator"),Ge=!1;[].keys&&("next"in(Me=[].keys())?(Le=$e($e(Me)))!==Object.prototype&&(Ie=Le):Ge=!0),null==Ie&&(Ie={}),has(Ie,Be)||m(Ie,Be,(function(){return this}));var ze={IteratorPrototype:Ie,BUGGY_SAFARI_ITERATORS:Ge},qe=v.f,Ve=wellKnownSymbol("toStringTag"),setToStringTag=function(e,t,r){e&&!has(e=r?e:e.prototype,Ve)&&qe(e,Ve,{configurable:!0,value:t})},Ke=ze.IteratorPrototype,returnThis$1=function(){return this},createIteratorConstructor=function(e,t,r){var n=t+" Iterator";return e.prototype=Ce(Ke,{next:createPropertyDescriptor(1,r)}),setToStringTag(e,n,!1),Fe[n]=returnThis$1,e},We=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,r={};try{(e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(r,[]),t=r instanceof Array}catch(e){}return function setPrototypeOf(r,n){return anObject(r),function(e){if(!isObject(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype")}(n),t?e.call(r,n):r.__proto__=n,r}}():void 0),He=ze.IteratorPrototype,Ze=ze.BUGGY_SAFARI_ITERATORS,Ye=wellKnownSymbol("iterator"),Je="keys",Xe="values",Qe="entries",returnThis$2=function(){return this},defineIterator=function(e,t,r,n,o,i,a){createIteratorConstructor(r,t,n);var c,s,u,getIterationMethod=function(e){if(e===o&&d)return d;if(!Ze&&e in p)return p[e];switch(e){case Je:return function keys(){return new r(this,e)};case Xe:return function values(){return new r(this,e)};case Qe:return function entries(){return new r(this,e)}}return function(){return new r(this)}},l=t+" Iterator",f=!1,p=e.prototype,h=p[Ye]||p["@@iterator"]||o&&p[o],d=!Ze&&h||getIterationMethod(o),g="Array"==t&&p.entries||h;if(g&&(c=$e(g.call(new e)),He!==Object.prototype&&c.next&&($e(c)!==He&&(We?We(c,He):"function"!=typeof c[Ye]&&m(c,Ye,returnThis$2)),setToStringTag(c,l,!0))),o==Xe&&h&&h.name!==Xe&&(f=!0,d=function values(){return h.call(this)}),p[Ye]!==d&&m(p,Ye,d),Fe[t]=d,o)if(s={values:getIterationMethod(Xe),keys:i?d:getIterationMethod(Je),entries:getIterationMethod(Qe)},a)for(u in s)(Ze||f||!(u in p))&&B(p,u,s[u]);else _export({target:t,proto:!0,forced:Ze||f},s);return s},et="Array Iterator",tt=$.set,rt=$.getterFor(et),nt=defineIterator(Array,"Array",(function(e,t){tt(this,{type:et,target:toIndexedObject(e),index:0,kind:t})}),(function(){var e=rt(this),t=e.target,r=e.kind,n=e.index++;return!t||n>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==r?{value:n,done:!1}:"values"==r?{value:t[n],done:!1}:{value:[n,t[n]],done:!1}}),"values");Fe.Arguments=Fe.Array,addToUnscopables("keys"),addToUnscopables("values"),addToUnscopables("entries");var ot=a.f,createMethod$2=function(e){return function(t){for(var r,o=toIndexedObject(t),i=xe(o),a=i.length,c=0,s=[];a>c;)r=i[c++],n&&!ot.call(o,r)||s.push(e?[r,o[r]]:o[r]);return s}},it={entries:createMethod$2(!0),values:createMethod$2(!1)}.entries;_export({target:"Object",stat:!0},{entries:function entries(e){return it(e)}});var at=fails((function(){xe(1)}));_export({target:"Object",stat:!0,forced:at},{keys:function keys(e){return xe(toObject(e))}});var ct={};ct[wellKnownSymbol("toStringTag")]="z";var st="[object z]"===String(ct),ut=wellKnownSymbol("toStringTag"),lt="Arguments"==classofRaw(function(){return arguments}()),ft=st?classofRaw:function(e){var t,r,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),ut))?r:lt?classofRaw(t):"Object"==(n=classofRaw(t))&&"function"==typeof t.callee?"Arguments":n},pt=st?{}.toString:function toString(){return"[object "+ft(this)+"]"};st||B(Object.prototype,"toString",pt,{unsafe:!0});var regexpFlags=function(){var e=anObject(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t};function RE(e,t){return RegExp(e,t)}var ht,dt,gt={UNSUPPORTED_Y:fails((function(){var e=RE("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),BROKEN_CARET:fails((function(){var e=RE("^r","gy");return e.lastIndex=2,null!=e.exec("str")}))},yt=RegExp.prototype.exec,vt=String.prototype.replace,mt=yt,bt=(ht=/a/,dt=/b*/g,yt.call(ht,"a"),yt.call(dt,"a"),0!==ht.lastIndex||0!==dt.lastIndex),_t=gt.UNSUPPORTED_Y||gt.BROKEN_CARET,St=void 0!==/()??/.exec("")[1];(bt||St||_t)&&(mt=function exec(e){var t,r,n,o,i=this,a=_t&&i.sticky,c=regexpFlags.call(i),s=i.source,u=0,l=e;return a&&(-1===(c=c.replace("y","")).indexOf("g")&&(c+="g"),l=String(e).slice(i.lastIndex),i.lastIndex>0&&(!i.multiline||i.multiline&&"\n"!==e[i.lastIndex-1])&&(s="(?: "+s+")",l=" "+l,u++),r=new RegExp("^(?:"+s+")",c)),St&&(r=new RegExp("^"+s+"$(?!\\s)",c)),bt&&(t=i.lastIndex),n=yt.call(a?r:i,l),a?n?(n.input=n.input.slice(u),n[0]=n[0].slice(u),n.index=i.lastIndex,i.lastIndex+=n[0].length):i.lastIndex=0:bt&&n&&(i.lastIndex=i.global?n.index+n[0].length:t),St&&n&&n.length>1&&vt.call(n[0],r,(function(){for(o=1;o<arguments.length-2;o++)void 0===arguments[o]&&(n[o]=void 0)})),n});var wt=mt;_export({target:"RegExp",proto:!0,forced:/./.exec!==wt},{exec:wt});var Ot=wellKnownSymbol("match"),notARegexp=function(e){if(function(e){var t;return isObject(e)&&(void 0!==(t=e[Ot])?!!t:"RegExp"==classofRaw(e))}(e))throw TypeError("The method doesn't accept regular expressions");return e},xt=wellKnownSymbol("match");_export({target:"String",proto:!0,forced:!function(e){var t=/./;try{"/./"[e](t)}catch(r){try{return t[xt]=!1,"/./"[e](t)}catch(e){}}return!1}("includes")},{includes:function includes(e){return!!~String(requireObjectCoercible(this)).indexOf(notARegexp(e),arguments.length>1?arguments[1]:void 0)}});var createMethod$3=function(e){return function(t,r){var n,o,i=String(requireObjectCoercible(t)),a=toInteger(r),c=i.length;return a<0||a>=c?e?"":void 0:(n=i.charCodeAt(a))<55296||n>56319||a+1===c||(o=i.charCodeAt(a+1))<56320||o>57343?e?i.charAt(a):n:e?i.slice(a,a+2):o-56320+(n-55296<<10)+65536}},kt={codeAt:createMethod$3(!1),charAt:createMethod$3(!0)},Pt=kt.charAt,Et="String Iterator",Ct=$.set,Rt=$.getterFor(Et);defineIterator(String,"String",(function(e){Ct(this,{type:Et,string:String(e),index:0})}),(function next(){var e,t=Rt(this),r=t.string,n=t.index;return n>=r.length?{value:void 0,done:!0}:(e=Pt(r,n),t.index+=e.length,{value:e,done:!1})}));var jt=wellKnownSymbol("species"),At=!fails((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")})),Tt="$0"==="a".replace(/./,"$0"),It=wellKnownSymbol("replace"),Lt=!!/./[It]&&""===/./[It]("a","$0"),Mt=!fails((function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var r="ab".split(e);return 2!==r.length||"a"!==r[0]||"b"!==r[1]})),fixRegexpWellKnownSymbolLogic=function(e,t,r,n){var o=wellKnownSymbol(e),i=!fails((function(){var t={};return t[o]=function(){return 7},7!=""[e](t)})),a=i&&!fails((function(){var t=!1,r=/a/;return"split"===e&&((r={}).constructor={},r.constructor[jt]=function(){return r},r.flags="",r[o]=/./[o]),r.exec=function(){return t=!0,null},r[o](""),!t}));if(!i||!a||"replace"===e&&(!At||!Tt||Lt)||"split"===e&&!Mt){var c=/./[o],s=r(o,""[e],(function(e,t,r,n,o){return t.exec===wt?i&&!o?{done:!0,value:c.call(t,r,n)}:{done:!0,value:e.call(r,t,n)}:{done:!1}}),{REPLACE_KEEPS_$0:Tt,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:Lt}),u=s[0],l=s[1];B(String.prototype,e,u),B(RegExp.prototype,o,2==t?function(e,t){return l.call(e,this,t)}:function(e){return l.call(e,this)})}n&&m(RegExp.prototype[o],"sham",!0)},Ft=kt.charAt,advanceStringIndex=function(e,t,r){return t+(r?Ft(e,t).length:1)},regexpExecAbstract=function(e,t){var r=e.exec;if("function"==typeof r){var n=r.call(e,t);if("object"!=typeof n)throw TypeError("RegExp exec method returned something other than an Object or null");return n}if("RegExp"!==classofRaw(e))throw TypeError("RegExp#exec called on incompatible receiver");return wt.call(e,t)};fixRegexpWellKnownSymbolLogic("match",1,(function(e,t,r){return[function match(t){var r=requireObjectCoercible(this),n=null==t?void 0:t[e];return void 0!==n?n.call(t,r):new RegExp(t)[e](String(r))},function(e){var n=r(t,e,this);if(n.done)return n.value;var o=anObject(e),i=String(this);if(!o.global)return regexpExecAbstract(o,i);var a=o.unicode;o.lastIndex=0;for(var c,s=[],u=0;null!==(c=regexpExecAbstract(o,i));){var l=String(c[0]);s[u]=l,""===l&&(o.lastIndex=advanceStringIndex(i,toLength(o.lastIndex),a)),u++}return 0===u?null:s}]}));var Dt=Math.floor,Nt="".replace,Ut=/\$([$&'`]|\d\d?|<[^>]*>)/g,$t=/\$([$&'`]|\d\d?)/g,getSubstitution=function(e,t,r,n,o,i){var a=r+e.length,c=n.length,s=$t;return void 0!==o&&(o=toObject(o),s=Ut),Nt.call(i,s,(function(i,s){var u;switch(s.charAt(0)){case"$":return"$";case"&":return e;case"`":return t.slice(0,r);case"'":return t.slice(a);case"<":u=o[s.slice(1,-1)];break;default:var l=+s;if(0===l)return i;if(l>c){var f=Dt(l/10);return 0===f?i:f<=c?void 0===n[f-1]?s.charAt(1):n[f-1]+s.charAt(1):i}u=n[l-1]}return void 0===u?"":u}))},Bt=Math.max,Gt=Math.min;fixRegexpWellKnownSymbolLogic("replace",2,(function(e,t,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[e];return void 0!==i?i.call(r,o,n):t.call(String(o),r,n)},function(e,n){if(!o&&i||"string"==typeof n&&-1===n.indexOf(a)){var c=r(t,e,this,n);if(c.done)return c.value}var s=anObject(e),u=String(this),l="function"==typeof n;l||(n=String(n));var f=s.global;if(f){var p=s.unicode;s.lastIndex=0}for(var h=[];;){var d=regexpExecAbstract(s,u);if(null===d)break;if(h.push(d),!f)break;""===String(d[0])&&(s.lastIndex=advanceStringIndex(u,toLength(s.lastIndex),p))}for(var g,y="",v=0,m=0;m<h.length;m++){d=h[m];for(var b=String(d[0]),_=Bt(Gt(toInteger(d.index),u.length),0),S=[],w=1;w<d.length;w++)S.push(void 0===(g=d[w])?g:String(g));var O=d.groups;if(l){var x=[b].concat(S,_,u);void 0!==O&&x.push(O);var k=String(n.apply(void 0,x))}else k=getSubstitution(b,u,_,S,O,n);_>=v&&(y+=u.slice(v,_)+k,v=_+b.length)}return y+u.slice(v)}]}));var zt={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 qt in zt){var Vt=r[qt],Kt=Vt&&Vt.prototype;if(Kt&&Kt.forEach!==we)try{m(Kt,"forEach",we)}catch(e){Kt.forEach=we}}var Wt=wellKnownSymbol("iterator"),Ht=wellKnownSymbol("toStringTag"),Zt=nt.values;for(var Yt in zt){var Jt=r[Yt],Xt=Jt&&Jt.prototype;if(Xt){if(Xt[Wt]!==Zt)try{m(Xt,Wt,Zt)}catch(e){Xt[Wt]=Zt}if(Xt[Ht]||m(Xt,Ht,Yt),zt[Yt])for(var Qt in nt)if(Xt[Qt]!==nt[Qt])try{m(Xt,Qt,nt[Qt])}catch(e){Xt[Qt]=nt[Qt]}}}var er=wellKnownSymbol("iterator"),tr=!fails((function(){var e=new URL("b?a=1&b=2&c=3","http://a"),t=e.searchParams,r="";return e.pathname="c%20d",t.forEach((function(e,n){t.delete("b"),r+=n+e})),!t.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[er]||"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(e,t,r){if(!(e instanceof t))throw TypeError("Incorrect "+(r?r+" ":"")+"invocation");return e},rr=Object.assign,nr=Object.defineProperty,or=!rr||fails((function(){if(n&&1!==rr({b:1},rr(nr({},"a",{enumerable:!0,get:function(){nr(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},r=Symbol(),o="abcdefghijklmnopqrst";return e[r]=7,o.split("").forEach((function(e){t[e]=e})),7!=rr({},e)[r]||xe(rr({},t)).join("")!=o}))?function assign(e,t){for(var r=toObject(e),o=arguments.length,i=1,c=Q.f,s=a.f;o>i;)for(var l,f=u(arguments[i++]),p=c?xe(f).concat(c(f)):xe(f),h=p.length,d=0;h>d;)l=p[d++],n&&!s.call(f,l)||(r[l]=f[l]);return r}:rr,iteratorClose=function(e){var t=e.return;if(void 0!==t)return anObject(t.call(e)).value},callWithSafeIterationClosing=function(e,t,r,n){try{return n?t(anObject(r)[0],r[1]):t(r)}catch(t){throw iteratorClose(e),t}},ir=wellKnownSymbol("iterator"),ar=Array.prototype,isArrayIteratorMethod=function(e){return void 0!==e&&(Fe.Array===e||ar[ir]===e)},createProperty=function(e,t,r){var n=toPrimitive(t);n in e?v.f(e,n,createPropertyDescriptor(0,r)):e[n]=r},cr=wellKnownSymbol("iterator"),getIteratorMethod=function(e){if(null!=e)return e[cr]||e["@@iterator"]||Fe[ft(e)]},sr=function from(e){var t,r,n,o,i,a,c=toObject(e),s="function"==typeof this?this:Array,u=arguments.length,l=u>1?arguments[1]:void 0,f=void 0!==l,p=getIteratorMethod(c),h=0;if(f&&(l=functionBindContext(l,u>2?arguments[2]:void 0,2)),null==p||s==Array&&isArrayIteratorMethod(p))for(r=new s(t=toLength(c.length));t>h;h++)a=f?l(c[h],h):c[h],createProperty(r,h,a);else for(i=(o=p.call(c)).next,r=new s;!(n=i.call(o)).done;h++)a=f?callWithSafeIterationClosing(o,l,[n.value,h],!0):n.value,createProperty(r,h,a);return r.length=h,r},ur=2147483647,lr=/[^\0-\u007E]/,fr=/[.\u3002\uFF0E\uFF61]/g,pr="Overflow: input needs wider integers to process",hr=Math.floor,dr=String.fromCharCode,digitToBasic=function(e){return e+22+75*(e<26)},adapt=function(e,t,r){var n=0;for(e=r?hr(e/700):e>>1,e+=hr(e/t);e>455;n+=36)e=hr(e/35);return hr(n+36*e/(e+38))},encode=function(e){var t,r,n=[],o=(e=function(e){for(var t=[],r=0,n=e.length;r<n;){var o=e.charCodeAt(r++);if(o>=55296&&o<=56319&&r<n){var i=e.charCodeAt(r++);56320==(64512&i)?t.push(((1023&o)<<10)+(1023&i)+65536):(t.push(o),r--)}else t.push(o)}return t}(e)).length,i=128,a=0,c=72;for(t=0;t<e.length;t++)(r=e[t])<128&&n.push(dr(r));var s=n.length,u=s;for(s&&n.push("-");u<o;){var l=ur;for(t=0;t<e.length;t++)(r=e[t])>=i&&r<l&&(l=r);var f=u+1;if(l-i>hr((ur-a)/f))throw RangeError(pr);for(a+=(l-i)*f,i=l,t=0;t<e.length;t++){if((r=e[t])<i&&++a>ur)throw RangeError(pr);if(r==i){for(var p=a,h=36;;h+=36){var d=h<=c?1:h>=c+26?26:h-c;if(p<d)break;var g=p-d,y=36-d;n.push(dr(digitToBasic(d+g%y))),p=hr(g/y)}n.push(dr(digitToBasic(p))),c=adapt(a,f,u==s),a=0,++u}}++a,++i}return n.join("")},redefineAll=function(e,t,r){for(var n in t)B(e,n,t[n],r);return e},getIterator=function(e){var t=getIteratorMethod(e);if("function"!=typeof t)throw TypeError(String(e)+" is not iterable");return anObject(t.call(e))},gr=getBuiltIn("fetch"),yr=getBuiltIn("Headers"),vr=wellKnownSymbol("iterator"),mr="URLSearchParams",br="URLSearchParamsIterator",_r=$.set,Sr=$.getterFor(mr),wr=$.getterFor(br),Or=/\+/g,xr=Array(4),percentSequence=function(e){return xr[e-1]||(xr[e-1]=RegExp("((?:%[\\da-f]{2}){"+e+"})","gi"))},percentDecode=function(e){try{return decodeURIComponent(e)}catch(t){return e}},deserialize=function(e){var t=e.replace(Or," "),r=4;try{return decodeURIComponent(t)}catch(e){for(;r;)t=t.replace(percentSequence(r--),percentDecode);return t}},kr=/[!'()~]|%20/g,Pr={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},replacer=function(e){return Pr[e]},serialize=function(e){return encodeURIComponent(e).replace(kr,replacer)},parseSearchParams=function(e,t){if(t)for(var r,n,o=t.split("&"),i=0;i<o.length;)(r=o[i++]).length&&(n=r.split("="),e.push({key:deserialize(n.shift()),value:deserialize(n.join("="))}))},updateSearchParams=function(e){this.entries.length=0,parseSearchParams(this.entries,e)},validateArgumentsLength=function(e,t){if(e<t)throw TypeError("Not enough arguments")},Er=createIteratorConstructor((function Iterator(e,t){_r(this,{type:br,iterator:getIterator(Sr(e).entries),kind:t})}),"Iterator",(function next(){var e=wr(this),t=e.kind,r=e.iterator.next(),n=r.value;return r.done||(r.value="keys"===t?n.key:"values"===t?n.value:[n.key,n.value]),r})),Cr=function URLSearchParams(){anInstance(this,Cr,mr);var e,t,r,n,o,i,a,c,s,u=arguments.length>0?arguments[0]:void 0,l=this,f=[];if(_r(l,{type:mr,entries:f,updateURL:function(){},updateSearchParams:updateSearchParams}),void 0!==u)if(isObject(u))if("function"==typeof(e=getIteratorMethod(u)))for(r=(t=e.call(u)).next;!(n=r.call(t)).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");f.push({key:a.value+"",value:c.value+""})}else for(s in u)has(u,s)&&f.push({key:s,value:u[s]+""});else parseSearchParams(f,"string"==typeof u?"?"===u.charAt(0)?u.slice(1):u:u+"")},Rr=Cr.prototype;redefineAll(Rr,{append:function append(e,t){validateArgumentsLength(arguments.length,2);var r=Sr(this);r.entries.push({key:e+"",value:t+""}),r.updateURL()},delete:function(e){validateArgumentsLength(arguments.length,1);for(var t=Sr(this),r=t.entries,n=e+"",o=0;o<r.length;)r[o].key===n?r.splice(o,1):o++;t.updateURL()},get:function get(e){validateArgumentsLength(arguments.length,1);for(var t=Sr(this).entries,r=e+"",n=0;n<t.length;n++)if(t[n].key===r)return t[n].value;return null},getAll:function getAll(e){validateArgumentsLength(arguments.length,1);for(var t=Sr(this).entries,r=e+"",n=[],o=0;o<t.length;o++)t[o].key===r&&n.push(t[o].value);return n},has:function has(e){validateArgumentsLength(arguments.length,1);for(var t=Sr(this).entries,r=e+"",n=0;n<t.length;)if(t[n++].key===r)return!0;return!1},set:function set(e,t){validateArgumentsLength(arguments.length,1);for(var r,n=Sr(this),o=n.entries,i=!1,a=e+"",c=t+"",s=0;s<o.length;s++)(r=o[s]).key===a&&(i?o.splice(s--,1):(i=!0,r.value=c));i||o.push({key:a,value:c}),n.updateURL()},sort:function sort(){var e,t,r,n=Sr(this),o=n.entries,i=o.slice();for(o.length=0,r=0;r<i.length;r++){for(e=i[r],t=0;t<r;t++)if(o[t].key>e.key){o.splice(t,0,e);break}t===r&&o.push(e)}n.updateURL()},forEach:function forEach(e){for(var t,r=Sr(this).entries,n=functionBindContext(e,arguments.length>1?arguments[1]:void 0,3),o=0;o<r.length;)n((t=r[o++]).value,t.key,this)},keys:function keys(){return new Er(this,"keys")},values:function values(){return new Er(this,"values")},entries:function entries(){return new Er(this,"entries")}},{enumerable:!0}),B(Rr,vr,Rr.entries),B(Rr,"toString",(function toString(){for(var e,t=Sr(this).entries,r=[],n=0;n<t.length;)e=t[n++],r.push(serialize(e.key)+"="+serialize(e.value));return r.join("&")}),{enumerable:!0}),setToStringTag(Cr,mr),_export({global:!0,forced:!tr},{URLSearchParams:Cr}),tr||"function"!=typeof gr||"function"!=typeof yr||_export({global:!0,enumerable:!0,forced:!0},{fetch:function fetch(e){var t,r,n,o=[e];return arguments.length>1&&(isObject(t=arguments[1])&&(r=t.body,ft(r)===mr&&((n=t.headers?new yr(t.headers):new yr).has("content-type")||n.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"),t=Ce(t,{body:createPropertyDescriptor(0,String(r)),headers:createPropertyDescriptor(0,n)}))),o.push(t)),gr.apply(this,o)}});var jr,Ar={URLSearchParams:Cr,getState:Sr},Tr=kt.codeAt,Ir=r.URL,Lr=Ar.URLSearchParams,Mr=Ar.getState,Fr=$.set,Dr=$.getterFor("URL"),Nr=Math.floor,Ur=Math.pow,$r="Invalid scheme",Br="Invalid host",Gr="Invalid port",zr=/[A-Za-z]/,qr=/[\d+-.A-Za-z]/,Vr=/\d/,Kr=/^(0x|0X)/,Wr=/^[0-7]+$/,Hr=/^\d+$/,Zr=/^[\dA-Fa-f]+$/,Yr=/[\u0000\u0009\u000A\u000D #%/:?@[\\]]/,Jr=/[\u0000\u0009\u000A\u000D #/:?@[\\]]/,Xr=/^[\u0000-\u001F ]+|[\u0000-\u001F ]+$/g,Qr=/[\u0009\u000A\u000D]/g,parseHost=function(e,t){var r,n,o;if("["==t.charAt(0)){if("]"!=t.charAt(t.length-1))return Br;if(!(r=parseIPv6(t.slice(1,-1))))return Br;e.host=r}else if(isSpecial(e)){if(t=function(e){var t,r,n=[],o=e.toLowerCase().replace(fr,".").split(".");for(t=0;t<o.length;t++)r=o[t],n.push(lr.test(r)?"xn--"+encode(r):r);return n.join(".")}(t),Yr.test(t))return Br;if(null===(r=parseIPv4(t)))return Br;e.host=r}else{if(Jr.test(t))return Br;for(r="",n=sr(t),o=0;o<n.length;o++)r+=percentEncode(n[o],en);e.host=r}},parseIPv4=function(e){var t,r,n,o,i,a,c,s=e.split(".");if(s.length&&""==s[s.length-1]&&s.pop(),(t=s.length)>4)return e;for(r=[],n=0;n<t;n++){if(""==(o=s[n]))return e;if(i=10,o.length>1&&"0"==o.charAt(0)&&(i=Kr.test(o)?16:8,o=o.slice(8==i?1:2)),""===o)a=0;else{if(!(10==i?Hr:8==i?Wr:Zr).test(o))return e;a=parseInt(o,i)}r.push(a)}for(n=0;n<t;n++)if(a=r[n],n==t-1){if(a>=Ur(256,5-t))return null}else if(a>255)return null;for(c=r.pop(),n=0;n<r.length;n++)c+=r[n]*Ur(256,3-n);return c},parseIPv6=function(e){var t,r,n,o,i,a,c,s=[0,0,0,0,0,0,0,0],u=0,l=null,f=0,char=function(){return e.charAt(f)};if(":"==char()){if(":"!=e.charAt(1))return;f+=2,l=++u}for(;char();){if(8==u)return;if(":"!=char()){for(t=r=0;r<4&&Zr.test(char());)t=16*t+parseInt(char(),16),f++,r++;if("."==char()){if(0==r)return;if(f-=r,u>6)return;for(n=0;char();){if(o=null,n>0){if(!("."==char()&&n<4))return;f++}if(!Vr.test(char()))return;for(;Vr.test(char());){if(i=parseInt(char(),10),null===o)o=i;else{if(0==o)return;o=10*o+i}if(o>255)return;f++}s[u]=256*s[u]+o,2!=++n&&4!=n||u++}if(4!=n)return;break}if(":"==char()){if(f++,!char())return}else if(char())return;s[u++]=t}else{if(null!==l)return;f++,l=++u}}if(null!==l)for(a=u-l,u=7;0!=u&&a>0;)c=s[u],s[u--]=s[l+a-1],s[l+--a]=c;else if(8!=u)return;return s},serializeHost=function(e){var t,r,n,o;if("number"==typeof e){for(t=[],r=0;r<4;r++)t.unshift(e%256),e=Nr(e/256);return t.join(".")}if("object"==typeof e){for(t="",n=function(e){for(var t=null,r=1,n=null,o=0,i=0;i<8;i++)0!==e[i]?(o>r&&(t=n,r=o),n=null,o=0):(null===n&&(n=i),++o);return o>r&&(t=n,r=o),t}(e),r=0;r<8;r++)o&&0===e[r]||(o&&(o=!1),n===r?(t+=r?":":"::",o=!0):(t+=e[r].toString(16),r<7&&(t+=":")));return"["+t+"]"}return e},en={},tn=or({},en,{" ":1,'"':1,"<":1,">":1,"`":1}),rn=or({},tn,{"#":1,"?":1,"{":1,"}":1}),nn=or({},rn,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),percentEncode=function(e,t){var r=Tr(e,0);return r>32&&r<127&&!has(t,e)?e:encodeURIComponent(e)},on={ftp:21,file:null,http:80,https:443,ws:80,wss:443},isSpecial=function(e){return has(on,e.scheme)},includesCredentials=function(e){return""!=e.username||""!=e.password},cannotHaveUsernamePasswordPort=function(e){return!e.host||e.cannotBeABaseURL||"file"==e.scheme},isWindowsDriveLetter=function(e,t){var r;return 2==e.length&&zr.test(e.charAt(0))&&(":"==(r=e.charAt(1))||!t&&"|"==r)},startsWithWindowsDriveLetter=function(e){var t;return e.length>1&&isWindowsDriveLetter(e.slice(0,2))&&(2==e.length||"/"===(t=e.charAt(2))||"\\"===t||"?"===t||"#"===t)},shortenURLsPath=function(e){var t=e.path,r=t.length;!r||"file"==e.scheme&&1==r&&isWindowsDriveLetter(t[0],!0)||t.pop()},isSingleDot=function(e){return"."===e||"%2e"===e.toLowerCase()},an={},cn={},sn={},un={},ln={},fn={},pn={},hn={},dn={},gn={},yn={},vn={},mn={},bn={},_n={},Sn={},wn={},On={},xn={},kn={},Pn={},parseURL=function(e,t,r,n){var o,i,a,c,s,u=r||an,l=0,f="",p=!1,h=!1,d=!1;for(r||(e.scheme="",e.username="",e.password="",e.host=null,e.port=null,e.path=[],e.query=null,e.fragment=null,e.cannotBeABaseURL=!1,t=t.replace(Xr,"")),t=t.replace(Qr,""),o=sr(t);l<=o.length;){switch(i=o[l],u){case an:if(!i||!zr.test(i)){if(r)return $r;u=sn;continue}f+=i.toLowerCase(),u=cn;break;case cn:if(i&&(qr.test(i)||"+"==i||"-"==i||"."==i))f+=i.toLowerCase();else{if(":"!=i){if(r)return $r;f="",u=sn,l=0;continue}if(r&&(isSpecial(e)!=has(on,f)||"file"==f&&(includesCredentials(e)||null!==e.port)||"file"==e.scheme&&!e.host))return;if(e.scheme=f,r)return void(isSpecial(e)&&on[e.scheme]==e.port&&(e.port=null));f="","file"==e.scheme?u=bn:isSpecial(e)&&n&&n.scheme==e.scheme?u=un:isSpecial(e)?u=hn:"/"==o[l+1]?(u=ln,l++):(e.cannotBeABaseURL=!0,e.path.push(""),u=xn)}break;case sn:if(!n||n.cannotBeABaseURL&&"#"!=i)return $r;if(n.cannotBeABaseURL&&"#"==i){e.scheme=n.scheme,e.path=n.path.slice(),e.query=n.query,e.fragment="",e.cannotBeABaseURL=!0,u=Pn;break}u="file"==n.scheme?bn:fn;continue;case un:if("/"!=i||"/"!=o[l+1]){u=fn;continue}u=dn,l++;break;case ln:if("/"==i){u=gn;break}u=On;continue;case fn:if(e.scheme=n.scheme,i==jr)e.username=n.username,e.password=n.password,e.host=n.host,e.port=n.port,e.path=n.path.slice(),e.query=n.query;else if("/"==i||"\\"==i&&isSpecial(e))u=pn;else if("?"==i)e.username=n.username,e.password=n.password,e.host=n.host,e.port=n.port,e.path=n.path.slice(),e.query="",u=kn;else{if("#"!=i){e.username=n.username,e.password=n.password,e.host=n.host,e.port=n.port,e.path=n.path.slice(),e.path.pop(),u=On;continue}e.username=n.username,e.password=n.password,e.host=n.host,e.port=n.port,e.path=n.path.slice(),e.query=n.query,e.fragment="",u=Pn}break;case pn:if(!isSpecial(e)||"/"!=i&&"\\"!=i){if("/"!=i){e.username=n.username,e.password=n.password,e.host=n.host,e.port=n.port,u=On;continue}u=gn}else u=dn;break;case hn:if(u=dn,"/"!=i||"/"!=f.charAt(l+1))continue;l++;break;case dn:if("/"!=i&&"\\"!=i){u=gn;continue}break;case gn:if("@"==i){p&&(f="%40"+f),p=!0,a=sr(f);for(var g=0;g<a.length;g++){var y=a[g];if(":"!=y||d){var v=percentEncode(y,nn);d?e.password+=v:e.username+=v}else d=!0}f=""}else if(i==jr||"/"==i||"?"==i||"#"==i||"\\"==i&&isSpecial(e)){if(p&&""==f)return"Invalid authority";l-=sr(f).length+1,f="",u=yn}else f+=i;break;case yn:case vn:if(r&&"file"==e.scheme){u=Sn;continue}if(":"!=i||h){if(i==jr||"/"==i||"?"==i||"#"==i||"\\"==i&&isSpecial(e)){if(isSpecial(e)&&""==f)return Br;if(r&&""==f&&(includesCredentials(e)||null!==e.port))return;if(c=parseHost(e,f))return c;if(f="",u=wn,r)return;continue}"["==i?h=!0:"]"==i&&(h=!1),f+=i}else{if(""==f)return Br;if(c=parseHost(e,f))return c;if(f="",u=mn,r==vn)return}break;case mn:if(!Vr.test(i)){if(i==jr||"/"==i||"?"==i||"#"==i||"\\"==i&&isSpecial(e)||r){if(""!=f){var m=parseInt(f,10);if(m>65535)return Gr;e.port=isSpecial(e)&&m===on[e.scheme]?null:m,f=""}if(r)return;u=wn;continue}return Gr}f+=i;break;case bn:if(e.scheme="file","/"==i||"\\"==i)u=_n;else{if(!n||"file"!=n.scheme){u=On;continue}if(i==jr)e.host=n.host,e.path=n.path.slice(),e.query=n.query;else if("?"==i)e.host=n.host,e.path=n.path.slice(),e.query="",u=kn;else{if("#"!=i){startsWithWindowsDriveLetter(o.slice(l).join(""))||(e.host=n.host,e.path=n.path.slice(),shortenURLsPath(e)),u=On;continue}e.host=n.host,e.path=n.path.slice(),e.query=n.query,e.fragment="",u=Pn}}break;case _n:if("/"==i||"\\"==i){u=Sn;break}n&&"file"==n.scheme&&!startsWithWindowsDriveLetter(o.slice(l).join(""))&&(isWindowsDriveLetter(n.path[0],!0)?e.path.push(n.path[0]):e.host=n.host),u=On;continue;case Sn:if(i==jr||"/"==i||"\\"==i||"?"==i||"#"==i){if(!r&&isWindowsDriveLetter(f))u=On;else if(""==f){if(e.host="",r)return;u=wn}else{if(c=parseHost(e,f))return c;if("localhost"==e.host&&(e.host=""),r)return;f="",u=wn}continue}f+=i;break;case wn:if(isSpecial(e)){if(u=On,"/"!=i&&"\\"!=i)continue}else if(r||"?"!=i)if(r||"#"!=i){if(i!=jr&&(u=On,"/"!=i))continue}else e.fragment="",u=Pn;else e.query="",u=kn;break;case On:if(i==jr||"/"==i||"\\"==i&&isSpecial(e)||!r&&("?"==i||"#"==i)){if(".."===(s=(s=f).toLowerCase())||"%2e."===s||".%2e"===s||"%2e%2e"===s?(shortenURLsPath(e),"/"==i||"\\"==i&&isSpecial(e)||e.path.push("")):isSingleDot(f)?"/"==i||"\\"==i&&isSpecial(e)||e.path.push(""):("file"==e.scheme&&!e.path.length&&isWindowsDriveLetter(f)&&(e.host&&(e.host=""),f=f.charAt(0)+":"),e.path.push(f)),f="","file"==e.scheme&&(i==jr||"?"==i||"#"==i))for(;e.path.length>1&&""===e.path[0];)e.path.shift();"?"==i?(e.query="",u=kn):"#"==i&&(e.fragment="",u=Pn)}else f+=percentEncode(i,rn);break;case xn:"?"==i?(e.query="",u=kn):"#"==i?(e.fragment="",u=Pn):i!=jr&&(e.path[0]+=percentEncode(i,en));break;case kn:r||"#"!=i?i!=jr&&("'"==i&&isSpecial(e)?e.query+="%27":e.query+="#"==i?"%23":percentEncode(i,en)):(e.fragment="",u=Pn);break;case Pn:i!=jr&&(e.fragment+=percentEncode(i,tn))}l++}},En=function URL(e){var t,r,o=anInstance(this,En,"URL"),i=arguments.length>1?arguments[1]:void 0,a=String(e),c=Fr(o,{type:"URL"});if(void 0!==i)if(i instanceof En)t=Dr(i);else if(r=parseURL(t={},String(i)))throw TypeError(r);if(r=parseURL(c,a,null,t))throw TypeError(r);var s=c.searchParams=new Lr,u=Mr(s);u.updateSearchParams(c.query),u.updateURL=function(){c.query=String(s)||null},n||(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))},Cn=En.prototype,serializeURL=function(){var e=Dr(this),t=e.scheme,r=e.username,n=e.password,o=e.host,i=e.port,a=e.path,c=e.query,s=e.fragment,u=t+":";return null!==o?(u+="//",includesCredentials(e)&&(u+=r+(n?":"+n:"")+"@"),u+=serializeHost(o),null!==i&&(u+=":"+i)):"file"==t&&(u+="//"),u+=e.cannotBeABaseURL?a[0]:a.length?"/"+a.join("/"):"",null!==c&&(u+="?"+c),null!==s&&(u+="#"+s),u},getOrigin=function(){var e=Dr(this),t=e.scheme,r=e.port;if("blob"==t)try{return new URL(t.path[0]).origin}catch(e){return"null"}return"file"!=t&&isSpecial(e)?t+"://"+serializeHost(e.host)+(null!==r?":"+r:""):"null"},getProtocol=function(){return Dr(this).scheme+":"},getUsername=function(){return Dr(this).username},getPassword=function(){return Dr(this).password},getHost=function(){var e=Dr(this),t=e.host,r=e.port;return null===t?"":null===r?serializeHost(t):serializeHost(t)+":"+r},getHostname=function(){var e=Dr(this).host;return null===e?"":serializeHost(e)},getPort=function(){var e=Dr(this).port;return null===e?"":String(e)},getPathname=function(){var e=Dr(this),t=e.path;return e.cannotBeABaseURL?t[0]:t.length?"/"+t.join("/"):""},getSearch=function(){var e=Dr(this).query;return e?"?"+e:""},getSearchParams=function(){return Dr(this).searchParams},getHash=function(){var e=Dr(this).fragment;return e?"#"+e:""},accessorDescriptor=function(e,t){return{get:e,set:t,configurable:!0,enumerable:!0}};if(n&&ke(Cn,{href:accessorDescriptor(serializeURL,(function(e){var t=Dr(this),r=String(e),n=parseURL(t,r);if(n)throw TypeError(n);Mr(t.searchParams).updateSearchParams(t.query)})),origin:accessorDescriptor(getOrigin),protocol:accessorDescriptor(getProtocol,(function(e){var t=Dr(this);parseURL(t,String(e)+":",an)})),username:accessorDescriptor(getUsername,(function(e){var t=Dr(this),r=sr(String(e));if(!cannotHaveUsernamePasswordPort(t)){t.username="";for(var n=0;n<r.length;n++)t.username+=percentEncode(r[n],nn)}})),password:accessorDescriptor(getPassword,(function(e){var t=Dr(this),r=sr(String(e));if(!cannotHaveUsernamePasswordPort(t)){t.password="";for(var n=0;n<r.length;n++)t.password+=percentEncode(r[n],nn)}})),host:accessorDescriptor(getHost,(function(e){var t=Dr(this);t.cannotBeABaseURL||parseURL(t,String(e),yn)})),hostname:accessorDescriptor(getHostname,(function(e){var t=Dr(this);t.cannotBeABaseURL||parseURL(t,String(e),vn)})),port:accessorDescriptor(getPort,(function(e){var t=Dr(this);cannotHaveUsernamePasswordPort(t)||(""==(e=String(e))?t.port=null:parseURL(t,e,mn))})),pathname:accessorDescriptor(getPathname,(function(e){var t=Dr(this);t.cannotBeABaseURL||(t.path=[],parseURL(t,e+"",wn))})),search:accessorDescriptor(getSearch,(function(e){var t=Dr(this);""==(e=String(e))?t.query=null:("?"==e.charAt(0)&&(e=e.slice(1)),t.query="",parseURL(t,e,kn)),Mr(t.searchParams).updateSearchParams(t.query)})),searchParams:accessorDescriptor(getSearchParams),hash:accessorDescriptor(getHash,(function(e){var t=Dr(this);""!=(e=String(e))?("#"==e.charAt(0)&&(e=e.slice(1)),t.fragment="",parseURL(t,e,Pn)):t.fragment=null}))}),B(Cn,"toJSON",(function toJSON(){return serializeURL.call(this)}),{enumerable:!0}),B(Cn,"toString",(function toString(){return serializeURL.call(this)}),{enumerable:!0}),Ir){var Rn=Ir.createObjectURL,jn=Ir.revokeObjectURL;Rn&&B(En,"createObjectURL",(function createObjectURL(e){return Rn.apply(Ir,arguments)})),jn&&B(En,"revokeObjectURL",(function revokeObjectURL(e){return jn.apply(Ir,arguments)}))}function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function asyncGeneratorStep(e,t,r,n,o,i,a){try{var c=e[i](a),s=c.value}catch(e){return void r(e)}c.done?t(s):Promise.resolve(s).then(n,o)}function _asyncToGenerator(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function _next(e){asyncGeneratorStep(i,n,o,_next,_throw,"next",e)}function _throw(e){asyncGeneratorStep(i,n,o,_next,_throw,"throw",e)}_next(void 0)}))}}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),e}function _defineProperty(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf(e,t)}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(e,t){return e.__proto__=t,e})(e,t)}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function _construct(e,t,r){return(_construct=_isNativeReflectConstruct()?Reflect.construct:function _construct(e,t,r){var n=[null];n.push.apply(n,t);var o=new(Function.bind.apply(e,n));return r&&_setPrototypeOf(o,r.prototype),o}).apply(null,arguments)}function _wrapNativeSuper(e){var t="function"==typeof Map?new Map:void 0;return(_wrapNativeSuper=function _wrapNativeSuper(e){if(null===e||!function _isNativeFunction(e){return-1!==Function.toString.call(e).indexOf("[native code]")}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,Wrapper)}function Wrapper(){return _construct(e,arguments,_getPrototypeOf(this).constructor)}return Wrapper.prototype=Object.create(e.prototype,{constructor:{value:Wrapper,enumerable:!1,writable:!0,configurable:!0}}),_setPrototypeOf(Wrapper,e)})(e)}function _possibleConstructorReturn(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function _createSuper(e){var t=_isNativeReflectConstruct();return function _createSuperInternal(){var r,n=_getPrototypeOf(e);if(t){var o=_getPrototypeOf(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return _possibleConstructorReturn(this,r)}}function _superPropBase(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=_getPrototypeOf(e)););return e}function _get(e,t,r){return(_get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function _get(e,t,r){var n=_superPropBase(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(r):o.value}})(e,t,r||e)}function set$1(e,t,r,n){return(set$1="undefined"!=typeof Reflect&&Reflect.set?Reflect.set:function set(e,t,r,n){var o,i=_superPropBase(e,t);if(i){if((o=Object.getOwnPropertyDescriptor(i,t)).set)return o.set.call(n,r),!0;if(!o.writable)return!1}if(o=Object.getOwnPropertyDescriptor(n,t)){if(!o.writable)return!1;o.value=r,Object.defineProperty(n,t,o)}else _defineProperty(n,t,r);return!0})(e,t,r,n)}function _set(e,t,r,n,o){if(!set$1(e,t,r,n||e)&&o)throw new Error("failed to set property");return r}function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function _slicedToArray(e,t){return function _arrayWithHoles(e){if(Array.isArray(e))return e}(e)||function _iterableToArrayLimit(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var r=[],n=!0,o=!1,i=void 0;try{for(var a,c=e[Symbol.iterator]();!(n=(a=c.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(e){o=!0,i=e}finally{try{n||null==c.return||c.return()}finally{if(o)throw i}}return r}(e,t)||_unsupportedIterableToArray(e,t)||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 _toConsumableArray(e){return function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}(e)||function _iterableToArray(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||_unsupportedIterableToArray(e)||function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_arrayLikeToArray(e,t):void 0}}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}setToStringTag(En,"URL"),_export({global:!0,forced:!tr,sham:!n},{URL:En}),_export({target:"Object",stat:!0,forced:Object.assign!==or},{assign:or});var An,Tn,In=getBuiltIn("navigator","userAgent")||"",Ln=r.process,Mn=Ln&&Ln.versions,Fn=Mn&&Mn.v8;Fn?Tn=(An=Fn.split("."))[0]+An[1]:In&&(!(An=In.match(/Edge\/(\d+)/))||An[1]>=74)&&(An=In.match(/Chrome\/(\d+)/))&&(Tn=An[1]);var Dn=Tn&&+Tn,Nn=wellKnownSymbol("species"),arrayMethodHasSpeciesSupport=function(e){return Dn>=51||!fails((function(){var t=[];return(t.constructor={})[Nn]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},Un=wellKnownSymbol("isConcatSpreadable"),$n=9007199254740991,Bn="Maximum allowed index exceeded",Gn=Dn>=51||!fails((function(){var e=[];return e[Un]=!1,e.concat()[0]!==e})),zn=arrayMethodHasSpeciesSupport("concat"),isConcatSpreadable=function(e){if(!isObject(e))return!1;var t=e[Un];return void 0!==t?!!t:se(e)};_export({target:"Array",proto:!0,forced:!Gn||!zn},{concat:function concat(e){var t,r,n,o,i,a=toObject(this),c=arraySpeciesCreate(a,0),s=0;for(t=-1,n=arguments.length;t<n;t++)if(isConcatSpreadable(i=-1===t?a:arguments[t])){if(s+(o=toLength(i.length))>$n)throw TypeError(Bn);for(r=0;r<o;r++,s++)r in i&&createProperty(c,s,i[r])}else{if(s>=$n)throw TypeError(Bn);createProperty(c,s++,i)}return c.length=s,c}}),_export({target:"String",stat:!0},{raw:function raw(e){for(var t=toIndexedObject(e.raw),r=toLength(t.length),n=arguments.length,o=[],i=0;r>i;)o.push(String(t[i++])),i<n&&o.push(String(arguments[i]));return o.join("")}});var qn=function html(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return Vn.html.apply(Vn,[e].concat(r)).content},Vn={html:function html(e){for(var t=document.createElement("template"),r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];return t.innerHTML=String.raw.apply(String,[e].concat(n)),t}},Kn=X.f,Wn={}.toString,Hn="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],Zn={f:function getOwnPropertyNames(e){return Hn&&"[object Window]"==Wn.call(e)?function(e){try{return Kn(e)}catch(e){return Hn.slice()}}(e):Kn(toIndexedObject(e))}},Yn={f:wellKnownSymbol},Jn=v.f,defineWellKnownSymbol=function(e){var t=G.Symbol||(G.Symbol={});has(t,e)||Jn(t,e,{value:Yn.f(e)})},Xn=ye.forEach,Qn=sharedKey("hidden"),eo="Symbol",to=wellKnownSymbol("toPrimitive"),ro=$.set,no=$.getterFor(eo),oo=Object.prototype,io=r.Symbol,ao=getBuiltIn("JSON","stringify"),co=g.f,so=v.f,uo=Zn.f,lo=a.f,fo=C("symbols"),po=C("op-symbols"),ho=C("string-to-symbol-registry"),go=C("symbol-to-string-registry"),yo=C("wks"),vo=r.QObject,mo=!vo||!vo.prototype||!vo.prototype.findChild,bo=n&&fails((function(){return 7!=Ce(so({},"a",{get:function(){return so(this,"a",{value:7}).a}})).a}))?function(e,t,r){var n=co(oo,t);n&&delete oo[t],so(e,t,r),n&&e!==oo&&so(oo,t,n)}:so,wrap=function(e,t){var r=fo[e]=Ce(io.prototype);return ro(r,{type:eo,tag:e,description:t}),n||(r.description=t),r},_o=le?function(e){return"symbol"==typeof e}:function(e){return Object(e)instanceof io},So=function defineProperty(e,t,r){e===oo&&So(po,t,r),anObject(e);var n=toPrimitive(t,!0);return anObject(r),has(fo,n)?(r.enumerable?(has(e,Qn)&&e[Qn][n]&&(e[Qn][n]=!1),r=Ce(r,{enumerable:createPropertyDescriptor(0,!1)})):(has(e,Qn)||so(e,Qn,createPropertyDescriptor(1,{})),e[Qn][n]=!0),bo(e,n,r)):so(e,n,r)},wo=function defineProperties(e,t){anObject(e);var r=toIndexedObject(t),o=xe(r).concat(Po(r));return Xn(o,(function(t){n&&!Oo.call(r,t)||So(e,t,r[t])})),e},Oo=function propertyIsEnumerable(e){var t=toPrimitive(e,!0),r=lo.call(this,t);return!(this===oo&&has(fo,t)&&!has(po,t))&&(!(r||!has(this,t)||!has(fo,t)||has(this,Qn)&&this[Qn][t])||r)},xo=function getOwnPropertyDescriptor(e,t){var r=toIndexedObject(e),n=toPrimitive(t,!0);if(r!==oo||!has(fo,n)||has(po,n)){var o=co(r,n);return!o||!has(fo,n)||has(r,Qn)&&r[Qn][n]||(o.enumerable=!0),o}},ko=function getOwnPropertyNames(e){var t=uo(toIndexedObject(e)),r=[];return Xn(t,(function(e){has(fo,e)||has(T,e)||r.push(e)})),r},Po=function getOwnPropertySymbols(e){var t=e===oo,r=uo(t?po:toIndexedObject(e)),n=[];return Xn(r,(function(e){!has(fo,e)||t&&!has(oo,e)||n.push(fo[e])})),n};if(ue||(B((io=function Symbol(){if(this instanceof io)throw TypeError("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?String(arguments[0]):void 0,t=uid(e),setter=function(e){this===oo&&setter.call(po,e),has(this,Qn)&&has(this[Qn],t)&&(this[Qn][t]=!1),bo(this,t,createPropertyDescriptor(1,e))};return n&&mo&&bo(oo,t,{configurable:!0,set:setter}),wrap(t,e)}).prototype,"toString",(function toString(){return no(this).tag})),B(io,"withoutSetter",(function(e){return wrap(uid(e),e)})),a.f=Oo,v.f=So,g.f=xo,X.f=Zn.f=ko,Q.f=Po,Yn.f=function(e){return wrap(wellKnownSymbol(e),e)},n&&(so(io.prototype,"description",{configurable:!0,get:function description(){return no(this).description}}),B(oo,"propertyIsEnumerable",Oo,{unsafe:!0}))),_export({global:!0,wrap:!0,forced:!ue,sham:!ue},{Symbol:io}),Xn(xe(yo),(function(e){defineWellKnownSymbol(e)})),_export({target:eo,stat:!0,forced:!ue},{for:function(e){var t=String(e);if(has(ho,t))return ho[t];var r=io(t);return ho[t]=r,go[r]=t,r},keyFor:function keyFor(e){if(!_o(e))throw TypeError(e+" is not a symbol");if(has(go,e))return go[e]},useSetter:function(){mo=!0},useSimple:function(){mo=!1}}),_export({target:"Object",stat:!0,forced:!ue,sham:!n},{create:function create(e,t){return void 0===t?Ce(e):wo(Ce(e),t)},defineProperty:So,defineProperties:wo,getOwnPropertyDescriptor:xo}),_export({target:"Object",stat:!0,forced:!ue},{getOwnPropertyNames:ko,getOwnPropertySymbols:Po}),_export({target:"Object",stat:!0,forced:fails((function(){Q.f(1)}))},{getOwnPropertySymbols:function getOwnPropertySymbols(e){return Q.f(toObject(e))}}),ao){var Eo=!ue||fails((function(){var e=io();return"[null]"!=ao([e])||"{}"!=ao({a:e})||"{}"!=ao(Object(e))}));_export({target:"JSON",stat:!0,forced:Eo},{stringify:function stringify(e,t,r){for(var n,o=[e],i=1;arguments.length>i;)o.push(arguments[i++]);if(n=t,(isObject(t)||void 0!==e)&&!_o(e))return se(t)||(t=function(e,t){if("function"==typeof n&&(t=n.call(this,e,t)),!_o(t))return t}),o[1]=t,ao.apply(null,o)}})}io.prototype[to]||m(io.prototype,to,io.prototype.valueOf),setToStringTag(io,eo),T[Qn]=!0;var Co=v.f,Ro=r.Symbol;if(n&&"function"==typeof Ro&&(!("description"in Ro.prototype)||void 0!==Ro().description)){var jo={},Ao=function Symbol(){var e=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),t=this instanceof Ao?new Ro(e):void 0===e?Ro():Ro(e);return""===e&&(jo[t]=!0),t};copyConstructorProperties(Ao,Ro);var To=Ao.prototype=Ro.prototype;To.constructor=Ao;var Io=To.toString,Lo="Symbol(test)"==String(Ro("test")),Mo=/^Symbol\((.*)\)[^)]+$/;Co(To,"description",{configurable:!0,get:function description(){var e=isObject(this)?this.valueOf():this,t=Io.call(e);if(has(jo,e))return"";var r=Lo?t.slice(7,-1):t.replace(Mo,"$1");return""===r?void 0:r}}),_export({global:!0,forced:!0},{Symbol:Ao})}var Fo=ye.filter,Do=arrayMethodHasSpeciesSupport("filter"),No=arrayMethodUsesToLength("filter");_export({target:"Array",proto:!0,forced:!Do||!No},{filter:function filter(e){return Fo(this,e,arguments.length>1?arguments[1]:void 0)}});var Uo=H.indexOf,$o=[].indexOf,Bo=!!$o&&1/[1].indexOf(1,-0)<0,Go=arrayMethodIsStrict("indexOf"),zo=arrayMethodUsesToLength("indexOf",{ACCESSORS:!0,1:0});_export({target:"Array",proto:!0,forced:Bo||!Go||!zo},{indexOf:function indexOf(e){return Bo?$o.apply(this,arguments)||0:Uo(this,e,arguments.length>1?arguments[1]:void 0)}});var qo=ye.map,Vo=arrayMethodHasSpeciesSupport("map"),Ko=arrayMethodUsesToLength("map");_export({target:"Array",proto:!0,forced:!Vo||!Ko},{map:function map(e){return qo(this,e,arguments.length>1?arguments[1]:void 0)}});var Wo=g.f,Ho=fails((function(){Wo(1)}));_export({target:"Object",stat:!0,forced:!n||Ho,sham:!n},{getOwnPropertyDescriptor:function getOwnPropertyDescriptor(e,t){return Wo(toIndexedObject(e),t)}});var Zo=Zn.f,Yo=fails((function(){return!Object.getOwnPropertyNames(1)}));_export({target:"Object",stat:!0,forced:Yo},{getOwnPropertyNames:Zo});var Jo=fails((function(){$e(1)}));_export({target:"Object",stat:!0,forced:Jo,sham:!De},{getPrototypeOf:function getPrototypeOf(e){return $e(toObject(e))}});var Xo=ye.findIndex,Qo="findIndex",ei=!0,ti=arrayMethodUsesToLength(Qo);Qo in[]&&Array(1).findIndex((function(){ei=!1})),_export({target:"Array",proto:!0,forced:ei||!ti},{findIndex:function findIndex(e){return Xo(this,e,arguments.length>1?arguments[1]:void 0)}}),addToUnscopables(Qo),defineWellKnownSymbol("asyncIterator"),defineWellKnownSymbol("iterator"),defineWellKnownSymbol("toStringTag");var ri=[].reverse,ni=[1,2];_export({target:"Array",proto:!0,forced:String(ni)===String(ni.reverse())},{reverse:function reverse(){return se(this)&&(this.length=this.length),ri.call(this)}});var oi=arrayMethodHasSpeciesSupport("slice"),ii=arrayMethodUsesToLength("slice",{ACCESSORS:!0,0:0,1:2}),ai=wellKnownSymbol("species"),ci=[].slice,si=Math.max;_export({target:"Array",proto:!0,forced:!oi||!ii},{slice:function slice(e,t){var r,n,o,i=toIndexedObject(this),a=toLength(i.length),c=toAbsoluteIndex(e,a),s=toAbsoluteIndex(void 0===t?a:t,a);if(se(i)&&("function"!=typeof(r=i.constructor)||r!==Array&&!se(r.prototype)?isObject(r)&&null===(r=r[ai])&&(r=void 0):r=void 0,r===Array||void 0===r))return ci.call(i,c,s);for(n=new(void 0===r?Array:r)(si(s-c,0)),o=0;c<s;c++,o++)c in i&&createProperty(n,o,i[c]);return n.length=o,n}});var ui=Date.prototype,li="Invalid Date",fi="toString",pi=ui.toString,hi=ui.getTime;new Date(NaN)+""!=li&&B(ui,fi,(function toString(){var e=hi.call(this);return e==e?pi.call(this):li}));var di=v.f,gi=Function.prototype,yi=gi.toString,vi=/^\s*function ([^ (]*)/,mi="name";n&&!(mi in gi)&&di(gi,mi,{configurable:!0,get:function(){try{return yi.call(this).match(vi)[1]}catch(e){return""}}}),setToStringTag(r.JSON,"JSON",!0),setToStringTag(Math,"Math",!0),_export({target:"Object",stat:!0,sham:!n},{create:Ce}),_export({target:"Object",stat:!0,forced:!n,sham:!n},{defineProperty:v.f}),_export({target:"Object",stat:!0},{setPrototypeOf:We});var bi=r.Promise,_i=wellKnownSymbol("species"),setSpecies=function(e){var t=getBuiltIn(e),r=v.f;n&&t&&!t[_i]&&r(t,_i,{configurable:!0,get:function(){return this}})},Result=function(e,t){this.stopped=e,this.result=t},iterate=function(e,t,r){var n,o,i,a,c,s,u,l=r&&r.that,f=!(!r||!r.AS_ENTRIES),p=!(!r||!r.IS_ITERATOR),h=!(!r||!r.INTERRUPTED),d=functionBindContext(t,l,1+f+h),stop=function(e){return n&&iteratorClose(n),new Result(!0,e)},callFn=function(e){return f?(anObject(e),h?d(e[0],e[1],stop):d(e[0],e[1])):h?d(e,stop):d(e)};if(p)n=e;else{if("function"!=typeof(o=getIteratorMethod(e)))throw TypeError("Target is not iterable");if(isArrayIteratorMethod(o)){for(i=0,a=toLength(e.length);a>i;i++)if((c=callFn(e[i]))&&c instanceof Result)return c;return new Result(!1)}n=o.call(e)}for(s=n.next;!(u=s.call(n)).done;){try{c=callFn(u.value)}catch(e){throw iteratorClose(n),e}if("object"==typeof c&&c&&c instanceof Result)return c}return new Result(!1)},Si=wellKnownSymbol("iterator"),wi=!1;try{var Oi=0,xi={next:function(){return{done:!!Oi++}},return:function(){wi=!0}};xi[Si]=function(){return this},Array.from(xi,(function(){throw 2}))}catch(e){}var ki,Pi,Ei,checkCorrectnessOfIteration=function(e,t){if(!t&&!wi)return!1;var r=!1;try{var n={};n[Si]=function(){return{next:function(){return{done:r=!0}}}},e(n)}catch(e){}return r},Ci=wellKnownSymbol("species"),Ri=/(iphone|ipod|ipad).*applewebkit/i.test(In),ji="process"==classofRaw(r.process),Ai=r.location,Ti=r.setImmediate,Ii=r.clearImmediate,Li=r.process,Mi=r.MessageChannel,Fi=r.Dispatch,Di=0,Ni={},Ui="onreadystatechange",run=function(e){if(Ni.hasOwnProperty(e)){var t=Ni[e];delete Ni[e],t()}},runner=function(e){return function(){run(e)}},listener=function(e){run(e.data)},post=function(e){r.postMessage(e+"",Ai.protocol+"//"+Ai.host)};Ti&&Ii||(Ti=function setImmediate(e){for(var t=[],r=1;arguments.length>r;)t.push(arguments[r++]);return Ni[++Di]=function(){("function"==typeof e?e:Function(e)).apply(void 0,t)},ki(Di),Di},Ii=function clearImmediate(e){delete Ni[e]},ji?ki=function(e){Li.nextTick(runner(e))}:Fi&&Fi.now?ki=function(e){Fi.now(runner(e))}:Mi&&!Ri?(Ei=(Pi=new Mi).port2,Pi.port1.onmessage=listener,ki=functionBindContext(Ei.postMessage,Ei,1)):r.addEventListener&&"function"==typeof postMessage&&!r.importScripts&&Ai&&"file:"!==Ai.protocol&&!fails(post)?(ki=post,r.addEventListener("message",listener,!1)):ki=Ui in documentCreateElement("script")?function(e){Pe.appendChild(documentCreateElement("script")).onreadystatechange=function(){Pe.removeChild(this),run(e)}}:function(e){setTimeout(runner(e),0)});var $i,Bi,Gi,zi,qi,Vi,Ki,Wi,Hi={set:Ti,clear:Ii},Zi=/web0s(?!.*chrome)/i.test(In),Yi=g.f,Ji=Hi.set,Xi=r.MutationObserver||r.WebKitMutationObserver,Qi=r.document,ea=r.process,ta=r.Promise,ra=Yi(r,"queueMicrotask"),na=ra&&ra.value;na||($i=function(){var e,t;for(ji&&(e=ea.domain)&&e.exit();Bi;){t=Bi.fn,Bi=Bi.next;try{t()}catch(e){throw Bi?zi():Gi=void 0,e}}Gi=void 0,e&&e.enter()},Ri||ji||Zi||!Xi||!Qi?ta&&ta.resolve?(Ki=ta.resolve(void 0),Wi=Ki.then,zi=function(){Wi.call(Ki,$i)}):zi=ji?function(){ea.nextTick($i)}:function(){Ji.call(r,$i)}:(qi=!0,Vi=Qi.createTextNode(""),new Xi($i).observe(Vi,{characterData:!0}),zi=function(){Vi.data=qi=!qi}));var oa,ia,aa,ca,sa=na||function(e){var t={fn:e,next:void 0};Gi&&(Gi.next=t),Bi||(Bi=t,zi()),Gi=t},PromiseCapability=function(e){var t,r;this.promise=new e((function(e,n){if(void 0!==t||void 0!==r)throw TypeError("Bad Promise constructor");t=e,r=n})),this.resolve=aFunction$1(t),this.reject=aFunction$1(r)},ua={f:function(e){return new PromiseCapability(e)}},promiseResolve=function(e,t){if(anObject(e),isObject(t)&&t.constructor===e)return t;var r=ua.f(e);return(0,r.resolve)(t),r.promise},perform=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},la=Hi.set,fa=wellKnownSymbol("species"),pa="Promise",ha=$.get,da=$.set,ga=$.getterFor(pa),ya=bi,va=r.TypeError,ma=r.document,ba=r.process,_a=getBuiltIn("fetch"),Sa=ua.f,wa=Sa,Oa=!!(ma&&ma.createEvent&&r.dispatchEvent),xa="function"==typeof PromiseRejectionEvent,ka="unhandledrejection",Pa=ae(pa,(function(){if(!(k(ya)!==String(ya))){if(66===Dn)return!0;if(!ji&&!xa)return!0}if(Dn>=51&&/native code/.test(ya))return!1;var e=ya.resolve(1),FakePromise=function(e){e((function(){}),(function(){}))};return(e.constructor={})[fa]=FakePromise,!(e.then((function(){}))instanceof FakePromise)})),Ea=Pa||!checkCorrectnessOfIteration((function(e){ya.all(e).catch((function(){}))})),isThenable=function(e){var t;return!(!isObject(e)||"function"!=typeof(t=e.then))&&t},notify$1=function(e,t){if(!e.notified){e.notified=!0;var r=e.reactions;sa((function(){for(var n=e.value,o=1==e.state,i=0;r.length>i;){var a,c,s,u=r[i++],l=o?u.ok:u.fail,f=u.resolve,p=u.reject,h=u.domain;try{l?(o||(2===e.rejection&&onHandleUnhandled(e),e.rejection=1),!0===l?a=n:(h&&h.enter(),a=l(n),h&&(h.exit(),s=!0)),a===u.promise?p(va("Promise-chain cycle")):(c=isThenable(a))?c.call(a,f,p):f(a)):p(n)}catch(e){h&&!s&&h.exit(),p(e)}}e.reactions=[],e.notified=!1,t&&!e.rejection&&onUnhandled(e)}))}},dispatchEvent=function(e,t,n){var o,i;Oa?((o=ma.createEvent("Event")).promise=t,o.reason=n,o.initEvent(e,!1,!0),r.dispatchEvent(o)):o={promise:t,reason:n},!xa&&(i=r["on"+e])?i(o):e===ka&&function(e,t){var n=r.console;n&&n.error&&(1===arguments.length?n.error(e):n.error(e,t))}("Unhandled promise rejection",n)},onUnhandled=function(e){la.call(r,(function(){var t,r=e.facade,n=e.value;if(isUnhandled(e)&&(t=perform((function(){ji?ba.emit("unhandledRejection",n,r):dispatchEvent(ka,r,n)})),e.rejection=ji||isUnhandled(e)?2:1,t.error))throw t.value}))},isUnhandled=function(e){return 1!==e.rejection&&!e.parent},onHandleUnhandled=function(e){la.call(r,(function(){var t=e.facade;ji?ba.emit("rejectionHandled",t):dispatchEvent("rejectionhandled",t,e.value)}))},bind=function(e,t,r){return function(n){e(t,n,r)}},internalReject=function(e,t,r){e.done||(e.done=!0,r&&(e=r),e.value=t,e.state=2,notify$1(e,!0))},internalResolve=function(e,t,r){if(!e.done){e.done=!0,r&&(e=r);try{if(e.facade===t)throw va("Promise can't be resolved itself");var n=isThenable(t);n?sa((function(){var r={done:!1};try{n.call(t,bind(internalResolve,r,e),bind(internalReject,r,e))}catch(t){internalReject(r,t,e)}})):(e.value=t,e.state=1,notify$1(e,!1))}catch(t){internalReject({done:!1},t,e)}}};Pa&&(ya=function Promise(e){anInstance(this,ya,pa),aFunction$1(e),oa.call(this);var t=ha(this);try{e(bind(internalResolve,t),bind(internalReject,t))}catch(e){internalReject(t,e)}},(oa=function Promise(e){da(this,{type:pa,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=redefineAll(ya.prototype,{then:function then(e,t){var r,n,o,i=ga(this),a=Sa((r=ya,void 0===(o=anObject(this).constructor)||null==(n=anObject(o)[Ci])?r:aFunction$1(n)));return a.ok="function"!=typeof e||e,a.fail="function"==typeof t&&t,a.domain=ji?ba.domain:void 0,i.parent=!0,i.reactions.push(a),0!=i.state&&notify$1(i,!1),a.promise},catch:function(e){return this.then(void 0,e)}}),ia=function(){var e=new oa,t=ha(e);this.promise=e,this.resolve=bind(internalResolve,t),this.reject=bind(internalReject,t)},ua.f=Sa=function(e){return e===ya||e===aa?new ia(e):wa(e)},"function"==typeof bi&&(ca=bi.prototype.then,B(bi.prototype,"then",(function then(e,t){var r=this;return new ya((function(e,t){ca.call(r,e,t)})).then(e,t)}),{unsafe:!0}),"function"==typeof _a&&_export({global:!0,enumerable:!0,forced:!0},{fetch:function fetch(e){return promiseResolve(ya,_a.apply(r,arguments))}}))),_export({global:!0,wrap:!0,forced:Pa},{Promise:ya}),setToStringTag(ya,pa,!1),setSpecies(pa),aa=getBuiltIn(pa),_export({target:pa,stat:!0,forced:Pa},{reject:function reject(e){var t=Sa(this);return t.reject.call(void 0,e),t.promise}}),_export({target:pa,stat:!0,forced:Pa},{resolve:function resolve(e){return promiseResolve(this,e)}}),_export({target:pa,stat:!0,forced:Ea},{all:function all(e){var t=this,r=Sa(t),n=r.resolve,o=r.reject,i=perform((function(){var r=aFunction$1(t.resolve),i=[],a=0,c=1;iterate(e,(function(e){var s=a++,u=!1;i.push(void 0),c++,r.call(t,e).then((function(e){u||(u=!0,i[s]=e,--c||n(i))}),o)})),--c||n(i)}));return i.error&&o(i.value),r.promise},race:function race(e){var t=this,r=Sa(t),n=r.reject,o=perform((function(){var o=aFunction$1(t.resolve);iterate(e,(function(e){o.call(t,e).then(r.resolve,n)}))}));return o.error&&n(o.value),r.promise}});var Ca="toString",Ra=RegExp.prototype,ja=Ra.toString,Aa=fails((function(){return"/a/b"!=ja.call({source:"a",flags:"b"})})),Ta=ja.name!=Ca;(Aa||Ta)&&B(RegExp.prototype,Ca,(function toString(){var e=anObject(this),t=String(e.source),r=e.flags;return"/"+t+"/"+String(void 0===r&&e instanceof RegExp&&!("flags"in Ra)?regexpFlags.call(e):r)}),{unsafe:!0});createCommonjsModule((function(e){var t=function(e){var t,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(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{define({},"")}catch(e){define=function define(e,t,r){return e[t]=r}}function wrap(e,t,r,n){var o=t&&t.prototype instanceof Generator?t:Generator,i=Object.create(o.prototype),a=new Context(n||[]);return i._invoke=function makeInvokeMethod(e,t,r){var n=s;return function invoke(o,i){if(n===l)throw new Error("Generator is already running");if(n===f){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===p)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===s)throw n=f,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=l;var h=tryCatch(e,t,r);if("normal"===h.type){if(n=r.done?f:u,h.arg===p)continue;return{value:h.arg,done:r.done}}"throw"===h.type&&(n=f,r.method="throw",r.arg=h.arg)}}}(e,r,a),i}function tryCatch(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=wrap;var s="suspendedStart",u="suspendedYield",l="executing",f="completed",p={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var h={};h[i]=function(){return this};var d=Object.getPrototypeOf,g=d&&d(d(values([])));g&&g!==r&&n.call(g,i)&&(h=g);var y=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(h);function defineIteratorMethods(e){["next","throw","return"].forEach((function(t){define(e,t,(function(e){return this._invoke(t,e)}))}))}function AsyncIterator(e,t){var r;this._invoke=function enqueue(o,i){function callInvokeWithMethodAndArg(){return new t((function(r,a){!function invoke(r,o,i,a){var c=tryCatch(e[r],e,o);if("throw"!==c.type){var s=c.arg,u=s.value;return u&&"object"===_typeof(u)&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){invoke("next",e,i,a)}),(function(e){invoke("throw",e,i,a)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return invoke("throw",e,i,a)}))}a(c.arg)}(o,i,r,a)}))}return r=r?r.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}}function maybeInvokeDelegate(e,r){var n=e.iterator[r.method];if(n===t){if(r.delegate=null,"throw"===r.method){if(e.iterator.return&&(r.method="return",r.arg=t,maybeInvokeDelegate(e,r),"throw"===r.method))return p;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var o=tryCatch(n,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,p;var i=o.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,p):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,p)}function pushTryEntry(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function resetTryEntry(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function Context(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(pushTryEntry,this),this.reset(!0)}function values(e){if(e){var r=e[i];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function next(){for(;++o<e.length;)if(n.call(e,o))return next.value=e[o],next.done=!1,next;return next.value=t,next.done=!0,next};return a.next=a}}return{next:doneResult}}function doneResult(){return{value:t,done:!0}}return GeneratorFunction.prototype=y.constructor=GeneratorFunctionPrototype,GeneratorFunctionPrototype.constructor=GeneratorFunction,GeneratorFunction.displayName=define(GeneratorFunctionPrototype,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===GeneratorFunction||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,GeneratorFunctionPrototype):(e.__proto__=GeneratorFunctionPrototype,define(e,c,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},defineIteratorMethods(AsyncIterator.prototype),AsyncIterator.prototype[a]=function(){return this},e.AsyncIterator=AsyncIterator,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new AsyncIterator(wrap(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},defineIteratorMethods(y),define(y,c,"Generator"),y[i]=function(){return this},y.toString=function(){return"[object Generator]"},e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function next(){for(;t.length;){var r=t.pop();if(r in e)return next.value=r,next.done=!1,next}return next.done=!0,next}},e.values=values,Context.prototype={constructor:Context,reset:function reset(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(resetTryEntry),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function stop(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function dispatchException(e){if(this.done)throw e;var r=this;function handle(n,o){return a.type="throw",a.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!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"),s=n.call(i,"finallyLoc");if(c&&s){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(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return handle(i.finallyLoc)}}}},abrupt:function abrupt(e,t){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"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,p):this.complete(a)},complete:function complete(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),p},finish:function finish(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),resetTryEntry(r),p}},catch:function _catch(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){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(e,r,n){return this.delegate={iterator:values(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),p}},e}(e.exports);try{regeneratorRuntime=t}catch(e){Function("r","regeneratorRuntime = r")(t)}}));var Ia=Symbol("defaultState"),La=Symbol("delegatesFocus"),Ma=Symbol("firstRender"),Fa=Symbol("focusTarget"),Da=Symbol("hasDynamicTemplate"),Na=Symbol("ids"),Ua=Symbol("nativeInternals"),$a=Symbol("raiseChangeEvents"),Ba=Symbol("render"),Ga=Symbol("renderChanges"),za=Symbol("rendered"),qa=Symbol("rendering"),Va=Symbol("setState"),Ka=Symbol("shadowRoot"),Wa=Symbol("shadowRootMode"),Ha=Symbol("state"),Za=Symbol("stateEffects"),Ya=Symbol("template"),Ja=regeneratorRuntime.mark(walkComposedTree);function booleanAttributeValue(e,t){return"boolean"==typeof t?t:"string"==typeof t&&(""===t||e.toLowerCase()===t.toLowerCase())}function deepContains(e,t){for(var r=t;r;){var n=r.assignedSlot||r.parentNode||r.host;if(n===e)return!0;r=n}return!1}function firstFocusableElement(e){var t=walkComposedTree(e,(function(e){return e instanceof HTMLElement&&e.matches('a[href],area[href],button:not([disabled]),details,iframe,input:not([disabled]),select:not([disabled]),textarea:not([disabled]),[contentEditable="true"],[tabindex]')&&e.tabIndex>=0})).next().value;return t instanceof HTMLElement?t:null}function setInternalState$6(e,t,r){e.toggleAttribute(t,r),e[Ua]&&e[Ua].states&&e[Ua].states.toggle(t,r)}var Xa={checked:!0,defer:!0,disabled:!0,hidden:!0,ismap:!0,multiple:!0,noresize:!0,readonly:!0,selected:!0};function walkComposedTree(e,t){var r,n,o;return regeneratorRuntime.wrap((function walkComposedTree$(i){for(;;)switch(i.prev=i.next){case 0:if(!t(e)){i.next=3;break}return i.next=3,e;case 3:if(e instanceof HTMLElement&&e.shadowRoot?r=e.shadowRoot.children:(n=e instanceof HTMLSlotElement?e.assignedNodes({flatten:!0}):[],r=n.length>0?n:e.childNodes),!r){i.next=11;break}o=0;case 6:if(!(o<r.length)){i.next=11;break}return i.delegateYield(walkComposedTree(r[o],t),"t0",8);case 8:o++,i.next=6;break;case 11:case"end":return i.stop()}}),Ja)}var Qa={tabindex:"tabIndex"},ec={tabIndex:"tabindex"};var tc=!fails((function(){return Object.isExtensible(Object.preventExtensions({}))})),rc=createCommonjsModule((function(e){var t=v.f,r=uid("meta"),n=0,o=Object.isExtensible||function(){return!0},setMetadata=function(e){t(e,r,{value:{objectID:"O"+ ++n,weakData:{}}})},i=e.exports={REQUIRED:!1,fastKey:function(e,t){if(!isObject(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!has(e,r)){if(!o(e))return"F";if(!t)return"E";setMetadata(e)}return e[r].objectID},getWeakData:function(e,t){if(!has(e,r)){if(!o(e))return!0;if(!t)return!1;setMetadata(e)}return e[r].weakData},onFreeze:function(e){return tc&&i.REQUIRED&&o(e)&&!has(e,r)&&setMetadata(e),e}};T[r]=!0})),nc=rc.onFreeze,oc=Object.freeze,ic=fails((function(){oc(1)}));_export({target:"Object",stat:!0,forced:ic,sham:!tc},{freeze:function freeze(e){return oc&&isObject(e)?oc(nc(e)):e}});var ac=Object.is||function is(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t};fixRegexpWellKnownSymbolLogic("search",1,(function(e,t,r){return[function search(t){var r=requireObjectCoercible(this),n=null==t?void 0:t[e];return void 0!==n?n.call(t,r):new RegExp(t)[e](String(r))},function(e){var n=r(t,e,this);if(n.done)return n.value;var o=anObject(e),i=String(this),a=o.lastIndex;ac(a,0)||(o.lastIndex=0);var c=regexpExecAbstract(o,i);return ac(o.lastIndex,a)||(o.lastIndex=a),null===c?-1:c.index}]}));var cc=Symbol("state"),sc=Symbol("raiseChangeEventsInNextRender"),uc=Symbol("changedSinceLastRender");function copyStateWithChanges(e,t){for(var r=Object.assign({},e[cc]),n={},o=t;;){var i=fieldsChanged(r,o);if(0===Object.keys(i).length)break;Object.assign(r,o),Object.assign(n,i),o=e[Za](r,i)}return{state:r,changed:n}}function fieldsChanged(e,t){var r,n,o={};for(var i in t)r=t[i],n=e[i],(r instanceof Date&&n instanceof Date?r.getTime()===n.getTime():r===n)||(o[i]=!0);return o}var inheritIfRequired=function(e,t,r){var n,o;return We&&"function"==typeof(n=t.constructor)&&n!==r&&isObject(o=n.prototype)&&o!==r.prototype&&We(e,o),e},lc=v.f,fc=rc.fastKey,pc=$.set,hc=$.getterFor,dc=(function(e,t,n){var o=-1!==e.indexOf("Map"),i=-1!==e.indexOf("Weak"),a=o?"set":"add",c=r[e],s=c&&c.prototype,u=c,l={},fixMethod=function(e){var t=s[e];B(s,e,"add"==e?function add(e){return t.call(this,0===e?0:e),this}:"delete"==e?function(e){return!(i&&!isObject(e))&&t.call(this,0===e?0:e)}:"get"==e?function get(e){return i&&!isObject(e)?void 0:t.call(this,0===e?0:e)}:"has"==e?function has(e){return!(i&&!isObject(e))&&t.call(this,0===e?0:e)}:function set(e,r){return t.call(this,0===e?0:e,r),this})};if(ae(e,"function"!=typeof c||!(i||s.forEach&&!fails((function(){(new c).entries().next()})))))u=n.getConstructor(t,e,o,a),rc.REQUIRED=!0;else if(ae(e,!0)){var f=new u,p=f[a](i?{}:-0,1)!=f,h=fails((function(){f.has(1)})),d=checkCorrectnessOfIteration((function(e){new c(e)})),g=!i&&fails((function(){for(var e=new c,t=5;t--;)e[a](t,t);return!e.has(-0)}));d||((u=t((function(t,r){anInstance(t,u,e);var n=inheritIfRequired(new c,t,u);return null!=r&&iterate(r,n[a],{that:n,AS_ENTRIES:o}),n}))).prototype=s,s.constructor=u),(h||g)&&(fixMethod("delete"),fixMethod("has"),o&&fixMethod("get")),(g||p)&&fixMethod(a),i&&s.clear&&delete s.clear}l[e]=u,_export({global:!0,forced:u!=c},l),setToStringTag(u,e),i||n.setStrong(u,e,o)}("Map",(function(e){return function Map(){return e(this,arguments.length?arguments[0]:void 0)}}),{getConstructor:function(e,t,r,o){var i=e((function(e,a){anInstance(e,i,t),pc(e,{type:t,index:Ce(null),first:void 0,last:void 0,size:0}),n||(e.size=0),null!=a&&iterate(a,e[o],{that:e,AS_ENTRIES:r})})),a=hc(t),define=function(e,t,r){var o,i,c=a(e),s=getEntry(e,t);return s?s.value=r:(c.last=s={index:i=fc(t,!0),key:t,value:r,previous:o=c.last,next:void 0,removed:!1},c.first||(c.first=s),o&&(o.next=s),n?c.size++:e.size++,"F"!==i&&(c.index[i]=s)),e},getEntry=function(e,t){var r,n=a(e),o=fc(t);if("F"!==o)return n.index[o];for(r=n.first;r;r=r.next)if(r.key==t)return r};return redefineAll(i.prototype,{clear:function clear(){for(var e=a(this),t=e.index,r=e.first;r;)r.removed=!0,r.previous&&(r.previous=r.previous.next=void 0),delete t[r.index],r=r.next;e.first=e.last=void 0,n?e.size=0:this.size=0},delete:function(e){var t=this,r=a(t),o=getEntry(t,e);if(o){var i=o.next,c=o.previous;delete r.index[o.index],o.removed=!0,c&&(c.next=i),i&&(i.previous=c),r.first==o&&(r.first=i),r.last==o&&(r.last=c),n?r.size--:t.size--}return!!o},forEach:function forEach(e){for(var t,r=a(this),n=functionBindContext(e,arguments.length>1?arguments[1]:void 0,3);t=t?t.next:r.first;)for(n(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function has(e){return!!getEntry(this,e)}}),redefineAll(i.prototype,r?{get:function get(e){var t=getEntry(this,e);return t&&t.value},set:function set(e,t){return define(this,0===e?0:e,t)}}:{add:function add(e){return define(this,e=0===e?0:e,e)}}),n&&lc(i.prototype,"size",{get:function(){return a(this).size}}),i},setStrong:function(e,t,r){var n=t+" Iterator",o=hc(t),i=hc(n);defineIterator(e,t,(function(e,t){pc(this,{type:n,target:e,state:o(e),kind:t,last:void 0})}),(function(){for(var e=i(this),t=e.kind,r=e.last;r&&r.removed;)r=r.previous;return e.target&&(e.last=r=r?r.next:e.state.first)?"keys"==t?{value:r.key,done:!1}:"values"==t?{value:r.value,done:!1}:{value:[r.key,r.value],done:!1}:(e.target=void 0,{value:void 0,done:!0})}),r?"entries":"values",!r,!0),setSpecies(t)}}),new Map),gc=Symbol("shadowIdProxy"),yc=Symbol("proxyElement"),vc={get:function get(e,t){var r=e[yc][Ka];return r&&"string"==typeof t?r.getElementById(t):null}};var mc=function AttributeMarshallingMixin(e){return function(e){_inherits(AttributeMarshalling,e);var t=_createSuper(AttributeMarshalling);function AttributeMarshalling(){return _classCallCheck(this,AttributeMarshalling),t.apply(this,arguments)}return _createClass(AttributeMarshalling,[{key:"attributeChangedCallback",value:function attributeChangedCallback(e,t,r){if(_get(_getPrototypeOf(AttributeMarshalling.prototype),"attributeChangedCallback",this)&&_get(_getPrototypeOf(AttributeMarshalling.prototype),"attributeChangedCallback",this).call(this,e,t,r),r!==t&&!this[qa]){var n=function attributeToPropertyName(e){var t=Qa[e];if(!t){var r=/-([a-z])/g;t=e.replace(r,(function(e){return e[1].toUpperCase()})),Qa[e]=t}return t}(e);if(n in this){var o=Xa[e]?booleanAttributeValue(e,r):r;this[n]=o}}}}],[{key:"observedAttributes",get:function get(){return function attributesForClass(e){if(e===HTMLElement)return[];var t=Object.getPrototypeOf(e.prototype).constructor,r=t.observedAttributes;r||(r=attributesForClass(t));var n=Object.getOwnPropertyNames(e.prototype).filter((function(t){var r=Object.getOwnPropertyDescriptor(e.prototype,t);return r&&"function"==typeof r.set})).map((function(e){return function propertyNameToAttribute(e){var t=ec[e];if(!t){var r=/([A-Z])/g;t=e.replace(r,"-$1").toLowerCase(),ec[e]=t}return t}(e)})).filter((function(e){return r.indexOf(e)<0}));return r.concat(n)}(this)}}]),AttributeMarshalling}(e)}(function ReactiveMixin(e){var t=function(e){_inherits(Reactive,e);var t,r=_createSuper(Reactive);function Reactive(){var e;return _classCallCheck(this,Reactive),(e=r.call(this))[Ma]=void 0,e[$a]=!1,e[uc]=null,e[Va](e[Ia]),e}return _createClass(Reactive,[{key:"connectedCallback",value:function connectedCallback(){_get(_getPrototypeOf(Reactive.prototype),"connectedCallback",this)&&_get(_getPrototypeOf(Reactive.prototype),"connectedCallback",this).call(this),this[Ga]()}},{key:Ba,value:function value(e){_get(_getPrototypeOf(Reactive.prototype),Ba,this)&&_get(_getPrototypeOf(Reactive.prototype),Ba,this).call(this,e)}},{key:Ga,value:function value(){void 0===this[Ma]&&(this[Ma]=!0);var e=this[uc];if(this[Ma]||e){var t=this[$a];this[$a]=this[sc],this[qa]=!0,this[Ba](e),this[qa]=!1,this[uc]=null,this[za](e),this[Ma]=!1,this[$a]=t,this[sc]=t}}},{key:za,value:function value(e){_get(_getPrototypeOf(Reactive.prototype),za,this)&&_get(_getPrototypeOf(Reactive.prototype),za,this).call(this,e)}},{key:Va,value:(t=_asyncToGenerator(regeneratorRuntime.mark((function _callee(e){var t,r,n,o;return regeneratorRuntime.wrap((function _callee$(i){for(;;)switch(i.prev=i.next){case 0:if(this[qa]&&console.warn("".concat(this.constructor.name," called [setState] during rendering, which you should avoid.\nSee https://elix.org/documentation/ReactiveMixin.")),t=copyStateWithChanges(this,e),r=t.state,n=t.changed,!this[cc]||0!==Object.keys(n).length){i.next=4;break}return i.abrupt("return");case 4:if(Object.freeze(r),this[cc]=r,this[$a]&&(this[sc]=!0),o=void 0===this[Ma]||null!==this[uc],this[uc]=Object.assign(this[uc]||{},n),!this.isConnected||o){i.next=14;break}return i.next=13,Promise.resolve();case 13:this[Ga]();case 14:case"end":return i.stop()}}),_callee,this)}))),function value(e){return t.apply(this,arguments)})},{key:Za,value:function value(e,t){return _get(_getPrototypeOf(Reactive.prototype),Za,this)?_get(_getPrototypeOf(Reactive.prototype),Za,this).call(this,e,t):{}}},{key:Ia,get:function get(){return _get(_getPrototypeOf(Reactive.prototype),Ia,this)||{}}},{key:Ha,get:function get(){return this[cc]}}]),Reactive}(e);return"true"===new URLSearchParams(location.search).get("elixdebug")&&Object.defineProperty(t.prototype,"state",{get:function get(){return this[Ha]}}),t}(function ShadowTemplateMixin(e){return function(e){_inherits(ShadowTemplate,e);var t=_createSuper(ShadowTemplate);function ShadowTemplate(){return _classCallCheck(this,ShadowTemplate),t.apply(this,arguments)}return _createClass(ShadowTemplate,[{key:Ba,value:function value(e){if(_get(_getPrototypeOf(ShadowTemplate.prototype),Ba,this)&&_get(_getPrototypeOf(ShadowTemplate.prototype),Ba,this).call(this,e),!this[Ka]){var t=function getTemplate(e){var t=e[Da]?void 0:dc.get(e.constructor);if(void 0===t){if((t=e[Ya])&&!(t instanceof HTMLTemplateElement))throw"Warning: the [template] property for ".concat(e.constructor.name," must return an HTMLTemplateElement.");e[Da]||dc.set(e.constructor,t||null)}return t}(this);if(t){var r=this.attachShadow({delegatesFocus:this[La],mode:this[Wa]}),n=document.importNode(t.content,!0);r.append(n),this[Ka]=r}else this[Ka]=null}}},{key:Na,get:function get(){if(!this[gc]){var e=_defineProperty({},yc,this);this[gc]=new Proxy(e,vc)}return this[gc]}},{key:Wa,get:function get(){return"open"}}]),ShadowTemplate}(e)}(HTMLElement))),bc=Symbol("checkSize"),_c=Symbol("closestAvailableItemIndex"),Sc=Symbol("contentSlot"),wc=Ia,Oc=Symbol("defaultTabIndex"),xc=La,kc=Symbol("effectEndTarget"),Pc=Ma,Ec=Fa,Cc=Symbol("getItemText"),Rc=Symbol("goDown"),jc=Symbol("goEnd"),Ac=Symbol("goFirst"),Tc=Symbol("goLast"),Ic=Symbol("goLeft"),Lc=Symbol("goNext"),Mc=Symbol("goPrevious"),Fc=Symbol("goRight"),Dc=Symbol("goStart"),Nc=Symbol("goToItemWithPrefix"),Uc=Symbol("goUp"),$c=Da,Bc=Na,Gc=Symbol("inputDelegate"),zc=Symbol("itemsDelegate"),qc=Symbol("keydown"),Vc=Symbol("mouseenter"),Kc=Symbol("mouseleave"),Wc=Ua,Hc=$a,Zc=Ba,Yc=Ga,Jc=Symbol("renderDataToElement"),Xc=za,Qc=qa,es=Symbol("scrollTarget"),ts=Va,rs=Ka,ns=Wa,os=Symbol("startEffect"),as=Ha,cs=Za,ss=Symbol("swipeDown"),us=Symbol("swipeDownComplete"),ls=Symbol("swipeLeft"),fs=Symbol("swipeLeftTransitionEnd"),ps=Symbol("swipeRight"),hs=Symbol("swipeRightTransitionEnd"),ds=Symbol("swipeUp"),gs=Symbol("swipeUpComplete"),ys=Symbol("swipeStart"),vs=Symbol("swipeTarget"),ms=Symbol("tap"),bs=Ya,_s=Symbol("toggleSelectedFlag");"true"===new URLSearchParams(location.search).get("elixdebug")&&(window.elix={internal:{checkSize:bc,closestAvailableItemIndex:_c,contentSlot:Sc,defaultState:wc,defaultTabIndex:Oc,delegatesFocus:xc,effectEndTarget:kc,firstRender:Pc,focusTarget:Ec,getItemText:Cc,goDown:Rc,goEnd:jc,goFirst:Ac,goLast:Tc,goLeft:Ic,goNext:Lc,goPrevious:Mc,goRight:Fc,goStart:Dc,goToItemWithPrefix:Nc,goUp:Uc,hasDynamicTemplate:$c,ids:Bc,inputDelegate:Gc,itemsDelegate:zc,keydown:qc,mouseenter:Vc,mouseleave:Kc,nativeInternals:Wc,event:event,raiseChangeEvents:Hc,render:Zc,renderChanges:Yc,renderDataToElement:Jc,rendered:Xc,rendering:Qc,scrollTarget:es,setState:ts,shadowRoot:rs,shadowRootMode:ns,startEffect:os,state:as,stateEffects:cs,swipeDown:ss,swipeDownComplete:us,swipeLeft:ls,swipeLeftTransitionEnd:fs,swipeRight:ps,swipeRightTransitionEnd:hs,swipeUp:ds,swipeUpComplete:gs,swipeStart:ys,swipeTarget:vs,tap:ms,template:bs,toggleSelectedFlag:_s}});var Ss=Symbol("previousBodyStyleOverflow"),ws=Symbol("previousDocumentMarginRight");function _templateObject(){var e=_taggedTemplateLiteral(['\n <style>\n #focusCapture {\n display: flex;\n height: 100%;\n overflow: hidden;\n width: 100%;\n }\n\n #focusCaptureContainer {\n align-items: center;\n display: flex;\n flex: 1;\n flex-direction: column;\n justify-content: center;\n position: relative;\n }\n </style>\n <div id="focusCapture">\n <div id="focusCaptureContainer"></div>\n <div id="focusCatcher" tabindex="0"></div>\n </div>\n ']);return _templateObject=function _templateObject(){return e},e}var Os=Symbol("wrap"),xs=Symbol("wrappingFocus");function FocusCaptureMixin(e){return function(e){_inherits(FocusCapture,e);var t=_createSuper(FocusCapture);function FocusCapture(){return _classCallCheck(this,FocusCapture),t.apply(this,arguments)}return _createClass(FocusCapture,[{key:qc,value:function value(e){var t=firstFocusableElement(this[rs]);if(t){var r=document.activeElement&&(document.activeElement===t||document.activeElement.contains(t)),n=this[rs].activeElement,o=n&&(n===t||deepContains(n,t));(r||o)&&"Tab"===e.key&&e.shiftKey&&(this[xs]=!0,this[Bc].focusCatcher.focus(),this[xs]=!1)}return _get(_getPrototypeOf(FocusCapture.prototype),qc,this)&&_get(_getPrototypeOf(FocusCapture.prototype),qc,this).call(this,e)||!1}},{key:Zc,value:function value(e){var t=this;_get(_getPrototypeOf(FocusCapture.prototype),Zc,this)&&_get(_getPrototypeOf(FocusCapture.prototype),Zc,this).call(this,e),this[Pc]&&this[Bc].focusCatcher.addEventListener("focus",(function(){if(!t[xs]){var e=firstFocusableElement(t[rs]);e&&e.focus()}}))}},{key:Os,value:function value(e){var t=qn(_templateObject()),r=t.getElementById("focusCaptureContainer");r&&(e.replaceWith(t),r.append(e))}}]),FocusCapture}(e)}FocusCaptureMixin.wrap=Os;var ks="\t\n\v\f\r    \u2028\u2029\ufeff",Ps="["+ks+"]",Es=RegExp("^"+Ps+Ps+"*"),Cs=RegExp(Ps+Ps+"*$"),createMethod$4=function(e){return function(t){var r=String(requireObjectCoercible(t));return 1&e&&(r=r.replace(Es,"")),2&e&&(r=r.replace(Cs,"")),r}},Rs={start:createMethod$4(1),end:createMethod$4(2),trim:createMethod$4(3)},js=X.f,As=g.f,Ts=v.f,Is=Rs.trim,Ls="Number",Ms=r.Number,Fs=Ms.prototype,Ds=classofRaw(Ce(Fs))==Ls,toNumber=function(e){var t,r,n,o,i,a,c,s,u=toPrimitive(e,!1);if("string"==typeof u&&u.length>2)if(43===(t=(u=Is(u)).charCodeAt(0))||45===t){if(88===(r=u.charCodeAt(2))||120===r)return NaN}else if(48===t){switch(u.charCodeAt(1)){case 66:case 98:n=2,o=49;break;case 79:case 111:n=8,o=55;break;default:return+u}for(a=(i=u.slice(2)).length,c=0;c<a;c++)if((s=i.charCodeAt(c))<48||s>o)return NaN;return parseInt(i,n)}return+u};if(ae(Ls,!Ms(" 0o1")||!Ms("0b1")||Ms("+0x1"))){for(var Ns,Us=function Number(e){var t=arguments.length<1?0:e,r=this;return r instanceof Us&&(Ds?fails((function(){Fs.valueOf.call(r)})):classofRaw(r)!=Ls)?inheritIfRequired(new Ms(toNumber(t)),r,Us):toNumber(t)},$s=n?js(Ms):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger,fromString,range".split(","),Bs=0;$s.length>Bs;Bs++)has(Ms,Ns=$s[Bs])&&!has(Us,Ns)&&Ts(Us,Ns,As(Ms,Ns));Us.prototype=Fs,Fs.constructor=Us,B(r,Ls,Us)}function _templateObject$1(){var e=_taggedTemplateLiteral(["\n <style>\n :host {\n display: inline-block;\n height: 100%;\n left: 0;\n position: fixed;\n top: 0;\n touch-action: manipulation;\n width: 100%;\n }\n </style>\n <slot></slot>\n "]);return _templateObject$1=function _templateObject(){return e},e}var Gs=function(e){_inherits(Backdrop,e);var t=_createSuper(Backdrop);function Backdrop(){return _classCallCheck(this,Backdrop),t.apply(this,arguments)}return _createClass(Backdrop,[{key:wc,get:function get(){return Object.assign(_get(_getPrototypeOf(Backdrop.prototype),wc,this),{role:"none"})}},{key:bs,get:function get(){return Vn.html(_templateObject$1())}}]),Backdrop}(function AriaRoleMixin(e){return function(e){_inherits(AriaRole,e);var t=_createSuper(AriaRole);function AriaRole(){return _classCallCheck(this,AriaRole),t.apply(this,arguments)}return _createClass(AriaRole,[{key:Zc,value:function value(e){if(_get(_getPrototypeOf(AriaRole.prototype),Zc,this)&&_get(_getPrototypeOf(AriaRole.prototype),Zc,this).call(this,e),e.role){var t=this[as].role;t?this.setAttribute("role",t):this.removeAttribute("role")}}},{key:wc,get:function get(){return Object.assign(_get(_getPrototypeOf(AriaRole.prototype),wc,this)||{},{role:null})}},{key:"role",get:function get(){return _get(_getPrototypeOf(AriaRole.prototype),"role",this)},set:function set(e){var t=String(e);_set(_getPrototypeOf(AriaRole.prototype),"role",t,this,!0),this[Qc]||this[ts]({s:t})}}]),AriaRole}(e)}(mc)),zs=function(e){_inherits(ModalBackdrop,e);var t=_createSuper(ModalBackdrop);function ModalBackdrop(){var e;return _classCallCheck(this,ModalBackdrop),e=t.call(this),"PointerEvent"in window||e.addEventListener("touchmove",(function(e){1===e.touches.length&&e.preventDefault()})),e}return ModalBackdrop}(Gs),qs=new Map;function createElement(e){if("function"==typeof e){var t;try{t=new e}catch(r){if("TypeError"!==r.name)throw r;!function registerCustomElement(e){var t,r=/^[A-Za-z][A-Za-z0-9_$]*$/,n=e.name&&e.name.match(r);if(n){var o=/([A-Z])/g;t=n[0].replace(o,(function(e,t,r){return r>0?"-".concat(t):t})).toLowerCase()}else t="custom-element";for(var i,a=qs.get(t)||0;i="".concat(t,"-").concat(a),customElements.get(i);a++);customElements.define(i,e),qs.set(t,a+1)}(e),t=new e}return t}return document.createElement(e)}function transmute(e,t){if("function"==typeof t&&e.constructor===t||"string"==typeof t&&e instanceof Element&&e.localName===t)return e;var r=createElement(t);return function replace$2(e,t){var r=e.parentNode;if(!r)throw"An element must have a parent before it can be substituted.";return(e instanceof HTMLElement||e instanceof SVGElement)&&(t instanceof HTMLElement||t instanceof SVGElement)&&(Array.prototype.forEach.call(e.attributes,(function(e){t.getAttribute(e.name)||"class"===e.name||"style"===e.name||t.setAttribute(e.name,e.value)})),Array.prototype.forEach.call(e.classList,(function(e){t.classList.add(e)})),Array.prototype.forEach.call(e.style,(function(r){t.style[r]||(t.style[r]=e.style[r])}))),t.append.apply(t,_toConsumableArray(e.childNodes)),r.replaceChild(t,e),t}(e,r),r}var Vs=Symbol("closePromise"),Ks=Symbol("closeResolve");function _templateObject$2(){var e=_taggedTemplateLiteral(["\n <style>\n :host {\n display: inline-block;\n position: relative;\n }\n </style>\n <slot></slot>\n "]);return _templateObject$2=function _templateObject(){return e},e}var Ws=function(e){_inherits(OverlayFrame,e);var t=_createSuper(OverlayFrame);function OverlayFrame(){return _classCallCheck(this,OverlayFrame),t.apply(this,arguments)}return _createClass(OverlayFrame,[{key:bs,get:function get(){return Vn.html(_templateObject$2())}}]),OverlayFrame}(mc),Hs=!checkCorrectnessOfIteration((function(e){Array.from(e)}));_export({target:"Array",stat:!0,forced:Hs},{from:sr});var Zs=Rs.trim,Ys=r.parseInt,Js=/^[+-]?0[Xx]/,Xs=8!==Ys(ks+"08")||22!==Ys(ks+"0x16")?function parseInt(e,t){var r=Zs(String(e));return Ys(r,t>>>0||(Js.test(r)?16:10))}:Ys;function _templateObject2(){var e=_taggedTemplateLiteral(["\n <style>\n :host([closed]) {\n display: none;\n }\n </style>\n "]);return _templateObject2=function _templateObject2(){return e},e}function _templateObject$3(){var e=_taggedTemplateLiteral([""]);return _templateObject$3=function _templateObject(){return e},e}_export({global:!0,forced:parseInt!=Xs},{parseInt:Xs});var Qs=Symbol("appendedToDocument"),eu=Symbol("assignedZIndex"),tu=Symbol("restoreFocusToElement");function bringToFront(e){var t=function maxZIndexInUse(){var e=document.body.querySelectorAll("*"),t=Array.from(e,(function(e){var t=getComputedStyle(e),r=0;if("static"!==t.position&&"auto"!==t.zIndex){var n=t.zIndex?parseInt(t.zIndex):0;r=isNaN(n)?0:n}return r}));return Math.max.apply(Math,_toConsumableArray(t))}()+1;e[eu]=t,e.style.zIndex=t.toString()}function hasZIndex(e){var t=getComputedStyle(e).zIndex,r=e.style.zIndex,n=!isNaN(parseInt(r));if("auto"===t)return n;if("0"===t&&!n){var o=e.assignedSlot||(e instanceof ShadowRoot?e.host:e.parentNode);if(!(o instanceof HTMLElement))return!0;if(!hasZIndex(o))return!1}return!0}function _templateObject$4(){var e=_taggedTemplateLiteral(['\n <style>\n :host {\n align-items: center;\n display: inline-flex;\n flex-direction: column;\n justify-content: center;\n max-height: 100vh;\n max-width: 100vw;\n outline: none;\n position: fixed;\n -webkit-tap-highlight-color: transparent;\n }\n\n [part~="frame"] {\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n max-height: 100%;\n max-width: 100%;\n overscroll-behavior: contain;\n pointer-events: initial;\n position: relative;\n }\n\n #frameContent {\n display: flex;\n flex: 1;\n flex-direction: column;\n height: 100%;\n overflow: hidden;\n width: 100%;\n }\n </style>\n <div id="backdrop" part="backdrop" tabindex="-1"></div>\n <div id="frame" part="frame" role="none">\n <div id="frameContent">\n <slot></slot>\n </div>\n </div>\n ']);return _templateObject$4=function _templateObject(){return e},e}function renderParts(e,t,r){if(!r||r.backdropPartType){var n=t.backdropPartType,o=e.getElementById("backdrop");o&&transmute(o,n)}if(!r||r.framePartType){var i=t.framePartType,a=e.getElementById("frame");a&&transmute(a,i)}}function _templateObject$5(){var e=_taggedTemplateLiteral(["\n <style>\n :host {\n height: 100%;\n left: 0;\n pointer-events: initial;\n top: 0;\n width: 100%;\n }\n </style>\n "]);return _templateObject$5=function _templateObject(){return e},e}var ru=function(e){_inherits(Dialog,e);var t=_createSuper(Dialog);function Dialog(){return _classCallCheck(this,Dialog),t.apply(this,arguments)}return _createClass(Dialog,[{key:wc,get:function get(){return Object.assign(_get(_getPrototypeOf(Dialog.prototype),wc,this),{backdropPartType:zs,tabIndex:-1})}},{key:bs,get:function get(){var e=_get(_getPrototypeOf(Dialog.prototype),bs,this),t=e.content.querySelector("#frame");return this[FocusCaptureMixin.wrap](t),e.content.append(qn(_templateObject$5())),e}}]),Dialog}(function DialogModalityMixin(e){return function(e){_inherits(DialogModality,e);var t=_createSuper(DialogModality);function DialogModality(){return _classCallCheck(this,DialogModality),t.apply(this,arguments)}return _createClass(DialogModality,[{key:qc,value:function value(e){var t=!1;switch(e.key){case"Escape":this.close({canceled:"Escape"}),t=!0}return t||_get(_getPrototypeOf(DialogModality.prototype),qc,this)&&_get(_getPrototypeOf(DialogModality.prototype),qc,this).call(this,e)||!1}},{key:Zc,value:function value(e){if(_get(_getPrototypeOf(DialogModality.prototype),Zc,this)&&_get(_getPrototypeOf(DialogModality.prototype),Zc,this).call(this,e),e.opened)if(this[as].opened&&document.documentElement){var t=document.documentElement.clientWidth,r=window.innerWidth-t;this[Ss]=document.body.style.overflow,this[ws]=r>0?document.documentElement.style.marginRight:null,document.body.style.overflow="hidden",r>0&&(document.documentElement.style.marginRight="".concat(r,"px"))}else null!=this[Ss]&&(document.body.style.overflow=this[Ss],this[Ss]=null),null!=this[ws]&&(document.documentElement.style.marginRight=this[ws],this[ws]=null);if(e.role){var n=this[as].role;this.setAttribute("role",n)}}},{key:wc,get:function get(){return Object.assign(_get(_getPrototypeOf(DialogModality.prototype),wc,this)||{},{role:"dialog"})}},{key:"role",get:function get(){return _get(_getPrototypeOf(DialogModality.prototype),"role",this)},set:function set(e){_set(_getPrototypeOf(DialogModality.prototype),"role",e,this,!0),this[Qc]||this[ts]({role:e})}}]),DialogModality}(e)}(FocusCaptureMixin(function KeyboardMixin(e){return function(e){_inherits(Keyboard,e);var t=_createSuper(Keyboard);function Keyboard(){var e;return _classCallCheck(this,Keyboard),(e=t.call(this)).addEventListener("keydown",function(){var t=_asyncToGenerator(regeneratorRuntime.mark((function _callee(t){return regeneratorRuntime.wrap((function _callee$(r){for(;;)switch(r.prev=r.next){case 0:return e[Hc]=!0,e[as].focusVisible||e[ts]({focusVisible:!0}),e[qc](t)&&(t.preventDefault(),t.stopImmediatePropagation()),r.next=6,Promise.resolve();case 6:e[Hc]=!1;case 7:case"end":return r.stop()}}),_callee)})));return function(e){return t.apply(this,arguments)}}()),e}return _createClass(Keyboard,[{key:"attributeChangedCallback",value:function attributeChangedCallback(e,t,r){var n;"tabindex"===e?(null===r?n=-1:(n=Number(r),isNaN(n)&&(n=this[Oc]?this[Oc]:0)),this.tabIndex=n):_get(_getPrototypeOf(Keyboard.prototype),"attributeChangedCallback",this).call(this,e,t,r)}},{key:qc,value:function value(e){return!!_get(_getPrototypeOf(Keyboard.prototype),qc,this)&&_get(_getPrototypeOf(Keyboard.prototype),qc,this).call(this,e)}},{key:Zc,value:function value(e){_get(_getPrototypeOf(Keyboard.prototype),Zc,this)&&_get(_getPrototypeOf(Keyboard.prototype),Zc,this).call(this,e),e.tabIndex&&(this.tabIndex=this[as].tabIndex)}},{key:wc,get:function get(){var e=this[xc]?-1:0;return Object.assign(_get(_getPrototypeOf(Keyboard.prototype),wc,this)||{},{tabIndex:e})}},{key:"tabIndex",get:function get(){return _get(_getPrototypeOf(Keyboard.prototype),"tabIndex",this)},set:function set(e){_get(_getPrototypeOf(Keyboard.prototype),"tabIndex",this)!==e&&_set(_getPrototypeOf(Keyboard.prototype),"tabIndex",e,this,!0),this[Qc]||this[ts]({tabIndex:e})}}]),Keyboard}(e)}(function(e){_inherits(Overlay,e);var t=_createSuper(Overlay);function Overlay(){return _classCallCheck(this,Overlay),t.apply(this,arguments)}return _createClass(Overlay,[{key:Zc,value:function value(e){_get(_getPrototypeOf(Overlay.prototype),Zc,this).call(this,e),renderParts(this[rs],this[as],e)}},{key:Xc,value:function value(e){_get(_getPrototypeOf(Overlay.prototype),Xc,this).call(this,e),e.opened&&this[as].content&&this[as].content.forEach((function(e){e[bc]&&e[bc]()}))}},{key:"backdrop",get:function get(){return this[Bc]&&this[Bc].backdrop}},{key:"backdropPartType",get:function get(){return this[as].backdropPartType},set:function set(e){this[ts]({backdropPartType:e})}},{key:wc,get:function get(){return Object.assign(_get(_getPrototypeOf(Overlay.prototype),wc,this),{backdropPartType:Gs,framePartType:Ws})}},{key:"frame",get:function get(){return this[Bc].frame}},{key:"framePartType",get:function get(){return this[as].framePartType},set:function set(e){this[ts]({framePartType:e})}},{key:bs,get:function get(){var e=_get(_getPrototypeOf(Overlay.prototype),bs,this);return e.content.append(qn(_templateObject$4())),renderParts(e.content,this[as]),e}}]),Overlay}(function OpenCloseMixin(e){return function(e){_inherits(OpenClose,e);var t,r,n,o=_createSuper(OpenClose);function OpenClose(){return _classCallCheck(this,OpenClose),o.apply(this,arguments)}return _createClass(OpenClose,[{key:"attributeChangedCallback",value:function attributeChangedCallback(e,t,r){if("opened"===e){var n=booleanAttributeValue(e,r);this.opened!==n&&(this.opened=n)}else _get(_getPrototypeOf(OpenClose.prototype),"attributeChangedCallback",this).call(this,e,t,r)}},{key:"close",value:(n=_asyncToGenerator(regeneratorRuntime.mark((function _callee(e){return regeneratorRuntime.wrap((function _callee$(t){for(;;)switch(t.prev=t.next){case 0:if(!_get(_getPrototypeOf(OpenClose.prototype),"close",this)){t.next=3;break}return t.next=3,_get(_getPrototypeOf(OpenClose.prototype),"close",this).call(this);case 3:return this[ts]({closeResult:e}),t.next=6,this.toggle(!1);case 6:case"end":return t.stop()}}),_callee,this)}))),function close(e){return n.apply(this,arguments)})},{key:"open",value:(r=_asyncToGenerator(regeneratorRuntime.mark((function _callee2(){return regeneratorRuntime.wrap((function _callee2$(e){for(;;)switch(e.prev=e.next){case 0:if(!_get(_getPrototypeOf(OpenClose.prototype),"open",this)){e.next=3;break}return e.next=3,_get(_getPrototypeOf(OpenClose.prototype),"open",this).call(this);case 3:return this[ts]({closeResult:void 0}),e.next=6,this.toggle(!0);case 6:case"end":return e.stop()}}),_callee2,this)}))),function open(){return r.apply(this,arguments)})},{key:Zc,value:function value(e){(_get(_getPrototypeOf(OpenClose.prototype),Zc,this).call(this,e),e.opened)&&setInternalState$6(this,"opened",this[as].opened);e.closeFinished&&setInternalState$6(this,"closed",this[as].closeFinished)}},{key:Xc,value:function value(e){if(_get(_getPrototypeOf(OpenClose.prototype),Xc,this)&&_get(_getPrototypeOf(OpenClose.prototype),Xc,this).call(this,e),e.opened&&this[Hc]){var t=new CustomEvent("opened-changed",{bubbles:!0,detail:{closeResult:this[as].closeResult,opened:this[as].opened}});this.dispatchEvent(t);var r=new CustomEvent("openedchange",{bubbles:!0,detail:{closeResult:this[as].closeResult,opened:this[as].opened}});if(this.dispatchEvent(r),this[as].opened){var n=new CustomEvent("opened",{bubbles:!0});this.dispatchEvent(n);var o=new CustomEvent("open",{bubbles:!0});this.dispatchEvent(o)}else{var i=new CustomEvent("closed",{bubbles:!0,detail:{closeResult:this[as].closeResult}});this.dispatchEvent(i);var a=new CustomEvent("close",{bubbles:!0,detail:{closeResult:this[as].closeResult}});this.dispatchEvent(a)}}var c=this[Ks];this.closeFinished&&c&&(this[Ks]=null,this[Vs]=null,c(this[as].closeResult))}},{key:cs,value:function value(e,t){var r=_get(_getPrototypeOf(OpenClose.prototype),cs,this)?_get(_getPrototypeOf(OpenClose.prototype),cs,this).call(this,e,t):{};if(t.openCloseEffects||t.effect||t.effectPhase||t.opened){var n=e.effect,o=e.effectPhase,i=e.openCloseEffects,a=e.opened,c=i?"close"===n&&"after"===o:!a;Object.assign(r,{closeFinished:c})}return r}},{key:"toggle",value:(t=_asyncToGenerator(regeneratorRuntime.mark((function _callee3(){var e,t,r=arguments;return regeneratorRuntime.wrap((function _callee3$(n){for(;;)switch(n.prev=n.next){case 0:if(e=r.length>0&&void 0!==r[0]?r[0]:!this.opened,!_get(_getPrototypeOf(OpenClose.prototype),"toggle",this)){n.next=4;break}return n.next=4,_get(_getPrototypeOf(OpenClose.prototype),"toggle",this).call(this,e);case 4:if(e===this[as].opened){n.next=10;break}return t={opened:e},this[as].openCloseEffects&&(t.effect=e?"open":"close","after"===this[as].effectPhase&&(t.effectPhase="before")),n.next=10,this[ts](t);case 10:case"end":return n.stop()}}),_callee3,this)}))),function toggle(){return t.apply(this,arguments)})},{key:"whenClosed",value:function whenClosed(){var e=this;return this[Vs]||(this[Vs]=new Promise((function(t){e[Ks]=t}))),this[Vs]}},{key:"closed",get:function get(){return this[as]&&!this[as].opened}},{key:"closeFinished",get:function get(){return this[as].closeFinished}},{key:"closeResult",get:function get(){return this[as].closeResult}},{key:wc,get:function get(){var e={closeResult:null,opened:!1};return this[os]&&Object.assign(e,{closeFinished:!0,effect:"close",effectPhase:"after",openCloseEffects:!0}),Object.assign(_get(_getPrototypeOf(OpenClose.prototype),wc,this)||{},e)}},{key:"opened",get:function get(){return this[as]&&this[as].opened},set:function set(e){this[ts]({closeResult:void 0}),this.toggle(e)}}]),OpenClose}(e)}(function OverlayMixin(e){return function(e){_inherits(Overlay,e);var t,r=_createSuper(Overlay);function Overlay(){return _classCallCheck(this,Overlay),r.apply(this,arguments)}return _createClass(Overlay,[{key:"open",value:(t=_asyncToGenerator(regeneratorRuntime.mark((function _callee(){return regeneratorRuntime.wrap((function _callee$(e){for(;;)switch(e.prev=e.next){case 0:if(this[as].persistent||this.isConnected||(this[Qs]=!0,document.body.append(this)),!_get(_getPrototypeOf(Overlay.prototype),"open",this)){e.next=4;break}return e.next=4,_get(_getPrototypeOf(Overlay.prototype),"open",this).call(this);case 4:case"end":return e.stop()}}),_callee,this)}))),function open(){return t.apply(this,arguments)})},{key:Zc,value:function value(e){var t=this;(_get(_getPrototypeOf(Overlay.prototype),Zc,this)&&_get(_getPrototypeOf(Overlay.prototype),Zc,this).call(this,e),this[Pc]&&this.addEventListener("blur",(function(e){var r=e.relatedTarget||document.activeElement;r instanceof HTMLElement&&(deepContains(t,r)||(t.opened?t[tu]=r:(r.focus(),t[tu]=null)))})),e.effectPhase||e.opened||e.persistent)&&(this[as].persistent||((void 0===this.closeFinished?this.closed:this.closeFinished)?this[eu]&&(this.style.zIndex="",this[eu]=null):this[eu]?this.style.zIndex=this[eu]:hasZIndex(this)||bringToFront(this)))}},{key:Xc,value:function value(e){if(_get(_getPrototypeOf(Overlay.prototype),Xc,this)&&_get(_getPrototypeOf(Overlay.prototype),Xc,this).call(this,e),this[Pc]&&this[as].persistent&&!hasZIndex(this)&&bringToFront(this),e.opened&&this[as].autoFocus)if(this[as].opened){this[tu]||document.activeElement===document.body||(this[tu]=document.activeElement);var t=firstFocusableElement(this);t&&t.focus()}else this[tu]&&(this[tu].focus(),this[tu]=null);!this[Pc]&&!this[as].persistent&&this.closeFinished&&this[Qs]&&(this[Qs]=!1,this.parentNode&&this.parentNode.removeChild(this))}},{key:"autoFocus",get:function get(){return this[as].autoFocus},set:function set(e){this[ts]({autoFocus:e})}},{key:wc,get:function get(){return Object.assign(_get(_getPrototypeOf(Overlay.prototype),wc,this)||{},{autoFocus:!0,persistent:!1})}},{key:bs,get:function get(){var e=_get(_getPrototypeOf(Overlay.prototype),bs,this)||Vn.html(_templateObject$3());return e.content.append(qn(_templateObject2())),e}}]),Overlay}(e)}(function SlotContentMixin(e){return function(e){_inherits(SlotContent,e);var t=_createSuper(SlotContent);function SlotContent(){return _classCallCheck(this,SlotContent),t.apply(this,arguments)}return _createClass(SlotContent,[{key:Xc,value:function value(e){var t=this;if(_get(_getPrototypeOf(SlotContent.prototype),Xc,this)&&_get(_getPrototypeOf(SlotContent.prototype),Xc,this).call(this,e),this[Pc]){var r=this[Sc];r&&r.addEventListener("slotchange",_asyncToGenerator(regeneratorRuntime.mark((function _callee(){var e;return regeneratorRuntime.wrap((function _callee$(n){for(;;)switch(n.prev=n.next){case 0:return t[Hc]=!0,e=r.assignedNodes({flatten:!0}),Object.freeze(e),t[ts]({content:e}),n.next=6,Promise.resolve();case 6:t[Hc]=!1;case 7:case"end":return n.stop()}}),_callee)}))))}}},{key:Sc,get:function get(){var e=this[rs]&&this[rs].querySelector("slot:not([name])");return this[rs]&&e||console.warn("SlotContentMixin expects ".concat(this.constructor.name," to define a shadow tree that includes a default (unnamed) slot.\nSee https://elix.org/documentation/SlotContentMixin.")),e}},{key:wc,get:function get(){return Object.assign(_get(_getPrototypeOf(SlotContent.prototype),wc,this)||{},{content:null})}}]),SlotContent}(e)}(mc))))))));function _templateObject$6(){var e=_taggedTemplateLiteral(["\n <style>\n :host {\n background: rgba(0, 0, 0, 0.2);\n }\n </style>\n "]);return _templateObject$6=function _templateObject(){return e},e}var nu=function(e){_inherits(PlainModalBackdrop,e);var t=_createSuper(PlainModalBackdrop);function PlainModalBackdrop(){return _classCallCheck(this,PlainModalBackdrop),t.apply(this,arguments)}return _createClass(PlainModalBackdrop,[{key:bs,get:function get(){var e=_get(_getPrototypeOf(PlainModalBackdrop.prototype),bs,this);return e.content.append(qn(_templateObject$6())),e}}]),PlainModalBackdrop}(zs);function _templateObject$7(){var e=_taggedTemplateLiteral(["\n <style>\n :host {\n background: white;\n border: 1px solid rgba(0, 0, 0, 0.2);\n box-shadow: 0 0px 10px rgba(0, 0, 0, 0.5);\n box-sizing: border-box;\n }\n </style>\n "]);return _templateObject$7=function _templateObject(){return e},e}var ou=function(e){_inherits(PlainOverlayFrame,e);var t=_createSuper(PlainOverlayFrame);function PlainOverlayFrame(){return _classCallCheck(this,PlainOverlayFrame),t.apply(this,arguments)}return _createClass(PlainOverlayFrame,[{key:bs,get:function get(){var e=_get(_getPrototypeOf(PlainOverlayFrame.prototype),bs,this);return e.content.append(qn(_templateObject$7())),e}}]),PlainOverlayFrame}(Ws);var iu=function(e){_inherits(ElixDialog,e);var t=_createSuper(ElixDialog);function ElixDialog(){return _classCallCheck(this,ElixDialog),t.apply(this,arguments)}return ElixDialog}(function(e){_inherits(PlainDialog,e);var t=_createSuper(PlainDialog);function PlainDialog(){return _classCallCheck(this,PlainDialog),t.apply(this,arguments)}return PlainDialog}(function PlainModalOverlayMixin(e){return function(e){_inherits(PlainModalOverlay,e);var t=_createSuper(PlainModalOverlay);function PlainModalOverlay(){return _classCallCheck(this,PlainModalOverlay),t.apply(this,arguments)}return _createClass(PlainModalOverlay,[{key:wc,get:function get(){return Object.assign(_get(_getPrototypeOf(PlainModalOverlay.prototype),wc,this)||{},{backdropPartType:nu,framePartType:ou})}}]),PlainModalOverlay}(e)}(ru)));customElements.define("elix-dialog",iu);var au=document.createElement("template");au.innerHTML='\n <style>\n \n #dialog_content {\n margin: 10px 10px 5px 10px;\n background: #DDD;\n overflow: auto;\n text-align: left;\n border: 1px solid #B0B0B0;\n }\n\n #dialog_content p, #dialog_content select, #dialog_content label {\n margin: 10px;\n line-height: 1.3em;\n }\n \n #dialog_container {\n font-family: Verdana;\n text-align: center;\n left: 50%;\n top: 50%;\n max-width: 400px;\n z-index: 50001;\n background: #CCC;\n border: 1px outset #777;\n font-family:Verdana,Helvetica,sans-serif;\n font-size:0.8em;\n }\n \n #dialog_container, #dialog_content {\n border-radius: 5px;\n -moz-border-radius: 5px;\n -webkit-border-radius: 5px;\n }\n \n #dialog_buttons input[type=text] {\n width: 90%;\n display: block;\n margin: 0 0 5px 11px;\n }\n \n #dialog_buttons input[type=button] {\n margin: 0 1em;\n }\n </style>\n <elix-dialog id="dialog_box" aria-label="SVG-Edit storage preferences" closed>\n <div class="overlay"></div>\n <div id="dialog_container">\n <div id="dialog_content">\n <p> \n By default and where supported, SVG-Edit can store your editor preferences and SVG content locally on your machine so you do not need to add these back each time you load SVG-Edit. If, for privacy reasons, you do not wish to store this information on your machine, you can change away from the default option below.\n </p>\n <select id="se-storage-pref">\n <option value="prefsAndContent">Store preferences and SVG content locally</option>\n <option value="prefsOnly">Only store preferences locally</option>\n <option value="noPrefsOrContent">Do not store my preferences or SVG content locally</option>\n </select> \n <label title="If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.">\n Remember this choice?<input type="checkbox" id="se-remember" value="" checked>\n </label> \n </div>\n <div id="dialog_buttons">\n <button id="storage_ok">\n <img class="svg_icon" src="./images/ok.svg" alt="icon" width="16" height="16" />\n Ok\n </button>\n <button id="storage_cancel">\n <img class="svg_icon" src="./images/cancel.svg" alt="icon" width="16" height="16" />\n Cancel\n </button>\n </div>\n </div>\n </elix-dialog>\n';var cu=function(e){_inherits(SeStorageDialog,e);var t=_createSuper(SeStorageDialog);function SeStorageDialog(){var e;return _classCallCheck(this,SeStorageDialog),(e=t.call(this))._shadowRoot=e.attachShadow({mode:"open"}),e._shadowRoot.appendChild(au.content.cloneNode(!0)),e.$dialog=e._shadowRoot.querySelector("#dialog_box"),e.$storage=e._shadowRoot.querySelector("#js-storage"),e.$okBtn=e._shadowRoot.querySelector("#storage_ok"),e.$cancelBtn=e._shadowRoot.querySelector("#storage_cancel"),e.$storageInput=e._shadowRoot.querySelector("#se-storage-pref"),e.$rememberInput=e._shadowRoot.querySelector("#se-remember"),e}return _createClass(SeStorageDialog,[{key:"attributeChangedCallback",value:function attributeChangedCallback(e,t,r){switch(e){case"dialog":"open"===r?this.$dialog.open():this.$dialog.close();break;case"storage":this.$storageInput.options[0].disabled="true"!==r}}},{key:"connectedCallback",value:function connectedCallback(){var e=this,t=function onSubmitHandler(t,r){var n=new CustomEvent("change",{detail:{trigger:r,select:e.$storageInput.value,checkbox:e.$rememberInput.checked}});e.dispatchEvent(n)};this.$okBtn.addEventListener("click",(function(e){return t(0,"ok")})),this.$cancelBtn.addEventListener("click",(function(e){return t(0,"cancel")}))}},{key:"setSVGContentStorage",value:function setSVGContentStorage(e){if(this.storage){var t="svgedit-"+this.configObj.curConfig.canvasName;e?this.storage.setItem(t,e):this.storage.removeItem(t)}}},{key:"dialog",get:function get(){return this.getAttribute("dialog")},set:function set(e){this.setAttribute("dialog",e)}}],[{key:"observedAttributes",get:function get(){return["dialog","storage"]}}]),SeStorageDialog}(_wrapNativeSuper(HTMLElement));customElements.define("se-storage-dialog",cu);var su=function removeStoragePrefCookie(){uu("svgeditstore")},uu=function expireCookie(e){document.cookie=encodeURIComponent(e)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT"},lu=function replaceStoragePrompt(e){e=e?"storagePrompt="+e:"";var t=top.location;t.href.includes("storagePrompt=")?t.href=t.href.replace(/([&?])storagePrompt=[^&]*(&?)/,(function(t,r,n){return(e?r:"")+e+(!e&&n?r:n||"")})):t.href+=(t.href.includes("?")?"&":"?")+e};e("default",{name:"storage",init:function init(e){var t=this,r=(e.$,this),n=r.svgCanvas,o=r.configObj.curConfig,i=o.noStorageOnLoad,a=o.forceStorage,c=r.storage,s=document.createElement("se-storage-dialog");function setupBeforeUnloadListener(){window.addEventListener("beforeunload",(function(e){if(document.cookie.match(/(?:^|;\s*)svgeditstore=(?:prefsAndContent|prefsOnly)/)){document.cookie.match(/(?:^|;\s*)svgeditstore=prefsAndContent/)&&function setSVGContentStorage(e){if(c){var t="svgedit-"+r.configObj.curConfig.canvasName;e?c.setItem(t,e):c.removeItem(t)}}(n.getSvgString()),r.setConfig({no_save_warning:!0});var t=r.configObj.curPrefs;Object.entries(t).forEach((function(e){var t=_slicedToArray(e,2),r=t[0],n=t[1];r="svg-edit-"+r,void 0!==n&&(c?c.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"))}))}}))}s.setAttribute("id","se-storage-dialog"),document.body.append(s),s.addEventListener("change",(function(e){var n,o,i;if(s.setAttribute("dialog","close"),"ok"===(null==e||null===(n=e.detail)||void 0===n?void 0:n.trigger))if("noPrefsOrContent"!==(null==e||null===(i=e.detail)||void 0===i?void 0:i.select)){var a,c=new URL(top.location).searchParams.get("storagePrompt");if(document.cookie="svgeditstore="+encodeURIComponent(e.detail.select)+"; expires=Fri, 31 Dec 9999 23:59:59 GMT","true"===c&&null!=e&&null!==(a=e.detail)&&void 0!==a&&a.checkbox)return void lu()}else{var u,l,f;if(su(),r.configObj.curConfig.emptyStorageOnDecline&&null!=e&&null!==(u=e.detail)&&void 0!==u&&u.checkbox&&(t.setSVGContentStorage(""),Object.keys(r.curPrefs).forEach((function(e){e="svg-edit-"+e,r.storage&&r.storage.removeItem(e),uu(e)}))),null!=e&&null!==(l=e.detail)&&void 0!==l&&l.select&&null!=e&&null!==(f=e.detail)&&void 0!==f&&f.checkbox)return void lu("false")}else"cancel"===(null==e||null===(o=e.detail)||void 0===o?void 0:o.trigger)&&su();setupBeforeUnloadListener(),r.storagePromptState="closed",r.updateCanvas(!0)}));var u=!1;return{name:"storage",langReady:function langReady(e){e.lang;var t=new URL(top.location).searchParams.get("storagePrompt");if(!u)if(u=!0,a||"true"!==t&&("false"===t||document.cookie.match(/(?:^|;\s*)svgeditstore=(?:prefsAndContent|prefsOnly)/)))i&&!a||setupBeforeUnloadListener();else{var n=Boolean(c);r.storagePromptState="waiting";var o=document.getElementById("se-storage-dialog");o.setAttribute("dialog","open"),o.setAttribute("storage",n)}}}}})}}}));