@digital-blueprint/formalize-app
Version:
[GitHub Repository](https://github.com/digital-blueprint/formalize-app) | [npmjs package](https://www.npmjs.com/package/@digital-blueprint/formalize-app) | [Unpkg CDN](https://unpkg.com/browse/@digital-blueprint/formalize-app/) | [Formalize Bundle](https:
68 lines (66 loc) • 152 kB
JavaScript
/*!
* License: LGPL-2.1-or-later
* Dependencies:
*
* @webcomponents/scoped-custom-element-registry: BSD-3-Clause
* @dbp-toolkit/app-shell: LGPL-2.1-or-later
* @dbp-toolkit/language-select: LGPL-2.1-or-later
* @dbp-toolkit/auth: LGPL-2.1-or-later
* @dbp-toolkit/theme-switcher: LGPL-2.1-or-later
* universal-router: MIT
* @dbp-toolkit/matomo: LGPL-2.1-or-later
* @dbp-toolkit/tabulator-table: LGPL-2.1-or-later
* xlsx: Apache-2.0
* jspdf-autotable: MIT
* xss: MIT
* cssfilter: MIT
* @dbp-toolkit/common: LGPL-2.1-or-later
* lit-html: BSD-3-Clause
* @dbp-toolkit/file-handling: LGPL-2.1-or-later
* webdav: MIT
* jose: MIT
* file-saver: MIT
* @dbp-toolkit/grant-permission-dialog: LGPL-2.1-or-later
* @dbp-toolkit/pdf-viewer: LGPL-2.1-or-later
* pdfjs-dist: Apache-2.0
* html2pdf.js: MIT
* jspdf: MIT
* @dbp-toolkit/notification: LGPL-2.1-or-later
* tabulator-tables: MIT
* @babel/runtime: MIT
* fflate: MIT
* jquery: MIT
* @dbp-toolkit/person-select: LGPL-2.1-or-later
* select2: MIT
* @dbp-toolkit/form-elements: LGPL-2.1-or-later
* i18next: MIT
* @lit/reactive-element: BSD-3-Clause
* lit-element: BSD-3-Clause
* @open-wc/dedupe-mixin: MIT
* @open-wc/scoped-elements: MIT
* dialog-polyfill: BSD
* keycloak-js: Apache-2.0
* html2canvas: MIT
* dompurify: (MPL-2.0 OR Apache-2.0)
* core-js: MIT
* raf: MIT
* performance-now: MIT
* rgbcolor: MIT OR SEE LICENSE IN FEEL-FREE.md
* svg-pathdata: MIT
* stackblur-canvas: MIT
* canvg: MIT
*/
import{c as t,g as e}from"./_commonjsHelpers.NVLIRKl0.es.js";import{_ as r}from"./jspdf.es.min.bkR0MRZ5.es.js";import"./notification.DekX2Yn_.es.js";var i=function(t){return t&&t.Math===Math&&t},n=i("object"==typeof globalThis&&globalThis)||i("object"==typeof window&&window)||i("object"==typeof self&&self)||i("object"==typeof t&&t)||i("object"==typeof n&&n)||function(){return this}()||Function("return this")(),a={},s=function(t){try{return!!t()}catch(t){return!0}},o=!s((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})),h=!s((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})),u=h,l=Function.prototype.call,c=u?l.bind(l):function(){return l.apply(l,arguments)},f={},g={}.propertyIsEnumerable,p=Object.getOwnPropertyDescriptor,d=p&&!g.call({1:2},1);f.f=d?function(t){var e=p(this,t);return!!e&&e.enumerable}:g;var y,v,m=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},x=h,b=Function.prototype,w=b.call,S=x&&b.bind.bind(w,w),T=x?S:function(t){return function(){return w.apply(t,arguments)}},O=T,A=O({}.toString),C=O("".slice),P=function(t){return C(A(t),8,-1)},E=s,N=P,M=Object,R=T("".split),_=E((function(){return!M("z").propertyIsEnumerable(0)}))?function(t){return"String"===N(t)?R(t,""):M(t)}:M,V=function(t){return null==t},I=V,k=TypeError,L=function(t){if(I(t))throw new k("Can't call method on "+t);return t},D=_,j=L,B=function(t){return D(j(t))},z="object"==typeof document&&document.all,U=void 0===z&&void 0!==z?function(t){return"function"==typeof t||t===z}:function(t){return"function"==typeof t},F=U,H=function(t){return"object"==typeof t?null!==t:F(t)},X=n,Y=U,W=function(t,e){return arguments.length<2?(r=X[t],Y(r)?r:void 0):X[t]&&X[t][e];var r},q=T({}.isPrototypeOf),$=n.navigator,G=$&&$.userAgent,Q=G?String(G):"",Z=n,K=Q,J=Z.process,tt=Z.Deno,et=J&&J.versions||tt&&tt.version,rt=et&&et.v8;rt&&(v=(y=rt.split("."))[0]>0&&y[0]<4?1:+(y[0]+y[1])),!v&&K&&(!(y=K.match(/Edge\/(\d+)/))||y[1]>=74)&&(y=K.match(/Chrome\/(\d+)/))&&(v=+y[1]);var it=v,nt=it,at=s,st=n.String,ot=!!Object.getOwnPropertySymbols&&!at((function(){var t=Symbol("symbol detection");return!st(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&nt&&nt<41})),ht=ot&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,ut=W,lt=U,ct=q,ft=Object,gt=ht?function(t){return"symbol"==typeof t}:function(t){var e=ut("Symbol");return lt(e)&&ct(e.prototype,ft(t))},pt=String,dt=function(t){try{return pt(t)}catch(t){return"Object"}},yt=U,vt=dt,mt=TypeError,xt=function(t){if(yt(t))return t;throw new mt(vt(t)+" is not a function")},bt=xt,wt=V,St=function(t,e){var r=t[e];return wt(r)?void 0:bt(r)},Tt=c,Ot=U,At=H,Ct=TypeError,Pt={exports:{}},Et=n,Nt=Object.defineProperty,Mt=function(t,e){try{Nt(Et,t,{value:e,configurable:!0,writable:!0})}catch(r){Et[t]=e}return e},Rt=n,_t=Mt,Vt="__core-js_shared__",It=Pt.exports=Rt[Vt]||_t(Vt,{});(It.versions||(It.versions=[])).push({version:"3.42.0",mode:"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.42.0/LICENSE",source:"https://github.com/zloirock/core-js"});var kt=Pt.exports,Lt=kt,Dt=function(t,e){return Lt[t]||(Lt[t]=e||{})},jt=L,Bt=Object,zt=function(t){return Bt(jt(t))},Ut=zt,Ft=T({}.hasOwnProperty),Ht=Object.hasOwn||function(t,e){return Ft(Ut(t),e)},Xt=T,Yt=0,Wt=Math.random(),qt=Xt(1..toString),$t=function(t){return"Symbol("+(void 0===t?"":t)+")_"+qt(++Yt+Wt,36)},Gt=Dt,Qt=Ht,Zt=$t,Kt=ot,Jt=ht,te=n.Symbol,ee=Gt("wks"),re=Jt?te.for||te:te&&te.withoutSetter||Zt,ie=function(t){return Qt(ee,t)||(ee[t]=Kt&&Qt(te,t)?te[t]:re("Symbol."+t)),ee[t]},ne=c,ae=H,se=gt,oe=St,he=function(t,e){var r,i;if("string"===e&&Ot(r=t.toString)&&!At(i=Tt(r,t)))return i;if(Ot(r=t.valueOf)&&!At(i=Tt(r,t)))return i;if("string"!==e&&Ot(r=t.toString)&&!At(i=Tt(r,t)))return i;throw new Ct("Can't convert object to primitive value")},ue=TypeError,le=ie("toPrimitive"),ce=function(t,e){if(!ae(t)||se(t))return t;var r,i=oe(t,le);if(i){if(void 0===e&&(e="default"),r=ne(i,t,e),!ae(r)||se(r))return r;throw new ue("Can't convert object to primitive value")}return void 0===e&&(e="number"),he(t,e)},fe=gt,ge=function(t){var e=ce(t,"string");return fe(e)?e:e+""},pe=H,de=n.document,ye=pe(de)&&pe(de.createElement),ve=function(t){return ye?de.createElement(t):{}},me=ve,xe=!o&&!s((function(){return 7!==Object.defineProperty(me("div"),"a",{get:function(){return 7}}).a})),be=o,we=c,Se=f,Te=m,Oe=B,Ae=ge,Ce=Ht,Pe=xe,Ee=Object.getOwnPropertyDescriptor;a.f=be?Ee:function(t,e){if(t=Oe(t),e=Ae(e),Pe)try{return Ee(t,e)}catch(t){}if(Ce(t,e))return Te(!we(Se.f,t,e),t[e])};var Ne={},Me=o&&s((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Re=H,_e=String,Ve=TypeError,Ie=function(t){if(Re(t))return t;throw new Ve(_e(t)+" is not an object")},ke=o,Le=xe,De=Me,je=Ie,Be=ge,ze=TypeError,Ue=Object.defineProperty,Fe=Object.getOwnPropertyDescriptor,He="enumerable",Xe="configurable",Ye="writable";Ne.f=ke?De?function(t,e,r){if(je(t),e=Be(e),je(r),"function"==typeof t&&"prototype"===e&&"value"in r&&Ye in r&&!r[Ye]){var i=Fe(t,e);i&&i[Ye]&&(t[e]=r.value,r={configurable:Xe in r?r[Xe]:i[Xe],enumerable:He in r?r[He]:i[He],writable:!1})}return Ue(t,e,r)}:Ue:function(t,e,r){if(je(t),e=Be(e),je(r),Le)try{return Ue(t,e,r)}catch(t){}if("get"in r||"set"in r)throw new ze("Accessors not supported");return"value"in r&&(t[e]=r.value),t};var We=Ne,qe=m,$e=o?function(t,e,r){return We.f(t,e,qe(1,r))}:function(t,e,r){return t[e]=r,t},Ge={exports:{}},Qe=o,Ze=Ht,Ke=Function.prototype,Je=Qe&&Object.getOwnPropertyDescriptor,tr=Ze(Ke,"name"),er={PROPER:tr&&"something"===function(){}.name,CONFIGURABLE:tr&&(!Qe||Qe&&Je(Ke,"name").configurable)},rr=U,ir=kt,nr=T(Function.toString);rr(ir.inspectSource)||(ir.inspectSource=function(t){return nr(t)});var ar,sr,or,hr=ir.inspectSource,ur=U,lr=n.WeakMap,cr=ur(lr)&&/native code/.test(String(lr)),fr=$t,gr=Dt("keys"),pr=function(t){return gr[t]||(gr[t]=fr(t))},dr={},yr=cr,vr=n,mr=H,xr=$e,br=Ht,wr=kt,Sr=pr,Tr=dr,Or="Object already initialized",Ar=vr.TypeError,Cr=vr.WeakMap;if(yr||wr.state){var Pr=wr.state||(wr.state=new Cr);Pr.get=Pr.get,Pr.has=Pr.has,Pr.set=Pr.set,ar=function(t,e){if(Pr.has(t))throw new Ar(Or);return e.facade=t,Pr.set(t,e),e},sr=function(t){return Pr.get(t)||{}},or=function(t){return Pr.has(t)}}else{var Er=Sr("state");Tr[Er]=!0,ar=function(t,e){if(br(t,Er))throw new Ar(Or);return e.facade=t,xr(t,Er,e),e},sr=function(t){return br(t,Er)?t[Er]:{}},or=function(t){return br(t,Er)}}var Nr={set:ar,get:sr,has:or,enforce:function(t){return or(t)?sr(t):ar(t,{})},getterFor:function(t){return function(e){var r;if(!mr(e)||(r=sr(e)).type!==t)throw new Ar("Incompatible receiver, "+t+" required");return r}}},Mr=T,Rr=s,_r=U,Vr=Ht,Ir=o,kr=er.CONFIGURABLE,Lr=hr,Dr=Nr.enforce,jr=Nr.get,Br=String,zr=Object.defineProperty,Ur=Mr("".slice),Fr=Mr("".replace),Hr=Mr([].join),Xr=Ir&&!Rr((function(){return 8!==zr((function(){}),"length",{value:8}).length})),Yr=String(String).split("String"),Wr=Ge.exports=function(t,e,r){"Symbol("===Ur(Br(e),0,7)&&(e="["+Fr(Br(e),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),r&&r.getter&&(e="get "+e),r&&r.setter&&(e="set "+e),(!Vr(t,"name")||kr&&t.name!==e)&&(Ir?zr(t,"name",{value:e,configurable:!0}):t.name=e),Xr&&r&&Vr(r,"arity")&&t.length!==r.arity&&zr(t,"length",{value:r.arity});try{r&&Vr(r,"constructor")&&r.constructor?Ir&&zr(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var i=Dr(t);return Vr(i,"source")||(i.source=Hr(Yr,"string"==typeof e?e:"")),t};Function.prototype.toString=Wr((function(){return _r(this)&&jr(this).source||Lr(this)}),"toString");var qr,$r=Ge.exports,Gr=U,Qr=Ne,Zr=$r,Kr=Mt,Jr=function(t,e,r,i){i||(i={});var n=i.enumerable,a=void 0!==i.name?i.name:e;if(Gr(r)&&Zr(r,a,i),i.global)n?t[e]=r:Kr(e,r);else{try{i.unsafe?t[e]&&(n=!0):delete t[e]}catch(t){}n?t[e]=r:Qr.f(t,e,{value:r,enumerable:!1,configurable:!i.nonConfigurable,writable:!i.nonWritable})}return t},ti={},ei=Math.ceil,ri=Math.floor,ii=Math.trunc||function(t){var e=+t;return(e>0?ri:ei)(e)},ni=ii,ai=function(t){var e=+t;return e!=e||0===e?0:ni(e)},si=ai,oi=Math.max,hi=Math.min,ui=ai,li=Math.min,ci=function(t){var e=ui(t);return e>0?li(e,9007199254740991):0},fi=ci,gi=function(t){return fi(t.length)},pi=B,di=function(t,e){var r=si(t);return r<0?oi(r+e,0):hi(r,e)},yi=gi,vi={indexOf:(qr=!1,function(t,e,r){var i=pi(t),n=yi(i);if(0===n)return!qr&&-1;var a,s=di(r,n);if(qr&&e!=e){for(;n>s;)if((a=i[s++])!=a)return!0}else for(;n>s;s++)if((qr||s in i)&&i[s]===e)return qr||s||0;return!qr&&-1})},mi=Ht,xi=B,bi=vi.indexOf,wi=dr,Si=T([].push),Ti=function(t,e){var r,i=xi(t),n=0,a=[];for(r in i)!mi(wi,r)&&mi(i,r)&&Si(a,r);for(;e.length>n;)mi(i,r=e[n++])&&(~bi(a,r)||Si(a,r));return a},Oi=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Ai=Ti,Ci=Oi.concat("length","prototype");ti.f=Object.getOwnPropertyNames||function(t){return Ai(t,Ci)};var Pi={};Pi.f=Object.getOwnPropertySymbols;var Ei=W,Ni=ti,Mi=Pi,Ri=Ie,_i=T([].concat),Vi=Ei("Reflect","ownKeys")||function(t){var e=Ni.f(Ri(t)),r=Mi.f;return r?_i(e,r(t)):e},Ii=Ht,ki=Vi,Li=a,Di=Ne,ji=s,Bi=U,zi=/#|\.prototype\./,Ui=function(t,e){var r=Hi[Fi(t)];return r===Yi||r!==Xi&&(Bi(e)?ji(e):!!e)},Fi=Ui.normalize=function(t){return String(t).replace(zi,".").toLowerCase()},Hi=Ui.data={},Xi=Ui.NATIVE="N",Yi=Ui.POLYFILL="P",Wi=Ui,qi=n,$i=a.f,Gi=$e,Qi=Jr,Zi=Mt,Ki=function(t,e,r){for(var i=ki(e),n=Di.f,a=Li.f,s=0;s<i.length;s++){var o=i[s];Ii(t,o)||r&&Ii(r,o)||n(t,o,a(e,o))}},Ji=Wi,tn=function(t,e){var r,i,n,a,s,o=t.target,h=t.global,u=t.stat;if(r=h?qi:u?qi[o]||Zi(o,{}):qi[o]&&qi[o].prototype)for(i in e){if(a=e[i],n=t.dontCallGetSet?(s=$i(r,i))&&s.value:r[i],!Ji(h?i:o+(u?".":"#")+i,t.forced)&&void 0!==n){if(typeof a==typeof n)continue;Ki(a,n)}(t.sham||n&&n.sham)&&Gi(a,"sham",!0),Qi(r,i,a,t)}},en=n,rn=Q,nn=P,an=function(t){return rn.slice(0,t.length)===t},sn=an("Bun/")?"BUN":an("Cloudflare-Workers")?"CLOUDFLARE":an("Deno/")?"DENO":an("Node.js/")?"NODE":en.Bun&&"string"==typeof Bun.version?"BUN":en.Deno&&"object"==typeof Deno.version?"DENO":"process"===nn(en.process)?"NODE":en.window&&en.document?"BROWSER":"REST",on="NODE"===sn,hn=T,un=xt,ln=H,cn=function(t){return ln(t)||null===t},fn=String,gn=TypeError,pn=function(t,e,r){try{return hn(un(Object.getOwnPropertyDescriptor(t,e)[r]))}catch(t){}},dn=H,yn=L,vn=function(t){if(cn(t))return t;throw new gn("Can't set "+fn(t)+" as a prototype")},mn=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,r={};try{(t=pn(Object.prototype,"__proto__","set"))(r,[]),e=r instanceof Array}catch(t){}return function(r,i){return yn(r),vn(i),dn(r)?(e?t(r,i):r.__proto__=i,r):r}}():void 0),xn=Ne.f,bn=Ht,wn=ie("toStringTag"),Sn=function(t,e,r){t&&!r&&(t=t.prototype),t&&!bn(t,wn)&&xn(t,wn,{configurable:!0,value:e})},Tn=$r,On=Ne,An=W,Cn=function(t,e,r){return r.get&&Tn(r.get,e,{getter:!0}),r.set&&Tn(r.set,e,{setter:!0}),On.f(t,e,r)},Pn=o,En=ie("species"),Nn=q,Mn=TypeError,Rn={};Rn[ie("toStringTag")]="z";var _n="[object z]"===String(Rn),Vn=U,In=P,kn=ie("toStringTag"),Ln=Object,Dn="Arguments"===In(function(){return arguments}()),jn=_n?In:function(t){var e,r,i;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(t){}}(e=Ln(t),kn))?r:Dn?In(e):"Object"===(i=In(e))&&Vn(e.callee)?"Arguments":i},Bn=T,zn=s,Un=U,Fn=jn,Hn=hr,Xn=function(){},Yn=W("Reflect","construct"),Wn=/^\s*(?:class|function)\b/,qn=Bn(Wn.exec),$n=!Wn.test(Xn),Gn=function(t){if(!Un(t))return!1;try{return Yn(Xn,[],t),!0}catch(t){return!1}},Qn=function(t){if(!Un(t))return!1;switch(Fn(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return $n||!!qn(Wn,Hn(t))}catch(t){return!0}};Qn.sham=!0;var Zn,Kn,Jn,ta,ea=!Yn||zn((function(){var t;return Gn(Gn.call)||!Gn(Object)||!Gn((function(){t=!0}))||t}))?Qn:Gn,ra=ea,ia=dt,na=TypeError,aa=Ie,sa=function(t){if(ra(t))return t;throw new na(ia(t)+" is not a constructor")},oa=V,ha=ie("species"),ua=function(t,e){var r,i=aa(t).constructor;return void 0===i||oa(r=aa(i)[ha])?e:sa(r)},la=h,ca=Function.prototype,fa=ca.apply,ga=ca.call,pa="object"==typeof Reflect&&Reflect.apply||(la?ga.bind(fa):function(){return ga.apply(fa,arguments)}),da=P,ya=T,va=function(t){if("Function"===da(t))return ya(t)},ma=xt,xa=h,ba=va(va.bind),wa=function(t,e){return ma(t),void 0===e?t:xa?ba(t,e):function(){return t.apply(e,arguments)}},Sa=W("document","documentElement"),Ta=T([].slice),Oa=TypeError,Aa=/(?:ipad|iphone|ipod).*applewebkit/i.test(Q),Ca=n,Pa=pa,Ea=wa,Na=U,Ma=Ht,Ra=s,_a=Sa,Va=Ta,Ia=ve,ka=function(t,e){if(t<e)throw new Oa("Not enough arguments");return t},La=Aa,Da=on,ja=Ca.setImmediate,Ba=Ca.clearImmediate,za=Ca.process,Ua=Ca.Dispatch,Fa=Ca.Function,Ha=Ca.MessageChannel,Xa=Ca.String,Ya=0,Wa={},qa="onreadystatechange";Ra((function(){Zn=Ca.location}));var $a=function(t){if(Ma(Wa,t)){var e=Wa[t];delete Wa[t],e()}},Ga=function(t){return function(){$a(t)}},Qa=function(t){$a(t.data)},Za=function(t){Ca.postMessage(Xa(t),Zn.protocol+"//"+Zn.host)};ja&&Ba||(ja=function(t){ka(arguments.length,1);var e=Na(t)?t:Fa(t),r=Va(arguments,1);return Wa[++Ya]=function(){Pa(e,void 0,r)},Kn(Ya),Ya},Ba=function(t){delete Wa[t]},Da?Kn=function(t){za.nextTick(Ga(t))}:Ua&&Ua.now?Kn=function(t){Ua.now(Ga(t))}:Ha&&!La?(ta=(Jn=new Ha).port2,Jn.port1.onmessage=Qa,Kn=Ea(ta.postMessage,ta)):Ca.addEventListener&&Na(Ca.postMessage)&&!Ca.importScripts&&Zn&&"file:"!==Zn.protocol&&!Ra(Za)?(Kn=Za,Ca.addEventListener("message",Qa,!1)):Kn=qa in Ia("script")?function(t){_a.appendChild(Ia("script"))[qa]=function(){_a.removeChild(this),$a(t)}}:function(t){setTimeout(Ga(t),0)});var Ka={set:ja},Ja=n,ts=o,es=Object.getOwnPropertyDescriptor,rs=function(){this.head=null,this.tail=null};rs.prototype={add:function(t){var e={item:t,next:null},r=this.tail;r?r.next=e:this.head=e,this.tail=e},get:function(){var t=this.head;if(t)return null===(this.head=t.next)&&(this.tail=null),t.item}};var is,ns,as,ss,os,hs=rs,us=/ipad|iphone|ipod/i.test(Q)&&"undefined"!=typeof Pebble,ls=/web0s(?!.*chrome)/i.test(Q),cs=n,fs=function(t){if(!ts)return Ja[t];var e=es(Ja,t);return e&&e.value},gs=wa,ps=Ka.set,ds=hs,ys=Aa,vs=us,ms=ls,xs=on,bs=cs.MutationObserver||cs.WebKitMutationObserver,ws=cs.document,Ss=cs.process,Ts=cs.Promise,Os=fs("queueMicrotask");if(!Os){var As=new ds,Cs=function(){var t,e;for(xs&&(t=Ss.domain)&&t.exit();e=As.get();)try{e()}catch(t){throw As.head&&is(),t}t&&t.enter()};ys||xs||ms||!bs||!ws?!vs&&Ts&&Ts.resolve?((ss=Ts.resolve(void 0)).constructor=Ts,os=gs(ss.then,ss),is=function(){os(Cs)}):xs?is=function(){Ss.nextTick(Cs)}:(ps=gs(ps,cs),is=function(){ps(Cs)}):(ns=!0,as=ws.createTextNode(""),new bs(Cs).observe(as,{characterData:!0}),is=function(){as.data=ns=!ns}),Os=function(t){As.head||is(),As.add(t)}}var Ps=Os,Es=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}},Ns=n.Promise,Ms=n,Rs=Ns,_s=U,Vs=Wi,Is=hr,ks=ie,Ls=sn,Ds=it;Rs&&Rs.prototype;var js=ks("species"),Bs=!1,zs=_s(Ms.PromiseRejectionEvent),Us=Vs("Promise",(function(){var t=Is(Rs),e=t!==String(Rs);if(!e&&66===Ds)return!0;if(!Ds||Ds<51||!/native code/.test(t)){var r=new Rs((function(t){t(1)})),i=function(t){t((function(){}),(function(){}))};if((r.constructor={})[js]=i,!(Bs=r.then((function(){}))instanceof i))return!0}return!(e||"BROWSER"!==Ls&&"DENO"!==Ls||zs)})),Fs={CONSTRUCTOR:Us,REJECTION_EVENT:zs,SUBCLASSING:Bs},Hs={},Xs=xt,Ys=TypeError,Ws=function(t){var e,r;this.promise=new t((function(t,i){if(void 0!==e||void 0!==r)throw new Ys("Bad Promise constructor");e=t,r=i})),this.resolve=Xs(e),this.reject=Xs(r)};Hs.f=function(t){return new Ws(t)};var qs,$s,Gs,Qs=tn,Zs=on,Ks=n,Js=c,to=Jr,eo=mn,ro=Sn,io=function(t){var e=An(t);Pn&&e&&!e[En]&&Cn(e,En,{configurable:!0,get:function(){return this}})},no=xt,ao=U,so=H,oo=function(t,e){if(Nn(e,t))return t;throw new Mn("Incorrect invocation")},ho=ua,uo=Ka.set,lo=Ps,co=function(t,e){try{1===arguments.length?console.error(t):console.error(t,e)}catch(t){}},fo=Es,go=hs,po=Nr,yo=Ns,vo=Hs,mo="Promise",xo=Fs.CONSTRUCTOR,bo=Fs.REJECTION_EVENT,wo=Fs.SUBCLASSING,So=po.getterFor(mo),To=po.set,Oo=yo&&yo.prototype,Ao=yo,Co=Oo,Po=Ks.TypeError,Eo=Ks.document,No=Ks.process,Mo=vo.f,Ro=Mo,_o=!!(Eo&&Eo.createEvent&&Ks.dispatchEvent),Vo="unhandledrejection",Io=function(t){var e;return!(!so(t)||!ao(e=t.then))&&e},ko=function(t,e){var r,i,n,a=e.value,s=1===e.state,o=s?t.ok:t.fail,h=t.resolve,u=t.reject,l=t.domain;try{o?(s||(2===e.rejection&&zo(e),e.rejection=1),!0===o?r=a:(l&&l.enter(),r=o(a),l&&(l.exit(),n=!0)),r===t.promise?u(new Po("Promise-chain cycle")):(i=Io(r))?Js(i,r,h,u):h(r)):u(a)}catch(t){l&&!n&&l.exit(),u(t)}},Lo=function(t,e){t.notified||(t.notified=!0,lo((function(){for(var r,i=t.reactions;r=i.get();)ko(r,t);t.notified=!1,e&&!t.rejection&&jo(t)})))},Do=function(t,e,r){var i,n;_o?((i=Eo.createEvent("Event")).promise=e,i.reason=r,i.initEvent(t,!1,!0),Ks.dispatchEvent(i)):i={promise:e,reason:r},!bo&&(n=Ks["on"+t])?n(i):t===Vo&&co("Unhandled promise rejection",r)},jo=function(t){Js(uo,Ks,(function(){var e,r=t.facade,i=t.value;if(Bo(t)&&(e=fo((function(){Zs?No.emit("unhandledRejection",i,r):Do(Vo,r,i)})),t.rejection=Zs||Bo(t)?2:1,e.error))throw e.value}))},Bo=function(t){return 1!==t.rejection&&!t.parent},zo=function(t){Js(uo,Ks,(function(){var e=t.facade;Zs?No.emit("rejectionHandled",e):Do("rejectionhandled",e,t.value)}))},Uo=function(t,e,r){return function(i){t(e,i,r)}},Fo=function(t,e,r){t.done||(t.done=!0,r&&(t=r),t.value=e,t.state=2,Lo(t,!0))},Ho=function t(e,r,i){if(!e.done){e.done=!0,i&&(e=i);try{if(e.facade===r)throw new Po("Promise can't be resolved itself");var n=Io(r);n?lo((function(){var i={done:!1};try{Js(n,r,Uo(t,i,e),Uo(Fo,i,e))}catch(t){Fo(i,t,e)}})):(e.value=r,e.state=1,Lo(e,!1))}catch(t){Fo({done:!1},t,e)}}};if(xo&&(Co=(Ao=function(t){oo(this,Co),no(t),Js(qs,this);var e=So(this);try{t(Uo(Ho,e),Uo(Fo,e))}catch(t){Fo(e,t)}}).prototype,(qs=function(t){To(this,{type:mo,done:!1,notified:!1,parent:!1,reactions:new go,rejection:!1,state:0,value:null})}).prototype=to(Co,"then",(function(t,e){var r=So(this),i=Mo(ho(this,Ao));return r.parent=!0,i.ok=!ao(t)||t,i.fail=ao(e)&&e,i.domain=Zs?No.domain:void 0,0===r.state?r.reactions.add(i):lo((function(){ko(i,r)})),i.promise})),$s=function(){var t=new qs,e=So(t);this.promise=t,this.resolve=Uo(Ho,e),this.reject=Uo(Fo,e)},vo.f=Mo=function(t){return t===Ao||undefined===t?new $s(t):Ro(t)},ao(yo)&&Oo!==Object.prototype)){Gs=Oo.then,wo||to(Oo,"then",(function(t,e){var r=this;return new Ao((function(t,e){Js(Gs,r,t,e)})).then(t,e)}),{unsafe:!0});try{delete Oo.constructor}catch(t){}eo&&eo(Oo,Co)}Qs({global:!0,constructor:!0,wrap:!0,forced:xo},{Promise:Ao}),ro(Ao,mo,!1),io(mo);var Xo={},Yo=Xo,Wo=ie("iterator"),qo=Array.prototype,$o=jn,Go=St,Qo=V,Zo=Xo,Ko=ie("iterator"),Jo=function(t){if(!Qo(t))return Go(t,Ko)||Go(t,"@@iterator")||Zo[$o(t)]},th=c,eh=xt,rh=Ie,ih=dt,nh=Jo,ah=TypeError,sh=c,oh=Ie,hh=St,uh=wa,lh=c,ch=Ie,fh=dt,gh=function(t){return void 0!==t&&(Yo.Array===t||qo[Wo]===t)},ph=gi,dh=q,yh=function(t,e){var r=arguments.length<2?nh(t):e;if(eh(r))return rh(th(r,t));throw new ah(ih(t)+" is not iterable")},vh=Jo,mh=function(t,e,r){var i,n;oh(t);try{if(!(i=hh(t,"return"))){if("throw"===e)throw r;return r}i=sh(i,t)}catch(t){n=!0,i=t}if("throw"===e)throw r;if(n)throw i;return oh(i),r},xh=TypeError,bh=function(t,e){this.stopped=t,this.result=e},wh=bh.prototype,Sh=function(t,e,r){var i,n,a,s,o,h,u,l=r&&r.that,c=!(!r||!r.AS_ENTRIES),f=!(!r||!r.IS_RECORD),g=!(!r||!r.IS_ITERATOR),p=!(!r||!r.INTERRUPTED),d=uh(e,l),y=function(t){return i&&mh(i,"normal",t),new bh(!0,t)},v=function(t){return c?(ch(t),p?d(t[0],t[1],y):d(t[0],t[1])):p?d(t,y):d(t)};if(f)i=t.iterator;else if(g)i=t;else{if(!(n=vh(t)))throw new xh(fh(t)+" is not iterable");if(gh(n)){for(a=0,s=ph(t);s>a;a++)if((o=v(t[a]))&&dh(wh,o))return o;return new bh(!1)}i=yh(t,n)}for(h=f?t.next:i.next;!(u=lh(h,i)).done;){try{o=v(u.value)}catch(t){mh(i,"throw",t)}if("object"==typeof o&&o&&dh(wh,o))return o}return new bh(!1)},Th=ie("iterator"),Oh=!1;try{var Ah=0,Ch={next:function(){return{done:!!Ah++}},return:function(){Oh=!0}};Ch[Th]=function(){return this},Array.from(Ch,(function(){throw 2}))}catch(t){}var Ph=Ns,Eh=function(t,e){try{if(!e&&!Oh)return!1}catch(t){return!1}var r=!1;try{var i={};i[Th]=function(){return{next:function(){return{done:r=!0}}}},t(i)}catch(t){}return r},Nh=Fs.CONSTRUCTOR||!Eh((function(t){Ph.all(t).then(void 0,(function(){}))})),Mh=c,Rh=xt,_h=Hs,Vh=Es,Ih=Sh;tn({target:"Promise",stat:!0,forced:Nh},{all:function(t){var e=this,r=_h.f(e),i=r.resolve,n=r.reject,a=Vh((function(){var r=Rh(e.resolve),a=[],s=0,o=1;Ih(t,(function(t){var h=s++,u=!1;o++,Mh(r,e,t).then((function(t){u||(u=!0,a[h]=t,--o||i(a))}),n)})),--o||i(a)}));return a.error&&n(a.value),r.promise}});var kh=tn,Lh=Fs.CONSTRUCTOR,Dh=Ns,jh=W,Bh=U,zh=Jr,Uh=Dh&&Dh.prototype;if(kh({target:"Promise",proto:!0,forced:Lh,real:!0},{catch:function(t){return this.then(void 0,t)}}),Bh(Dh)){var Fh=jh("Promise").prototype.catch;Uh.catch!==Fh&&zh(Uh,"catch",Fh,{unsafe:!0})}var Hh=c,Xh=xt,Yh=Hs,Wh=Es,qh=Sh;tn({target:"Promise",stat:!0,forced:Nh},{race:function(t){var e=this,r=Yh.f(e),i=r.reject,n=Wh((function(){var n=Xh(e.resolve);qh(t,(function(t){Hh(n,e,t).then(r.resolve,i)}))}));return n.error&&i(n.value),r.promise}});var $h=Hs;tn({target:"Promise",stat:!0,forced:Fs.CONSTRUCTOR},{reject:function(t){var e=$h.f(this);return(0,e.reject)(t),e.promise}});var Gh=Ie,Qh=H,Zh=Hs,Kh=tn,Jh=Fs.CONSTRUCTOR,tu=function(t,e){if(Gh(t),Qh(e)&&e.constructor===t)return e;var r=Zh.f(t);return(0,r.resolve)(e),r.promise};function eu(t,e,r,i,n,a,s){try{var o=t[a](s),h=o.value}catch(t){return void r(t)}o.done?e(h):Promise.resolve(h).then(i,n)}function ru(t){return function(){var e=this,r=arguments;return new Promise((function(i,n){var a=t.apply(e,r);function s(t){eu(a,i,n,s,o,"next",t)}function o(t){eu(a,i,n,s,o,"throw",t)}s(void 0)}))}}W("Promise"),Kh({target:"Promise",stat:!0,forced:Jh},{resolve:function(t){return tu(this,t)}});var iu=jn,nu=String,au=function(t){if("Symbol"===iu(t))throw new TypeError("Cannot convert a Symbol value to a string");return nu(t)},su=Ie,ou=function(){var t=su(this),e="";return t.hasIndices&&(e+="d"),t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.unicodeSets&&(e+="v"),t.sticky&&(e+="y"),e},hu=s,uu=n.RegExp,lu=hu((function(){var t=uu("a","y");return t.lastIndex=2,null!==t.exec("abcd")}));lu||hu((function(){return!uu("a","y").sticky}));var cu={BROKEN_CARET:lu||hu((function(){var t=uu("^r","gy");return t.lastIndex=2,null!==t.exec("str")})),UNSUPPORTED_Y:lu},fu={},gu=Ti,pu=Oi,du=Object.keys||function(t){return gu(t,pu)},yu=o,vu=Me,mu=Ne,xu=Ie,bu=B,wu=du;fu.f=yu&&!vu?Object.defineProperties:function(t,e){xu(t);for(var r,i=bu(e),n=wu(e),a=n.length,s=0;a>s;)mu.f(t,r=n[s++],i[r]);return t};var Su,Tu=Ie,Ou=fu,Au=Oi,Cu=dr,Pu=Sa,Eu=ve,Nu="prototype",Mu="script",Ru=pr("IE_PROTO"),_u=function(){},Vu=function(t){return"<"+Mu+">"+t+"</"+Mu+">"},Iu=function(t){t.write(Vu("")),t.close();var e=t.parentWindow.Object;return t=null,e},ku=function(){try{Su=new ActiveXObject("htmlfile")}catch(t){}var t,e,r;ku="undefined"!=typeof document?document.domain&&Su?Iu(Su):(e=Eu("iframe"),r="java"+Mu+":",e.style.display="none",Pu.appendChild(e),e.src=String(r),(t=e.contentWindow.document).open(),t.write(Vu("document.F=Object")),t.close(),t.F):Iu(Su);for(var i=Au.length;i--;)delete ku[Nu][Au[i]];return ku()};Cu[Ru]=!0;var Lu,Du,ju=Object.create||function(t,e){var r;return null!==t?(_u[Nu]=Tu(t),r=new _u,_u[Nu]=null,r[Ru]=t):r=ku(),void 0===e?r:Ou.f(r,e)},Bu=s,zu=n.RegExp,Uu=Bu((function(){var t=zu(".","s");return!(t.dotAll&&t.test("\n")&&"s"===t.flags)})),Fu=s,Hu=n.RegExp,Xu=Fu((function(){var t=Hu("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")})),Yu=c,Wu=T,qu=au,$u=ou,Gu=cu,Qu=ju,Zu=Nr.get,Ku=Uu,Ju=Xu,tl=Dt("native-string-replace",String.prototype.replace),el=RegExp.prototype.exec,rl=el,il=Wu("".charAt),nl=Wu("".indexOf),al=Wu("".replace),sl=Wu("".slice),ol=(Du=/b*/g,Yu(el,Lu=/a/,"a"),Yu(el,Du,"a"),0!==Lu.lastIndex||0!==Du.lastIndex),hl=Gu.BROKEN_CARET,ul=void 0!==/()??/.exec("")[1];(ol||ul||hl||Ku||Ju)&&(rl=function(t){var e,r,i,n,a,s,o,h=this,u=Zu(h),l=qu(t),c=u.raw;if(c)return c.lastIndex=h.lastIndex,e=Yu(rl,c,l),h.lastIndex=c.lastIndex,e;var f=u.groups,g=hl&&h.sticky,p=Yu($u,h),d=h.source,y=0,v=l;if(g&&(p=al(p,"y",""),-1===nl(p,"g")&&(p+="g"),v=sl(l,h.lastIndex),h.lastIndex>0&&(!h.multiline||h.multiline&&"\n"!==il(l,h.lastIndex-1))&&(d="(?: "+d+")",v=" "+v,y++),r=new RegExp("^(?:"+d+")",p)),ul&&(r=new RegExp("^"+d+"$(?!\\s)",p)),ol&&(i=h.lastIndex),n=Yu(el,g?r:h,v),g?n?(n.input=sl(n.input,y),n[0]=sl(n[0],y),n.index=h.lastIndex,h.lastIndex+=n[0].length):h.lastIndex=0:ol&&n&&(h.lastIndex=h.global?n.index+n[0].length:i),ul&&n&&n.length>1&&Yu(tl,n[0],r,(function(){for(a=1;a<arguments.length-2;a++)void 0===arguments[a]&&(n[a]=void 0)})),n&&f)for(n.groups=s=Qu(null),a=0;a<f.length;a++)s[(o=f[a])[0]]=n[o[1]];return n});var ll=rl;tn({target:"RegExp",proto:!0,forced:/./.exec!==ll},{exec:ll});var cl,fl=c,gl=Jr,pl=ll,dl=s,yl=ie,vl=$e,ml=yl("species"),xl=RegExp.prototype,bl=function(t,e,r,i){var n=yl(t),a=!dl((function(){var e={};return e[n]=function(){return 7},7!==""[t](e)})),s=a&&!dl((function(){var e=!1,r=/a/;return"split"===t&&((r={}).constructor={},r.constructor[ml]=function(){return r},r.flags="",r[n]=/./[n]),r.exec=function(){return e=!0,null},r[n](""),!e}));if(!a||!s||r){var o=/./[n],h=e(n,""[t],(function(t,e,r,i,n){var s=e.exec;return s===pl||s===xl.exec?a&&!n?{done:!0,value:fl(o,e,r,i)}:{done:!0,value:fl(t,r,e,i)}:{done:!1}}));gl(String.prototype,t,h[0]),gl(xl,n,h[1])}i&&vl(xl[n],"sham",!0)},wl=T,Sl=ai,Tl=au,Ol=L,Al=wl("".charAt),Cl=wl("".charCodeAt),Pl=wl("".slice),El={charAt:(cl=!0,function(t,e){var r,i,n=Tl(Ol(t)),a=Sl(e),s=n.length;return a<0||a>=s?cl?"":void 0:(r=Cl(n,a))<55296||r>56319||a+1===s||(i=Cl(n,a+1))<56320||i>57343?cl?Al(n,a):r:cl?Pl(n,a,a+2):i-56320+(r-55296<<10)+65536})}.charAt,Nl=function(t,e,r){return e+(r?El(t,e).length:1)},Ml=c,Rl=Ie,_l=U,Vl=P,Il=ll,kl=TypeError,Ll=function(t,e){var r=t.exec;if(_l(r)){var i=Ml(r,t,e);return null!==i&&Rl(i),i}if("RegExp"===Vl(t))return Ml(Il,t,e);throw new kl("RegExp#exec called on incompatible receiver")},Dl=c,jl=Ie,Bl=H,zl=ci,Ul=au,Fl=L,Hl=St,Xl=Nl,Yl=Ll;bl("match",(function(t,e,r){return[function(e){var r=Fl(this),i=Bl(e)?Hl(e,t):void 0;return i?Dl(i,e,r):new RegExp(e)[t](Ul(r))},function(t){var i=jl(this),n=Ul(t),a=r(e,i,n);if(a.done)return a.value;if(!i.global)return Yl(i,n);var s=i.unicode;i.lastIndex=0;for(var o,h=[],u=0;null!==(o=Yl(i,n));){var l=Ul(o[0]);h[u]=l,""===l&&(i.lastIndex=Xl(n,zl(i.lastIndex),s)),u++}return 0===u?null:h}]}));var Wl=T,ql=zt,$l=Math.floor,Gl=Wl("".charAt),Ql=Wl("".replace),Zl=Wl("".slice),Kl=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,Jl=/\$([$&'`]|\d{1,2})/g,tc=pa,ec=c,rc=T,ic=bl,nc=s,ac=Ie,sc=U,oc=H,hc=ai,uc=ci,lc=au,cc=L,fc=Nl,gc=St,pc=function(t,e,r,i,n,a){var s=r+t.length,o=i.length,h=Jl;return void 0!==n&&(n=ql(n),h=Kl),Ql(a,h,(function(a,h){var u;switch(Gl(h,0)){case"$":return"$";case"&":return t;case"`":return Zl(e,0,r);case"'":return Zl(e,s);case"<":u=n[Zl(h,1,-1)];break;default:var l=+h;if(0===l)return a;if(l>o){var c=$l(l/10);return 0===c?a:c<=o?void 0===i[c-1]?Gl(h,1):i[c-1]+Gl(h,1):a}u=i[l-1]}return void 0===u?"":u}))},dc=Ll,yc=ie("replace"),vc=Math.max,mc=Math.min,xc=rc([].concat),bc=rc([].push),wc=rc("".indexOf),Sc=rc("".slice),Tc="$0"==="a".replace(/./,"$0"),Oc=!!/./[yc]&&""===/./[yc]("a","$0");ic("replace",(function(t,e,r){var i=Oc?"$":"$0";return[function(t,r){var i=cc(this),n=oc(t)?gc(t,yc):void 0;return n?ec(n,t,i,r):ec(e,lc(i),t,r)},function(t,n){var a=ac(this),s=lc(t);if("string"==typeof n&&-1===wc(n,i)&&-1===wc(n,"$<")){var o=r(e,a,s,n);if(o.done)return o.value}var h=sc(n);h||(n=lc(n));var u,l=a.global;l&&(u=a.unicode,a.lastIndex=0);for(var c,f=[];null!==(c=dc(a,s))&&(bc(f,c),l);){""===lc(c[0])&&(a.lastIndex=fc(s,uc(a.lastIndex),u))}for(var g,p="",d=0,y=0;y<f.length;y++){for(var v,m=lc((c=f[y])[0]),x=vc(mc(hc(c.index),s.length),0),b=[],w=1;w<c.length;w++)bc(b,void 0===(g=c[w])?g:String(g));var S=c.groups;if(h){var T=xc([m],b,x,s);void 0!==S&&bc(T,S),v=lc(tc(n,void 0,T))}else v=pc(m,s,x,b,S,n);x>=d&&(p+=Sc(s,d,x)+v,d=x+m.length)}return p+Sc(s,d)}]}),!!nc((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")}))||!Tc||Oc);var Ac,Cc=H,Pc=P,Ec=ie("match"),Nc=function(t){var e;return Cc(t)&&(void 0!==(e=t[Ec])?!!e:"RegExp"===Pc(t))},Mc=TypeError,Rc=function(t){if(Nc(t))throw new Mc("The method doesn't accept regular expressions");return t},_c=ie("match"),Vc=function(t){var e=/./;try{"/./"[t](e)}catch(r){try{return e[_c]=!1,"/./"[t](e)}catch(t){}}return!1},Ic=tn,kc=va,Lc=a.f,Dc=ci,jc=au,Bc=Rc,zc=L,Uc=Vc,Fc=kc("".slice),Hc=Math.min,Xc=Uc("startsWith");Ic({target:"String",proto:!0,forced:!!(Xc||(Ac=Lc(String.prototype,"startsWith"),!Ac||Ac.writable))&&!Xc},{startsWith:function(t){var e=jc(zc(this));Bc(t);var r=Dc(Hc(arguments.length>1?arguments[1]:void 0,e.length)),i=jc(t);return Fc(e,r,r+i.length)===i}});var Yc=ie,Wc=ju,qc=Ne.f,$c=Yc("unscopables"),Gc=Array.prototype;void 0===Gc[$c]&&qc(Gc,$c,{configurable:!0,value:Wc(null)});var Qc,Zc,Kc,Jc=!s((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})),tf=Ht,ef=U,rf=zt,nf=Jc,af=pr("IE_PROTO"),sf=Object,of=sf.prototype,hf=nf?sf.getPrototypeOf:function(t){var e=rf(t);if(tf(e,af))return e[af];var r=e.constructor;return ef(r)&&e instanceof r?r.prototype:e instanceof sf?of:null},uf=s,lf=U,cf=H,ff=hf,gf=Jr,pf=ie("iterator"),df=!1;[].keys&&("next"in(Kc=[].keys())?(Zc=ff(ff(Kc)))!==Object.prototype&&(Qc=Zc):df=!0);var yf=!cf(Qc)||uf((function(){var t={};return Qc[pf].call(t)!==t}));yf&&(Qc={}),lf(Qc[pf])||gf(Qc,pf,(function(){return this}));var vf={IteratorPrototype:Qc,BUGGY_SAFARI_ITERATORS:df},mf=vf.IteratorPrototype,xf=ju,bf=m,wf=Sn,Sf=Xo,Tf=function(){return this},Of=tn,Af=c,Cf=U,Pf=function(t,e,r,i){var n=e+" Iterator";return t.prototype=xf(mf,{next:bf(+!i,r)}),wf(t,n,!1),Sf[n]=Tf,t},Ef=hf,Nf=mn,Mf=Sn,Rf=$e,_f=Jr,Vf=Xo,If=er.PROPER,kf=er.CONFIGURABLE,Lf=vf.IteratorPrototype,Df=vf.BUGGY_SAFARI_ITERATORS,jf=ie("iterator"),Bf="keys",zf="values",Uf="entries",Ff=function(){return this},Hf=B,Xf=function(t){Gc[$c][t]=!0},Yf=Xo,Wf=Nr,qf=Ne.f,$f=function(t,e,r,i,n,a,s){Pf(r,e,i);var o,h,u,l=function(t){if(t===n&&d)return d;if(!Df&&t&&t in g)return g[t];switch(t){case Bf:case zf:case Uf:return function(){return new r(this,t)}}return function(){return new r(this)}},c=e+" Iterator",f=!1,g=t.prototype,p=g[jf]||g["@@iterator"]||n&&g[n],d=!Df&&p||l(n),y="Array"===e&&g.entries||p;if(y&&(o=Ef(y.call(new t)))!==Object.prototype&&o.next&&(Ef(o)!==Lf&&(Nf?Nf(o,Lf):Cf(o[jf])||_f(o,jf,Ff)),Mf(o,c,!0)),If&&n===zf&&p&&p.name!==zf&&(kf?Rf(g,"name",zf):(f=!0,d=function(){return Af(p,this)})),n)if(h={values:l(zf),keys:a?d:l(Bf),entries:l(Uf)},s)for(u in h)(Df||f||!(u in g))&&_f(g,u,h[u]);else Of({target:e,proto:!0,forced:Df||f},h);return g[jf]!==d&&_f(g,jf,d,{name:n}),Vf[e]=d,h},Gf=function(t,e){return{value:t,done:e}},Qf=o,Zf="Array Iterator",Kf=Wf.set,Jf=Wf.getterFor(Zf),tg=$f(Array,"Array",(function(t,e){Kf(this,{type:Zf,target:Hf(t),index:0,kind:e})}),(function(){var t=Jf(this),e=t.target,r=t.index++;if(!e||r>=e.length)return t.target=null,Gf(void 0,!0);switch(t.kind){case"keys":return Gf(r,!1);case"values":return Gf(e[r],!1)}return Gf([r,e[r]],!1)}),"values"),eg=Yf.Arguments=Yf.Array;if(Xf("keys"),Xf("values"),Xf("entries"),Qf&&"values"!==eg.name)try{qf(eg,"name",{value:"values"})}catch(t){}var rg=ve("span").classList,ig=rg&&rg.constructor&&rg.constructor.prototype,ng=ig===Object.prototype?void 0:ig,ag=n,sg={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},og=ng,hg=tg,ug=$e,lg=Sn,cg=ie("iterator"),fg=hg.values,gg=function(t,e){if(t){if(t[cg]!==fg)try{ug(t,cg,fg)}catch(e){t[cg]=fg}if(lg(t,e,!0),sg[e])for(var r in hg)if(t[r]!==hg[r])try{ug(t,r,hg[r])}catch(e){t[r]=hg[r]}}};for(var pg in sg)gg(ag[pg]&&ag[pg].prototype,pg);function dg(t){var e=function(t,e){if("object"!=r(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var n=i.call(t,e);if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==r(e)?e:e+""}function yg(t,e,r){return(e=dg(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}gg(og,"DOMTokenList");var vg,mg=xt,xg=zt,bg=_,wg=gi,Sg=TypeError,Tg="Reduce of empty array with no initial value",Og={left:(vg=!1,function(t,e,r,i){var n=xg(t),a=bg(n),s=wg(n);if(mg(e),0===s&&r<2)throw new Sg(Tg);var o=vg?s-1:0,h=vg?-1:1;if(r<2)for(;;){if(o in a){i=a[o],o+=h;break}if(o+=h,vg?o<0:s<=o)throw new Sg(Tg)}for(;vg?o>=0:s>o;o+=h)o in a&&(i=e(i,a[o],o,n));return i})},Ag=s,Cg=function(t,e){var r=[][t];return!!r&&Ag((function(){r.call(null,e||function(){return 1},1)}))},Pg=Og.left;tn({target:"Array",proto:!0,forced:!on&&it>79&&it<83||!Cg("reduce")},{reduce:function(t){var e=arguments.length;return Pg(this,t,e,e>1?arguments[1]:void 0)}});var Eg=tn,Ng=va,Mg=a.f,Rg=ci,_g=au,Vg=Rc,Ig=L,kg=Vc,Lg=Ng("".slice),Dg=Math.min,jg=kg("endsWith"),Bg=!jg&&!!function(){var t=Mg(String.prototype,"endsWith");return t&&!t.writable}();Eg({target:"String",proto:!0,forced:!Bg&&!jg},{endsWith:function(t){var e=_g(Ig(this));Vg(t);var r=arguments.length>1?arguments[1]:void 0,i=e.length,n=void 0===r?i:Dg(Rg(r),i),a=_g(t);return Lg(e,n-a.length,n)===a}});var zg=c,Ug=T,Fg=bl,Hg=Ie,Xg=H,Yg=L,Wg=ua,qg=Nl,$g=ci,Gg=au,Qg=St,Zg=Ll,Kg=s,Jg=cu.UNSUPPORTED_Y,tp=Math.min,ep=Ug([].push),rp=Ug("".slice),ip=!Kg((function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var r="ab".split(t);return 2!==r.length||"a"!==r[0]||"b"!==r[1]})),np="c"==="abbc".split(/(b)*/)[1]||4!=="test".split(/(?:)/,-1).length||2!=="ab".split(/(?:ab)*/).length||4!==".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length;Fg("split",(function(t,e,r){var i="0".split(void 0,0).length?function(t,r){return void 0===t&&0===r?[]:zg(e,this,t,r)}:e;return[function(e,r){var n=Yg(this),a=Xg(e)?Qg(e,t):void 0;return a?zg(a,e,n,r):zg(i,Gg(n),e,r)},function(t,n){var a=Hg(this),s=Gg(t);if(!np){var o=r(i,a,s,n,i!==e);if(o.done)return o.value}var h=Wg(a,RegExp),u=a.unicode,l=(a.ignoreCase?"i":"")+(a.multiline?"m":"")+(a.unicode?"u":"")+(Jg?"g":"y"),c=new h(Jg?"^(?:"+a.source+")":a,l),f=void 0===n?4294967295:n>>>0;if(0===f)return[];if(0===s.length)return null===Zg(c,s)?[s]:[];for(var g=0,p=0,d=[];p<s.length;){c.lastIndex=Jg?0:p;var y,v=Zg(c,Jg?rp(s,p):s);if(null===v||(y=tp($g(c.lastIndex+(Jg?p:0)),s.length))===g)p=qg(s,p,u);else{if(ep(d,rp(s,g,p)),d.length===f)return d;for(var m=1;m<=v.length-1;m++)if(ep(d,v[m]),d.length===f)return d;p=g=y}}return ep(d,rp(s,g)),d}]}),np||!ip,Jg);var ap={exports:{}},sp={exports:{}},op=sp.exports;(function(){var t,e,r,i,n,a;"undefined"!=typeof performance&&null!==performance&&performance.now?sp.exports=function(){return performance.now()}:"undefined"!=typeof process&&null!==process&&process.hrtime?(sp.exports=function(){return(t()-n)/1e6},e=process.hrtime,i=(t=function(){var t;return 1e9*(t=e())[0]+t[1]})(),a=1e9*process.uptime(),n=i-a):Date.now?(sp.exports=function(){return Date.now()-r},r=Date.now()):(sp.exports=function(){return(new Date).getTime()-r},r=(new Date).getTime())}).call(op);for(var hp=sp.exports,up="undefined"==typeof window?t:window,lp=["moz","webkit"],cp="AnimationFrame",fp=up["request"+cp],gp=up["cancel"+cp]||up["cancelRequest"+cp],pp=0;!fp&&pp<lp.length;pp++)fp=up[lp[pp]+"Request"+cp],gp=up[lp[pp]+"Cancel"+cp]||up[lp[pp]+"CancelRequest"+cp];if(!fp||!gp){var dp=0,yp=0,vp=[],mp=1e3/60;fp=function(t){if(0===vp.length){var e=hp(),r=Math.max(0,mp-(e-dp));dp=r+e,setTimeout((function(){var t=vp.slice(0);vp.length=0;for(var e=0;e<t.length;e++)if(!t[e].cancelled)try{t[e].callback(dp)}catch(t){setTimeout((function(){throw t}),0)}}),Math.round(r))}return vp.push({handle:++yp,callback:t,cancelled:!1}),yp},gp=function(t){for(var e=0;e<vp.length;e++)vp[e].handle===t&&(vp[e].cancelled=!0)}}ap.exports=function(t){return fp.call(up,t)},ap.exports.cancel=function(){gp.apply(up,arguments)},ap.exports.polyfill=function(t){t||(t=up),t.requestAnimationFrame=fp,t.cancelAnimationFrame=gp};var xp,bp=e(ap.exports),wp="\t\n\v\f\r \u2028\u2029\ufeff",Sp=L,Tp=au,Op=wp,Ap=T("".replace),Cp=RegExp("^["+Op+"]+"),Pp=RegExp("(^|[^"+Op+"])["+Op+"]+$"),Ep={trim:(xp=3,function(t){var e=Tp(Sp(t));return 1&xp&&(e=Ap(e,Cp,"")),2&xp&&(e=Ap(e,Pp,"$1")),e})},Np=er.PROPER,Mp=s,Rp=wp,_p=Ep.trim;tn({target:"String",proto:!0,forced:function(t){return Mp((function(){return!!Rp[t]()||"
"!=="
"[t]()||Np&&Rp[t].name!==t}))}("trim")},{trim:function(){return _p(this)}});var Vp=function(t){this.ok=!1,this.alpha=1,"#"==t.charAt(0)&&(t=t.substr(1,6)),t=(t=t.replace(/ /g,"")).toLowerCase();var e={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"};t=e[t]||t;for(var r=[{re:/^rgba\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3}),\s*((?:\d?\.)?\d)\)$/,example:["rgba(123, 234, 45, 0.8)","rgba(255,234,245,1.0)"],process:function(t){return[parseInt(t[1]),parseInt(t[2]),parseInt(t[3]),parseFloat(t[4])]}},{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(t){return[parseInt(t[1]),parseInt(t[2]),parseInt(t[3])]}},{re:/^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,example:["#00ff00","336699"],process:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/^([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,example:["#fb0","f0f"],process:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}}],i=0;i<r.length;i++){var n=r[i].re,a=r[i].process,s=n.exec(t);if(s){var o=a(s);this.r=o[0],this.g=o[1],this.b=o[2],o.length>3&&(this.alpha=o[3]),this.ok=!0}}this.r=this.r<0||isNaN(this.r)?0:this.r>255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.alpha=this.alpha<0?0:this.alpha>1||isNaN(this.alpha)?1:this.alpha,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toRGBA=function(){return"rgba("+this.r+", "+this.g+", "+this.b+", "+this.alpha+")"},this.toHex=function(){var t=this.r.toString(16),e=this.g.toString(16),r=this.b.toString(16);return 1==t.length&&(t="0"+t),1==e.length&&(e="0"+e),1==r.length&&(r="0"+r),"#"+t+e+r},this.getHelpXML=function(){for(var t=new Array,i=0;i<r.length;i++)for(var n=r[i].example,a=0;a<n.length;a++)t[t.length]=n[a];for(var s in e)t[t.length]=s;var o=document.createElement("ul");o.setAttribute("id","rgbcolor-examples");for(i=0;i<t.length;i++)try{var h=document.createElement("li"),u=new RGBColor(t[i]),l=document.createElement("div");l.style.cssText="margin: 3px; border: 1px solid black; background:"+u.toHex()+"; color:"+u.toHex(),l.appendChild(document.createTextNode("test"));var c=document.createTextNode(" "+t[i]+" -> "+u.toRGB()+" -> "+u.toHex());h.appendChild(l),h.appendChild(c),o.appendChild(h)}catch(t){}return o}},Ip=e(Vp),kp=tn,Lp=vi.indexOf,Dp=Cg,jp=va([].indexOf),Bp=!!jp&&1/jp([1],1,-0)<0;kp({target:"Array",proto:!0,forced:Bp||!Dp("indexOf")},{indexOf:function(t){var e=arguments.length>1?arguments[1]:void 0;return Bp?jp(this,t,e)||0:Lp(this,t,e)}});var zp=tn,Up=Rc,Fp=L,Hp=au,Xp=Vc,Yp=T("".indexOf);zp({target:"String",proto:!0,forced:!Xp("includes")},{includes:function(t){return!!~Yp(Hp(Fp(this)),Hp(Up(t)),arguments.length>1?arguments[1]:void 0)}});var Wp=P,qp=tn,$p=Array.isArray||function(t){return"Array"===Wp(t)},Gp=T([].reverse),Qp=[1,2];qp({target:"Array",proto:!0,forced:String(Qp)===String(Qp.reverse())},{reverse:function(){return $p(this)&&(this.length=this.length),Gp(this)}});
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
var Zp=function(t,e){return(Zp=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)};function Kp(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}Zp(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}function Jp(t,e){var r=t[0],i=t[1];return[r*Math.cos(e)-i*Math.sin(e),r*Math.sin(e)+i*Math.cos(e)]}function td(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var r=0;r<t.length;r++)if("number"!=typeof t[r])throw new Error("assertNumbers arguments["+r+"] is not a number. "+typeof t[r]+" == typeof "+t[r]);return!0}var ed=Math.PI;function rd(t,e,r){t.lArcFlag=0===t.lArcFlag?0:1,t.sweepFlag=0===t.sweepFlag?0:1;var i=t.rX,n=t.rY,a=t.x,s=t.y;i=Math.abs(t.rX),n=Math.abs(t.rY);var o=Jp([(e-a)/2,(r-s)/2],-t.xRot/180*ed),h=o[0],u=o[1],l=Math.pow(h,2)/Math.pow(i,2)+Math.pow(u,2)/Math.pow(n,2);1<l&&(i*=Math.sqrt(l),n*=Math.sqrt(l)),t.rX=i,t.rY=n;var c=Math.pow(i,2)*Math.pow(u,2)+Math.pow(n,2)*Math.pow(h,2),f=(t.lArcFlag!==t.sweepFlag?1:-1)*Math.sqrt(Math.max(0,(Math.pow(i,2)*Math.pow(n,2)-c)/c)),g=i*u/n*f,p=-n*h/i*f,d=Jp([g,p],t.xRot/180*ed);t.cX=d[0]+(e+a)/2,t.cY=d[1]+(r+s)/2,t.phi1=Math.atan2((u-p)/n,(h-g)/i),t.phi2=Math.atan2((-u-p)/n,(-h-g)/i),0===t.sweepFlag&&t.phi2>t.phi1&&(t.phi2-=2*ed),1===t.sweepFlag&&t.phi2<t.phi1&&(t.phi2+=2*ed),t.phi1*=180/ed,t.phi2*=180/ed}function id(t,e,r){td(t,e,r);var i=t*t+e*e-r*r;if(0>i)return[];if(0===i)return[[t*r/(t*t+e*e),e*r/(t*t+e*e)]];var n=Math.sqrt(i);return[[(t*r+e*n)/(t*t+e*e),(e*r-t*n)/(t*t+e*e)],[(t*r-e*n)/(t*t+e*e),(e*r+t*n)/(t*t+e*e)]]}var nd,ad=Math.PI/180;function sd(t,e,r){return(1-r)*t+r*e}function od(t,e,r,i){return t+Math.cos(i/180*ed)*e+Math.sin(i/180*ed)*r}function hd(t,e,r,i){var n=1e-6,a=e-t,s=r-e,o=3*a+3*(i-r)-6*s,h=6*(s-a),u=3*a;return Math.abs(o)<n?[-u/h]:function(t,e,r){var i=t*t/4-e;if(i<-1e-6)return[];if(i<=r)return[-t/2];var n=Math.sqrt(i);return[-t/2-n,-t/2+n]}(h/o,u/o,n)}function ud(t,e,r,i,n){var a=1-n;return t*(a*a*a)+e*(3*a*a*n)+r*(3*a*n*n)+i*(n*n*n)}!function(t){function e(){return n((function(t,e,r){return t.relative&&(void 0!==t.x1&&(t.x1+=e),void 0!==t.y1&&(t.y1+=r),void 0!==t.x2&&(t.x2+=e),void 0!==t.y2&&(t.y2+=r),void 0!==t.x&&(t.x+=e),void 0!==t.y&&(t.y+=r),t.relative=!1),t}))}function r(){var t=NaN,e=NaN,r=NaN,i=NaN;return n((function(n,a,s){return n.type&dd.SMOOTH_CURVE_TO&&(n.type=dd.CURVE_TO,t=isNaN(t)?a:t,e=isNaN(e)?s:e,n.x1=n.relative?a-t:2*a-t,n.y1=n.relative?s-e:2*s-e),n.type&dd.CURVE_TO?(t=n.relative?a+n.x2:n.x2,e=n.relative?s+n.y2:n.y2):(t=NaN,e=NaN),n.type&dd.SMOOTH_QUAD_TO&&(n.type=dd.QUAD_TO,r=isNaN(r)?a:r,i=isNaN(i)?s:i,n.x1=n.relative?a-r:2*a-r,n.y1=n.relative?s-i:2*s-i),n.type&dd.QUAD_TO?(r=n.relative?a+n.x1:n.x1,i=n.relative?s+n.y1:n.y1):(r=NaN,i=NaN),n}))}function i(){var t=NaN,e=NaN;return n((function(r,i,n){if(r.type&dd.SMOOTH_QUAD_TO&&(r.type=dd.QUAD_TO,t=isNaN(t)?i:t,e=isNaN(e)?n:e,r.x1=r.relative?i-t:2*i-t,r.y1=r.relative?n-e:2*n-e),r.type&dd.QUAD_TO){t=r.relative?i+r.x1:r.x1,e=r.relative?n+r.y1:r.y1;var a=r.x1,s=r.y1;r.type=dd.CURVE_TO,r.x1=((r.relative?0:i)+2*a)/3,r.y1=((r.relative?0:n)+2*s)/3,r.x2=(r.x+2*a)/3,r.y2=(r.y+2*s)/3}else t=NaN,e=NaN;return r}))}function n(t){var e=0,r=0,i=NaN,n=NaN;return function(a){if(isNaN(i)&&!(a.type&dd.MOVE_TO))throw new Error("path must start with moveto");var s=t(a,e,r,i,n);return a.type&dd.CLOSE_PATH&&(e=i,r=n),void 0!==a.x&&(e=a.relative?e+a.x:a.x),void 0!==a.y&&(r=a.relative?r+a.y:a.y),a.type&dd.MOVE_TO&&(i=e,n=r),s}}function a(t,e,r,i,a,s){return td(t,e,r,i,a,s),n((function(n,o,h,u){var l=n.x1,c=n.x2,f=n.relative&&!isNaN(u),g=void 0!==n.x?n.x:f?0:o,p=void 0!==n.y?n.y:f?0:h;function d(t){return t*t}n.type&dd.HORIZ_LINE_TO&&0!==e&&(n.type=dd.LINE_TO,n.y=n.relative?0:h),n.type&dd.VERT_LINE_TO&&0!==r&&(n.type=dd.LINE_TO,n.x=n.relative?0:o),void 0!==n.x&&(n.x=n.x*t+p*r+(f?0:a)),void 0!==n.y&&(n.y=g*e+n.y*i+(f?0:s)),void 0!==n.x1&&(n.x1=n.x1*t+n.y1*r+(f?0:a)),void 0!==n.y1&&(n.y1=l*e+n.y1*i+(f?0:s)),void 0!==n.x2&&(n.x2=n.x2*t+n.y2*r+(f?0:a)),void 0!==n.y2&&(n.y2=c*e+n.y2*i+(f?0:s));var y=t*i-e*r;if(void 0!==n.xRot&&(1!==t||0!==e||0!==r||1!==i))if(0===y)delete n.rX,delete n.rY,delete n.xRot,delete n.lArcFlag,delete n.sweepFlag,n.type=dd.LINE_TO;else{var v=n.xRot*Math.PI/180,m=Math.sin(v),x=Math.cos(v),b=1/d(n.rX),w=1/d(n.rY),S=d(x)*b+d(m)*w,T=2*m*x*(b-w),O=d(m)*b+d(x)*w,A=S*i*i-T*e*i+O*e*e,C=T*(t*i+e*r)-2*(S*r*i+O*t*e),P=S*r*r-T*t*r+O*t*t,E=(Math.atan2(C,A-P)+Math.PI)%Math.PI/2,N=Math.sin(E),M=Math.cos(E)