(function(){ shadow$provide[585]=function(wa,W,Ta,I){var q=W(2),R=W(202).Buffer;!function(A,t){"object"==typeof I&&"object"==typeof Ta?Ta.exports=t(W(22),W(31)):"function"==typeof define&&define.amd?define(["react","react-dom"],t):"object"==typeof I?I.ExcalidrawLib=t(W(22),W(31)):A.ExcalidrawLib=t(A.React,A.ReactDOM)}(self,function(A,t){return function(){function d(h){var k=C[h];if(void 0!==k)return k.exports;k=C[h]={id:h,loaded:!1,exports:{}};return B[h].call(k.exports,k,k.exports,d),k.loaded=!0,k.exports}var w, B={7945:function(h,k,f){h.exports=f(1602)},45:function(h,k,f){function v(L){var z,u,m="";if("string"==typeof L||"number"==typeof L)m+=L;else if("object"==typeof L)if(Array.isArray(L))for(z=0;z>>8^x[255&(u^z[m++])])>>>8^x[255&(u^z[m++])])>>>8^x[255&(u^z[m++])])>>>8^x[255&(u^z[m++])])>>>8^x[255&(u^z[m++])])>>>8^x[255&(u^z[m++])])>>>8^x[255&(u^z[m++])])>>>8^x[255&(u^z[m++])];for(;m>>8^x[255&(u^z[m++])];return-1^u}f.version="0.3.0";var x=function(){for(var z=0,u=Array(256),m=0;256!=m;++m)z=1&(z=1&(z=1&(z=1&(z=1&(z=1&(z=1&(z=1&(z=m)?-306674912^z>>>1:z>>>1)?-306674912^z>>>1:z>>>1)?-306674912^z>>>1:z>>>1)?-306674912^z>>>1:z>>>1)?-306674912^ z>>>1:z>>>1)?-306674912^z>>>1:z>>>1)?-306674912^z>>>1:z>>>1)?-306674912^z>>>1:z>>>1,u[m]=z;return"undefined"!=typeof Int32Array?new Int32Array(u):u}(),L="undefined"!=typeof R;f.table=x;f.bstr=function(z){if(32768>>8,u=x[255&(u^z.charCodeAt(l++))]^u>>>8;return l===m&&(u=u>>>8^x[255&(u^z.charCodeAt(l))]),-1^u};f.buf=function(z){if(1E4>>8^x[255&(u^z[m++])])>>>8^x[255&(u^z[m++])])>>>8^x[255&(u^z[m++])])>>>8^x[255&(u^z[m++])];for(;m>>8^x[255&(u^z[m++])];return-1^u};f.str=function(z){for(var u,m,l=-1,J=0,X=z.length;J(u=z.charCodeAt(J++))?l=l>>>8^x[255&(l^u)]:2048>u?l=(l=l>>>8^x[255&(l^(192|u>>6&31))])>>>8^x[255&(l^(128|63&u))]:55296<=u&&57344>u?(u=64+(1023&u),m=1023&z.charCodeAt(J++),l=(l=(l=(l=l>>>8^x[255&(l^(240|u>>8&7))])>>>8^x[255&(l^(128|u>>2&63))])>>>8^x[255&(l^(128|m>>6&15|3&u))])>>>8^x[255&(l^(128|63&m))]): l=(l=(l=l>>>8^x[255&(l^(224|u>>12&15))])>>>8^x[255&(l^(128|u>>6&63))])>>>8^x[255&(l^(128|63&u))];return-1^l}};"undefined"==typeof DO_NOT_EXPORT_CRC?h(k):h({})},4739:function(h,k,f){function v(Ea,Oa){const Xa="atom"+ ++Ua,Ma={toString:()=>Xa};return"function"==typeof Ea?Ma.read=Ea:(Ma.init=Ea,Ma.read=eb=>eb(Ma),Ma.write=(eb,db,Na)=>db(Ma,"function"==typeof Na?Na(eb(Ma)):Na)),Oa&&(Ma.write=Oa),Ma}function x(Ea,Oa){Oa=da(Oa);const {s:Xa}=(0,u.useContext)(Oa),Ma=(0,u.useCallback)(Ca=>{Ca=Xa.r(Ea,Ca); if("e"in Ca)throw Ca.e;if("p"in Ca)throw Ca.p;if("v"in Ca)return Ca.v;throw Error("no atom value");},[Xa,Ea]),[[eb,db,Na],oa]=(0,u.useReducer)((0,u.useCallback)((Ca,sa)=>{const Aa=Ma(sa);return Object.is(Ca[1],Aa)&&Ca[2]===Ea?Ca:[sa,Aa,Ea]},[Ma,Ea]),void 0,()=>[void 0,Ma(void 0),Ea]);return Na!==Ea&&oa(void 0),(0,u.useEffect)(()=>{const Ca=Xa.s(Ea,oa);return oa(void 0),Ca},[Xa,Ea]),(0,u.useEffect)(()=>{Xa.c(Ea,eb)}),(0,u.useDebugValue)(db),db}function L(Ea,Oa){Oa=da(Oa);const {s:Xa,w:Ma}=(0,u.useContext)(Oa); return(0,u.useCallback)(eb=>{if(!("write"in Ea))throw Error("not writable atom");const db=Na=>Xa.w(Ea,eb,Na);return Ma?Ma(db):Xa.w(Ea,eb,void 0)},[Xa,Ma,Ea])}function z(Ea,Oa){return"scope"in Ea&&(console.warn("atom.scope is deprecated. Please do useAtom(atom, scope) instead."),Oa=Ea.scope),[x(Ea,Oa),L(Ea,Oa)]}f.d(k,{KO:function(){return z},Vv:function(){return D},cn:function(){return v},zt:function(){return Ha}});var u=f(9787);const m=Symbol(),l=Ea=>{var Oa,Xa;null==(Xa=(Oa=Ea[m]).c)||Xa.call(Oa)}, J=(Ea,Oa)=>{const Xa=Ea[m].o,Ma=Oa[m].o;return Xa===Ma||Ea===Ma||!!Xa[m]&&J(Xa,Oa)},X=Ea=>{const Oa={o:Ea,c:null},Xa=new Promise(Ma=>{Oa.c=()=>{Oa.c=null;Ma()};Ea.then(Oa.c,Oa.c)});return Xa[m]=Oa,Xa};var F=Object.defineProperty,ha=Object.defineProperties,T=Object.getOwnPropertyDescriptors,Z=Object.getOwnPropertySymbols,E=Object.prototype.hasOwnProperty,aa=Object.prototype.propertyIsEnumerable,M=(Ea,Oa,Xa)=>Oa in Ea?F(Ea,Oa,{enumerable:!0,configurable:!0,writable:!0,value:Xa}):Ea[Oa]=Xa;const S=Ea=> {const Oa=new WeakMap,Xa=new WeakMap,Ma=new Map;let eb,db;if(eb=new Set,db=new Set,Ea)for(const [Fb,yc]of Ea)Ea={v:yc,r:0,d:new Map},Object.freeze(Ea),"init"in Fb||console.warn("Found initial value for derived atom which can cause unexpected behavior",Fb),Oa.set(Fb,Ea);const Na=new WeakMap,oa=new WeakMap,Ca=Fb=>{let yc=oa.get(Fb);return yc||(yc=new Map,oa.set(Fb,yc)),yc},sa=(Fb,yc)=>{if(Fb){const Vc=Ca(Fb);let hd=Vc.get(yc);return hd||(hd=sa(Fb.p,yc),hd&&("p"in hd&&hd.p.then(()=>Vc.delete(yc)),Vc.set(yc, hd))),hd}return Oa.get(yc)},Aa=(Fb,yc,Vc)=>{(Object.freeze(Vc),Fb)?Ca(Fb).set(yc,Vc):(Fb=Oa.get(yc),Oa.set(yc,Vc),Ma.has(yc)||Ma.set(yc,Fb))},Ja=(Fb,yc=new Map,Vc)=>{if(!Vc)return yc;const hd=new Map;let Kd=!1;return Vc.forEach(Jd=>{var pc;const Dd=(null==(pc=sa(Fb,Jd))?void 0:pc.r)||0;hd.set(Jd,Dd);yc.get(Jd)!==Dd&&(Kd=!0)}),yc.size!==hd.size||Kd?hd:yc},Sa=(Fb,yc,Vc,hd,Kd)=>{const Jd=sa(Fb,yc);if(Jd){if(Kd&&!("p"in Jd&&J(Jd.p,Kd)))return Jd;"p"in Jd&&l(Jd.p)}hd={v:Vc,r:(null==Jd?void 0:Jd.r)||0, d:Ja(Fb,null==Jd?void 0:Jd.d,hd)};return Jd&&"v"in Jd&&Object.is(Jd.v,Vc)?hd.d===Jd.d||hd.d.size===Jd.d.size&&Array.from(hd.d.keys()).every(pc=>Jd.d.has(pc))||Promise.resolve().then(()=>{Pc(Fb)}):(++hd.r,hd.d.has(yc)&&(hd.d=(new Map(hd.d)).set(yc,hd.r))),Aa(Fb,yc,hd),hd},Ab=(Fb,yc,Vc,hd,Kd)=>{const Jd=sa(Fb,yc);if(Jd){if(Kd&&!("p"in Jd&&J(Jd.p,Kd)))return Jd;"p"in Jd&&l(Jd.p)}Vc={e:Vc,r:(null==Jd?void 0:Jd.r)||0,d:Ja(Fb,null==Jd?void 0:Jd.d,hd)};return Aa(Fb,yc,Vc),Vc},jb=(Fb,yc,Vc,hd)=>{const Kd= sa(Fb,yc);if(Kd&&"p"in Kd){if(J(Kd.p,Vc))return Kd;l(Kd.p)}((Jd,pc,Dd)=>{let wd=Na.get(pc);wd||(wd=new Map,Na.set(pc,wd));Dd.then(()=>{wd.get(Jd)===Dd&&(wd.delete(Jd),wd.size||Na.delete(pc))});wd.set(Jd,Dd)})(Fb,yc,Vc);Vc={p:Vc,r:(null==Kd?void 0:Kd.r)||0,d:Ja(Fb,null==Kd?void 0:Kd.d,hd)};return Aa(Fb,yc,Vc),Vc},Ob=(Fb,yc,Vc,hd)=>{if(Vc instanceof Promise){const Kd=X(Vc.then(Jd=>{Sa(Fb,yc,Jd,hd,Kd);Pc(Fb)}).catch(Jd=>{if(Jd instanceof Promise)return Jd[m]?Jd.then(()=>{Wb(Fb,yc,!0)}):Jd;Ab(Fb,yc,Jd, hd,Kd);Pc(Fb)}));return jb(Fb,yc,Kd,hd)}return Sa(Fb,yc,Vc,hd)},Wb=(Fb,yc,Vc)=>{if(!Vc&&(Vc=sa(Fb,yc))&&(Vc.r!==Vc.i&&"p"in Vc&&Vc.p[m].c||(Vc.d.forEach((Jd,pc)=>{pc!==yc&&(Xa.has(pc)?(Jd=sa(Fb,pc))&&Jd.r===Jd.i&&Wb(Fb,pc):Wb(Fb,pc))}),Array.from(Vc.d).every(([Jd,pc])=>(Jd=sa(Fb,Jd))&&"v"in Jd&&Jd.r===pc))))return Vc;const hd=new Set;try{var Kd=yc.read(Jd=>{hd.add(Jd);const pc=Jd===yc?sa(Fb,Jd):Wb(Fb,Jd);if(pc){if("e"in pc)throw pc.e;if("p"in pc)throw pc.p;return pc.v}if("init"in Jd)return Jd.init; throw Error("no atom init");});return Ob(Fb,yc,Kd,hd)}catch(Jd){return Jd instanceof Promise?(Kd=X(Jd),jb(Fb,yc,Kd,hd)):Ab(Fb,yc,Jd,hd)}},hc=(Fb,yc)=>!yc.l.size&&(!yc.t.size||1===yc.t.size&&yc.t.has(Fb)),Pa=(Fb,yc)=>{const Vc=Xa.get(yc);null==Vc||Vc.t.forEach(hd=>{if(hd!==yc){const Yd=sa(Fb,hd);if(Yd){"p"in Yd&&l(Yd.p);var Kd={},Jd=Yd,pc;for(pc in Jd||={})E.call(Jd,pc)&&M(Kd,pc,Jd[pc]);if(Z)for(pc of Z(Jd))aa.call(Jd,pc)&&M(Kd,pc,Jd[pc]);Kd=(Dd=Kd,wd={i:Yd.r},ha(Dd,T(wd)));Aa(Fb,hd,Kd)}else console.warn("[Bug] could not invalidate non existing atom", hd);var Dd,wd;Pa(Fb,hd)}})},ob=(Fb,yc,Vc)=>{let hd=!0;const Kd=(Jd,pc)=>{const Dd=Wb(Fb,Jd);if("e"in Dd)throw Dd.e;if("p"in Dd){if(null==pc?0:pc.unstable_promise)return Dd.p.then(()=>Kd(Jd,pc));throw console.info("Reading pending atom state in write operation. We throw a promise for now.",Jd),Dd.p;}if("v"in Dd)return Dd.v;throw console.warn("[Bug] no value found while reading atom in write operation. This is probably a bug.",Jd),Error("no value found");};Vc=yc.write(Kd,(Jd,pc)=>{let Dd;if(Jd===yc){if(!("init"in Jd))throw Error("atom not writable");(wd=>{const Yd=new Set,td=Na.get(wd);return td&&(Na.delete(wd),td.forEach((Qd,ld)=>{l(Qd);Yd.add(ld)})),Yd})(Jd).forEach(wd=>{wd!==Fb&&Ob(wd,Jd,pc)});Ob(Fb,Jd,pc);Pa(Fb,Jd)}else Dd=ob(Fb,Jd,pc);return hd||Pc(Fb),Dd},Vc);return hd=!1,Fb=void 0,Vc},pb=(Fb,yc,Vc)=>{Fb=ob(Vc,Fb,yc);return Pc(Vc),Fb},Zb=(Fb,yc)=>{yc={t:new Set(yc&&[yc]),l:new Set};Xa.set(Fb,yc);db.add(Fb);if(Wb(void 0,Fb).d.forEach((Vc,hd)=>{(Vc=Xa.get(hd))?Vc.t.add(Fb):hd!==Fb&&Zb(hd,Fb)}),Fb.write&& Fb.onMount){const Vc=Fb.onMount(hd=>pb(Fb,hd));Vc&&(yc.u=Vc)}return yc},Jc=Fb=>{var yc;const Vc=null==(yc=Xa.get(Fb))?void 0:yc.u;Vc&&Vc();Xa.delete(Fb);db.delete(Fb);(yc=sa(void 0,Fb))?yc.d.forEach((hd,Kd)=>{Kd!==Fb&&(hd=Xa.get(Kd))&&(hd.t.delete(Fb),hc(Kd,hd)&&Jc(Kd))}):console.warn("[Bug] could not find atom state to unmount",Fb)},ad=(Fb,yc,Vc)=>{const hd=new Set(yc.d.keys());null==Vc||Vc.forEach((Kd,Jd)=>{if(hd.has(Jd))return void hd.delete(Jd);(Kd=Xa.get(Jd))&&(Kd.t.delete(Fb),hc(Jd,Kd)&&Jc(Jd))}); hd.forEach(Kd=>{const Jd=Xa.get(Kd);Jd?Jd.t.add(Fb):Xa.has(Fb)&&Zb(Kd,Fb)})},Pc=Fb=>{if(Fb)Ca(Fb).forEach((yc,Vc)=>{yc!==Oa.get(Vc)&&(yc=Xa.get(Vc),null==yc||yc.l.forEach(hd=>hd(Fb)))});else{for(;Ma.size;){const yc=Array.from(Ma);Ma.clear();yc.forEach(([Vc,hd])=>{const Kd=sa(void 0,Vc);Kd&&Kd.d!==(null==hd?void 0:hd.d)&&ad(Vc,Kd,null==hd?void 0:hd.d);Vc=Xa.get(Vc);null==Vc||Vc.l.forEach(Jd=>Jd())})}eb.forEach(yc=>yc())}};return{r:(Fb,yc)=>Wb(yc,Fb),w:pb,c:(Fb,yc)=>{yc&&(Vc=>{Ca(Vc).forEach((hd,Kd)=> {const Jd=Oa.get(Kd);(hd.r>((null==Jd?void 0:Jd.r)||0)||"v"in hd&&hd.r===(null==Jd?void 0:Jd.r)&&hd.d!==(null==Jd?void 0:Jd.d))&&(Oa.set(Kd,hd),hd.d!==(null==Jd?void 0:Jd.d)&&ad(Kd,hd,null==Jd?void 0:Jd.d))})})(yc);Pc(void 0)},s:(Fb,yc)=>{const Vc=(hd=>{let Kd=Xa.get(hd);return Kd||=Zb(hd),Kd})(Fb).l;return Vc.add(yc),()=>{Vc.delete(yc);const hd=Xa.get(Fb);hd&&hc(Fb,hd)&&Jc(Fb)}},h:(Fb,yc)=>{for(const [Vc,hd]of Fb)"init"in Vc&&(Ob(yc,Vc,hd),Pa(yc,Vc));Pc(yc)},n:Fb=>(eb.add(Fb),()=>{eb.delete(Fb)}), l:()=>db.values(),a:Fb=>Oa.get(Fb),m:Fb=>Xa.get(Fb)}},D=Ea=>{const Oa=S(Ea),Xa=Ma=>new Promise((eb,db)=>{const Na=Oa.r(Ma);"e"in Na?db(Na.e):eb("p"in Na?Na.p.then(()=>Xa(Ma)):Na.v)});return{get:Ma=>{Ma=Oa.r(Ma);if("e"in Ma)throw Ma.e;if(!("p"in Ma))return Ma.v},asyncGet:Xa,set:(Ma,eb)=>Oa.w(Ma,eb),sub:(Ma,eb)=>Oa.s(Ma,eb),SECRET_INTERNAL_store:Oa}},O=(Ea,Oa)=>({s:Oa?Oa(Ea).SECRET_INTERNAL_store:S(Ea)}),P=new Map,da=Ea=>(P.has(Ea)||P.set(Ea,(0,u.createContext)(O())),P.get(Ea));var ba=Object.defineProperty, H=Object.defineProperties,ja=Object.getOwnPropertyDescriptors,N=Object.getOwnPropertySymbols,ca=Object.prototype.hasOwnProperty,ia=Object.prototype.propertyIsEnumerable,ea=(Ea,Oa,Xa)=>Oa in Ea?ba(Ea,Oa,{enumerable:!0,configurable:!0,writable:!0,value:Xa}):Ea[Oa]=Xa,qa=(Ea,Oa)=>{for(var Xa in Oa||={})ca.call(Oa,Xa)&&ea(Ea,Xa,Oa[Xa]);if(N)for(Xa of N(Oa))ia.call(Oa,Xa)&&ea(Ea,Xa,Oa[Xa]);return Ea};const za=Ea=>Ea.debugLabel||Ea.toString(),ya=([Ea,Oa])=>Object.fromEntries(Oa.flatMap(Xa=>{var Ma,eb,db= null==(Ma=Ea.m)?void 0:Ma.call(Ea,Xa);if(!db)return[];Ma=db.t;db=(null==(eb=Ea.a)?void 0:eb.call(Ea,Xa))||{};return[[Xa.debugLabel||Xa.toString(),(Na=qa(qa(qa({},"e"in db&&{error:db.e}),"p"in db&&{promise:db.p}),"v"in db&&{value:db.v}),oa={dependents:Array.from(Ma).map(za)},H(Na,ja(oa)))]];var Na,oa})),Ha=({children:Ea,initialValues:Oa,scope:Xa,unstable_createStore:Ma,unstable_enableVersionedWrite:eb})=>{const [db,Na]=(0,u.useState)();(0,u.useEffect)(()=>{db&&(oa.current.s.c(null,db),delete db.p)}, [db]);const oa=(0,u.useRef)();oa.current||(oa.current=O(Oa,Ma),eb&&(oa.current.w=Ca=>{Na(sa=>{sa=sa?{p:sa}:{};return Ca(sa),sa})}));eb||(Ca=>{const {s:sa}=Ca,[Aa,Ja]=(0,u.useState)([]);(0,u.useEffect)(()=>{var Sa;const Ab=()=>{var Ob;Ja(Array.from((null==(Ob=sa.l)?void 0:Ob.call(sa))||[]))},jb=null==(Sa=sa.n)?void 0:Sa.call(sa,Ab);return Ab(),jb},[sa]);(0,u.useDebugValue)([sa,Aa],ya)})(oa.current);Oa=da(Xa);return(0,u.createElement)(Oa.Provider,{value:oa.current},Ea)};let Ua=0},200:function(h,k,f){function v(Z, E,aa){function M(ya){var Ha=da,Ua=ba;return da=ba=void 0,ia=ya,ja=Z.apply(Ua,Ha)}function S(ya){var Ha=ya-ca;return void 0===ca||Ha>=E||0>Ha||qa&&ya-ia>=H}function D(){var ya=X.Date.now();if(S(ya))return O(ya);var Ha=setTimeout,Ua=E-(ya-ca);ya=qa?T(Ua,H-(ya-ia)):Ua;N=Ha(D,ya)}function O(ya){return N=void 0,za&&da?M(ya):(da=ba=void 0,ja)}function P(){var ya=X.Date.now(),Ha=S(ya);if(da=arguments,ba=this,ca=ya,Ha){if(void 0===N)return ya=ca,ia=ya,N=setTimeout(D,E),ea?M(ya):ja;if(qa)return N=setTimeout(D, E),M(ca)}return void 0===N&&(N=setTimeout(D,E)),ja}var da,ba,H,ja,N,ca,ia=0,ea=!1,qa=!1,za=!0;if("function"!=typeof Z)throw new TypeError("Expected a function");return E=L(E)||0,x(aa)&&(ea=!!aa.leading,H=(qa="maxWait"in aa)?ha(L(aa.maxWait)||0,E):H,za="trailing"in aa?!!aa.trailing:za),P.cancel=function(){void 0!==N&&clearTimeout(N);ia=0;da=ca=ba=N=void 0},P.flush=function(){return void 0===N?ja:O(X.Date.now())},P}function x(Z){var E=typeof Z;return!!Z&&("object"==E||"function"==E)}function L(Z){if("number"== typeof Z)return Z;if("symbol"==typeof Z||Z&&"object"==typeof Z&&"[object Symbol]"==F.call(Z))return NaN;x(Z)&&(Z="function"==typeof Z.valueOf?Z.valueOf():Z,Z=x(Z)?Z+"":Z);if("string"!=typeof Z)return 0===Z?Z:+Z;Z=Z.replace(z,"");var E=m.test(Z);return E||l.test(Z)?J(Z.slice(2),E?2:8):u.test(Z)?NaN:+Z}var z=/^\s+|\s+$/g,u=/^[-+]0x[0-9a-f]+$/i,m=/^0b[01]+$/i,l=/^0o[0-7]+$/i,J=parseInt;k="object"==typeof self&&self&&self.Object===Object&&self;var X="object"==typeof f.g&&f.g&&f.g.Object===Object&&f.g|| k||Function("return this")(),F=Object.prototype.toString,ha=Math.max,T=Math.min;h.exports=function(Z,E,aa){var M=!0,S=!0;if("function"!=typeof Z)throw new TypeError("Expected a function");return x(aa)&&(M="leading"in aa?!!aa.leading:M,S="trailing"in aa?!!aa.trailing:S),v(Z,E,{leading:M,maxWait:E,trailing:S})}},2891:function(h,k,f){var v;h=f.nmd(h);(function(){function x(cb,Db,gc){switch(gc.length){case 0:return cb.call(Db);case 1:return cb.call(Db,gc[0]);case 2:return cb.call(Db,gc[0],gc[1]);case 3:return cb.call(Db, gc[0],gc[1],gc[2])}return cb.apply(Db,gc)}function L(cb,Db,gc,kb){for(var gd=-1,Cd=null==cb?0:cb.length;++gd"']/g,Ob=RegExp(Ab.source),Wb=RegExp(jb.source),hc=/<%-([\s\S]+?)%>/g,Pa=/<%([\s\S]+?)%>/g,ob=/<%=([\s\S]+?)%>/g,pb=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Zb=/^\w*$/,Jc=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ad=/[\\^$.*+?()[\]{}|]/g,Pc=RegExp(ad.source),Fb= /^\s+/,yc=/\s/,Vc=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,hd=/\{\n\/\* \[wrapped with (.+)\] \*/,Kd=/,? & /,Jd=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,pc=/[()=,{}\[\]\/\s]/,Dd=/\\(\\)?/g,wd=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Yd=/\w*$/,td=/^[-+]0x[0-9a-f]+$/i,Qd=/^0b[01]+$/i,ld=/^\[object .+?Constructor\]$/,Sd=/^0o[0-7]+$/i,Nb=/^(?:0|[1-9]\d*)$/,fc=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Yb=/($^)/,rb=/['\n\r\u2028\u2029\\]/g,nb=RegExp("['’]","g"),cc=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]", "g"),uc=RegExp("\\ud83c[\\udffb-\\udfff](?\x3d\\ud83c[\\udffb-\\udfff])|(?:[^\\ud800-\\udfff][\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]?|[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff]|[\\ud800-\\udfff])[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?(?:\\u200d(?:[^\\ud800-\\udfff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?)*", "g"),Uc=RegExp("[A-Z\\xc0-\\xd6\\xd8-\\xde]?[a-z\\xdf-\\xf6\\xf8-\\xff]+(?:['’](?:d|ll|m|re|s|t|ve))?(?\x3d[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde]|$)|(?:[A-Z\\xc0-\\xd6\\xd8-\\xde]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?\x3d[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde](?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])|$)|[A-Z\\xc0-\\xd6\\xd8-\\xde]?(?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['’](?:d|ll|m|re|s|t|ve))?|[A-Z\\xc0-\\xd6\\xd8-\\xde]+(?:['’](?:D|LL|M|RE|S|T|VE))?|\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?\x3d\\b|[a-z_])|\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?\x3d\\b|[A-Z_])|\\d+|(?:[\\u2700-\\u27bf]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?(?:\\u200d(?:[^\\ud800-\\udfff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?)*", "g"),cd=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]"),Ld=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,be="Array Buffer DataView Date Error Float32Array Float64Array Function Int8Array Int16Array Int32Array Map Math Object Promise RegExp Set String Symbol TypeError Uint8Array Uint8ClampedArray Uint16Array Uint32Array WeakMap _ clearTimeout isFinite parseInt setTimeout".split(" "),ue=-1,qd={};qd["[object Float32Array]"]=qd["[object Float64Array]"]= qd["[object Int8Array]"]=qd["[object Int16Array]"]=qd["[object Int32Array]"]=qd["[object Uint8Array]"]=qd["[object Uint8ClampedArray]"]=qd["[object Uint16Array]"]=qd["[object Uint32Array]"]=!0;qd["[object Arguments]"]=qd["[object Array]"]=qd["[object ArrayBuffer]"]=qd["[object Boolean]"]=qd["[object DataView]"]=qd["[object Date]"]=qd["[object Error]"]=qd["[object Function]"]=qd["[object Map]"]=qd["[object Number]"]=qd["[object Object]"]=qd["[object RegExp]"]=qd["[object Set]"]=qd["[object String]"]= qd["[object WeakMap]"]=!1;var vc={};vc["[object Arguments]"]=vc["[object Array]"]=vc["[object ArrayBuffer]"]=vc["[object DataView]"]=vc["[object Boolean]"]=vc["[object Date]"]=vc["[object Float32Array]"]=vc["[object Float64Array]"]=vc["[object Int8Array]"]=vc["[object Int16Array]"]=vc["[object Int32Array]"]=vc["[object Map]"]=vc["[object Number]"]=vc["[object Object]"]=vc["[object RegExp]"]=vc["[object Set]"]=vc["[object String]"]=vc["[object Symbol]"]=vc["[object Uint8Array]"]=vc["[object Uint8ClampedArray]"]= vc["[object Uint16Array]"]=vc["[object Uint32Array]"]=!0;vc["[object Error]"]=vc["[object Function]"]=vc["[object WeakMap]"]=!1;var Nc={"\\":"\\","'":"'","\n":"n","\r":"r","
":"u2028","
":"u2029"},Ie=parseFloat,qc=parseInt,He="object"==typeof f.g&&f.g&&f.g.Object===Object&&f.g,Sb="object"==typeof self&&self&&self.Object===Object&&self,Lc=He||Sb||Function("return this")(),Vb=k&&!k.nodeType&&k,dd=Vb&&h&&!h.nodeType&&h,ve=dd&&dd.exports===Vb,oe=ve&&He.process;a:{try{var Ec=dd&&dd.require&&dd.require("util").types|| oe&&oe.binding&&oe.binding("util");break a}catch(cb){}Ec=void 0}var Bb=Ec&&Ec.isArrayBuffer,Hd=Ec&&Ec.isDate,ee=Ec&&Ec.isMap,pd=Ec&&Ec.isRegExp,mc=Ec&&Ec.isSet,Je=Ec&&Ec.isTypedArray,cg=da("length"),af=ba({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O", "Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H", "Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U", "Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),Ag=ba({"\x26":"\x26amp;","\x3c":"\x26lt;","\x3e":"\x26gt;",'"':"\x26quot;","'":"\x26#39;"}),ab=ba({"\x26amp;":"\x26","\x26lt;":"\x3c","\x26gt;":"\x3e","\x26quot;":'"',"\x26#39;":"'"}),Cb=function gc(Db){function kb(La){if(Ig(La)&&!Rf(La)&&!(La instanceof me)){if(La instanceof Cd)return La;if(Vf.call(La,"__wrapped__"))return hn(La)}return new Cd(La)}function gd(){}function Cd(La,Ya){this.__wrapped__=La;this.__actions__=[];this.__chain__=!!Ya;this.__index__=0;this.__values__=oa}function me(La){this.__wrapped__=La;this.__actions__=[];this.__dir__=1;this.__filtered__=!1;this.__iteratees__=[];this.__takeCount__=4294967295;this.__views__=[]}function Xd(La){var Ya=-1,Ka=null==La?0:La.length;for(this.clear();++Ya=Ya?La:Ya)),La}function Nf(La,Ya,Ka,hb,Jb,tc){var Zc,Nd=1&Ya,je=2&Ya,Ee=4&Ya;if(Ka&&(Zc=Jb?Ka(La,hb,Jb,tc):Ka(La)),Zc!==oa)return Zc;if(!Zg(La))return La;if(hb=Rf(La)){if(Zc=function(xb){var bc=xb.length,wc=new xb.constructor(bc);bc&&"string"==typeof xb[0]&&Vf.call(xb,"index")&&(wc.index=xb.index,wc.input=xb.input);return wc}(La),!Nd)return Ui(La,Zc)}else{var fa=pi(La),va="[object Function]"==fa||"[object GeneratorFunction]"==fa;if(ih(La))return Ti(La,Nd);if("[object Object]"== fa||"[object Arguments]"==fa||va&&!Jb){if(Zc=je||va?{}:yj(La),!Nd)return je?function(xb,bc){return Pg(xb,eg(xb),bc)}(La,function(xb,bc){return xb&&Pg(bc,$i(bc),xb)}(Zc,La)):function(xb,bc){return Pg(xb,Hl(xb),bc)}(La,Rc(Zc,La))}else{if(!vc[fa])return Jb?La:{};Zc=function(xb,bc,wc){var Wc=xb.constructor;switch(bc){case "[object ArrayBuffer]":return Ph(xb);case "[object Boolean]":case "[object Date]":return new Wc(+xb);case "[object DataView]":return function(Ad,Ud){Ud=Ud?Ph(Ad.buffer):Ad.buffer;return new Ad.constructor(Ud, Ad.byteOffset,Ad.byteLength)}(xb,wc);case "[object Float32Array]":case "[object Float64Array]":case "[object Int8Array]":case "[object Int16Array]":case "[object Int32Array]":case "[object Uint8Array]":case "[object Uint8ClampedArray]":case "[object Uint16Array]":case "[object Uint32Array]":return gj(xb,wc);case "[object Map]":case "[object Set]":return new Wc;case "[object Number]":case "[object String]":return new Wc(xb);case "[object RegExp]":return function(Ad){var Ud=new Ad.constructor(Ad.source, Yd.exec(Ad));return Ud.lastIndex=Ad.lastIndex,Ud}(xb);case "[object Symbol]":return md=xb,pj?Gd(pj.call(md)):{}}var md}(La,fa,Nd)}}tc||=new Eg;if(Jb=tc.get(La))return Jb;tc.set(La,Zc);Pl(La)?La.forEach(function(xb){Zc.add(Nf(xb,Ya,Ka,xb,La,tc))}):li(La)&&La.forEach(function(xb,bc){Zc.set(bc,Nf(xb,Ya,Ka,bc,La,tc))});var Wa=hb?oa:(Ee?je?kk:jj:je?$i:Ii)(La);return z(Wa||La,function(xb,bc){Wa&&(xb=La[bc=xb]);bb(Zc,bc,Nf(xb,Ya,Ka,bc,La,tc))}),Zc}function lg(La,Ya,Ka){var hb=Ka.length;if(null==La)return!hb; for(La=Gd(La);hb--;){var Jb=Ka[hb],tc=Ya[Jb],Zc=La[Jb];if(Zc===oa&&!(Jb in La)||!tc(Zc))return!1}return!0}function Lf(La,Ya,Ka){if("function"!=typeof La)throw new xe("Expected a function");return qh(function(){La.apply(oa,Ka)},Ya)}function Af(La,Ya,Ka,hb){var Jb=-1,tc=J,Zc=!0,Nd=La.length,je=[],Ee=Ya.length;if(!Nd)return je;Ka&&(Ya=F(Ya,ia(Ka)));hb?(tc=X,Zc=!1):200<=Ya.length&&(tc=qa,Zc=!1,Ya=new gf(Ya));a:for(;++JbYa}function Rl(La,Ya){return null!=La&&Vf.call(La,Ya)}function Gj(La,Ya){return null!=La&&Ya in Gd(La)}function jg(La,Ya,Ka){for(var hb=Ka?X:J,Jb=La[0].length,tc=La.length,Zc=tc,Nd=Sc(tc),je=1/0,Ee=[];Zc--;){var fa=La[Zc];Zc&&Ya&&(fa=F(fa,ia(Ya)));je=oi(fa.length,je);Nd[Zc]=!Ka&&(Ya||120<=Jb&& 120<=fa.length)?new gf(Zc&&fa):oa}fa=La[0];var va=-1,Wa=Nd[0];a:for(;++vaYa?Ka:0,Ka)?La[Ya]:oa}function Bl(La,Ya,Ka){Ya=Ya.length?F(Ya,function(Jb){return Rf(Jb)?function(tc){return Rh(tc,1===Jb.length?Jb[0]:Jb)}:Jb}):[vb];var hb= -1;Ya=F(Ya,ia(rg()));return function(Jb,tc){var Zc=Jb.length;for(Jb.sort(tc);Zc--;)Jb[Zc]=Jb[Zc].value;return Jb}(Mj(La,function(Jb,tc,Zc){return{criteria:F(Ya,function(Nd){return Nd(Jb)}),index:++hb,value:Jb}}),function(Jb,tc){a:{for(var Zc=-1,Nd=Jb.criteria,je=tc.criteria,Ee=Nd.length,fa=Ka.length;++Zc=fa?va:va*("desc"==Ka[Zc]?-1:1);break a}}Jb=Jb.index-tc.index}return Jb})}function pl(La,Ya,Ka){for(var hb=-1,Jb=Ya.length,tc={};++hbYa||9007199254740991Ya&&(Ya=-Ya>Jb?0:Jb+Ya);0>(Ka=Ka>Jb?Jb:Ka)&&(Ka+=Jb);Jb=Ya>Ka?0:Ka-Ya>>>0;Ya>>>=0;for(Ka=Sc(Jb);++hb=Jb){for(;hb< Jb;){var tc=hb+Jb>>>1,Zc=La[tc];null!==Zc&&!Cg(Zc)&&(Ka?Zc<=Ya:Zchb)return hb?Th(La[0]):[];for(var Jb=-1,tc=Sc(hb);++Jb=hb?La:Nh(La,Ya,Ka)}function Ti(La,Ya){if(Ya)return La.slice();Ya=La.length;Ya=ch?ch(Ya):new La.constructor(Ya);return La.copy(Ya),Ya}function Ph(La){var Ya=new La.constructor(La.byteLength);return(new pg(Ya)).set(new pg(La)),Ya}function gj(La,Ya){Ya=Ya?Ph(La.buffer):La.buffer;return new La.constructor(Ya,La.byteOffset,La.length)}function vi(La,Ya){if(La!== Ya){var Ka=La!==oa,hb=null===La,Jb=La==La,tc=Cg(La),Zc=Ya!==oa,Nd=null===Ya,je=Ya==Ya,Ee=Cg(Ya);if(!Nd&&!Ee&&!tc&&La>Ya||tc&&Zc&&je&&!Nd&&!Ee||hb&&Zc&&je||!Ka&&je||!Jb)return 1;if(!hb&&!tc&&!Ee&&LaJb?oa:tc,Jb=1);for(Ya=Gd(Ya);++hbKa)return Ka?xk(Ya,La):Ya;Ka=xk(Ya,ug(La/eb(Ya)));return cd.test(Ya)?Yh(db(Ka), 0,La).join(""):Ka.slice(0,La)}function em(La){return function(Ya,Ka,hb){hb&&"number"!=typeof hb&&kj(Ya,Ka,hb)&&(Ka=hb=oa);Ya=Wf(Ya);Ka===oa?(Ka=Ya,Ya=0):Ka=Wf(Ka);var Jb=Ya;Ya=hb===oa?Yamd|| Ad))return xb;1&Wc&&(xb[2]=bc[2],md|=1&wc?0:4);if(wc=bc[3]){var Ud=xb[3];xb[3]=Ud?cl(Ud,wc,bc[4]):wc;xb[4]=Ud?Oa(xb[3],"__lodash_placeholder__"):bc[4]}(wc=bc[5])&&(Ud=xb[5],xb[5]=Ud?dl(Ud,wc,bc[6]):wc,xb[6]=Ud?Oa(xb[5],"__lodash_placeholder__"):bc[6]);(wc=bc[7])&&(xb[7]=wc);Wc&128&&(xb[8]=null==xb[8]?bc[8]:oi(xb[8],bc[8]));null==xb[9]&&(xb[9]=bc[9]);xb[0]=bc[0];xb[1]=md}(tc,Wa),La=tc[0],Ya=tc[1],Ka=tc[2],hb=tc[3],Jb=tc[4],!(Nd=tc[9]=tc[9]===oa?je?0:La.length:Jh(tc[9]-Ee,0))&&24&Ya&&(Ya&=-25),Ya&& 1!=Ya)?8==Ya||16==Ya?function(xb,bc,wc){var Wc=hj(xb);return function Ad(){for(var Ud=arguments.length,Ae=Sc(Ud),Xe=Ud,qf=gm(Ad);Xe--;)Ae[Xe]=arguments[Xe];Xe=3>Ud&&Ae[0]!==qf&&Ae[Ud-1]!==qf?[]:Oa(Ae,qf);return(Ud-=Xe.length)Nd))return!1;je=tc.get(La);var Ee=tc.get(Ya);if(je&&Ee)return je==Ya&&Ee==La;je=-1;Ee=!0;var fa=2&Ka?new gf:oa;tc.set(La,Ya);for(tc.set(Ya,La);++jeYa.length?La:Rh(La,Nh(Ya,0,-1))}function Vm(La,Ya){if(("constructor"!==Ya||"function"!=typeof La[Ya])&&"__proto__"!=Ya)return La[Ya]}function xi(La, Ya,Ka){Ya+="";return bm(La,function(hb,Jb){var tc=Jb.length;if(!tc)return hb;var Zc=tc-1;return Jb[Zc]=(1Ka&&(Ka=Jh(hb+Ka,0)),M(La,rg(Ya,3),Ka)}function rl(La,Ya,Ka){var hb=null==La?0:La.length;if(!hb)return-1;var Jb=hb-1;return Ka!==oa&&(Jb=Mg(Ka),Jb=0>Ka?Jh(hb+Jb,0):oi(Jb,hb-1)),M(La,rg(Ya,3),Jb,!0)}function wm(La){return(null==La?0:La.length)?vh(La,1):[]}function tl(La){return La&&La.length?La[0]:oa}function Sj(La){var Ya=null==La?0:La.length;return Ya? La[Ya-1]:oa}function Pk(La,Ya){return La&&La.length&&Ya&&Ya.length?Sl(La,Ya):La}function nk(La){return null==La?La:$k.call(La)}function bk(La){if(!La||!La.length)return[];var Ya=0;return La=l(La,function(Ka){if(Mh(Ka))return Ya=Jh(Ka.length,Ya),!0}),N(Ya,function(Ka){return F(La,da(Ka))})}function Rk(La,Ya){if(!La||!La.length)return[];La=bk(La);return null==Ya?La:F(La,function(Ka){return x(Ya,oa,Ka)})}function Aj(La){La=kb(La);return La.__chain__=!0,La}function Ul(La,Ya){return Ya(La)}function Jj(La, Ya){return(Rf(La)?z:Ge)(La,rg(Ya,3))}function zj(La,Ya){return(Rf(La)?u:Kf)(La,rg(Ya,3))}function Rj(La,Ya){return(Rf(La)?F:Mj)(La,rg(Ya,3))}function hm(La,Ya,Ka){return Ya=Ka?oa:Ya,Ya=La&&null==Ya?La.length:Ya,zg(La,128,oa,oa,oa,oa,Ya)}function jm(La,Ya){var Ka;if("function"!=typeof Ya)throw new xe("Expected a function");return La=Mg(La),function(){return 0<--La&&(Ka=Ya.apply(this,arguments)),1>=La&&(Ya=oa),Ka}}function fl(La,Ya,Ka){function hb(Ad){var Ud=je,Ae=Ee;return je=Ee=oa,bc=Ad,va=La.apply(Ae, Ud)}function Jb(Ad){var Ud=Ad-xb;return xb===oa||Ud>=Ya||0>Ud||Wc&&Ad-bc>=fa}function tc(){var Ad=Md();if(Jb(Ad))return Zc(Ad);var Ud=qh,Ae=Ya-(Ad-xb);Ad=Wc?oi(Ae,fa-(Ad-bc)):Ae;Wa=Ud(tc,Ad)}function Zc(Ad){return Wa=oa,md&&je?hb(Ad):(je=Ee=oa,va)}function Nd(){var Ad=Md(),Ud=Jb(Ad);if(je=arguments,Ee=this,xb=Ad,Ud){if(Wa===oa)return Ad=xb,bc=Ad,Wa=qh(tc,Ya),wc?hb(Ad):va;if(Wc)return ol(Wa),Wa=qh(tc,Ya),hb(xb)}return Wa===oa&&(Wa=qh(tc,Ya)),va}var je,Ee,fa,va,Wa,xb,bc=0,wc=!1,Wc=!1,md=!0;if("function"!= typeof La)throw new xe("Expected a function");return Ya=mi(Ya)||0,Zg(Ka)&&(wc=!!Ka.leading,fa=(Wc="maxWait"in Ka)?Jh(mi(Ka.maxWait)||0,Ya):fa,md="trailing"in Ka?!!Ka.trailing:md),Nd.cancel=function(){Wa!==oa&&ol(Wa);bc=0;je=xb=Ee=Wa=oa},Nd.flush=function(){return Wa===oa?va:Zc(Md())},Nd}function sj(La,Ya){if("function"!=typeof La||null!=Ya&&"function"!=typeof Ya)throw new xe("Expected a function");var Ka=function(){var hb=arguments,Jb=Ya?Ya.apply(this,hb):hb[0],tc=Ka.cache;if(tc.has(Jb))return tc.get(Jb); hb=La.apply(this,hb);return Ka.cache=tc.set(Jb,hb)||tc,hb};return Ka.cache=new (sj.Cache||we),Ka}function wl(La){if("function"!=typeof La)throw new xe("Expected a function");return function(){var Ya=arguments;switch(Ya.length){case 0:return!La.call(this);case 1:return!La.call(this,Ya[0]);case 2:return!La.call(this,Ya[0],Ya[1]);case 3:return!La.call(this,Ya[0],Ya[1],Ya[2])}return!La.apply(this,Ya)}}function ak(La,Ya){return La===Ya||La!=La&&Ya!=Ya}function ok(La){return null!=La&&zh(La.length)&&!pk(La)} function Mh(La){return Ig(La)&&ok(La)}function wj(La){if(!Ig(La))return!1;var Ya=Sh(La);return"[object Error]"==Ya||"[object DOMException]"==Ya||"string"==typeof La.message&&"string"==typeof La.name&&!Lh(La)}function pk(La){if(!Zg(La))return!1;La=Sh(La);return"[object Function]"==La||"[object GeneratorFunction]"==La||"[object AsyncFunction]"==La||"[object Proxy]"==La}function wk(La){return"number"==typeof La&&La==Mg(La)}function zh(La){return"number"==typeof La&&-1= La}function Zg(La){var Ya=typeof La;return null!=La&&("object"==Ya||"function"==Ya)}function Ig(La){return null!=La&&"object"==typeof La}function fk(La){return"number"==typeof La||Ig(La)&&"[object Number]"==Sh(La)}function Lh(La){if(!Ig(La)||"[object Object]"!=Sh(La))return!1;La=Qf(La);if(null===La)return!0;La=Vf.call(La,"constructor")&&La.constructor;return"function"==typeof La&&La instanceof La&&tg.call(La)==mh}function Wi(La){return"string"==typeof La||!Rf(La)&&Ig(La)&&"[object String]"==Sh(La)} function Cg(La){return"symbol"==typeof La||Ig(La)&&"[object Symbol]"==Sh(La)}function Xi(La){if(!La)return[];if(ok(La))return Wi(La)?db(La):Ui(La);if(zi&&La[zi]){La=La[zi]();for(var Ya,Ka=[];!(Ya=La.next()).done;)Ka.push(Ya.value);return Ka}Ya=pi(La);return("[object Map]"==Ya?Ua:"[object Set]"==Ya?Xa:ec)(La)}function Wf(La){return La?(La=mi(La))===Ca||La===-1/0?1.7976931348623157E308*(0>La?-1:1):La==La?La:0:0===La?La:0}function Mg(La){La=Wf(La);var Ya=La%1;return La==La?Ya?La-Ya:La:0}function Bj(La){return La? Se(Mg(La),0,4294967295):0}function mi(La){if("number"==typeof La)return La;if(Cg(La))return NaN;Zg(La)&&(La="function"==typeof La.valueOf?La.valueOf():La,La=Zg(La)?La+"":La);if("string"!=typeof La)return 0===La?La:+La;La=ca(La);var Ya=Qd.test(La);return Ya||Sd.test(La)?qc(La.slice(2),Ya?2:8):td.test(La)?NaN:+La}function ph(La){return Pg(La,$i(La))}function xg(La){return null==La?"":Li(La)}function lh(La,Ya,Ka){La=null==La?oa:Rh(La,Ya);return La===oa?Ka:La}function Kj(La,Ya){return null!=La&&Df(La, Ya,Gj)}function Ii(La){return ok(La)?uf(La):wh(La)}function $i(La){if(ok(La))La=uf(La,!0);else if(Zg(La)){var Ya=lk(La),Ka=[];for(hb in La)("constructor"!=hb||!Ya&&Vf.call(La,hb))&&Ka.push(hb);La=Ka}else{var hb=[];if(null!=La)for(Ya in Gd(La))hb.push(Ya);La=hb}return La}function Rb(La,Ya){if(null==La)return{};var Ka=F(kk(La),function(hb){return[hb]});return Ya=rg(Ya),pl(La,Ka,function(hb,Jb){return Ya(hb,Jb[0])})}function ec(La){return null==La?[]:ea(La,Ii(La))}function dc(La){return In(xg(La).toLowerCase())} function ka(La){return(La=xg(La))&&La.replace(fc,af).replace(cc,"")}function Eb(La,Ya,Ka){return La=xg(La),(Ya=Ka?oa:Ya)===oa?Ld.test(La)?La.match(Uc)||[]:La.match(Jd)||[]:La.match(Ya)||[]}function Ub(La){return function(){return La}}function vb(La){return La}function yb(La){return Jk("function"==typeof La?La:Nf(La,1))}function Qb(La,Ya,Ka){var hb=Ii(Ya),Jb=Bg(Ya,hb);null!=Ka||Zg(Ya)&&(Jb.length||!hb.length)||(Ka=Ya,Ya=La,La=this,Jb=Bg(Ya,Ii(Ya)));var tc=!(Zg(Ka)&&"chain"in Ka&&!Ka.chain),Zc=pk(La); return z(Jb,function(Nd){var je=Ya[Nd];La[Nd]=je;Zc&&(La.prototype[Nd]=function(){var Ee=this.__chain__;if(tc||Ee){var fa=La(this.__wrapped__);return(fa.__actions__=Ui(this.__actions__)).push({func:je,args:arguments,thisArg:La}),fa.__chain__=Ee,fa}return je.apply(La,ha([this.value()],arguments))})}),La}function sb(){}function Mb(La){return sl(La)?da(mk(La)):function(Ya){return function(Ka){return Rh(Ka,Ya)}}(La)}function ac(){return[]}function Bc(){return!1}var Oc,Sc=(Db=null==Db?Lc:Cb.defaults(Lc.Object(), Db,Cb.pick(Lc,be))).Array,xd=Db.Date,Rd=Db.Error,Ed=Db.Function,Bd=Db.Math,Gd=Db.Object,ze=Db.RegExp,Zf=Db.String,xe=Db.TypeError,We=Sc.prototype,Me=Gd.prototype,Oe=Db["__core-js_shared__"],tg=Ed.prototype.toString,Vf=Me.hasOwnProperty,cj=0,Tf=(Oc=/[^.]+$/.exec(Oe&&Oe.keys&&Oe.keys.IE_PROTO||""))?"Symbol(src)_1."+Oc:"",og=Me.toString,mh=tg.call(Gd),Rg=Lc._,Tg=ze("^"+tg.call(Vf).replace(ad,"\\$\x26").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),bh=ve?Db.Buffer:oa, Dg=Db.Symbol,pg=Db.Uint8Array,ch=bh?bh.allocUnsafe:oa,Qf=Ea(Gd.getPrototypeOf,Gd),aj=Gd.create,th=Me.propertyIsEnumerable,ji=We.splice,ck=Dg?Dg.isConcatSpreadable:oa,zi=Dg?Dg.iterator:oa,tk=Dg?Dg.toStringTag:oa,Ql=function(){try{var La=Ek(Gd,"defineProperty");return La({},"",{}),La}catch(Ya){}}(),Yi=Db.clearTimeout!==Lc.clearTimeout&&Db.clearTimeout,om=xd&&xd.now!==Lc.Date.now&&xd.now,Rm=Db.setTimeout!==Lc.setTimeout&&Db.setTimeout,ug=Bd.ceil,dn=Bd.floor,cn=Gd.getOwnPropertySymbols,am=bh?bh.isBuffer: oa,Zk=Db.isFinite,Wj=We.join,Ej=Ea(Gd.keys,Gd),Jh=Bd.max,oi=Bd.min,pm=xd.now,rm=Db.parseInt,Ri=Bd.random,$k=We.reverse,re=Ek(Db,"DataView"),Mf=Ek(Db,"Map"),Le=Ek(Db,"Promise"),ff=Ek(Db,"Set"),Ei=Ek(Db,"WeakMap"),dg=Ek(Gd,"create"),fj=Ei&&new Ei,Fh={},Gl=ul(re),$d=ul(Mf),Ke=ul(Le),Uf=ul(ff),Pd=ul(Ei),Ol=Dg?Dg.prototype:oa,pj=Ol?Ol.valueOf:oa,Qi=Ol?Ol.toString:oa,Ai=function(){function La(){}return function(Ya){if(!Zg(Ya))return{};if(aj)return aj(Ya);La.prototype=Ya;Ya=new La;return La.prototype=oa, Ya}}();kb.templateSettings={escape:hc,evaluate:Pa,interpolate:ob,variable:"",imports:{_:kb}};kb.prototype=gd.prototype;kb.prototype.constructor=kb;Cd.prototype=Ai(gd.prototype);Cd.prototype.constructor=Cd;me.prototype=Ai(gd.prototype);me.prototype.constructor=me;Xd.prototype.clear=function(){this.__data__=dg?dg(null):{};this.size=0};Xd.prototype.delete=function(La){La=this.has(La)&&delete this.__data__[La];return this.size-=La?1:0,La};Xd.prototype.get=function(La){var Ya=this.__data__;return dg?(La= Ya[La],"__lodash_hash_undefined__"===La?oa:La):Vf.call(Ya,La)?Ya[La]:oa};Xd.prototype.has=function(La){var Ya=this.__data__;return dg?Ya[La]!==oa:Vf.call(Ya,La)};Xd.prototype.set=function(La,Ya){var Ka=this.__data__;return this.size+=this.has(La)?0:1,Ka[La]=dg&&Ya===oa?"__lodash_hash_undefined__":Ya,this};Ue.prototype.clear=function(){this.__data__=[];this.size=0};Ue.prototype.delete=function(La){var Ya=this.__data__;La=Ib(Ya,La);return!(0>La)&&(La==Ya.length-1?Ya.pop():ji.call(Ya,La,1),--this.size, !0)};Ue.prototype.get=function(La){var Ya=this.__data__;La=Ib(Ya,La);return 0>La?oa:Ya[La][1]};Ue.prototype.has=function(La){return-1hb?(++this.size,Ka.push([La,Ya])):Ka[hb][1]=Ya,this};we.prototype.clear=function(){this.size=0;this.__data__={hash:new Xd,map:new (Mf||Ue),string:new Xd}};we.prototype.delete=function(La){La=df(this,La).delete(La);return this.size-=La?1:0,La};we.prototype.get=function(La){return df(this, La).get(La)};we.prototype.has=function(La){return df(this,La).has(La)};we.prototype.set=function(La,Ya){var Ka=df(this,La),hb=Ka.size;return Ka.set(La,Ya),this.size+=Ka.size==hb?0:1,this};gf.prototype.add=gf.prototype.push=function(La){return this.__data__.set(La,"__lodash_hash_undefined__"),this};gf.prototype.has=function(La){return this.__data__.has(La)};Eg.prototype.clear=function(){this.__data__=new Ue;this.size=0};Eg.prototype.delete=function(La){var Ya=this.__data__;La=Ya.delete(La);return this.size= Ya.size,La};Eg.prototype.get=function(La){return this.__data__.get(La)};Eg.prototype.has=function(La){return this.__data__.has(La)};Eg.prototype.set=function(La,Ya){var Ka=this.__data__;if(Ka instanceof Ue){var hb=Ka.__data__;if(!Mf||199>hb.length)return hb.push([La,Ya]),this.size=++Ka.size,this;Ka=this.__data__=new we(hb)}return Ka.set(La,Ya),this.size=Ka.size,this};var Ge=Qj(ri),Kf=Qj(ci,!0),kg=Hh(),Ug=Hh(!0),$f=fj?function(La,Ya){return fj.set(La,Ya),La}:vb,Pf=Ql?function(La,Ya){return Ql(La,"toString", {configurable:!0,enumerable:!1,value:Ub(Ya),writable:!0})}:vb,ol=Yi||function(La){return Lc.clearTimeout(La)},Uk=ff&&1/Xa(new ff([,-0]))[1]==Ca?function(La){return new ff(La)}:sb,Jf=fj?function(La){return fj.get(La)}:sb,Hl=cn?function(La){return null==La?[]:(La=Gd(La),l(cn(La),function(Ya){return th.call(La,Ya)}))}:ac,eg=cn?function(La){for(var Ya=[];La;)ha(Ya,Hl(La)),La=Qf(La);return Ya}:ac,pi=Sh;(re&&"[object DataView]"!=pi(new re(new ArrayBuffer(1)))||Mf&&"[object Map]"!=pi(new Mf)||Le&&"[object Promise]"!= pi(Le.resolve())||ff&&"[object Set]"!=pi(new ff)||Ei&&"[object WeakMap]"!=pi(new Ei))&&(pi=function(La){var Ya=Sh(La);if(La=(La="[object Object]"==Ya?La.constructor:oa)?ul(La):"")switch(La){case Gl:return"[object DataView]";case $d:return"[object Map]";case Ke:return"[object Promise]";case Uf:return"[object Set]";case Pd:return"[object WeakMap]"}return Ya});var Ah=Oe?pk:Bc,Ki=Vi($f),qh=Rm||function(La,Ya){return Lc.setTimeout(La,Ya)},bm=Vi(Pf),xm=function(La){La=sj(La,function(Ka){return 500===Ya.size&& Ya.clear(),Ka});var Ya=La.cache;return La}(function(La){var Ya=[];return 46===La.charCodeAt(0)&&Ya.push(""),La.replace(Jc,function(Ka,hb,Jb,tc){Ya.push(Jb?tc.replace(Dd,"$1"):hb||Ka)}),Ya}),Lj=Ye(function(La,Ya){return Mh(La)?Af(La,vh(Ya,1,Mh,!0)):[]}),ao=Ye(function(La,Ya){var Ka=Sj(Ya);return Mh(Ka)&&(Ka=oa),Mh(La)?Af(La,vh(Ya,1,Mh,!0),rg(Ka,2)):[]}),yl=Ye(function(La,Ya){var Ka=Sj(Ya);return Mh(Ka)&&(Ka=oa),Mh(La)?Af(La,vh(Ya,1,Mh,!0),oa,Ka):[]}),ei=Ye(function(La){var Ya=F(La,jk);return Ya.length&& Ya[0]===La[0]?jg(Ya):[]}),Sm=Ye(function(La){var Ya=Sj(La),Ka=F(La,jk);return Ya===Sj(Ka)?Ya=oa:Ka.pop(),Ka.length&&Ka[0]===La[0]?jg(Ka,rg(Ya,2)):[]}),mg=Ye(function(La){var Ya=Sj(La),Ka=F(La,jk);return(Ya="function"==typeof Ya?Ya:oa)&&Ka.pop(),Ka.length&&Ka[0]===La[0]?jg(Ka,oa,Ya):[]}),yi=Ye(Pk),tn=cf(function(La,Ya){var Ka=null==La?0:La.length,hb=ye(La,Ya);return gk(La,F(Ya,function(Jb){return sg(Jb,Ka)?+Jb:Jb}).sort(vi)),hb}),Wl=Ye(function(La){return Th(vh(La,1,Mh,!0))}),Fj=Ye(function(La){var Ya= Sj(La);return Mh(Ya)&&(Ya=oa),Th(vh(La,1,Mh,!0),rg(Ya,2))}),Yf=Ye(function(La){var Ya=Sj(La);return Ya="function"==typeof Ya?Ya:oa,Th(vh(La,1,Mh,!0),oa,Ya)}),Si=Ye(function(La,Ya){return Mh(La)?Af(La,Ya):[]}),gl=Ye(function(La){return ql(l(La,Mh))}),Hm=Ye(function(La){var Ya=Sj(La);return Mh(Ya)&&(Ya=oa),ql(l(La,Mh),rg(Ya,2))}),y=Ye(function(La){var Ya=Sj(La);return Ya="function"==typeof Ya?Ya:oa,ql(l(La,Mh),oa,Ya)}),V=Ye(bk),xa=Ye(function(La){var Ya=La.length;Ya=1=Ya}),ig=Ik(function(){return arguments}())?Ik:function(La){return Ig(La)&&Vf.call(La,"callee")&&!th.call(La,"callee")},Rf=Sc.isArray,Ch=Bb?ia(Bb):function(La){return Ig(La)&&"[object ArrayBuffer]"==Sh(La)},ih=am||Bc,Cj=Hd?ia(Hd): function(La){return Ig(La)&&"[object Date]"==Sh(La)},li=ee?ia(ee):function(La){return Ig(La)&&"[object Map]"==pi(La)},Xj=pd?ia(pd):function(La){return Ig(La)&&"[object RegExp]"==Sh(La)},Pl=mc?ia(mc):function(La){return Ig(La)&&"[object Set]"==pi(La)},Sk=Je?ia(Je):function(La){return Ig(La)&&zh(La.length)&&!!qd[Sh(La)]},im=Ak(si),ap=Ak(function(La,Ya){return La<=Ya}),jn=Qh(function(La,Ya){if(lk(Ya)||ok(Ya))Pg(Ya,Ii(Ya),La);else for(var Ka in Ya)Vf.call(Ya,Ka)&&bb(La,Ka,Ya[Ka])}),$g=Qh(function(La, Ya){Pg(Ya,$i(Ya),La)}),ym=Qh(function(La,Ya,Ka,hb){Pg(Ya,$i(Ya),La,hb)}),bi=Qh(function(La,Ya,Ka,hb){Pg(Ya,Ii(Ya),La,hb)}),Wn=cf(ye),en=Ye(function(La,Ya){La=Gd(La);var Ka=-1,hb=Ya.length,Jb=2--La)return Ya.apply(this,arguments)}},kb.ary=hm,kb.assign=jn,kb.assignIn=$g,kb.assignInWith=ym,kb.assignWith=bi,kb.at=Wn,kb.before=jm,kb.bind=od,kb.bindAll=Co,kb.bindKey=Ce,kb.castArray=function(){if(!arguments.length)return[];var La=arguments[0]; return Rf(La)?La:[La]},kb.chain=Aj,kb.chunk=function(La,Ya,Ka){Ya=(Ka?kj(La,Ya,Ka):Ya===oa)?1:Jh(Mg(Ya),0);Ka=null==La?0:La.length;if(!Ka||1>Ya)return[];for(var hb=0,Jb=0,tc=Sc(ug(Ka/Ya));hb(hb=Jb||hb===oa?1:Mg(hb))?0:hb,tc):[]},kb.dropRight=function(Ka,hb, Jb){var tc=null==Ka?0:Ka.length;return tc?Nh(Ka,0,0>(hb=tc-(hb=Jb||hb===oa?1:Mg(hb)))?0:hb):[]},kb.dropRightWhile=function(Ka,hb){return Ka&&Ka.length?yk(Ka,rg(hb,3),!0,!0):[]},kb.dropWhile=function(Ka,hb){return Ka&&Ka.length?yk(Ka,rg(hb,3),!0):[]},kb.fill=function(Ka,hb,Jb,tc){var Zc=null==Ka?0:Ka.length;if(Zc)for(Jb&&"number"!=typeof Jb&&kj(Ka,hb,Jb)&&(Jb=0,tc=Zc),Zc=Ka.length,0>(Jb=Mg(Jb))&&(Jb=-Jb>Zc?0:Zc+Jb),0>(tc=tc===oa||tc>Zc?Zc:Mg(tc))&&(tc+=Zc),tc=Jb>tc?0:Bj(tc);Jb>>0)?(Ka=xg(Ka))&&("string"==typeof hb||null!=hb&&!Xj(hb))&&!(hb=Li(hb))&&cd.test(Ka)?Yh(db(Ka),0,Jb):Ka.split(hb,Jb):[]},kb.spread=function(Ka,hb){if("function"!=typeof Ka)throw new xe("Expected a function");return hb= null==hb?0:Jh(Mg(hb),0),Ye(function(Jb){var tc=Jb[hb];Jb=Yh(Jb,0,hb);return tc&&ha(Jb,tc),x(Ka,this,Jb)})},kb.tail=function(Ka){var hb=null==Ka?0:Ka.length;return hb?Nh(Ka,1,hb):[]},kb.take=function(Ka,hb,Jb){return Ka&&Ka.length?Nh(Ka,0,0>(hb=Jb||hb===oa?1:Mg(hb))?0:hb):[]},kb.takeRight=function(Ka,hb,Jb){var tc=null==Ka?0:Ka.length;return tc?Nh(Ka,0>(hb=tc-(hb=Jb||hb===oa?1:Mg(hb)))?0:hb,tc):[]},kb.takeRightWhile=function(Ka,hb){return Ka&&Ka.length?yk(Ka,rg(hb,3),!1,!0):[]},kb.takeWhile=function(Ka, hb){return Ka&&Ka.length?yk(Ka,rg(hb,3)):[]},kb.tap=function(Ka,hb){return hb(Ka),Ka},kb.throttle=function(Ka,hb,Jb){var tc=!0,Zc=!0;if("function"!=typeof Ka)throw new xe("Expected a function");return Zg(Jb)&&(tc="leading"in Jb?!!Jb.leading:tc,Zc="trailing"in Jb?!!Jb.trailing:Zc),fl(Ka,hb,{leading:tc,maxWait:hb,trailing:Zc})},kb.thru=Ul,kb.toArray=Xi,kb.toPairs=wn,kb.toPairsIn=Do,kb.toPath=function(Ka){return Rf(Ka)?F(Ka,mk):Cg(Ka)?[Ka]:Ui(xm(xg(Ka)))},kb.toPlainObject=ph,kb.transform=function(Ka, hb,Jb){var tc=Rf(Ka),Zc=tc||ih(Ka)||Sk(Ka);if(hb=rg(hb,4),null==Jb){var Nd=Ka&&Ka.constructor;Jb=Zc?tc?new Nd:[]:Zg(Ka)&&pk(Nd)?Ai(Qf(Ka)):{}}return(Zc?z:ri)(Ka,function(je,Ee,fa){return hb(Jb,je,Ee,fa)}),Jb},kb.unary=function(Ka){return hm(Ka,1)},kb.union=Wl,kb.unionBy=Fj,kb.unionWith=Yf,kb.uniq=function(Ka){return Ka&&Ka.length?Th(Ka):[]},kb.uniqBy=function(Ka,hb){return Ka&&Ka.length?Th(Ka,rg(hb,2)):[]},kb.uniqWith=function(Ka,hb){return hb="function"==typeof hb?hb:oa,Ka&&Ka.length?Th(Ka,oa,hb): []},kb.unset=function(Ka,hb){return null==Ka||bl(Ka,hb)},kb.unzip=bk,kb.unzipWith=Rk,kb.update=function(Ka,hb,Jb){null!=Ka&&(Jb=Ci(Jb),Ka=Eh(Ka,hb,Jb(Rh(Ka,hb)),void 0));return Ka},kb.updateWith=function(Ka,hb,Jb,tc){tc="function"==typeof tc?tc:oa;null!=Ka&&(Jb=Ci(Jb),Ka=Eh(Ka,hb,Jb(Rh(Ka,hb)),tc));return Ka},kb.values=ec,kb.valuesIn=function(Ka){return null==Ka?[]:ea(Ka,$i(Ka))},kb.without=Si,kb.words=Eb,kb.wrap=function(Ka,hb){return yg(Ci(hb),Ka)},kb.xor=gl,kb.xorBy=Hm,kb.xorWith=y,kb.zip=V,kb.zipObject= function(Ka,hb){return gn(Ka||[],hb||[],bb)},kb.zipObjectDeep=function(Ka,hb){return gn(Ka||[],hb||[],Eh)},kb.zipWith=xa,kb.entries=wn,kb.entriesIn=Do,kb.extend=$g,kb.extendWith=ym,Qb(kb,kb),kb.add=Fo,kb.attempt=Bo,kb.camelCase=Zn,kb.capitalize=dc,kb.ceil=zl,kb.clamp=function(Ka,hb,Jb){return Jb===oa&&(Jb=hb,hb=oa),Jb!==oa&&(Jb=(Jb=mi(Jb))==Jb?Jb:0),hb!==oa&&(hb=(hb=mi(hb))==hb?hb:0),Se(mi(Ka),hb,Jb)},kb.clone=function(Ka){return Nf(Ka,4)},kb.cloneDeep=function(Ka){return Nf(Ka,5)},kb.cloneDeepWith= function(Ka,hb){return Nf(Ka,5,"function"==typeof hb?hb:oa)},kb.cloneWith=function(Ka,hb){return Nf(Ka,4,"function"==typeof hb?hb:oa)},kb.conformsTo=function(Ka,hb){return null==hb||lg(Ka,hb,Ii(hb))},kb.deburr=ka,kb.defaultTo=function(Ka,hb){return null==Ka||Ka!=Ka?hb:Ka},kb.divide=vk,kb.endsWith=function(Ka,hb,Jb){Ka=xg(Ka);hb=Li(hb);var tc=Ka.length;tc=Jb=Jb===oa?tc:Se(Mg(Jb),0,tc);return 0<=(Jb-=hb.length)&&Ka.slice(Jb,tc)==hb},kb.eq=ak,kb.escape=function(Ka){return(Ka=xg(Ka))&&Wb.test(Ka)?Ka.replace(jb, Ag):Ka},kb.escapeRegExp=function(Ka){return(Ka=xg(Ka))&&Pc.test(Ka)?Ka.replace(ad,"\\$\x26"):Ka},kb.every=function(Ka,hb,Jb){var tc=Rf(Ka)?m:Xf;return Jb&&kj(Ka,hb,Jb)&&(hb=oa),tc(Ka,rg(hb,3))},kb.find=$a,kb.findIndex=Wm,kb.findKey=function(Ka,hb){return aa(Ka,rg(hb,3),ri)},kb.findLast=qb,kb.findLastIndex=rl,kb.findLastKey=function(Ka,hb){return aa(Ka,rg(hb,3),ci)},kb.floor=Al,kb.forEach=Jj,kb.forEachRight=zj,kb.forIn=function(Ka,hb){return null==Ka?Ka:kg(Ka,rg(hb,3),$i)},kb.forInRight=function(Ka, hb){return null==Ka?Ka:Ug(Ka,rg(hb,3),$i)},kb.forOwn=function(Ka,hb){return Ka&&ri(Ka,rg(hb,3))},kb.forOwnRight=function(Ka,hb){return Ka&&ci(Ka,rg(hb,3))},kb.get=lh,kb.gt=Bi,kb.gte=Gh,kb.has=function(Ka,hb){return null!=Ka&&Df(Ka,hb,Rl)},kb.hasIn=Kj,kb.head=tl,kb.identity=vb,kb.includes=function(Ka,hb,Jb,tc){Ka=ok(Ka)?Ka:ec(Ka);Jb=Jb&&!tc?Mg(Jb):0;tc=Ka.length;return 0>Jb&&(Jb=Jh(tc+Jb,0)),Wi(Ka)?Jb<=tc&&-1Jb&&(Jb=Jh(tc+Jb,0)),S(Ka,hb,Jb)},kb.inRange=function(Ka,hb,Jb){hb=Wf(hb);Jb===oa?(Jb=hb,hb=0):Jb=Wf(Jb);Ka=mi(Ka);return Ka>=oi(hb,Jb)&&Ka=Ka},kb.isSet=Pl,kb.isString=Wi,kb.isSymbol=Cg,kb.isTypedArray=Sk,kb.isUndefined=function(Ka){return Ka===oa},kb.isWeakMap=function(Ka){return Ig(Ka)&&"[object WeakMap]"==pi(Ka)},kb.isWeakSet=function(Ka){return Ig(Ka)&&"[object WeakSet]"==Sh(Ka)},kb.join=function(Ka,hb){return null==Ka?"":Wj.call(Ka,hb)},kb.kebabCase=$o,kb.last=Sj,kb.lastIndexOf= function(Ka,hb,Jb){var tc=null==Ka?0:Ka.length;if(!tc)return-1;var Zc=tc;Jb!==oa&&(Zc=0>(Zc=Mg(Jb))?Jh(tc+Zc,0):oi(Zc,tc-1));if(hb==hb)a:{for(Jb=Zc+1;Jb--;)if(Ka[Jb]===hb){Ka=Jb;break a}Ka=Jb}else Ka=M(Ka,O,Zc,!0);return Ka},kb.lowerCase=Qk,kb.lowerFirst=wp,kb.lt=im,kb.lte=ap,kb.max=function(Ka){return Ka&&Ka.length?Sg(Ka,vb,Fi):oa},kb.maxBy=function(Ka,hb){return Ka&&Ka.length?Sg(Ka,rg(hb,2),Fi):oa},kb.mean=function(Ka){return P(Ka,vb)},kb.meanBy=function(Ka,hb){return P(Ka,rg(hb,2))},kb.min=function(Ka){return Ka&& Ka.length?Sg(Ka,vb,si):oa},kb.minBy=function(Ka,hb){return Ka&&Ka.length?Sg(Ka,rg(hb,2),si):oa},kb.stubArray=ac,kb.stubFalse=Bc,kb.stubObject=function(){return{}},kb.stubString=function(){return""},kb.stubTrue=function(){return!0},kb.multiply=Rp,kb.nth=function(Ka,hb){return Ka&&Ka.length?Nj(Ka,Mg(hb)):oa},kb.noConflict=function(){return Lc._===this&&(Lc._=Rg),this},kb.noop=sb,kb.now=Md,kb.pad=function(Ka,hb,Jb){Ka=xg(Ka);var tc=(hb=Mg(hb))?eb(Ka):0;if(!hb||tc>=hb)return Ka;hb=(hb-tc)/2;return Km(dn(hb), Jb)+Ka+Km(ug(hb),Jb)},kb.padEnd=function(Ka,hb,Jb){Ka=xg(Ka);var tc=(hb=Mg(hb))?eb(Ka):0;return hb&&tchb){var tc=Ka;Ka=hb;hb=tc}return Jb||Ka%1||hb%1?(Jb=Ri(),oi(Ka+Jb*(hb-Ka+Ie("1e-"+((Jb+"").length-1))),hb)):hk(Ka,hb)},kb.reduce=function(Ka,hb,Jb){var tc=Rf(Ka)?T:H,Zc=3>arguments.length;return tc(Ka,rg(hb,4),Jb,Zc,Ge)},kb.reduceRight=function(Ka,hb,Jb){var tc=Rf(Ka)?Z:H,Zc=3>arguments.length;return tc(Ka,rg(hb,4),Jb,Zc,Kf)},kb.repeat=function(Ka,hb,Jb){return hb=(Jb?kj(Ka,hb,Jb):hb===oa)?1:Mg(hb),xk(xg(Ka),hb)},kb.replace=function(){var Ka= arguments,hb=xg(Ka[0]);return 3>Ka.length?hb:hb.replace(Ka[1],Ka[2])},kb.result=function(Ka,hb,Jb){var tc=-1,Zc=(hb=rj(hb,Ka)).length;for(Zc||(Zc=1,Ka=oa);++tc(Ka=Mg(Ka))||9007199254740991=hb)return Ka;hb=Jb-eb(tc);if(1>hb)return tc;Jb=Nd?Yh(Nd,0,hb).join(""):Ka.slice(0,hb);if(Zc===oa)return Jb+tc;if(Nd&&(hb+=Jb.length-hb),Xj(Zc)){if(Ka.slice(hb).search(Zc)){Nd=Jb; Zc.global||(Zc=ze(Zc.source,xg(Yd.exec(Zc))+"g"));for(Zc.lastIndex=0;Ka=Zc.exec(Nd);)var je=Ka.index;Jb=Jb.slice(0,je===oa?hb:je)}}else Ka.indexOf(Li(Zc),hb)!=hb&&(Zc=Jb.lastIndexOf(Zc),-1tc.__dir__?"Right":"")}),tc};me.prototype[Ka+"Right"]=function(Jb){return this.reverse()[Ka](Jb).reverse()}}), z(["filter","map","takeWhile"],function(Ka,hb){var Jb=hb+1,tc=1==Jb||3==Jb;me.prototype[Ka]=function(Zc){var Nd=this.clone();return Nd.__iteratees__.push({iteratee:rg(Zc,3),type:Jb}),Nd.__filtered__=Nd.__filtered__||tc,Nd}}),z(["head","last"],function(Ka,hb){var Jb="take"+(hb?"Right":"");me.prototype[Ka]=function(){return this[Jb](1).value()[0]}}),z(["initial","tail"],function(Ka,hb){var Jb="drop"+(hb?"":"Right");me.prototype[Ka]=function(){return this.__filtered__?new me(this):this[Jb](1)}}),me.prototype.compact= function(){return this.filter(vb)},me.prototype.find=function(Ka){return this.filter(Ka).head()},me.prototype.findLast=function(Ka){return this.reverse().find(Ka)},me.prototype.invokeMap=Ye(function(Ka,hb){return"function"==typeof Ka?new me(this):this.map(function(Jb){return Xg(Jb,Ka,hb)})}),me.prototype.reject=function(Ka){return this.filter(wl(rg(Ka)))},me.prototype.slice=function(Ka,hb){Ka=Mg(Ka);var Jb=this;return Jb.__filtered__&&(0hb)?new me(Jb):(0>Ka?Jb=Jb.takeRight(-Ka):Ka&&(Jb=Jb.drop(Ka)), hb!==oa&&(Jb=0>(hb=Mg(hb))?Jb.dropRight(-hb):Jb.take(hb-Ka)),Jb)},me.prototype.takeRightWhile=function(Ka){return this.reverse().takeWhile(Ka).reverse()},me.prototype.toArray=function(){return this.take(4294967295)},ri(me.prototype,function(Ka,hb){var Jb=/^(?:filter|find|map|reject)|While$/.test(hb),tc=/^(?:head|last)$/.test(hb),Zc=kb[tc?"take"+("last"==hb?"Right":""):hb],Nd=tc||/^find/.test(hb);Zc&&(kb.prototype[hb]=function(){var je=this.__wrapped__,Ee=tc?[1]:arguments,fa=je instanceof me,va=Ee[0], Wa=fa||Rf(je),xb=function(md){md=Zc.apply(kb,ha([md],Ee));return tc&&bc?md[0]:md};Wa&&Jb&&"function"==typeof va&&1!=va.length&&(fa=Wa=!1);var bc=this.__chain__,wc=!!this.__actions__.length;va=Nd&&!bc;fa=fa&&!wc;if(!Nd&&Wa){je=fa?je:new me(this);var Wc=Ka.apply(je,Ee);return Wc.__actions__.push({func:Ul,args:[xb],thisArg:oa}),new Cd(Wc,bc)}return va&&fa?Ka.apply(this,Ee):(Wc=this.thru(xb),va?tc?Wc.value()[0]:Wc.value():Wc)})}),z("pop push shift sort splice unshift".split(" "),function(Ka){var hb=We[Ka], Jb=/^(?:push|sort|unshift)$/.test(Ka)?"tap":"thru",tc=/^(?:pop|shift)$/.test(Ka);kb.prototype[Ka]=function(){var Zc=arguments;if(tc&&!this.__chain__){var Nd=this.value();return hb.apply(Rf(Nd)?Nd:[],Zc)}return this[Jb](function(je){return hb.apply(Rf(je)?je:[],Zc)})}}),ri(me.prototype,function(Ka,hb){if(Ka=kb[hb]){var Jb=Ka.name+"";Vf.call(Fh,Jb)||(Fh[Jb]=[]);Fh[Jb].push({name:hb,func:Ka})}}),Fh[Nk(oa,2).name]=[{name:"wrapper",func:oa}],me.prototype.clone=function(){var Ka=new me(this.__wrapped__); return Ka.__actions__=Ui(this.__actions__),Ka.__dir__=this.__dir__,Ka.__filtered__=this.__filtered__,Ka.__iteratees__=Ui(this.__iteratees__),Ka.__takeCount__=this.__takeCount__,Ka.__views__=Ui(this.__views__),Ka},me.prototype.reverse=function(){if(this.__filtered__){var Ka=new me(this);Ka.__dir__=-1;Ka.__filtered__=!0}else(Ka=this.clone()).__dir__*=-1;return Ka},me.prototype.value=function(){var Ka=this.__wrapped__.value(),hb=this.__dir__,Jb=Rf(Ka),tc=0>hb,Zc=Jb?Ka.length:0;var Nd=0;for(var je=Zc, Ee=this.__views__,fa=-1,va=Ee.length;++fa=this.__values__.length;return{done:Ka,value:Ka?oa:this.__values__[this.__index__++]}},kb.prototype.plant=function(Ka){for(var hb,Jb=this;Jb instanceof gd;){var tc=hn(Jb);tc.__index__=0;tc.__values__=oa;hb? Zc.__wrapped__=tc:hb=tc;var Zc=tc;Jb=Jb.__wrapped__}return Zc.__wrapped__=Ka,hb},kb.prototype.reverse=function(){var Ka=this.__wrapped__;return Ka instanceof me?(this.__actions__.length&&(Ka=new me(this)),(Ka=Ka.reverse()).__actions__.push({func:Ul,args:[nk],thisArg:oa}),new Cd(Ka,this.__chain__)):this.thru(nk)},kb.prototype.toJSON=kb.prototype.valueOf=kb.prototype.value=function(){return Oj(this.__wrapped__,this.__actions__)},kb.prototype.first=kb.prototype.head,zi&&(kb.prototype[zi]=function(){return this}), kb}();Lc._=Cb;(v=function(){return Cb}.call(k,f,k,h))===oa||(h.exports=v)}).call(this)},4516:function(h){var k=Object.getOwnPropertySymbols,f=Object.prototype.hasOwnProperty,v=Object.prototype.propertyIsEnumerable;h.exports=function(){try{if(!Object.assign)return!1;var x=new String("abc");if(x[5]="de","5"===Object.getOwnPropertyNames(x)[0])return!1;var L={};for(x=0;10>x;x++)L["_"+String.fromCharCode(x)]=x;if("0123456789"!==Object.getOwnPropertyNames(L).map(function(u){return L[u]}).join(""))return!1; var z={};return"abcdefghijklmnopqrst".split("").forEach(function(u){z[u]=u}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},z)).join("")}catch(u){return!1}}()?Object.assign:function(x,L){var z;if(null==x)throw new TypeError("Object.assign cannot be called with null or undefined");var u=Object(x);for(var m=1;mX.windowBits&&(X.windowBits+=16);this.err=0;this.msg="";this.ended=!1;this.chunks=[];this.strm=new l;this.strm.avail_out=0;var F=L.deflateInit2(this.strm,X.level,X.method,X.windowBits, X.memLevel,X.strategy);if(0!==F)throw Error(m[F]);if(X.header&&L.deflateSetHeader(this.strm,X.header),X.dictionary){var ha;if(ha="string"==typeof X.dictionary?u.string2buf(X.dictionary):"[object ArrayBuffer]"===J.call(X.dictionary)?new Uint8Array(X.dictionary):X.dictionary,0!==(F=L.deflateSetDictionary(this.strm,ha)))throw Error(m[F]);this._dict_set=!0}}function x(X,F){F=new v(F);if(F.push(X,!0),F.err)throw F.msg||m[F.err];return F.result}var L=f(7651),z=f(9187),u=f(8592),m=f(5604),l=f(249),J=Object.prototype.toString; v.prototype.push=function(X,F){var ha,T=this.strm,Z=this.options.chunkSize;if(this.ended)return!1;F=F===~~F?F:!0===F?4:0;"string"==typeof X?T.input=u.string2buf(X):"[object ArrayBuffer]"===J.call(X)?T.input=new Uint8Array(X):T.input=X;T.next_in=0;T.avail_in=T.input.length;do{if(0===T.avail_out&&(T.output=new z.Buf8(Z),T.next_out=0,T.avail_out=Z),1!==(ha=L.deflate(T,F))&&0!==ha)return this.onEnd(ha),this.ended=!0,!1;0!==T.avail_out&&(0!==T.avail_in||4!==F&&2!==F)||("string"===this.options.to?this.onData(u.buf2binstring(z.shrinkBuf(T.output, T.next_out))):this.onData(z.shrinkBuf(T.output,T.next_out)))}while((0T.windowBits&&(T.windowBits=-T.windowBits,0===T.windowBits&&(T.windowBits=-15));!(0<=T.windowBits&&16>T.windowBits)||ha&&ha.windowBits||(T.windowBits+=32);15T.windowBits&&0==(15&T.windowBits)&&(T.windowBits|= 15);this.err=0;this.msg="";this.ended=!1;this.chunks=[];this.strm=new J;this.strm.avail_out=0;ha=L.inflateInit2(this.strm,T.windowBits);if(ha!==m.Z_OK)throw Error(l[ha]);if(this.header=new X,L.inflateGetHeader(this.strm,this.header),T.dictionary&&("string"==typeof T.dictionary?T.dictionary=u.string2buf(T.dictionary):"[object ArrayBuffer]"===F.call(T.dictionary)&&(T.dictionary=new Uint8Array(T.dictionary)),T.raw&&(ha=L.inflateSetDictionary(this.strm,T.dictionary))!==m.Z_OK))throw Error(l[ha]);}function x(ha, T){T=new v(T);if(T.push(ha,!0),T.err)throw T.msg||l[T.err];return T.result}var L=f(7823),z=f(9187),u=f(8592),m=f(2684),l=f(5604),J=f(249),X=f(9968),F=Object.prototype.toString;v.prototype.push=function(ha,T){var Z,E,aa,M,S=this.strm,D=this.options.chunkSize,O=this.options.dictionary,P=!1;if(this.ended)return!1;T=T===~~T?T:!0===T?m.Z_FINISH:m.Z_NO_FLUSH;"string"==typeof ha?S.input=u.binstring2buf(ha):"[object ArrayBuffer]"===F.call(ha)?S.input=new Uint8Array(ha):S.input=ha;S.next_in=0;S.avail_in=S.input.length; do{if(0===S.avail_out&&(S.output=new z.Buf8(D),S.next_out=0,S.avail_out=D),(Z=L.inflate(S,m.Z_NO_FLUSH))===m.Z_NEED_DICT&&O&&(Z=L.inflateSetDictionary(this.strm,O)),Z===m.Z_BUF_ERROR&&!0===P&&(Z=m.Z_OK,P=!1),Z!==m.Z_STREAM_END&&Z!==m.Z_OK)return this.onEnd(Z),this.ended=!0,!1;S.next_out&&(0!==S.avail_out&&Z!==m.Z_STREAM_END&&(0!==S.avail_in||T!==m.Z_FINISH&&T!==m.Z_SYNC_FLUSH)||("string"===this.options.to?(E=u.utf8border(S.output,S.next_out),aa=S.next_out-E,M=u.buf2string(S.output,E),S.next_out=aa, S.avail_out=D-aa,aa&&z.arraySet(S.output,S.output,E,aa,0),this.onData(M)):this.onData(z.shrinkBuf(S.output,S.next_out))));0===S.avail_in&&0===S.avail_out&&(P=!0)}while((0l&&(m.subarray&&z||!m.subarray&&L))return String.fromCharCode.apply(null,x.shrinkBuf(m,l));for(var J="",X=0;Xh;h++)u[h]=252<=h?6:248<=h?5:240<=h?4:224<=h?3:192<=h?2:1;u[254]=u[254]=1;k.string2buf=function(m){var l,J,X,F,ha=m.length,T=0;for(X=0;Xl?1:2048>l?2:65536>l?3:4;var Z=new x.Buf8(T);for(X=F=0;Fl?Z[F++]=l:2048>l?(Z[F++]=192|l>>>6,Z[F++]=128|63&l):65536>l?(Z[F++]=224|l>>>12,Z[F++]=128|l>>>6&63,Z[F++]=128|63&l):(Z[F++]=240|l>>>18,Z[F++]=128|l>>>12&63,Z[F++]=128|l>>>6&63,Z[F++]=128|63&l);return Z};k.buf2binstring=function(m){return v(m,m.length)};k.binstring2buf=function(m){for(var l=new x.Buf8(m.length),J=0,X=l.length;J(X=m[l++]))T[J++]=X;else if(4<(F=u[X]))T[J++]=65533,l+=F-1;else{for(X&=2===F?31:3===F?15:7;1X?T[J++]=X:(X-=65536,T[J++]=55296|X>>10&1023,T[J++]=56320|1023&X)}return v(T,J)};k.utf8border=function(m,l){var J;(l=l||m.length)>m.length&&(l=m.length);for(J=l-1;0<=J&&128==(192&m[J]);)J--;return 0>J||0===J?l:J+u[m[J]]>l?J:l}},3693:function(h){h.exports=function(k,f,v,x){var L=65535&k|0;k= k>>>16&65535|0;for(var z;0!==v;){v-=z=2E3x;x++){f=x;for(var L=0;8>L;L++)f=1&f?3988292384^f>>>1:f>>>1;v[x]=f}return v}();h.exports=function(f,v,x,L){x=L+x;for(f^=-1;L>>8^k[255&(f^v[L])];return-1^f}},7651:function(h,k,f){function v(ba,H){return ba.msg=P[H],H}function x(ba){for(var H=ba.length;0<=--H;)ba[H]=0}function L(ba){var H=ba.state,ja=H.pending;ja>ba.avail_out&&(ja=ba.avail_out);0!==ja&&(M.arraySet(ba.output,H.pending_buf,H.pending_out,ja, ba.next_out),ba.next_out+=ja,H.pending_out+=ja,ba.total_out+=ja,ba.avail_out-=ja,H.pending-=ja,0===H.pending&&(H.pending_out=0))}function z(ba,H){S._tr_flush_block(ba,0<=ba.block_start?ba.block_start:-1,ba.strstart-ba.block_start,H);ba.block_start=ba.strstart;L(ba.strm)}function u(ba,H){ba.pending_buf[ba.pending++]=H}function m(ba,H){ba.pending_buf[ba.pending++]=H>>>8&255;ba.pending_buf[ba.pending++]=255&H}function l(ba,H){var ja,N,ca=ba.max_chain_length,ia=ba.strstart,ea=ba.prev_length,qa=ba.nice_match, za=ba.strstart>ba.w_size-262?ba.strstart-(ba.w_size-262):0,ya=ba.window,Ha=ba.w_mask,Ua=ba.prev,Ea=ba.strstart+258,Oa=ya[ia+ea-1],Xa=ya[ia+ea];ba.prev_length>=ba.good_match&&(ca>>=2);qa>ba.lookahead&&(qa=ba.lookahead);do if(ya[(ja=H)+ea]===Xa&&ya[ja+ea-1]===Oa&&ya[ja]===ya[ia]&&ya[++ja]===ya[ia+1]){ia+=2;for(ja++;ya[++ia]===ya[++ja]&&ya[++ia]===ya[++ja]&&ya[++ia]===ya[++ja]&&ya[++ia]===ya[++ja]&&ya[++ia]===ya[++ja]&&ya[++ia]===ya[++ja]&&ya[++ia]===ya[++ja]&&ya[++ia]===ya[++ja]&&iaea){if(ba.match_start=H,ea=N,N>=qa)break;Oa=ya[ia+ea-1];Xa=ya[ia+ea]}}while((H=Ua[H&Ha])>za&&0!=--ca);return ea<=ba.lookahead?ea:ba.lookahead}function J(ba){var H,ja,N,ca,ia,ea,qa,za=ba.w_size;do{if(ja=ba.window_size-ba.lookahead-ba.strstart,ba.strstart>=za+(za-262)){M.arraySet(ba.window,ba.window,za,za,0);ba.match_start-=za;ba.strstart-=za;ba.block_start-=za;var ya=H=ba.hash_size;do{var Ha=ba.head[--ya];ba.head[ya]=Ha>=za?Ha-za:0}while(--H);ya=H=za;do Ha=ba.prev[--ya],ba.prev[ya]= Ha>=za?Ha-za:0;while(--H);ja+=za}if(0===ba.strm.avail_in)break;if(N=ba.strm,ca=ba.window,ia=ba.strstart+ba.lookahead,ea=ja,qa=void 0,(qa=N.avail_in)>ea&&(qa=ea),H=0===qa?0:(N.avail_in-=qa,M.arraySet(ca,N.input,N.next_in,qa,ia),1===N.state.wrap?N.adler=D(N.adler,ca,qa,ia):2===N.state.wrap&&(N.adler=O(N.adler,ca,qa,ia)),N.next_in+=qa,N.total_in+=qa,qa),ba.lookahead+=H,3<=ba.lookahead+ba.insert)for(ya=ba.strstart-ba.insert,ba.ins_h=ba.window[ya],ba.ins_h=(ba.ins_h<ba.lookahead+ba.insert)););}while(262>ba.lookahead&&0!==ba.strm.avail_in)}function X(ba,H){for(var ja,N;;){if(262>ba.lookahead){if(J(ba),262>ba.lookahead&&0===H)return 1;if(0===ba.lookahead)break}if(ja=0,3<=ba.lookahead&&(ba.ins_h=(ba.ins_h<ba.strstart?ba.strstart:2,4===H?(z(ba,!0),0===ba.strm.avail_out?3:4):ba.last_lit&&(z(ba,!1),0===ba.strm.avail_out)?1:2}function F(ba,H){for(var ja,N,ca;;){if(262>ba.lookahead){if(J(ba),262>ba.lookahead&&0===H)return 1;if(0===ba.lookahead)break}if(ja= 0,3<=ba.lookahead&&(ba.ins_h=(ba.ins_h<=ba.match_length&&(1===ba.strategy||3===ba.match_length&&4096ba.strstart?ba.strstart:2,4===H?(z(ba,!0),0===ba.strm.avail_out?3:4):ba.last_lit&&(z(ba,!1),0===ba.strm.avail_out)?1:2}function ha(ba,H,ja,N,ca){this.good_length=ba;this.max_lazy=H;this.nice_length=ja;this.max_chain=N;this.func=ca}function T(){this.strm= null;this.status=0;this.pending_buf=null;this.wrap=this.pending=this.pending_out=this.pending_buf_size=0;this.gzhead=null;this.gzindex=0;this.method=8;this.last_flush=-1;this.w_mask=this.w_bits=this.w_size=0;this.window=null;this.window_size=0;this.head=this.prev=null;this.nice_match=this.good_match=this.strategy=this.level=this.max_lazy_match=this.max_chain_length=this.prev_length=this.lookahead=this.match_start=this.strstart=this.match_available=this.prev_match=this.match_length=this.block_start= this.hash_shift=this.hash_mask=this.hash_bits=this.hash_size=this.ins_h=0;this.dyn_ltree=new M.Buf16(1146);this.dyn_dtree=new M.Buf16(122);this.bl_tree=new M.Buf16(78);x(this.dyn_ltree);x(this.dyn_dtree);x(this.bl_tree);this.bl_desc=this.d_desc=this.l_desc=null;this.bl_count=new M.Buf16(16);this.heap=new M.Buf16(573);x(this.heap);this.heap_max=this.heap_len=0;this.depth=new M.Buf16(573);x(this.depth);this.bi_valid=this.bi_buf=this.insert=this.matches=this.static_len=this.opt_len=this.d_buf=this.last_lit= this.lit_bufsize=this.l_buf=0}function Z(ba){var H;return ba&&ba.state?(ba.total_in=ba.total_out=0,ba.data_type=2,(H=ba.state).pending=0,H.pending_out=0,0>H.wrap&&(H.wrap=-H.wrap),H.status=H.wrap?42:113,ba.adler=2===H.wrap?0:1,H.last_flush=0,S._tr_init(H),0):v(ba,-2)}function E(ba){var H,ja=Z(ba);return 0===ja&&((H=ba.state).window_size=2*H.w_size,x(H.head),H.max_lazy_match=da[H.level].max_lazy,H.good_match=da[H.level].good_length,H.nice_match=da[H.level].nice_length,H.max_chain_length=da[H.level].max_chain, H.strstart=0,H.block_start=0,H.lookahead=0,H.insert=0,H.match_length=H.prev_length=2,H.match_available=0,H.ins_h=0),ja}function aa(ba,H,ja,N,ca,ia){if(!ba)return-2;var ea=1;if(-1===H&&(H=6),0>N?(ea=0,N=-N):15ca||9N||15H||9ia||4ba.pending_buf_size-5&&(ja=ba.pending_buf_size- 5);;){if(1>=ba.lookahead){if(J(ba),0===ba.lookahead&&0===H)return 1;if(0===ba.lookahead)break}ba.strstart+=ba.lookahead;ba.lookahead=0;var N=ba.block_start+ja;if((0===ba.strstart||ba.strstart>=N)&&(ba.lookahead=ba.strstart-N,ba.strstart=N,z(ba,!1),0===ba.strm.avail_out)||ba.strstart-ba.block_start>=ba.w_size-262&&(z(ba,!1),0===ba.strm.avail_out))return 1}return ba.insert=0,4===H?(z(ba,!0),0===ba.strm.avail_out?3:4):(ba.strstart>ba.block_start&&(z(ba,!1),ba.strm.avail_out),1)}),new ha(4,4,8,4,X),new ha(4, 5,16,8,X),new ha(4,6,32,32,X),new ha(4,4,16,16,F),new ha(8,16,32,32,F),new ha(8,16,128,128,F),new ha(8,32,128,256,F),new ha(32,128,258,1024,F),new ha(32,258,258,4096,F)];k.deflateInit=function(ba,H){return aa(ba,H,8,15,8,0)};k.deflateInit2=aa;k.deflateReset=E;k.deflateResetKeep=Z;k.deflateSetHeader=function(ba,H){return ba&&ba.state?2!==ba.state.wrap?-2:(ba.state.gzhead=H,0):-2};k.deflate=function(ba,H){var ja,N;if(!ba||!ba.state||5H)return ba?v(ba,-2):-2;if(N=ba.state,!ba.output||!ba.input&& 0!==ba.avail_in||666===N.status&&4!==H)return v(ba,0===ba.avail_out?-5:-2);if(N.strm=ba,ja=N.last_flush,N.last_flush=H,42===N.status)if(2===N.wrap)ba.adler=0,u(N,31),u(N,139),u(N,8),N.gzhead?(u(N,(N.gzhead.text?1:0)+(N.gzhead.hcrc?2:0)+(N.gzhead.extra?4:0)+(N.gzhead.name?8:0)+(N.gzhead.comment?16:0)),u(N,255&N.gzhead.time),u(N,N.gzhead.time>>8&255),u(N,N.gzhead.time>>16&255),u(N,N.gzhead.time>>24&255),u(N,9===N.level?2:2<=N.strategy||2>N.level?4:0),u(N,255&N.gzhead.os),N.gzhead.extra&&N.gzhead.extra.length&& (u(N,255&N.gzhead.extra.length),u(N,N.gzhead.extra.length>>8&255)),N.gzhead.hcrc&&(ba.adler=O(ba.adler,N.pending_buf,N.pending,0)),N.gzindex=0,N.status=69):(u(N,0),u(N,0),u(N,0),u(N,0),u(N,0),u(N,9===N.level?2:2<=N.strategy||2>N.level?4:0),u(N,3),N.status=113);else{var ca=8+(N.w_bits-8<<4)<<8;ca|=(2<=N.strategy||2>N.level?0:6>N.level?1:6===N.level?2:3)<<6;0!==N.strstart&&(ca|=32);N.status=113;m(N,ca+(31-ca%31));0!==N.strstart&&(m(N,ba.adler>>>16),m(N,65535&ba.adler));ba.adler=1}if(69===N.status)if(N.gzhead.extra){for(ca= N.pending;N.gzindex<(65535&N.gzhead.extra.length)&&(N.pending!==N.pending_buf_size||(N.gzhead.hcrc&&N.pending>ca&&(ba.adler=O(ba.adler,N.pending_buf,N.pending-ca,ca)),L(ba),ca=N.pending,N.pending!==N.pending_buf_size));)u(N,255&N.gzhead.extra[N.gzindex]),N.gzindex++;N.gzhead.hcrc&&N.pending>ca&&(ba.adler=O(ba.adler,N.pending_buf,N.pending-ca,ca));N.gzindex===N.gzhead.extra.length&&(N.gzindex=0,N.status=73)}else N.status=73;if(73===N.status)if(N.gzhead.name){ca=N.pending;do{if(N.pending===N.pending_buf_size&& (N.gzhead.hcrc&&N.pending>ca&&(ba.adler=O(ba.adler,N.pending_buf,N.pending-ca,ca)),L(ba),ca=N.pending,N.pending===N.pending_buf_size)){var ia=1;break}ia=N.gzindexca&&(ba.adler=O(ba.adler,N.pending_buf,N.pending-ca,ca));0===ia&&(N.gzindex=0,N.status=91)}else N.status=91;if(91===N.status)if(N.gzhead.comment){ca=N.pending;do{if(N.pending===N.pending_buf_size&&(N.gzhead.hcrc&&N.pending>ca&& (ba.adler=O(ba.adler,N.pending_buf,N.pending-ca,ca)),L(ba),ca=N.pending,N.pending===N.pending_buf_size)){ia=1;break}ia=N.gzindexca&&(ba.adler=O(ba.adler,N.pending_buf,N.pending-ca,ca));0===ia&&(N.status=103)}else N.status=103;if(103===N.status&&(N.gzhead.hcrc?(N.pending+2>N.pending_buf_size&&L(ba),N.pending+2<=N.pending_buf_size&&(u(N,255&ba.adler),u(N,ba.adler>>8&255),ba.adler=0, N.status=113)):N.status=113),0!==N.pending){if(L(ba),0===ba.avail_out)return N.last_flush=-1,0}else if(0===ba.avail_in&&(H<<1)-(4=ea.lookahead){if(J(ea),258>=ea.lookahead&&0===qa)return 1;if(0===ea.lookahead)break}if(ea.match_length=0,3<=ea.lookahead&&0ea.lookahead&&(ea.match_length=ea.lookahead)}if(3<=ea.match_length?(za=S._tr_tally(ea,1,ea.match_length-3),ea.lookahead-=ea.match_length,ea.strstart+=ea.match_length,ea.match_length=0):(za=S._tr_tally(ea,0,ea.window[ea.strstart]),ea.lookahead--,ea.strstart++),za&&(z(ea,!1),0===ea.strm.avail_out))return 1}return ea.insert=0,4===qa?(z(ea,!0),0===ea.strm.avail_out? 3:4):ea.last_lit&&(z(ea,!1),0===ea.strm.avail_out)?1:2}(N,H):da[N.level].func(N,H);if(3!==ja&&4!==ja||(N.status=666),1===ja||3===ja)return 0===ba.avail_out&&(N.last_flush=-1),0;if(2===ja&&(1===H?S._tr_align(N):5!==H&&(S._tr_stored_block(N,0,0,!1),3===H&&(x(N.head),0===N.lookahead&&(N.strstart=0,N.block_start=0,N.insert=0))),L(ba),0===ba.avail_out))return N.last_flush=-1,0}return 4!==H?0:0>=N.wrap?1:(2===N.wrap?(u(N,255&ba.adler),u(N,ba.adler>>8&255),u(N,ba.adler>>16&255),u(N,ba.adler>>24&255),u(N, 255&ba.total_in),u(N,ba.total_in>>8&255),u(N,ba.total_in>>16&255),u(N,ba.total_in>>24&255)):(m(N,ba.adler>>>16),m(N,65535&ba.adler)),L(ba),0=ja.w_size&&(0===N&&(x(ja.head),ja.strstart=0,ja.block_start=0,ja.insert=0),ca=new M.Buf8(ja.w_size),M.arraySet(ca,H,ia-ja.w_size,ja.w_size,0),H=ca,ia=ja.w_size);ca=ba.avail_in;var ea=ba.next_in;var qa=ba.input;ba.avail_in=ia;ba.next_in=0;ba.input=H;for(J(ja);3<=ja.lookahead;){H=ja.strstart;ia=ja.lookahead-2;do ja.ins_h=(ja.ins_h<S&&(M+=m[u++]<>>=v=ba>>>24,S-=v,0===(v=ba>>>16&255))X[J++]=65535&ba;else{if(!(16&v)){if(0==(64&v)){ba=D[(65535& ba)+(M&(1<>>=v,S-=v);15>S&&(M+=m[u++]<>>=v=ba>>>24,S-=v,!(16&(v=ba>>>16&255))){if(0==(64&v)){ba=O[(65535&ba)+(M&(1<ha){k.msg="invalid distance too far back"; z.mode=30;break a}if(M>>>=v,S-=v,x>(v=J-f)){if((v=x-v)>Z&&z.sane){k.msg="invalid distance too far back";z.mode=30;break a}if(ba=0,L=aa,0===E){if(ba+=T-v,v>3;M&=(1<<(S-=H<<3))-1;k.next_in=u;k.next_out=J;k.avail_in=u>>24&255)+(M>>>8&65280)+((65280&M)<<8)+((255&M)<<24)}function x(){this.mode=0;this.last=!1;this.wrap=0;this.havedict=!1;this.total=this.check=this.dmax=this.flags=0;this.head=null; this.wnext=this.whave=this.wsize=this.wbits=0;this.window=null;this.extra=this.offset=this.length=this.bits=this.hold=0;this.distcode=this.lencode=null;this.have=this.ndist=this.nlen=this.ncode=this.distbits=this.lenbits=0;this.next=null;this.lens=new J.Buf16(320);this.work=new J.Buf16(288);this.distdyn=this.lendyn=null;this.was=this.back=this.sane=0}function L(M){var S;return M&&M.state?(S=M.state,M.total_in=M.total_out=S.total=0,M.msg="",S.wrap&&(M.adler=1&S.wrap),S.mode=1,S.last=0,S.havedict=0, S.dmax=32768,S.head=null,S.hold=0,S.bits=0,S.lencode=S.lendyn=new J.Buf32(852),S.distcode=S.distdyn=new J.Buf32(592),S.sane=1,S.back=-1,0):-2}function z(M){var S;return M&&M.state?((S=M.state).wsize=0,S.whave=0,S.wnext=0,L(M)):-2}function u(M,S){var D,O;return M&&M.state?(O=M.state,0>S?(D=0,S=-S):(D=1+(S>>4),48>S&&(S&=15)),S&&(8>S||15=M.wsize?(J.arraySet(M.window,S,D-M.wsize,M.wsize,0),M.wnext=0,M.whave=M.wsize):((P=M.wsize-M.wnext)>O&&(P=O),J.arraySet(M.window,S,D-O,P,M.wnext),(O-=P)?(J.arraySet(M.window,S,D-O,O,0),M.wnext=O,M.whave=M.wsize):(M.wnext+=P,M.wnext===M.wsize&&(M.wnext=0),M.whaveXa;){if(0===Ea)break a;Ea--;Oa+=Ua[Ha++]<>>8&255;D.check=F(D.check,ia,2,0);Xa=Oa=0;D.mode=2;break}if(D.flags=0,D.head&&(D.head.done=!1),!(1&D.wrap)||(((255&Oa)<<8)+(Oa>>8))%31){M.msg="incorrect header check";D.mode=30;break}if(8!=(15&Oa)){M.msg="unknown compression method";D.mode=30;break}if(Xa-=4,ja=8+(15&(Oa>>>=4)),0===D.wbits)D.wbits=ja;else if(ja>D.wbits){M.msg="invalid window size";D.mode=30;break}D.dmax= 1<Xa;){if(0===Ea)break a;Ea--;Oa+=Ua[Ha++]<>8&1);512&D.flags&&(ia[0]=255&Oa,ia[1]=Oa>>>8&255,D.check=F(D.check,ia,2,0));Xa=Oa=0;D.mode=3;case 3:for(;32>Xa;){if(0===Ea)break a;Ea--;Oa+=Ua[Ha++]<>>8&255,ia[2]=Oa>>>16&255,ia[3]=Oa>>>24&255,D.check=F(D.check,ia,4,0));Xa=Oa=0;D.mode=4;case 4:for(;16>Xa;){if(0===Ea)break a;Ea--;Oa+=Ua[Ha++]<>8);512&D.flags&&(ia[0]=255&Oa,ia[1]=Oa>>>8&255,D.check=F(D.check,ia,2,0));Xa=Oa=0;D.mode=5;case 5:if(1024&D.flags){for(;16>Xa;){if(0===Ea)break a;Ea--;Oa+=Ua[Ha++]<>>8&255,D.check=F(D.check,ia,2,0)); Xa=Oa=0}else D.head&&(D.head.extra=null);D.mode=6;case 6:if(1024&D.flags&&((O=D.length)>Ea&&(O=Ea),O&&(D.head&&(ja=D.head.extra_len-D.length,D.head.extra||(D.head.extra=Array(D.head.extra_len)),J.arraySet(D.head.extra,Ua,Ha,O,ja)),512&D.flags&&(D.check=F(D.check,Ua,O,Ha)),Ea-=O,Ha+=O,D.length-=O),D.length))break a;D.length=0;D.mode=7;case 7:if(2048&D.flags){if(0===Ea)break a;O=0;do ja=Ua[Ha+O++],D.head&&ja&&65536>D.length&&(D.head.name+=String.fromCharCode(ja));while(ja&&OD.length&&(D.head.comment+=String.fromCharCode(ja));while(ja&&OXa;){if(0===Ea)break a;Ea--;Oa+=Ua[Ha++]<>9&1,D.head.done=!0);M.adler=D.check=0;D.mode=12;break;case 10:for(;32>Xa;){if(0===Ea)break a;Ea--;Oa+=Ua[Ha++]<>>=7&Xa;Xa-=7&Xa;D.mode=27;break}for(;3>Xa;){if(0===Ea)break a;Ea--;Oa+=Ua[Ha++]<>>=1)){case 0:D.mode=14;break;case 1:var Na=D;if(aa){Z=new J.Buf32(512);E=new J.Buf32(32);for(da=0;144>da;)Na.lens[da++]=8;for(;256>da;)Na.lens[da++]=9;for(;280>da;)Na.lens[da++]=7;for(;288>da;)Na.lens[da++]=8;T(1,Na.lens,0,288,Z,0,Na.work,{bits:9});for(da=0;32>da;)Na.lens[da++]=5;T(2,Na.lens,0,32,E,0,Na.work,{bits:5});aa=!1}Na.lencode=Z;Na.lenbits=9;Na.distcode=E;Na.distbits=5;if(D.mode=20,6===S){Oa>>>=2;Xa-=2;break a}break;case 2:D.mode=17;break;case 3:M.msg="invalid block type", D.mode=30}Oa>>>=2;Xa-=2;break;case 14:Oa>>>=7&Xa;for(Xa-=7&Xa;32>Xa;){if(0===Ea)break a;Ea--;Oa+=Ua[Ha++]<>>16^65535)){M.msg="invalid stored block lengths";D.mode=30;break}if(D.length=65535&Oa,Oa=0,Xa=0,D.mode=15,6===S)break a;case 15:D.mode=16;case 16:if(O=D.length){if(O>Ea&&(O=Ea),O>ya&&(O=ya),0===O)break a;J.arraySet(za,Ua,Ha,O,qa);Ea-=O;Ha+=O;ya-=O;qa+=O;D.length-=O;break}D.mode=12;break;case 17:for(;14>Xa;){if(0===Ea)break a;Ea--;Oa+=Ua[Ha++]<>>=5,Xa-=5,D.ndist=1+(31&Oa),Oa>>>=5,Xa-=5,D.ncode=4+(15&Oa),Oa>>>=4,Xa-=4,286Xa;){if(0===Ea)break a;Ea--;Oa+=Ua[Ha++]<>>=3;Xa-=3}for(;19>D.have;)D.lens[ea[D.have++]]=0;if(D.lencode=D.lendyn,D.lenbits=7,N={bits:D.lenbits},db=T(0,D.lens,0,19,D.lencode,0,D.work,N),D.lenbits=N.bits,db){M.msg="invalid code lengths set"; D.mode=30;break}D.have=0;D.mode=19;case 19:for(;D.have>>24)<=Xa);){if(0===Ea)break a;Ea--;Oa+=Ua[Ha++]<ba)Oa>>>=da,Xa-=da,D.lens[D.have++]=ba;else{if(16===ba){for(Na=da+2;Xa>>=da,Xa-=da,0===D.have){M.msg="invalid bit length repeat";D.mode=30;break}ja=D.lens[D.have-1];O=3+(3&Oa);Oa>>>=2;Xa-=2}else if(17===ba){for(Na=da+3;Xa>>=da));Oa>>>=3;Xa-=3}else{for(Na=da+7;Xa>>=da));Oa>>>=7;Xa-=7}if(D.have+O>D.nlen+D.ndist){M.msg="invalid bit length repeat";D.mode=30;break}for(;O--;)D.lens[D.have++]=ja}}if(30===D.mode)break;if(0===D.lens[256]){M.msg="invalid code -- missing end-of-block";D.mode=30;break}if(D.lenbits=9,N={bits:D.lenbits},db=T(1,D.lens,0,D.nlen,D.lencode,0,D.work,N),D.lenbits=N.bits,db){M.msg= "invalid literal/lengths set";D.mode=30;break}if(D.distbits=6,D.distcode=D.distdyn,N={bits:D.distbits},db=T(2,D.lens,D.nlen,D.ndist,D.distcode,0,D.work,N),D.distbits=N.bits,db){M.msg="invalid distances set";D.mode=30;break}if(D.mode=20,6===S)break a;case 20:D.mode=21;case 21:if(6<=Ea&&258<=ya){M.next_out=qa;M.avail_out=ya;M.next_in=Ha;M.avail_in=Ea;D.hold=Oa;D.bits=Xa;ha(M,eb);qa=M.next_out;za=M.output;ya=M.avail_out;Ha=M.next_in;Ua=M.input;Ea=M.avail_in;Oa=D.hold;Xa=D.bits;12===D.mode&&(D.back=-1); break}for(D.back=0;Na=(ca=D.lencode[Oa&(1<>>16&255,ba=65535&ca,!((da=ca>>>24)<=Xa);){if(0===Ea)break a;Ea--;Oa+=Ua[Ha++]<>oa)])>>>16&255,ba=65535&ca,!(oa+(da=ca>>>24)<=Xa);){if(0===Ea)break a;Ea--;Oa+=Ua[Ha++]<>>=oa;Xa-=oa;D.back+=oa}if(Oa>>>=da,Xa-=da,D.back+=da,D.length=ba,0===Na){D.mode=26;break}if(32&Na){D.back=-1;D.mode=12;break}if(64&Na){M.msg="invalid literal/length code"; D.mode=30;break}D.extra=15&Na;D.mode=22;case 22:if(D.extra){for(Na=D.extra;Xa>>=D.extra;Xa-=D.extra;D.back+=D.extra}D.was=D.length;D.mode=23;case 23:for(;Na=(ca=D.distcode[Oa&(1<>>16&255,ba=65535&ca,!((da=ca>>>24)<=Xa);){if(0===Ea)break a;Ea--;Oa+=Ua[Ha++]<>oa)])>>>16&255,ba=65535&ca,!(oa+(da=ca>>>24)<=Xa);){if(0=== Ea)break a;Ea--;Oa+=Ua[Ha++]<>>=oa;Xa-=oa;D.back+=oa}if(Oa>>>=da,Xa-=da,D.back+=da,64&Na){M.msg="invalid distance code";D.mode=30;break}D.offset=ba;D.extra=15&Na;D.mode=24;case 24:if(D.extra){for(Na=D.extra;Xa>>=D.extra;Xa-=D.extra;D.back+=D.extra}if(D.offset>D.dmax){M.msg="invalid distance too far back";D.mode=30;break}D.mode=25;case 25:if(0===ya)break a;if(O=eb-ya,D.offset>O){if((O=D.offset-O)>D.whave&& D.sane){M.msg="invalid distance too far back";D.mode=30;break}O>D.wnext?(O-=D.wnext,P=D.wsize-O):P=D.wnext-O;O>D.length&&(O=D.length);da=D.window}else da=za,P=qa-D.offset,O=D.length;O>ya&&(O=ya);ya-=O;D.length-=O;do za[qa++]=da[P++];while(--O);0===D.length&&(D.mode=21);break;case 26:if(0===ya)break a;za[qa++]=D.length;ya--;D.mode=21;break;case 27:if(D.wrap){for(;32>Xa;){if(0===Ea)break a;Ea--;Oa|=Ua[Ha++]<Xa;){if(0===Ea)break a;Ea--;Oa+=Ua[Ha++]< D.mode&&(27>D.mode||4!==S))&&l(M,M.output,M.next_out,eb-M.avail_out)?(D.mode=31,-4):(Ma-=M.avail_in,eb-=M.avail_out,M.total_in+=Ma,M.total_out+=eb,D.total+=eb,D.wrap&&eb&&(M.adler=D.check=D.flags?F(D.check,za,eb,M.next_out-eb):X(D.check,za,eb,M.next_out-eb)),M.data_type=D.bits+(D.last?64:0)+(12===D.mode?128:0)+(20===D.mode||15===D.mode?256:0),(0===Ma&&0===eb||4===S)&&0===db&&(db=-5),db)};k.inflateEnd=function(M){if(!M||!M.state)return-2;var S=M.state;return S.window&&(S.window=null),M.state=null, 0};k.inflateGetHeader=function(M,S){var D;return M&&M.state?0==(2&(D=M.state).wrap)?-2:(D.head=S,S.done=!1,0):-2};k.inflateSetDictionary=function(M,S){var D,O=S.length;return M&&M.state?0!==(D=M.state).wrap&&11!==D.mode?-2:11===D.mode&&X(1,S,O,0)!==D.check?-3:l(M,S,O,O)?(D.mode=31,-4):(D.havedict=1,0):-2};k.inflateInfo="pako inflate (from Nodeca project)"},6446:function(h,k,f){var v=f(9187),x=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],L=[16,16,16,16, 16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],z=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],u=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];h.exports=function(m,l,J,X,F,ha,T,Z){var E,aa,M,S,D,O,P=Z.bits,da,ba,H,ja,N,ca=0,ia,ea=null,qa=0,za=new v.Buf16(16);var ya=new v.Buf16(16);var Ha=null,Ua=0;for(da=0;15>=da;da++)za[da]=0;for(ba=0;baH&&(Ea=H),0===H)return F[ha++]=20971520,F[ha++]=20971520,Z.bits=1,0;for(P=1;P=da;da++)if(E<<=1,0>(E-=za[da]))return-1;if(0da;da++)ya[da+1]=ya[da]+za[da];for(ba=0;baS?(D=Ha[Ua+T[ba]],O=ea[qa+T[ba]]):(D=96,O=0);E=1<>N)+(aa-=E)]=Oa<<24|D<<16|O|0;while(0!==aa);for(E=1<>=1;if(0!==E?(ia&=E-1,ia+=E):ia=0,ba++,0==--za[da]){if(da===H)break;da=l[J+T[ba]]}if(da>Ea&&(ia&X)!==M){0===N&&(N=Ea);ya+=P;for(E=1<<(ja=da-N);ja+N=(E-=za[ja+N]));)ja++,E<<=1;if(ca+=1<Ea?ca[Ea]:ca[256+(Ea>>>7)]}function u(Ea,Oa){Ea.pending_buf[Ea.pending++]=255&Oa;Ea.pending_buf[Ea.pending++]=Oa>>>8&255}function m(Ea,Oa,Xa){Ea.bi_valid>16-Xa?(Ea.bi_buf|=Oa<>16-Ea.bi_valid,Ea.bi_valid+=Xa-16):(Ea.bi_buf|=Oa<>>=1,Xa<<=1;while(0<--Oa);return Xa>>>1}function X(Ea,Oa, Xa){var Ma,eb=Array(16),db=0;for(Ma=1;15>=Ma;Ma++)eb[Ma]=db=db+Xa[Ma-1]<<1;for(Xa=0;Xa<=Oa;Xa++)Ma=Ea[2*Xa+1],0!==Ma&&(Ea[2*Xa]=J(eb[Ma]++,Ma))}function F(Ea){var Oa;for(Oa=0;286>Oa;Oa++)Ea.dyn_ltree[2*Oa]=0;for(Oa=0;30>Oa;Oa++)Ea.dyn_dtree[2*Oa]=0;for(Oa=0;19>Oa;Oa++)Ea.bl_tree[2*Oa]=0;Ea.dyn_ltree[512]=1;Ea.opt_len=Ea.static_len=0;Ea.last_lit=Ea.matches=0}function ha(Ea){8Ea.heap_len;)eb[2*(Ma=Ea.heap[++Ea.heap_len]=2>Ca?++Ca:0)]=1,Ea.depth[Ma]=0,Ea.opt_len--,Na&& (Ea.static_len-=db[2*Ma+1]);Oa.max_code=Ca;for(Xa=Ea.heap_len>>1;1<=Xa;Xa--)Z(Ea,eb,Xa);Ma=oa;do Xa=Ea.heap[1],Ea.heap[1]=Ea.heap[Ea.heap_len--],Z(Ea,eb,1),db=Ea.heap[1],Ea.heap[--Ea.heap_max]=Xa,Ea.heap[--Ea.heap_max]=db,eb[2*Ma]=eb[2*Xa]+eb[2*db],Ea.depth[Ma]=(Ea.depth[Xa]>=Ea.depth[db]?Ea.depth[Xa]:Ea.depth[db])+1,eb[2*Xa+1]=eb[2*db+1]=Ma,Ea.heap[1]=Ma++,Z(Ea,eb,1);while(2<=Ea.heap_len);Ea.heap[--Ea.heap_max]=Ea.heap[1];var sa,Aa,Ja,Sa,Ab;Xa=Oa.dyn_tree;Ma=Oa.max_code;db=Oa.stat_desc.static_tree; Na=Oa.stat_desc.has_stree;oa=Oa.stat_desc.extra_bits;var jb=Oa.stat_desc.extra_base,Ob=Oa.stat_desc.max_length,Wb=0;for(Ja=0;15>=Ja;Ja++)Ea.bl_count[Ja]=0;Xa[2*Ea.heap[Ea.heap_max]+1]=0;for(Oa=Ea.heap_max+1;573>Oa;Oa++)(Ja=Xa[2*Xa[2*(sa=Ea.heap[Oa])+1]+1]+1)>Ob&&(Ja=Ob,Wb++),Xa[2*sa+1]=Ja,sa>Ma||(Ea.bl_count[Ja]++,Sa=0,sa>=jb&&(Sa=oa[sa-jb]),Ab=Xa[2*sa],Ea.opt_len+=Ab*(Ja+Sa),Na&&(Ea.static_len+=Ab*(db[2*sa+1]+Sa)));if(0!==Wb){do{for(Ja=Ob-1;0===Ea.bl_count[Ja];)Ja--;Ea.bl_count[Ja]--;Ea.bl_count[Ja+ 1]+=2;Ea.bl_count[Ob]--;Wb-=2}while(0Ma||(Xa[2*Aa+1]!==Ja&&(Ea.opt_len+=(Ja-Xa[2*Aa+1])*Xa[2*Aa],Xa[2*Aa+1]=Ja),sa--)}X(eb,Ca,Ea.bl_count)}function M(Ea,Oa,Xa){var Ma,eb=-1,db=Oa[1],Na=0,oa=7,Ca=4;0===db&&(oa=138,Ca=3);Oa[2*(Xa+1)+1]=65535;for(Ma=0;Ma<=Xa;Ma++){var sa=db;db=Oa[2*(Ma+1)+1];++Na=Na?Ea.bl_tree[34]++:Ea.bl_tree[36]++, Na=0,eb=sa,0===db?(oa=138,Ca=3):sa===db?(oa=6,Ca=3):(oa=7,Ca=4))}}function S(Ea,Oa,Xa){var Ma,eb,db=-1,Na=Oa[1],oa=0,Ca=7,sa=4;0===Na&&(Ca=138,sa=3);for(Ma=0;Ma<=Xa;Ma++)if(eb=Na,Na=Oa[2*(Ma+1)+1],!(++oa=oa?(l(Ea,17,Ea.bl_tree),m(Ea,oa-3,3)):(l(Ea,18,Ea.bl_tree),m(Ea,oa-11,7));oa=0;db=eb;0===Na?(Ca=138,sa=3):eb===Na?(Ca=6,sa=3):(Ca=7,sa=4)}}function D(Ea, Oa,Xa,Ma){m(Ea,Ma?1:0,3);ha(Ea);u(Ea,Xa);u(Ea,~Xa);O.arraySet(Ea.pending_buf,Ea.window,Oa,Xa,Ea.pending);Ea.pending+=Xa}var O=f(9187),P=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],da=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],ba=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],H=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],ja=Array(576);v(ja);var N=Array(60);v(N);var ca=Array(512);v(ca);var ia=Array(256);v(ia);var ea=Array(29);v(ea);var qa,za,ya,Ha=Array(30); v(Ha);var Ua=!1;k._tr_init=function(Ea){if(!Ua){var Oa,Xa,Ma,eb=Array(16);for(Ma=Xa=0;28>Ma;Ma++)for(ea[Ma]=Xa,Oa=0;Oa<1<Ma;Ma++)for(Ha[Ma]=Xa,Oa=0;Oa<1<>=7;30>Ma;Ma++)for(Ha[Ma]=Xa<<7,Oa=0;Oa<1<=Oa;Oa++)eb[Oa]=0;for(Oa=0;143>=Oa;)ja[2*Oa+1]=8,Oa++,eb[8]++;for(;255>=Oa;)ja[2*Oa+1]=9,Oa++,eb[9]++;for(;279>=Oa;)ja[2*Oa+1]=7,Oa++,eb[7]++;for(;287>=Oa;)ja[2*Oa+1]=8,Oa++,eb[8]++; X(ja,287,eb);for(Oa=0;30>Oa;Oa++)N[2*Oa+1]=5,N[2*Oa]=J(Oa,5);qa=new x(ja,P,257,286,15);za=new x(N,da,0,30,15);ya=new x([],ba,0,19,7);!0;Ua=!0}Ea.l_desc=new L(Ea.dyn_ltree,qa);Ea.d_desc=new L(Ea.dyn_dtree,za);Ea.bl_desc=new L(Ea.bl_tree,ya);Ea.bi_buf=0;Ea.bi_valid=0;F(Ea)};k._tr_stored_block=D;k._tr_flush_block=function(Ea,Oa,Xa,Ma){var eb,db,Na=0;0=Ca;Ca++,sa>>>=1)if(1&sa&&0!==oa.dyn_ltree[2*Ca])return 0; if(0!==oa.dyn_ltree[18]||0!==oa.dyn_ltree[20]||0!==oa.dyn_ltree[26])return 1;for(Ca=32;256>Ca;Ca++)if(0!==oa.dyn_ltree[2*Ca])return 1;return 0}(Ea)),aa(Ea,Ea.l_desc),aa(Ea,Ea.d_desc),Na=function(oa){var Ca;M(oa,oa.dyn_ltree,oa.l_desc.max_code);M(oa,oa.dyn_dtree,oa.d_desc.max_code);aa(oa,oa.bl_desc);for(Ca=18;3<=Ca&&0===oa.bl_tree[2*H[Ca]+1];Ca--);return oa.opt_len+=3*(Ca+1)+14,Ca}(Ea),eb=Ea.opt_len+3+7>>>3,(db=Ea.static_len+3+7>>>3)<=eb&&(eb=db)):eb=db=Xa+5;Xa+4<=eb&&-1!==Oa?D(Ea,Oa,Xa,Ma):4===Ea.strategy|| db===eb?(m(Ea,2+(Ma?1:0),3),E(Ea,ja,N)):(m(Ea,4+(Ma?1:0),3),function(oa,Ca,sa,Aa){var Ja;m(oa,Ca-257,5);m(oa,sa-1,5);m(oa,Aa-4,4);for(Ja=0;Ja>>8&255,Ea.pending_buf[Ea.d_buf+2*Ea.last_lit+1]=255&Oa,Ea.pending_buf[Ea.l_buf+Ea.last_lit]= 255&Xa,Ea.last_lit++,0===Oa?Ea.dyn_ltree[2*Xa]++:(Ea.matches++,Oa--,Ea.dyn_ltree[2*(ia[Xa]+256+1)]++,Ea.dyn_dtree[2*z(Oa)]++),Ea.last_lit===Ea.lit_bufsize-1};k._tr_align=function(Ea){m(Ea,2,3);l(Ea,256,ja);16===Ea.bi_valid?(u(Ea,Ea.bi_buf),Ea.bi_buf=0,Ea.bi_valid=0):8<=Ea.bi_valid&&(Ea.pending_buf[Ea.pending++]=255&Ea.bi_buf,Ea.bi_buf>>=8,Ea.bi_valid-=8)}},249:function(h){h.exports=function(){this.input=null;this.total_in=this.avail_in=this.next_in=0;this.output=null;this.total_out=this.avail_out= this.next_out=0;this.msg="";this.state=null;this.data_type=2;this.adler=0}},9066:function(h){h.exports=function(k){k.data&&k.name&&(k=k.data);for(var f=!0,v="",x="",L=0;LE&&(E=M,aa=P)}return Math.sqrt(E)>F?(u(l,J,aa+1,F,ha),u(l,aa,X,F,ha)):(ha.length||ha.push(T),ha.push(Z)),ha}function m(l,J=.15,X){const F=[],ha=(l.length-1)/3;for(let T=0;T{const [Ob,Wb]=jb;jb[0]=(Ob-Aa)*Sa-(Wb-Ja)*Ab+Aa;jb[1]=(Ob-Aa)*Ab+(Wb-Ja)*Sa+Ja})}}function x(oa){const Ca=oa[0];oa=oa[1];return Math.sqrt(Math.pow(Ca[0]-oa[0],2)+Math.pow(Ca[1]-oa[1],2))}function L(oa,Ca){const sa=Ca.hachureAngle+90;var Aa=Ca.hachureGap;0>Aa&&(Aa=4*Ca.strokeWidth);Aa=Math.max(Aa,.1);Ca=[0,0];if(sa)for(const Ja of oa)v(Ja,Ca,sa);Aa=function(Ja,Sa){var Ab=[];for(var jb of Ja)Ja=[...jb],Ja[0].join(",")!==Ja[Ja.length-1].join(",")&&Ja.push([Ja[0][0],Ja[0][1]]), 2Pa.yminob.ymin?1:Pa.xob.x?1:Pa.ymax===ob.ymax?0:(Pa.ymax-ob.ymax)/Math.abs(Pa.ymax-ob.ymax)),!Ja.length)return jb;let Wb=[],hc=Ja[0].ymin;for(;Wb.length||Ja.length;){if(Ja.length){Ob= -1;for(Ab=0;Abhc);Ab++)Ob=Ab;Ja.splice(0,Ob+1).forEach(Pa=>{Wb.push({s:hc,edge:Pa})})}if(Wb=Wb.filter(Pa=>!(Pa.edge.ymax<=hc)),Wb.sort((Pa,ob)=>Pa.edge.x===ob.edge.x?0:(Pa.edge.x-ob.edge.x)/Math.abs(Pa.edge.x-ob.edge.x)),1=Wb.length)break;jb.push([[Math.round(Wb[Ob].edge.x),hc],[Math.round(Wb[Ab].edge.x),hc]])}hc+=Sa;Wb.forEach(Pa=>{Pa.edge.x+=Sa*Pa.edge.islope})}return jb}(oa,Aa);if(sa){for(const Ja of oa)v(Ja,Ca,-sa); !function(Ja,Sa,Ab){const jb=[];Ja.forEach(Ob=>jb.push(...Ob));v(jb,Sa,Ab)}(Aa,Ca,-sa)}return Aa}function z(oa){const Ca=[];a:{var sa=oa;for(var Aa=[];""!==sa;){if(!sa.match(/^([ \t\r\n,]+)/))if(sa.match(/^([aAcChHlLmMqQsStTvVzZ])/))Aa[Aa.length]={type:0,text:RegExp.$1};else{if(!sa.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/)){sa=[];break a}Aa[Aa.length]={type:1,text:`${parseFloat(RegExp.$1)}`}}sa=sa.substr(RegExp.$1.length)}sa=(Aa[Aa.length]={type:2,text:""},Aa)}Aa="BOD"; let Ja=0;for(var Sa=sa[Ja];2!==Sa.type;){let Ab=0;const jb=[];if("BOD"===Aa){if("M"!==Sa.text&&"m"!==Sa.text)return z("M0,0"+oa);Ja++;Ab=Ea[Sa.text];Aa=Sa.text}else 1===Sa.type?Ab=Ea[Aa]:(Ja++,Ab=Ea[Sa.text],Aa=Sa.text);if(!(Ja+AbWb%2?Ob+sa:Ob+Ca);Sa.push({key:"C",data:oa});Ca=oa[4];sa=oa[5];break;case "Q":Sa.push({key:"Q",data:[...jb]});Ca=jb[2];sa=jb[3];break;case "q":oa=jb.map((Ob,Wb)=>Wb%2?Ob+sa:Ob+Ca);Sa.push({key:"Q",data:oa});Ca=oa[2];sa=oa[3];break;case "A":Sa.push({key:"A",data:[...jb]});Ca=jb[5];sa=jb[6];break;case "a":Ca+=jb[5];sa+=jb[6];Sa.push({key:"A",data:[jb[0],jb[1],jb[2],jb[3],jb[4],Ca,sa]});break;case "H":Sa.push({key:"H",data:[...jb]});Ca=jb[0];break;case "h":Ca+=jb[0];Sa.push({key:"H", data:[Ca]});break;case "V":Sa.push({key:"V",data:[...jb]});sa=jb[0];break;case "v":sa+=jb[0];Sa.push({key:"V",data:[sa]});break;case "S":Sa.push({key:"S",data:[...jb]});Ca=jb[2];sa=jb[3];break;case "s":oa=jb.map((Ob,Wb)=>Wb%2?Ob+sa:Ob+Ca);Sa.push({key:"S",data:oa});Ca=oa[2];sa=oa[3];break;case "T":Sa.push({key:"T",data:[...jb]});Ca=jb[0];sa=jb[1];break;case "t":Ca+=jb[0];sa+=jb[1];Sa.push({key:"T",data:[Ca,sa]});break;case "Z":case "z":Sa.push({key:"Z",data:[]}),Ca=Aa,sa=Ja}return Sa}function m(oa){const Ca= [];var sa="";let Aa=0,Ja=0,Sa=0,Ab=0,jb=0,Ob=0;for(const {key:hc,data:Pa}of oa){switch(hc){case "M":Ca.push({key:"M",data:[...Pa]});[Aa,Ja]=Pa;[Sa,Ab]=Pa;break;case "C":Ca.push({key:"C",data:[...Pa]});Aa=Pa[4];Ja=Pa[5];jb=Pa[2];Ob=Pa[3];break;case "L":Ca.push({key:"L",data:[...Pa]});[Aa,Ja]=Pa;break;case "H":Aa=Pa[0];Ca.push({key:"L",data:[Aa,Ja]});break;case "V":Ja=Pa[0];Ca.push({key:"L",data:[Aa,Ja]});break;case "S":var Wb=oa=0;"C"===sa||"S"===sa?(oa=Aa+(Aa-jb),Wb=Ja+(Ja-Ob)):(oa=Aa,Wb=Ja);Ca.push({key:"C", data:[oa,Wb,...Pa]});jb=Pa[0];Ob=Pa[1];Aa=Pa[2];Ja=Pa[3];break;case "T":const [ob,pb]=Pa;Wb=oa=0;"Q"===sa||"T"===sa?(oa=Aa+(Aa-jb),Wb=Ja+(Ja-Ob)):(oa=Aa,Wb=Ja);Ca.push({key:"C",data:[Aa+2*(oa-Aa)/3,Ja+2*(Wb-Ja)/3,ob+2*(oa-ob)/3,pb+2*(Wb-pb)/3,ob,pb]});jb=oa;Ob=Wb;Aa=ob;Ja=pb;break;case "Q":const [Zb,Jc,ad,Pc]=Pa;Ca.push({key:"C",data:[Aa+2*(Zb-Aa)/3,Ja+2*(Jc-Ja)/3,ad+2*(Zb-ad)/3,Pc+2*(Jc-Pc)/3,ad,Pc]});jb=Zb;Ob=Jc;Aa=ad;Ja=Pc;break;case "A":sa=Math.abs(Pa[0]);oa=Math.abs(Pa[1]);Wb=Pa[2];const Fb= Pa[3],yc=Pa[4],Vc=Pa[5],hd=Pa[6];if(0===sa||0===oa)Ca.push({key:"C",data:[Aa,Ja,Vc,hd,Vc,hd]}),Aa=Vc,Ja=hd;else if(Aa!==Vc||Ja!==hd)J(Aa,Ja,Vc,hd,sa,oa,Wb,Fb,yc).forEach(function(Kd){Ca.push({key:"C",data:Kd})}),Aa=Vc,Ja=hd;break;case "Z":Ca.push({key:"Z",data:[]}),Aa=Sa,Ja=Ab}sa=hc}return Ca}function l(oa,Ca,sa){return[oa*Math.cos(sa)-Ca*Math.sin(sa),oa*Math.sin(sa)+Ca*Math.cos(sa)]}function J(oa,Ca,sa,Aa,Ja,Sa,Ab,jb,Ob,Wb){const hc=(Pa=Ab,Math.PI*Pa/180);var Pa;Pa=[];if(Wb)[jb,ob,pb,Zb]=Wb;else{[oa, Ca]=l(oa,Ca,-hc);[sa,Aa]=l(sa,Aa,-hc);var ob=(oa-sa)/2;var pb=(Ca-Aa)/2;var Zb=ob*ob/(Ja*Ja)+pb*pb/(Sa*Sa);1jb&&(jb=2*Math.PI+jb);0>ob&&(ob=2*Math.PI+ob);Ob&& jb>ob&&(jb-=2*Math.PI);!Ob&&ob>jb&&(ob-=2*Math.PI)}if(Math.abs(ob-jb)>120*Math.PI/180){Jc=ob;const ad=sa,Pc=Aa;ob=Ob&&ob>jb?jb+120*Math.PI/180:jb+120*Math.PI/180*-1;Pa=J(sa=pb+Ja*Math.cos(ob),Aa=Zb+Sa*Math.sin(ob),ad,Pc,Ja,Sa,Ab,0,Ob,[ob,Jc,pb,Zb])}Ab=Math.tan((ob-jb)/4);Ja=4/3*Ja*Ab;Ab*=4/3*Sa;Sa=[oa,Ca];oa=[oa+Ja*Math.sin(jb),Ca-Ab*Math.cos(jb)];Ca=[sa+Ja*Math.sin(ob),Aa-Ab*Math.cos(ob)];sa=[sa,Aa];if(oa[0]=2*Sa[0]-oa[0],oa[1]=2*Sa[1]-oa[1],Wb)return[oa,Ca,sa].concat(Pa);Pa=[oa,Ca,sa].concat(Pa); Wb=[];for(sa=0;saJa;)Ja+=2*Math.PI,Sa+=2*Math.PI;Sa-Ja>2*Math.PI&&(Ja=0,Sa=2*Math.PI);var Wb=Math.min(2*Math.PI/Ob.curveStepCount/2,(Sa-Ja)/2);const hc=ja(Wb,oa,Ca,sa,Aa,Ja,Sa,1,Ob);Ob.disableMultiStroke||(Wb=ja(Wb,oa,Ca,sa,Aa,Ja,Sa,1.5,Ob),hc.push(...Wb));return Ab&&(jb?hc.push(...O(oa,Ca,oa+sa*Math.cos(Ja),Ca+Aa*Math.sin(Ja),Ob),...O(oa,Ca,oa+sa*Math.cos(Sa),Ca+Aa*Math.sin(Sa),Ob)):hc.push({op:"lineTo",data:[oa,Ca]},{op:"lineTo",data:[oa+sa*Math.cos(Ja),Ca+Aa*Math.sin(Ja)]})),{type:"path",ops:hc}}function E(oa, Ca){const sa=[];for(const Aa of oa)if(Aa.length){oa=Ca.maxRandomnessOffset||0;const Ja=Aa.length;if(2Ob?1:500jb&&(hc=Ob/10);jb=hc/2;Ob=.2+.2*M(Ja);let Pa=Ja.bowing*Ja.maxRandomnessOffset*(Aa-Ca)/200,ob=Ja.bowing*Ja.maxRandomnessOffset*(oa-sa)/200;Pa=D(Pa,Ja,Wb);ob=D(ob,Ja,Wb);const pb=[],Zb=Ja.preserveVertices;return Sa&&(Ab?pb.push({op:"move", data:[oa+(Zb?0:D(jb,Ja,Wb)),Ca+(Zb?0:D(jb,Ja,Wb))]}):pb.push({op:"move",data:[oa+(Zb?0:D(hc,Ja,Wb)),Ca+(Zb?0:D(hc,Ja,Wb))]})),Ab?pb.push({op:"bcurveTo",data:[Pa+oa+(sa-oa)*Ob+D(jb,Ja,Wb),ob+Ca+(Aa-Ca)*Ob+D(jb,Ja,Wb),Pa+oa+2*(sa-oa)*Ob+D(jb,Ja,Wb),ob+Ca+2*(Aa-Ca)*Ob+D(jb,Ja,Wb),sa+(Zb?0:D(jb,Ja,Wb)),Aa+(Zb?0:D(jb,Ja,Wb))]}):pb.push({op:"bcurveTo",data:[Pa+oa+(sa-oa)*Ob+D(hc,Ja,Wb),ob+Ca+(Aa-Ca)*Ob+D(hc,Ja,Wb),Pa+oa+2*(sa-oa)*Ob+D(hc,Ja,Wb),ob+Ca+2*(Aa-Ca)*Ob+D(hc,Ja,Wb),sa+(Zb?0:D(hc,Ja,Wb)),Aa+(Zb? 0:D(hc,Ja,Wb))]}),pb}function da(oa,Ca,sa){const Aa=[];Aa.push([oa[0][0]+D(Ca,sa),oa[0][1]+D(Ca,sa)]);Aa.push([oa[0][0]+D(Ca,sa),oa[0][1]+D(Ca,sa)]);for(let Ja=1;Jasa&&(sa=4*Ca.strokeWidth);sa=Math.max(sa,.1);oa=L(oa,Object.assign({},Ca,{hachureGap:sa}));const Aa=Math.PI/180*Ca.hachureAngle,Ja=[],Sa=.5*sa*Math.cos(Aa);sa=.5*sa*Math.sin(Aa);for(const [Ab,jb]of oa)x([Ab,jb])&&Ja.push([[Ab[0]-Sa,Ab[1]+sa],[...jb]],[[Ab[0]+Sa,Ab[1]-sa],[...jb]]);return{type:"fillSketch", ops:this.renderLines(Ja,Ca)}}}class ea extends ca{fillPolygons(oa,Ca){const sa=this._fillPolygons(oa,Ca);Ca=Object.assign({},Ca,{hachureAngle:Ca.hachureAngle+90});oa=this._fillPolygons(oa,Ca);return sa.ops=sa.ops.concat(oa.ops),sa}}class qa{constructor(oa){this.helper=oa}fillPolygons(oa,Ca){oa=L(oa,Ca=Object.assign({},Ca,{hachureAngle:0}));return this.dotsOnLines(oa,Ca)}dotsOnLines(oa,Ca){const sa=[];let Aa=Ca.hachureGap;0>Aa&&(Aa=4*Ca.strokeWidth);Aa=Math.max(Aa,.1);let Ja=Ca.fillWeight;0>Ja&&(Ja= Ca.strokeWidth/2);const Sa=Aa/4;for(const jb of oa){var Ab=x(jb);oa=Math.ceil(Ab/Aa)-1;Ab-=oa*Aa;const Ob=(jb[0][0]+jb[1][0])/2-Aa/4,Wb=Math.min(jb[0][1],jb[1][1]);for(let hc=0;hcCa.dashOffset? 0>Ca.hachureGap?4*Ca.strokeWidth:Ca.hachureGap:Ca.dashOffset,Aa=0>Ca.dashGap?0>Ca.hachureGap?4*Ca.strokeWidth:Ca.hachureGap:Ca.dashGap,Ja=[];return oa.forEach(Sa=>{var Ab=x(Sa);const jb=Math.floor(Ab/(sa+Aa));Ab=(Ab+Aa-jb*(sa+Aa))/2;let Ob=Sa[0];var Wb=Sa[1];Ob[0]>Wb[0]&&(Ob=Sa[1],Wb=Sa[0]);Sa=Math.atan((Wb[1]-Ob[1])/(Wb[0]-Ob[0]));for(Wb=0;WbCa.hachureGap?4*Ca.strokeWidth:Ca.hachureGap,Aa=0>Ca.zigzagOffset?sa:Ca.zigzagOffset;oa=L(oa,Ca=Object.assign({},Ca,{hachureGap:sa+Aa}));return{type:"fillSketch",ops:this.zigzagLines(oa,Aa,Ca)}}zigzagLines(oa,Ca,sa){const Aa=[];return oa.forEach(Ja=>{var Sa=x(Ja);Sa=Math.round(Sa/(2*Ca));let Ab=Ja[0];var jb=Ja[1];Ab[0]> jb[0]&&(Ab=Ja[1],jb=Ja[0]);Ja=Math.atan((jb[1]-Ab[1])/(jb[0]-Ab[0]));for(jb=0;jbJa;)Ja+=2*Math.PI,Sa+=2*Math.PI;Sa-Ja>2*Math.PI&&(Ja=0,Sa=2*Math.PI);const hc=(Sa-Ja)/jb.curveStepCount,Pa=[];for(;Ja<=Sa;Ja+=hc)Pa.push([oa+sa*Math.cos(Ja),Ca+Aa*Math.sin(Ja)]);oa=(Pa.push([oa+sa*Math.cos(Sa),Ca+Aa*Math.sin(Sa)]),Pa.push([oa,Ca]),aa([Pa],jb));Ab.call(Ob,oa)}return"none"!==jb.stroke&&Ob.push(Wb),this._d("arc",Ob,jb)}curve(oa,Ca){Ca=this._o(Ca);const sa=[],Aa=F(oa,Ca); Ca.fill&&"none"!==Ca.fill&&3<=oa.length&&(oa=function(Ja,Sa=0){var Ab=Ja.length;if(3>Ab)throw Error("A curve must have at least three points.");const jb=[];if(3===Ab)jb.push([...Ja[0]],[...Ja[1]],[...Ja[2]],[...Ja[2]]);else{Ab=[];Ab.push(Ja[0],Ja[0]);for(var Ob=1;Obsa.simplification),Ab=function(jb,Ob,Wb){var hc=m(u(z(jb)));jb=[];let Pa=[];var ob=[0,0];let pb=[];const Zb=()=>{4<=pb.length&&Pa.push(...(0,Xa.s)(pb,Ob));pb=[]};for(const {key:Jc,data:ad}of hc)switch(Jc){case "M":Zb(); Pa.length&&(jb.push(Pa),Pa=[]);ob=[ad[0],ad[1]];Pa.push(ob);break;case "L":Zb();Pa.push([ad[0],ad[1]]);break;case "C":pb.length||(hc=Pa.length?Pa[Pa.length-1]:ob,pb.push([hc[0],hc[1]]));pb.push([ad[0],ad[1]]);pb.push([ad[2],ad[3]]);pb.push([ad[4],ad[5]]);break;case "Z":Zb(),Pa.push([ob[0],ob[1]])}Zb();Pa.length&&(jb.push(Pa),Pa=[]);if(!Wb)return jb;ob=[];for(const Jc of jb)jb=(0,Xa.o)(Jc,Wb),jb.length&&ob.push(jb);return ob}(oa,1,Sa?4-4*sa.simplification:(1+sa.roughness)/2);return Ca&&("solid"=== sa.fillStyle?Aa.push(E(Ab,sa)):Aa.push(aa(Ab,sa))),Ja&&(Sa?Ab.forEach(jb=>{Aa.push(X(jb,!1,sa))}):Aa.push(function(jb,Ob){jb=m(u(z(jb)));const Wb=[];let hc=[0,0],Pa=[0,0];for(const {key:ob,data:pb}of jb)switch(ob){case "M":const Zb=1*(Ob.maxRandomnessOffset||0),Jc=Ob.preserveVertices;Wb.push({op:"move",data:pb.map(Kd=>Kd+(Jc?0:D(Zb,Ob)))});Pa=[pb[0],pb[1]];hc=[pb[0],pb[1]];break;case "L":Wb.push(...O(Pa[0],Pa[1],pb[0],pb[1],Ob));Pa=[pb[0],pb[1]];break;case "C":const [ad,Pc,Fb,yc,Vc,hd]=pb;Wb.push(...N(ad, Pc,Fb,yc,Vc,hd,Pa,Ob));Pa=[Vc,hd];break;case "Z":Wb.push(...O(Pa[0],Pa[1],hc[0],hc[1],Ob)),Pa=[hc[0],hc[1]]}return{type:"path",ops:Wb}}(oa,sa))),this._d("path",Aa,sa)}opsToPath(oa,Ca){let sa="";for(const Aa of oa.ops)switch(oa="number"==typeof Ca&&0<=Ca?Aa.data.map(Ja=>+Ja.toFixed(Ca)):Aa.data,Aa.op){case "move":sa+=`M${oa[0]} ${oa[1]} `;break;case "bcurveTo":sa+=`C${oa[0]} ${oa[1]}, ${oa[2]} ${oa[3]}, ${oa[4]} ${oa[5]} `;break;case "lineTo":sa+=`L${oa[0]} ${oa[1]} `}return sa.trim()}toPaths(oa){var Ca= oa.sets||[];oa=oa.options||this.defaultOptions;const sa=[];for(const Aa of Ca){Ca=null;switch(Aa.type){case "path":Ca={d:this.opsToPath(Aa),stroke:oa.stroke,strokeWidth:oa.strokeWidth,fill:"none"};break;case "fillPath":Ca={d:this.opsToPath(Aa),stroke:"none",strokeWidth:0,fill:oa.fill||"none"};break;case "fillSketch":Ca=this.fillSketch(Aa,oa)}Ca&&sa.push(Ca)}return sa}fillSketch(oa,Ca){let sa=Ca.fillWeight;return 0>sa&&(sa=Ca.strokeWidth/2),{d:this.opsToPath(oa),stroke:Ca.fill||"none",strokeWidth:sa, fill:"none"}}}class eb{constructor(oa,Ca){this.canvas=oa;this.ctx=this.canvas.getContext("2d");this.gen=new Ma(Ca)}draw(oa){const Ca=oa.sets||[],sa=oa.options||this.getDefaultOptions(),Aa=this.ctx,Ja=oa.options.fixedDecimalPlaceDigits;for(const Sa of Ca)switch(Sa.type){case "path":Aa.save();Aa.strokeStyle="none"===sa.stroke?"transparent":sa.stroke;Aa.lineWidth=sa.strokeWidth;sa.strokeLineDash&&Aa.setLineDash(sa.strokeLineDash);sa.strokeLineDashOffset&&(Aa.lineDashOffset=sa.strokeLineDashOffset);this._drawToContext(Aa, Sa,Ja);Aa.restore();break;case "fillPath":Aa.save();Aa.fillStyle=sa.fill||"";this._drawToContext(Aa,Sa,Ja,"curve"===oa.shape||"polygon"===oa.shape||"path"===oa.shape?"evenodd":"nonzero");Aa.restore();break;case "fillSketch":this.fillSketch(Aa,Sa,sa)}}fillSketch(oa,Ca,sa){let Aa=sa.fillWeight;0>Aa&&(Aa=sa.strokeWidth/2);oa.save();sa.fillLineDash&&oa.setLineDash(sa.fillLineDash);sa.fillLineDashOffset&&(oa.lineDashOffset=sa.fillLineDashOffset);oa.strokeStyle=sa.fill||"";oa.lineWidth=Aa;this._drawToContext(oa, Ca,sa.fixedDecimalPlaceDigits);oa.restore()}_drawToContext(oa,Ca,sa,Aa="nonzero"){oa.beginPath();for(const Ja of Ca.ops){const Sa="number"==typeof sa&&0<=sa?Ja.data.map(Ab=>+Ab.toFixed(sa)):Ja.data;switch(Ja.op){case "move":oa.moveTo(Sa[0],Sa[1]);break;case "bcurveTo":oa.bezierCurveTo(Sa[0],Sa[1],Sa[2],Sa[3],Sa[4],Sa[5]);break;case "lineTo":oa.lineTo(Sa[0],Sa[1])}}"fillPath"===Ca.type?oa.fill(Aa):oa.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(oa, Ca,sa,Aa,Ja){oa=this.gen.line(oa,Ca,sa,Aa,Ja);return this.draw(oa),oa}rectangle(oa,Ca,sa,Aa,Ja){oa=this.gen.rectangle(oa,Ca,sa,Aa,Ja);return this.draw(oa),oa}ellipse(oa,Ca,sa,Aa,Ja){oa=this.gen.ellipse(oa,Ca,sa,Aa,Ja);return this.draw(oa),oa}circle(oa,Ca,sa,Aa){oa=this.gen.circle(oa,Ca,sa,Aa);return this.draw(oa),oa}linearPath(oa,Ca){oa=this.gen.linearPath(oa,Ca);return this.draw(oa),oa}polygon(oa,Ca){oa=this.gen.polygon(oa,Ca);return this.draw(oa),oa}arc(oa,Ca,sa,Aa,Ja,Sa,Ab=!1,jb){oa=this.gen.arc(oa, Ca,sa,Aa,Ja,Sa,Ab,jb);return this.draw(oa),oa}curve(oa,Ca){oa=this.gen.curve(oa,Ca);return this.draw(oa),oa}path(oa,Ca){oa=this.gen.path(oa,Ca);return this.draw(oa),oa}}class db{constructor(oa,Ca){this.svg=oa;this.gen=new Ma(Ca)}draw(oa){var Ca=oa.sets||[];const sa=oa.options||this.getDefaultOptions(),Aa=this.svg.ownerDocument||window.document,Ja=Aa.createElementNS("http://www.w3.org/2000/svg","g"),Sa=oa.options.fixedDecimalPlaceDigits;for(const Ab of Ca){Ca=null;switch(Ab.type){case "path":Ca=Aa.createElementNS("http://www.w3.org/2000/svg", "path");Ca.setAttribute("d",this.opsToPath(Ab,Sa));Ca.setAttribute("stroke",sa.stroke);Ca.setAttribute("stroke-width",sa.strokeWidth+"");Ca.setAttribute("fill","none");sa.strokeLineDash&&Ca.setAttribute("stroke-dasharray",sa.strokeLineDash.join(" ").trim());sa.strokeLineDashOffset&&Ca.setAttribute("stroke-dashoffset",`${sa.strokeLineDashOffset}`);break;case "fillPath":Ca=Aa.createElementNS("http://www.w3.org/2000/svg","path");Ca.setAttribute("d",this.opsToPath(Ab,Sa));Ca.setAttribute("stroke","none"); Ca.setAttribute("stroke-width","0");Ca.setAttribute("fill",sa.fill||"");"curve"!==oa.shape&&"polygon"!==oa.shape||Ca.setAttribute("fill-rule","evenodd");break;case "fillSketch":Ca=this.fillSketch(Aa,Ab,sa)}Ca&&Ja.appendChild(Ca)}return Ja}fillSketch(oa,Ca,sa){let Aa=sa.fillWeight;0>Aa&&(Aa=sa.strokeWidth/2);oa=oa.createElementNS("http://www.w3.org/2000/svg","path");return oa.setAttribute("d",this.opsToPath(Ca,sa.fixedDecimalPlaceDigits)),oa.setAttribute("stroke",sa.fill||""),oa.setAttribute("stroke-width", Aa+""),oa.setAttribute("fill","none"),sa.fillLineDash&&oa.setAttribute("stroke-dasharray",sa.fillLineDash.join(" ").trim()),sa.fillLineDashOffset&&oa.setAttribute("stroke-dashoffset",`${sa.fillLineDashOffset}`),oa}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(oa,Ca){return this.gen.opsToPath(oa,Ca)}line(oa,Ca,sa,Aa,Ja){oa=this.gen.line(oa,Ca,sa,Aa,Ja);return this.draw(oa)}rectangle(oa,Ca,sa,Aa,Ja){oa=this.gen.rectangle(oa,Ca,sa,Aa,Ja);return this.draw(oa)}ellipse(oa, Ca,sa,Aa,Ja){oa=this.gen.ellipse(oa,Ca,sa,Aa,Ja);return this.draw(oa)}circle(oa,Ca,sa,Aa){oa=this.gen.circle(oa,Ca,sa,Aa);return this.draw(oa)}linearPath(oa,Ca){oa=this.gen.linearPath(oa,Ca);return this.draw(oa)}polygon(oa,Ca){oa=this.gen.polygon(oa,Ca);return this.draw(oa)}arc(oa,Ca,sa,Aa,Ja,Sa,Ab=!1,jb){oa=this.gen.arc(oa,Ca,sa,Aa,Ja,Sa,Ab,jb);return this.draw(oa)}curve(oa,Ca){oa=this.gen.curve(oa,Ca);return this.draw(oa)}path(oa,Ca){oa=this.gen.path(oa,Ca);return this.draw(oa)}}var Na={canvas:(oa, Ca)=>new eb(oa,Ca),svg:(oa,Ca)=>new db(oa,Ca),generator:oa=>new Ma(oa),newSeed:()=>Ma.newSeed()}},5714:function(h){h.exports=function(k,f,v){var x=[],L=k.length;if(0===L)return x;f=0>f?Math.max(0,f+L):f||0;for(void 0!==v&&(L=0>v?v+L:v);L-- >f;)x[L-f]=k[L];return x}},8336:function(h,k,f){k=f(487);f=f(4295);"string"==typeof(f=f.__esModule?f.default:f)&&(f=[[h.id,f,""]]);k(f,{insert:"head",singleton:!1});h.exports=f.locals||{}},554:function(h,k,f){k=f(487);f=f(9135);"string"==typeof(f=f.__esModule?f.default: f)&&(f=[[h.id,f,""]]);k(f,{insert:"head",singleton:!1});h.exports=f.locals||{}},2789:function(h,k,f){k=f(487);f=f(3729);"string"==typeof(f=f.__esModule?f.default:f)&&(f=[[h.id,f,""]]);k(f,{insert:"head",singleton:!1});h.exports=f.locals||{}},5080:function(h,k,f){k=f(487);f=f(4241);"string"==typeof(f=f.__esModule?f.default:f)&&(f=[[h.id,f,""]]);k(f,{insert:"head",singleton:!1});h.exports=f.locals||{}},7225:function(h,k,f){k=f(487);f=f(6029);"string"==typeof(f=f.__esModule?f.default:f)&&(f=[[h.id,f, ""]]);k(f,{insert:"head",singleton:!1});h.exports=f.locals||{}},778:function(h,k,f){k=f(487);f=f(9609);"string"==typeof(f=f.__esModule?f.default:f)&&(f=[[h.id,f,""]]);k(f,{insert:"head",singleton:!1});h.exports=f.locals||{}},4220:function(h,k,f){k=f(487);f=f(2345);"string"==typeof(f=f.__esModule?f.default:f)&&(f=[[h.id,f,""]]);k(f,{insert:"head",singleton:!1});h.exports=f.locals||{}},4678:function(h,k,f){k=f(487);f=f(9393);"string"==typeof(f=f.__esModule?f.default:f)&&(f=[[h.id,f,""]]);k(f,{insert:"head", singleton:!1});h.exports=f.locals||{}},1292:function(h,k,f){k=f(487);f=f(6578);"string"==typeof(f=f.__esModule?f.default:f)&&(f=[[h.id,f,""]]);k(f,{insert:"head",singleton:!1});h.exports=f.locals||{}},196:function(h,k,f){k=f(487);f=f(9482);"string"==typeof(f=f.__esModule?f.default:f)&&(f=[[h.id,f,""]]);k(f,{insert:"head",singleton:!1});h.exports=f.locals||{}},2205:function(h,k,f){k=f(487);f=f(7955);"string"==typeof(f=f.__esModule?f.default:f)&&(f=[[h.id,f,""]]);k(f,{insert:"head",singleton:!1});h.exports= f.locals||{}},1310:function(h,k,f){k=f(487);f=f(3195);"string"==typeof(f=f.__esModule?f.default:f)&&(f=[[h.id,f,""]]);k(f,{insert:"head",singleton:!1});h.exports=f.locals||{}},3922:function(h,k,f){k=f(487);f=f(2978);"string"==typeof(f=f.__esModule?f.default:f)&&(f=[[h.id,f,""]]);k(f,{insert:"head",singleton:!1});h.exports=f.locals||{}},7096:function(h,k,f){k=f(487);f=f(1587);"string"==typeof(f=f.__esModule?f.default:f)&&(f=[[h.id,f,""]]);k(f,{insert:"head",singleton:!1});h.exports=f.locals||{}},7117:function(h, k,f){k=f(487);f=f(9478);"string"==typeof(f=f.__esModule?f.default:f)&&(f=[[h.id,f,""]]);k(f,{insert:"head",singleton:!1});h.exports=f.locals||{}},1106:function(h,k,f){k=f(487);f=f(7369);"string"==typeof(f=f.__esModule?f.default:f)&&(f=[[h.id,f,""]]);k(f,{insert:"head",singleton:!1});h.exports=f.locals||{}},3336:function(h,k,f){k=f(487);f=f(1434);"string"==typeof(f=f.__esModule?f.default:f)&&(f=[[h.id,f,""]]);k(f,{insert:"head",singleton:!1});h.exports=f.locals||{}},4406:function(h,k,f){k=f(487);f= f(8923);"string"==typeof(f=f.__esModule?f.default:f)&&(f=[[h.id,f,""]]);k(f,{insert:"head",singleton:!1});h.exports=f.locals||{}},6043:function(h,k,f){k=f(487);f=f(6440);"string"==typeof(f=f.__esModule?f.default:f)&&(f=[[h.id,f,""]]);k(f,{insert:"head",singleton:!1});h.exports=f.locals||{}},694:function(h,k,f){k=f(487);f=f(5644);"string"==typeof(f=f.__esModule?f.default:f)&&(f=[[h.id,f,""]]);k(f,{insert:"head",singleton:!1});h.exports=f.locals||{}},8328:function(h,k,f){k=f(487);f=f(6843);"string"== typeof(f=f.__esModule?f.default:f)&&(f=[[h.id,f,""]]);k(f,{insert:"head",singleton:!1});h.exports=f.locals||{}},8051:function(h,k,f){k=f(487);f=f(8461);"string"==typeof(f=f.__esModule?f.default:f)&&(f=[[h.id,f,""]]);k(f,{insert:"head",singleton:!1});h.exports=f.locals||{}},4301:function(h,k,f){k=f(487);f=f(9935);"string"==typeof(f=f.__esModule?f.default:f)&&(f=[[h.id,f,""]]);k(f,{insert:"head",singleton:!1});h.exports=f.locals||{}},9966:function(h,k,f){k=f(487);f=f(532);"string"==typeof(f=f.__esModule? f.default:f)&&(f=[[h.id,f,""]]);k(f,{insert:"head",singleton:!1});h.exports=f.locals||{}},9295:function(h,k,f){k=f(487);f=f(7589);"string"==typeof(f=f.__esModule?f.default:f)&&(f=[[h.id,f,""]]);k(f,{insert:"head",singleton:!1});h.exports=f.locals||{}},47:function(h,k,f){k=f(487);f=f(5741);"string"==typeof(f=f.__esModule?f.default:f)&&(f=[[h.id,f,""]]);k(f,{insert:"head",singleton:!1});h.exports=f.locals||{}},9781:function(h,k,f){k=f(487);f=f(8465);"string"==typeof(f=f.__esModule?f.default:f)&&(f= [[h.id,f,""]]);k(f,{insert:"head",singleton:!1});h.exports=f.locals||{}},371:function(h,k,f){k=f(487);f=f(5892);"string"==typeof(f=f.__esModule?f.default:f)&&(f=[[h.id,f,""]]);k(f,{insert:"head",singleton:!1});h.exports=f.locals||{}},4623:function(h,k,f){k=f(487);f=f(3874);"string"==typeof(f=f.__esModule?f.default:f)&&(f=[[h.id,f,""]]);k(f,{insert:"head",singleton:!1});h.exports=f.locals||{}},1528:function(h,k,f){k=f(487);f=f(2681);"string"==typeof(f=f.__esModule?f.default:f)&&(f=[[h.id,f,""]]);k(f, {insert:"head",singleton:!1});h.exports=f.locals||{}},518:function(h,k,f){k=f(487);f=f(6759);"string"==typeof(f=f.__esModule?f.default:f)&&(f=[[h.id,f,""]]);k(f,{insert:"head",singleton:!1});h.exports=f.locals||{}},9757:function(h,k,f){k=f(487);f=f(9650);"string"==typeof(f=f.__esModule?f.default:f)&&(f=[[h.id,f,""]]);k(f,{insert:"head",singleton:!1});h.exports=f.locals||{}},5422:function(h,k,f){k=f(487);f=f(2044);"string"==typeof(f=f.__esModule?f.default:f)&&(f=[[h.id,f,""]]);k(f,{insert:"head",singleton:!1}); h.exports=f.locals||{}},276:function(h,k,f){k=f(487);f=f(9144);"string"==typeof(f=f.__esModule?f.default:f)&&(f=[[h.id,f,""]]);k(f,{insert:"head",singleton:!1});h.exports=f.locals||{}},6781:function(h,k,f){k=f(487);f=f(6626);"string"==typeof(f=f.__esModule?f.default:f)&&(f=[[h.id,f,""]]);k(f,{insert:"head",singleton:!1});h.exports=f.locals||{}},580:function(h,k,f){k=f(487);f=f(6359);"string"==typeof(f=f.__esModule?f.default:f)&&(f=[[h.id,f,""]]);k(f,{insert:"head",singleton:!1});h.exports=f.locals|| {}},4285:function(h,k,f){k=f(487);f=f(9915);"string"==typeof(f=f.__esModule?f.default:f)&&(f=[[h.id,f,""]]);k(f,{insert:"head",singleton:!1});h.exports=f.locals||{}},3313:function(h,k,f){k=f(487);f=f(9310);"string"==typeof(f=f.__esModule?f.default:f)&&(f=[[h.id,f,""]]);k(f,{insert:"head",singleton:!1});h.exports=f.locals||{}},8635:function(h,k,f){k=f(487);f=f(6464);"string"==typeof(f=f.__esModule?f.default:f)&&(f=[[h.id,f,""]]);k(f,{insert:"head",singleton:!1});h.exports=f.locals||{}},4404:function(h, k,f){k=f(487);f=f(5260);"string"==typeof(f=f.__esModule?f.default:f)&&(f=[[h.id,f,""]]);k(f,{insert:"head",singleton:!1});h.exports=f.locals||{}},487:function(h,k,f){function v(E){for(var aa=-1,M=0;M=E.length?{done:!0}:{done:!1,value:E[S++]}},e:function(da){throw da;},f:aa}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var D, O=!0,P=!1;return{s:function(){M=M.call(E)},n:function(){var da=M.next();return O=da.done,da},e:function(da){P=!0;D=da},f:function(){try{O||null==M.return||M.return()}finally{if(P)throw D;}}}}function x(E,aa){(null==aa||aa>E.length)&&(aa=E.length);for(var M=0,S=Array(aa);M=ba.length?{done:!0}:{done:!1,value:ba[N++]}},e:function(qa){throw qa;},f:H}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var ca,ia=!0,ea=!1;return{s:function(){ja=ja.call(ba)},n:function(){var qa=ja.next();return ia=qa.done,qa},e:function(qa){ea=!0;ca=qa},f:function(){try{ia|| null==ja.return||ja.return()}finally{if(ea)throw ca;}}}}function x(ba,H){(null==H||H>ba.length)&&(H=ba.length);for(var ja=0,N=Array(H);jaja.length?{type:"NOT_SPREADSHEET",reason:"Less than two rows"}:{type:T,spreadsheet:{title:H? ba[0][0]:null,labels:null,values:ja}}}H=E(ba,0);ja=E(ba,1);if(!H&&!ja)return{type:"NOT_SPREADSHEET",reason:"Value is not numeric"};H=(0,l.Z)(ja?[0,1]:[1,0],2);var N=H[0],ca=H[1];ja=(H=null===Z(ba[0][ca]))?ba.slice(1):ba;return 2>ja.length?{type:"NOT_SPREADSHEET",reason:"Less than 2 rows"}:{type:T,spreadsheet:{title:H?ba[0][ca]:null,labels:ja.map(function(ia){return ia[N]}),values:ja.map(function(ia){return Z(ia[ca])})}}},M=function(ba){var H=ba.trim().split("\n").map(function(N){return N.trim().split("\t")}); if(H.length&&2!==H[0].length&&(H=ba.trim().split("\n").map(function(N){return N.trim().split(",")})),0===H.length)return{type:"NOT_SPREADSHEET",reason:"No values"};var ja=H[0].length;if(!H.every(function(N){return N.length===ja}))return{type:"NOT_SPREADSHEET",reason:"All rows don't have same number of columns"};ba=aa(H);return ba.type!==T&&(H=aa(function(N){for(var ca=[],ia=0;iaz.length?z[0].substring(0,2).toUpperCase():(z[0][0]+z[z.length-1][0]).toUpperCase()}},6665:function(h,k,f){f.d(k,{dd:function(){return O},mQ:function(){return S},uR:function(){return D},vQ:function(){return E},vt:function(){return Z},wx:function(){return T}});var v=f(7169),x=f(8950);h=f(7945); var L=f.n(h),z=f(4162),u=f(5674),m=f(8288),l=f(1974),J=f(6340),X="",F=!1,ha="clipboard"in navigator&&"readText"in navigator.clipboard,T="clipboard"in navigator&&"writeText"in navigator.clipboard,Z="clipboard"in navigator&&"write"in navigator.clipboard&&"ClipboardItem"in window&&"toBlob"in HTMLCanvasElement.prototype,E=function(){var P=(0,x.Z)(L().mark(function N(ba,H,ja){var ca,ia;return L().wrap(function(ea){for(;;)switch(ea.prev=ea.next){case 0:return ca={type:m.r8.excalidrawClipboard,elements:ba, files:ja?ba.reduce(function(qa,za){return(0,l.wi)(za)&&ja[za.fileId]&&(qa[za.fileId]=ja[za.fileId]),qa},{}):void 0},ia=JSON.stringify(ca),X=ia,ea.prev=3,F=!1,ea.next=7,O(ia);case 7:ea.next=13;break;case 9:ea.prev=9,ea.t0=ea.catch(3),F=!0,console.error(ea.t0);case 13:case "end":return ea.stop()}},N,null,[[3,9]])}));return function(ba,H,ja){return P.apply(this,arguments)}}(),aa=function(){if(!X)return{};try{return JSON.parse(X)}catch(P){return console.error(P),{}}},M=function(){var P=(0,x.Z)(L().mark(function H(ba){var ja, N;return L().wrap(function(ca){for(;;)switch(ca.prev=ca.next){case 0:if(ca.prev=0,!ba){ca.next=5;break}ca.t0=null===(ja=ba.clipboardData)||void 0===ja?void 0:ja.getData("text/plain").trim();ca.next=11;break;case 5:if(ca.t1=ha,!ca.t1){ca.next=10;break}return ca.next=9,navigator.clipboard.readText();case 9:ca.t1=ca.sent;case 10:ca.t0=ca.t1;case 11:return N=ca.t0,ca.abrupt("return",N||"");case 15:return ca.prev=15,ca.t2=ca.catch(0),ca.abrupt("return","");case 18:case "end":return ca.stop()}},H,null, [[0,15]])}));return function(ba){return P.apply(this,arguments)}}(),S=function(){var P=(0,x.Z)(L().mark(function H(ba){var ja,N,ca,ia;return L().wrap(function(ea){for(;;)switch(ea.prev=ea.next){case 0:return ea.next=2,M(ba);case 2:if((ja=ea.sent)&&!ja.includes(z.oj)){ea.next=5;break}return ea.abrupt("return",aa());case 5:if(za=ja,ya=void 0,ya=(0,u.dz)(za),!(N=ya.type===u.i$?{spreadsheet:ya.spreadsheet}:null)){ea.next=8;break}return ea.abrupt("return",N);case 8:if(ca=aa(),ea.prev=9,ia=JSON.parse(ja), qa=ia,![m.r8.excalidraw,m.r8.excalidrawClipboard].includes(null==qa?void 0:qa.type)||!Array.isArray(qa.elements)){ea.next=13;break}return ea.abrupt("return",{elements:ia.elements,files:ia.files});case 13:return ea.abrupt("return",ca);case 16:return ea.prev=16,ea.t0=ea.catch(9),ea.abrupt("return",F&&ca.elements?ca:{text:ja});case 19:case "end":return ea.stop()}var qa,za,ya},H,null,[[9,16]])}));return function(ba){return P.apply(this,arguments)}}(),D=function(){var P=(0,x.Z)(L().mark(function H(ba){var ja; return L().wrap(function(N){for(;;)switch(N.prev=N.next){case 0:N.prev=0;ja=navigator.clipboard.write([new window.ClipboardItem((0,v.Z)({},m.LO.png,ba))]);N.next=23;break;case 4:if(N.prev=4,N.t0=N.catch(0),!(0,J.y8)(ba)){N.next=22;break}return N.t1=navigator.clipboard,N.t2=window.ClipboardItem,N.t3=v.Z,N.t4={},N.t5=m.LO.png,N.next=14,ba;case 14:return N.t6=N.sent,N.t7=(0,N.t3)(N.t4,N.t5,N.t6),N.t8=new N.t2(N.t7),N.t9=[N.t8],N.next=20,N.t1.write.call(N.t1,N.t9);case 20:N.next=23;break;case 22:throw N.t0; case 23:return N.next=25,ja;case 25:case "end":return N.stop()}},H,null,[[0,4]])}));return function(ba){return P.apply(this,arguments)}}(),O=function(){var P=(0,x.Z)(L().mark(function H(ba){var ja;return L().wrap(function(N){for(;;)switch(N.prev=N.next){case 0:if(ja=!1,!T){N.next=11;break}return N.prev=2,N.next=5,navigator.clipboard.writeText(ba||"");case 5:ja=!0;N.next=11;break;case 8:N.prev=8,N.t0=N.catch(2),console.error(N.t0);case 11:var ca;if(!(ca=ja)){var ia=ba||" ",ea="rtl"===document.documentElement.getAttribute("dir"); ca=document.createElement("textarea");ca.style.border="0";ca.style.padding="0";ca.style.margin="0";ca.style.position="absolute";ca.style[ea?"right":"left"]="-9999px";ca.style.top="".concat(window.pageYOffset||document.documentElement.scrollTop,"px");ca.style.fontSize="12pt";ca.setAttribute("readonly","");ca.value=ia;document.body.appendChild(ca);ia=!1;try{ca.select(),ca.setSelectionRange(0,ca.value.length),ia=document.execCommand("copy")}catch(qa){console.error(qa)}ca=(ca.remove(),ia)}if(ca){N.next= 13;break}throw Error("couldn't copy");case 13:case "end":return N.stop()}},H,null,[[2,8]])}));return function(ba){return P.apply(this,arguments)}}()},56:function(h,k,f){h=f(1930);var v=f(5284);f=function(x){return[v.red[x],v.pink[x],v.grape[x],v.violet[x],v.indigo[x],v.blue[x],v.cyan[x],v.teal[x],v.green[x],v.lime[x],v.yellow[x],v.orange[x]]};k.Z={canvasBackground:[v.white,v.gray[0],v.gray[1]].concat((0,h.Z)(f(0))),elementBackground:["transparent",v.gray[4],v.gray[6]].concat((0,h.Z)(f(6))),elementStroke:[v.black, v.gray[8],v.gray[7]].concat((0,h.Z)(f(9)))}},9660:function(h,k,f){function v(Rb,ec){var dc=Object.keys(Rb);if(Object.getOwnPropertySymbols){var ka=Object.getOwnPropertySymbols(Rb);ec&&(ka=ka.filter(function(Eb){return Object.getOwnPropertyDescriptor(Rb,Eb).enumerable}));dc.push.apply(dc,ka)}return dc}function x(Rb){for(var ec=1;ec=Rb.length?{done:!0}:{done:!1,value:Rb[ka++]}},e:function(yb){throw yb;},f:ec}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var Eb,Ub=!0,vb=!1;return{s:function(){dc=dc.call(Rb)},n:function(){var yb=dc.next();return Ub=yb.done,yb},e:function(yb){vb=!0;Eb=yb},f:function(){try{Ub||null==dc.return||dc.return()}finally{if(vb)throw Eb; }}}}function ba(Rb,ec){(null==ec||ec>Rb.length)&&(ec=Rb.length);for(var dc=0,ka=Array(ec);dc=Rb.length?{done:!0}:{done:!1, value:Rb[ka++]}},e:function(yb){throw yb;},f:ec}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var Eb,Ub=!0,vb=!1;return{s:function(){dc=dc.call(Rb)},n:function(){var yb=dc.next();return Ub=yb.done,yb},e:function(yb){vb=!0;Eb=yb},f:function(){try{Ub||null==dc.return||dc.return()}finally{if(vb)throw Eb;}}}}function za(Rb,ec){(null==ec||ec>Rb.length)&&(ec=Rb.length);for(var dc=0,ka=Array(ec);dc< ec;dc++)ka[dc]=Rb[dc];return ka}function ya(Rb,ec){var dc=Object.keys(Rb);if(Object.getOwnPropertySymbols){var ka=Object.getOwnPropertySymbols(Rb);ec&&(ka=ka.filter(function(Eb){return Object.getOwnPropertyDescriptor(Rb,Eb).enumerable}));dc.push.apply(dc,ka)}return dc}function Ha(Rb){for(var ec=1;ec=Rb.length?{done:!0}:{done:!1,value:Rb[ka++]}},e:function(yb){throw yb;},f:ec}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }var Eb,Ub=!0,vb=!1;return{s:function(){dc=dc.call(Rb)},n:function(){var yb=dc.next();return Ub=yb.done,yb},e:function(yb){vb=!0;Eb=yb},f:function(){try{Ub||null==dc.return||dc.return()}finally{if(vb)throw Eb;}}}}function jb(Rb,ec){(null==ec||ec>Rb.length)&&(ec=Rb.length);for(var dc=0,ka=Array(ec);dc=Rb.length?{done:!0}:{done:!1,value:Rb[ka++]}},e:function(yb){throw yb;},f:ec}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var Eb,Ub=!0,vb=!1;return{s:function(){dc=dc.call(Rb)},n:function(){var yb=dc.next();return Ub=yb.done,yb},e:function(yb){vb=!0;Eb=yb},f:function(){try{Ub|| null==dc.return||dc.return()}finally{if(vb)throw Eb;}}}}function Pc(Rb,ec){(null==ec||ec>Rb.length)&&(ec=Rb.length);for(var dc=0,ka=Array(ec);dc=Rb.length?{done:!0}:{done:!1,value:Rb[ka++]}},e:function(yb){throw yb;},f:ec}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var Eb,Ub=!0,vb=!1;return{s:function(){dc=dc.call(Rb)},n:function(){var yb=dc.next();return Ub=yb.done,yb},e:function(yb){vb=!0;Eb=yb},f:function(){try{Ub||null==dc.return||dc.return()}finally{if(vb)throw Eb;}}}}function Kd(Rb, ec){(null==ec||ec>Rb.length)&&(ec=Rb.length);for(var dc=0,ka=Array(ec);dcvb.points.length)return Rb=Rb.filter(function(yb){return yb.id!==vb.id}),{elements:Rb,appState:x(x({},Hd(ec,Rb)),{},{editingLinearElement:null}),commitToHistory:!1};dc={startBindingElement:null!=ka&&ka.includes(0)?null:Eb,endBindingElement:null!=ka&&ka.includes(vb.points.length-1)?null:Ub};return dd._.deletePoints(vb,ka),{elements:Rb,appState:x(x({},ec),{},{editingLinearElement:x(x(x({},ec.editingLinearElement),dc),{},{selectedPointsIndices:0< (null==ka?void 0:ka[0])?[ka[0]-1]:[0]})}),commitToHistory:!0}}dc=function(yb,Qb){return{elements:yb.map(function(sb){return Qb.selectedElementIds[sb.id]||(0,oe.Xh)(sb)&&Qb.selectedElementIds[sb.containerId]?(0,Lc.BE)(sb,{isDeleted:!0}):sb}),appState:x(x({},Qb),{},{selectedElementIds:{}})}}(Rb,ec);ka=dc.elements;dc=dc.appState;return(0,ve.$q)(ka,Rb.filter(function(yb){return ec.selectedElementIds[yb.id]})),{elements:ka,appState:x(x({},dc=Hd(dc,ka)),{},{activeTool:(0,Ec.Om)(ec,{type:"selection"}),multiElement:null}), commitToHistory:(0,qd.N)((0,Sb.Lm)(Rb),ec)}},contextItemLabel:"labels.delete",keyTest:function(Rb){return Rb.key===vc.tW.BACKSPACE||Rb.key===vc.tW.DELETE},PanelComponent:function(Rb){var ec=Rb.elements,dc=Rb.appState,ka=Rb.updateData;return(0,Bb.jsx)(Nc.V,{type:"button",icon:Ie._I,title:(0,qc.t)("labels.delete"),"aria-label":(0,qc.t)("labels.delete"),onClick:function(){return ka(null)},visible:(0,qd.N)((0,Sb.Lm)(ec),dc)})}}),pd=f(1564),mc=function(Rb,ec){var dc=[],ka=[],Eb=null,Ub=-1;for(ec=(0,Ec.xn)((0,qd.eD)(Rb, ec,!0));++Ubsb.points.length||(0,Sb.QD)(sb)?Rb.filter(function(Oc){return Oc.id!==sb.id}):void 0,appState:J(J({}, ec),{},{cursorButton:"up",editingLinearElement:null}),commitToHistory:!0}}(ka=ec.pendingImageElementId&&ka.getElement(ec.pendingImageElementId))&&(0,Lc.DR)(ka,{isDeleted:!0},!1);window.document.activeElement instanceof HTMLElement&&Ub();var Mb;if(Ub=ec.multiElement?ec.multiElement:"freedraw"===(null===(Eb=ec.editingElement)||void 0===Eb?void 0:Eb.type)?ec.editingElement:null){"freedraw"!==Ub.type&&"touch"!==ec.lastPointerDownWith&&(Eb=Ub.points,(ka=Ub.lastCommittedPoint)&&Eb[Eb.length-1]===ka||(0,Lc.DR)(Ub, {points:Ub.points.slice(0,-1)}));(0,Sb.QD)(Ub)&&(Rb=Rb.slice(0,-1));Eb=(0,Xd.g6)(Ub.points,ec.zoom.value);if(("line"===Ub.type||"freedraw"===Ub.type)&&Eb){var ac=Ub.points,Bc=ac[0];(0,Lc.DR)(Ub,{points:ac.map(function(Oc,Sc){return Sc===ac.length-1?[Bc[0],Bc[1]]:Oc})})}(0,oe.Mn)(Ub)&&!Eb&&1Ub.length)return{appState:Eb,elements:ka,commitToHistory:!1};var vb=(0,Vb.iJ)(Eb);if(1===vb.length){vb=new Set((0,Vb.Fb)(ka,vb[0]).map(function(Mb){return Mb.id}));var yb=new Set(Ub.map(function(Mb){return Mb.id})); if((new Set([].concat((0,td.Z)(Array.from(vb)),(0,td.Z)(Array.from(yb))))).size===vb.size)return{appState:Eb,elements:ka,commitToHistory:!1}}var Qb=(0,vh.kb)(),sb=(0,Ec.xn)(Ub);vb=ka.map(function(Mb){return sb.get(Mb.id)?(0,Lc.BE)(Mb,{groupIds:(0,Vb.S_)(Mb.groupIds,Qb,Eb.editingGroupId)}):Mb});ka=(0,Vb.Fb)(vb,Qb);yb=vb.lastIndexOf(ka[ka.length-1]);Ub=vb.slice(yb+1);vb=vb.slice(0,yb).filter(function(Mb){return!(0,Vb.Nd)(Mb,Qb)});ka=[].concat((0,td.Z)(vb),(0,td.Z)(ka),(0,td.Z)(Ub));return{appState:(0,Vb.F$)(Qb, P(P({},Eb),{},{selectedGroupIds:{}}),(0,Sb.Lm)(ka)),elements:ka,commitToHistory:!0}},contextItemLabel:"labels.group",contextItemPredicate:function(ka,Eb){return ri(ka,Eb)},keyTest:function(ka){return!ka.shiftKey&&ka[vc.tW.CTRL_OR_CMD]&&ka.code===vc.aU.G},PanelComponent:function(ka){var Eb=ka.elements,Ub=ka.appState,vb=ka.updateData;return(0,Bb.jsx)(Nc.V,{hidden:!ri(Eb,Ub),type:"button",icon:(0,Bb.jsx)(Ie.BF,{theme:Ub.theme}),onClick:function(){return vb(null)},title:"".concat((0,qc.t)("labels.group"), " — ").concat((0,Ec.uY)("CtrlOrCmd+G")),"aria-label":(0,qc.t)("labels.group"),visible:(0,qd.N)((0,Sb.Lm)(Eb),Ub)})}}),Bg=(0,He.z)({name:"ungroup",trackEvent:{category:"element"},perform:function(ka,Eb){if(0===(0,Vb.iJ)(Eb).length)return{appState:Eb,elements:ka,commitToHistory:!1};var Ub=[];ka=ka.map(function(yb){(0,oe.Xh)(yb)&&Ub.push(yb.id);var Qb=(0,Vb.h6)(yb.groupIds,Eb.selectedGroupIds);return Qb.length===yb.groupIds.length?yb:(0,Lc.BE)(yb,{groupIds:Qb})});var vb=(0,Vb.bO)(P(P({},Eb),{},{selectedGroupIds:{}}), (0,Sb.Lm)(ka));return Ub.forEach(function(yb){return vb.selectedElementIds[yb]=!1}),{appState:vb,elements:ka,commitToHistory:!0}},keyTest:function(ka){return ka.shiftKey&&ka[vc.tW.CTRL_OR_CMD]&&ka.code===vc.aU.G},contextItemLabel:"labels.ungroup",contextItemPredicate:function(ka,Eb){return 0<(0,Vb.iJ)(Eb).length},PanelComponent:function(ka){var Eb=ka.elements,Ub=ka.appState,vb=ka.updateData;return(0,Bb.jsx)(Nc.V,{type:"button",hidden:0===(0,Vb.iJ)(Ub).length,icon:(0,Bb.jsx)(Ie.RJ,{theme:Ub.theme}), onClick:function(){return vb(null)},title:"".concat((0,qc.t)("labels.ungroup")," — ").concat((0,Ec.uY)("CtrlOrCmd+Shift+G")),"aria-label":(0,qc.t)("labels.ungroup"),visible:(0,qd.N)((0,Sb.Lm)(Eb),Ub)})}}),Rh=f(8982),bf=(f(2789),function(ka){var Eb=ka.color,Ub=ka.border,vb=ka.onClick,yb=ka.src;ka=(0,Rh.f)(ka.name);var Qb=(0,Uc.useState)(!1);Qb=(0,Yd.Z)(Qb,2);var sb=Qb[1];Eb=(Qb=!Qb[0]&&yb)?void 0:{background:Eb,border:"1px solid ".concat(Ub)};return(0,Bb.jsx)("div",{className:"Avatar",style:Eb,onClick:vb, children:Qb?(0,Bb.jsx)("img",{className:"Avatar-img",src:yb,alt:ka,referrerPolicy:"no-referrer",onError:function(){return sb(!0)}}):ka})}),Sh=f(2264);(0,He.z)({name:"goToCollaborator",trackEvent:{category:"collab"},perform:function(ka,Eb,Ub){return Ub?{appState:ja(ja(ja({},Eb),(0,Sh.s)({scenePoint:Ub,viewportDimensions:{width:Eb.width,height:Eb.height},zoom:Eb.zoom})),{},{openMenu:"canvas"===Eb.openMenu?null:Eb.openMenu}),commitToHistory:!1}:{appState:Eb,commitToHistory:!1}},PanelComponent:function(ka){var Eb= ka.appState,Ub=ka.updateData;ka=(0,Yd.Z)(ka.data,2);var vb=ka[1];Eb=(0,Rh.X)(ka[0],Eb);return(0,Bb.jsx)(bf,{color:Eb.background,border:Eb.stroke,onClick:function(){return Ub(vb.pointer)},name:vb.username||"",src:vb.avatarUrl})}});var Fi=f(2791),Rl=(0,He.z)({name:"addToLibrary",trackEvent:{category:"element"},perform:function(ka,Eb,Ub,vb){var yb=(0,qd.eD)((0,Sb.Lm)(ka),Eb,!0);return yb.some(function(Qb){return"image"===Qb.type})?{commitToHistory:!1,appState:ca(ca({},Eb),{},{errorMessage:"Support for adding images to the library coming soon!"})}: vb.library.getLatestLibrary().then(function(Qb){return vb.library.setLibrary([{id:(0,vh.kb)(),status:"unpublished",elements:yb.map(Fi.OL),created:Date.now()}].concat((0,td.Z)(Qb)))}).then(function(){return{commitToHistory:!1,appState:ca(ca({},Eb),{},{toastMessage:(0,qc.t)("toast.addedToLibrary")})}}).catch(function(Qb){return{commitToHistory:!1,appState:ca(ca({},Eb),{},{errorMessage:Qb.message})}})},contextItemLabel:"labels.addToLibrary"}),Gj=f(8925),jg=function(ka,Eb,Ub){var vb=Ub.axis;Ub=Ub.position; ka=(0,Gj.v2)(ka);var yb=(0,Yd.Z)("x"===vb?["minX","maxX"]:["minY","maxY"],2),Qb=yb[0];yb=yb[1];return ea(ea({},{x:0,y:0}),{},"start"===Ub?(0,ld.Z)({},vb,Eb[Qb]-ka[Qb]):"end"===Ub?(0,ld.Z)({},vb,Eb[yb]-ka[yb]):(0,ld.Z)({},vb,(Eb[Qb]+Eb[yb])/2-(ka[Qb]+ka[yb])/2))},Xg=function(ka,Eb){return 1<(0,qd.eD)((0,Sb.Lm)(ka),Eb).length},Ik=function(ka,Eb,Ub){Eb=function(yb,Qb){var sb=(0,Vb.AI)(yb),Mb=(0,Gj.v2)(yb);return sb.flatMap(function(ac){var Bc=jg(ac,Mb,Qb);return ac.map(function(Oc){return(0,Lc.BE)(Oc, {x:Oc.x+Bc.x,y:Oc.y+Bc.y})})})}((0,qd.eD)((0,Sb.Lm)(ka),Eb),Ub);var vb=(0,Ec.xn)(Eb);return ka.map(function(yb){return vb.get(yb.id)||yb})};(0,He.z)({name:"alignTop",trackEvent:{category:"element"},perform:function(ka,Eb){return{appState:Eb,elements:Ik(ka,Eb,{position:"start",axis:"y"}),commitToHistory:!0}},keyTest:function(ka){return ka[vc.tW.CTRL_OR_CMD]&&ka.shiftKey&&ka.key===vc.tW.ARROW_UP},PanelComponent:function(ka){var Eb=ka.elements,Ub=ka.appState,vb=ka.updateData;return(0,Bb.jsx)(Nc.V,{hidden:!Xg(Eb, Ub),type:"button",icon:(0,Bb.jsx)(Ie.Ct,{theme:Ub.theme}),onClick:function(){return vb(null)},title:"".concat((0,qc.t)("labels.alignTop")," — ").concat((0,Ec.uY)("CtrlOrCmd+Shift+Up")),"aria-label":(0,qc.t)("labels.alignTop"),visible:(0,qd.N)((0,Sb.Lm)(Eb),Ub)})}});(0,He.z)({name:"alignBottom",trackEvent:{category:"element"},perform:function(ka,Eb){return{appState:Eb,elements:Ik(ka,Eb,{position:"end",axis:"y"}),commitToHistory:!0}},keyTest:function(ka){return ka[vc.tW.CTRL_OR_CMD]&&ka.shiftKey&&ka.key=== vc.tW.ARROW_DOWN},PanelComponent:function(ka){var Eb=ka.elements,Ub=ka.appState,vb=ka.updateData;return(0,Bb.jsx)(Nc.V,{hidden:!Xg(Eb,Ub),type:"button",icon:(0,Bb.jsx)(Ie.HL,{theme:Ub.theme}),onClick:function(){return vb(null)},title:"".concat((0,qc.t)("labels.alignBottom")," — ").concat((0,Ec.uY)("CtrlOrCmd+Shift+Down")),"aria-label":(0,qc.t)("labels.alignBottom"),visible:(0,qd.N)((0,Sb.Lm)(Eb),Ub)})}});(0,He.z)({name:"alignLeft",trackEvent:{category:"element"},perform:function(ka,Eb){return{appState:Eb, elements:Ik(ka,Eb,{position:"start",axis:"x"}),commitToHistory:!0}},keyTest:function(ka){return ka[vc.tW.CTRL_OR_CMD]&&ka.shiftKey&&ka.key===vc.tW.ARROW_LEFT},PanelComponent:function(ka){var Eb=ka.elements,Ub=ka.appState,vb=ka.updateData;return(0,Bb.jsx)(Nc.V,{hidden:!Xg(Eb,Ub),type:"button",icon:(0,Bb.jsx)(Ie.xs,{theme:Ub.theme}),onClick:function(){return vb(null)},title:"".concat((0,qc.t)("labels.alignLeft")," — ").concat((0,Ec.uY)("CtrlOrCmd+Shift+Left")),"aria-label":(0,qc.t)("labels.alignLeft"), visible:(0,qd.N)((0,Sb.Lm)(Eb),Ub)})}});(0,He.z)({name:"alignRight",trackEvent:{category:"element"},perform:function(ka,Eb){return{appState:Eb,elements:Ik(ka,Eb,{position:"end",axis:"x"}),commitToHistory:!0}},keyTest:function(ka){return ka[vc.tW.CTRL_OR_CMD]&&ka.shiftKey&&ka.key===vc.tW.ARROW_RIGHT},PanelComponent:function(ka){var Eb=ka.elements,Ub=ka.appState,vb=ka.updateData;return(0,Bb.jsx)(Nc.V,{hidden:!Xg(Eb,Ub),type:"button",icon:(0,Bb.jsx)(Ie.mh,{theme:Ub.theme}),onClick:function(){return vb(null)}, title:"".concat((0,qc.t)("labels.alignRight")," — ").concat((0,Ec.uY)("CtrlOrCmd+Shift+Right")),"aria-label":(0,qc.t)("labels.alignRight"),visible:(0,qd.N)((0,Sb.Lm)(Eb),Ub)})}});(0,He.z)({name:"alignVerticallyCentered",trackEvent:{category:"element"},perform:function(ka,Eb){return{appState:Eb,elements:Ik(ka,Eb,{position:"center",axis:"y"}),commitToHistory:!0}},PanelComponent:function(ka){var Eb=ka.elements,Ub=ka.appState,vb=ka.updateData;return(0,Bb.jsx)(Nc.V,{hidden:!Xg(Eb,Ub),type:"button",icon:(0,Bb.jsx)(Ie.ST, {theme:Ub.theme}),onClick:function(){return vb(null)},title:(0,qc.t)("labels.centerVertically"),"aria-label":(0,qc.t)("labels.centerVertically"),visible:(0,qd.N)((0,Sb.Lm)(Eb),Ub)})}});(0,He.z)({name:"alignHorizontallyCentered",trackEvent:{category:"element"},perform:function(ka,Eb){return{appState:Eb,elements:Ik(ka,Eb,{position:"center",axis:"x"}),commitToHistory:!0}},PanelComponent:function(ka){var Eb=ka.elements,Ub=ka.appState,vb=ka.updateData;return(0,Bb.jsx)(Nc.V,{hidden:!Xg(Eb,Ub),type:"button", icon:(0,Bb.jsx)(Ie.gK,{theme:Ub.theme}),onClick:function(){return vb(null)},title:(0,qc.t)("labels.centerHorizontally"),"aria-label":(0,qc.t)("labels.centerHorizontally"),visible:(0,qd.N)((0,Sb.Lm)(Eb),Ub)})}});var Xh=function(ka,Eb){return 1<(0,qd.eD)((0,Sb.Lm)(ka),Eb).length},dk=function(ka,Eb,Ub){Eb=function(yb,Qb){var sb,Mb=(0,Yd.Z)("x"===Qb.axis?["minX","midX","maxX","width"]:["minY","midY","maxY","height"],4),ac=Mb[0],Bc=Mb[1],Oc=Mb[2],Sc=Mb[3],xd=(0,Gj.v2)(yb);yb=(0,Vb.AI)(yb).map(function(We){return[We, (0,Gj.v2)(We)]}).sort(function(We,Me){return We[1][Bc]-Me[1][Bc]});Mb=0;var Rd=qa(yb);try{for(Rd.s();!(sb=Rd.n()).done;)Mb+=sb.value[1][Sc]}catch(We){Rd.e(We)}finally{Rd.f()}var Ed=(xd[Sc]-Mb)/(yb.length-1);if(0>Ed){var Bd=yb.findIndex(function(We){return We[1][ac]===xd[ac]}),Gd=yb.findIndex(function(We){return We[1][Oc]===xd[Oc]}),ze=(yb[Gd][1][Bc]-yb[Bd][1][Bc])/(yb.length-1),Zf=yb[Bd][1][Bc];return yb.flatMap(function(We,Me){var Oe=(0,Yd.Z)(We,2);We=Oe[0];Oe=Oe[1];var tg={x:0,y:0};return Me!== Bd&&Me!==Gd&&(Zf+=ze,tg[Qb.axis]=Zf-Oe[Bc]),We.map(function(Vf){return(0,Lc.BE)(Vf,{x:Vf.x+tg.x,y:Vf.y+tg.y})})})}var xe=xd[ac];return yb.flatMap(function(We){var Me=(0,Yd.Z)(We,2);We=Me[0];Me=Me[1];var Oe={x:0,y:0};return Oe[Qb.axis]=xe-Me[ac],xe+=Ed,xe+=Me[Sc],We.map(function(tg){return(0,Lc.BE)(tg,{x:tg.x+Oe.x,y:tg.y+Oe.y})})})}((0,qd.eD)((0,Sb.Lm)(ka),Eb),Ub);var vb=(0,Ec.xn)(Eb);return ka.map(function(yb){return vb.get(yb.id)||yb})},ek=((0,He.z)({name:"distributeHorizontally",trackEvent:{category:"element"}, perform:function(ka,Eb){return{appState:Eb,elements:dk(ka,Eb,{space:"between",axis:"x"}),commitToHistory:!0}},keyTest:function(ka){return!ka[vc.tW.CTRL_OR_CMD]&&ka.altKey&&ka.code===vc.aU.H},PanelComponent:function(ka){var Eb=ka.elements,Ub=ka.appState,vb=ka.updateData;return(0,Bb.jsx)(Nc.V,{hidden:!Xh(Eb,Ub),type:"button",icon:(0,Bb.jsx)(Ie.uD,{theme:Ub.theme}),onClick:function(){return vb(null)},title:"".concat((0,qc.t)("labels.distributeHorizontally")," — ").concat((0,Ec.uY)("Alt+H")),"aria-label":(0,qc.t)("labels.distributeHorizontally"), visible:(0,qd.N)((0,Sb.Lm)(Eb),Ub)})}}),(0,He.z)({name:"distributeVertically",trackEvent:{category:"element"},perform:function(ka,Eb){return{appState:Eb,elements:dk(ka,Eb,{space:"between",axis:"y"}),commitToHistory:!0}},keyTest:function(ka){return!ka[vc.tW.CTRL_OR_CMD]&&ka.altKey&&ka.code===vc.aU.V},PanelComponent:function(ka){var Eb=ka.elements,Ub=ka.appState,vb=ka.updateData;return(0,Bb.jsx)(Nc.V,{hidden:!Xh(Eb,Ub),type:"button",icon:(0,Bb.jsx)(Ie.W5,{theme:Ub.theme}),onClick:function(){return vb(null)}, title:"".concat((0,qc.t)("labels.distributeVertically")," — ").concat((0,Ec.uY)("Alt+V")),"aria-label":(0,qc.t)("labels.distributeVertically"),visible:(0,qd.N)((0,Sb.Lm)(Eb),Ub)})}}),f(8634)),Jk=f(267),wh=(0,He.z)({name:"flipHorizontal",trackEvent:{category:"element"},perform:function(ka,Eb){return{elements:Mj(ka,Eb,"horizontal"),appState:Eb,commitToHistory:!0}},keyTest:function(ka){return ka.shiftKey&&"KeyH"===ka.code},contextItemLabel:"labels.flipHorizontal",contextItemPredicate:function(ka,Eb){ka= (0,qd.eD)((0,Sb.Lm)(ka),Eb);return 1===ka.length&&"text"!==ka[0].type}}),si=(0,He.z)({name:"flipVertical",trackEvent:{category:"element"},perform:function(ka,Eb){return{elements:Mj(ka,Eb,"vertical"),appState:Eb,commitToHistory:!0}},keyTest:function(ka){return ka.shiftKey&&"KeyV"===ka.code},contextItemLabel:"labels.flipVertical",contextItemPredicate:function(ka,Eb){return 1===(0,qd.eD)((0,Sb.Lm)(ka),Eb).length}}),Mj=function(ka,Eb,Ub){var vb=(0,qd.eD)((0,Sb.Lm)(ka),Eb);if(1sb&&(sb=(0,ek.LW)(2*Math.PI+sb));(0,Lc.DR)(vb,{angle:sb});(0,Lc.DR)(vb,{x:yb,y:Qb})}}),ka},ui=function(ka,Eb){var Ub=ka.x,vb=ka.y,yb=ka.width,Qb=ka.height,sb=(0,ek.LW)(ka.angle),Mb=0;((0,oe.bt)(ka)||(0,oe.F9)(ka))&&(Mb=2*ka.points.reduce(function(Sc,xd){return Math.max(Sc,xd[0])}, 0)-ka.width);(0,Lc.DR)(ka,{angle:(0,ek.LW)(0)});Eb=(0,Jk.PC)(ka,Eb.zoom);var ac=!0,Bc=0,Oc=Eb.nw;if(Oc||(ac=!1,Oc=Eb.ne)){if((0,oe.bt)(ka)){for(yb=1;ybsb&&(sb=(0,ek.LW)(sb+2*Math.PI));(0,Lc.DR)(ka,{angle:sb});(0,Lc.DR)(ka, {x:Ub+Mb,y:vb});(0,ve.Ww)(ka)}else(0,Lc.DR)(ka,{angle:sb})},Hj=f(1868),Nj=(0,He.z)({name:"copy",trackEvent:{category:"element"},perform:function(ka,Eb,Ub,vb){ka=(0,Hj.eD)(ka,Eb,!0);return(0,uf.vQ)(ka,Eb,vb.files),{commitToHistory:!1}},contextItemLabel:"labels.copy",keyTest:void 0}),Bl=(0,He.z)({name:"cut",trackEvent:{category:"element"},perform:function(ka,Eb,Ub,vb){return Nj.perform(ka,Eb,Ub,vb),ee.perform(ka,Eb)},contextItemLabel:"labels.cut",keyTest:function(ka){return ka[vc.tW.CTRL_OR_CMD]&&ka.code=== vc.aU.X}}),pl=(0,He.z)({name:"copyAsSvg",trackEvent:{category:"element"},perform:function(){var ka=(0,Qd.Z)(uc().mark(function sb(Ub,vb,yb,Qb){var Mb;return uc().wrap(function(ac){for(;;)switch(ac.prev=ac.next){case 0:if(Qb.canvas){ac.next=2;break}return ac.abrupt("return",{commitToHistory:!1});case 2:return Mb=(0,Hj.eD)((0,Sb.Lm)(Ub),vb,!0),ac.prev=3,ac.next=6,bb("clipboard-svg",Mb.length?Mb:(0,Sb.Lm)(Ub),vb,Qb.files,vb);case 6:return ac.abrupt("return",{commitToHistory:!1});case 9:return ac.prev= 9,ac.t0=ac.catch(3),console.error(ac.t0),ac.abrupt("return",{appState:Ha(Ha({},vb),{},{errorMessage:ac.t0.message}),commitToHistory:!1});case 13:case "end":return ac.stop()}},sb,null,[[3,9]])}));return function(Ub,vb,yb,Qb){return ka.apply(this,arguments)}}(),contextItemLabel:"labels.copyAsSvg"}),Sl=(0,He.z)({name:"copyAsPng",trackEvent:{category:"element"},perform:function(){var ka=(0,Qd.Z)(uc().mark(function sb(Ub,vb,yb,Qb){var Mb;return uc().wrap(function(ac){for(;;)switch(ac.prev=ac.next){case 0:if(Qb.canvas){ac.next= 2;break}return ac.abrupt("return",{commitToHistory:!1});case 2:return Mb=(0,Hj.eD)((0,Sb.Lm)(Ub),vb,!0),ac.prev=3,ac.next=6,bb("clipboard",Mb.length?Mb:(0,Sb.Lm)(Ub),vb,Qb.files,vb);case 6:return ac.abrupt("return",{appState:Ha(Ha({},vb),{},{toastMessage:(0,qc.t)("toast.copyToClipboardAsPng",{exportSelection:Mb.length?(0,qc.t)("toast.selection"):(0,qc.t)("toast.canvas"),exportColorScheme:vb.exportWithDarkMode?(0,qc.t)("buttons.darkMode"):(0,qc.t)("buttons.lightMode")})}),commitToHistory:!1});case 9:return ac.prev= 9,ac.t0=ac.catch(3),console.error(ac.t0),ac.abrupt("return",{appState:Ha(Ha({},vb),{},{errorMessage:ac.t0.message}),commitToHistory:!1});case 13:case "end":return ac.stop()}},sb,null,[[3,9]])}));return function(Ub,vb,yb,Qb){return ka.apply(this,arguments)}}(),contextItemLabel:"labels.copyAsPng",keyTest:function(ka){return ka.code===vc.aU.C&&ka.altKey&&ka.shiftKey}}),gk=(0,He.z)({name:"copyText",trackEvent:{category:"element"},perform:function(ka,Eb){ka=(0,Hj.eD)((0,Sb.Lm)(ka),Eb,!0).reduce(function(Ub, vb){return(0,Sb.iB)(vb)&&Ub.push(vb.text),Ub},[]).join("\n\n");return(0,uf.dd)(ka),{commitToHistory:!1}},contextItemPredicate:function(ka,Eb){return uf.wx&&(0,Hj.eD)(ka,Eb,!0).some(Sb.iB)},contextItemLabel:"labels.copyText"}),hk=(0,He.z)({name:"gridMode",trackEvent:{category:"canvas",predicate:function(ka){return!ka.gridSize}},perform:function(ka,Eb){return{appState:Ea(Ea({},Eb),{},{gridSize:this.checked(Eb)?null:kb.k}),commitToHistory:!1}},checked:function(ka){return null!==ka.gridSize},contextItemLabel:"labels.showGrid", keyTest:function(ka){return ka[vc.tW.CTRL_OR_CMD]&&ka.code===vc.aU.QUOTE}}),xk=(0,He.z)({name:"zenMode",trackEvent:{category:"canvas",predicate:function(ka){return!ka.zenModeEnabled}},perform:function(ka,Eb){return{appState:Xa(Xa({},Eb),{},{zenModeEnabled:!this.checked(Eb)}),commitToHistory:!1}},checked:function(ka){return ka.zenModeEnabled},contextItemLabel:"buttons.zenMode",keyTest:function(ka){return!ka[vc.tW.CTRL_OR_CMD]&&ka.altKey&&ka.code===vc.aU.Z}}),Ye=(0,He.z)({name:"stats",trackEvent:{category:"menu"}, perform:function(ka,Eb){return{appState:eb(eb({},Eb),{},{showStats:!this.checked(Eb)}),commitToHistory:!1}},checked:function(ka){return ka.showStats},contextItemLabel:"stats.title",keyTest:function(ka){return!ka[vc.tW.CTRL_OR_CMD]&&ka.altKey&&ka.code===vc.aU.SLASH}}),vg=(0,He.z)({name:"unbindText",contextItemLabel:"labels.unbindText",trackEvent:{category:"element"},contextItemPredicate:function(ka,Eb){return(0,qd.eD)(ka,Eb).some(function(Ub){return(0,oe.Xo)(Ub)})},perform:function(ka,Eb){return(0,qd.eD)((0,Sb.Lm)(ka), Eb).forEach(function(Ub){var vb=(0,gd.WJ)(Ub);if(vb){var yb,Qb=(0,gd.X1)(vb.originalText,(0,Ec.mO)(vb));(0,Lc.DR)(vb,{containerId:null,width:Qb.width,height:Qb.height,baseline:Qb.baseline,text:vb.originalText});(0,Lc.DR)(Ub,{boundElements:null===(yb=Ub.boundElements)||void 0===yb?void 0:yb.filter(function(sb){return sb.id!==vb.id})})}}),{elements:ka,appState:Eb,commitToHistory:!0}}}),qj=(0,He.z)({name:"bindText",contextItemLabel:"labels.bindText",trackEvent:{category:"element"},contextItemPredicate:function(ka, Eb){ka=(0,qd.eD)(ka,Eb);if(2===ka.length){var Ub;Eb=(0,Sb.iB)(ka[0])||(0,Sb.iB)(ka[1]);if((0,oe.mG)(ka[0])?Ub=ka[0]:(0,oe.mG)(ka[1])&&(Ub=ka[1]),Eb&&Ub&&null===(0,gd.WJ)(Ub))return!0}return!1},perform:function(ka,Eb){var Ub,vb,yb=(0,qd.eD)((0,Sb.Lm)(ka),Eb);(0,Sb.iB)(yb[0])&&(0,oe.mG)(yb[1])?(Ub=yb[0],vb=yb[1]):(Ub=yb[1],vb=yb[0]);(0,Lc.DR)(Ub,{containerId:vb.id,verticalAlign:kb.oX.MIDDLE});(0,Lc.DR)(vb,{boundElements:(vb.boundElements||[]).concat({type:"text",id:Ub.id})});(0,gd.oN)(Ub,vb);ka=ka.slice(); yb=ka.findIndex(function(Qb){return Qb.id===Ub.id});ka.splice(yb,1);yb=ka.findIndex(function(Qb){return Qb.id===vb.id});return ka.splice(yb+1,0,Ub),{elements:ka,appState:Na(Na({},Eb),{},{selectedElementIds:(0,ld.Z)({},vb.id,!0)}),commitToHistory:!0}}}),Eh=f(2383),Gi=(0,He.z)({name:"toggleLock",trackEvent:{category:"element"},perform:function(ka,Eb){var Ub=(0,qd.eD)(ka,Eb,!0);if(!Ub.length)return!1;var vb=Nh(Ub),yb=(0,Ec.xn)(Ub);return{elements:ka.map(function(Qb){return yb.has(Qb.id)?(0,Lc.BE)(Qb, {locked:"lock"===vb}):Qb}),appState:Eb,commitToHistory:!0}},contextItemLabel:function(ka,Eb){ka=(0,qd.eD)(ka,Eb,!1);if(1===ka.length)return ka[0].locked?"labels.elementLock.unlock":"labels.elementLock.lock";if(1Qb.points.length)return yb;yb.push(Aa(Aa({},Qb),{},{points:Qb.lastCommittedPoint!==Qb.points[Qb.points.length-1]?Qb.points.slice(0,-1):Qb.points}))}else yb.push(Qb);return yb},[])})}} return(0,Nb.Z)(ka,[{key:"hydrateHistoryEntry",value:function(Eb){var Ub=this,vb=Eb.elements;return{appState:JSON.parse(Eb.appState),elements:vb.map(function(yb){var Qb,sb=null===(Qb=Ub.elementCache.get(yb.id))||void 0===Qb?void 0:Qb.get(yb.versionNonce);if(!sb)throw Error("Element not found: ".concat(yb.id,":").concat(yb.versionNonce));return sb})}}},{key:"dehydrateHistoryEntry",value:function(Eb){var Ub=this,vb=Eb.elements;return{appState:JSON.stringify(Eb.appState),elements:vb.map(function(yb){Ub.elementCache.has(yb.id)|| Ub.elementCache.set(yb.id,new Map);var Qb=Ub.elementCache.get(yb.id);return Qb.has(yb.versionNonce)||Qb.set(yb.versionNonce,(0,Fi.OL)(yb)),{id:yb.id,versionNonce:yb.versionNonce}})}}},{key:"getSnapshotForTest",value:function(){var Eb=this;return{recording:this.recording,stateHistory:this.stateHistory.map(function(Ub){return Eb.hydrateHistoryEntry(Ub)}),redoStack:this.redoStack.map(function(Ub){return Eb.hydrateHistoryEntry(Ub)})}}},{key:"clear",value:function(){this.stateHistory.length=0;this.redoStack.length= 0;this.lastEntry=null;this.elementCache.clear()}},{key:"shouldCreateEntry",value:function(Eb){var Ub,vb=this.lastEntry;if(!vb||Eb.elements.length!==vb.elements.length)return!0;for(var yb=Eb.elements.length-1;-1=th&&Ql<=ji||ck.has(tk.id))&&zi.push(tk.id),zi},[]);Zf(ch)}else Zf([].concat((0,td.Z)(ze),[pg]));og(pg)}else og(null),Zf(ze.filter(function(zi){return zi!== pg}))},Rg=function(pg){return ze.includes(pg)?Qb.filter(function(ch){return ze.includes(ch.id)}):Qb.filter(function(ch){return ch.id===pg})},Tg=function(pg){var ch,Qf,aj,th,ji;return(0,Bb.jsx)(kd,{children:(0,Bb.jsx)(rl,{elements:null===(ch=pg.item)||void 0===ch?void 0:ch.elements,files:Bd,isPending:!(null!==(Qf=pg.item)&&void 0!==Qf&&Qf.id||null===(aj=pg.item)||void 0===aj||!aj.elements),onClick:pg.onClick||function(){},id:(null===(th=pg.item)||void 0===th?void 0:th.id)||null,selected:!(null===(ji= pg.item)||void 0===ji||!ji.id)&&ze.includes(pg.item.id),onToggle:mh,onDrag:function(ck,zi){zi.dataTransfer.setData(kb.LO.excalidrawlib,(0,Ia.NI)(Rg(ck)))}})},pg.key)};Oe=function(pg){pg=pg.map(function(ch){return ch.id?Tg({item:ch,onClick:function(){return ac(Rg(ch.id))},key:ch.id}):Tg({key:"__pending__item__",item:ch,onClick:function(){return Mb(Bc)}})});pg=(0,ul.chunk)(pg,cj);return pg.length||(pg=[[]]),pg.map(function(ch,Qf,aj){return Qf===aj.length-1&&(ch=ch.concat(Array(cj-ch.length).fill(null).map(function(th, ji){return Tg({key:"empty_".concat(ji),item:null})}))),(0,Bb.jsx)(Rc,{align:"center",gap:1,children:ch},Qf)})};var bh=Qb.filter(function(pg){return"published"!==pg.status}),Dg=Qb.filter(function(pg){return"published"===pg.status});return(0,Bb.jsxs)("div",{className:"library-menu-items-container",style:Vf.isMobile?{minHeight:"200px",maxHeight:"70vh"}:void 0,children:[Me&&ka(),(0,Bb.jsx)(Bb.Fragment,{children:(0,Bb.jsxs)("div",{className:"layer-ui__library-header",children:[(Eb=!!ze.length,Ub=Eb?Qb.filter(function(pg){return ze.includes(pg.id)}): Qb,vb=Eb?(0,qc.t)("buttons.remove"):(0,qc.t)("buttons.resetLibrary"),(0,Bb.jsxs)("div",{className:"library-actions",children:[!Eb&&(0,Bb.jsx)(Nc.V,{type:"button",title:(0,qc.t)("buttons.load"),"aria-label":(0,qc.t)("buttons.load"),icon:Ie.zD,onClick:(0,Qd.Z)(uc().mark(function ch(){return uc().wrap(function(Qf){for(;;)switch(Qf.prev=Qf.next){case 0:return Qf.prev=0,Qf.next=3,Ed.updateLibrary({libraryItems:(0,ra.I$)({description:"Excalidraw library files"}),merge:!0,openLibraryMenu:!0});case 3:Qf.next= 11;break;case 5:if(Qf.prev=5,Qf.t0=Qf.catch(0),"AbortError"!==(null===Qf.t0||void 0===Qf.t0?void 0:Qf.t0.name)){Qf.next=10;break}return console.warn(Qf.t0),Qf.abrupt("return");case 10:Sc({errorMessage:(0,qc.t)("errors.importLibraryError")});case 11:case "end":return Qf.stop()}},ch,null,[[0,5]])})),className:"library-actions--load"},"import"),!!Ub.length&&(0,Bb.jsxs)(Bb.Fragment,{children:[(0,Bb.jsx)(Nc.V,{type:"button",title:(0,qc.t)("buttons.export"),"aria-label":(0,qc.t)("buttons.export"),icon:Ie.TP, onClick:(0,Qd.Z)(uc().mark(function Qf(){var aj;return uc().wrap(function(th){for(;;)switch(th.prev=th.next){case 0:if(!Eb){th.next=4;break}th.t0=Ub;th.next=7;break;case 4:return th.next=6,Ed.getLatestLibrary();case 6:th.t0=th.sent;case 7:aj=th.t0,(0,Ia.t1)(aj).catch(Ec.FG).catch(function(ji){Sc({errorMessage:ji.message})});case 9:case "end":return th.stop()}},Qf)})),className:"library-actions--export",children:0Mb.length)return!1;var ac=10/this.state.zoom.value;Mb=(0,Sb.KP)(Mb); Mb=(0,Yd.Z)(Mb,4);var Bc=Mb[1],Oc=Mb[2],Sc=Mb[3];return sb.x>Mb[0]-ac&&sb.xBc-ac&&sb.y(null!=ka.props.UIOptions.dockedSidebarBreakpoint?ka.props.UIOptions.dockedSidebarBreakpoint:kb.sk)})};this.onResize=(0,Ec.tH)(function(){ka.scene.getElementsIncludingDeleted().forEach(function(Ub){return(0,jk.bI)(Ub)});ka.setState({})});this.onScroll=(0,Ec.Ds)(function(){var Ub=ka.getCanvasOffsets(),vb=Ub.offsetTop,yb=Ub.offsetLeft;ka.setState(function(Qb){return Qb.offsetLeft=== yb&&Qb.offsetTop===vb?null:{offsetTop:vb,offsetLeft:yb}})},kb.HM);this.onCut=(0,Ec.tH)(function(Ub){var vb;(null===(vb=ka.excalidrawContainerRef.current)||void 0===vb?0:vb.contains(document.activeElement))&&!(0,Ec.s)(Ub.target)&&(ka.cutAll(),Ub.preventDefault(),Ub.stopPropagation())});this.onCopy=(0,Ec.tH)(function(Ub){var vb;(null===(vb=ka.excalidrawContainerRef.current)||void 0===vb?0:vb.contains(document.activeElement))&&!(0,Ec.s)(Ub.target)&&(ka.copyAll(),Ub.preventDefault(),Ub.stopPropagation())}); this.cutAll=function(){ka.actionManager.executeAction(Bl,"keyboard")};this.copyAll=function(){ka.actionManager.executeAction(Nj,"keyboard")};this.onTapStart=function(Ub){if(vc.Dt||Ub.preventDefault(),!zh)return zh=!0,clearTimeout(Zg),void(Zg=window.setTimeout(Kj.resetTapTwice,kb.Gj));if(zh&&1===Ub.touches.length){var vb=(0,Yd.Z)(Ub.touches,1)[0];ka.handleCanvasDoubleClick({clientX:vb.clientX,clientY:vb.clientY});zh=!1;clearTimeout(Zg)}vc.Dt&&Ub.preventDefault();2===Ub.touches.length&&ka.setState({selectedElementIds:{}})}; this.onTapEnd=function(Ub){ka.resetContextMenuTimer();0kb.f||!yb&&0!==Qb)&&(yb=(0,Ec.dE)(ka.lastPointerDown,ka.state),yb=(0,Eh.wq)(ka.hitLinkElement,ka.state,[yb.x,yb.y],ka.device.isMobile),Qb=(0,Ec.dE)(ka.lastPointerUp,ka.state),Qb=(0,Eh.wq)(ka.hitLinkElement, ka.state,[Qb.x,Qb.y],ka.device.isMobile),yb&&Qb)){var sb,Mb;(yb=ka.hitLinkElement.link)&&(ka.props.onLinkOpen&&(Mb=(0,Ec.ag)(kb.Ks.EXCALIDRAW_LINK,vb.nativeEvent),ka.props.onLinkOpen(ka.hitLinkElement,Mb)),null===(sb=Mb)||void 0===sb||!sb.defaultPrevented)&&(vb=(0,Eh.q$)(yb)?"_self":"_blank",(vb=window.open(void 0,vb))&&(vb.opener=null,vb.location=(0,Eh.$u)(yb)))}};this.handleCanvasPointerMove=function(vb){ka.savePointer(vb.clientX,vb.clientY,ka.state.cursorButton);mi.has(vb.pointerId)&&mi.set(vb.pointerId, {x:vb.clientX,y:vb.clientY});var yb=lh;if(2===mi.size&&ph&&yb&&xg){var Qb=bl(mi),sb=Qb.x-ph.x,Mb=Qb.y-ph.y;ph=Qb;var ac=yk(Array.from(mi.values())),Bc=(ac="freedraw"===ka.state.activeTool.type&&ka.state.penMode?1:ac/xg)?(0,qd.j)(yb*ac):ka.state.zoom.value;ka.setState(function(Bd){Bd=(0,Ci.E)({viewportX:Qb.x,viewportY:Qb.y,nextZoom:Bc},Bd);return{zoom:Bd.zoom,scrollX:Bd.scrollX+sb/Bc,scrollY:Bd.scrollY+Mb/Bc,shouldCacheIgnoreZoom:!0}});ka.resetShouldCacheIgnoreZoomDebounced()}else ph=xg=lh=null;if(!(Lh|| Wi||Cg)){var Oc=(0,qd._4)(Xi,vb.clientX-ka.state.offsetLeft,vb.clientY-ka.state.offsetTop).isOverEither;ka.state.draggingElement||ka.state.multiElement||(Oc?(0,Ec.z8)(ka.canvas):(0,Ec.Uk)(ka.canvas,ka.state));var Sc=(0,Ec.dE)(vb,ka.state);yb=Sc.x;ac=Sc.y;if(ka.state.editingLinearElement&&!ka.state.editingLinearElement.isDragging){var xd=dd._.handlePointerMove(vb,yb,ac,ka.state.editingLinearElement,ka.state.gridSize);xd!==ka.state.editingLinearElement&&ka.setState({editingLinearElement:xd});null!= xd.lastUncommittedPoint?ka.maybeSuggestBindingAtCursor(Sc):ka.setState({suggestedBindings:[]})}(0,oe.Lx)(ka.state.activeTool.type)&&(xd=ka.state.draggingElement,(0,oe.Mn)(xd,!1)?ka.maybeSuggestBindingsForLinearElementAtCoords(xd,[Sc],ka.state.startBoundElement):ka.maybeSuggestBindingAtCursor(Sc));if(ka.state.multiElement){vb=ka.state.multiElement;Sc=vb.x;Oc=vb.y;xd=vb.points;var Rd=vb.lastCommittedPoint,Ed=xd[xd.length-1];return(0,Ec.Uk)(ka.canvas,ka.state),void(Ed===Rd?(0,Xd.LW)(yb-Sc,ac-Oc,Ed[0], Ed[1])>=kb.qx?(0,Lc.DR)(vb,{points:[].concat((0,td.Z)(xd),[[yb-Sc,ac-Oc]])}):(0,Ec.KJ)(ka.canvas,kb.oc.POINTER):2= mi.size&&(vb.button===kb.Oh.WHEEL||vb.button===kb.Oh.MAIN&&Lh||ka.state.viewModeEnabled))||(0,Sb.iB)(ka.state.editingElement))return!1;Wi=!0;vb.preventDefault();var yb=!1,Qb=/Linux/.test(window.navigator.platform);(0,Ec.KJ)(ka.canvas,kb.oc.GRABBING);var sb=vb.clientX,Mb=vb.clientY,ac=(0,Ec.$9)(function(Oc){var Sc=sb-Oc.clientX,xd=Mb-Oc.clientY;if(sb=Oc.clientX,Mb=Oc.clientY,Qb&&!yb&&(1kb.$n)){Oe.next=42;break}throw Error((0,qc.t)("errors.fileTooBig",{maxSize:"".concat(Math.trunc(kb.$n/1024/1024),"MB")}));case 42:if(Rd&&(Zf=null===(ze=ka.files[Bd])|| void 0===ze?void 0:ze.dataURL,xe=Zf&&(0,ta.KG)(Zf),ka.setImagePreviewCursor(xe||Oc)),Oe.t7=null===(Bc=ka.files[Bd])||void 0===Bc?void 0:Bc.dataURL,Oe.t7){Oe.next=48;break}return Oe.next=47,(0,ta.Sf)(Oc);case 47:Oe.t7=Oe.sent;case 48:return We=Oe.t7,Me=(0,Lc.DR)(Sc,{fileId:Bd},!1),Oe.abrupt("return",new Promise(function(){var tg=(0,Qd.Z)(uc().mark(function og(cj,Tf){var mh,Rg;return uc().wrap(function(Tg){for(;;)switch(Tg.prev=Tg.next){case 0:if(Tg.prev=0,ka.files=pc(pc({},ka.files),{},(0,ld.Z)({}, Bd,{mimeType:Ed,id:Bd,dataURL:We,created:Date.now()})),Rg=ka.imageCache.get(Bd)){Tg.next=7;break}return ka.addNewImagesToImageCache(),Tg.next=7,ka.updateImageCache([Me]);case 7:if(!((null==Rg?void 0:Rg.image)instanceof Promise)){Tg.next=10;break}return Tg.next=10,Rg.image;case 10:ka.state.pendingImageElementId!==Me.id&&(null===(mh=ka.state.draggingElement)||void 0===mh?void 0:mh.id)!==Me.id&&ka.initializeImageDimensions(Me,!0);cj(Me);Tg.next=18;break;case 14:Tg.prev=14,Tg.t0=Tg.catch(0),console.error(Tg.t0), Tf(Error((0,qc.t)("errors.imageInsertError")));case 18:return Tg.prev=18,Rd||(0,Ec.z8)(ka.canvas),Tg.finish(18);case 21:case "end":return Tg.stop()}},og,null,[[0,14,18,21]])}));return function(cj,Tf){return tg.apply(this,arguments)}}()));case 51:case "end":return Oe.stop()}},sb,null,[[6,19],[31,37]])}));return function(Qb){return vb.apply(this,arguments)}}();this.insertImageElement=function(){var vb=(0,Qd.Z)(uc().mark(function ac(Qb,sb,Mb){return uc().wrap(function(Bc){for(;;)switch(Bc.prev=Bc.next){case 0:return ka.scene.replaceAllElements([].concat((0,td.Z)(ka.scene.getElementsIncludingDeleted()), [Qb])),Bc.prev=1,Bc.next=4,ka.initializeImage({imageFile:sb,imageElement:Qb,showCursorImagePreview:Mb});case 4:Bc.next=11;break;case 6:Bc.prev=6,Bc.t0=Bc.catch(1),(0,Lc.DR)(Qb,{isDeleted:!0}),ka.actionManager.executeAction(Ue),ka.setState({errorMessage:Bc.t0.message||(0,qc.t)("errors.imageInsertError")});case 11:case "end":return Bc.stop()}},ac,null,[[1,6]])}));return function(Qb,sb,Mb){return vb.apply(this,arguments)}}();this.setImagePreviewCursor=function(){var vb=(0,Qd.Z)(uc().mark(function sb(Qb){var Mb, ac,Bc,Oc,Sc,xd,Rd;return uc().wrap(function(Ed){for(;;)switch(Ed.prev=Ed.next){case 0:return Mb=96,Ed.next=3,(0,ta.Tu)(Qb,{maxWidthOrHeight:Mb});case 3:return ac=Ed.sent,Ed.next=6,(0,ta.Sf)(ac);case 6:if(Bc=Ed.sent,Qb.type!==kb.LO.svg){Ed.next=20;break}return Ed.next=10,(0,fl.PK)(Bc);case 10:Oc=Ed.sent,Sc=Math.min(Oc.height,Mb),(xd=Oc.width/Oc.height*Sc)>Mb&&(Sc=(xd=Mb)*(Oc.height/Oc.width)),(Rd=document.createElement("canvas")).height=Sc,Rd.width=xd,Rd.getContext("2d").drawImage(Oc,0,0,xd,Sc),Bc= Rd.toDataURL(kb.LO.svg);case 20:ka.state.pendingImageElementId&&(0,Ec.KJ)(ka.canvas,"url(".concat(Bc,") 4 4, auto"));case 21:case "end":return Ed.stop()}},sb)}));return function(Qb){return vb.apply(this,arguments)}}();this.onImageAction=(0,Qd.Z)(uc().mark(function yb(){var Qb,sb,Mb,ac,Bc,Oc,Sc,xd,Rd,Ed=arguments;return uc().wrap(function(Bd){for(;;)switch(Bd.prev=Bd.next){case 0:return Qb=0za.length;){var Ua=ea[ya];5>za.length&&!l.Z[qa].includes(Ua[Ha])&&!za.includes(Ua[Ha])&&za.push(Ua[Ha]);ya++}return za}(H,ba)});E=(0,v.Z)(E,1)[0];x().useEffect(function(){N.current?N.current.focus():ia.current?ia.current.focus():ca.current&&ca.current.focus()},[]);P=function(ea){var qa=1M&&(P.style.left="".concat(M-H,"px"));ba+ja-aa>S&&(P.style.top="".concat(S-ja,"px"))}},[Z,M,S,E,aa]),(0,v.useEffect)(function(){if(ha){var P=function(da){var ba;null!==(ba=D.current)&&void 0!==ba&&ba.contains(da.target)||(0,x.unstable_batchedUpdates)(function(){return ha(da)})};return document.addEventListener("pointerdown",P,!1),function(){return document.removeEventListener("pointerdown", P,!1)}}},[ha]),(0,u.jsx)("div",{className:"popover",style:{top:F,left:X},ref:D,children:J})}},9101:function(h,k,f){f(371);var v=f(4512);k.Z=function(x){var L=x.size;L=void 0===L?"1em":L;x=x.circleWidth;x=void 0===x?8:x;return(0,v.jsx)("div",{className:"Spinner",children:(0,v.jsx)("svg",{viewBox:"0 0 100 100",style:{width:L,height:L},children:(0,v.jsx)("circle",{cx:"50",cy:"50",r:50-x/2,strokeWidth:x,fill:"none",strokeMiterlimit:"10"})})})}},1319:function(h,k,f){f.d(k,{V:function(){return ha}});var v= f(8950),x=f(2577);h=f(7945);var L=f.n(h),z=(f(5422),f(9787)),u=f.n(z),m=f(45),l=f(9660),J=f(6797),X=f(9101),F=f(4512),ha=u().forwardRef(function(T,Z){var E=(0,l.J0)().id,aa=u().useRef(null);u().useImperativeHandle(Z,function(){return aa.current});Z="ToolIcon_size_".concat(T.size);var M=(0,z.useState)(!1),S=(0,x.Z)(M,2);M=S[0];var D=S[1],O=(0,z.useRef)(!0);S=function(){var da=(0,v.Z)(L().mark(function ja(H){var N,ca;return L().wrap(function(ia){for(;;)switch(ia.prev=ia.next){case 0:if(!((ca="onClick"in T&&(null===(N=T.onClick)||void 0===N?void 0:N.call(T,H)))&&"then"in ca)){ia.next=18;break}return ia.prev=2,D(!0),ia.next=6,ca;case 6:ia.next=15;break;case 8:if(ia.prev=8,ia.t0=ia.catch(2),ia.t0 instanceof J._){ia.next=14;break}throw ia.t0;case 14:console.warn(ia.t0);case 15:return ia.prev=15,O.current&&D(!1),ia.finish(15);case 18:case "end":return ia.stop()}},ja,null,[[2,8,15,18]])}));return function(H){return da.apply(this,arguments)}}();(0,z.useEffect)(function(){return function(){O.current=!1}}, []);var P=(0,z.useRef)(null);return"button"===T.type||"icon"===T.type||"submit"===T.type?(E="icon"===T.type?"button":T.type,(0,F.jsxs)("button",{className:(0,m.Z)("ToolIcon_type_button",Z,T.className,T.visible&&!T.hidden?"ToolIcon_type_button--show":"ToolIcon_type_button--hide",{ToolIcon:!T.hidden,"ToolIcon--selected":T.selected,"ToolIcon--plain":"icon"===T.type}),"data-testid":T["data-testid"],hidden:T.hidden,title:T.title,"aria-label":T["aria-label"],type:E,onClick:S,ref:aa,disabled:M||T.isLoading, children:[(T.icon||T.label)&&(0,F.jsxs)("div",{className:"ToolIcon__icon","aria-hidden":"true",children:[T.icon||T.label,T.keyBindingLabel&&(0,F.jsx)("span",{className:"ToolIcon__keybinding",children:T.keyBindingLabel}),T.isLoading&&(0,F.jsx)(X.Z,{})]}),T.showAriaLabel&&(0,F.jsxs)("div",{className:"ToolIcon__label",children:[T["aria-label"]," ",M&&(0,F.jsx)(X.Z,{})]}),T.children]})):(0,F.jsxs)("label",{className:(0,m.Z)("ToolIcon",T.className),title:T.title,onPointerDown:function(da){var ba;P.current= da.pointerType||null;null===(ba=T.onPointerDown)||void 0===ba||ba.call(T,{pointerType:da.pointerType||null})},onPointerUp:function(){requestAnimationFrame(function(){P.current=null})},children:[(0,F.jsx)("input",{className:"ToolIcon_type_radio ".concat(Z),type:"radio",name:T.name,"aria-label":T["aria-label"],"aria-keyshortcuts":T["aria-keyshortcuts"],"data-testid":T["data-testid"],id:"".concat(E,"-").concat(T.id),onChange:function(){var da;null===(da=T.onChange)||void 0===da||da.call(T,{pointerType:P.current})}, checked:T.checked,ref:aa}),(0,F.jsxs)("div",{className:"ToolIcon__icon",children:[T.icon,T.keyBindingLabel&&(0,F.jsx)("span",{className:"ToolIcon__keybinding",children:T.keyBindingLabel})]})]})});ha.defaultProps={visible:!0,className:"",size:"medium"}},9910:function(h,k,f){f.d(k,{Js:function(){return z},bK:function(){return L},u:function(){return u}});f(6781);var v=f(9787),x=f(4512),L=function(){var m=document.querySelector(".excalidraw-tooltip");if(m)return m;m=document.createElement("div");return document.body.appendChild(m), m.classList.add("excalidraw-tooltip"),m},z=function(m,l){var J,X=2Z?Z=5:Z+F.width>=ha&&(Z=ha-F.width-5);"bottom"===X?(J=l.top+l.height+5)+F.height>=T&&(J=l.top-F.height-5):0>(J=l.top-F.height-5)&&(J=l.top+l.height+5);Object.assign(m.style,{top:"".concat(J,"px"),left:"".concat(Z,"px")})},u=function(m){var l=m.children,J=m.label,X=m.long, F=void 0!==X&&X;m=m.style;return(0,v.useEffect)(function(){return function(){return L().classList.remove("excalidraw-tooltip--visible")}},[]),(0,x.jsx)("div",{className:"excalidraw-tooltip-wrapper",onPointerEnter:function(ha){var T=ha.currentTarget;ha=L();ha.classList.add("excalidraw-tooltip--visible");ha.style.minWidth=F?"50ch":"10ch";ha.style.maxWidth=F?"50ch":"15ch";ha.textContent=J;T=T.getBoundingClientRect();z(ha,T)},onPointerLeave:function(){return L().classList.remove("excalidraw-tooltip--visible")}, style:m,children:l})}},3646:function(h,k,f){f.d(k,{$c:function(){return P},BF:function(){return Ca},BR:function(){return T},Ct:function(){return qa},DG:function(){return E},DS:function(){return Zb},EO:function(){return ld},GI:function(){return da},Gc:function(){return ca},HL:function(){return za},IN:function(){return ia},KX:function(){return H},Nw:function(){return fc},OA:function(){return Jd},P7:function(){return Nb},RJ:function(){return sa},Rb:function(){return M},ST:function(){return Oa},TP:function(){return S}, Vl:function(){return ja},W2:function(){return ob},W5:function(){return Ea},WD:function(){return aa},X7:function(){return Sa},Yw:function(){return ba},_I:function(){return Z},a0:function(){return Aa},a1:function(){return X},aA:function(){return Sd},aT:function(){return Wb},bf:function(){return hc},d9:function(){return Na},eQ:function(){return l},fr:function(){return Jc},gK:function(){return Xa},gR:function(){return Yb},h0:function(){return Ob},il:function(){return ad},j8:function(){return yc},kK:function(){return pc}, kM:function(){return Pa},kr:function(){return D},m:function(){return Fb},mh:function(){return Ha},np:function(){return Ja},nq:function(){return hd},nu:function(){return jb},o3:function(){return td},oT:function(){return Qd},op:function(){return db},p4:function(){return J},po:function(){return F},pw:function(){return ea},q0:function(){return Vc},rC:function(){return Ma},rn:function(){return rb},rr:function(){return Yd},t5:function(){return N},tP:function(){return oa},tW:function(){return Kd},tY:function(){return Ab}, tn:function(){return Pc},uD:function(){return Ua},vG:function(){return O},vo:function(){return Dd},wr:function(){return pb},xs:function(){return ya},xv:function(){return eb},z6:function(){return wd},zD:function(){return ha}});h=f(9787);h=f.n(h);var v=f(5284),x=f(45),L=f(8288),z=f(4512),u=function(nb){return nb===L.C6.LIGHT?v.orange[4]:v.orange[9]},m=function(nb){var cc=1=D.length?{done:!0}:{done:!1,value:D[da++]}},e:function(N){throw N;},f:O}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }var ba,H=!0,ja=!1;return{s:function(){P=P.call(D)},n:function(){var N=P.next();return H=N.done,N},e:function(N){ja=!0;ba=N},f:function(){try{H||null==P.return||P.return()}finally{if(ja)throw ba;}}}}function x(D,O){(null==O||O>D.length)&&(O=D.length);for(var P=0,da=Array(O);P=ca.length?{done:!0}:{done:!1,value:ca[qa++]}},e:function(Ua){throw Ua;}, f:ia}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var za,ya=!0,Ha=!1;return{s:function(){ea=ea.call(ca)},n:function(){var Ua=ea.next();return ya=Ua.done,Ua},e:function(Ua){Ha=!0;za=Ua},f:function(){try{ya||null==ea.return||ea.return()}finally{if(Ha)throw za;}}}}function z(ca,ia){(null==ia||ia>ca.length)&&(ia=ca.length);for(var ea=0,qa=Array(ia);ea=H.length?{done:!0}:{done:!1,value:H[ca++]}},e:function(za){throw za;},f:ja}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var ia,ea=!0,qa=!1;return{s:function(){N=N.call(H)},n:function(){var za=N.next();return ea=za.done,za},e:function(za){qa=!0;ia=za},f:function(){try{ea|| null==N.return||N.return()}finally{if(qa)throw ia;}}}}function x(H,ja){(null==ja||ja>H.length)&&(ja=H.length);for(var N=0,ca=Array(ja);NH.points.length?[[0,0],[H.width,H.height]]:H.points;if(0!==ia[0][0]||0!==ia[0][1])ea=T._.getNormalizedPoints(H),ia=ea.points,ca=ea.x,ea=ea.y;return M(H,{type:"draw"===H.type?"line":H.type,startBinding:H.startBinding,endBinding:H.endBinding,lastCommittedPoint:null,startArrowhead:ja,endArrowhead:N,points:ia,x:ca,y:ea});case "ellipse":case "rectangle":case "diamond":return M(H,{})}},D=function(H, ja){var N=ja?(0,E.xn)(ja):null;return(H||[]).reduce(function(ca,ia){if("selection"!==ia.type&&!(0,l.QD)(ia)){var ea=S(ia);ea&&((ia=null==N?void 0:N.get(ia.id))&&ia.version>ea.version&&(ea=(0,Z.ZP)(ea,ia.version)),ca.push(ea))}return ca},[])},O=function(H,ja){var N,ca,ia;H=H||{};var ea,qa=(0,ha.im)(),za={},ya=v(Object.entries(qa));try{for(ya.s();!(ea=ya.n()).done;){var Ha=(0,u.Z)(ea.value,2),Ua=Ha[0],Ea=Ha[1],Oa=H[Ua],Xa=ja?ja[Ua]:void 0;za[Ua]=void 0!==Oa?Oa:void 0!==Xa?Xa:Ea}}catch(Ma){ya.e(Ma)}finally{ya.f()}return z(z({}, za),{},{cursorButton:(null==ja?void 0:ja.cursorButton)||"up",penDetected:null!==(N=null==ja?void 0:ja.penDetected)&&void 0!==N?N:!!H.penMode&&null!==(ca=H.penDetected)&&void 0!==ca&&ca,activeTool:z(z({},(0,E.Om)(qa,za.activeTool.type&&aa[za.activeTool.type]?za.activeTool:{type:"selection"})),{},{lastActiveToolBeforeEraser:null,locked:null!==(ia=za.activeTool.locked)&&void 0!==ia&&ia}),zoom:"number"==typeof H.zoom?{value:H.zoom}:H.zoom||qa.zoom,isLibraryOpen:!!za.isLibraryMenuDocked&&za.isLibraryOpen})}, P=function(H,ja,N){return{elements:D(null==H?void 0:H.elements,N),appState:O(null==H?void 0:H.appState,ja||null),files:(null==H?void 0:H.files)||{}}},da=function(H){var ja=D((0,l.Lm)(H.elements),null);return ja.length?z(z({},H),{},{elements:ja}):null},ba=function(){var H,ja=1Xa-oa&&ebMa-oa&&Na=sa[0]&&oa<=Ja&&Ca>=Aa-85&&Ca<=Aa)return!1;Ma=N(Xa,Ma);Xa=Ma.x;Ma=Ma.y;return!(eb>=Xa-Na&&eb<=Xa+320+10+Na&&db>=Ma-Na&&db<=Ma+Na+10+42)}},8290:function(h,k,f){function v(Na,oa){var Ca=Object.keys(Na);if(Object.getOwnPropertySymbols){var sa=Object.getOwnPropertySymbols(Na);oa&&(sa=sa.filter(function(Aa){return Object.getOwnPropertyDescriptor(Na,Aa).enumerable})); Ca.push.apply(Ca,sa)}return Ca}f.d(k,{$q:function(){return Ma},DK:function(){return ba},H:function(){return H},HG:function(){return aa},N1:function(){return Z},R:function(){return O},Ww:function(){return ca},Y9:function(){return ja},ZB:function(){return za},cz:function(){return T},ek:function(){return Oa},el:function(){return S}});var x=f(7169),L=f(2577),z=f(75),u=f(1974),m=f(2325),l=f(1935),J=f(1564),X=f(6938),F=f(6340),ha=f(6066),T=function(Na){return!Na[ha.tW.CTRL_OR_CMD]},Z=function(Na){return Na.isBindingEnabled}, E=function(Na,oa){var Ca=[];return oa.forEach(function(sa){sa=Na.getNonDeletedElement(sa);null!=sa&&Ca.push(sa)}),Ca},aa=function(Na,oa,Ca){var sa=new Set,Aa=new Set;M(Na,oa,Ca,"start",sa,Aa);M(Na,Ca,oa,"end",sa,Aa);oa=Array.from(Aa).filter(function(Ja){return!sa.has(Ja)});E(J.Z.getScene(Na),oa).forEach(function(Ja){var Sa;(0,l.DR)(Ja,{boundElements:null===(Sa=Ja.boundElements)||void 0===Sa?void 0:Sa.filter(function(Ab){return"arrow"!==Ab.type||Ab.id!==Na.id})})})},M=function(Na,oa,Ca,sa,Aa,Ja){"keep"!== oa&&(null!=oa?null!=Ca&&("keep"===Ca?da(Na,oa,sa):"start"!==sa&&Ca.id===oa.id)||(P(Na,oa,sa),Aa.add(oa.id)):(oa="start"===sa?"startBinding":"endBinding",Ca=Na[oa],Na=null==Ca?null:((0,l.DR)(Na,(0,x.Z)({},oa,null)),Ca.elementId),null!=Na&&Ja.add(Na)))},S=function(Na){Na.forEach(function(oa){(0,u.Mn)(oa)?aa(oa,Ha(oa,"start"),Ha(oa,"end")):(0,u.f0)(oa)&&D(oa)})},D=function(Na){Ua(Na).forEach(function(oa){oa=(0,L.Z)(oa,2);var Ca=oa[1];return aa(oa[0],"end"===Ca?"keep":Na,"start"===Ca?"keep":Na)})},O= function(Na,oa,Ca,sa){null!=oa.startBoundElement&&P(Na,oa.startBoundElement,"start");oa=ja(sa,Ca);null==oa||da(Na,oa,"end")||P(Na,oa,"end")},P=function(Na,oa,Ca){(0,l.DR)(Na,(0,x.Z)({},"start"===Ca?"startBinding":"endBinding",function(sa){for(var Aa=1;AaNa.points.length},H=function(Na){Na.forEach(function(oa){(0,u.Mn)(oa)&&aa(oa,null,null)})},ja=function(Na,oa){return(0,z.QG)(oa.getNonDeletedElements(), function(Ca){return(0,u.f0)(Ca,!1)&&(0,m.uu)(Ca,Na)})},N=function(Na,oa,Ca){var sa="start"===Ca?-1:1;Ca=-1===sa?0:Na.points.length-1;sa=Ca-sa;Ca=X._.getPointAtIndexGlobalCoordinates(Na,Ca);Na=X._.getPointAtIndexGlobalCoordinates(Na,sa);return{focus:(0,m.T_)(oa,Na,Ca),gap:Math.max(1,(0,m.oT)(oa,Ca))}},ca=function(Na,oa){var Ca,sa=(null!==(Ca=Na.boundElements)&&void 0!==Ca?Ca:[]).filter(function(Sa){return"arrow"===Sa.type});if(0!==sa.length){oa=null!=oa?oa:{};var Aa=oa.newSize,Ja=ia(oa.simultaneouslyUpdated); E(J.Z.getScene(Na),sa.map(function(Sa){return Sa.id})).forEach(function(Sa){if((0,u.bt)(Sa)){var Ab,jb;if((null===(Ab=Sa.startBinding)||void 0===Ab?void 0:Ab.elementId)===Na.id||(null===(jb=Sa.endBinding)||void 0===jb?void 0:jb.elementId)===Na.id)Ab=qa(Na,Sa.startBinding,Aa),jb=qa(Na,Sa.endBinding,Aa),Ja.has(Sa.id)?(0,l.DR)(Sa,{startBinding:Ab,endBinding:jb}):(ea(Sa,"start",Ab,Na),ea(Sa,"end",jb,Na))}})}},ia=function(Na){return new Set((Na||[]).map(function(oa){return oa.id}))},ea=function(Na,oa, Ca,sa){if(!(null==Ca||Ca.elementId!==sa.id&&2=ba.length?{done:!0}:{done:!1,value:ba[N++]}},e:function(qa){throw qa;},f:H}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }var ca,ia=!0,ea=!1;return{s:function(){ja=ja.call(ba)},n:function(){var qa=ja.next();return ia=qa.done,qa},e:function(qa){ea=!0;ca=qa},f:function(){try{ia||null==ja.return||ja.return()}finally{if(ea)throw ca;}}}}function x(ba,H){(null==H||H>ba.length)&&(H=ba.length);for(var ja=0,N=Array(H);ja=ca;){var Ha=ia(ca,0),Ua=ia(ca,1);H&&(Ha=H(Ha, Ua),Ua=(0,L.Z)(Ha,2),Ha=Ua[0],Ua=Ua[1]);N.minY=Math.min(N.minY,Ua);N.minX=Math.min(N.minX,Ha);N.maxX=Math.max(N.maxX,Ha);N.maxY=Math.max(N.maxY,Ua);ca+=.1}}return N},{minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0});return[ba.minX,ba.minY,ba.maxX,ba.maxY]},Z=function(ba){var H,ja=1/0,N=1/0,ca=-1/0,ia=-1/0;ba=v(ba);try{for(ba.s();!(H=ba.n()).done;){var ea=(0,L.Z)(H.value,2),qa=ea[0],za=ea[1];ja=Math.min(ja,qa);N=Math.min(N,za);ca=Math.max(ca,qa);ia=Math.max(ia,za)}}catch(ya){ba.e(ya)}finally{ba.f()}return[ja, N,ca,ia]},E=function(ba){if(2>ba.points.length||!(0,m.R2)(ba)){var H=ba.points.reduce(function(ja,N){var ca=(0,L.Z)(N,2);N=ca[0];ca=ca[1];return ja.minY=Math.min(ja.minY,ca),ja.minX=Math.min(ja.minX,N),ja.maxX=Math.max(ja.maxX,N),ja.maxY=Math.max(ja.maxY,ca),ja},{minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0});ba=[H.minX+ba.x,H.minY+ba.y,H.maxX+ba.x,H.maxY+ba.y]}else H=(0,m.R2)(ba),H=ha(H[0]),H=T(H),H=(0,L.Z)(H,4),ba=[H[0]+ba.x,H[1]+ba.y,H[2]+ba.x,H[3]+ba.y];return ba},aa=function(ba,H,ja,N){H=ha(H[0]);if(1> H.length)return null;var ca="start"===ja?1:H.length-1,ia=H[ca].data,ea=[ia[4],ia[5]],qa=[ia[2],ia[3]],za=[ia[0],ia[1]];H=H[ca-1];var ya=[0,0];"move"===H.op?ya=H.data:"bcurveTo"===H.op&&(ya=[H.data[4],H.data[5]]);ca=function(eb,db){return Math.pow(1-eb,3)*ea[db]+3*eb*Math.pow(1-eb,2)*qa[db]+3*Math.pow(eb,2)*(1-eb)*za[db]+ya[db]*Math.pow(eb,3)};H=(0,L.Z)("start"===ja?ya:ea,2);ja=H[0];H=H[1];ia=[ca(.3,0),ca(.3,1)];ca=ia[0];ia=ia[1];var Ha=Math.hypot(ja-ca,H-ia);ca=(ja-ca)/Ha;ia=(H-ia)/Ha;Ha={arrow:30, bar:15,dot:15,triangle:15}[N];var Ua=0;if("arrow"===N){var Ea=(0,L.Z)(ba.points[ba.points.length-1],2);Ua=Ea[0];Ea=Ea[1];var Oa=(0,L.Z)(1Ua.points.length||!(0,m.R2)(Ua)){var Xa=Ua.points.reduce(function(Ma,eb){var db=(0,L.Z)(eb,2);eb=db[0];db=db[1];var Na=(0,z.U1)(Ua.x+eb,Ua.y+db,Ea,Oa,Ua.angle);Na=(0,L.Z)(Na,2);return eb=Na[0],db=Na[1],Ma.minY=Math.min(Ma.minY,db),Ma.minX=Math.min(Ma.minX,eb),Ma.maxX=Math.max(Ma.maxX,eb),Ma.maxY=Math.max(Ma.maxY,db),Ma},{minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0});return[Xa.minX,Xa.minY,Xa.maxX,Xa.maxY]}Xa=(0,m.R2)(Ua);Xa=ha(Xa[0]);return T(Xa,function(Ma,eb){return(0,z.U1)(Ua.x+Ma,Ua.y+eb, Ea,Oa,Ua.angle)})}(ba,ea,qa);else if("diamond"===ba.type){ja=(0,z.U1)(ea,ca,ea,qa,ba.angle);ca=(0,L.Z)(ja,2);ja=ca[0];ca=ca[1];var za=(0,z.U1)(ea,ia,ea,qa,ba.angle);ia=(0,L.Z)(za,2);za=ia[0];ia=ia[1];N=(0,z.U1)(N,qa,ea,qa,ba.angle);var ya=(0,L.Z)(N,2);N=ya[0];ya=ya[1];H=(0,z.U1)(H,qa,ea,qa,ba.angle);var Ha=(0,L.Z)(H,2);H=Ha[0];Ha=Ha[1];H=[Math.min(ja,za,N,H),Math.min(ca,ia,ya,Ha),Math.max(ja,za,N,H),Math.max(ca,ia,ya,Ha)]}else"ellipse"===ba.type?(H=(H-N)/2,ca=(ia-ca)/2,za=Math.cos(ba.angle),N=Math.sin(ba.angle), ja=Math.hypot(H*za,ca*N),H=Math.hypot(ca*za,H*N),H=[ea-ja,qa-H,ea+ja,qa+H]):(ja=(0,z.U1)(N,ca,ea,qa,ba.angle),za=(0,L.Z)(ja,2),ja=za[0],za=za[1],N=(0,z.U1)(N,ia,ea,qa,ba.angle),ya=(0,L.Z)(N,2),N=ya[0],ya=ya[1],ia=(0,z.U1)(H,ia,ea,qa,ba.angle),Ha=(0,L.Z)(ia,2),ia=Ha[0],Ha=Ha[1],H=(0,z.U1)(H,ca,ea,qa,ba.angle),ca=(0,L.Z)(H,2),H=ca[0],ca=ca[1],H=[Math.min(ja,N,ia,H),Math.min(za,ya,Ha,ca),Math.max(ja,N,ia,H),Math.max(za,ya,Ha,ca)]);return H},S=function(ba){if(!ba.length)return[0,0,0,0];var H=1/0,ja=-1/ 0,N=1/0,ca=-1/0;return ba.forEach(function(ia){ia=M(ia);ia=(0,L.Z)(ia,4);var ea=ia[1],qa=ia[2],za=ia[3];H=Math.min(H,ia[0]);N=Math.min(N,ea);ja=Math.max(ja,qa);ca=Math.max(ca,za)}),[H,N,ja,ca]},D=function(ba,H,ja){if(!(0,l.bt)(ba)&&!(0,l.F9)(ba))return[ba.x,ba.y,ba.x+H,ba.y+ja];H=(0,J.z)(0,H,(0,J.z)(1,ja,ba.points));(0,l.F9)(ba)?H=Z(H):(ja=u.Z.generator(),H="sharp"===ba.strokeSharpness?ja.linearPath(H,(0,m.i)(ba)):ja.curve(H,(0,m.i)(ba)),H=ha(H),H=T(H));H=(0,L.Z)(H,4);return[H[0]+ba.x,H[1]+ba.y,H[2]+ ba.x,H[3]+ba.y]},O=function(ba,H,ja){var N=u.Z.generator();H="sharp"===ja?N.linearPath(H,(0,m.i)(ba)):N.curve(H,(0,m.i)(ba));H=ha(H);H=T(H);H=(0,L.Z)(H,4);return[H[0]+ba.x,H[1]+ba.y,H[2]+ba.x,H[3]+ba.y]},P=function(ba,H){if(!ba.length)return[0,0,0,0];var ja=1/0,N=ba[0];return ba.forEach(function(ca){var ia=M(ca);ia=(0,L.Z)(ia,4);ia=(0,z.LW)((ia[0]+ia[2])/2,(ia[1]+ia[3])/2,H.x,H.y);ia=Pa.length?{done:!0}:{done:!1,value:Pa[Zb++]}},e:function(Fb){throw Fb;},f:ob}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var Jc,ad=!0,Pc=!1;return{s:function(){pb=pb.call(Pa)},n:function(){var Fb=pb.next();return ad=Fb.done,Fb},e:function(Fb){Pc=!0;Jc=Fb},f:function(){try{ad|| null==pb.return||pb.return()}finally{if(Pc)throw Jc;}}}}function x(Pa,ob){(null==ob||ob>Pa.length)&&(ob=Pa.length);for(var pb=0,Zb=Array(ob);pbob||7Pa[6]?-1:1)/ob)},T=(h(1,1),h(1,2),h(1,3),h(1,4),h(1,5),h(1,6),h(1,7),function(Pa,ob,pb){return ha([0,pb,Pa,ob,0,0,0,0])}),Z=function(Pa,ob){return pb=Pa,[(Zb=ob)[0]*pb[0]+Zb[2]*pb[2]+Zb[3]*pb[3]-Zb[6]*pb[6],Zb[1]*pb[0]+Zb[0]*pb[1]-Zb[4]*pb[2]+Zb[5]*pb[3]+Zb[2]* pb[4]-Zb[3]*pb[5]-Zb[7]*pb[6]-Zb[6]*pb[7],Zb[2]*pb[0]+Zb[0]*pb[2]-Zb[6]*pb[3]+Zb[3]*pb[6],Zb[3]*pb[0]+Zb[6]*pb[2]+Zb[0]*pb[3]-Zb[2]*pb[6],Zb[4]*pb[0]+Zb[7]*pb[3]+Zb[0]*pb[4]+Zb[3]*pb[7],Zb[5]*pb[0]+Zb[7]*pb[2]+Zb[0]*pb[5]+Zb[2]*pb[7],Zb[6]*pb[0]+Zb[0]*pb[6],Zb[7]*pb[0]+Zb[0]*pb[7]];var pb,Zb},E=function(Pa){Pa=(0,L.Z)(Pa,2);return[0,0,0,0,Pa[1],Pa[0],1,0]},aa=function(Pa){return[Pa[5],Pa[4]]},M=function(Pa,ob){return pb=l(Pa,Math.sin(ob/2)),Zb=Math.cos(ob/2),"number"==typeof Zb?[pb[0]+Zb,pb[1],pb[2], pb[3],pb[4],pb[5],pb[6],pb[7]]:[pb[0]+Zb[0],pb[1]+Zb[1],pb[2]+Zb[2],pb[3]+Zb[3],pb[4]+Zb[4],pb[5]+Zb[5],pb[6]+Zb[6],pb[7]+Zb[7]];var pb,Zb},S=function(Pa,ob){return ha(l(l(Pa,ob),u(Pa)))},D=f(6552),O=f(1493),P=f(8925),da=f(3063),ba=f(1974),H=f(5118),ja=f(6340),N=function(Pa,ob,pb,Zb){var Jc=10/ob.zoom.value;pb=[pb,Zb];return ob.selectedElementIds[Pa.id]?ea(Pa,pb,Jc):ia(Pa,ob,pb)},ca=function(Pa,ob,pb,Zb){var Jc=10/ob.zoom.value;return!ia(Pa,ob,[pb,Zb])&&ea(Pa,[pb,Zb],Jc)},ia=function(Pa,ob,pb){ob= 10/ob.zoom.value;if((0,H.iB)(Pa))var Zb=Ua;else"arrow"===Pa.type?Zb=!1:"freedraw"===Pa.type?Zb=!0:(Zb=!(0,ja.Qm)(Pa.backgroundColor)||(0,ba.Xo)(Pa),Zb="line"===Pa.type?Zb&&(0,D.g6)(Pa.points):Zb||(0,ba.pC)(Pa)),Zb=Zb?Ea:Oa;return ya({element:Pa,point:pb,threshold:ob,check:Zb})},ea=function(Pa,ob,pb){ob=(0,L.Z)(ob,2);var Zb=ob[0],Jc=ob[1];ob=(0,P.qf)(Pa);var ad=(0,L.Z)(ob,4);ob=ad[0];var Pc=ad[1],Fb=ad[2];ad=ad[3];Pa=(0,D.U1)(Zb,Jc,(ob+Fb)/2,(Pc+ad)/2,-Pa.angle);Zb=(0,L.Z)(Pa,2);Pa=Zb[0];Zb=Zb[1]; return Pa>ob-pb&&PaPc-pb&&Zbyc?ad:Vcyc?Jc:Fb,Math.hypot(pb-Fb[1],Zb-Fb[0])Pa},Ea=function(Pa,ob){return Pa=Jd)Fb=[];else{Jd= Math.sqrt(Jd);var pc=Pc*yc*yc-Kd*Fb*yc-Fb*Vc;Vc=Kd*Fb*Fb-Pc*Fb*yc-yc*Vc;Fb=[z((pc+yc*Jd)/hd,(Vc-Fb*Jd)/hd),z((pc-yc*Jd)/hd,(Vc+Fb*Jd)/hd)]}}return Fb}));break;case "ellipse":ad=jb(Pa,Zb,ob)}if(2>ad.length)return[];ad=ad.sort(function(Pc,Fb){return F(J(Pc,pb))-F(J(Fb,pb))});return[ad[0],ad[ad.length-1]]},Ab=function(Pa){var ob=1=Pc)return[];Pc=Math.sqrt(Pc);var Fb=-Zb*Zb*ob*ad;ad*=-Pa*Pa*Jc;return[z((Fb+Zb*Pa*Jc*Pc)/pb,(ad-Zb*Pa*ob*Pc)/pb),z((Fb-Zb*Pa*Jc*Pc)/pb,(ad+Zb*Pa*ob*Pc)/pb)]},Ob=function(Pa,ob,pb){var Zb=Math.sign(ob),Jc=0,ad=null;return Ab(Pa,Math.abs(ob)).forEach(function(Pc){var Fb=Zb* ha(J(Pc,pb))[1];Fb>Jc&&(Jc=Fb,ad=Pc)}),ad},Wb=function(Pa,ob,pb,Zb){var Jc,ad=[],Pc=!1;Pa=v((0,P.CM)(Pa));try{for(Pa.s();!(Jc=Pa.n()).done;){var Fb=Jc.value;"move"===Fb.op?(Pc=!Pc)&&ad.push([Fb.data[0],Fb.data[1]]):"bcurveTo"===Fb.op?Pc&&(ad.push([Fb.data[0],Fb.data[1]]),ad.push([Fb.data[2],Fb.data[3]]),ad.push([Fb.data[4],Fb.data[5]])):"lineTo"===Fb.op&&Pc&&ad.push([Fb.data[0],Fb.data[1]])}}catch(yc){Pa.e(yc)}finally{Pa.f()}if(4<=ad.length){if("sharp"===Zb)return(0,D.c9)(ad,ob,pb);Zb=(0,O.s)(ad, 10,5);return(0,D.c9)(Zb,ob,pb)}return!1},hc=function(Pa,ob,pb,Zb){var Jc=[0,0];return(0,P.CM)(Pa).some(function(ad,Pc){Pc=ad.op;var Fb=ad.data;if("move"===Pc)Jc=Fb;else{if("bcurveTo"===Pc){ad=[Fb[0],Fb[1]];Pc=[Fb[2],Fb[3]];Fb=[Fb[4],Fb[5]];var yc=Jc;Jc=Fb;return function(Vc,hd,Kd,Jd,pc,Dd){var wd=(0,L.Z)(pc,2);pc=wd[0];wd=wd[1];for(var Yd=function(Sd,Nb){return Math.pow(1-Sd,3)*Jd[Nb]+3*Sd*Math.pow(1-Sd,2)*Kd[Nb]+3*Math.pow(Sd,2)*(1-Sd)*hd[Nb]+Vc[Nb]*Math.pow(Sd,3)},td=0;1>=td;){var Qd=Yd(td,0),ld= Yd(td,1);if(Math.sqrt(Math.pow(Qd-pc,2)+Math.pow(ld-wd,2))=sa[0]&&Aa<=sa[0]+sa[2]&&Ja>=sa[1]&&Ja<=sa[1]+sa[3]},E=function(sa,Aa,Ja,Sa,Ab,jb){return sa.reduce(function(Ob,Wb){return Ob?Ob:(Ob=function(hc,Pa,ob,pb,Zb,Jc){if(!Pa.selectedElementIds[hc.id])return!1;hc=(0,J.PC)(hc,Zb,Jc);Pa=hc.rotation;var ad=(0,ha.Z)(hc, T);if(Pa&&Z(Pa,ob,pb))return"rotation";hc=Object.keys(ad).filter(function(Pc){Pc=ad[Pc];return!!Pc&&Z(Pc,ob,pb)});return 0Ja;Sa=Sa.originalElements.get(Ab.id); Ob=Ob&&Sa?Sa.x:Ab.x+jb.x;jb=sa&&Sa?Sa.y:Ab.y+jb.y}else Ob=Ab.x+jb.x,jb=Ab.y+jb.y;(0,P.DR)(Ab,{x:Ob,y:jb})},N=function(sa,Aa,Ja){sa=(0,l.KP)(sa);sa=(0,F.Z)(sa,2);return[Aa-sa[0],Ja-sa[1]]},ca=function(sa,Aa,Ja,Sa,Ab,jb,Ob,Wb,hc,Pa,ob){hc&&(ob?Wb=Ob/ob:(Aa=(0,z.uK)(Aa,Ob,jb(Wb=Aa.height)&&(Wb=-Wb)));Ab=Abcc)return void(0,P.DR)(rb,{height:rb.height+Math.min(Uc-cc,Nb)});rb.height>Aa&&Ucnb&&1!==Qd.value&&(qc=nb*(Qd.value-1)/2),Uc>Nb&&1!==Qd.value&&(He=Nb*(Qd.value-1)/2),"translate(".concat(qc,"px, ").concat(He,"px) scale(").concat(Qd.value,") rotate(").concat(vc,"deg)"));Ld.call(rb,be,{font:ue,lineHeight:qd,width:Nc,height:Ie,left:cc,top:cd,transform:uc,textAlign:td,verticalAlign:Sd,color:ld.strokeColor,opacity:ld.opacity/100,filter:"var(--theme-filter)", maxWidth:"".concat(nb,"px"),maxHeight:"".concat(Nb,"px")});(0,ea.h2)()&&(pb.style.fontFamily=(0,ea.$g)(ld));(0,P.DR)(ld,{x:fc,y:Yb})}}},pb=document.createElement("textarea");pb.dir="auto";pb.tabIndex=0;pb.dataset.type="wysiwyg";pb.wrap="off";pb.classList.add("excalidraw-wysiwyg");sa="pre";var Zb="normal";(0,u.Xh)(Ob)&&(sa="pre-wrap",Zb="break-word");Object.assign(pb.style,{position:"absolute",display:"inline-block",minHeight:"1em",backfaceVisibility:"hidden",margin:0,padding:0,border:0,outline:0, resize:"none",background:"transparent",overflow:"hidden",zIndex:"var(--zIndex-wysiwyg)",wordBreak:Zb,whiteSpace:sa,overflowWrap:"break-word"});ob();Sa&&(pb.oninput=function(){var td,Qd=null===(td=qa.Z.getScene(Ob))||void 0===td?void 0:td.getElement(Ja);td=(0,ea.mO)(Qd);var ld=Math.round(pb.scrollHeight/(0,da.hP)(td));(0,u.Xh)(Ob)&&1Sd[Sd.length-1]?pb.selectionStart=Math.max(td-4,Sd[Sd.length-1]):pb.selectionStart=td,pb.selectionEnd=Math.max(pb.selectionStart, Qd-4*Sd.length))},yc=function(){var td=pb.selectionStart,Qd=pb.selectionEnd,ld=pb.value,Sd=ld.slice(0,td).match(/[^\n]*$/)[0].length;return td-=Sd,ld.slice(td,Qd).split("\n").reduce(function(Nb,fc,Yb,rb){return Nb.concat(Yb?Nb[Yb-1]+rb[Yb-1].length+1:td)},[]).reverse()},Vc=function(td){td.preventDefault();td.stopPropagation()},hd=!1,Kd=function(){var td;wd||(wd=!0,pb.onblur=null,pb.oninput=null,pb.onkeydown=null,Yd&&Yd.disconnect(),window.removeEventListener("resize",ob),window.removeEventListener("wheel", Vc,!0),window.removeEventListener("pointerdown",pc),window.removeEventListener("pointerup",Jd),window.removeEventListener("blur",Kd),Dd(),pb.remove());var Qd=null===(td=qa.Z.getScene(Ob))||void 0===td?void 0:td.getElement(Ob.id);if(Qd){td=pb.value;var ld=(0,da.tl)(Qd);if(ld)if(td=Qd.text,pb.value)(Qd=(0,da.xB)(ld))&&Qd===Ob.id||(0,P.DR)(ld,{boundElements:(ld.boundElements||[]).concat({type:"text",id:Ob.id})});else{var Sd;(0,P.DR)(ld,{boundElements:null===(Sd=ld.boundElements)||void 0===Sd?void 0: Sd.filter(function(Nb){return!(0,u.iB)(Nb)})})}Ab({text:td,viaKeyboard:hd,originalText:pb.value})}},Jd=function ld(Qd){window.removeEventListener("pointerup",ld);var Sd=null==Qd?void 0:Qd.target,Nb=Sd instanceof HTMLInputElement&&Sd.closest(".color-picker-input")&&(0,ea.s)(Sd);setTimeout(function(){pb.onblur=Kd;Sd&&Nb&&(Sd.onblur=function(){pb.focus()});Nb||pb.focus()})},pc=function(Qd){var ld=Qd.target instanceof HTMLInputElement&&Qd.target.closest(".color-picker-input")&&(0,ea.s)(Qd.target);((Qd.target instanceof HTMLElement||Qd.target instanceof SVGElement)&&Qd.target.closest(".".concat(za.$C.SHAPE_ACTIONS_MENU))&&!(0,ea.s)(Qd.target)||ld)&&(pb.onblur=null,window.addEventListener("pointerup",Jd),window.addEventListener("blur",Kd))},Dd=qa.Z.getScene(Ob).addCallback(function(){var Qd;ob();null!==(Qd=document.activeElement)&&void 0!==Qd&&Qd.closest(".color-picker-input")||pb.focus()}),wd=!1;pb.select();Jd();var Yd=null;Wb&&"ResizeObserver"in window?(Yd=new window.ResizeObserver(function(){ob()})).observe(Wb): window.addEventListener("resize",ob);window.addEventListener("pointerdown",pc);window.addEventListener("wheel",Vc,{passive:!1,capture:!0});null==hc||hc.querySelector(".excalidraw-textEditorContainer").appendChild(pb)},Ea=f(75),Oa=function(sa,Aa){return!!(!sa.viewModeEnabled&&"custom"!==sa.activeTool.type&&(sa.editingElement||"selection"!==sa.activeTool.type&&"eraser"!==sa.activeTool.type)||(0,Ea.eD)(Aa,sa).length)},Xa=function(sa){return sa.reduce(function(Aa,Ja){return Aa+Ja.version},0)},Ma=function(sa){return sa.filter(function(Aa){return!Aa.isDeleted&& !(0,z.QD)(Aa)})},eb=function(sa){return sa.filter(function(Aa){return!Aa.isDeleted})},db=function(sa){return!sa.isDeleted},Na=function(sa){return eb(sa).map(function(Aa){return(0,u.dt)(Aa.type)?x(x({},Aa),{},{lastCommittedPoint:null}):Aa})},oa=function(sa){return Na(sa)},Ca=function(sa){return Na(sa)}},6938:function(h,k,f){function v(P,da){var ba="undefined"!=typeof Symbol&&P[Symbol.iterator]||P["@@iterator"];if(!ba){if(Array.isArray(P)||(ba=function(ia,ea){if(ia){if("string"==typeof ia)return x(ia, ea);var qa=Object.prototype.toString.call(ia).slice(8,-1);"Object"===qa&&ia.constructor&&(qa=ia.constructor.name);if("Map"===qa||"Set"===qa)return Array.from(ia);if("Arguments"===qa||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(qa))return x(ia,ea)}}(P))||da&&P&&"number"==typeof P.length){ba&&(P=ba);var H=0;da=function(){};return{s:da,n:function(){return H>=P.length?{done:!0}:{done:!1,value:P[H++]}},e:function(ia){throw ia;},f:da}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }var ja,N=!0,ca=!1;return{s:function(){ba=ba.call(P)},n:function(){var ia=ba.next();return N=ia.done,ia},e:function(ia){ca=!0;ja=ia},f:function(){try{N||null==ba.return||ba.return()}finally{if(ca)throw ja;}}}}function x(P,da){(null==da||da>P.length)&&(da=P.length);for(var ba=0,H=Array(da);ba=ia&&Ha[0]<=qa&&Ha[1]>=ea&&Ha[1]<=za||da.shiftKey&&null!=N&&N.includes(Ua))&&ya.push(Ua),ya},[]);H({editingLinearElement:z(z({},ja),{},{selectedPointsIndices:ca.length?ca:null})})}},{key:"handlePointDragging",value:function(da,ba,H,ja,N){if(!da.editingLinearElement)return!1;var ca=da.editingLinearElement,ia=ca.selectedPointsIndices,ea=ca.isDragging,qa=P.getElement(ca.elementId);if(!qa)return!1;var za=qa.points[ca.pointerDownState.lastClickedPoint];if(ia&&za){!1===ea&&ba({editingLinearElement:z(z({}, ca),{},{isDragging:!0})});ba=P.createPointAt(qa,H-ca.pointerOffset.x,ja-ca.pointerOffset.y,da.gridSize);var ya=ba[0]-za[0],Ha=ba[1]-za[1];if(P.movePoints(qa,ia.map(function(Ua){return{index:Ua,point:Ua===ca.pointerDownState.lastClickedPoint?P.createPointAt(qa,H-ca.pointerOffset.x,ja-ca.pointerOffset.y,da.gridSize):[qa.points[Ua][0]+ya,qa.points[Ua][1]+Ha],isDragging:Ua===ca.pointerDownState.lastClickedPoint}})),(0,S.Mn)(qa,!1))za=[],0===ia[0]&&za.push((0,M.AK)(P.getPointGlobalCoordinates(qa,qa.points[0]))), ia=ia[ia.length-1],ia===qa.points.length-1&&za.push((0,M.AK)(P.getPointGlobalCoordinates(qa,qa.points[ia]))),za.length&&N(qa,za);return!0}return!1}},{key:"handlePointerUp",value:function(da,ba,H){var ja,N=ba.selectedPointsIndices,ca=ba.isDragging,ia=ba.pointerDownState,ea=P.getElement(ba.elementId);if(!ea)return ba;var qa={};if(ca&&N){var za,ya=v(N);try{for(ya.s();!(za=ya.n()).done;){var Ha=za.value;if(0===Ha||Ha===ea.points.length-1){(0,F.g6)(ea.points,H.zoom.value)&&P.movePoints(ea,[{index:Ha,point:0=== Ha?ea.points[ea.points.length-1]:ea.points[0]}]);var Ua=(0,aa.N1)(H)?(0,aa.Y9)((0,M.AK)(P.getPointAtIndexGlobalCoordinates(ea,Ha)),E.Z.getScene(ea)):null;qa[0===Ha?"startBindingElement":"endBindingElement"]=Ua}}}catch(Ea){ya.e(Ea)}finally{ya.f()}}return z(z(z({},ba),qa),{},{selectedPointsIndices:ca||da.shiftKey?!ca&&da.shiftKey&&null!==(ja=ia.prevSelectedPointsIndices)&&void 0!==ja&&ja.includes(ia.lastClickedPoint)?N&&N.filter(function(Ea){return Ea!==ia.lastClickedPoint}):N:null!=N&&N.includes(ia.lastClickedPoint)? [ia.lastClickedPoint]:N,isDragging:!1,pointerOffset:{x:0,y:0}})}},{key:"handlePointerDown",value:function(da,ba,H,ja,N){var ca,ia={didAddPoint:!1,hitElement:null};if(!ba.editingLinearElement)return ia;var ea=P.getElement(ba.editingLinearElement.elementId);if(!ea)return ia;if(da.altKey)return null==ba.editingLinearElement.lastUncommittedPoint&&(0,Z.DR)(ea,{points:[].concat((0,u.Z)(ea.points),[P.createPointAt(ea,N.x,N.y,ba.gridSize)])}),ja.resumeRecording(),H({editingLinearElement:z(z({},ba.editingLinearElement), {},{pointerDownState:{prevSelectedPointsIndices:ba.editingLinearElement.selectedPointsIndices,lastClickedPoint:-1},selectedPointsIndices:[ea.points.length-1],lastUncommittedPoint:null,endBindingElement:(0,aa.Y9)(N,E.Z.getScene(ea))})}),ia.didAddPoint=!0,ia;ja=P.getPointIndexUnderCursor(ea,ba.zoom,N.x,N.y);if(-1ba?da.points.length+ba:ba;var H=(0,ha.qf)(da);H=(0,l.Z)(H,4);ba=da.points[ba];return(0,F.U1)(da.x+ba[0],da.y+ba[1],(H[0]+H[2])/2,(H[1]+H[3])/2,da.angle)}},{key:"pointFromAbsoluteCoords",value:function(da,ba){var H=(0,ha.qf)(da);H=(0,l.Z)(H,4);ba=(0,F.U1)(ba[0],ba[1],(H[0]+H[2])/2,(H[1]+H[3])/2,-da.angle);ba=(0,l.Z)(ba,2);return[ba[0]-da.x,ba[1]-da.y]}},{key:"getPointIndexUnderCursor",value:function(da,ba,H, ja){da=this.getPointsGlobalCoordinates(da);for(var N=da.length;-1<--N;){var ca=da[N];if((0,F.LW)(H,ja,ca[0],ca[1])*ba.valueMa-2*aa.gK&&(Ma=Oa+2*aa.gK),Ha>db-2*aa.gK&&(db=Ha+2*aa.gK),Ma===ya.height&&db===ya.width||(0,X.DR)(ya,{height:Ma,width:db}));ya={width:Ha,height:Oa,x:Number.isFinite(Xa)?Xa:ia.x,y:Number.isFinite(Ua)?Ua:ia.y,baseline:Ea};return(0,X.BE)(ia,x({text:qa,originalText:ea,isDeleted:null!=za?za:ia.isDeleted},ya))},ba=function(ia){return x(x({}, S(ia.type,ia)),{},{points:ia.points||[],pressures:[],simulatePressure:ia.simulatePressure,lastCommittedPoint:null})},H=function(ia){return x(x({},S(ia.type,ia)),{},{points:ia.points||[],lastCommittedPoint:null,startBinding:null,endBinding:null,startArrowhead:ia.startArrowhead,endArrowhead:ia.endArrowhead})},ja=function(ia){return x(x({},S("image",ia)),{},{strokeColor:"transparent",status:"pending",fileId:null,scale:[1,1]})},N=function qa(ea){var za=1=2*Math.PI?ca-2*Math.PI:ca},D=function(ca,ia,ea,qa,za,ya,Ha,Ua,Ea,Oa,Xa){if(1===ea.length){ea=(0,u.Z)(ea,1)[0];if("rotation"===ia){ia=(0,X.qf)(ea);ia=(0,u.Z)(ia,4);ia=5*Math.PI/2+Math.atan2(Ea-(ia[1]+ia[3])/ 2,Ua-(ia[0]+ia[2])/2);za&&(ia+=m.ay/2,ia-=ia%m.ay);ia=S(ia);(0,ha.DR)(ea,{angle:ia});if(ya=(0,M.xB)(ea))ya=aa.Z.getScene(ea).getElement(ya),(0,ha.DR)(ya,{angle:ia});(0,E.Ww)(ea)}else if(!(0,F.bt)(ea)||2!==ea.points.length||"nw"!==ia&&"ne"!==ia&&"sw"!==ia&&"se"!==ia)if(!(0,F.iB)(ea)||"nw"!==ia&&"ne"!==ia&&"sw"!==ia&&"se"!==ia)ia&&da(ca.originalElements,Ha,ea,ia,ya,Ua,Ea);else{qa=(0,X.qf)(ea);za=(0,u.Z)(qa,4);Ha=za[0];ca=za[1];qa=za[2];za=za[3];Ua=(0,J.U1)(Ua,Ea,(Ha+qa)/2,(ca+za)/2,-ea.angle);Ea=(0,u.Z)(Ua, 2);Ua=Ea[0];Ea=Ea[1];switch(ia){case "se":var Ma=Math.max((Ua-Ha)/(qa-Ha),(Ea-ca)/(za-ca));break;case "nw":Ma=Math.max((qa-Ua)/(qa-Ha),(za-Ea)/(za-ca));break;case "ne":Ma=Math.max((Ua-Ha)/(qa-Ha),(za-Ea)/(za-ca));break;case "sw":Ma=Math.max((qa-Ua)/(qa-Ha),(Ea-ca)/(za-ca))}0ia)return null;ca=(0,M.X1)(ca.text,(0,Z.mO)({fontSize:ia,fontFamily:ca.fontFamily}),ca.containerId?ca.width:null);return{size:ia,baseline:ca.baseline+(ea-ca.height)}},da=function(ca,ia,ea,qa,za,ya,Ha){var Ua=ca.get(ea.id),Ea=(0,X.wC)(Ua,Ua.width,Ua.height);Ea=(0,u.Z)(Ea, 4);var Oa=[Ea[0],Ea[1]],Xa=[Ea[2],Ea[3]];Ea=(0,J.H5)(Oa,Xa);var Ma=(0,J.xj)([ya,Ha],Ea,-Ua.angle);ya=(0,X.wC)(ea,ea.width,ea.height);ya=(0,u.Z)(ya,4);var eb=ya[2]-ya[0],db=ya[3]-ya[1];ya=(Xa[0]-Oa[0])/eb;Ha=(Xa[1]-Oa[1])/db;var Na={},oa=(0,M.WJ)(ea);qa.includes("e")&&(ya=(Ma[0]-Oa[0])/eb);qa.includes("s")&&(Ha=(Ma[1]-Oa[1])/db);qa.includes("w")&&(ya=(Xa[0]-Ma[0])/eb);qa.includes("n")&&(Ha=(Xa[1]-Ma[1])/db);db=Ua.width;var Ca=Ua.height;Ma=ea.width*ya;eb=ea.height*Ha;if(za&&(Ma=2*Ma-db,eb=2*eb-Ca), ia){var sa=Math.abs(Ma)/db,Aa=Math.abs(eb)/Ca;if(1===qa.length&&(eb*=sa,Ma*=Aa),2===qa.length)sa=Math.max(sa,Aa),Ma=db*sa*Math.sign(Ma),eb=Ca*sa*Math.sign(eb)}if(oa)if(ca=ca.get(oa.id),ca&&(Na={fontSize:ca.fontSize,baseline:ca.baseline}),ia){Na=P(oa,Ma-2*m.gK,eb-2*m.gK);if(null===Na)return;Na={fontSize:Na.size,baseline:Na.baseline}}else ca=(0,M.AT)((0,Z.mO)(oa)),db=(0,M.w_)((0,Z.mO)(oa)),Ma=Math.ceil(Math.max(Ma,ca)),eb=Math.ceil(Math.max(eb,db));ca=(0,X.wC)(Ua,Ma,eb);sa=(0,u.Z)(ca,4);ca=sa[0];db= sa[1];Ca=sa[2]-ca;sa=sa[3]-db;Aa=[].concat(Oa);if(["n","w","nw"].includes(qa)&&(Aa=[Xa[0]-Math.abs(Ca),Xa[1]-Math.abs(sa)]),"ne"===qa)Aa=[Oa[0],Xa[1]],Aa=[Aa[0],Aa[1]-Math.abs(sa)];"sw"===qa&&(Oa=[Xa[0],Oa[1]],Aa=[Oa[0]-Math.abs(Ca),Oa[1]]);ia&&(["s","n"].includes(qa)&&(Aa[0]=Ea[0]-Ca/2),["e","w"].includes(qa)&&(Aa[1]=Ea[1]-sa/2));0>Ma&&(qa.includes("e")&&(Aa[0]-=Math.abs(Ca)),qa.includes("w")&&(Aa[0]+=Math.abs(Ca)));0>eb&&(qa.includes("s")&&(Aa[1]-=Math.abs(sa)),qa.includes("n")&&(Aa[1]+=Math.abs(sa))); za&&(Aa[0]=Ea[0]-Math.abs(Ca)/2,Aa[1]=Ea[1]-Math.abs(sa)/2);ia=Ua.angle;za=(0,J.xj)(Aa,Ea,ia);Ea=(0,J.xj)([Aa[0]+Math.abs(Ca)/2,Aa[1]+Math.abs(sa)/2],Ea,ia);Aa=(0,J.xj)(za,Ea,-ia);ia=O(Ua,Ma,eb);za=(0,z.Z)(Aa);za[0]+=Ua.x-ca;za[1]+=Ua.y-db;ia=x({width:Math.abs(Ma),height:Math.abs(eb),x:za[0],y:za[1]},ia);"scale"in ea&&"scale"in Ua&&(0,ha.DR)(ea,{scale:[(Math.sign(ya)||Ua.scale[0])*Ua.scale[0],(Math.sign(Ha)||Ua.scale[1])*Ua.scale[1]]});0!==ia.width&&0!==ia.height&&Number.isFinite(ia.x)&&Number.isFinite(ia.y)&& ((0,E.Ww)(ea,{newSize:{width:ia.width,height:ia.height}}),(0,ha.DR)(ea,ia),oa&&Na&&(0,ha.DR)(oa,{fontSize:Na.fontSize}),(0,M.RB)(ea,qa))},ba=function(ca,ia,ea,qa){var za=(0,X.KP)(ca);za=(0,u.Z)(za,4);var ya=za[0],Ha=za[1],Ua=za[2],Ea=za[3];switch(ia){case "se":var Oa=Math.max((ea-ya)/(Ua-ya),(qa-Ha)/(Ea-Ha));var Xa=function(eb,db,Na){var oa=(0,u.Z)(db,2);db=oa[0];oa=oa[1];Na=(0,u.Z)(Na,2);return{x:eb.x+(db-ya)*(Oa-1)+db-Na[0],y:eb.y+(oa-Ha)*(Oa-1)+oa-Na[1]}};break;case "nw":Oa=Math.max((Ua-ea)/(Ua- ya),(Ea-qa)/(Ea-Ha));Xa=function(eb,db,Na){var oa=(0,u.Z)(db,4);db=oa[2];oa=oa[3];Na=(0,u.Z)(Na,4);return{x:eb.x-(Ua-db)*(Oa-1)+db-Na[2],y:eb.y-(Ea-oa)*(Oa-1)+oa-Na[3]}};break;case "ne":Oa=Math.max((ea-ya)/(Ua-ya),(Ea-qa)/(Ea-Ha));Xa=function(eb,db,Na){var oa=(0,u.Z)(db,4);db=oa[0];oa=oa[3];Na=(0,u.Z)(Na,4);return{x:eb.x+(db-ya)*(Oa-1)+db-Na[0],y:eb.y-(Ea-oa)*(Oa-1)+oa-Na[3]}};break;case "sw":Oa=Math.max((Ua-ea)/(Ua-ya),(qa-Ha)/(Ea-Ha)),Xa=function(eb,db,Na){var oa=(0,u.Z)(db,3);db=oa[1];oa=oa[2]; Na=(0,u.Z)(Na,3);return{x:eb.x-(Ua-oa)*(Oa-1)+oa-Na[2],y:eb.y+(db-Ha)*(Oa-1)+db-Na[1]}}}if(0ia||0>ea)||"ne"===ca&&0<=ia||"sw"===ca&&0>=ia||"se"===ca&&(0m.points.length:0===m.width&&0===m.height},z=function(m,l,J){var X=Math.abs(l),F=Math.abs(J); "line"===m||"arrow"===m||"freedraw"===m?(m=Math.round(Math.atan(F/X)/x.ay)*x.ay,0===m?J=0:m===Math.PI/2?l=0:J=Math.round(X*Math.tan(m))*Math.sign(J)||J):"selection"!==m&&(J=X*Math.sign(J));return{width:l,height:J}},u=function(m){var l={width:m.width,height:m.height,x:m.x,y:m.y};if(0>m.width){var J=Math.abs(m.width);l.width=J;l.x=m.x-J}0>m.height&&(J=Math.abs(m.height),l.height=J,l.y=m.y-J);return l}},5710:function(h,k,f){f.d(k,{AT:function(){return O},P7:function(){return F},RB:function(){return ha}, WJ:function(){return H},X1:function(){return T},hP:function(){return aa},lD:function(){return S},oN:function(){return X},tl:function(){return ja},w_:function(){return P},xB:function(){return ba}});var v,x,L=f(1930),z=f(6340),u=f(1935),m=f(8288),l=f(1564),J=f(5118),X=function(N,ca){var ia=ca?ca.width-2*m.gK:void 0,ea=N.text;ca&&(ea=S(N.originalText,(0,z.mO)(N),ca.width));ia=T(N.originalText,(0,z.mO)(N),ia);var qa=N.y,za=N.x;if(ca){var ya=ca.height;za=ca.x+m.gK;N.verticalAlign===m.oX.TOP?qa=ca.y+m.gK: N.verticalAlign===m.oX.BOTTOM?qa=ca.y+ca.height-ia.height-m.gK:(qa=ca.y+ca.height/2-ia.height/2,ia.height>ca.height-2*m.gK&&(ya=ia.height+2*m.gK,qa=ca.y+ya/2-ia.height/2));(0,u.DR)(ca,{height:ya})}(0,u.DR)(N,{width:ia.width,height:ia.height,baseline:ia.baseline,y:qa,x:za,text:ea})},F=function(N,ca,ia){var ea=(0,z.xn)(N);ca.forEach(function(qa){var za=ia.get(qa.id),ya=ba(qa);if(ya){var Ha=ia.get(ya);if(Ha){var Ua;(ya=ea.get(za))&&(0,u.DR)(ya,{boundElements:null===(Ua=qa.boundElements)||void 0===Ua? void 0:Ua.concat({type:"text",id:Ha})});(qa=ea.get(Ha))&&(0,J.iB)(qa)&&(0,u.DR)(qa,{containerId:ya?za:null})}}})},ha=function(N,ca){var ia=ba(N);if(ia&&(ia=l.Z.getScene(N).getElement(ia))&&ia.text&&N){var ea=ia.text,qa=ia.height,za=ia.baseline;if("n"!==ca&&"s"!==ca){ea&&=S(ia.originalText,(0,z.mO)(ia),N.width);var ya=T(ea,(0,z.mO)(ia),N.width);qa=ya.height;za=ya.baseline}if(qa>N.height-2*m.gK){var Ha=(ya=qa+2*m.gK)-N.height;(0,u.DR)(N,{height:ya,y:"ne"===ca||"nw"===ca||"n"===ca?N.y-Ha:N.y})}(0,u.DR)(ia, {text:ea,width:N.width-2*m.gK,height:qa,x:N.x+m.gK,y:ia.verticalAlign===m.oX.TOP?N.y+m.gK:ia.verticalAlign===m.oX.BOTTOM?N.y+N.height-qa-m.gK:N.y+N.height/2-qa/2,baseline:za})}},T=function(N,ca,ia){N=N.split("\n").map(function(qa){return qa||" "}).join("\n");var ea=document.createElement("div");if(ea.style.position="absolute",ea.style.whiteSpace="pre",ea.style.font=ca,ea.style.minHeight="1em",ia)ca=aa(ca),ea.style.width="".concat(String(ia),"px"),ea.style.maxWidth="".concat(String(ia),"px"),ea.style.overflow= "hidden",ea.style.wordBreak="break-word",ea.style.lineHeight="".concat(String(ca),"px"),ea.style.whiteSpace="pre-wrap";document.body.appendChild(ea);ea.innerText=N;N=document.createElement("span");N.style.display="inline-block";N.style.overflow="hidden";N.style.width="1px";N.style.height="1px";ea.appendChild(N);N=N.offsetTop+N.offsetHeight;ia=ea.offsetWidth;ca=ea.offsetHeight;return document.body.removeChild(ea),{width:ia,height:ca,baseline:N}},Z="ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789".toLocaleUpperCase(), E={},aa=function(N){return E[N]||(E[N]=T(Z,N,null).height),E[N]},M=function(N,ca){v||=document.createElement("canvas");var ia=v.getContext("2d");ia.font=ca;N=ia.measureText(N);return(0,z.h2)()?10*N.width:N.width},S=function(N,ca,ia){var ea=ia-2*m.gK,qa=[];N=N.split("\n");var za=M(" ",ca);return N.forEach(function(ya){ya=ya.split(" ");if(1===ya.length&&""===ya[0])qa.push(ya[0]);else{for(var Ha="",Ua=0,Ea=0;Ea=ea){Ha&&qa.push(Ha);Ha="";for(Ua=0;0=ea?(" "===Ha.slice(-1)&&(Ha=Ha.slice(0,-1)),qa.push(Ha),Ha=Oa,(Ua=Xa)===ea&&(Ha="",Ua=0)):Ha+=Oa}Ua+za>=ea?(qa.push(Ha),Ha="",Ua=0):(Ha+=" ",Ua+=za);Ea++}else{for(;Ua=ea){qa.push(Ha);Ua=0;Ha="";break}if(Ea++,Ha+="".concat(Oa," "),Ua+za>=ea){qa.push(Ha.slice(0,-1));Ha="";Ua=0;break}}Ua===ea&&(Ha="",Ua=0)}Ha&&(" "===Ha.slice(-1)&&(Ha=Ha.slice(0,-1)),qa.push(Ha))}}),qa.join("\n")},D=(x={},{calculate:function(N, ca){var ia=N.charCodeAt(0);(x[ca]||(x[ca]=[]),x[ca][ia])||(N=M(N,ca),x[ca][ia]=N);return x[ca][ia]},getCache:function(N){return x[N]}}),O=function(N){var ca=da(N);return 0===ca?T(Z.split("").join("\n"),N).width+2*m.gK:ca+2*m.gK},P=function(N){return aa(N)+2*m.gK},da=function(N){N=D.getCache(N);if(!N)return 0;N=N.filter(function(ca){return void 0!==ca});return Math.max.apply(Math,(0,L.Z)(N))},ba=function(N){var ca,ia,ea;return null!=N&&null!==(ca=N.boundElements)&&void 0!==ca&&ca.length&&(null==N|| null===(ia=N.boundElements)||void 0===ia||null===(ea=ia.filter(function(qa){return"text"===qa.type})[0])||void 0===ea?void 0:ea.id)||null},H=function(N){if(!N)return null;var ca,ia=ba(N);return ia&&(null===(ca=l.Z.getScene(N))||void 0===ca?void 0:ca.getElement(ia))||null},ja=function(N){return N&&N.containerId&&(null===(ca=l.Z.getScene(N))||void 0===ca?void 0:ca.getElement(N.containerId))||null;var ca}},267:function(h,k,f){f.d(k,{PC:function(){return T},kK:function(){return ha},ox:function(){return m}}); var v=f(2577),x=f(8925),L=f(6552),z=f(5118),u={mouse:8,pen:16,touch:28},m={e:!0,s:!0,n:!0,w:!0},l={e:!0,s:!0,n:!0,w:!0},J={e:!0,s:!0,n:!0,w:!0,nw:!0,se:!0},X={e:!0,s:!0,n:!0,w:!0,ne:!0,sw:!0},F=function(Z,E,aa,M,S,D,O){Z=(0,L.U1)(Z+aa/2,E+M/2,S,D,O);Z=(0,v.Z)(Z,2);return[Z[0]-aa/2,Z[1]-M/2,aa,M]},ha=function(Z,E,aa,M){var S=(0,v.Z)(Z,4),D=S[0],O=S[1],P=S[2];S=S[3];var da=4Ua&&(da.n||(Ha.n=F(D+ia/2-H/2,O-ya-ca+ba,H,ja,qa,za,E)),da.s||(Ha.s=F(D+ia/2-H/2,S+ya-ba,H,ja,qa,za, E))),Math.abs(ea)>Ua&&(da.w||(Ha.w=F(D-ya-N+ba,O+ea/2-ja/2,H,ja,qa,za,E)),da.e||(Ha.e=F(P+ya-ba,O+ea/2-ja/2,H,ja,qa,za,E))),Ha},T=function(Z,E){var aa=2S[1]?M=J:0S[0]&&0S[0]&&0>S[1]&&(M=X)}}else(0,z.iB)(Z)&&(M=l);return ha((0,x.qf)(Z), Z.angle,E,aa,M)}},1974:function(h,k,f){f.d(k,{F9:function(){return z},Lx:function(){return J},Mn:function(){return l},Xh:function(){return Z},Xo:function(){return T},bt:function(){return u},dt:function(){return m},f0:function(){return X},iB:function(){return L},mG:function(){return F},pC:function(){return x},r2:function(){return ha},wi:function(){return v}});var v=function(E){return!!E&&"image"===E.type&&!!E.fileId},x=function(E){return!!E&&"image"===E.type},L=function(E){return null!=E&&"text"=== E.type},z=function(E){return null!=E&&"freedraw"===E.type},u=function(E){return null!=E&&m(E.type)},m=function(E){return"arrow"===E||"line"===E},l=function(E){var aa=!(1=H.length?{done:!0}:{done:!1,value:H[ca++]}},e:function(za){throw za;},f:ja}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var ia,ea=!0,qa=!1;return{s:function(){N= N.call(H)},n:function(){var za=N.next();return ea=za.done,za},e:function(za){qa=!0;ia=za},f:function(){try{ea||null==N.return||N.return()}finally{if(qa)throw ia;}}}}function x(H,ja){(null==ja||ja>H.length)&&(ja=H.length);for(var N=0,ca=Array(ja);NN.length?ja.selectedGroupIds[H]||ja.editingGroupId===H?z(z({},ja),{},{selectedGroupIds:z(z({},ja.selectedGroupIds),{},(0,l.Z)({},H,!1)),editingGroupId:null}):ja:z(z({},ja),{},{selectedGroupIds:z(z({}, ja.selectedGroupIds),{},(0,l.Z)({},H,!0)),selectedElementIds:z(z({},ja.selectedElementIds),Object.fromEntries(N.map(function(ca){return[ca.id,!0]})))})},ha=function(H,ja){return null!=T(H,ja)},T=function(H,ja){return ja.groupIds.filter(function(N){return N!==H.editingGroupId}).find(function(N){return H.selectedGroupIds[N]})},Z=function(H){return Object.entries(H.selectedGroupIds).filter(function(ja){ja=(0,m.Z)(ja,2);ja[0];return ja[1]}).map(function(ja){ja=(0,m.Z)(ja,2);var N=ja[0];ja[1];return N})}, E=function(H,ja){var N=z(z({},H),{},{selectedGroupIds:{}}),ca=(0,J.eD)(ja,H);if(!ca.length)return z(z({},N),{},{editingGroupId:null});var ia;ca=v(ca);try{for(ca.s();!(ia=ca.n()).done;){var ea=ia.value.groupIds;if(H.editingGroupId){var qa=ea.indexOf(H.editingGroupId);-1E.label?1:-1}).filter(function(Z){return 85<=z[Z.code]});"production"===h.Vi.DEVELOPMENT&&m.unshift({code:"__test__",label:"test language"},{code:"".concat("__test__",".rtl"),label:"‪test language (rtl)‬",rtl:!0});var l=u,J={},X=function(){var Z=(0,v.Z)(x().mark(function M(aa){return x().wrap(function(S){for(;;)switch(S.prev= S.next){case 0:if(l=aa,document.documentElement.dir=l.rtl?"rtl":"ltr",document.documentElement.lang=l.code,!aa.code.startsWith("__test__")){S.next=7;break}J={};S.next=10;break;case 7:return S.next=9,f(940)("./".concat(l.code,".json"));case 9:J=S.sent;case 10:case "end":return S.stop()}},M)}));return function(aa){return Z.apply(this,arguments)}}(),F=function(){return l},ha=function(Z,E){for(var aa=0;aaaa)return!1;var M=[Number.MAX_SAFE_INTEGER,E];Z=[Z,E];for(var S=E=0;S=Math.min(T[0],E[0])&&Z[1]<=Math.max(T[1],E[1])&&Z[1]>=Math.min(T[1],E[1])},F=function(T,Z,E){T=(Z[1]-T[1])*(E[0]-Z[0])-(Z[0]-T[0])*(E[1]-Z[1]);return 0===T?0:0Jc){return Pa*Zb(.5-ob*(.5-pb))}function x(Pa,ob){return[Pa[0]+ob[0],Pa[1]+ob[1]]}function L(Pa,ob){return[Pa[0]-ob[0],Pa[1]-ob[1]]}function z(Pa,ob){return[Pa[0]*ob,Pa[1]*ob]}function u(Pa){return[Pa[1],-Pa[0]]}function m(Pa,ob){return Pa[0]===ob[0]&&Pa[1]===ob[1]}function l(Pa,ob){Pa=L(Pa,ob);return Pa[0]*Pa[0]+Pa[1]*Pa[1]}function J(Pa){var ob=Math.hypot(Pa[0],Pa[1]);return[Pa[0]/ob,Pa[1]/ob]}function X(Pa,ob){return Math.hypot(Pa[1]- ob[1],Pa[0]-ob[0])}function F(Pa,ob,pb){let Zb=Math.sin(pb);pb=Math.cos(pb);let Jc=Pa[0]-ob[0];Pa=Pa[1]-ob[1];return[Jc*pb-Pa*Zb+ob[0],Jc*Zb+Pa*pb+ob[1]]}function ha(Pa,ob,pb){return x(Pa,z(L(ob,Pa),pb))}function T(Pa,ob,pb){return x(Pa,z(ob,pb))}function Z(Pa,ob={}){return function(pb,Zb={}){let {size:Jc=16,smoothing:ad=.5,thinning:Pc=.5,simulatePressure:Fb=!0,easing:yc=qd=>qd,start:Vc={},end:hd={},last:Kd=!1}=Zb,{cap:Jd=!0,taper:pc=0,easing:Dd=qd=>qd*(2-qd)}=Vc,{cap:wd=!0,taper:Yd=0,easing:td=qd=> --qd*qd*qd+1}=hd;if(0===pb.length||0>=Jc)return[];var Qd,ld=pb[pb.length-1].runningLength,Sd=Math.pow(Jc*ad,2);Zb=[];let Nb=[];var fc=pb.slice(0,10).reduce((qd,vc)=>{var Nc=vc.pressure;Fb&&(vc=ea(1,vc.distance/Jc),Nc=ea(1,1-vc),Nc=ea(1,qd+.275*vc*(Nc-qd)));return(qd+Nc)/2},pb[0].pressure),Yb=v(Jc,Pc,pb[pb.length-1].pressure,yc);let rb=pb[0].vector;var nb=pb[0].point;let cc=nb;var uc=nb;let Uc=cc;for(var cd=0;cdld-Ie)){Pc?(Fb&&(Yb=ea(1,Nc/Jc),Ld=ea(1,1-Yb),Ld=ea(1,fc+.275*Yb*(Ld-fc))),Yb=v(Jc,Pc,Ld,yc)):Yb=Jc/2;void 0===Qd&&(Qd=Yb);var be=Ieue){nb=z(u(rb),Yb);for(let qc=1/13,He=0;1>=He;He+=qc)uc=F(L(qd,nb),qd,za*He),Zb.push(uc),Uc=F(x(qd,nb),qd,za*-He),Nb.push(Uc);nb=uc; cc=Uc}else fc=z(u(ha(be,vc,ue)),Yb),uc=L(qd,fc),(1>=cd||l(nb,uc)>Sd)&&(Zb.push(uc),nb=uc),Uc=x(qd,fc),(1>=cd||l(cc,Uc)>Sd)&&(Nb.push(Uc),cc=Uc),fc=Ld,rb=vc}}ld=pb[0].point.slice(0,2);Sd=1=vc;vc+=qd)Zb.push(F(pb,ld,2*za*vc));return Zb}}else{if(!(pc||Yd&&1===pb.length))if(Jd)for(let qd=1/13,vc=qd;1>=vc;vc+=qd)Qd=F(Nb[0],ld,za* vc),uc.push(Qd);else fc=L(Zb[0],Nb[0]),Qd=z(fc,.5),fc=z(fc,.51),uc.push(L(ld,Qd),L(ld,fc),x(ld,fc),x(ld,Qd));Qd=u(function(qd){return[-qd[0],-qd[1]]}(pb[pb.length-1].vector));if(Yd||pc&&1===pb.length)cd.push(Sd);else if(wd){pb=T(Sd,Qd,Yb);for(let qd=1/29,vc=qd;1>vc;vc+=qd)cd.push(F(pb,Sd,3*za*vc))}else cd.push(x(Sd,z(Qd,Yb)),x(Sd,z(Qd,.99*Yb)),L(Sd,z(Qd,.99*Yb)),L(Sd,z(Qd,Yb)))}return Zb.concat(cd,Nb.reverse(),uc)}(function(pb,Zb={}){var Jc;let {streamline:ad=.5,size:Pc=16,last:Fb=!1}=Zb;if(0===pb.length)return[]; Zb=.15+.85*(1-ad);pb=Array.isArray(pb[0])?pb:pb.map(({x:pc,y:Dd,pressure:wd=.5})=>[pc,Dd,wd]);if(2===pb.length){var yc=pb[1];pb=pb.slice(0,-1);for(var Vc=1;5>Vc;Vc++)pb.push(ha(pb[0],yc,Vc/4))}1===pb.length&&(pb=[...pb,[...x(pb[0],[1,1]),...pb[0].slice(2)]]);yc=[{point:[pb[0][0],pb[0][1]],pressure:0<=pb[0][2]?pb[0][2]:.25,vector:[1,1],distance:0,runningLength:0}];Vc=!1;let hd=0,Kd=yc[0],Jd=pb.length-1;for(let pc=1;pcyc?(0,ja.TE)(Pa.x,yc)*window.devicePixelRatio*pb.value:0;Fb=Pa.y>Fb?(0,ja.TE)(Pa.y,Fb)*window.devicePixelRatio*pb.value:0;Jc.translate(Pc,Fb)}else Zb.width=Pa.width*window.devicePixelRatio*pb.value+ad*pb.value*2,Zb.height=Pa.height*window.devicePixelRatio*pb.value+ad*pb.value*2;Jc.save();Jc.translate(ad*pb.value,ad*pb.value);Jc.scale(window.devicePixelRatio*pb.value,window.devicePixelRatio*pb.value);ad=ca.Z.canvas(Zb); ob=(Ea(Pa,ob)&&(Jc.filter="invert(100%) hue-rotate(180deg) saturate(1.25)"),eb(Pa,ad,Jc,ob),Jc.restore(),{element:Pa,canvas:Zb,theme:ob.theme,canvasZoom:pb.value,canvasOffsetX:Pc,canvasOffsetY:Fb});return db.set(Pa,ob),ob}return Zb},Sa=function(Pa,ob,pb,Zb){ob=Pa.element;var Jc="freedraw"===ob.type?12*ob.strokeWidth:20,ad=(0,H.qf)(ob),Pc=(0,da.Z)(ad,4);ad=Pc[0];var Fb=Pc[1],yc=Pc[2];Pc=Pc[3];(0,ba.F9)(ob)&&(ad=Math.floor(ad),yc=Math.ceil(yc),Fb=Math.floor(Fb),Pc=Math.ceil(Pc));var Vc=((ad+yc)/2+Zb.scrollX)* window.devicePixelRatio,hd=((Fb+Pc)/2+Zb.scrollY)*window.devicePixelRatio,Kd=Ua(ob,Zb);Zb="scale"in Pa.element&&!Kd?Pa.element.scale[0]:1;Kd="scale"in Pa.element&&!Kd?Pa.element.scale[1]:1;pb.save();pb.scale(1/window.devicePixelRatio*Zb,1/window.devicePixelRatio*Kd);pb.translate(Vc*Zb,hd*Kd);pb.rotate(ob.angle*Zb*Kd);pb.drawImage(Pa.canvas,-(yc-ad)/2*window.devicePixelRatio-Jc*Pa.canvasZoom/Pa.canvasZoom,-(Pc-Fb)/2*window.devicePixelRatio-Jc*Pa.canvasZoom/Pa.canvasZoom,Pa.canvas.width/Pa.canvasZoom, Pa.canvas.height/Pa.canvasZoom);pb.restore()},Ab=function(Pa,ob,pb,Zb){var Jc=ob.generator;switch(Pa.type){case "selection":pb.save();pb.translate(Pa.x+Zb.scrollX,Pa.y+Zb.scrollY);pb.fillStyle="rgba(0, 0, 255, 0.10)";pb.fillRect(0,0,Pa.width,Pa.height);pb.restore();break;case "freedraw":if(Aa(Pa,Jc),Zb.isExporting)Pa=Ja(Pa,Zb),Sa(Pa,0,pb,Zb);else{Jc=(0,H.qf)(Pa);var ad=(0,da.Z)(Jc,4),Pc=ad[0];Jc=ad[1];var Fb=ad[2],yc=ad[3];ad=(Pc+Fb)/2+Zb.scrollX;var Vc=(Jc+yc)/2+Zb.scrollY;Pc=(Fb-Pc)/2-(Pa.x-Pc); Jc=(yc-Jc)/2-(Pa.y-Jc);pb.save();pb.translate(ad,Vc);pb.rotate(Pa.angle);pb.translate(-Pc,-Jc);eb(Pa,ob,pb,Zb);pb.restore()}break;case "rectangle":case "diamond":case "ellipse":case "line":case "arrow":case "image":case "text":(Aa(Pa,Jc),Zb.isExporting)?(Jc=(0,H.qf)(Pa),ad=(0,da.Z)(Jc,4),Pc=ad[0],Jc=ad[1],Fb=ad[2],yc=ad[3],ad=(Pc+Fb)/2+Zb.scrollX,Vc=(Jc+yc)/2+Zb.scrollY,Pc=(Fb-Pc)/2-(Pa.x-Pc),Jc=(yc-Jc)/2-(Pa.y-Jc),pb.save(),pb.translate(ad,Vc),pb.rotate(Pa.angle),pb.translate(-Pc,-Jc),Ea(Pa,Zb)&& (pb.filter="none"),eb(Pa,ob,pb,Zb),pb.restore()):(Pa=Ja(Pa,Zb),Sa(Pa,0,pb,Zb));break;default:throw Error("Unimplemented type ".concat(Pa.type));}},jb=function(Pa,ob,pb){if(void 0===pb)return Pa.draw(ob);ob={sets:ob.sets,shape:ob.shape,options:aa(aa({},ob.options),{},{fixedDecimalPlaceDigits:pb})};return Pa.draw(ob)},Ob=function(Pa,ob,pb,Zb,Jc,ad,Pc){var Fb=(0,H.qf)(Pa);Fb=(0,da.Z)(Fb,4);var yc=Fb[0],Vc=Fb[1],hd=(Fb[2]-yc)/2-(Pa.x-yc),Kd=(Fb[3]-Vc)/2-(Pa.y-Vc),Jd=180*Pa.angle/Math.PI;yc=ob.generator; Fb=pb;Pa.link&&(Vc=pb.ownerDocument.createElementNS(ia.hR,"a"),Vc.setAttribute("href",Pa.link),Fb.appendChild(Vc),Fb=Vc);switch(Pa.type){case "selection":throw Error("Selection rendering is not supported for SVG");case "rectangle":case "diamond":case "ellipse":Aa(Pa,yc);pb=jb(ob,oa(Pa),ia.zK);Pc=Pa.opacity/100;1!==Pc&&(pb.setAttribute("stroke-opacity","".concat(Pc)),pb.setAttribute("fill-opacity","".concat(Pc)));pb.setAttribute("stroke-linecap","round");pb.setAttribute("transform","translate(".concat(Jc|| 0," ").concat(ad||0,") rotate(").concat(Jd," ").concat(hd," ").concat(Kd,")"));Fb.appendChild(pb);break;case "line":case "arrow":Aa(Pa,yc);var pc=pb.ownerDocument.createElementNS(ia.hR,"g"),Dd=Pa.opacity/100;pc.setAttribute("stroke-linecap","round");oa(Pa).forEach(function(Sd){Sd=jb(ob,Sd,ia.zK);1!==Dd&&(Sd.setAttribute("stroke-opacity","".concat(Dd)),Sd.setAttribute("fill-opacity","".concat(Dd)));Sd.setAttribute("transform","translate(".concat(Jc||0," ").concat(ad||0,") rotate(").concat(Jd," ").concat(hd, " ").concat(Kd,")"));"line"===Pa.type&&(0,N.g6)(Pa.points)&&"transparent"!==Pa.backgroundColor&&Sd.setAttribute("fill-rule","evenodd");pc.appendChild(Sd)});Fb.appendChild(pc);break;case "freedraw":Aa(Pa,yc);M(Pa);Pc=Pa.opacity/100;Zb=(Zb=oa(Pa))?jb(ob,Zb,ia.zK):pb.ownerDocument.createElementNS(ia.hR,"g");1!==Pc&&(Zb.setAttribute("stroke-opacity","".concat(Pc)),Zb.setAttribute("fill-opacity","".concat(Pc)));Zb.setAttribute("transform","translate(".concat(Jc||0," ").concat(ad||0,") rotate(").concat(Jd, " ").concat(hd," ").concat(Kd,")"));Zb.setAttribute("stroke","none");pb=pb.ownerDocument.createElementNS(ia.hR,"path");pb.setAttribute("fill",Pa.strokeColor);pb.setAttribute("d",S(Pa));Zb.appendChild(pb);Fb.appendChild(Zb);break;case "image":if(Zb=(0,ba.wi)(Pa)&&Zb[Pa.fileId]){yc="image-".concat(Zb.id);Vc=pb.querySelector("#".concat(yc));if(!Vc){(Vc=pb.ownerDocument.createElementNS(ia.hR,"symbol")).id=yc;var wd=pb.ownerDocument.createElementNS(ia.hR,"image");wd.setAttribute("width","100%");wd.setAttribute("height", "100%");wd.setAttribute("href",Zb.dataURL);Vc.appendChild(wd);Fb.prepend(Vc)}pb=pb.ownerDocument.createElementNS(ia.hR,"use");pb.setAttribute("href","#".concat(yc));Pc&&Zb.mimeType!==ia.LO.svg&&pb.setAttribute("filter","invert(100%) hue-rotate(180deg) saturate(1.25)");pb.setAttribute("width","".concat(Math.round(Pa.width)));pb.setAttribute("height","".concat(Math.round(Pa.height)));pb.setAttribute("transform","translate(".concat(Jc||0," ").concat(ad||0,") rotate(").concat(Jd," ").concat(hd," ").concat(Kd, ")"));Fb.appendChild(pb)}break;default:if(!(0,ba.iB)(Pa))throw Error("Unimplemented type ".concat(Pa.type));Zb=Pa.opacity/100;Pc=pb.ownerDocument.createElementNS(ia.hR,"g");1!==Zb&&(Pc.setAttribute("stroke-opacity","".concat(Zb)),Pc.setAttribute("fill-opacity","".concat(Zb)));Pc.setAttribute("transform","translate(".concat(Jc||0," ").concat(ad||0,") rotate(").concat(Jd," ").concat(hd," ").concat(Kd,")"));Zb=Pa.text.replace(/\r\n?/g,"\n").split("\n");yc=Pa.height/Zb.length;Vc=Pa.height-Pa.baseline; wd="center"===Pa.textAlign?Pa.width/2:"right"===Pa.textAlign?Pa.width:0;for(var Yd=(0,ja.dZ)(Pa.text)?"rtl":"ltr",td="center"===Pa.textAlign?"middle":"right"===Pa.textAlign||"rtl"===Yd?"end":"start",Qd=0;Qd=qa.length?{done:!0}:{done:!1,value:qa[Ha++]}},e:function(Xa){throw Xa;},f:za}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }var Ua,Ea=!0,Oa=!1;return{s:function(){ya=ya.call(qa)},n:function(){var Xa=ya.next();return Ea=Xa.done,Xa},e:function(Xa){Oa=!0;Ua=Xa},f:function(){try{Ea||null==ya.return||ya.return()}finally{if(Oa)throw Ua;}}}}function x(qa,za){(null==za||za>qa.length)&&(za=qa.length);for(var ya=0,Ha=Array(za);ya=Wb&&hc.y>=ob});(Ha.forEach(function(Wb){try{if((0,F.lw)(Wb,Ua,Na,Oa),!db&&Wb.link&&!za.selectedElementIds[Wb.id]){var hc=(0,l.qf)(Wb),Pa=(0,z.Z)(hc,4),ob=(0,D.sw)([Pa[0],Pa[1],Pa[2],Pa[3]],Wb.angle,za),pb=(0,z.Z)(ob,4),Zb=pb[0],Jc=pb[1],ad=pb[2],Pc=pb[3];hc=Zb+ad/2;Pa=Jc+Pc/2;if(Na.save(),Na.translate(za.scrollX+hc,za.scrollY+Pa),Na.rotate(Wb.angle),!O||O.zoom!==za.zoom.value){(O=document.createElement("canvas")).zoom=za.zoom.value; O.width=ad*window.devicePixelRatio*za.zoom.value;O.height=Pc*window.devicePixelRatio*za.zoom.value;var Fb=O.getContext("2d");Fb.scale(window.devicePixelRatio*za.zoom.value,window.devicePixelRatio*za.zoom.value);Fb.fillStyle="#fff";Fb.fillRect(0,0,ad,Pc);Fb.drawImage(D.rj,0,0,ad,Pc);Fb.restore()}Na.drawImage(O,Zb-hc,Jc-Pa,ad,Pc);Na.restore()}}catch(yc){console.error(yc)}}),za.editingLinearElement)&&(Ea=T._.getElement(za.editingLinearElement.elementId))&&function(Wb,hc,Pa,ob){Wb.save();Wb.translate(Pa.scrollX, Pa.scrollY);Wb.lineWidth=1/Pa.zoom.value;T._.getPointsGlobalCoordinates(ob).forEach(function(pb,Zb){var Jc,ad;Wb.strokeStyle="red";Wb.setLineDash([]);Wb.fillStyle=null!==(Jc=hc.editingLinearElement)&&void 0!==Jc&&null!==(ad=Jc.selectedPointsIndices)&&void 0!==ad&&ad.includes(Zb)?"rgba(255, 127, 127, 0.9)":"rgba(255, 255, 255, 0.9)";ba(Wb,pb[0],pb[1],T._.POINT_HANDLE_SIZE/2/Pa.zoom.value)});Wb.restore()}(Na,za,Oa,Ea);if(ya)try{(0,F.lw)(ya,Ua,Na,Oa)}catch(Wb){console.error(Wb)}if((0,aa.N1)(za)&&za.suggestedBindings.filter(function(Wb){return null!= Wb}).forEach(function(Wb){var hc=Array.isArray(Wb)?ia:ca;Na.save();Na.translate(Oa.scrollX,Oa.scrollY);hc(Na,Wb);Na.restore()}),Ma&&!za.multiElement&&!za.editingLinearElement){var Aa,Ja=qa.reduce(function(Wb,hc){var Pa=[];if(za.selectedElementIds[hc.id]&&!(0,Z.zq)(za,hc)&&Pa.push(m.black),Oa.remoteSelectedElementIds[hc.id]&&Pa.push.apply(Pa,(0,u.Z)(Oa.remoteSelectedElementIds[hc.id].map(function(pb){return(0,ha.X)(pb,za).background}))),Pa.length){var ob=(0,l.qf)(hc);ob=(0,z.Z)(ob,4);Wb.push({angle:hc.angle, elementX1:ob[0],elementY1:ob[1],elementX2:ob[2],elementY2:ob[3],selectionColors:Pa})}return Wb},[]);ya=function(Wb){Wb=(0,Z.Fb)(qa,Wb);Wb=(0,l.KP)(Wb);Wb=(0,z.Z)(Wb,4);Ja.push({angle:0,elementX1:Wb[0],elementX2:Wb[2],elementY1:Wb[1],elementY2:Wb[3],selectionColors:[m.black]})};Ea=v((0,Z.iJ)(za));try{for(Ea.s();!(Aa=Ea.n()).done;)ya(Aa.value)}catch(Wb){Ea.e(Wb)}finally{Ea.f()}za.editingGroupId&&ya(za.editingGroupId);Ja.forEach(function(Wb){var hc=Wb.angle,Pa=Wb.elementX1,ob=Wb.elementY1,pb=Wb.selectionColors, Zb=Wb.elementX2-Pa;Wb=Wb.elementY2-ob;var Jc=4/Oa.zoom.value,ad=8/Oa.zoom.value,Pc=4/Oa.zoom.value;Na.save();Na.translate(Oa.scrollX,Oa.scrollY);Na.lineWidth=1/Oa.zoom.value;for(var Fb=pb.length,yc=0;ycEa||Ea>oa-9||0>Ma||Ma>Ca-14,Ea=Math.max(Ea,0),Ea=Math.min(Ea,oa-9),Ma=Math.max(Ma,0),Ma=Math.min(Ma,Ca-14),ya=(0,ha.X)(Ob,za),Aa=ya.background,ya=ya.stroke,Na.save(),Na.strokeStyle=ya,Na.fillStyle=Aa,Sa=Oa.remotePointerUserStates[Ob],(eb||Sa===L.AWAY)&&(Na.globalAlpha=.48),Oa.remotePointerButton&&"down"===Oa.remotePointerButton[Ob]&& (Na.beginPath(),Na.arc(Ea,Ma,15,0,2*Math.PI,!1),Na.lineWidth=3,Na.strokeStyle="#ffffff88",Na.stroke(),Na.closePath(),Na.beginPath(),Na.arc(Ea,Ma,15,0,2*Math.PI,!1),Na.lineWidth=1,Na.strokeStyle=ya,Na.stroke(),Na.closePath()),Na.beginPath(),Na.moveTo(Ea,Ma),Na.lineTo(Ea+1,Ma+14),Na.lineTo(Ea+4,Ma+9),Na.lineTo(Ea+9,Ma+10),Na.lineTo(Ea,Ma),Na.fill(),Na.stroke(),Ab=Oa.remotePointerUsernames[Ob],jb="",Sa===L.AWAY?jb=P?"⚫️":" (".concat(L.AWAY,")"):Sa===L.IDLE?jb=P?"\ud83d\udca4":" (".concat(L.IDLE,")"): Sa===L.ACTIVE&&(jb=P?"\ud83d\udfe2":""),Sa="".concat(Ab?"".concat(Ab," "):"").concat(jb),!eb&&Sa&&(Ea+=9,Ma+=14,eb=Na.measureText(Sa),Ab=eb.actualBoundingBoxDescent+eb.actualBoundingBoxAscent,Na.fillStyle=ya,Na.fillRect(Ea-1,Ma-1,eb.width+8+2,Ab+8+2),Na.fillStyle=Aa,Na.fillRect(Ea,Ma,eb.width+8,Ab+8),Na.fillStyle=m.white,Na.fillText(Sa,Ea+4,Ma+4+eb.actualBoundingBoxAscent)),Na.restore(),Na.closePath();return Xa&&(sa=(0,J.tJ)(qa,oa,Ca,Oa),Na.save(),Na.fillStyle=J.w1,Na.strokeStyle="rgba(255,255,255,0.8)", [sa.horizontal,sa.vertical].forEach(function(Wb){if(Wb){var hc=Wb.x,Pa=Wb.y,ob=Wb.width;Wb=Wb.height;var pb=J.nn/2;Na.beginPath();Na.moveTo(hc+pb,Pa);Na.lineTo(hc+ob-pb,Pa);Na.quadraticCurveTo(hc+ob,Pa,hc+ob,Pa+pb);Na.lineTo(hc+ob,Pa+Wb-pb);Na.quadraticCurveTo(hc+ob,Pa+Wb,hc+ob-pb,Pa+Wb);Na.lineTo(hc+pb,Pa+Wb);Na.quadraticCurveTo(hc,Pa+Wb,hc,Pa+Wb-pb);Na.lineTo(hc,Pa+pb);Na.quadraticCurveTo(hc,Pa,hc+pb,Pa);Na.closePath();Na.fill();Na.stroke()}}),Na.restore()),Na.restore(),{atLeastOneVisibleElement:0< Ha.length,scrollBars:sa}},ja=(0,M.hR)(function(qa,za,ya,Ha,Ua,Ea,Oa,Xa){qa=H(qa,za,ya,Ha,Ua,Ea,Oa);null==Xa||Xa(qa)},{trailing:!0}),N=function(qa,za,ya,Ha){Object.keys(ya).forEach(function(Ua){var Ea=ya[Ua];void 0!==Ea&&(qa.save(),qa.lineWidth=1/za.zoom.value,"rotation"===Ua?ba(qa,Ea[0]+Ea[2]/2,Ea[1]+Ea[3]/2,Ea[2]/2):da(qa,Ea[0],Ea[1],Ea[2],Ea[3],Ea[0]+Ea[2]/2,Ea[1]+Ea[3]/2,Ha,!0),qa.restore())})},ca=function(qa,za){var ya=(0,l.qf)(za),Ha=(0,z.Z)(ya,4);ya=Ha[0];var Ua=Ha[1],Ea=Ha[2]-ya;Ha=Ha[3]-Ua; var Oa=(0,E.fb)(za,Ea,Ha);qa.strokeStyle="rgba(0,0,0,.05)";qa.lineWidth=Oa-4;Oa=2+Oa/2;switch(za.type){case "rectangle":case "text":case "image":da(qa,ya-Oa,Ua-Oa,Ea+2*Oa,Ha+2*Oa,ya+Ea/2,Ua+Ha/2,za.angle);break;case "diamond":var Xa=Math.hypot(Ea,Ha);!function(Ma,eb,db,Na,oa,Ca){Ma.save();Ma.translate(Na,oa);Ma.rotate(Ca);Ma.beginPath();Ma.moveTo(0,db/2);Ma.lineTo(eb/2,0);Ma.lineTo(0,-db/2);Ma.lineTo(-eb/2,0);Ma.closePath();Ma.stroke();Ma.restore()}(qa,Ea+Oa*Xa/Ha*2,Ha+Oa*Xa/Ea*2,ya+Ea/2,Ua+Ha/2, za.angle);break;case "ellipse":!function(Ma,eb,db,Na,oa,Ca){Ma.beginPath();Ma.ellipse(Na,oa,eb/2,db/2,Ca,0,2*Math.PI);Ma.stroke()}(qa,Ea+2*Oa,Ha+2*Oa,ya+Ea/2,Ua+Ha/2,za.angle)}},ia=function(qa,za){var ya=(0,z.Z)(za,3),Ha=ya[0];za=ya[1];ya=ya[2];var Ua=(0,E.fb)(ya,ya.width,ya.height);qa.strokeStyle="rgba(0,0,0,0)";qa.fillStyle="rgba(0,0,0,.05)";("both"===za?[0,-1]:"start"===za?[0]:[-1]).forEach(function(Ea){Ea=T._.getPointAtIndexGlobalCoordinates(Ha,Ea);Ea=(0,z.Z)(Ea,2);ba(qa,Ea[0],Ea[1],Ua)})},ea= function(qa,za,ya,Ha){var Ua=4l.width||E-aa>l.height)m=(0,x.os)(m,(0,L.dE)({clientX:l.scrollX,clientY:l.scrollY},l)),m=(0,v.Z)(m,4),J=m[0],F=m[1],ha=m[2],X=m[3];return z({scenePoint:{x:(J+ha)/ 2,y:(F+X)/2},viewportDimensions:{width:l.width,height:l.height},zoom:l.zoom})}},756:function(h,k,f){f.d(k,{WM:function(){return u},_4:function(){return X},nn:function(){return m},tJ:function(){return J},w1:function(){return l}});var v=f(2577),x=f(5118),L=f(6340),z=f(8211),u=4,m=6,l="rgba(0,0,0,0.3)",J=function(F,ha,T,Z){var E=Z.scrollX,aa=Z.scrollY,M=Z.zoom;if(0===F.length)return{horizontal:null,vertical:null};F=(0,x.KP)(F);Z=(0,v.Z)(F,4);var S=Z[0],D=Z[1];F=Z[2];Z=Z[3];var O=ha/M.value,P=T/M.value, da=ha-O,ba=T-P;M=parseInt((0,L.IH)("sat"));var H=parseInt((0,L.IH)("sab")),ja=parseInt((0,L.IH)("sal")),N=parseInt((0,L.IH)("sar")),ca=(0,z.G3)().rtl;E=da/2-E+ja;aa=ba/2-aa+M;O=E+O-N;P=aa+P-H;S=Math.min(S,E);D=Math.min(D,aa);F=Math.max(F,O);Z=Math.max(Z,P);return{horizontal:E===S&&O===F?null:{x:Math.max(ja,u)+(E-S)/(F-S)*ha,y:T-m-Math.max(u,H),width:(O-E)/(F-S)*ha-Math.max(2*u,ja+N),height:m},vertical:aa===D&&P===Z?null:{x:ca?Math.max(ja,u):ha-m-Math.max(N,u),y:(aa-D)/(Z-D)*T+Math.max(M,u),width:m, height:(P-aa)/(Z-D)*T-Math.max(2*u,M+H)}}},X=function(F,ha,T){F=[F.horizontal,F.vertical].map(function(E){return null!=E&&E.x<=ha&&ha<=E.x+E.width&&E.y<=T&&T<=E.y+E.height});var Z=(0,v.Z)(F,2);F=Z[0];Z=Z[1];return{isOverEither:F||Z,isOverHorizontal:F,isOverVertical:Z}}},1868:function(h,k,f){f.d(k,{N:function(){return u},PR:function(){return m},Yp:function(){return z},Zs:function(){return J},eD:function(){return l}});var v=f(2577),x=f(5118),L=f(1974),z=function(X,F){F=(0,x.qf)(F);F=(0,v.Z)(F,4);var ha= F[0],T=F[1],Z=F[2],E=F[3];return X.filter(function(aa){var M=(0,x.Pi)(aa),S=(0,v.Z)(M,4);M=S[0];var D=S[1],O=S[2];S=S[3];return!1===aa.locked&&"selection"!==aa.type&&!(0,L.Xh)(aa)&&ha<=M&&T<=D&&Z>=O&&E>=S})},u=function(X,F){return X.some(function(ha){return F.selectedElementIds[ha.id]})},m=function(X,F,ha){X=Array.from(new Set(l(X,F).map(function(T){return ha(T)})));return 1===X.length?X[0]:null},l=function(X,F){var ha=2yc)return[];for(var Vc=0,hd=0,Kd=Array(Math.ceil(Fb.length/yc));VcVc&&(Vc=Fb.length+Vc);for(Vc=Math.min(Fb.length,Math.max(Vc,0))-1;++VcVc&&(Vc=Fb.length+Vc);for(Vc=Math.min(Fb.length-1,Math.max(Vc,0))+1;-1<--Vc;)if(yc(Fb[Vc],Vc,Fb))return Vc;return-1},sa=function(Fb){var yc=5===Fb.length&&"0"===Fb.substr(4,1),Vc=9===Fb.length&&"00"===Fb.substr(7,2);return yc||Vc||Fb===J.Z.elementBackground[0]}, Aa=function(){var Fb,yc,Vc=new Promise(function(hd,Kd){Fb=hd;yc=Kd});return Vc.resolve=Fb,Vc.reject=yc,Vc},Ja=function(Fb){return function(yc){(0,F.unstable_batchedUpdates)(Fb,yc)}},Sa=function(Fb){return ba(function(yc){(0,F.unstable_batchedUpdates)(Fb,yc)})},Ab=function(){var Fb=document.createElement("canvas").getContext("2d");return Fb?(Fb.fillStyle="#f00",Fb.textBaseline="top",Fb.font="32px Arial",Fb.fillText("\ud83d\ude00",0,0),0!==Fb.getImageData(12,12,1,1).data[0]):!1},jb=function(Fb){for(Fb= Fb.parentElement;Fb&&Fb!==document.body;){var yc=window.getComputedStyle(Fb).overflowY;if(Fb.scrollHeight>Fb.clientHeight&&("auto"===yc||"scroll"===yc||"overlay"===yc))return Fb;Fb=Fb.parentElement}return document},Ob=function(Fb){for(Fb=Fb.parentElement;Fb;){if(-1x.length)&&(L=x.length);for(var z=0,u=Array(L);zcrypto.getRandomValues(new Uint8Array(x)).reduce((L,z)=>L+(36>(z&=63)?z.toString(36):62>z?(z-26).toString(36).toUpperCase():62