zettel/static/js/excalidraw.js
2024-03-25 14:43:52 -04:00

1943 lines
No EOL
1.1 MiB
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(function(){
shadow$provide[586]=function(ya,ca,Sa,Q){var w=ca(190).Buffer;!function(Y,y){"object"==typeof Q&&"object"==typeof Sa?Sa.exports=y(ca(19),ca(20)):"function"==typeof define&&define.amd?define(["react","react-dom"],y):"object"==typeof Q?Q.ExcalidrawLib=y(ca(19),ca(20)):Y.ExcalidrawLib=y(Y.React,Y.ReactDOM)}(self,function(Y,y){return function(){function q(g){var h=A[g];if(void 0!==h)return h.exports;h=A[g]={id:g,exports:{}};return u[g](h,h.exports,q),h.exports}var c,u={5779:function(g,h){h.N=void 0;var b=
/^([^\w]*)(javascript|data|vbscript)/im,l=/&#(\w+)(^\w|;)?/g,m=/&(newline|tab);/gi,p=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,D=/^.+(:|&colon;)/gim,v=[".","/"];h.N=function(t){var r;t=(r=t||"",r.replace(l,function(f,E){return String.fromCharCode(E)})).replace(m,"").replace(p,"").trim();return t?-1<v.indexOf(t[0])?t:(r=t.match(D))?b.test(r[0])?"about:blank":t:t:"about:blank"}},7217:function(g,h,b){function l(m,p,{checkForDefaultPrevented:D=!0}={}){return function(v){if(null==m||m(v),!1===
D||!v.defaultPrevented)return null==p?void 0:p(v)}}b.d(h,{M:function(){return l}})},9335:function(g,h,b){function l(...D){return v=>D.forEach(t=>{"function"==typeof t?t(v):null!=t&&(t.current=v)})}function m(...D){return(0,p.useCallback)(l(...D),D)}b.d(h,{F:function(){return l},e:function(){return m}});var p=b(9787)},1267:function(g,h,b){function l(D,v=[]){let t=[];const r=()=>{const f=t.map(E=>(0,p.createContext)(E));return function(E){const B=(null==E?void 0:E[D])||f;return(0,p.useMemo)(()=>({[`__scope${D}`]:{...E,
[D]:B}}),[E,B])}};return r.scopeName=D,[function(f,E){function B(H){const {scope:S,children:L,...T}=H;H=(null==S?void 0:S[D][V])||J;const R=(0,p.useMemo)(()=>T,Object.values(T));return(0,p.createElement)(H.Provider,{value:R},L)}const J=(0,p.createContext)(E),V=t.length;return t=[...t,E],B.displayName=f+"Provider",[B,function(H,S){if(S=(0,p.useContext)((null==S?void 0:S[D][V])||J))return S;if(void 0!==E)return E;throw Error(`\`${H}\` must be used within \`${f}\``);}]},m(r,...v)]}function m(...D){const v=
D[0];if(1===D.length)return v;const t=()=>{const r=D.map(f=>({useScope:f(),scopeName:f.scopeName}));return function(f){const E=r.reduce((B,{useScope:J,scopeName:V})=>({...B,...J(f)[`__scope${V}`]}),{});return(0,p.useMemo)(()=>({[`__scope${v.scopeName}`]:E}),[E])}};return t.scopeName=v.scopeName,t}b.d(h,{b:function(){return l}});var p=b(9787)},5622:function(g,h,b){function l(t){const [r,f]=m.useState(D());return(0,p.b)(()=>{t||f(E=>null!=E?E:String(v++))},[t]),t||(r?`radix-${r}`:"")}b.d(h,{M:function(){return l}});
var m=b(9787),p=b(3348);const D=m["useId".toString()]||(()=>{});let v=0},1483:function(g,h,b){function l(r){return(null==r?void 0:r.animationName)||"none"}b.d(h,{z:function(){return t}});var m=b(9787),p=b(5156),D=b(9335),v=b(3348);const t=r=>{const {present:f,children:E}=r;r=function(V){const [H,S]=(0,m.useState)(),L=(0,m.useRef)({}),T=(0,m.useRef)(V),R=(0,m.useRef)("none"),[G,F]=function(O,M){return(0,m.useReducer)((I,ia)=>{ia=M[I][ia];return null!=ia?ia:I},O)}(V?"mounted":"unmounted",{mounted:{UNMOUNT:"unmounted",
ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return(0,m.useEffect)(()=>{const O=l(L.current);R.current="mounted"===G?O:"none"},[G]),(0,v.b)(()=>{const O=L.current,M=T.current;if(M!==V){const I=R.current,ia=l(O);V?F("MOUNT"):"none"===ia||"none"===(null==O?void 0:O.display)?F("UNMOUNT"):F(M&&I!==ia?"ANIMATION_OUT":"UNMOUNT");T.current=V}},[V,F]),(0,v.b)(()=>{if(H){const O=I=>{const ia=l(L.current).includes(I.animationName);
I.target===H&&ia&&(0,p.flushSync)(()=>F("ANIMATION_END"))},M=I=>{I.target===H&&(R.current=l(L.current))};return H.addEventListener("animationstart",M),H.addEventListener("animationcancel",O),H.addEventListener("animationend",O),()=>{H.removeEventListener("animationstart",M);H.removeEventListener("animationcancel",O);H.removeEventListener("animationend",O)}}F("ANIMATION_END")},[H,F]),{isPresent:["mounted","unmountSuspended"].includes(G),ref:(0,m.useCallback)(O=>{O&&(L.current=getComputedStyle(O));
S(O)},[])}}(f);const B="function"==typeof E?E({present:r.isPresent}):m.Children.only(E),J=(0,D.e)(r.ref,B.ref);return"function"==typeof E||r.isPresent?(0,m.cloneElement)(B,{ref:J}):null};t.displayName="Presence"},3119:function(g,h,b){function l(r,f){r&&(0,D.flushSync)(()=>r.dispatchEvent(f))}b.d(h,{WV:function(){return t},jH:function(){return l}});var m=b(11),p=b(9787),D=b(5156),v=b(4801);const t="a button div h2 h3 img label li nav ol p span svg ul".split(" ").reduce((r,f)=>{const E=(0,p.forwardRef)((B,
J)=>{const {asChild:V,...H}=B;B=V?v.g7:f;return(0,p.useEffect)(()=>{window[Symbol.for("radix-ui")]=!0},[]),(0,p.createElement)(B,(0,m.Z)({},H,{ref:J}))});return E.displayName=`Primitive.${f}`,{...r,[f]:E}},{})},4801:function(g,h,b){function l(E){return(0,D.isValidElement)(E)&&E.type===f}function m(E,B){const J={...B};for(const V in B){const H=E[V],S=B[V];/^on[A-Z]/.test(V)?H&&S?J[V]=(...L)=>{S(...L);H(...L)}:H&&(J[V]=H):"style"===V?J[V]={...H,...S}:"className"===V&&(J[V]=[H,S].filter(Boolean).join(" "))}return{...E,
...J}}b.d(h,{g7:function(){return t}});var p=b(11),D=b(9787),v=b(9335);const t=(0,D.forwardRef)((E,B)=>{const {children:J,...V}=E;E=D.Children.toArray(J);const H=E.find(l);if(H){const S=H.props.children;E=E.map(L=>L===H?1<D.Children.count(S)?D.Children.only(null):(0,D.isValidElement)(S)?S.props.children:null:L);return(0,D.createElement)(r,(0,p.Z)({},V,{ref:B}),(0,D.isValidElement)(S)?(0,D.cloneElement)(S,void 0,E):null)}return(0,D.createElement)(r,(0,p.Z)({},V,{ref:B}),J)});t.displayName="Slot";const r=
(0,D.forwardRef)((E,B)=>{const {children:J,...V}=E;return(0,D.isValidElement)(J)?(0,D.cloneElement)(J,{...m(V,J.props),ref:(0,v.F)(B,J.ref)}):1<D.Children.count(J)?D.Children.only(null):null});r.displayName="SlotClone";const f=({children:E})=>(0,D.createElement)(D.Fragment,null,E)},3060:function(g,h,b){function l(p){const D=(0,m.useRef)(p);return(0,m.useEffect)(()=>{D.current=p}),(0,m.useMemo)(()=>(...v)=>{var t;return null===(t=D.current)||void 0===t?void 0:t.call(D,...v)},[])}b.d(h,{W:function(){return l}});
var m=b(9787)},2673:function(g,h,b){function l({prop:D,defaultProp:v,onChange:t=()=>{}}){const [r,f]=function({defaultProp:J,onChange:V}){J=(0,m.useState)(J);const [H]=J,S=(0,m.useRef)(H),L=(0,p.W)(V);return(0,m.useEffect)(()=>{S.current!==H&&(L(H),S.current=H)},[H,S,L]),J}({defaultProp:v,onChange:t}),E=void 0!==D;v=E?D:r;const B=(0,p.W)(t);return[v,(0,m.useCallback)(J=>{E?(J="function"==typeof J?J(D):J,J!==D&&B(J)):f(J)},[E,D,f,B])]}b.d(h,{T:function(){return l}});var m=b(9787),p=b(3060)},3348:function(g,
h,b){b.d(h,{b:function(){return l}});g=b(9787);const l=(null===globalThis||void 0===globalThis?0:globalThis.document)?g.useLayoutEffect:()=>{}},45:function(g,h,b){function l(p){var D,v,t="";if("string"==typeof p||"number"==typeof p)t+=p;else if("object"==typeof p)if(Array.isArray(p))for(D=0;D<p.length;D++)p[D]&&(v=l(p[D]))&&(t&&(t+=" "),t+=v);else for(D in p)p[D]&&(t&&(t+=" "),t+=D);return t}function m(){for(var p,D,v=0,t="";v<arguments.length;)(p=arguments[v++])&&(D=l(p))&&(t&&(t+=" "),t+=D);return t}
b.d(h,{Z:function(){return m}})},6233:function(g,h){g=function(b){function l(D){for(var v=-1,t=0,r=D.length-7;t<r;)v=(v=(v=(v=(v=(v=(v=(v=v>>>8^m[255&(v^D[t++])])>>>8^m[255&(v^D[t++])])>>>8^m[255&(v^D[t++])])>>>8^m[255&(v^D[t++])])>>>8^m[255&(v^D[t++])])>>>8^m[255&(v^D[t++])])>>>8^m[255&(v^D[t++])])>>>8^m[255&(v^D[t++])];for(;t<r+7;)v=v>>>8^m[255&(v^D[t++])];return-1^v}b.version="0.3.0";var m=function(){for(var D=0,v=Array(256),t=0;256!=t;++t)D=1&(D=1&(D=1&(D=1&(D=1&(D=1&(D=1&(D=1&(D=t)?-306674912^
D>>>1:D>>>1)?-306674912^D>>>1:D>>>1)?-306674912^D>>>1:D>>>1)?-306674912^D>>>1:D>>>1)?-306674912^D>>>1:D>>>1)?-306674912^D>>>1:D>>>1)?-306674912^D>>>1:D>>>1)?-306674912^D>>>1:D>>>1,v[t]=D;return"undefined"!=typeof Int32Array?new Int32Array(v):v}(),p="undefined"!=typeof w;b.table=m;b.bstr=function(D){if(32768<D.length&&p)return l(new w(D));for(var v=-1,t=D.length-1,r=0;r<t;)v=m[255&(v^D.charCodeAt(r++))]^v>>>8,v=m[255&(v^D.charCodeAt(r++))]^v>>>8;return r===t&&(v=v>>>8^m[255&(v^D.charCodeAt(r))]),-1^
v};b.buf=function(D){if(1E4<D.length)return l(D);for(var v=-1,t=0,r=D.length-3;t<r;)v=(v=(v=(v=v>>>8^m[255&(v^D[t++])])>>>8^m[255&(v^D[t++])])>>>8^m[255&(v^D[t++])])>>>8^m[255&(v^D[t++])];for(;t<r+3;)v=v>>>8^m[255&(v^D[t++])];return-1^v};b.str=function(D){for(var v,t,r=-1,f=0,E=D.length;f<E;)128>(v=D.charCodeAt(f++))?r=r>>>8^m[255&(r^v)]:2048>v?r=(r=r>>>8^m[255&(r^(192|v>>6&31))])>>>8^m[255&(r^(128|63&v))]:55296<=v&&57344>v?(v=64+(1023&v),t=1023&D.charCodeAt(f++),r=(r=(r=(r=r>>>8^m[255&(r^(240|v>>
8&7))])>>>8^m[255&(r^(128|v>>2&63))])>>>8^m[255&(r^(128|t>>6&15|3&v))])>>>8^m[255&(r^(128|63&t))]):r=(r=(r=r>>>8^m[255&(r^(224|v>>12&15))])>>>8^m[255&(r^(128|v>>6&63))])>>>8^m[255&(r^(128|63&v))];return-1^r}};"undefined"==typeof DO_NOT_EXPORT_CRC?g(h):g({})},200:function(g,h,b){function l(H,S,L){function T(pa){var va=M,ta=I;return M=I=void 0,W=pa,U=H.apply(ta,va)}function R(pa){var va=pa-aa;return void 0===aa||va>=S||0>va||X&&pa-W>=ia}function G(){var pa=E.Date.now();if(R(pa))return F(pa);var va=
setTimeout,ta=S-(pa-aa);pa=X?V(ta,ia-(pa-W)):ta;Z=va(G,pa)}function F(pa){return Z=void 0,ea&&M?T(pa):(M=I=void 0,U)}function O(){var pa=E.Date.now(),va=R(pa);if(M=arguments,I=this,aa=pa,va){if(void 0===Z)return pa=aa,W=pa,Z=setTimeout(G,S),fa?T(pa):U;if(X)return Z=setTimeout(G,S),T(aa)}return void 0===Z&&(Z=setTimeout(G,S)),U}var M,I,ia,U,Z,aa,W=0,fa=!1,X=!1,ea=!0;if("function"!=typeof H)throw new TypeError("Expected a function");return S=p(S)||0,m(L)&&(fa=!!L.leading,ia=(X="maxWait"in L)?J(p(L.maxWait)||
0,S):ia,ea="trailing"in L?!!L.trailing:ea),O.cancel=function(){void 0!==Z&&clearTimeout(Z);W=0;M=aa=I=Z=void 0},O.flush=function(){return void 0===Z?U:F(E.Date.now())},O}function m(H){var S=typeof H;return!!H&&("object"==S||"function"==S)}function p(H){if("number"==typeof H)return H;if("symbol"==typeof H||H&&"object"==typeof H&&"[object Symbol]"==B.call(H))return NaN;m(H)&&(H="function"==typeof H.valueOf?H.valueOf():H,H=m(H)?H+"":H);if("string"!=typeof H)return 0===H?H:+H;H=H.replace(D,"");var S=
t.test(H);return S||r.test(H)?f(H.slice(2),S?2:8):v.test(H)?NaN:+H}var D=/^\s+|\s+$/g,v=/^[-+]0x[0-9a-f]+$/i,t=/^0b[01]+$/i,r=/^0o[0-7]+$/i,f=parseInt;h="object"==typeof self&&self&&self.Object===Object&&self;var E="object"==typeof b.g&&b.g&&b.g.Object===Object&&b.g||h||Function("return this")(),B=Object.prototype.toString,J=Math.max,V=Math.min;g.exports=function(H,S,L){var T=!0,R=!0;if("function"!=typeof H)throw new TypeError("Expected a function");return m(L)&&(T="leading"in L?!!L.leading:T,R="trailing"in
L?!!L.trailing:R),l(H,S,{leading:T,maxWait:S,trailing:R})}},2744:function(g,h,b){h={};(0,b(9187).assign)(h,b(4395),b(578),b(2684));g.exports=h},4395:function(g,h,b){function l(E){if(!(this instanceof l))return new l(E);E=this.options=D.assign({level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0,to:""},E||{});E.raw&&0<E.windowBits?E.windowBits=-E.windowBits:E.gzip&&0<E.windowBits&&16>E.windowBits&&(E.windowBits+=16);this.err=0;this.msg="";this.ended=!1;this.chunks=[];this.strm=new r;
this.strm.avail_out=0;var B=p.deflateInit2(this.strm,E.level,E.method,E.windowBits,E.memLevel,E.strategy);if(0!==B)throw Error(t[B]);if(E.header&&p.deflateSetHeader(this.strm,E.header),E.dictionary){var J;if(J="string"==typeof E.dictionary?v.string2buf(E.dictionary):"[object ArrayBuffer]"===f.call(E.dictionary)?new Uint8Array(E.dictionary):E.dictionary,0!==(B=p.deflateSetDictionary(this.strm,J)))throw Error(t[B]);this._dict_set=!0}}function m(E,B){B=new l(B);if(B.push(E,!0),B.err)throw B.msg||t[B.err];
return B.result}var p=b(7651),D=b(9187),v=b(8592),t=b(5604),r=b(249),f=Object.prototype.toString;l.prototype.push=function(E,B){var J,V=this.strm,H=this.options.chunkSize;if(this.ended)return!1;B=B===~~B?B:!0===B?4:0;"string"==typeof E?V.input=v.string2buf(E):"[object ArrayBuffer]"===f.call(E)?V.input=new Uint8Array(E):V.input=E;V.next_in=0;V.avail_in=V.input.length;do{if(0===V.avail_out&&(V.output=new D.Buf8(H),V.next_out=0,V.avail_out=H),1!==(J=p.deflate(V,B))&&0!==J)return this.onEnd(J),this.ended=
!0,!1;0!==V.avail_out&&(0!==V.avail_in||4!==B&&2!==B)||("string"===this.options.to?this.onData(v.buf2binstring(D.shrinkBuf(V.output,V.next_out))):this.onData(D.shrinkBuf(V.output,V.next_out)))}while((0<V.avail_in||0===V.avail_out)&&1!==J);return 4===B?(J=p.deflateEnd(this.strm),this.onEnd(J),this.ended=!0,0===J):2!==B||(this.onEnd(0),V.avail_out=0,!0)};l.prototype.onData=function(E){this.chunks.push(E)};l.prototype.onEnd=function(E){0===E&&("string"===this.options.to?this.result=this.chunks.join(""):
this.result=D.flattenChunks(this.chunks));this.chunks=[];this.err=E;this.msg=this.strm.msg};h.Deflate=l;h.deflate=m;h.deflateRaw=function(E,B){return(B=B||{}).raw=!0,m(E,B)};h.gzip=function(E,B){return(B=B||{}).gzip=!0,m(E,B)}},578:function(g,h,b){function l(J){if(!(this instanceof l))return new l(J);var V=this.options=D.assign({chunkSize:16384,windowBits:0,to:""},J||{});V.raw&&0<=V.windowBits&&16>V.windowBits&&(V.windowBits=-V.windowBits,0===V.windowBits&&(V.windowBits=-15));!(0<=V.windowBits&&16>
V.windowBits)||J&&J.windowBits||(V.windowBits+=32);15<V.windowBits&&48>V.windowBits&&0==(15&V.windowBits)&&(V.windowBits|=15);this.err=0;this.msg="";this.ended=!1;this.chunks=[];this.strm=new f;this.strm.avail_out=0;J=p.inflateInit2(this.strm,V.windowBits);if(J!==t.Z_OK)throw Error(r[J]);if(this.header=new E,p.inflateGetHeader(this.strm,this.header),V.dictionary&&("string"==typeof V.dictionary?V.dictionary=v.string2buf(V.dictionary):"[object ArrayBuffer]"===B.call(V.dictionary)&&(V.dictionary=new Uint8Array(V.dictionary)),
V.raw&&(J=p.inflateSetDictionary(this.strm,V.dictionary))!==t.Z_OK))throw Error(r[J]);}function m(J,V){V=new l(V);if(V.push(J,!0),V.err)throw V.msg||r[V.err];return V.result}var p=b(7823),D=b(9187),v=b(8592),t=b(2684),r=b(5604),f=b(249),E=b(9968),B=Object.prototype.toString;l.prototype.push=function(J,V){var H,S,L,T,R=this.strm,G=this.options.chunkSize,F=this.options.dictionary,O=!1;if(this.ended)return!1;V=V===~~V?V:!0===V?t.Z_FINISH:t.Z_NO_FLUSH;"string"==typeof J?R.input=v.binstring2buf(J):"[object ArrayBuffer]"===
B.call(J)?R.input=new Uint8Array(J):R.input=J;R.next_in=0;R.avail_in=R.input.length;do{if(0===R.avail_out&&(R.output=new D.Buf8(G),R.next_out=0,R.avail_out=G),(H=p.inflate(R,t.Z_NO_FLUSH))===t.Z_NEED_DICT&&F&&(H=p.inflateSetDictionary(this.strm,F)),H===t.Z_BUF_ERROR&&!0===O&&(H=t.Z_OK,O=!1),H!==t.Z_STREAM_END&&H!==t.Z_OK)return this.onEnd(H),this.ended=!0,!1;R.next_out&&(0!==R.avail_out&&H!==t.Z_STREAM_END&&(0!==R.avail_in||V!==t.Z_FINISH&&V!==t.Z_SYNC_FLUSH)||("string"===this.options.to?(S=v.utf8border(R.output,
R.next_out),L=R.next_out-S,T=v.buf2string(R.output,S),R.next_out=L,R.avail_out=G-L,L&&D.arraySet(R.output,R.output,S,L,0),this.onData(T)):this.onData(D.shrinkBuf(R.output,R.next_out))));0===R.avail_in&&0===R.avail_out&&(O=!0)}while((0<R.avail_in||0===R.avail_out)&&H!==t.Z_STREAM_END);return H===t.Z_STREAM_END&&(V=t.Z_FINISH),V===t.Z_FINISH?(H=p.inflateEnd(this.strm),this.onEnd(H),this.ended=!0,H===t.Z_OK):V!==t.Z_SYNC_FLUSH||(this.onEnd(t.Z_OK),R.avail_out=0,!0)};l.prototype.onData=function(J){this.chunks.push(J)};
l.prototype.onEnd=function(J){J===t.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=D.flattenChunks(this.chunks));this.chunks=[];this.err=J;this.msg=this.strm.msg};h.Inflate=l;h.inflate=m;h.inflateRaw=function(J,V){return(V=V||{}).raw=!0,m(J,V)};h.ungzip=m},9187:function(g,h){g="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;h.assign=function(m){for(var p=Array.prototype.slice.call(arguments,1);p.length;){var D=p.shift();
if(D){if("object"!=typeof D)throw new TypeError(D+"must be non-object");for(var v in D)Object.prototype.hasOwnProperty.call(D,v)&&(m[v]=D[v])}}return m};h.shrinkBuf=function(m,p){return m.length===p?m:m.subarray?m.subarray(0,p):(m.length=p,m)};var b={arraySet:function(m,p,D,v,t){if(p.subarray&&m.subarray)m.set(p.subarray(D,D+v),t);else for(var r=0;r<v;r++)m[t+r]=p[D+r]},flattenChunks:function(m){var p,D;var v=D=0;for(p=m.length;v<p;v++)D+=m[v].length;var t=new Uint8Array(D);v=D=0;for(p=m.length;v<
p;v++){var r=m[v];t.set(r,D);D+=r.length}return t}},l={arraySet:function(m,p,D,v,t){for(var r=0;r<v;r++)m[t+r]=p[D+r]},flattenChunks:function(m){return[].concat.apply([],m)}};h.setTyped=function(m){m?(h.Buf8=Uint8Array,h.Buf16=Uint16Array,h.Buf32=Int32Array,h.assign(h,b)):(h.Buf8=Array,h.Buf16=Array,h.Buf32=Array,h.assign(h,l))};h.setTyped(g)},8592:function(g,h,b){function l(t,r){if(65534>r&&(t.subarray&&D||!t.subarray&&p))return String.fromCharCode.apply(null,m.shrinkBuf(t,r));for(var f="",E=0;E<
r;E++)f+=String.fromCharCode(t[E]);return f}var m=b(9187),p=!0,D=!0;try{String.fromCharCode.apply(null,[0])}catch(t){p=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(t){D=!1}var v=new m.Buf8(256);for(g=0;256>g;g++)v[g]=252<=g?6:248<=g?5:240<=g?4:224<=g?3:192<=g?2:1;v[254]=v[254]=1;h.string2buf=function(t){var r,f,E,B,J=t.length,V=0;for(E=0;E<J;E++)55296==(64512&(r=t.charCodeAt(E)))&&E+1<J&&56320==(64512&(f=t.charCodeAt(E+1)))&&(r=65536+(r-55296<<10)+(f-56320),E++),V+=128>r?1:2048>
r?2:65536>r?3:4;var H=new m.Buf8(V);for(E=B=0;B<V;E++)55296==(64512&(r=t.charCodeAt(E)))&&E+1<J&&56320==(64512&(f=t.charCodeAt(E+1)))&&(r=65536+(r-55296<<10)+(f-56320),E++),128>r?H[B++]=r:2048>r?(H[B++]=192|r>>>6,H[B++]=128|63&r):65536>r?(H[B++]=224|r>>>12,H[B++]=128|r>>>6&63,H[B++]=128|63&r):(H[B++]=240|r>>>18,H[B++]=128|r>>>12&63,H[B++]=128|r>>>6&63,H[B++]=128|63&r);return H};h.buf2binstring=function(t){return l(t,t.length)};h.binstring2buf=function(t){for(var r=new m.Buf8(t.length),f=0,E=r.length;f<
E;f++)r[f]=t.charCodeAt(f);return r};h.buf2string=function(t,r){var f,E,B,J=r||t.length,V=Array(2*J);for(r=f=0;r<J;)if(128>(E=t[r++]))V[f++]=E;else if(4<(B=v[E]))V[f++]=65533,r+=B-1;else{for(E&=2===B?31:3===B?15:7;1<B&&r<J;)E=E<<6|63&t[r++],B--;1<B?V[f++]=65533:65536>E?V[f++]=E:(E-=65536,V[f++]=55296|E>>10&1023,V[f++]=56320|1023&E)}return l(V,f)};h.utf8border=function(t,r){var f;(r=r||t.length)>t.length&&(r=t.length);for(f=r-1;0<=f&&128==(192&t[f]);)f--;return 0>f||0===f?r:f+v[t[f]]>r?f:r}},3693:function(g){g.exports=
function(h,b,l,m){var p=65535&h|0;h=h>>>16&65535|0;for(var D;0!==l;){l-=D=2E3<l?2E3:l;do h=h+(p=p+b[m++]|0)|0;while(--D);p%=65521;h%=65521}return p|h<<16|0}},2684:function(g){g.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,
Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},8464:function(g){var h=function(){for(var b,l=[],m=0;256>m;m++){b=m;for(var p=0;8>p;p++)b=1&b?3988292384^b>>>1:b>>>1;l[m]=b}return l}();g.exports=function(b,l,m,p){m=p+m;for(b^=-1;p<m;p++)b=b>>>8^h[255&(b^l[p])];return-1^b}},7651:function(g,h,b){function l(I,ia){return I.msg=O[ia],ia}function m(I){for(var ia=I.length;0<=--ia;)I[ia]=0}function p(I){var ia=I.state,U=ia.pending;U>I.avail_out&&(U=I.avail_out);0!==U&&(T.arraySet(I.output,
ia.pending_buf,ia.pending_out,U,I.next_out),I.next_out+=U,ia.pending_out+=U,I.total_out+=U,I.avail_out-=U,ia.pending-=U,0===ia.pending&&(ia.pending_out=0))}function D(I,ia){R._tr_flush_block(I,0<=I.block_start?I.block_start:-1,I.strstart-I.block_start,ia);I.block_start=I.strstart;p(I.strm)}function v(I,ia){I.pending_buf[I.pending++]=ia}function t(I,ia){I.pending_buf[I.pending++]=ia>>>8&255;I.pending_buf[I.pending++]=255&ia}function r(I,ia){var U,Z,aa=I.max_chain_length,W=I.strstart,fa=I.prev_length,
X=I.nice_match,ea=I.strstart>I.w_size-262?I.strstart-(I.w_size-262):0,pa=I.window,va=I.w_mask,ta=I.prev,xa=I.strstart+258,Ga=pa[W+fa-1],Ia=pa[W+fa];I.prev_length>=I.good_match&&(aa>>=2);X>I.lookahead&&(X=I.lookahead);do if(pa[(U=ia)+fa]===Ia&&pa[U+fa-1]===Ga&&pa[U]===pa[W]&&pa[++U]===pa[W+1]){W+=2;for(U++;pa[++W]===pa[++U]&&pa[++W]===pa[++U]&&pa[++W]===pa[++U]&&pa[++W]===pa[++U]&&pa[++W]===pa[++U]&&pa[++W]===pa[++U]&&pa[++W]===pa[++U]&&pa[++W]===pa[++U]&&W<xa;);if(Z=258-(xa-W),W=xa-258,Z>fa){if(I.match_start=
ia,fa=Z,Z>=X)break;Ga=pa[W+fa-1];Ia=pa[W+fa]}}while((ia=ta[ia&va])>ea&&0!=--aa);return fa<=I.lookahead?fa:I.lookahead}function f(I){var ia,U,Z,aa,W,fa,X,ea=I.w_size;do{if(U=I.window_size-I.lookahead-I.strstart,I.strstart>=ea+(ea-262)){T.arraySet(I.window,I.window,ea,ea,0);I.match_start-=ea;I.strstart-=ea;I.block_start-=ea;var pa=ia=I.hash_size;do{var va=I.head[--pa];I.head[pa]=va>=ea?va-ea:0}while(--ia);pa=ia=ea;do va=I.prev[--pa],I.prev[pa]=va>=ea?va-ea:0;while(--ia);U+=ea}if(0===I.strm.avail_in)break;
if(Z=I.strm,aa=I.window,W=I.strstart+I.lookahead,fa=U,X=void 0,(X=Z.avail_in)>fa&&(X=fa),ia=0===X?0:(Z.avail_in-=X,T.arraySet(aa,Z.input,Z.next_in,X,W),1===Z.state.wrap?Z.adler=G(Z.adler,aa,X,W):2===Z.state.wrap&&(Z.adler=F(Z.adler,aa,X,W)),Z.next_in+=X,Z.total_in+=X,X),I.lookahead+=ia,3<=I.lookahead+I.insert)for(pa=I.strstart-I.insert,I.ins_h=I.window[pa],I.ins_h=(I.ins_h<<I.hash_shift^I.window[pa+1])&I.hash_mask;I.insert&&(I.ins_h=(I.ins_h<<I.hash_shift^I.window[pa+3-1])&I.hash_mask,I.prev[pa&I.w_mask]=
I.head[I.ins_h],I.head[I.ins_h]=pa,pa++,I.insert--,!(3>I.lookahead+I.insert)););}while(262>I.lookahead&&0!==I.strm.avail_in)}function E(I,ia){for(var U,Z;;){if(262>I.lookahead){if(f(I),262>I.lookahead&&0===ia)return 1;if(0===I.lookahead)break}if(U=0,3<=I.lookahead&&(I.ins_h=(I.ins_h<<I.hash_shift^I.window[I.strstart+3-1])&I.hash_mask,U=I.prev[I.strstart&I.w_mask]=I.head[I.ins_h],I.head[I.ins_h]=I.strstart),0!==U&&I.strstart-U<=I.w_size-262&&(I.match_length=r(I,U)),3<=I.match_length)if(Z=R._tr_tally(I,
I.strstart-I.match_start,I.match_length-3),I.lookahead-=I.match_length,I.match_length<=I.max_lazy_match&&3<=I.lookahead){I.match_length--;do I.strstart++,I.ins_h=(I.ins_h<<I.hash_shift^I.window[I.strstart+3-1])&I.hash_mask,U=I.prev[I.strstart&I.w_mask]=I.head[I.ins_h],I.head[I.ins_h]=I.strstart;while(0!=--I.match_length);I.strstart++}else I.strstart+=I.match_length,I.match_length=0,I.ins_h=I.window[I.strstart],I.ins_h=(I.ins_h<<I.hash_shift^I.window[I.strstart+1])&I.hash_mask;else Z=R._tr_tally(I,
0,I.window[I.strstart]),I.lookahead--,I.strstart++;if(Z&&(D(I,!1),0===I.strm.avail_out))return 1}return I.insert=2>I.strstart?I.strstart:2,4===ia?(D(I,!0),0===I.strm.avail_out?3:4):I.last_lit&&(D(I,!1),0===I.strm.avail_out)?1:2}function B(I,ia){for(var U,Z,aa;;){if(262>I.lookahead){if(f(I),262>I.lookahead&&0===ia)return 1;if(0===I.lookahead)break}if(U=0,3<=I.lookahead&&(I.ins_h=(I.ins_h<<I.hash_shift^I.window[I.strstart+3-1])&I.hash_mask,U=I.prev[I.strstart&I.w_mask]=I.head[I.ins_h],I.head[I.ins_h]=
I.strstart),I.prev_length=I.match_length,I.prev_match=I.match_start,I.match_length=2,0!==U&&I.prev_length<I.max_lazy_match&&I.strstart-U<=I.w_size-262&&(I.match_length=r(I,U),5>=I.match_length&&(1===I.strategy||3===I.match_length&&4096<I.strstart-I.match_start)&&(I.match_length=2)),3<=I.prev_length&&I.match_length<=I.prev_length){aa=I.strstart+I.lookahead-3;Z=R._tr_tally(I,I.strstart-1-I.prev_match,I.prev_length-3);I.lookahead-=I.prev_length-1;I.prev_length-=2;do++I.strstart<=aa&&(I.ins_h=(I.ins_h<<
I.hash_shift^I.window[I.strstart+3-1])&I.hash_mask,U=I.prev[I.strstart&I.w_mask]=I.head[I.ins_h],I.head[I.ins_h]=I.strstart);while(0!=--I.prev_length);if(I.match_available=0,I.match_length=2,I.strstart++,Z&&(D(I,!1),0===I.strm.avail_out))return 1}else if(I.match_available){if(R._tr_tally(I,0,I.window[I.strstart-1])&&D(I,!1),I.strstart++,I.lookahead--,0===I.strm.avail_out)return 1}else I.match_available=1,I.strstart++,I.lookahead--}return I.match_available&&(R._tr_tally(I,0,I.window[I.strstart-1]),
I.match_available=0),I.insert=2>I.strstart?I.strstart:2,4===ia?(D(I,!0),0===I.strm.avail_out?3:4):I.last_lit&&(D(I,!1),0===I.strm.avail_out)?1:2}function J(I,ia,U,Z,aa){this.good_length=I;this.max_lazy=ia;this.nice_length=U;this.max_chain=Z;this.func=aa}function V(){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 T.Buf16(1146);this.dyn_dtree=new T.Buf16(122);this.bl_tree=new T.Buf16(78);m(this.dyn_ltree);m(this.dyn_dtree);m(this.bl_tree);this.bl_desc=
this.d_desc=this.l_desc=null;this.bl_count=new T.Buf16(16);this.heap=new T.Buf16(573);m(this.heap);this.heap_max=this.heap_len=0;this.depth=new T.Buf16(573);m(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 H(I){var ia;return I&&I.state?(I.total_in=I.total_out=0,I.data_type=2,(ia=I.state).pending=0,ia.pending_out=0,0>ia.wrap&&(ia.wrap=-ia.wrap),ia.status=ia.wrap?42:113,I.adler=2===ia.wrap?0:
1,ia.last_flush=0,R._tr_init(ia),0):l(I,-2)}function S(I){var ia,U=H(I);return 0===U&&((ia=I.state).window_size=2*ia.w_size,m(ia.head),ia.max_lazy_match=M[ia.level].max_lazy,ia.good_match=M[ia.level].good_length,ia.nice_match=M[ia.level].nice_length,ia.max_chain_length=M[ia.level].max_chain,ia.strstart=0,ia.block_start=0,ia.lookahead=0,ia.insert=0,ia.match_length=ia.prev_length=2,ia.match_available=0,ia.ins_h=0),U}function L(I,ia,U,Z,aa,W){if(!I)return-2;var fa=1;if(-1===ia&&(ia=6),0>Z?(fa=0,Z=-Z):
15<Z&&(fa=2,Z-=16),1>aa||9<aa||8!==U||8>Z||15<Z||0>ia||9<ia||0>W||4<W)return l(I,-2);8===Z&&(Z=9);var X=new V;return I.state=X,X.strm=I,X.wrap=fa,X.gzhead=null,X.w_bits=Z,X.w_size=1<<X.w_bits,X.w_mask=X.w_size-1,X.hash_bits=aa+7,X.hash_size=1<<X.hash_bits,X.hash_mask=X.hash_size-1,X.hash_shift=~~((X.hash_bits+3-1)/3),X.window=new T.Buf8(2*X.w_size),X.head=new T.Buf16(X.hash_size),X.prev=new T.Buf16(X.w_size),X.lit_bufsize=1<<aa+6,X.pending_buf_size=4*X.lit_bufsize,X.pending_buf=new T.Buf8(X.pending_buf_size),
X.d_buf=1*X.lit_bufsize,X.l_buf=3*X.lit_bufsize,X.level=ia,X.strategy=W,X.method=U,S(I)}var T=b(9187),R=b(8676),G=b(3693),F=b(8464),O=b(5604);var M=[new J(0,0,0,0,function(I,ia){var U=65535;for(U>I.pending_buf_size-5&&(U=I.pending_buf_size-5);;){if(1>=I.lookahead){if(f(I),0===I.lookahead&&0===ia)return 1;if(0===I.lookahead)break}I.strstart+=I.lookahead;I.lookahead=0;var Z=I.block_start+U;if((0===I.strstart||I.strstart>=Z)&&(I.lookahead=I.strstart-Z,I.strstart=Z,D(I,!1),0===I.strm.avail_out)||I.strstart-
I.block_start>=I.w_size-262&&(D(I,!1),0===I.strm.avail_out))return 1}return I.insert=0,4===ia?(D(I,!0),0===I.strm.avail_out?3:4):(I.strstart>I.block_start&&(D(I,!1),I.strm.avail_out),1)}),new J(4,4,8,4,E),new J(4,5,16,8,E),new J(4,6,32,32,E),new J(4,4,16,16,B),new J(8,16,32,32,B),new J(8,16,128,128,B),new J(8,32,128,256,B),new J(32,128,258,1024,B),new J(32,258,258,4096,B)];h.deflateInit=function(I,ia){return L(I,ia,8,15,8,0)};h.deflateInit2=L;h.deflateReset=S;h.deflateResetKeep=H;h.deflateSetHeader=
function(I,ia){return I&&I.state?2!==I.state.wrap?-2:(I.state.gzhead=ia,0):-2};h.deflate=function(I,ia){var U,Z;if(!I||!I.state||5<ia||0>ia)return I?l(I,-2):-2;if(Z=I.state,!I.output||!I.input&&0!==I.avail_in||666===Z.status&&4!==ia)return l(I,0===I.avail_out?-5:-2);if(Z.strm=I,U=Z.last_flush,Z.last_flush=ia,42===Z.status)if(2===Z.wrap)I.adler=0,v(Z,31),v(Z,139),v(Z,8),Z.gzhead?(v(Z,(Z.gzhead.text?1:0)+(Z.gzhead.hcrc?2:0)+(Z.gzhead.extra?4:0)+(Z.gzhead.name?8:0)+(Z.gzhead.comment?16:0)),v(Z,255&Z.gzhead.time),
v(Z,Z.gzhead.time>>8&255),v(Z,Z.gzhead.time>>16&255),v(Z,Z.gzhead.time>>24&255),v(Z,9===Z.level?2:2<=Z.strategy||2>Z.level?4:0),v(Z,255&Z.gzhead.os),Z.gzhead.extra&&Z.gzhead.extra.length&&(v(Z,255&Z.gzhead.extra.length),v(Z,Z.gzhead.extra.length>>8&255)),Z.gzhead.hcrc&&(I.adler=F(I.adler,Z.pending_buf,Z.pending,0)),Z.gzindex=0,Z.status=69):(v(Z,0),v(Z,0),v(Z,0),v(Z,0),v(Z,0),v(Z,9===Z.level?2:2<=Z.strategy||2>Z.level?4:0),v(Z,3),Z.status=113);else{var aa=8+(Z.w_bits-8<<4)<<8;aa|=(2<=Z.strategy||2>
Z.level?0:6>Z.level?1:6===Z.level?2:3)<<6;0!==Z.strstart&&(aa|=32);Z.status=113;t(Z,aa+(31-aa%31));0!==Z.strstart&&(t(Z,I.adler>>>16),t(Z,65535&I.adler));I.adler=1}if(69===Z.status)if(Z.gzhead.extra){for(aa=Z.pending;Z.gzindex<(65535&Z.gzhead.extra.length)&&(Z.pending!==Z.pending_buf_size||(Z.gzhead.hcrc&&Z.pending>aa&&(I.adler=F(I.adler,Z.pending_buf,Z.pending-aa,aa)),p(I),aa=Z.pending,Z.pending!==Z.pending_buf_size));)v(Z,255&Z.gzhead.extra[Z.gzindex]),Z.gzindex++;Z.gzhead.hcrc&&Z.pending>aa&&(I.adler=
F(I.adler,Z.pending_buf,Z.pending-aa,aa));Z.gzindex===Z.gzhead.extra.length&&(Z.gzindex=0,Z.status=73)}else Z.status=73;if(73===Z.status)if(Z.gzhead.name){aa=Z.pending;do{if(Z.pending===Z.pending_buf_size&&(Z.gzhead.hcrc&&Z.pending>aa&&(I.adler=F(I.adler,Z.pending_buf,Z.pending-aa,aa)),p(I),aa=Z.pending,Z.pending===Z.pending_buf_size)){var W=1;break}W=Z.gzindex<Z.gzhead.name.length?255&Z.gzhead.name.charCodeAt(Z.gzindex++):0;v(Z,W)}while(0!==W);Z.gzhead.hcrc&&Z.pending>aa&&(I.adler=F(I.adler,Z.pending_buf,
Z.pending-aa,aa));0===W&&(Z.gzindex=0,Z.status=91)}else Z.status=91;if(91===Z.status)if(Z.gzhead.comment){aa=Z.pending;do{if(Z.pending===Z.pending_buf_size&&(Z.gzhead.hcrc&&Z.pending>aa&&(I.adler=F(I.adler,Z.pending_buf,Z.pending-aa,aa)),p(I),aa=Z.pending,Z.pending===Z.pending_buf_size)){W=1;break}W=Z.gzindex<Z.gzhead.comment.length?255&Z.gzhead.comment.charCodeAt(Z.gzindex++):0;v(Z,W)}while(0!==W);Z.gzhead.hcrc&&Z.pending>aa&&(I.adler=F(I.adler,Z.pending_buf,Z.pending-aa,aa));0===W&&(Z.status=103)}else Z.status=
103;if(103===Z.status&&(Z.gzhead.hcrc?(Z.pending+2>Z.pending_buf_size&&p(I),Z.pending+2<=Z.pending_buf_size&&(v(Z,255&I.adler),v(Z,I.adler>>8&255),I.adler=0,Z.status=113)):Z.status=113),0!==Z.pending){if(p(I),0===I.avail_out)return Z.last_flush=-1,0}else if(0===I.avail_in&&(ia<<1)-(4<ia?9:0)<=(U<<1)-(4<U?9:0)&&4!==ia)return l(I,-5);if(666===Z.status&&0!==I.avail_in)return l(I,-5);if(0!==I.avail_in||0!==Z.lookahead||0!==ia&&666!==Z.status){U=2===Z.strategy?function(fa,X){for(var ea;;){if(0===fa.lookahead&&
(f(fa),0===fa.lookahead)){if(0===X)return 1;break}if(fa.match_length=0,ea=R._tr_tally(fa,0,fa.window[fa.strstart]),fa.lookahead--,fa.strstart++,ea&&(D(fa,!1),0===fa.strm.avail_out))return 1}return fa.insert=0,4===X?(D(fa,!0),0===fa.strm.avail_out?3:4):fa.last_lit&&(D(fa,!1),0===fa.strm.avail_out)?1:2}(Z,ia):3===Z.strategy?function(fa,X){for(var ea,pa,va,ta,xa=fa.window;;){if(258>=fa.lookahead){if(f(fa),258>=fa.lookahead&&0===X)return 1;if(0===fa.lookahead)break}if(fa.match_length=0,3<=fa.lookahead&&
0<fa.strstart&&(pa=xa[va=fa.strstart-1])===xa[++va]&&pa===xa[++va]&&pa===xa[++va]){for(ta=fa.strstart+258;pa===xa[++va]&&pa===xa[++va]&&pa===xa[++va]&&pa===xa[++va]&&pa===xa[++va]&&pa===xa[++va]&&pa===xa[++va]&&pa===xa[++va]&&va<ta;);fa.match_length=258-(ta-va);fa.match_length>fa.lookahead&&(fa.match_length=fa.lookahead)}if(3<=fa.match_length?(ea=R._tr_tally(fa,1,fa.match_length-3),fa.lookahead-=fa.match_length,fa.strstart+=fa.match_length,fa.match_length=0):(ea=R._tr_tally(fa,0,fa.window[fa.strstart]),
fa.lookahead--,fa.strstart++),ea&&(D(fa,!1),0===fa.strm.avail_out))return 1}return fa.insert=0,4===X?(D(fa,!0),0===fa.strm.avail_out?3:4):fa.last_lit&&(D(fa,!1),0===fa.strm.avail_out)?1:2}(Z,ia):M[Z.level].func(Z,ia);if(3!==U&&4!==U||(Z.status=666),1===U||3===U)return 0===I.avail_out&&(Z.last_flush=-1),0;if(2===U&&(1===ia?R._tr_align(Z):5!==ia&&(R._tr_stored_block(Z,0,0,!1),3===ia&&(m(Z.head),0===Z.lookahead&&(Z.strstart=0,Z.block_start=0,Z.insert=0))),p(I),0===I.avail_out))return Z.last_flush=-1,
0}return 4!==ia?0:0>=Z.wrap?1:(2===Z.wrap?(v(Z,255&I.adler),v(Z,I.adler>>8&255),v(Z,I.adler>>16&255),v(Z,I.adler>>24&255),v(Z,255&I.total_in),v(Z,I.total_in>>8&255),v(Z,I.total_in>>16&255),v(Z,I.total_in>>24&255)):(t(Z,I.adler>>>16),t(Z,65535&I.adler)),p(I),0<Z.wrap&&(Z.wrap=-Z.wrap),0!==Z.pending?0:1)};h.deflateEnd=function(I){var ia;return I&&I.state?42!==(ia=I.state.status)&&69!==ia&&73!==ia&&91!==ia&&103!==ia&&113!==ia&&666!==ia?l(I,-2):(I.state=null,113===ia?l(I,-3):0):-2};h.deflateSetDictionary=
function(I,ia){var U,Z,aa;var W=ia.length;if(!I||!I.state||2===(Z=(U=I.state).wrap)||1===Z&&42!==U.status||U.lookahead)return-2;1===Z&&(I.adler=G(I.adler,ia,W,0));U.wrap=0;W>=U.w_size&&(0===Z&&(m(U.head),U.strstart=0,U.block_start=0,U.insert=0),aa=new T.Buf8(U.w_size),T.arraySet(aa,ia,W-U.w_size,U.w_size,0),ia=aa,W=U.w_size);aa=I.avail_in;var fa=I.next_in;var X=I.input;I.avail_in=W;I.next_in=0;I.input=ia;for(f(U);3<=U.lookahead;){ia=U.strstart;W=U.lookahead-2;do U.ins_h=(U.ins_h<<U.hash_shift^U.window[ia+
3-1])&U.hash_mask,U.prev[ia&U.w_mask]=U.head[U.ins_h],U.head[U.ins_h]=ia,ia++;while(--W);U.strstart=ia;U.lookahead=2;f(U)}return U.strstart+=U.lookahead,U.block_start=U.strstart,U.insert=U.lookahead,U.lookahead=0,U.match_length=U.prev_length=2,U.match_available=0,I.next_in=fa,I.input=X,I.avail_in=aa,U.wrap=Z,0};h.deflateInfo="pako deflate (from Nodeca project)"},9968:function(g){g.exports=function(){this.os=this.xflags=this.time=this.text=0;this.extra=null;this.extra_len=0;this.comment=this.name=
"";this.hcrc=0;this.done=!1}},9365:function(g){g.exports=function(h,b){var l,m,p;var D=h.state;var v=h.next_in;var t=h.input;var r=v+(h.avail_in-5);var f=h.next_out;var E=h.output;b=f-(b-h.avail_out);var B=f+(h.avail_out-257);var J=D.dmax;var V=D.wsize;var H=D.whave;var S=D.wnext;var L=D.window;var T=D.hold;var R=D.bits;var G=D.lencode;var F=D.distcode;var O=(1<<D.lenbits)-1;var M=(1<<D.distbits)-1;a:do{15>R&&(T+=t[v++]<<R,R+=8,T+=t[v++]<<R,R+=8);var I=G[T&O];b:for(;;){if(T>>>=l=I>>>24,R-=l,0===(l=
I>>>16&255))E[f++]=65535&I;else{if(!(16&l)){if(0==(64&l)){I=G[(65535&I)+(T&(1<<l)-1)];continue b}if(32&l){D.mode=12;break a}h.msg="invalid literal/length code";D.mode=30;break a}var ia=65535&I;(l&=15)&&(R<l&&(T+=t[v++]<<R,R+=8),ia+=T&(1<<l)-1,T>>>=l,R-=l);15>R&&(T+=t[v++]<<R,R+=8,T+=t[v++]<<R,R+=8);I=F[T&M];c:for(;;){if(T>>>=l=I>>>24,R-=l,!(16&(l=I>>>16&255))){if(0==(64&l)){I=F[(65535&I)+(T&(1<<l)-1)];continue c}h.msg="invalid distance code";D.mode=30;break a}if(m=65535&I,R<(l&=15)&&(T+=t[v++]<<R,
(R+=8)<l&&(T+=t[v++]<<R,R+=8)),(m+=T&(1<<l)-1)>J){h.msg="invalid distance too far back";D.mode=30;break a}if(T>>>=l,R-=l,m>(l=f-b)){if((l=m-l)>H&&D.sane){h.msg="invalid distance too far back";D.mode=30;break a}if(I=0,p=L,0===S){if(I+=V-l,l<ia){ia-=l;do E[f++]=L[I++];while(--l);I=f-m;p=E}}else if(S<l){if(I+=V+S-l,(l-=S)<ia){ia-=l;do E[f++]=L[I++];while(--l);if(I=0,S<ia){ia-=l=S;do E[f++]=L[I++];while(--l);I=f-m;p=E}}}else if(I+=S-l,l<ia){ia-=l;do E[f++]=L[I++];while(--l);I=f-m;p=E}for(;2<ia;)E[f++]=
p[I++],E[f++]=p[I++],E[f++]=p[I++],ia-=3;ia&&(E[f++]=p[I++],1<ia&&(E[f++]=p[I++]))}else{I=f-m;do E[f++]=E[I++],E[f++]=E[I++],E[f++]=E[I++],ia-=3;while(2<ia);ia&&(E[f++]=E[I++],1<ia&&(E[f++]=E[I++]))}break}}break}}while(v<r&&f<B);v-=ia=R>>3;T&=(1<<(R-=ia<<3))-1;h.next_in=v;h.next_out=f;h.avail_in=v<r?r-v+5:5-(v-r);h.avail_out=f<B?B-f+257:257-(f-B);D.hold=T;D.bits=R}},7823:function(g,h,b){function l(T){return(T>>>24&255)+(T>>>8&65280)+((65280&T)<<8)+((255&T)<<24)}function m(){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 f.Buf16(320);this.work=new f.Buf16(288);this.distdyn=this.lendyn=null;this.was=this.back=this.sane=0}function p(T){var R;return T&&T.state?(R=T.state,T.total_in=
T.total_out=R.total=0,T.msg="",R.wrap&&(T.adler=1&R.wrap),R.mode=1,R.last=0,R.havedict=0,R.dmax=32768,R.head=null,R.hold=0,R.bits=0,R.lencode=R.lendyn=new f.Buf32(852),R.distcode=R.distdyn=new f.Buf32(592),R.sane=1,R.back=-1,0):-2}function D(T){var R;return T&&T.state?((R=T.state).wsize=0,R.whave=0,R.wnext=0,p(T)):-2}function v(T,R){var G,F;return T&&T.state?(F=T.state,0>R?(G=0,R=-R):(G=1+(R>>4),48>R&&(R&=15)),R&&(8>R||15<R)?-2:(null!==F.window&&F.wbits!==R&&(F.window=null),F.wrap=G,F.wbits=R,D(T))):
-2}function t(T,R){var G,F;return T?(F=new m,T.state=F,F.window=null,0!==(G=v(T,R))&&(T.state=null),G):-2}function r(T,R,G,F){var O;T=T.state;return null===T.window&&(T.wsize=1<<T.wbits,T.wnext=0,T.whave=0,T.window=new f.Buf8(T.wsize)),F>=T.wsize?(f.arraySet(T.window,R,G-T.wsize,T.wsize,0),T.wnext=0,T.whave=T.wsize):((O=T.wsize-T.wnext)>F&&(O=F),f.arraySet(T.window,R,G-F,O,T.wnext),(F-=O)?(f.arraySet(T.window,R,G-F,F,0),T.wnext=F,T.whave=T.wsize):(T.wnext+=O,T.wnext===T.wsize&&(T.wnext=0),T.whave<
T.wsize&&(T.whave+=O))),0}var f=b(9187),E=b(3693),B=b(8464),J=b(9365),V=b(6446),H,S,L=!0;h.inflateReset=D;h.inflateReset2=v;h.inflateResetKeep=p;h.inflateInit=function(T){return t(T,15)};h.inflateInit2=t;h.inflate=function(T,R){var G,F,O,M,I,ia,U,Z,aa=0,W=new f.Buf8(4),fa=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!T||!T.state||!T.output||!T.input&&0!==T.avail_in)return-2;12===(G=T.state).mode&&(G.mode=13);var X=T.next_out;var ea=T.output;var pa=T.avail_out;var va=T.next_in;var ta=T.input;
var xa=T.avail_in;var Ga=G.hold;var Ia=G.bits;var Ya=xa;var Fa=pa;var Ka=0;a:for(;;)switch(G.mode){case 1:if(0===G.wrap){G.mode=13;break}for(;16>Ia;){if(0===xa)break a;xa--;Ga+=ta[va++]<<Ia;Ia+=8}if(2&G.wrap&&35615===Ga){G.check=0;W[0]=255&Ga;W[1]=Ga>>>8&255;G.check=B(G.check,W,2,0);Ia=Ga=0;G.mode=2;break}if(G.flags=0,G.head&&(G.head.done=!1),!(1&G.wrap)||(((255&Ga)<<8)+(Ga>>8))%31){T.msg="incorrect header check";G.mode=30;break}if(8!=(15&Ga)){T.msg="unknown compression method";G.mode=30;break}if(Ia-=
4,U=8+(15&(Ga>>>=4)),0===G.wbits)G.wbits=U;else if(U>G.wbits){T.msg="invalid window size";G.mode=30;break}G.dmax=1<<U;T.adler=G.check=1;G.mode=512&Ga?10:12;Ia=Ga=0;break;case 2:for(;16>Ia;){if(0===xa)break a;xa--;Ga+=ta[va++]<<Ia;Ia+=8}if(G.flags=Ga,8!=(255&G.flags)){T.msg="unknown compression method";G.mode=30;break}if(57344&G.flags){T.msg="unknown header flags set";G.mode=30;break}G.head&&(G.head.text=Ga>>8&1);512&G.flags&&(W[0]=255&Ga,W[1]=Ga>>>8&255,G.check=B(G.check,W,2,0));Ia=Ga=0;G.mode=3;
case 3:for(;32>Ia;){if(0===xa)break a;xa--;Ga+=ta[va++]<<Ia;Ia+=8}G.head&&(G.head.time=Ga);512&G.flags&&(W[0]=255&Ga,W[1]=Ga>>>8&255,W[2]=Ga>>>16&255,W[3]=Ga>>>24&255,G.check=B(G.check,W,4,0));Ia=Ga=0;G.mode=4;case 4:for(;16>Ia;){if(0===xa)break a;xa--;Ga+=ta[va++]<<Ia;Ia+=8}G.head&&(G.head.xflags=255&Ga,G.head.os=Ga>>8);512&G.flags&&(W[0]=255&Ga,W[1]=Ga>>>8&255,G.check=B(G.check,W,2,0));Ia=Ga=0;G.mode=5;case 5:if(1024&G.flags){for(;16>Ia;){if(0===xa)break a;xa--;Ga+=ta[va++]<<Ia;Ia+=8}G.length=Ga;
G.head&&(G.head.extra_len=Ga);512&G.flags&&(W[0]=255&Ga,W[1]=Ga>>>8&255,G.check=B(G.check,W,2,0));Ia=Ga=0}else G.head&&(G.head.extra=null);G.mode=6;case 6:if(1024&G.flags&&((F=G.length)>xa&&(F=xa),F&&(G.head&&(U=G.head.extra_len-G.length,G.head.extra||(G.head.extra=Array(G.head.extra_len)),f.arraySet(G.head.extra,ta,va,F,U)),512&G.flags&&(G.check=B(G.check,ta,F,va)),xa-=F,va+=F,G.length-=F),G.length))break a;G.length=0;G.mode=7;case 7:if(2048&G.flags){if(0===xa)break a;F=0;do U=ta[va+F++],G.head&&
U&&65536>G.length&&(G.head.name+=String.fromCharCode(U));while(U&&F<xa);if(512&G.flags&&(G.check=B(G.check,ta,F,va)),xa-=F,va+=F,U)break a}else G.head&&(G.head.name=null);G.length=0;G.mode=8;case 8:if(4096&G.flags){if(0===xa)break a;F=0;do U=ta[va+F++],G.head&&U&&65536>G.length&&(G.head.comment+=String.fromCharCode(U));while(U&&F<xa);if(512&G.flags&&(G.check=B(G.check,ta,F,va)),xa-=F,va+=F,U)break a}else G.head&&(G.head.comment=null);G.mode=9;case 9:if(512&G.flags){for(;16>Ia;){if(0===xa)break a;
xa--;Ga+=ta[va++]<<Ia;Ia+=8}if(Ga!==(65535&G.check)){T.msg="header crc mismatch";G.mode=30;break}Ia=Ga=0}G.head&&(G.head.hcrc=G.flags>>9&1,G.head.done=!0);T.adler=G.check=0;G.mode=12;break;case 10:for(;32>Ia;){if(0===xa)break a;xa--;Ga+=ta[va++]<<Ia;Ia+=8}T.adler=G.check=l(Ga);Ia=Ga=0;G.mode=11;case 11:if(0===G.havedict)return T.next_out=X,T.avail_out=pa,T.next_in=va,T.avail_in=xa,G.hold=Ga,G.bits=Ia,2;T.adler=G.check=1;G.mode=12;case 12:if(5===R||6===R)break a;case 13:if(G.last){Ga>>>=7&Ia;Ia-=7&
Ia;G.mode=27;break}for(;3>Ia;){if(0===xa)break a;xa--;Ga+=ta[va++]<<Ia;Ia+=8}switch(G.last=1&Ga,--Ia,3&(Ga>>>=1)){case 0:G.mode=14;break;case 1:var Ba=G;if(L){H=new f.Buf32(512);S=new f.Buf32(32);for(M=0;144>M;)Ba.lens[M++]=8;for(;256>M;)Ba.lens[M++]=9;for(;280>M;)Ba.lens[M++]=7;for(;288>M;)Ba.lens[M++]=8;V(1,Ba.lens,0,288,H,0,Ba.work,{bits:9});for(M=0;32>M;)Ba.lens[M++]=5;V(2,Ba.lens,0,32,S,0,Ba.work,{bits:5});L=!1}Ba.lencode=H;Ba.lenbits=9;Ba.distcode=S;Ba.distbits=5;if(G.mode=20,6===R){Ga>>>=2;
Ia-=2;break a}break;case 2:G.mode=17;break;case 3:T.msg="invalid block type",G.mode=30}Ga>>>=2;Ia-=2;break;case 14:Ga>>>=7&Ia;for(Ia-=7&Ia;32>Ia;){if(0===xa)break a;xa--;Ga+=ta[va++]<<Ia;Ia+=8}if((65535&Ga)!=(Ga>>>16^65535)){T.msg="invalid stored block lengths";G.mode=30;break}if(G.length=65535&Ga,Ga=0,Ia=0,G.mode=15,6===R)break a;case 15:G.mode=16;case 16:if(F=G.length){if(F>xa&&(F=xa),F>pa&&(F=pa),0===F)break a;f.arraySet(ea,ta,va,F,X);xa-=F;va+=F;pa-=F;X+=F;G.length-=F;break}G.mode=12;break;case 17:for(;14>
Ia;){if(0===xa)break a;xa--;Ga+=ta[va++]<<Ia;Ia+=8}if(G.nlen=257+(31&Ga),Ga>>>=5,Ia-=5,G.ndist=1+(31&Ga),Ga>>>=5,Ia-=5,G.ncode=4+(15&Ga),Ga>>>=4,Ia-=4,286<G.nlen||30<G.ndist){T.msg="too many length or distance symbols";G.mode=30;break}G.have=0;G.mode=18;case 18:for(;G.have<G.ncode;){for(;3>Ia;){if(0===xa)break a;xa--;Ga+=ta[va++]<<Ia;Ia+=8}G.lens[fa[G.have++]]=7&Ga;Ga>>>=3;Ia-=3}for(;19>G.have;)G.lens[fa[G.have++]]=0;if(G.lencode=G.lendyn,G.lenbits=7,Z={bits:G.lenbits},Ka=V(0,G.lens,0,19,G.lencode,
0,G.work,Z),G.lenbits=Z.bits,Ka){T.msg="invalid code lengths set";G.mode=30;break}G.have=0;G.mode=19;case 19:for(;G.have<G.nlen+G.ndist;){for(;aa=G.lencode[Ga&(1<<G.lenbits)-1],I=65535&aa,!((M=aa>>>24)<=Ia);){if(0===xa)break a;xa--;Ga+=ta[va++]<<Ia;Ia+=8}if(16>I)Ga>>>=M,Ia-=M,G.lens[G.have++]=I;else{if(16===I){for(Ba=M+2;Ia<Ba;){if(0===xa)break a;xa--;Ga+=ta[va++]<<Ia;Ia+=8}if(Ga>>>=M,Ia-=M,0===G.have){T.msg="invalid bit length repeat";G.mode=30;break}U=G.lens[G.have-1];F=3+(3&Ga);Ga>>>=2;Ia-=2}else if(17===
I){for(Ba=M+3;Ia<Ba;){if(0===xa)break a;xa--;Ga+=ta[va++]<<Ia;Ia+=8}Ia-=M;U=0;F=3+(7&(Ga>>>=M));Ga>>>=3;Ia-=3}else{for(Ba=M+7;Ia<Ba;){if(0===xa)break a;xa--;Ga+=ta[va++]<<Ia;Ia+=8}Ia-=M;U=0;F=11+(127&(Ga>>>=M));Ga>>>=7;Ia-=7}if(G.have+F>G.nlen+G.ndist){T.msg="invalid bit length repeat";G.mode=30;break}for(;F--;)G.lens[G.have++]=U}}if(30===G.mode)break;if(0===G.lens[256]){T.msg="invalid code -- missing end-of-block";G.mode=30;break}if(G.lenbits=9,Z={bits:G.lenbits},Ka=V(1,G.lens,0,G.nlen,G.lencode,
0,G.work,Z),G.lenbits=Z.bits,Ka){T.msg="invalid literal/lengths set";G.mode=30;break}if(G.distbits=6,G.distcode=G.distdyn,Z={bits:G.distbits},Ka=V(2,G.lens,G.nlen,G.ndist,G.distcode,0,G.work,Z),G.distbits=Z.bits,Ka){T.msg="invalid distances set";G.mode=30;break}if(G.mode=20,6===R)break a;case 20:G.mode=21;case 21:if(6<=xa&&258<=pa){T.next_out=X;T.avail_out=pa;T.next_in=va;T.avail_in=xa;G.hold=Ga;G.bits=Ia;J(T,Fa);X=T.next_out;ea=T.output;pa=T.avail_out;va=T.next_in;ta=T.input;xa=T.avail_in;Ga=G.hold;
Ia=G.bits;12===G.mode&&(G.back=-1);break}for(G.back=0;Ba=(aa=G.lencode[Ga&(1<<G.lenbits)-1])>>>16&255,I=65535&aa,!((M=aa>>>24)<=Ia);){if(0===xa)break a;xa--;Ga+=ta[va++]<<Ia;Ia+=8}if(Ba&&0==(240&Ba)){var la=M;var ka=Ba;for(ia=I;Ba=(aa=G.lencode[ia+((Ga&(1<<la+ka)-1)>>la)])>>>16&255,I=65535&aa,!(la+(M=aa>>>24)<=Ia);){if(0===xa)break a;xa--;Ga+=ta[va++]<<Ia;Ia+=8}Ga>>>=la;Ia-=la;G.back+=la}if(Ga>>>=M,Ia-=M,G.back+=M,G.length=I,0===Ba){G.mode=26;break}if(32&Ba){G.back=-1;G.mode=12;break}if(64&Ba){T.msg=
"invalid literal/length code";G.mode=30;break}G.extra=15&Ba;G.mode=22;case 22:if(G.extra){for(Ba=G.extra;Ia<Ba;){if(0===xa)break a;xa--;Ga+=ta[va++]<<Ia;Ia+=8}G.length+=Ga&(1<<G.extra)-1;Ga>>>=G.extra;Ia-=G.extra;G.back+=G.extra}G.was=G.length;G.mode=23;case 23:for(;Ba=(aa=G.distcode[Ga&(1<<G.distbits)-1])>>>16&255,I=65535&aa,!((M=aa>>>24)<=Ia);){if(0===xa)break a;xa--;Ga+=ta[va++]<<Ia;Ia+=8}if(0==(240&Ba)){la=M;ka=Ba;for(ia=I;Ba=(aa=G.distcode[ia+((Ga&(1<<la+ka)-1)>>la)])>>>16&255,I=65535&aa,!(la+
(M=aa>>>24)<=Ia);){if(0===xa)break a;xa--;Ga+=ta[va++]<<Ia;Ia+=8}Ga>>>=la;Ia-=la;G.back+=la}if(Ga>>>=M,Ia-=M,G.back+=M,64&Ba){T.msg="invalid distance code";G.mode=30;break}G.offset=I;G.extra=15&Ba;G.mode=24;case 24:if(G.extra){for(Ba=G.extra;Ia<Ba;){if(0===xa)break a;xa--;Ga+=ta[va++]<<Ia;Ia+=8}G.offset+=Ga&(1<<G.extra)-1;Ga>>>=G.extra;Ia-=G.extra;G.back+=G.extra}if(G.offset>G.dmax){T.msg="invalid distance too far back";G.mode=30;break}G.mode=25;case 25:if(0===pa)break a;if(F=Fa-pa,G.offset>F){if((F=
G.offset-F)>G.whave&&G.sane){T.msg="invalid distance too far back";G.mode=30;break}F>G.wnext?(F-=G.wnext,O=G.wsize-F):O=G.wnext-F;F>G.length&&(F=G.length);M=G.window}else M=ea,O=X-G.offset,F=G.length;F>pa&&(F=pa);pa-=F;G.length-=F;do ea[X++]=M[O++];while(--F);0===G.length&&(G.mode=21);break;case 26:if(0===pa)break a;ea[X++]=G.length;pa--;G.mode=21;break;case 27:if(G.wrap){for(;32>Ia;){if(0===xa)break a;xa--;Ga|=ta[va++]<<Ia;Ia+=8}if(Fa-=pa,T.total_out+=Fa,G.total+=Fa,Fa&&(T.adler=G.check=G.flags?
B(G.check,ea,Fa,X-Fa):E(G.check,ea,Fa,X-Fa)),Fa=pa,(G.flags?Ga:l(Ga))!==G.check){T.msg="incorrect data check";G.mode=30;break}Ia=Ga=0}G.mode=28;case 28:if(G.wrap&&G.flags){for(;32>Ia;){if(0===xa)break a;xa--;Ga+=ta[va++]<<Ia;Ia+=8}if(Ga!==(4294967295&G.total)){T.msg="incorrect length check";G.mode=30;break}Ia=Ga=0}G.mode=29;case 29:Ka=1;break a;case 30:Ka=-3;break a;case 31:return-4;default:return-2}return T.next_out=X,T.avail_out=pa,T.next_in=va,T.avail_in=xa,G.hold=Ga,G.bits=Ia,(G.wsize||Fa!==T.avail_out&&
30>G.mode&&(27>G.mode||4!==R))&&r(T,T.output,T.next_out,Fa-T.avail_out)?(G.mode=31,-4):(Ya-=T.avail_in,Fa-=T.avail_out,T.total_in+=Ya,T.total_out+=Fa,G.total+=Fa,G.wrap&&Fa&&(T.adler=G.check=G.flags?B(G.check,ea,Fa,T.next_out-Fa):E(G.check,ea,Fa,T.next_out-Fa)),T.data_type=G.bits+(G.last?64:0)+(12===G.mode?128:0)+(20===G.mode||15===G.mode?256:0),(0===Ya&&0===Fa||4===R)&&0===Ka&&(Ka=-5),Ka)};h.inflateEnd=function(T){if(!T||!T.state)return-2;var R=T.state;return R.window&&(R.window=null),T.state=null,
0};h.inflateGetHeader=function(T,R){var G;return T&&T.state?0==(2&(G=T.state).wrap)?-2:(G.head=R,R.done=!1,0):-2};h.inflateSetDictionary=function(T,R){var G,F=R.length;return T&&T.state?0!==(G=T.state).wrap&&11!==G.mode?-2:11===G.mode&&E(1,R,F,0)!==G.check?-3:r(T,R,F,F)?(G.mode=31,-4):(G.havedict=1,0):-2};h.inflateInfo="pako inflate (from Nodeca project)"},6446:function(g,h,b){var l=b(9187),m=[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],p=[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],D=[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],v=[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];g.exports=function(t,r,f,E,B,J,V,H){var S,L,T,R,G,F,O=H.bits,M,I,ia,U,Z,aa=0,W,fa=null,X=0,ea=new l.Buf16(16);var pa=new l.Buf16(16);var va=null,ta=0;for(M=0;15>=M;M++)ea[M]=0;for(I=0;I<E;I++)ea[r[f+
I]]++;var xa=O;for(ia=15;1<=ia&&0===ea[ia];ia--);if(xa>ia&&(xa=ia),0===ia)return B[J++]=20971520,B[J++]=20971520,H.bits=1,0;for(O=1;O<ia&&0===ea[O];O++);xa<O&&(xa=O);for(M=S=1;15>=M;M++)if(S<<=1,0>(S-=ea[M]))return-1;if(0<S&&(0===t||1!==ia))return-1;pa[1]=0;for(M=1;15>M;M++)pa[M+1]=pa[M]+ea[M];for(I=0;I<E;I++)0!==r[f+I]&&(V[pa[r[f+I]]++]=I);if(0===t?(fa=va=V,R=19):1===t?(fa=m,X-=257,va=p,ta-=257,R=256):(fa=D,va=v,R=-1),W=0,I=0,M=O,pa=J,U=xa,Z=0,T=-1,E=(aa=1<<xa)-1,1===t&&852<aa||2===t&&592<aa)return 1;
for(;;){var Ga=M-Z;V[I]<R?(G=0,F=V[I]):V[I]>R?(G=va[ta+V[I]],F=fa[X+V[I]]):(G=96,F=0);S=1<<M-Z;O=L=1<<U;do B[pa+(W>>Z)+(L-=S)]=Ga<<24|G<<16|F|0;while(0!==L);for(S=1<<M-1;W&S;)S>>=1;if(0!==S?(W&=S-1,W+=S):W=0,I++,0==--ea[M]){if(M===ia)break;M=r[f+V[I]]}if(M>xa&&(W&E)!==T){0===Z&&(Z=xa);pa+=O;for(S=1<<(U=M-Z);U+Z<ia&&!(0>=(S-=ea[U+Z]));)U++,S<<=1;if(aa+=1<<U,1===t&&852<aa||2===t&&592<aa)return 1;B[T=W&E]=xa<<24|U<<16|pa-J|0}}return 0!==W&&(B[pa+W]=M-Z<<24|4194304),H.bits=xa,0}},5604:function(g){g.exports=
{2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},8676:function(g,h,b){function l(xa){for(var Ga=xa.length;0<=--Ga;)xa[Ga]=0}function m(xa,Ga,Ia,Ya,Fa){this.static_tree=xa;this.extra_bits=Ga;this.extra_base=Ia;this.elems=Ya;this.max_length=Fa;this.has_stree=xa&&xa.length}function p(xa,Ga){this.dyn_tree=xa;this.max_code=0;this.stat_desc=Ga}function D(xa){return 256>xa?aa[xa]:
aa[256+(xa>>>7)]}function v(xa,Ga){xa.pending_buf[xa.pending++]=255&Ga;xa.pending_buf[xa.pending++]=Ga>>>8&255}function t(xa,Ga,Ia){xa.bi_valid>16-Ia?(xa.bi_buf|=Ga<<xa.bi_valid&65535,v(xa,xa.bi_buf),xa.bi_buf=Ga>>16-xa.bi_valid,xa.bi_valid+=Ia-16):(xa.bi_buf|=Ga<<xa.bi_valid&65535,xa.bi_valid+=Ia)}function r(xa,Ga,Ia){t(xa,Ia[2*Ga],Ia[2*Ga+1])}function f(xa,Ga){var Ia=0;do Ia|=1&xa,xa>>>=1,Ia<<=1;while(0<--Ga);return Ia>>>1}function E(xa,Ga,Ia){var Ya,Fa=Array(16),Ka=0;for(Ya=1;15>=Ya;Ya++)Fa[Ya]=
Ka=Ka+Ia[Ya-1]<<1;for(Ia=0;Ia<=Ga;Ia++)Ya=xa[2*Ia+1],0!==Ya&&(xa[2*Ia]=f(Fa[Ya]++,Ya))}function B(xa){var Ga;for(Ga=0;286>Ga;Ga++)xa.dyn_ltree[2*Ga]=0;for(Ga=0;30>Ga;Ga++)xa.dyn_dtree[2*Ga]=0;for(Ga=0;19>Ga;Ga++)xa.bl_tree[2*Ga]=0;xa.dyn_ltree[512]=1;xa.opt_len=xa.static_len=0;xa.last_lit=xa.matches=0}function J(xa){8<xa.bi_valid?v(xa,xa.bi_buf):0<xa.bi_valid&&(xa.pending_buf[xa.pending++]=xa.bi_buf);xa.bi_buf=0;xa.bi_valid=0}function V(xa,Ga,Ia,Ya){var Fa=2*Ga,Ka=2*Ia;return xa[Fa]<xa[Ka]||xa[Fa]===
xa[Ka]&&Ya[Ga]<=Ya[Ia]}function H(xa,Ga,Ia){for(var Ya=xa.heap[Ia],Fa=Ia<<1;Fa<=xa.heap_len&&(Fa<xa.heap_len&&V(Ga,xa.heap[Fa+1],xa.heap[Fa],xa.depth)&&Fa++,!V(Ga,Ya,xa.heap[Fa],xa.depth));)xa.heap[Ia]=xa.heap[Fa],Ia=Fa,Fa<<=1;xa.heap[Ia]=Ya}function S(xa,Ga,Ia){var Ya,Fa,Ka=0;if(0!==xa.last_lit){do{var Ba=xa.pending_buf[xa.d_buf+2*Ka]<<8|xa.pending_buf[xa.d_buf+2*Ka+1];var la=xa.pending_buf[xa.l_buf+Ka];Ka++;0===Ba?r(xa,la,Ga):(r(xa,(Ya=W[la])+256+1,Ga),0!==(Fa=O[Ya])&&t(xa,la-fa[Ya],Fa),r(xa,Ya=
D(--Ba),Ia),0!==(Fa=M[Ya])&&t(xa,Ba-va[Ya],Fa))}while(Ka<xa.last_lit)}r(xa,256,Ga)}function L(xa,Ga){var Ia,Ya,Fa=Ga.dyn_tree;var Ka=Ga.stat_desc.static_tree;var Ba=Ga.stat_desc.has_stree,la=Ga.stat_desc.elems,ka=-1;xa.heap_len=0;xa.heap_max=573;for(Ia=0;Ia<la;Ia++)0!==Fa[2*Ia]?(xa.heap[++xa.heap_len]=ka=Ia,xa.depth[Ia]=0):Fa[2*Ia+1]=0;for(;2>xa.heap_len;)Fa[2*(Ya=xa.heap[++xa.heap_len]=2>ka?++ka:0)]=1,xa.depth[Ya]=0,xa.opt_len--,Ba&&(xa.static_len-=Ka[2*Ya+1]);Ga.max_code=ka;for(Ia=xa.heap_len>>
1;1<=Ia;Ia--)H(xa,Fa,Ia);Ya=la;do Ia=xa.heap[1],xa.heap[1]=xa.heap[xa.heap_len--],H(xa,Fa,1),Ka=xa.heap[1],xa.heap[--xa.heap_max]=Ia,xa.heap[--xa.heap_max]=Ka,Fa[2*Ya]=Fa[2*Ia]+Fa[2*Ka],xa.depth[Ya]=(xa.depth[Ia]>=xa.depth[Ka]?xa.depth[Ia]:xa.depth[Ka])+1,Fa[2*Ia+1]=Fa[2*Ka+1]=Ya,xa.heap[1]=Ya++,H(xa,Fa,1);while(2<=xa.heap_len);xa.heap[--xa.heap_max]=xa.heap[1];var ua,na,oa,La,Oa;Ia=Ga.dyn_tree;Ya=Ga.max_code;Ka=Ga.stat_desc.static_tree;Ba=Ga.stat_desc.has_stree;la=Ga.stat_desc.extra_bits;var Va=
Ga.stat_desc.extra_base,Ma=Ga.stat_desc.max_length,Ua=0;for(oa=0;15>=oa;oa++)xa.bl_count[oa]=0;Ia[2*xa.heap[xa.heap_max]+1]=0;for(Ga=xa.heap_max+1;573>Ga;Ga++)(oa=Ia[2*Ia[2*(ua=xa.heap[Ga])+1]+1]+1)>Ma&&(oa=Ma,Ua++),Ia[2*ua+1]=oa,ua>Ya||(xa.bl_count[oa]++,La=0,ua>=Va&&(La=la[ua-Va]),Oa=Ia[2*ua],xa.opt_len+=Oa*(oa+La),Ba&&(xa.static_len+=Oa*(Ka[2*ua+1]+La)));if(0!==Ua){do{for(oa=Ma-1;0===xa.bl_count[oa];)oa--;xa.bl_count[oa]--;xa.bl_count[oa+1]+=2;xa.bl_count[Ma]--;Ua-=2}while(0<Ua);for(oa=Ma;0!==
oa;oa--)for(ua=xa.bl_count[oa];0!==ua;)(na=xa.heap[--Ga])>Ya||(Ia[2*na+1]!==oa&&(xa.opt_len+=(oa-Ia[2*na+1])*Ia[2*na],Ia[2*na+1]=oa),ua--)}E(Fa,ka,xa.bl_count)}function T(xa,Ga,Ia){var Ya,Fa=-1,Ka=Ga[1],Ba=0,la=7,ka=4;0===Ka&&(la=138,ka=3);Ga[2*(Ia+1)+1]=65535;for(Ya=0;Ya<=Ia;Ya++){var ua=Ka;Ka=Ga[2*(Ya+1)+1];++Ba<la&&ua===Ka||(Ba<ka?xa.bl_tree[2*ua]+=Ba:0!==ua?(ua!==Fa&&xa.bl_tree[2*ua]++,xa.bl_tree[32]++):10>=Ba?xa.bl_tree[34]++:xa.bl_tree[36]++,Ba=0,Fa=ua,0===Ka?(la=138,ka=3):ua===Ka?(la=6,ka=
3):(la=7,ka=4))}}function R(xa,Ga,Ia){var Ya,Fa,Ka=-1,Ba=Ga[1],la=0,ka=7,ua=4;0===Ba&&(ka=138,ua=3);for(Ya=0;Ya<=Ia;Ya++)if(Fa=Ba,Ba=Ga[2*(Ya+1)+1],!(++la<ka&&Fa===Ba)){if(la<ua){do r(xa,Fa,xa.bl_tree);while(0!=--la)}else 0!==Fa?(Fa!==Ka&&(r(xa,Fa,xa.bl_tree),la--),r(xa,16,xa.bl_tree),t(xa,la-3,2)):10>=la?(r(xa,17,xa.bl_tree),t(xa,la-3,3)):(r(xa,18,xa.bl_tree),t(xa,la-11,7));la=0;Ka=Fa;0===Ba?(ka=138,ua=3):Fa===Ba?(ka=6,ua=3):(ka=7,ua=4)}}function G(xa,Ga,Ia,Ya){t(xa,Ya?1:0,3);J(xa);v(xa,Ia);v(xa,
~Ia);F.arraySet(xa.pending_buf,xa.window,Ga,Ia,xa.pending);xa.pending+=Ia}var F=b(9187),O=[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],M=[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],I=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],ia=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],U=Array(576);l(U);var Z=Array(60);l(Z);var aa=Array(512);l(aa);var W=Array(256);l(W);var fa=Array(29);l(fa);var X,ea,pa,va=Array(30);l(va);var ta=!1;h._tr_init=function(xa){if(!ta){var Ga,
Ia,Ya,Fa=Array(16);for(Ya=Ia=0;28>Ya;Ya++)for(fa[Ya]=Ia,Ga=0;Ga<1<<O[Ya];Ga++)W[Ia++]=Ya;W[Ia-1]=Ya;for(Ya=Ia=0;16>Ya;Ya++)for(va[Ya]=Ia,Ga=0;Ga<1<<M[Ya];Ga++)aa[Ia++]=Ya;for(Ia>>=7;30>Ya;Ya++)for(va[Ya]=Ia<<7,Ga=0;Ga<1<<M[Ya]-7;Ga++)aa[256+Ia++]=Ya;for(Ga=0;15>=Ga;Ga++)Fa[Ga]=0;for(Ga=0;143>=Ga;)U[2*Ga+1]=8,Ga++,Fa[8]++;for(;255>=Ga;)U[2*Ga+1]=9,Ga++,Fa[9]++;for(;279>=Ga;)U[2*Ga+1]=7,Ga++,Fa[7]++;for(;287>=Ga;)U[2*Ga+1]=8,Ga++,Fa[8]++;E(U,287,Fa);for(Ga=0;30>Ga;Ga++)Z[2*Ga+1]=5,Z[2*Ga]=f(Ga,5);X=
new m(U,O,257,286,15);ea=new m(Z,M,0,30,15);pa=new m([],I,0,19,7);!0;ta=!0}xa.l_desc=new p(xa.dyn_ltree,X);xa.d_desc=new p(xa.dyn_dtree,ea);xa.bl_desc=new p(xa.bl_tree,pa);xa.bi_buf=0;xa.bi_valid=0;B(xa)};h._tr_stored_block=G;h._tr_flush_block=function(xa,Ga,Ia,Ya){var Fa,Ka,Ba=0;0<xa.level?(2===xa.strm.data_type&&(xa.strm.data_type=function(la){var ka,ua=4093624447;for(ka=0;31>=ka;ka++,ua>>>=1)if(1&ua&&0!==la.dyn_ltree[2*ka])return 0;if(0!==la.dyn_ltree[18]||0!==la.dyn_ltree[20]||0!==la.dyn_ltree[26])return 1;
for(ka=32;256>ka;ka++)if(0!==la.dyn_ltree[2*ka])return 1;return 0}(xa)),L(xa,xa.l_desc),L(xa,xa.d_desc),Ba=function(la){var ka;T(la,la.dyn_ltree,la.l_desc.max_code);T(la,la.dyn_dtree,la.d_desc.max_code);L(la,la.bl_desc);for(ka=18;3<=ka&&0===la.bl_tree[2*ia[ka]+1];ka--);return la.opt_len+=3*(ka+1)+14,ka}(xa),Fa=xa.opt_len+3+7>>>3,(Ka=xa.static_len+3+7>>>3)<=Fa&&(Fa=Ka)):Fa=Ka=Ia+5;Ia+4<=Fa&&-1!==Ga?G(xa,Ga,Ia,Ya):4===xa.strategy||Ka===Fa?(t(xa,2+(Ya?1:0),3),S(xa,U,Z)):(t(xa,4+(Ya?1:0),3),function(la,
ka,ua,na){var oa;t(la,ka-257,5);t(la,ua-1,5);t(la,na-4,4);for(oa=0;oa<na;oa++)t(la,la.bl_tree[2*ia[oa]+1],3);R(la,la.dyn_ltree,ka-1);R(la,la.dyn_dtree,ua-1)}(xa,xa.l_desc.max_code+1,xa.d_desc.max_code+1,Ba+1),S(xa,xa.dyn_ltree,xa.dyn_dtree));B(xa);Ya&&J(xa)};h._tr_tally=function(xa,Ga,Ia){return xa.pending_buf[xa.d_buf+2*xa.last_lit]=Ga>>>8&255,xa.pending_buf[xa.d_buf+2*xa.last_lit+1]=255&Ga,xa.pending_buf[xa.l_buf+xa.last_lit]=255&Ia,xa.last_lit++,0===Ga?xa.dyn_ltree[2*Ia]++:(xa.matches++,Ga--,xa.dyn_ltree[2*
(W[Ia]+256+1)]++,xa.dyn_dtree[2*D(Ga)]++),xa.last_lit===xa.lit_bufsize-1};h._tr_align=function(xa){t(xa,2,3);r(xa,256,U);16===xa.bi_valid?(v(xa,xa.bi_buf),xa.bi_buf=0,xa.bi_valid=0):8<=xa.bi_valid&&(xa.pending_buf[xa.pending++]=255&xa.bi_buf,xa.bi_buf>>=8,xa.bi_valid-=8)}},249:function(g){g.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(g){g.exports=
function(h){h.data&&h.name&&(h=h.data);for(var b=!0,l="",m="",p=0;p<h.length;p++){var D=h[p];if(b)D?m+=String.fromCharCode(D):b=!1;else{if(!D)throw Error("Invalid NULL character found. 0x00 character is not permitted in tEXt content");l+=String.fromCharCode(D)}}return{keyword:m,text:l}}},9686:function(g){g.exports=function(h,b){if(h=String(h),b=String(b),!/^[\x00-\xFF]+$/.test(h)||!/^[\x00-\xFF]+$/.test(b))throw Error("Only Latin-1 characters are permitted in PNG tEXt chunks. You might want to consider base64 encoding and/or zEXt compression");
if(80<=h.length)throw Error('Keyword "'+h+'" is longer than the 79-character limit imposed by the PNG specification');for(var l,m=new Uint8Array(h.length+b.length+1),p=0,D=0;D<h.length;D++){if(!(l=h.charCodeAt(D)))throw Error("0x00 character is not permitted in tEXt keywords");m[p++]=l}for(h=m[p++]=0;h<b.length;h++){if(!(l=b.charCodeAt(h)))throw Error("0x00 character is not permitted in tEXt content");m[p++]=l}return{name:"tEXt",data:m}}},1194:function(g,h,b){h.encode=b(9686);h.decode=b(9066)},3434:function(g,
h,b){var l=b(5714),m=b(6233);g.exports=function(t){var r,f=8,E=f;for(r=0;r<t.length;r++)f+=t[r].data.length,f+=12;f=new Uint8Array(f);f[0]=137;f[1]=80;f[2]=78;f[3]=71;f[4]=13;f[5]=10;f[6]=26;f[7]=10;for(r=0;r<t.length;r++){var B=t[r],J=B.name;B=B.data;var V=B.length;J=[J.charCodeAt(0),J.charCodeAt(1),J.charCodeAt(2),J.charCodeAt(3)];v[0]=V;f[E++]=p[3];f[E++]=p[2];f[E++]=p[1];f[E++]=p[0];f[E++]=J[0];f[E++]=J[1];f[E++]=J[2];f[E++]=J[3];for(var H=0;H<V;)f[E++]=B[H++];B=J.concat(l(B));B=m.buf(B);D[0]=
B;f[E++]=p[3];f[E++]=p[2];f[E++]=p[1];f[E++]=p[0]}return f};var p=new Uint8Array(4),D=new Int32Array(p.buffer),v=new Uint32Array(p.buffer)},2983:function(g,h,b){var l=b(6233);g.exports=function(v){if(137!==v[0])throw Error("Invalid .png file header");if(80!==v[1])throw Error("Invalid .png file header");if(78!==v[2])throw Error("Invalid .png file header");if(71!==v[3])throw Error("Invalid .png file header");if(13!==v[4])throw Error("Invalid .png file header: possibly caused by DOS-Unix line ending conversion?");
if(10!==v[5])throw Error("Invalid .png file header: possibly caused by DOS-Unix line ending conversion?");if(26!==v[6])throw Error("Invalid .png file header");if(10!==v[7])throw Error("Invalid .png file header: possibly caused by DOS-Unix line ending conversion?");for(var t=!1,r=[],f=8;f<v.length;){m[3]=v[f++];m[2]=v[f++];m[1]=v[f++];m[0]=v[f++];var E=D[0]+4,B=new Uint8Array(E);B[0]=v[f++];B[1]=v[f++];B[2]=v[f++];B[3]=v[f++];var J=String.fromCharCode(B[0])+String.fromCharCode(B[1])+String.fromCharCode(B[2])+
String.fromCharCode(B[3]);if(!r.length&&"IHDR"!==J)throw Error("IHDR header missing");if("IEND"===J){t=!0;r.push({name:J,data:new Uint8Array(0)});break}for(var V=4;V<E;V++)B[V]=v[f++];m[3]=v[f++];m[2]=v[f++];m[1]=v[f++];m[0]=v[f++];E=p[0];if(l.buf(B)!==E)throw Error("CRC values for "+J+" header do not match, PNG file is likely corrupted");B=new Uint8Array(B.buffer.slice(4));r.push({name:J,data:B})}if(!t)throw Error(".png file ended prematurely: no IEND header was found");return r};var m=new Uint8Array(4),
p=new Int32Array(m.buffer),D=new Uint32Array(m.buffer)},1493:function(g,h,b){function l(r,f){return Math.pow(r[0]-f[0],2)+Math.pow(r[1]-f[1],2)}function m(r,f,E){return[r[0]+(f[0]-r[0])*E,r[1]+(f[1]-r[1])*E]}function p(r,f,E,B){B=B||[];var J=r[f+0],V=r[f+1],H=r[f+2];const S=r[f+3];var L=3*V[0]-2*J[0]-S[0];L*=L;V=3*V[1]-2*J[1]-S[1];V*=V;let T=3*H[0]-2*S[0]-J[0];T*=T;J=3*H[1]-2*S[1]-J[1];(J*=J,L<T&&(L=T),V<J&&(V=J),L+V)<E?(E=r[f+0],B.length?1<(R=B[B.length-1],G=E,Math.sqrt(l(R,G)))&&B.push(E):B.push(E),
B.push(r[f+3])):(R=r[f+0],L=r[f+1],G=r[f+2],r=r[f+3],f=m(R,L,.5),J=m(L,G,.5),G=m(G,r,.5),L=m(f,J,.5),J=m(J,G,.5),H=m(L,J,.5),p([R,f,L,H],0,E,B),p([H,J,G,r],0,E,B));var R,G;return B}function D(r,f){return v(r,0,r.length,f)}function v(r,f,E,B,J){J=J||[];const V=r[f],H=r[E-1];let S=0,L=1;for(let O=f+1;O<E-1;++O){a:{var T=r[O],R=V,G=H;var F=l(R,G);if(0===F){F=l(T,R);break a}let M=((T[0]-R[0])*(G[0]-R[0])+(T[1]-R[1])*(G[1]-R[1]))/F;F=(M=Math.max(0,Math.min(1,M)),l(T,m(R,G,M)))}T=F;T>S&&(S=T,L=O)}return Math.sqrt(S)>
B?(v(r,f,L+1,B,J),v(r,L,E,B,J)):(J.length||J.push(V),J.push(H)),J}function t(r,f=.15,E){const B=[],J=(r.length-1)/3;for(let V=0;V<J;V++)p(r,3*V,f,B);return E&&0<E?v(B,0,B.length,E):B}b.d(h,{o:function(){return D},s:function(){return t}})},6094:function(g,h,b){function l(t,r,f){var E,B={},J=null,V=null;for(E in void 0!==f&&(J=""+f),void 0!==r.key&&(J=""+r.key),void 0!==r.ref&&(V=r.ref),r)p.call(r,E)&&!v.hasOwnProperty(E)&&(B[E]=r[E]);if(t&&t.defaultProps)for(E in r=t.defaultProps)void 0===B[E]&&(B[E]=
r[E]);return{$$typeof:m,type:t,key:J,ref:V,props:B,_owner:D.current}}g=b(9787);var m=Symbol.for("react.element");b=Symbol.for("react.fragment");var p=Object.prototype.hasOwnProperty,D=g.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,v={key:!0,ref:!0,__self:!0,__source:!0};h.Fragment=b;h.jsx=l;h.jsxs=l},4512:function(g,h,b){g.exports=b(6094)},6096:function(g,h,b){function l(Fa,Ka,Ba){if(Fa&&Fa.length){const [la,ka]=Ka;Ka=Math.PI/180*Ba;const ua=Math.cos(Ka),na=Math.sin(Ka);Fa.forEach(oa=>
{const [La,Oa]=oa;oa[0]=(La-la)*ua-(Oa-ka)*na+la;oa[1]=(La-la)*na+(Oa-ka)*ua+ka})}}function m(Fa){const Ka=Fa[0];Fa=Fa[1];return Math.sqrt(Math.pow(Ka[0]-Fa[0],2)+Math.pow(Ka[1]-Fa[1],2))}function p(Fa,Ka){const Ba=Ka.hachureAngle+90;var la=Ka.hachureGap;0>la&&(la=4*Ka.strokeWidth);la=Math.max(la,.1);Ka=[0,0];if(Ba)for(const ka of Fa)l(ka,Ka,Ba);la=function(ka,ua){var na=[];for(var oa of ka)ka=[...oa],ka[0].join(",")!==ka[ka.length-1].join(",")&&ka.push([ka[0][0],ka[0][1]]),2<ka.length&&na.push(ka);
oa=[];ua=Math.max(ua,.1);ka=[];for(var La of na)for(na=0;na<La.length-1;na++){const Ma=La[na],Ua=La[na+1];if(Ma[1]!==Ua[1]){const ib=Math.min(Ma[1],Ua[1]);ka.push({ymin:ib,ymax:Math.max(Ma[1],Ua[1]),x:ib===Ma[1]?Ma[0]:Ua[0],islope:(Ua[0]-Ma[0])/(Ua[1]-Ma[1])})}}if(ka.sort((Ma,Ua)=>Ma.ymin<Ua.ymin?-1:Ma.ymin>Ua.ymin?1:Ma.x<Ua.x?-1:Ma.x>Ua.x?1:Ma.ymax===Ua.ymax?0:(Ma.ymax-Ua.ymax)/Math.abs(Ma.ymax-Ua.ymax)),!ka.length)return oa;let Oa=[],Va=ka[0].ymin;for(;Oa.length||ka.length;){if(ka.length){La=-1;
for(na=0;na<ka.length&&!(ka[na].ymin>Va);na++)La=na;ka.splice(0,La+1).forEach(Ma=>{Oa.push({s:Va,edge:Ma})})}if(Oa=Oa.filter(Ma=>!(Ma.edge.ymax<=Va)),Oa.sort((Ma,Ua)=>Ma.edge.x===Ua.edge.x?0:(Ma.edge.x-Ua.edge.x)/Math.abs(Ma.edge.x-Ua.edge.x)),1<Oa.length)for(La=0;La<Oa.length;La+=2){na=La+1;if(na>=Oa.length)break;oa.push([[Math.round(Oa[La].edge.x),Va],[Math.round(Oa[na].edge.x),Va]])}Va+=ua;Oa.forEach(Ma=>{Ma.edge.x+=ua*Ma.edge.islope})}return oa}(Fa,la);if(Ba){for(const ka of Fa)l(ka,Ka,-Ba);!function(ka,
ua,na){const oa=[];ka.forEach(La=>oa.push(...La));l(oa,ua,na)}(la,Ka,-Ba)}return la}function D(Fa){const Ka=[];a:{var Ba=Fa;for(var la=[];""!==Ba;){if(!Ba.match(/^([ \t\r\n,]+)/))if(Ba.match(/^([aAcChHlLmMqQsStTvVzZ])/))la[la.length]={type:0,text:RegExp.$1};else{if(!Ba.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/)){Ba=[];break a}la[la.length]={type:1,text:`${parseFloat(RegExp.$1)}`}}Ba=Ba.substr(RegExp.$1.length)}Ba=(la[la.length]={type:2,text:""},la)}la="BOD";let ka=0;for(var ua=
Ba[ka];2!==ua.type;){let na=0;const oa=[];if("BOD"===la){if("M"!==ua.text&&"m"!==ua.text)return D("M0,0"+Fa);ka++;na=xa[ua.text];la=ua.text}else 1===ua.type?na=xa[la]:(ka++,na=xa[ua.text],la=ua.text);if(!(ka+na<Ba.length))throw Error("Path data ended short");for(ua=ka;ua<ka+na;ua++){const La=Ba[ua];if(1!==La.type)throw Error("Param not a number: "+la+","+La.text);oa[oa.length]=+La.text}if("number"!=typeof xa[la])throw Error("Bad segment: "+la);Ka.push({key:la,data:oa});ka+=na;ua=Ba[ka];"M"===la&&
(la="L");"m"===la&&(la="l")}return Ka}function v(Fa){let Ka=0,Ba=0,la=0,ka=0;const ua=[];for(const {key:na,data:oa}of Fa)switch(na){case "M":ua.push({key:"M",data:[...oa]});[Ka,Ba]=oa;[la,ka]=oa;break;case "m":Ka+=oa[0];Ba+=oa[1];ua.push({key:"M",data:[Ka,Ba]});la=Ka;ka=Ba;break;case "L":ua.push({key:"L",data:[...oa]});[Ka,Ba]=oa;break;case "l":Ka+=oa[0];Ba+=oa[1];ua.push({key:"L",data:[Ka,Ba]});break;case "C":ua.push({key:"C",data:[...oa]});Ka=oa[4];Ba=oa[5];break;case "c":Fa=oa.map((La,Oa)=>Oa%
2?La+Ba:La+Ka);ua.push({key:"C",data:Fa});Ka=Fa[4];Ba=Fa[5];break;case "Q":ua.push({key:"Q",data:[...oa]});Ka=oa[2];Ba=oa[3];break;case "q":Fa=oa.map((La,Oa)=>Oa%2?La+Ba:La+Ka);ua.push({key:"Q",data:Fa});Ka=Fa[2];Ba=Fa[3];break;case "A":ua.push({key:"A",data:[...oa]});Ka=oa[5];Ba=oa[6];break;case "a":Ka+=oa[5];Ba+=oa[6];ua.push({key:"A",data:[oa[0],oa[1],oa[2],oa[3],oa[4],Ka,Ba]});break;case "H":ua.push({key:"H",data:[...oa]});Ka=oa[0];break;case "h":Ka+=oa[0];ua.push({key:"H",data:[Ka]});break;case "V":ua.push({key:"V",
data:[...oa]});Ba=oa[0];break;case "v":Ba+=oa[0];ua.push({key:"V",data:[Ba]});break;case "S":ua.push({key:"S",data:[...oa]});Ka=oa[2];Ba=oa[3];break;case "s":Fa=oa.map((La,Oa)=>Oa%2?La+Ba:La+Ka);ua.push({key:"S",data:Fa});Ka=Fa[2];Ba=Fa[3];break;case "T":ua.push({key:"T",data:[...oa]});Ka=oa[0];Ba=oa[1];break;case "t":Ka+=oa[0];Ba+=oa[1];ua.push({key:"T",data:[Ka,Ba]});break;case "Z":case "z":ua.push({key:"Z",data:[]}),Ka=la,Ba=ka}return ua}function t(Fa){const Ka=[];var Ba="";let la=0,ka=0,ua=0,
na=0,oa=0,La=0;for(const {key:Va,data:Ma}of Fa){switch(Va){case "M":Ka.push({key:"M",data:[...Ma]});[la,ka]=Ma;[ua,na]=Ma;break;case "C":Ka.push({key:"C",data:[...Ma]});la=Ma[4];ka=Ma[5];oa=Ma[2];La=Ma[3];break;case "L":Ka.push({key:"L",data:[...Ma]});[la,ka]=Ma;break;case "H":la=Ma[0];Ka.push({key:"L",data:[la,ka]});break;case "V":ka=Ma[0];Ka.push({key:"L",data:[la,ka]});break;case "S":var Oa=Fa=0;"C"===Ba||"S"===Ba?(Fa=la+(la-oa),Oa=ka+(ka-La)):(Fa=la,Oa=ka);Ka.push({key:"C",data:[Fa,Oa,...Ma]});
oa=Ma[0];La=Ma[1];la=Ma[2];ka=Ma[3];break;case "T":const [Ua,ib]=Ma;Oa=Fa=0;"Q"===Ba||"T"===Ba?(Fa=la+(la-oa),Oa=ka+(ka-La)):(Fa=la,Oa=ka);Ka.push({key:"C",data:[la+2*(Fa-la)/3,ka+2*(Oa-ka)/3,Ua+2*(Fa-Ua)/3,ib+2*(Oa-ib)/3,Ua,ib]});oa=Fa;La=Oa;la=Ua;ka=ib;break;case "Q":const [vb,yb,Wa,hb]=Ma;Ka.push({key:"C",data:[la+2*(vb-la)/3,ka+2*(yb-ka)/3,Wa+2*(vb-Wa)/3,hb+2*(yb-hb)/3,Wa,hb]});oa=vb;La=yb;la=Wa;ka=hb;break;case "A":Ba=Math.abs(Ma[0]);Fa=Math.abs(Ma[1]);Oa=Ma[2];const ab=Ma[3],Qa=Ma[4],bb=Ma[5],
Pa=Ma[6];if(0===Ba||0===Fa)Ka.push({key:"C",data:[la,ka,bb,Pa,bb,Pa]}),la=bb,ka=Pa;else if(la!==bb||ka!==Pa)f(la,ka,bb,Pa,Ba,Fa,Oa,ab,Qa).forEach(function(Lb){Ka.push({key:"C",data:Lb})}),la=bb,ka=Pa;break;case "Z":Ka.push({key:"Z",data:[]}),la=ua,ka=na}Ba=Va}return Ka}function r(Fa,Ka,Ba){return[Fa*Math.cos(Ba)-Ka*Math.sin(Ba),Fa*Math.sin(Ba)+Ka*Math.cos(Ba)]}function f(Fa,Ka,Ba,la,ka,ua,na,oa,La,Oa){const Va=(Ma=na,Math.PI*Ma/180);var Ma;Ma=[];if(Oa)[oa,Ua,ib,vb]=Oa;else{[Fa,Ka]=r(Fa,Ka,-Va);[Ba,
la]=r(Ba,la,-Va);var Ua=(Fa-Ba)/2;var ib=(Ka-la)/2;var vb=Ua*Ua/(ka*ka)+ib*ib/(ua*ua);1<vb&&(vb=Math.sqrt(vb),ka*=vb,ua*=vb);vb=ka*ka;var yb=ua*ua;oa=(oa===La?-1:1)*Math.sqrt(Math.abs((vb*yb-vb*ib*ib-yb*Ua*Ua)/(vb*ib*ib+yb*Ua*Ua)));ib=oa*ka*ib/ua+(Fa+Ba)/2;vb=oa*-ua*Ua/ka+(Ka+la)/2;oa=Math.asin(parseFloat(((Ka-vb)/ua).toFixed(9)));Ua=Math.asin(parseFloat(((la-vb)/ua).toFixed(9)));Fa<ib&&(oa=Math.PI-oa);Ba<ib&&(Ua=Math.PI-Ua);0>oa&&(oa=2*Math.PI+oa);0>Ua&&(Ua=2*Math.PI+Ua);La&&oa>Ua&&(oa-=2*Math.PI);
!La&&Ua>oa&&(Ua-=2*Math.PI)}if(Math.abs(Ua-oa)>120*Math.PI/180){yb=Ua;const Wa=Ba,hb=la;Ua=La&&Ua>oa?oa+120*Math.PI/180:oa+120*Math.PI/180*-1;Ma=f(Ba=ib+ka*Math.cos(Ua),la=vb+ua*Math.sin(Ua),Wa,hb,ka,ua,na,0,La,[Ua,yb,ib,vb])}na=Math.tan((Ua-oa)/4);ka=4/3*ka*na;na*=4/3*ua;ua=[Fa,Ka];Fa=[Fa+ka*Math.sin(oa),Ka-na*Math.cos(oa)];Ka=[Ba+ka*Math.sin(Ua),la-na*Math.cos(Ua)];Ba=[Ba,la];if(Fa[0]=2*ua[0]-Fa[0],Fa[1]=2*ua[1]-Fa[1],Oa)return[Fa,Ka,Ba].concat(Ma);Ma=[Fa,Ka,Ba].concat(Ma);Oa=[];for(Ba=0;Ba<Ma.length;Ba+=
3)la=r(Ma[Ba][0],Ma[Ba][1],Va),Fa=r(Ma[Ba+1][0],Ma[Ba+1][1],Va),Ka=r(Ma[Ba+2][0],Ma[Ba+2][1],Va),Oa.push([la[0],la[1],Fa[0],Fa[1],Ka[0],Ka[1]]);return Oa}function E(Fa,Ka,Ba){const la=(Fa||[]).length;if(2<la){const ka=[];for(let ua=0;ua<la-1;ua++)ka.push(...F(Fa[ua][0],Fa[ua][1],Fa[ua+1][0],Fa[ua+1][1],Ba));return Ka&&ka.push(...F(Fa[la-1][0],Fa[la-1][1],Fa[0][0],Fa[0][1],Ba)),{type:"path",ops:ka}}return 2===la?{type:"path",ops:F(Fa[0][0],Fa[0][1],Fa[1][0],Fa[1][1],Ba)}:{type:"path",ops:[]}}function B(Fa,
Ka){let Ba=M(Fa,1+.2*Ka.roughness,Ka);if(!Ka.disableMultiStroke){var la=1.5*(1+.22*Ka.roughness);const ka=Object.assign({},Ka);ka.randomizer=void 0;Ka.seed&&(ka.seed=Ka.seed+1);Fa=M(Fa,la,ka);Ba=Ba.concat(Fa)}return{type:"path",ops:Ba}}function J(Fa,Ka,Ba){const la=2*Math.PI/Math.ceil(Math.max(Ba.curveStepCount,Ba.curveStepCount/Math.sqrt(200)*Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(Fa/2,2)+Math.pow(Ka/2,2))/2))));Fa=Math.abs(Fa/2);Ka=Math.abs(Ka/2);const ka=1-Ba.curveFitting;return Fa+=G(Fa*ka,Ba),
Ka+=G(Ka*ka,Ba),{increment:la,rx:Fa,ry:Ka}}function V(Fa,Ka,Ba,la){const [ka,ua]=ia(la.increment,Fa,Ka,la.rx,la.ry,1,la.increment*R(.1,R(.4,1,Ba),Ba),Ba);let na=I(ka,null,Ba);Ba.disableMultiStroke||0===Ba.roughness||([Fa]=ia(la.increment,Fa,Ka,la.rx,la.ry,1.5,0,Ba),Ba=I(Fa,null,Ba),na=na.concat(Ba));return{estimatedPoints:ua,opset:{type:"path",ops:na}}}function H(Fa,Ka,Ba,la,ka,ua,na,oa,La){Ba=Math.abs(Ba/2);la=Math.abs(la/2);Ba+=G(.01*Ba,La);for(la+=G(.01*la,La);0>ka;)ka+=2*Math.PI,ua+=2*Math.PI;
ua-ka>2*Math.PI&&(ka=0,ua=2*Math.PI);var Oa=Math.min(2*Math.PI/La.curveStepCount/2,(ua-ka)/2);const Va=U(Oa,Fa,Ka,Ba,la,ka,ua,1,La);La.disableMultiStroke||(Oa=U(Oa,Fa,Ka,Ba,la,ka,ua,1.5,La),Va.push(...Oa));return na&&(oa?Va.push(...F(Fa,Ka,Fa+Ba*Math.cos(ka),Ka+la*Math.sin(ka),La),...F(Fa,Ka,Fa+Ba*Math.cos(ua),Ka+la*Math.sin(ua),La)):Va.push({op:"lineTo",data:[Fa,Ka]},{op:"lineTo",data:[Fa+Ba*Math.cos(ka),Ka+la*Math.sin(ka)]})),{type:"path",ops:Va}}function S(Fa,Ka){const Ba=[];for(const la of Fa)if(la.length){Fa=
Ka.maxRandomnessOffset||0;const ka=la.length;if(2<ka){Ba.push({op:"move",data:[la[0][0]+G(Fa,Ka),la[0][1]+G(Fa,Ka)]});for(let ua=1;ua<ka;ua++)Ba.push({op:"lineTo",data:[la[ua][0]+G(Fa,Ka),la[ua][1]+G(Fa,Ka)]})}}return{type:"fillPath",ops:Ba}}function L(Fa,Ka){var Ba=Ga;let la=Ka.fillStyle||"hachure";if(!va[la])switch(la){case "zigzag":va[la]||(va[la]=new W(Ba));break;case "cross-hatch":va[la]||(va[la]=new fa(Ba));break;case "dots":va[la]||(va[la]=new X(Ba));break;case "dashed":va[la]||(va[la]=new ea(Ba));
break;case "zigzag-line":va[la]||(va[la]=new pa(Ba));break;default:la="hachure",va[la]||(va[la]=new aa(Ba))}return va[la].fillPolygons(Fa,Ka)}function T(Fa){return Fa.randomizer||(Fa.randomizer=new ta.k(Fa.seed||0)),Fa.randomizer.next()}function R(Fa,Ka,Ba,la=1){return Ba.roughness*la*(T(Ba)*(Ka-Fa)+Fa)}function G(Fa,Ka,Ba=1){return R(-Fa,Fa,Ka,Ba)}function F(Fa,Ka,Ba,la,ka,ua=!1){const na=ua?ka.disableMultiStrokeFill:ka.disableMultiStroke;ua=O(Fa,Ka,Ba,la,ka,!0,!1);if(na)return ua;Fa=O(Fa,Ka,Ba,
la,ka,!0,!0);return ua.concat(Fa)}function O(Fa,Ka,Ba,la,ka,ua,na){var oa=Math.pow(Fa-Ba,2)+Math.pow(Ka-la,2),La=Math.sqrt(oa);let Oa;Oa=200>La?1:500<La?.4:-.0016668*La+1.233334;let Va=ka.maxRandomnessOffset||0;Va*Va*100>oa&&(Va=La/10);oa=Va/2;La=.2+.2*T(ka);let Ma=ka.bowing*ka.maxRandomnessOffset*(la-Ka)/200,Ua=ka.bowing*ka.maxRandomnessOffset*(Fa-Ba)/200;Ma=G(Ma,ka,Oa);Ua=G(Ua,ka,Oa);const ib=[],vb=ka.preserveVertices;return ua&&(na?ib.push({op:"move",data:[Fa+(vb?0:G(oa,ka,Oa)),Ka+(vb?0:G(oa,ka,
Oa))]}):ib.push({op:"move",data:[Fa+(vb?0:G(Va,ka,Oa)),Ka+(vb?0:G(Va,ka,Oa))]})),na?ib.push({op:"bcurveTo",data:[Ma+Fa+(Ba-Fa)*La+G(oa,ka,Oa),Ua+Ka+(la-Ka)*La+G(oa,ka,Oa),Ma+Fa+2*(Ba-Fa)*La+G(oa,ka,Oa),Ua+Ka+2*(la-Ka)*La+G(oa,ka,Oa),Ba+(vb?0:G(oa,ka,Oa)),la+(vb?0:G(oa,ka,Oa))]}):ib.push({op:"bcurveTo",data:[Ma+Fa+(Ba-Fa)*La+G(Va,ka,Oa),Ua+Ka+(la-Ka)*La+G(Va,ka,Oa),Ma+Fa+2*(Ba-Fa)*La+G(Va,ka,Oa),Ua+Ka+2*(la-Ka)*La+G(Va,ka,Oa),Ba+(vb?0:G(Va,ka,Oa)),la+(vb?0:G(Va,ka,Oa))]}),ib}function M(Fa,Ka,Ba){const la=
[];la.push([Fa[0][0]+G(Ka,Ba),Fa[0][1]+G(Ka,Ba)]);la.push([Fa[0][0]+G(Ka,Ba),Fa[0][1]+G(Ka,Ba)]);for(let ka=1;ka<Fa.length;ka++)la.push([Fa[ka][0]+G(Ka,Ba),Fa[ka][1]+G(Ka,Ba)]),ka===Fa.length-1&&la.push([Fa[ka][0]+G(Ka,Ba),Fa[ka][1]+G(Ka,Ba)]);return I(la,null,Ba)}function I(Fa,Ka,Ba){const la=Fa.length,ka=[];if(3<la){const ua=[],na=1-Ba.curveTightness;ka.push({op:"move",data:[Fa[1][0],Fa[1][1]]});for(let oa=1;oa+2<la;oa++){const La=Fa[oa];ua[0]=[La[0],La[1]];ua[1]=[La[0]+(na*Fa[oa+1][0]-na*Fa[oa-
1][0])/6,La[1]+(na*Fa[oa+1][1]-na*Fa[oa-1][1])/6];ua[2]=[Fa[oa+1][0]+(na*Fa[oa][0]-na*Fa[oa+2][0])/6,Fa[oa+1][1]+(na*Fa[oa][1]-na*Fa[oa+2][1])/6];ua[3]=[Fa[oa+1][0],Fa[oa+1][1]];ka.push({op:"bcurveTo",data:[ua[1][0],ua[1][1],ua[2][0],ua[2][1],ua[3][0],ua[3][1]]})}Ka&&2===Ka.length&&(Fa=Ba.maxRandomnessOffset,ka.push({op:"lineTo",data:[Ka[0]+G(Fa,Ba),Ka[1]+G(Fa,Ba)]}))}else 3===la?(ka.push({op:"move",data:[Fa[1][0],Fa[1][1]]}),ka.push({op:"bcurveTo",data:[Fa[1][0],Fa[1][1],Fa[2][0],Fa[2][1],Fa[2][0],
Fa[2][1]]})):2===la&&ka.push(...F(Fa[0][0],Fa[0][1],Fa[1][0],Fa[1][1],Ba));return ka}function ia(Fa,Ka,Ba,la,ka,ua,na,oa){const La=[],Oa=[];if(0===oa.roughness){Fa/=4;Oa.push([Ka+la*Math.cos(-Fa),Ba+ka*Math.sin(-Fa)]);for(ua=0;ua<=2*Math.PI;ua+=Fa)na=[Ka+la*Math.cos(ua),Ba+ka*Math.sin(ua)],La.push(na),Oa.push(na);Oa.push([Ka+la*Math.cos(0),Ba+ka*Math.sin(0)]);Oa.push([Ka+la*Math.cos(Fa),Ba+ka*Math.sin(Fa)])}else{const Va=G(.5,oa)-Math.PI/2;Oa.push([G(ua,oa)+Ka+.9*la*Math.cos(Va-Fa),G(ua,oa)+Ba+.9*
ka*Math.sin(Va-Fa)]);const Ma=2*Math.PI+Va-.01;for(let Ua=Va;Ua<Ma;Ua+=Fa){const ib=[G(ua,oa)+Ka+la*Math.cos(Ua),G(ua,oa)+Ba+ka*Math.sin(Ua)];La.push(ib);Oa.push(ib)}Oa.push([G(ua,oa)+Ka+la*Math.cos(Va+2*Math.PI+.5*na),G(ua,oa)+Ba+ka*Math.sin(Va+2*Math.PI+.5*na)]);Oa.push([G(ua,oa)+Ka+.98*la*Math.cos(Va+na),G(ua,oa)+Ba+.98*ka*Math.sin(Va+na)]);Oa.push([G(ua,oa)+Ka+.9*la*Math.cos(Va+.5*na),G(ua,oa)+Ba+.9*ka*Math.sin(Va+.5*na)])}return[Oa,La]}function U(Fa,Ka,Ba,la,ka,ua,na,oa,La){var Oa=ua+G(.1,La);
ua=[];for(ua.push([G(oa,La)+Ka+.9*la*Math.cos(Oa-Fa),G(oa,La)+Ba+.9*ka*Math.sin(Oa-Fa)]);Oa<=na;Oa+=Fa)ua.push([G(oa,La)+Ka+la*Math.cos(Oa),G(oa,La)+Ba+ka*Math.sin(Oa)]);return ua.push([Ka+la*Math.cos(na),Ba+ka*Math.sin(na)]),ua.push([Ka+la*Math.cos(na),Ba+ka*Math.sin(na)]),I(ua,null,La)}function Z(Fa,Ka,Ba,la,ka,ua,na,oa){const La=[],Oa=[oa.maxRandomnessOffset||1,(oa.maxRandomnessOffset||1)+.3];let Va;const Ma=oa.disableMultiStroke?1:2,Ua=oa.preserveVertices;for(let ib=0;ib<Ma;ib++)0===ib?La.push({op:"move",
data:[na[0],na[1]]}):La.push({op:"move",data:[na[0]+(Ua?0:G(Oa[0],oa)),na[1]+(Ua?0:G(Oa[0],oa))]}),Va=Ua?[ka,ua]:[ka+G(Oa[ib],oa),ua+G(Oa[ib],oa)],La.push({op:"bcurveTo",data:[Fa+G(Oa[ib],oa),Ka+G(Oa[ib],oa),Ba+G(Oa[ib],oa),la+G(Oa[ib],oa),Va[0],Va[1]]});return La}b.d(h,{V:function(){return Ya}});class aa{constructor(Fa){this.helper=Fa}fillPolygons(Fa,Ka){return this._fillPolygons(Fa,Ka)}_fillPolygons(Fa,Ka){Fa=p(Fa,Ka);return{type:"fillSketch",ops:this.renderLines(Fa,Ka)}}renderLines(Fa,Ka){const Ba=
[];for(const la of Fa)Ba.push(...this.helper.doubleLineOps(la[0][0],la[0][1],la[1][0],la[1][1],Ka));return Ba}}class W extends aa{fillPolygons(Fa,Ka){var Ba=Ka.hachureGap;0>Ba&&(Ba=4*Ka.strokeWidth);Ba=Math.max(Ba,.1);Fa=p(Fa,Object.assign({},Ka,{hachureGap:Ba}));const la=Math.PI/180*Ka.hachureAngle,ka=[],ua=.5*Ba*Math.cos(la);Ba=.5*Ba*Math.sin(la);for(const [na,oa]of Fa)m([na,oa])&&ka.push([[na[0]-ua,na[1]+Ba],[...oa]],[[na[0]+ua,na[1]-Ba],[...oa]]);return{type:"fillSketch",ops:this.renderLines(ka,
Ka)}}}class fa extends aa{fillPolygons(Fa,Ka){const Ba=this._fillPolygons(Fa,Ka);Ka=Object.assign({},Ka,{hachureAngle:Ka.hachureAngle+90});Fa=this._fillPolygons(Fa,Ka);return Ba.ops=Ba.ops.concat(Fa.ops),Ba}}class X{constructor(Fa){this.helper=Fa}fillPolygons(Fa,Ka){Fa=p(Fa,Ka=Object.assign({},Ka,{hachureAngle:0}));return this.dotsOnLines(Fa,Ka)}dotsOnLines(Fa,Ka){const Ba=[];let la=Ka.hachureGap;0>la&&(la=4*Ka.strokeWidth);la=Math.max(la,.1);let ka=Ka.fillWeight;0>ka&&(ka=Ka.strokeWidth/2);const ua=
la/4;for(const oa of Fa){var na=m(oa);Fa=Math.ceil(na/la)-1;na-=Fa*la;const La=(oa[0][0]+oa[1][0])/2-la/4,Oa=Math.min(oa[0][1],oa[1][1]);for(let Va=0;Va<Fa;Va++){const Ma=this.helper.ellipse(La-ua+2*Math.random()*ua,Oa+na+Va*la-ua+2*Math.random()*ua,ka,ka,Ka);Ba.push(...Ma.ops)}}return{type:"fillSketch",ops:Ba}}}class ea{constructor(Fa){this.helper=Fa}fillPolygons(Fa,Ka){Fa=p(Fa,Ka);return{type:"fillSketch",ops:this.dashedLine(Fa,Ka)}}dashedLine(Fa,Ka){const Ba=0>Ka.dashOffset?0>Ka.hachureGap?4*Ka.strokeWidth:
Ka.hachureGap:Ka.dashOffset,la=0>Ka.dashGap?0>Ka.hachureGap?4*Ka.strokeWidth:Ka.hachureGap:Ka.dashGap,ka=[];return Fa.forEach(ua=>{var na=m(ua);const oa=Math.floor(na/(Ba+la));na=(na+la-oa*(Ba+la))/2;let La=ua[0];var Oa=ua[1];La[0]>Oa[0]&&(La=ua[1],Oa=ua[0]);ua=Math.atan((Oa[1]-La[1])/(Oa[0]-La[0]));for(Oa=0;Oa<oa;Oa++){var Va=Oa*(Ba+la),Ma=Va+Ba;Va=[La[0]+Va*Math.cos(ua)+na*Math.cos(ua),La[1]+Va*Math.sin(ua)+na*Math.sin(ua)];Ma=[La[0]+Ma*Math.cos(ua)+na*Math.cos(ua),La[1]+Ma*Math.sin(ua)+na*Math.sin(ua)];
ka.push(...this.helper.doubleLineOps(Va[0],Va[1],Ma[0],Ma[1],Ka))}}),ka}}class pa{constructor(Fa){this.helper=Fa}fillPolygons(Fa,Ka){const Ba=0>Ka.hachureGap?4*Ka.strokeWidth:Ka.hachureGap,la=0>Ka.zigzagOffset?Ba:Ka.zigzagOffset;Fa=p(Fa,Ka=Object.assign({},Ka,{hachureGap:Ba+la}));return{type:"fillSketch",ops:this.zigzagLines(Fa,la,Ka)}}zigzagLines(Fa,Ka,Ba){const la=[];return Fa.forEach(ka=>{var ua=m(ka);ua=Math.round(ua/(2*Ka));let na=ka[0];var oa=ka[1];na[0]>oa[0]&&(na=ka[1],oa=ka[0]);ka=Math.atan((oa[1]-
na[1])/(oa[0]-na[0]));for(oa=0;oa<ua;oa++){var La=2*oa*Ka,Oa=2*(oa+1)*Ka,Va=Math.sqrt(2*Math.pow(Ka,2));La=[na[0]+La*Math.cos(ka),na[1]+La*Math.sin(ka)];Oa=[na[0]+Oa*Math.cos(ka),na[1]+Oa*Math.sin(ka)];Va=[La[0]+Va*Math.cos(ka+Math.PI/4),La[1]+Va*Math.sin(ka+Math.PI/4)];la.push(...this.helper.doubleLineOps(La[0],La[1],Va[0],Va[1],Ba),...this.helper.doubleLineOps(Va[0],Va[1],Oa[0],Oa[1],Ba))}}),la}}const va={};var ta=b(8152);const xa={A:7,a:7,C:6,c:6,H:1,h:1,L:2,l:2,M:2,m:2,Q:4,q:4,S:4,s:4,T:2,t:2,
V:1,v:1,Z:0,z:0},Ga={randOffset:function(Fa,Ka){return G(Fa,Ka)},randOffsetWithRange:function(Fa,Ka,Ba){return R(Fa,Ka,Ba)},ellipse:function(Fa,Ka,Ba,la,ka){Ba=J(Ba,la,ka);return V(Fa,Ka,ka,Ba).opset},doubleLineOps:function(Fa,Ka,Ba,la,ka){return F(Fa,Ka,Ba,la,ka,!0)}};var Ia=b(1493);class Ya{constructor(Fa){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,
hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1};this.config=Fa||{};this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return(0,ta.W)()}_o(Fa){return Fa?Object.assign({},this.defaultOptions,Fa):this.defaultOptions}_d(Fa,Ka,Ba){return{shape:Fa,sets:Ka||[],options:Ba||this.defaultOptions}}line(Fa,Ka,Ba,la,ka){ka=this._o(ka);return this._d("line",[{type:"path",ops:F(Fa,Ka,Ba,la,ka)}],
ka)}rectangle(Fa,Ka,Ba,la,ka){ka=this._o(ka);const ua=[];var na=E([[Fa,Ka],[Fa+Ba,Ka],[Fa+Ba,Ka+la],[Fa,Ka+la]],!0,ka);ka.fill&&(Fa=[[Fa,Ka],[Fa+Ba,Ka],[Fa+Ba,Ka+la],[Fa,Ka+la]],"solid"===ka.fillStyle?ua.push(S([Fa],ka)):ua.push(L([Fa],ka)));return"none"!==ka.stroke&&ua.push(na),this._d("rectangle",ua,ka)}ellipse(Fa,Ka,Ba,la,ka){ka=this._o(ka);const ua=[];la=J(Ba,la,ka);Ba=V(Fa,Ka,ka,la);ka.fill&&("solid"===ka.fillStyle?(Fa=V(Fa,Ka,ka,la).opset,Fa.type="fillPath",ua.push(Fa)):ua.push(L([Ba.estimatedPoints],
ka)));return"none"!==ka.stroke&&ua.push(Ba.opset),this._d("ellipse",ua,ka)}circle(Fa,Ka,Ba,la){Fa=this.ellipse(Fa,Ka,Ba,Ba,la);return Fa.shape="circle",Fa}linearPath(Fa,Ka){Ka=this._o(Ka);return this._d("linearPath",[E(Fa,!1,Ka)],Ka)}arc(Fa,Ka,Ba,la,ka,ua,na=!1,oa){oa=this._o(oa);const La=[],Oa=H(Fa,Ka,Ba,la,ka,ua,na,!0,oa);if(na&&oa.fill)if("solid"===oa.fillStyle)na=Object.assign({},oa),na.disableMultiStroke=!0,Fa=H(Fa,Ka,Ba,la,ka,ua,!0,!1,na),Fa.type="fillPath",La.push(Fa);else{na=La.push;Ba=Math.abs(Ba/
2);la=Math.abs(la/2);Ba+=G(.01*Ba,oa);for(la+=G(.01*la,oa);0>ka;)ka+=2*Math.PI,ua+=2*Math.PI;ua-ka>2*Math.PI&&(ka=0,ua=2*Math.PI);const Va=(ua-ka)/oa.curveStepCount,Ma=[];for(;ka<=ua;ka+=Va)Ma.push([Fa+Ba*Math.cos(ka),Ka+la*Math.sin(ka)]);Fa=(Ma.push([Fa+Ba*Math.cos(ua),Ka+la*Math.sin(ua)]),Ma.push([Fa,Ka]),L([Ma],oa));na.call(La,Fa)}return"none"!==oa.stroke&&La.push(Oa),this._d("arc",La,oa)}curve(Fa,Ka){Ka=this._o(Ka);const Ba=[],la=B(Fa,Ka);Ka.fill&&"none"!==Ka.fill&&3<=Fa.length&&(Fa=function(ka,
ua=0){var na=ka.length;if(3>na)throw Error("A curve must have at least three points.");const oa=[];if(3===na)oa.push([...ka[0]],[...ka[1]],[...ka[2]],[...ka[2]]);else{na=[];na.push(ka[0],ka[0]);for(var La=1;La<ka.length;La++)na.push(ka[La]),La===ka.length-1&&na.push(ka[La]);ka=[];ua=1-ua;oa.push([...na[0]]);for(La=1;La+2<na.length;La++){const Oa=na[La];ka[0]=[Oa[0],Oa[1]];ka[1]=[Oa[0]+(ua*na[La+1][0]-ua*na[La-1][0])/6,Oa[1]+(ua*na[La+1][1]-ua*na[La-1][1])/6];ka[2]=[na[La+1][0]+(ua*na[La][0]-ua*na[La+
2][0])/6,na[La+1][1]+(ua*na[La][1]-ua*na[La+2][1])/6];ka[3]=[na[La+1][0],na[La+1][1]];oa.push(ka[1],ka[2],ka[3])}}return oa}(Fa),Fa=(0,Ia.s)(Fa,10,(1+Ka.roughness)/2),"solid"===Ka.fillStyle?Ba.push(S([Fa],Ka)):Ba.push(L([Fa],Ka)));return"none"!==Ka.stroke&&Ba.push(la),this._d("curve",Ba,Ka)}polygon(Fa,Ka){Ka=this._o(Ka);const Ba=[],la=E(Fa,!0,Ka);return Ka.fill&&("solid"===Ka.fillStyle?Ba.push(S([Fa],Ka)):Ba.push(L([Fa],Ka))),"none"!==Ka.stroke&&Ba.push(la),this._d("polygon",Ba,Ka)}path(Fa,Ka){const Ba=
this._o(Ka),la=[];if(!Fa)return this._d("path",la,Ba);Fa=(Fa||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");Ka=Ba.fill&&"transparent"!==Ba.fill&&"none"!==Ba.fill;const ka="none"!==Ba.stroke,ua=!!(Ba.simplification&&1>Ba.simplification),na=function(oa,La,Oa){var Va=t(v(D(oa)));oa=[];let Ma=[];var Ua=[0,0];let ib=[];const vb=()=>{4<=ib.length&&Ma.push(...(0,Ia.s)(ib,La));ib=[]};for(const {key:yb,data:Wa}of Va)switch(yb){case "M":vb();Ma.length&&(oa.push(Ma),Ma=[]);Ua=[Wa[0],Wa[1]];
Ma.push(Ua);break;case "L":vb();Ma.push([Wa[0],Wa[1]]);break;case "C":ib.length||(Va=Ma.length?Ma[Ma.length-1]:Ua,ib.push([Va[0],Va[1]]));ib.push([Wa[0],Wa[1]]);ib.push([Wa[2],Wa[3]]);ib.push([Wa[4],Wa[5]]);break;case "Z":vb(),Ma.push([Ua[0],Ua[1]])}vb();Ma.length&&(oa.push(Ma),Ma=[]);if(!Oa)return oa;Ua=[];for(const yb of oa)oa=(0,Ia.o)(yb,Oa),oa.length&&Ua.push(oa);return Ua}(Fa,1,ua?4-4*Ba.simplification:(1+Ba.roughness)/2);return Ka&&("solid"===Ba.fillStyle?la.push(S(na,Ba)):la.push(L(na,Ba))),
ka&&(ua?na.forEach(oa=>{la.push(E(oa,!1,Ba))}):la.push(function(oa,La){oa=t(v(D(oa)));const Oa=[];let Va=[0,0],Ma=[0,0];for(const {key:Ua,data:ib}of oa)switch(Ua){case "M":const vb=1*(La.maxRandomnessOffset||0),yb=La.preserveVertices;Oa.push({op:"move",data:ib.map(Lb=>Lb+(yb?0:G(vb,La)))});Ma=[ib[0],ib[1]];Va=[ib[0],ib[1]];break;case "L":Oa.push(...F(Ma[0],Ma[1],ib[0],ib[1],La));Ma=[ib[0],ib[1]];break;case "C":const [Wa,hb,ab,Qa,bb,Pa]=ib;Oa.push(...Z(Wa,hb,ab,Qa,bb,Pa,Ma,La));Ma=[bb,Pa];break;case "Z":Oa.push(...F(Ma[0],
Ma[1],Va[0],Va[1],La)),Ma=[Va[0],Va[1]]}return{type:"path",ops:Oa}}(Fa,Ba))),this._d("path",la,Ba)}opsToPath(Fa,Ka){let Ba="";for(const la of Fa.ops)switch(Fa="number"==typeof Ka&&0<=Ka?la.data.map(ka=>+ka.toFixed(Ka)):la.data,la.op){case "move":Ba+=`M${Fa[0]} ${Fa[1]} `;break;case "bcurveTo":Ba+=`C${Fa[0]} ${Fa[1]}, ${Fa[2]} ${Fa[3]}, ${Fa[4]} ${Fa[5]} `;break;case "lineTo":Ba+=`L${Fa[0]} ${Fa[1]} `}return Ba.trim()}toPaths(Fa){var Ka=Fa.sets||[];Fa=Fa.options||this.defaultOptions;const Ba=[];for(const la of Ka){Ka=
null;switch(la.type){case "path":Ka={d:this.opsToPath(la),stroke:Fa.stroke,strokeWidth:Fa.strokeWidth,fill:"none"};break;case "fillPath":Ka={d:this.opsToPath(la),stroke:"none",strokeWidth:0,fill:Fa.fill||"none"};break;case "fillSketch":Ka=this.fillSketch(la,Fa)}Ka&&Ba.push(Ka)}return Ba}fillSketch(Fa,Ka){let Ba=Ka.fillWeight;return 0>Ba&&(Ba=Ka.strokeWidth/2),{d:this.opsToPath(Fa),stroke:Ka.fill||"none",strokeWidth:Ba,fill:"none"}}}},8152:function(g,h,b){function l(){return Math.floor(Math.random()*
2**31)}b.d(h,{W:function(){return l},k:function(){return m}});class m{constructor(p){this.seed=p}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}},9845:function(g,h,b){b.d(h,{Z:function(){return D}});var l=b(6096);class m{constructor(v,t){this.canvas=v;this.ctx=this.canvas.getContext("2d");this.gen=new l.V(t)}draw(v){const t=v.sets||[],r=v.options||this.getDefaultOptions(),f=this.ctx,E=v.options.fixedDecimalPlaceDigits;for(const B of t)switch(B.type){case "path":f.save();
f.strokeStyle="none"===r.stroke?"transparent":r.stroke;f.lineWidth=r.strokeWidth;r.strokeLineDash&&f.setLineDash(r.strokeLineDash);r.strokeLineDashOffset&&(f.lineDashOffset=r.strokeLineDashOffset);this._drawToContext(f,B,E);f.restore();break;case "fillPath":f.save();f.fillStyle=r.fill||"";this._drawToContext(f,B,E,"curve"===v.shape||"polygon"===v.shape||"path"===v.shape?"evenodd":"nonzero");f.restore();break;case "fillSketch":this.fillSketch(f,B,r)}}fillSketch(v,t,r){let f=r.fillWeight;0>f&&(f=r.strokeWidth/
2);v.save();r.fillLineDash&&v.setLineDash(r.fillLineDash);r.fillLineDashOffset&&(v.lineDashOffset=r.fillLineDashOffset);v.strokeStyle=r.fill||"";v.lineWidth=f;this._drawToContext(v,t,r.fixedDecimalPlaceDigits);v.restore()}_drawToContext(v,t,r,f="nonzero"){v.beginPath();for(const E of t.ops){const B="number"==typeof r&&0<=r?E.data.map(J=>+J.toFixed(r)):E.data;switch(E.op){case "move":v.moveTo(B[0],B[1]);break;case "bcurveTo":v.bezierCurveTo(B[0],B[1],B[2],B[3],B[4],B[5]);break;case "lineTo":v.lineTo(B[0],
B[1])}}"fillPath"===t.type?v.fill(f):v.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(v,t,r,f,E){v=this.gen.line(v,t,r,f,E);return this.draw(v),v}rectangle(v,t,r,f,E){v=this.gen.rectangle(v,t,r,f,E);return this.draw(v),v}ellipse(v,t,r,f,E){v=this.gen.ellipse(v,t,r,f,E);return this.draw(v),v}circle(v,t,r,f){v=this.gen.circle(v,t,r,f);return this.draw(v),v}linearPath(v,t){v=this.gen.linearPath(v,t);return this.draw(v),v}polygon(v,t){v=this.gen.polygon(v,
t);return this.draw(v),v}arc(v,t,r,f,E,B,J=!1,V){v=this.gen.arc(v,t,r,f,E,B,J,V);return this.draw(v),v}curve(v,t){v=this.gen.curve(v,t);return this.draw(v),v}path(v,t){v=this.gen.path(v,t);return this.draw(v),v}}class p{constructor(v,t){this.svg=v;this.gen=new l.V(t)}draw(v){var t=v.sets||[];const r=v.options||this.getDefaultOptions(),f=this.svg.ownerDocument||window.document,E=f.createElementNS("http://www.w3.org/2000/svg","g"),B=v.options.fixedDecimalPlaceDigits;for(const J of t){t=null;switch(J.type){case "path":t=
f.createElementNS("http://www.w3.org/2000/svg","path");t.setAttribute("d",this.opsToPath(J,B));t.setAttribute("stroke",r.stroke);t.setAttribute("stroke-width",r.strokeWidth+"");t.setAttribute("fill","none");r.strokeLineDash&&t.setAttribute("stroke-dasharray",r.strokeLineDash.join(" ").trim());r.strokeLineDashOffset&&t.setAttribute("stroke-dashoffset",`${r.strokeLineDashOffset}`);break;case "fillPath":t=f.createElementNS("http://www.w3.org/2000/svg","path");t.setAttribute("d",this.opsToPath(J,B));
t.setAttribute("stroke","none");t.setAttribute("stroke-width","0");t.setAttribute("fill",r.fill||"");"curve"!==v.shape&&"polygon"!==v.shape||t.setAttribute("fill-rule","evenodd");break;case "fillSketch":t=this.fillSketch(f,J,r)}t&&E.appendChild(t)}return E}fillSketch(v,t,r){let f=r.fillWeight;0>f&&(f=r.strokeWidth/2);v=v.createElementNS("http://www.w3.org/2000/svg","path");return v.setAttribute("d",this.opsToPath(t,r.fixedDecimalPlaceDigits)),v.setAttribute("stroke",r.fill||""),v.setAttribute("stroke-width",
f+""),v.setAttribute("fill","none"),r.fillLineDash&&v.setAttribute("stroke-dasharray",r.fillLineDash.join(" ").trim()),r.fillLineDashOffset&&v.setAttribute("stroke-dashoffset",`${r.fillLineDashOffset}`),v}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(v,t){return this.gen.opsToPath(v,t)}line(v,t,r,f,E){v=this.gen.line(v,t,r,f,E);return this.draw(v)}rectangle(v,t,r,f,E){v=this.gen.rectangle(v,t,r,f,E);return this.draw(v)}ellipse(v,t,r,f,E){v=this.gen.ellipse(v,
t,r,f,E);return this.draw(v)}circle(v,t,r,f){v=this.gen.circle(v,t,r,f);return this.draw(v)}linearPath(v,t){v=this.gen.linearPath(v,t);return this.draw(v)}polygon(v,t){v=this.gen.polygon(v,t);return this.draw(v)}arc(v,t,r,f,E,B,J=!1,V){v=this.gen.arc(v,t,r,f,E,B,J,V);return this.draw(v)}curve(v,t){v=this.gen.curve(v,t);return this.draw(v)}path(v,t){v=this.gen.path(v,t);return this.draw(v)}}var D={canvas:(v,t)=>new m(v,t),svg:(v,t)=>new p(v,t),generator:v=>new l.V(v),newSeed:()=>l.V.newSeed()}},5714:function(g){g.exports=
function(h,b,l){var m=[],p=h.length;if(0===p)return m;b=0>b?Math.max(0,b+p):b||0;for(void 0!==l&&(p=0>l?l+p:l);p-- >b;)m[p-b]=h[p];return m}},2173:function(g,h,b){function l(r){var f=r.getSnapshot;r=r.value;try{var E=f();return!m(r,E)}catch(B){return!0}}g=b(9787);var m="function"==typeof Object.is?Object.is:function(r,f){return r===f&&(0!==r||1/r==1/f)||r!=r&&f!=f},p=g.useState,D=g.useEffect,v=g.useLayoutEffect,t=g.useDebugValue;b="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?
function(r,f){return f()}:function(r,f){var E=f(),B=p({inst:{value:E,getSnapshot:f}}),J=B[0].inst,V=B[1];return v(function(){J.value=E;J.getSnapshot=f;l(J)&&V({inst:J})},[r,E,f]),D(function(){return l(J)&&V({inst:J}),r(function(){l(J)&&V({inst:J})})},[r]),t(E),E};h.useSyncExternalStore=void 0!==g.useSyncExternalStore?g.useSyncExternalStore:b},5917:function(g,h,b){g=b(9787);b=b(1374);var l="function"==typeof Object.is?Object.is:function(r,f){return r===f&&(0!==r||1/r==1/f)||r!=r&&f!=f},m=b.useSyncExternalStore,
p=g.useRef,D=g.useEffect,v=g.useMemo,t=g.useDebugValue;h.useSyncExternalStoreWithSelector=function(r,f,E,B,J){var V=p(null);if(null===V.current){var H={hasValue:!1,value:null};V.current=H}else H=V.current;V=v(function(){function L(O){if(!G){if(G=!0,T=O,O=B(O),void 0!==J&&H.hasValue){var M=H.value;if(J(M,O))return R=M}return R=O}if(M=R,l(T,O))return M;var I=B(O);return void 0!==J&&J(M,I)?M:(T=O,R=I)}var T,R,G=!1,F=void 0===E?null:E;return[function(){return L(f())},null===F?void 0:function(){return L(F())}]},
[f,E,B,J]);var S=m(r,V[0],V[1]);return D(function(){H.hasValue=!0;H.value=S},[S]),t(S),S}},1374:function(g,h,b){g.exports=b(2173)},5668:function(g,h,b){g.exports=b(5917)},940:function(g,h,b){function l(p){if(!b.o(m,p))return Promise.resolve().then(function(){var t=Error("Cannot find module '"+p+"'");throw t.code="MODULE_NOT_FOUND",t;});var D=m[p],v=D[0];return Promise.all(D.slice(1).map(b.e)).then(function(){return b.t(v,19)})}var m={"./ar-SA.json":[7822,2091],"./az-AZ.json":[9753,4568],"./bg-BG.json":[1203,
1628],"./bn-BD.json":[8525,7429],"./ca-ES.json":[510,5130],"./cs-CZ.json":[7605,6265],"./da-DK.json":[2392,1790],"./de-DE.json":[2853,3082],"./el-GR.json":[9876,1513],"./en.json":[1463],"./es-ES.json":[2264,8759],"./eu-ES.json":[5658,8081],"./fa-IR.json":[3747,5330],"./fi-FI.json":[9490,3512],"./fr-FR.json":[7830,3682],"./gl-ES.json":[5199,2943],"./he-IL.json":[1994,2312],"./hi-IN.json":[1546,9828],"./hu-HU.json":[6373,7368],"./id-ID.json":[3247,3808],"./it-IT.json":[3257,6239],"./ja-JP.json":[198,
1204],"./kaa.json":[7941,663],"./kab-KAB.json":[228,9551],"./kk-KZ.json":[5524,22],"./km-KH.json":[5845,6566],"./ko-KR.json":[7596,6844],"./ku-TR.json":[2508,3031],"./lt-LT.json":[3755,8340],"./lv-LV.json":[2327,6768],"./mr-IN.json":[5297,3397],"./my-MM.json":[7704,1477],"./nb-NO.json":[1167,2359],"./nl-NL.json":[290,3024],"./nn-NO.json":[4481,3885],"./oc-FR.json":[2284,1690],"./pa-IN.json":[6773,3162],"./percentages.json":[4451],"./pl-PL.json":[3661,3674],"./pt-BR.json":[8881,3721],"./pt-PT.json":[125,
5395],"./ro-RO.json":[2013,5089],"./ru-RU.json":[2253,8124],"./si-LK.json":[5497,1302],"./sk-SK.json":[4570,8750],"./sl-SI.json":[1984,6071],"./sv-SE.json":[6006,8534],"./ta-IN.json":[3952,2404],"./th-TH.json":[2596,537],"./tr-TR.json":[7315,4977],"./uk-UA.json":[334,7759],"./vi-VN.json":[456,4E3],"./zh-CN.json":[1037,4680],"./zh-HK.json":[5334,7920],"./zh-TW.json":[931,3421]};l.keys=function(){return Object.keys(m)};l.id=940;g.exports=l},9713:function(g){g.exports=function(h,b,l){return b in h?Object.defineProperty(h,
b,{value:l,enumerable:!0,configurable:!0,writable:!0}):h[b]=l,h}},6479:function(g,h,b){var l=b(7316);g.exports=function(m,p){if(null==m)return{};var D,v=l(m,p);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(m);for(D=0;D<t.length;D++){var r=t[D];0<=p.indexOf(r)||Object.prototype.propertyIsEnumerable.call(m,r)&&(v[r]=m[r])}}return v}},7316:function(g){g.exports=function(h,b){if(null==h)return{};var l,m={},p=Object.keys(h);for(l=0;l<p.length;l++){var D=p[l];0<=b.indexOf(D)||(m[D]=
h[D])}return m}},4295:function(g,h,b){var l=b(8081),m=b.n(l);l=b(3645);var p=b.n(l);l=b(1667);l=b.n(l);var D=new URL(b(3940),b.b),v=new URL(b(3147),b.b),t=new URL(b(8303),b.b),r=new URL(b(1273),b.b),f=new URL(b(9577),b.b);b=new URL(b(9729),b.b);m=p()(m());p=l()(D);v=l()(v);t=l()(t);r=l()(r);f=l()(f);l=l()(b);m.push([g.id,'@font-face{font-family:"Virgil";src:url('+p+');font-display:swap}@font-face{font-family:"Cascadia";src:url('+v+');font-display:swap}@font-face{font-family:"Assistant";src:url('+
t+');font-display:swap;font-weight:400}@font-face{font-family:"Assistant";src:url('+r+');font-display:swap;font-weight:500}@font-face{font-family:"Assistant";src:url('+f+');font-display:swap;font-weight:600}@font-face{font-family:"Assistant";src:url('+l+");font-display:swap;font-weight:700}",""]);h.Z=m},6086:function(g,h,b){var l=b(8081);l=b.n(l);var m=b(3645);b=b.n(m)()(l());b.push([g.id,".zoom-actions,.undo-redo-buttons{background-color:var(--island-bg-color);border-radius:var(--border-radius-lg)}.zoom-button,.undo-redo-buttons button{border:1px solid var(--default-border-color) !important;border-radius:0 !important;background-color:rgba(0,0,0,0) !important;font-size:.875rem !important;width:var(--lg-button-size);height:var(--lg-button-size)}.zoom-button svg,.undo-redo-buttons button svg{width:var(--lg-icon-size) !important;height:var(--lg-icon-size) !important}.zoom-button .ToolIcon__icon,.undo-redo-buttons button .ToolIcon__icon{width:100%;height:100%}.reset-zoom-button{border-left:0 !important;border-right:0 !important;padding:0 .625rem !important;width:3.75rem !important;justify-content:center;color:var(--text-primary-color)}.zoom-out-button{border-top-left-radius:var(--border-radius-lg) !important;border-bottom-left-radius:var(--border-radius-lg) !important}:root[dir\x3drtl] .zoom-out-button{-webkit-transform:scaleX(-1);transform:scaleX(-1)}.zoom-out-button .ToolIcon__icon{border-top-right-radius:0 !important;border-bottom-right-radius:0 !important}.zoom-in-button{border-top-right-radius:var(--border-radius-lg) !important;border-bottom-right-radius:var(--border-radius-lg) !important}:root[dir\x3drtl] .zoom-in-button{-webkit-transform:scaleX(-1);transform:scaleX(-1)}.zoom-in-button .ToolIcon__icon{border-top-left-radius:0 !important;border-bottom-left-radius:0 !important}.undo-redo-buttons .undo-button-container button{border-top-left-radius:var(--border-radius-lg) !important;border-bottom-left-radius:var(--border-radius-lg) !important;border-right:0 !important}:root[dir\x3drtl] .undo-redo-buttons .undo-button-container button{-webkit-transform:scaleX(-1);transform:scaleX(-1)}.undo-redo-buttons .undo-button-container button .ToolIcon__icon{border-top-right-radius:0 !important;border-bottom-right-radius:0 !important}.undo-redo-buttons .redo-button-container button{border-top-right-radius:var(--border-radius-lg) !important;border-bottom-right-radius:var(--border-radius-lg) !important}:root[dir\x3drtl] .undo-redo-buttons .redo-button-container button{-webkit-transform:scaleX(-1);transform:scaleX(-1)}.undo-redo-buttons .redo-button-container button .ToolIcon__icon{border-top-left-radius:0 !important;border-bottom-left-radius:0 !important}",
""]);h.Z=b},3729:function(g,h,b){var l=b(8081);l=b.n(l);var m=b(3645);b=b.n(m)()(l());b.push([g.id,':export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .Avatar{width:1.25rem;height:1.25rem;position:relative;border-radius:100%;outline-offset:2px;display:flex;justify-content:center;align-items:center;cursor:pointer;font-size:.75rem;font-weight:800;line-height:1}.excalidraw .Avatar-img{width:100%;height:100%;border-radius:100%}.excalidraw .Avatar::before{content:"";position:absolute;top:-3px;right:-3px;bottom:-3px;left:-3px;border:1px solid var(--avatar-border-color);border-radius:100%}',
""]);h.Z=b},3137:function(g,h,b){var l=b(8081);l=b.n(l);var m=b(3645),p=b.n(m);m=b(1667);m=b.n(m);var D=new URL(b(7984),b.b);b=new URL(b(1639),b.b);l=p()(l());p=m()(D);b=m()(b);l.push([g.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw{--theme-filter: none;--button-destructive-bg-color: #ffe3e3;--button-destructive-color: #c92a2a;--button-gray-1: #e9ecef;--button-gray-2: #ced4da;--button-gray-3: #adb5bd;--button-special-active-bg-color: #ebfbee;--dialog-border-color: var(--color-gray-20);--dropdown-icon: url("+
p+");--focus-highlight-color: #a5d8ff;--icon-fill-color: var(--color-gray-80);--icon-green-fill-color: #2b8a3e;--default-bg-color: #ffffff;--input-bg-color: #ffffff;--input-border-color: #ced4da;--input-hover-bg-color: #f1f3f5;--input-label-color: #495057;--island-bg-color: rgba(255, 255, 255, 0.96);--keybinding-color: var(--color-gray-40);--link-color: #1c7ed6;--overlay-bg-color: rgba(255, 255, 255, 0.88);--popup-bg-color: #ffffff;--popup-secondary-bg-color: #f1f3f5;--popup-text-color: #000000;--popup-text-inverted-color: #ffffff;--select-highlight-color: #339af0;--shadow-island: 0px 7px 14px rgba(0, 0, 0, 0.05), 0px 0px 3.12708px rgba(0, 0, 0, 0.0798), 0px 0px 0.931014px rgba(0, 0, 0, 0.1702);--button-hover-bg: var(--color-gray-10);--default-border-color: var(--color-gray-30);--default-button-size: 2rem;--default-icon-size: 1rem;--lg-button-size: 2.25rem;--lg-icon-size: 1rem;--editor-container-padding: 1rem;--scrollbar-thumb: var(--button-gray-2);--scrollbar-thumb-hover: var(--button-gray-3);--modal-shadow: 0px 100px 80px rgba(0, 0, 0, 0.07), 0px 41.7776px 33.4221px rgba(0, 0, 0, 0.0503198), 0px 22.3363px 17.869px rgba(0, 0, 0, 0.0417275), 0px 12.5216px 10.0172px rgba(0, 0, 0, 0.035), 0px 6.6501px 5.32008px rgba(0, 0, 0, 0.0282725), 0px 2.76726px 2.21381px rgba(0, 0, 0, 0.0196802);--avatar-border-color: var(--color-gray-20);--sidebar-shadow: 0px 100px 80px rgba(0, 0, 0, 0.07), 0px 41.7776px 33.4221px rgba(0, 0, 0, 0.0503198), 0px 22.3363px 17.869px rgba(0, 0, 0, 0.0417275), 0px 12.5216px 10.0172px rgba(0, 0, 0, 0.035), 0px 6.6501px 5.32008px rgba(0, 0, 0, 0.0282725), 0px 2.76726px 2.21381px rgba(0, 0, 0, 0.0196802);--sidebar-border-color: var(--color-gray-20);--sidebar-bg-color: #fff;--library-dropdown-shadow: 0px 15px 6px rgba(0, 0, 0, 0.01), 0px 8px 5px rgba(0, 0, 0, 0.05), 0px 4px 4px rgba(0, 0, 0, 0.09), 0px 1px 2px rgba(0, 0, 0, 0.1), 0px 0px 0px rgba(0, 0, 0, 0.1);--space-factor: 0.25rem;--text-primary-color: var(--color-gray-80);--color-selection: #6965db;--color-icon-white: #ffffff;--color-primary: #6965db;--color-primary-darker: #5b57d1;--color-primary-darkest: #4a47b1;--color-primary-light: #e3e2fe;--color-primary-light-darker: #d7d5ff;--color-gray-10: #f5f5f5;--color-gray-20: #ebebeb;--color-gray-30: #d6d6d6;--color-gray-40: #b8b8b8;--color-gray-50: #999999;--color-gray-60: #7a7a7a;--color-gray-70: #5c5c5c;--color-gray-80: #3d3d3d;--color-gray-85: #242424;--color-gray-90: #1e1e1e;--color-gray-100: #121212;--color-warning: #fceeca;--color-warning-dark: #f5c354;--color-warning-darker: #f3ab2c;--color-warning-darkest: #ec8b14;--color-text-warning: var(--text-primary-color);--color-danger: #db6965;--color-danger-dark: #db6965;--color-danger-darker: #d65550;--color-danger-darkest: #d1413c;--color-danger-text: black;--color-danger-background: #fff0f0;--color-danger-icon-background: #ffdad6;--color-danger-color: #700000;--color-danger-icon-color: #700000;--color-warning-background: var(--color-warning);--color-warning-icon-background: var(--color-warning-dark);--color-warning-color: var(--text-primary-color);--color-warning-icon-color: var(--text-primary-color);--color-muted: var(--color-gray-30);--color-muted-darker: var(--color-gray-60);--color-muted-darkest: var(--color-gray-100);--color-muted-background: var(--color-gray-80);--color-muted-background-darker: var(--color-gray-100);--color-promo: #e70078;--color-success: #268029;--color-success-lighter: #cafccc;--color-logo-icon: var(--color-primary);--color-logo-text: #190064;--border-radius-md: 0.375rem;--border-radius-lg: 0.5rem}@media screen and (min-device-width: 1921px){.excalidraw{--lg-button-size: 2.5rem;--lg-icon-size: 1.25rem;--default-button-size: 2.25rem;--default-icon-size: 1.25rem}}.excalidraw.theme--dark.theme--dark-background-none{background:none}.excalidraw.theme--dark{--theme-filter: invert(93%) hue-rotate(180deg);--button-destructive-bg-color: #5a0000;--button-destructive-color: #ffa8a8;--button-gray-1: #363636;--button-gray-2: #272727;--button-gray-3: #222;--button-special-active-bg-color: #204624;--dialog-border-color: var(--color-gray-80);--dropdown-icon: url("+
b+");--focus-highlight-color: #228be6;--icon-fill-color: var(--color-gray-40);--icon-green-fill-color: #69db7c;--default-bg-color: #121212;--input-bg-color: #121212;--input-border-color: #2e2e2e;--input-hover-bg-color: #181818;--input-label-color: #e9ecef;--island-bg-color: #262627;--keybinding-color: var(--color-gray-60);--link-color: #4dabf7;--overlay-bg-color: rgba(52, 58, 64, 0.12);--popup-bg-color: #2c2c2c;--popup-secondary-bg-color: #222;--popup-text-color: #ced4da;--popup-text-inverted-color: #2c2c2c;--select-highlight-color: #4dabf7;--text-primary-color: var(--color-gray-40);--button-hover-bg: var(--color-gray-80);--default-border-color: var(--color-gray-80);--shadow-island: 0px 13px 33px rgba(0, 0, 0, 0.07), 0px 4.13px 9.94853px rgba(0, 0, 0, 0.0456112), 0px 1.13px 4.13211px rgba(0, 0, 0, 0.035), 0px 0.769896px 1.4945px rgba(0, 0, 0, 0.0243888);--modal-shadow: 0px 100px 80px rgba(0, 0, 0, 0.07), 0px 41.7776px 33.4221px rgba(0, 0, 0, 0.0503198), 0px 22.3363px 17.869px rgba(0, 0, 0, 0.0417275), 0px 12.5216px 10.0172px rgba(0, 0, 0, 0.035), 0px 6.6501px 5.32008px rgba(0, 0, 0, 0.0282725), 0px 2.76726px 2.21381px rgba(0, 0, 0, 0.0196802);--avatar-border-color: var(--color-gray-85);--sidebar-border-color: var(--color-gray-85);--sidebar-bg-color: #191919;--scrollbar-thumb: #343a40;--scrollbar-thumb-hover: #495057;--color-selection: #3530c4;--color-icon-white: var(--color-gray-90);--color-primary: #a8a5ff;--color-primary-darker: #b2aeff;--color-primary-darkest: #beb9ff;--color-primary-light: #4f4d6f;--color-primary-light-darker: #43415e;--color-text-warning: var(--color-gray-80);--color-danger: #ffa8a5;--color-danger-dark: #672120;--color-danger-darker: #8f2625;--color-danger-darkest: #ac2b29;--color-danger-text: #fbcbcc;--color-danger-background: #fbcbcc;--color-danger-icon-background: #672120;--color-danger-color: #261919;--color-danger-icon-color: #fbcbcc;--color-warning-background: var(--color-warning);--color-warning-icon-background: var(--color-warning-dark);--color-warning-color: var(--color-gray-80);--color-warning-icon-color: var(--color-gray-80);--color-muted: var(--color-gray-80);--color-muted-darker: var(--color-gray-60);--color-muted-darkest: var(--color-gray-20);--color-muted-background: var(--color-gray-40);--color-muted-background-darker: var(--color-gray-20);--color-promo: #d297ff;--color-logo-text: #e2dfff}.excalidraw .excalidraw-button{display:flex;justify-content:center;align-items:center;padding:.625rem;width:var(--button-width, var(--default-button-size));height:var(--button-height, var(--default-button-size));box-sizing:border-box;border-width:1px;border-style:solid;border-color:var(--button-border, var(--default-border-color));border-radius:var(--border-radius-lg);cursor:pointer;background-color:var(--button-bg, var(--island-bg-color));color:var(--button-color, var(--text-primary-color))}.excalidraw .excalidraw-button svg{width:var(--button-width, var(--lg-icon-size));height:var(--button-height, var(--lg-icon-size))}.excalidraw .excalidraw-button:hover{background-color:var(--button-hover-bg, var(--island-bg-color));border-color:var(--button-hover-border, var(--button-border, var(--default-border-color)));color:var(--button-hover-color, var(--button-color, var(--text-primary-color, inherit)))}.excalidraw .excalidraw-button:active{background-color:var(--button-active-bg, var(--island-bg-color));border-color:var(--button-active-border, var(--color-primary-darkest))}.excalidraw .excalidraw-button.active{background-color:var(--button-selected-bg, var(--color-primary-light));border-color:var(--button-selected-border, var(--color-primary-light))}.excalidraw .excalidraw-button.active:hover{background-color:var(--button-selected-hover-bg, var(--color-primary-light))}.excalidraw .excalidraw-button.active svg{color:var(--button-color, var(--color-primary-darker))}",
""]);h.Z=l},4241:function(g,h,b){var l=b(8081);l=b.n(l);var m=b(3645);b=b.n(m)()(l());b.push([g.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .Card{display:flex;flex-direction:column;align-items:center;max-width:290px;margin:1em;text-align:center}.excalidraw .Card .Card-icon{font-size:2.6em;display:flex;flex:0 0 auto;padding:1.4rem;border-radius:50%;background:var(--card-color);color:#fff}.excalidraw .Card .Card-icon svg{width:2.8rem;height:2.8rem}.excalidraw .Card .Card-details{font-size:.96em;min-height:90px;padding:0 1em;margin-bottom:auto}.excalidraw .Card .Card-button.ToolIcon_type_button{height:2.5rem;margin-top:1em;margin-bottom:.3em;background-color:var(--card-color)}.excalidraw .Card .Card-button.ToolIcon_type_button:hover{background-color:var(--card-color-darker)}.excalidraw .Card .Card-button.ToolIcon_type_button:active{background-color:var(--card-color-darkest)}.excalidraw .Card .Card-button.ToolIcon_type_button .ToolIcon__label{color:#fff}.excalidraw .Card .Card-button.ToolIcon_type_button .Spinner{--spinner-color: #fff}",
""]);h.Z=b},6029:function(g,h,b){var l=b(8081);l=b.n(l);var m=b(3645);b=b.n(m)()(l());b.push([g.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .Checkbox{margin:4px .3em;display:flex;align-items:center;cursor:pointer;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:rgba(0,0,0,0)}.excalidraw .Checkbox:hover:not(.is-checked) .Checkbox-box:not(:focus){box-shadow:0 0 0 2px #4dabf7}.excalidraw .Checkbox:hover:not(.is-checked) .Checkbox-box:not(:focus) svg{display:block;opacity:.3}.excalidraw .Checkbox:active .Checkbox-box{box-shadow:0 0 2px 1px inset #1c7ed6 !important}.excalidraw .Checkbox:hover .Checkbox-box{background-color:rgba(208,235,255,.2)}.excalidraw .Checkbox.is-checked .Checkbox-box{background-color:#d0ebff}.excalidraw .Checkbox.is-checked .Checkbox-box svg{display:block}.excalidraw .Checkbox.is-checked:hover .Checkbox-box{background-color:#a5d8ff}.excalidraw .Checkbox .Checkbox-box{width:22px;height:22px;padding:0;flex:0 0 auto;margin:0 1em;display:flex;align-items:center;justify-content:center;box-shadow:0 0 0 2px #1c7ed6;background-color:rgba(0,0,0,0);border-radius:4px;color:#1c7ed6;border:0}.excalidraw .Checkbox .Checkbox-box:focus{box-shadow:0 0 0 3px #1c7ed6}.excalidraw .Checkbox .Checkbox-box svg{display:none;width:16px;height:16px;stroke-width:3px}.excalidraw .Checkbox .Checkbox-label{display:flex;align-items:center}.excalidraw .Checkbox .excalidraw-tooltip-icon{width:1em;height:1em}",
""]);h.Z=b},4269:function(g,h,b){var l=b(8081);l=b.n(l);var m=b(3645);m=b.n(m);var p=b(1667);p=b.n(p);b=new URL(b(9669),b.b);l=m()(l());b=p()(b);l.push([g.id,':export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .focus-visible-none:focus-visible{outline:none !important}.excalidraw .color-picker__heading{padding:0 .5rem;font-size:.75rem;text-align:left}.excalidraw .color-picker-container{display:grid;grid-template-columns:1fr 20px 1.625rem;padding:.25rem 0px;align-items:center}.excalidraw--mobile.excalidraw .color-picker-container{max-width:175px}.excalidraw .color-picker__top-picks{display:flex;justify-content:space-between}.excalidraw .color-picker__button{--radius: 0.25rem;padding:0;margin:0;width:1.35rem;height:1.35rem;border:1px solid var(--color-gray-30);border-radius:var(--radius);-webkit-filter:var(--theme-filter);filter:var(--theme-filter);background-color:var(--swatch-color);background-position:left center;position:relative;font-family:inherit;box-sizing:border-box}.excalidraw .color-picker__button:hover::after{content:"";position:absolute;top:-2px;left:-2px;right:-2px;bottom:-2px;box-shadow:0 0 0 1px var(--color-gray-30);border-radius:calc(var(--radius) + 1px);-webkit-filter:var(--theme-filter);filter:var(--theme-filter)}.excalidraw .color-picker__button.active .color-picker__button-outline{position:absolute;top:-2px;left:-2px;right:-2px;bottom:-2px;box-shadow:0 0 0 1px var(--color-primary-darkest);z-index:1;border-radius:calc(var(--radius) + 1px);-webkit-filter:var(--theme-filter);filter:var(--theme-filter)}.excalidraw .color-picker__button:focus-visible{outline:none}.excalidraw .color-picker__button:focus-visible::after{content:"";position:absolute;top:-4px;right:-4px;bottom:-4px;left:-4px;border:3px solid var(--focus-highlight-color);border-radius:calc(var(--radius) + 1px)}.excalidraw .color-picker__button:focus-visible.active .color-picker__button-outline{display:none}.excalidraw .color-picker__button--large{--radius: 0.5rem;width:1.875rem;height:1.875rem}.excalidraw .color-picker__button.is-transparent{background-image:url('+
b+")}.excalidraw .color-picker__button--no-focus-visible{border:0}.excalidraw .color-picker__button--no-focus-visible::after{display:none}.excalidraw .color-picker__button--no-focus-visible:focus-visible{outline:none !important}.excalidraw .color-picker__button.active-color{border-radius:calc(var(--radius) + 1px);width:1.625rem;height:1.625rem}.excalidraw .color-picker__button__hotkey-label{position:absolute;right:4px;bottom:4px;-webkit-filter:none;filter:none;font-size:11px}.excalidraw .color-picker{background:var(--popup-bg-color);border:0 solid rgba(255,255,255,.25);box-shadow:rgba(0,0,0,.25) 0 1px 4px;border-radius:4px;position:absolute}:root[dir\x3dltr] .excalidraw .color-picker{left:-5.5px}:root[dir\x3drtl] .excalidraw .color-picker{right:-5.5px}.excalidraw .color-picker-control-container{display:grid;grid-template-columns:auto 1fr;align-items:center;-webkit-column-gap:.5rem;column-gap:.5rem}.excalidraw .color-picker-control-container+.popover{position:static}.excalidraw .color-picker-popover-container{margin-top:-0.25rem}:root[dir\x3dltr] .excalidraw .color-picker-popover-container{margin-left:.5rem}:root[dir\x3drtl] .excalidraw .color-picker-popover-container{margin-left:-3rem}.excalidraw .color-picker-triangle{width:0;height:0;border-style:solid;border-width:0 9px 10px;border-color:rgba(0,0,0,0) rgba(0,0,0,0) var(--popup-bg-color);position:absolute;top:10px}:root[dir\x3dltr] .excalidraw .color-picker-triangle{-webkit-transform:rotate(270deg);transform:rotate(270deg);left:-14px}:root[dir\x3drtl] .excalidraw .color-picker-triangle{-webkit-transform:rotate(90deg);transform:rotate(90deg);right:-14px}.excalidraw .color-picker-triangle-shadow{border-color:rgba(0,0,0,0) rgba(0,0,0,0) rgba(0,0,0,.1)}:root[dir\x3dltr] .excalidraw .color-picker-triangle-shadow{left:-14px}:root[dir\x3drtl] .excalidraw .color-picker-triangle-shadow{right:-16px}.excalidraw .color-picker-content{display:flex;flex-direction:column;gap:.75rem;outline:none}.excalidraw .color-picker-content--default{padding:.5rem;display:grid;grid-template-columns:repeat(5, 1.875rem);grid-gap:.25rem;border-radius:4px}.excalidraw .color-picker-content--default:focus{outline:none;box-shadow:0 0 0 2px var(--focus-highlight-color)}.excalidraw .color-picker-content--canvas{display:flex;flex-direction:column;padding:.25rem}.excalidraw .color-picker-content--canvas-title{color:#868e96;font-size:12px;padding:0 .25rem}.excalidraw .color-picker-content--canvas-colors{padding:.5rem 0}.excalidraw .color-picker-content--canvas-colors .color-picker-swatch{margin:0 .25rem}.excalidraw .color-picker-content .color-input-container{grid-column:1/span 5}.excalidraw .color-picker-swatch{position:relative;height:1.875rem;width:1.875rem;cursor:pointer;border-radius:4px;margin:0;box-sizing:border-box;border:1px solid #ddd;background-color:currentColor !important;-webkit-filter:var(--theme-filter);filter:var(--theme-filter)}.excalidraw .color-picker-swatch:focus{box-shadow:0 0 4px 1px currentColor;border-color:var(--select-highlight-color)}.excalidraw .color-picker-transparent{border-radius:4px;box-shadow:rgba(0,0,0,.1) 0 0 0 1px inset;position:absolute;top:0;right:0;bottom:0;left:0}.excalidraw .color-picker-transparent,.excalidraw .color-picker-label-swatch{background:url("+
b+') left center}.excalidraw .color-picker-hash{height:var(--default-button-size);flex-shrink:0;padding:.5rem .5rem .5rem .75rem;border:1px solid var(--default-border-color);border-right:0;box-sizing:border-box;color:var(--input-label-color);display:flex;align-items:center;justify-content:center;position:relative}:root[dir\x3dltr] .excalidraw .color-picker-hash{border-radius:var(--border-radius-lg) 0 0 var(--border-radius-lg)}:root[dir\x3drtl] .excalidraw .color-picker-hash{border-radius:0 var(--border-radius-lg) var(--border-radius-lg) 0;border-right:1px solid var(--default-border-color);border-left:0}.excalidraw .color-input-container{display:flex}.excalidraw .color-input-container:focus-within{box-shadow:0 0 0 1px var(--color-primary-darkest);border-radius:var(--border-radius-lg)}.excalidraw .color-picker__input-label{display:grid;grid-template-columns:auto 1fr auto auto;gap:8px;align-items:center;border:1px solid var(--default-border-color);border-radius:8px;padding:0 12px;margin:8px;box-sizing:border-box}.excalidraw .color-picker__input-label:focus-within{box-shadow:0 0 0 1px var(--color-primary-darkest);border-radius:var(--border-radius-lg)}.excalidraw .color-picker__input-hash{padding:0 .25rem}.excalidraw .color-picker-input{box-sizing:border-box;width:100%;margin:0;font-size:.875rem;font-family:inherit;background-color:rgba(0,0,0,0);color:var(--text-primary-color);border:0;outline:none;height:var(--default-button-size);border:1px solid var(--default-border-color);border-left:0;letter-spacing:.4px;padding:.5rem;padding-left:.25rem;-webkit-appearance:none;appearance:none}:root[dir\x3dltr] .excalidraw .color-picker-input{border-radius:0 var(--border-radius-lg) var(--border-radius-lg) 0}:root[dir\x3drtl] .excalidraw .color-picker-input{border-radius:var(--border-radius-lg) 0 0 var(--border-radius-lg);border-left:1px solid var(--default-border-color);border-right:0}.excalidraw .color-picker-input:focus-visible{box-shadow:none}.excalidraw .color-picker-label-swatch-container{border:1px solid var(--default-border-color);border-radius:var(--border-radius-lg);width:var(--default-button-size);height:var(--default-button-size);box-sizing:border-box;overflow:hidden}.excalidraw .color-picker-label-swatch{display:flex;justify-content:center;align-items:center;padding:.625rem;width:var(--button-width, var(--default-button-size));height:var(--button-height, var(--default-button-size));box-sizing:border-box;border-width:1px;border-style:solid;border-color:var(--button-border, var(--default-border-color));border-radius:var(--border-radius-lg);cursor:pointer;background-color:var(--button-bg, var(--island-bg-color));color:var(--button-color, var(--text-primary-color));background-color:var(--swatch-color) !important;overflow:hidden;position:relative;-webkit-filter:var(--theme-filter);filter:var(--theme-filter);border:0 !important}.excalidraw .color-picker-label-swatch svg{width:var(--button-width, var(--lg-icon-size));height:var(--button-height, var(--lg-icon-size))}.excalidraw .color-picker-label-swatch:hover{background-color:var(--button-hover-bg, var(--island-bg-color));border-color:var(--button-hover-border, var(--button-border, var(--default-border-color)));color:var(--button-hover-color, var(--button-color, var(--text-primary-color, inherit)))}.excalidraw .color-picker-label-swatch:active{background-color:var(--button-active-bg, var(--island-bg-color));border-color:var(--button-active-border, var(--color-primary-darkest))}.excalidraw .color-picker-label-swatch.active{background-color:var(--button-selected-bg, var(--color-primary-light));border-color:var(--button-selected-border, var(--color-primary-light))}.excalidraw .color-picker-label-swatch.active:hover{background-color:var(--button-selected-hover-bg, var(--color-primary-light))}.excalidraw .color-picker-label-swatch.active svg{color:var(--button-color, var(--color-primary-darker))}.excalidraw .color-picker-label-swatch:after{content:"";position:absolute;top:0;left:0;width:100%;height:100%;background:var(--swatch-color)}.excalidraw .color-picker-keybinding{position:absolute;bottom:2px;font-size:.7em}:root[dir\x3dltr] .excalidraw .color-picker-keybinding{right:2px}:root[dir\x3drtl] .excalidraw .color-picker-keybinding{left:2px}.excalidraw--mobile.excalidraw .color-picker-keybinding{display:none}.excalidraw .color-picker-type-canvasBackground .color-picker-keybinding{color:#aaa}.excalidraw .color-picker-type-elementBackground .color-picker-keybinding{color:#fff}.excalidraw .color-picker-swatch[aria-label\x3dtransparent] .color-picker-keybinding{color:#aaa}.excalidraw .color-picker-type-elementStroke .color-picker-keybinding{color:#d4d4d4}.excalidraw.theme--dark .color-picker-type-elementBackground .color-picker-keybinding{color:#000}.excalidraw.theme--dark .color-picker-swatch[aria-label\x3dtransparent] .color-picker-keybinding{color:#000}',
""]);h.Z=l},9393:function(g,h,b){var l=b(8081);l=b.n(l);var m=b(3645);b=b.n(m)()(l());b.push([g.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .confirm-dialog-buttons{display:flex;-webkit-column-gap:.5rem;column-gap:.5rem;justify-content:flex-end}",""]);h.Z=b},6578:function(g,h,b){var l=b(8081);l=b.n(l);var m=b(3645);b=b.n(m)()(l());b.push([g.id,':export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .context-menu{position:relative;border-radius:4px;box-shadow:0 3px 10px rgba(0,0,0,.2);padding:0;list-style:none;-webkit-user-select:none;user-select:none;margin:-0.25rem 0 0 .125rem;padding:.5rem 0;background-color:var(--popup-secondary-bg-color);border:1px solid var(--button-gray-3);cursor:default}.excalidraw .context-menu button{color:var(--popup-text-color)}.excalidraw .context-menu-item{position:relative;width:100%;min-width:9.5rem;margin:0;padding:.25rem 1rem .25rem 1.25rem;text-align:start;border-radius:0;background-color:rgba(0,0,0,0);border:none;white-space:nowrap;font-family:inherit;display:grid;grid-template-columns:1fr .2fr;align-items:center}.excalidraw .context-menu-item.checkmark::before{position:absolute;left:6px;margin-bottom:1px;content:"✓"}.excalidraw .context-menu-item.dangerous .context-menu-item__label{color:#f03e3e}.excalidraw .context-menu-item .context-menu-item__label{justify-self:start;-webkit-margin-end:20px;margin-inline-end:20px}.excalidraw .context-menu-item .context-menu-item__shortcut{justify-self:end;opacity:.6;font-family:inherit;font-size:.7rem}.excalidraw .context-menu-item:hover{color:var(--popup-bg-color);background-color:var(--select-highlight-color)}.excalidraw .context-menu-item:hover.dangerous{background-color:#fa5252}.excalidraw .context-menu-item:hover.dangerous .context-menu-item__label{color:var(--popup-bg-color)}.excalidraw .context-menu-item:focus{z-index:1}.excalidraw--mobile.excalidraw .context-menu-item{display:block}.excalidraw--mobile.excalidraw .context-menu-item .context-menu-item__label{-webkit-margin-end:0;margin-inline-end:0}.excalidraw--mobile.excalidraw .context-menu-item .context-menu-item__shortcut{display:none}.excalidraw .context-menu-item-separator{border:none;border-top:1px solid #adb5bd}',
""]);h.Z=b},9482:function(g,h,b){var l=b(8081);l=b.n(l);var m=b(3645);b=b.n(m)()(l());b.push([g.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .Dialog{-webkit-user-select:text;user-select:text;cursor:auto}.excalidraw .Dialog__title{margin:0;text-align:left;font-size:1.25rem;border-bottom:1px solid var(--dialog-border-color);padding:0 0 .75rem;margin-bottom:1.5rem}.excalidraw .Dialog__close{color:var(--color-gray-40);margin:0;position:absolute;top:.75rem;right:.5rem;border:0;background-color:rgba(0,0,0,0);line-height:0;cursor:pointer}.excalidraw .Dialog__close:hover{color:var(--color-gray-60)}.excalidraw .Dialog__close:active{color:var(--color-gray-40)}.excalidraw--mobile.excalidraw .Dialog__close{top:1.25rem;right:1.25rem}.excalidraw .Dialog__close svg{width:1.5rem;height:1.5rem}",
""]);h.Z=b},6148:function(g,h,b){var l=b(8081);l=b.n(l);var m=b(3645);b=b.n(m)()(l());b.push([g.id,".excalidraw .Dialog__action-button{position:relative;display:flex;-webkit-column-gap:.5rem;column-gap:.5rem;align-items:center;padding:.5rem 1.5rem;border:1px solid var(--default-border-color);background-color:rgba(0,0,0,0);height:3rem;border-radius:var(--border-radius-lg);letter-spacing:.4px;color:inherit;font-family:inherit;font-size:.875rem;font-weight:600;-webkit-user-select:none;user-select:none}.excalidraw .Dialog__action-button svg{display:block;width:1rem;height:1rem}.excalidraw .Dialog__action-button--danger{background-color:var(--color-danger);border-color:var(--color-danger);color:#fff}.excalidraw .Dialog__action-button--primary{background-color:var(--color-primary);border-color:var(--color-primary);color:#fff}.excalidraw.theme--dark .Dialog__action-button--danger{color:var(--color-gray-100)}.excalidraw.theme--dark .Dialog__action-button--primary{color:var(--color-gray-100)}",
""]);h.Z=b},5744:function(g,h,b){var l=b(8081);l=b.n(l);var m=b(3645);b=b.n(m)()(l());b.push([g.id,".excalidraw .ExcalidrawLogo{--logo-icon--xs: 2rem;--logo-text--xs: 1.5rem;--logo-icon--small: 2.5rem;--logo-text--small: 1.75rem;--logo-icon--normal: 3rem;--logo-text--normal: 2.2rem;--logo-icon--large: 90px;--logo-text--large: 65px;display:flex;align-items:center}.excalidraw .ExcalidrawLogo svg{flex:0 0 auto}.excalidraw .ExcalidrawLogo .ExcalidrawLogo-icon{width:auto;color:var(--color-logo-icon)}.excalidraw .ExcalidrawLogo .ExcalidrawLogo-text{margin-left:.75rem;width:auto;color:var(--color-logo-text)}.excalidraw .ExcalidrawLogo.is-xs .ExcalidrawLogo-icon{height:var(--logo-icon--xs)}.excalidraw .ExcalidrawLogo.is-xs .ExcalidrawLogo-text{height:var(--logo-text--xs)}.excalidraw .ExcalidrawLogo.is-small .ExcalidrawLogo-icon{height:var(--logo-icon--small)}.excalidraw .ExcalidrawLogo.is-small .ExcalidrawLogo-text{height:var(--logo-text--small)}.excalidraw .ExcalidrawLogo.is-normal .ExcalidrawLogo-icon{height:var(--logo-icon--normal)}.excalidraw .ExcalidrawLogo.is-normal .ExcalidrawLogo-text{height:var(--logo-text--normal)}.excalidraw .ExcalidrawLogo.is-large .ExcalidrawLogo-icon{height:var(--logo-icon--large)}.excalidraw .ExcalidrawLogo.is-large .ExcalidrawLogo-text{height:var(--logo-text--large)}",
""]);h.Z=b},7955:function(g,h,b){var l=b(8081);l=b.n(l);var m=b(3645);m=b.n(m);var p=b(1667);p=b.n(p);b=new URL(b(9669),b.b);l=m()(l());b=p()(b);l.push([g.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .ExportDialog__preview{--preview-padding: calc(var(--space-factor) * 4);background:url("+b+") left center;text-align:center;padding:var(--preview-padding);margin-bottom:calc(var(--space-factor)*3);display:flex;justify-content:center;align-items:center}.excalidraw .ExportDialog__preview canvas{max-width:calc(100% - var(--preview-padding)*2);max-height:25rem}.excalidraw.theme--dark .ExportDialog__preview canvas{-webkit-filter:none;filter:none}.excalidraw .ExportDialog__actions{width:100%;display:flex;grid-gap:calc(var(--space-factor)*2);align-items:top;justify-content:space-between}.excalidraw--mobile.excalidraw .ExportDialog{display:flex;flex-direction:column}.excalidraw--mobile.excalidraw .ExportDialog__actions{flex-direction:column;align-items:center}.excalidraw--mobile.excalidraw .ExportDialog__actions\x3e*{margin-bottom:calc(var(--space-factor)*3)}.excalidraw--mobile.excalidraw .ExportDialog__preview canvas{max-height:30vh}.excalidraw--mobile.excalidraw .ExportDialog__dialog,.excalidraw--mobile.excalidraw .ExportDialog__dialog .Island{height:100%;box-sizing:border-box}.excalidraw--mobile.excalidraw .ExportDialog__dialog .Island{overflow-y:auto}.excalidraw .ExportDialog--json .ExportDialog-cards{display:grid;grid-template-columns:repeat(auto-fit, minmax(200px, 1fr));justify-items:center;row-gap:2em}@media(max-width: 460px){.excalidraw .ExportDialog--json .ExportDialog-cards{grid-template-columns:repeat(auto-fit, minmax(240px, 1fr))}.excalidraw .ExportDialog--json .ExportDialog-cards .Card-details{min-height:40px}}.excalidraw .ExportDialog--json .ExportDialog-cards .ProjectName{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;margin:1em auto;align-items:flex-start;flex-direction:column}.excalidraw .ExportDialog--json .ExportDialog-cards .ProjectName .TextInput{width:auto}.excalidraw .ExportDialog--json .ExportDialog-cards .ProjectName-label{margin:.625em 0;font-weight:bold}.excalidraw button.ExportDialog-imageExportButton{border:0;width:5rem;height:5rem;margin:0 .2em;padding:0;display:flex;align-items:center;justify-content:center;border-radius:1rem;background-color:var(--button-color);box-shadow:0 3px 5px -1px rgba(0,0,0,.28),0 6px 10px 0 rgba(0,0,0,.14);font-family:Cascadia;font-size:1.8em;color:#fff}.excalidraw button.ExportDialog-imageExportButton:hover{background-color:var(--button-color-darker)}.excalidraw button.ExportDialog-imageExportButton:active{background-color:var(--button-color-darkest);box-shadow:none}.excalidraw button.ExportDialog-imageExportButton svg{width:.9em}",
""]);h.Z=l},7522:function(g,h,b){var l=b(8081);l=b.n(l);var m=b(3645);b=b.n(m)()(l());b.push([g.id,".excalidraw .excalidraw-eye-dropper-container,.excalidraw .excalidraw-eye-dropper-backdrop{position:absolute;width:100%;height:100%;z-index:var(--zIndex-eyeDropperBackdrop);touch-action:none}.excalidraw .excalidraw-eye-dropper-container{pointer-events:none}.excalidraw .excalidraw-eye-dropper-backdrop{pointer-events:all}.excalidraw .excalidraw-eye-dropper-preview{pointer-events:none;width:3rem;height:3rem;position:fixed;z-index:var(--zIndex-eyeDropperPreview);border-radius:1rem;border:1px solid var(--default-border-color);-webkit-filter:var(--theme-filter);filter:var(--theme-filter)}.excalidraw .excalidraw-eye-dropper-trigger{width:1.25rem;height:1.25rem;cursor:pointer;padding:4px;margin-right:-4px;margin-left:-2px;border-radius:.5rem;color:var(--icon-fill-color)}.excalidraw .excalidraw-eye-dropper-trigger:hover{background:var(--button-hover-bg)}.excalidraw .excalidraw-eye-dropper-trigger.selected{color:var(--color-primary);background:var(--color-primary-light)}",
""]);h.Z=b},8960:function(g,h,b){var l=b(8081);l=b.n(l);var m=b(3645);b=b.n(m)()(l());b.push([g.id,':export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .ExcButton{--text-color: transparent;--border-color: transparent;--back-color: transparent;color:var(--text-color);background-color:var(--back-color);border-color:var(--border-color);display:flex;justify-content:center;align-items:center;flex-shrink:0;flex-wrap:nowrap;border-radius:.5rem;border-width:1px;border-style:solid;font-family:"Assistant";-webkit-user-select:none;user-select:none;transition:all 150ms ease-out}.excalidraw .ExcButton--color-primary.ExcButton--variant-filled{--text-color: var(--input-bg-color);--back-color: var(--color-primary)}.excalidraw .ExcButton--color-primary.ExcButton--variant-filled:hover{--back-color: var(--color-primary-darker)}.excalidraw .ExcButton--color-primary.ExcButton--variant-filled:active{--back-color: var(--color-primary-darkest)}.excalidraw .ExcButton--color-primary.ExcButton--variant-outlined,.excalidraw .ExcButton--color-primary.ExcButton--variant-icon{--text-color: var(--color-primary);--border-color: var(--color-primary);--back-color: var(--input-bg-color)}.excalidraw .ExcButton--color-primary.ExcButton--variant-outlined:hover,.excalidraw .ExcButton--color-primary.ExcButton--variant-icon:hover{--text-color: var(--color-primary-darker);--border-color: var(--color-primary-darker)}.excalidraw .ExcButton--color-primary.ExcButton--variant-outlined:active,.excalidraw .ExcButton--color-primary.ExcButton--variant-icon:active{--text-color: var(--color-primary-darkest);--border-color: var(--color-primary-darkest)}.excalidraw .ExcButton--color-danger.ExcButton--variant-filled{--text-color: var(--color-danger-text);--back-color: var(--color-danger-dark)}.excalidraw .ExcButton--color-danger.ExcButton--variant-filled:hover{--back-color: var(--color-danger-darker)}.excalidraw .ExcButton--color-danger.ExcButton--variant-filled:active{--back-color: var(--color-danger-darkest)}.excalidraw .ExcButton--color-danger.ExcButton--variant-outlined,.excalidraw .ExcButton--color-danger.ExcButton--variant-icon{--text-color: var(--color-danger);--border-color: var(--color-danger);--back-color: transparent}.excalidraw .ExcButton--color-danger.ExcButton--variant-outlined:hover,.excalidraw .ExcButton--color-danger.ExcButton--variant-icon:hover{--text-color: var(--color-danger-darkest);--border-color: var(--color-danger-darkest)}.excalidraw .ExcButton--color-danger.ExcButton--variant-outlined:active,.excalidraw .ExcButton--color-danger.ExcButton--variant-icon:active{--text-color: var(--color-danger-darker);--border-color: var(--color-danger-darker)}.excalidraw .ExcButton--color-muted.ExcButton--variant-filled{--text-color: var(--island-bg-color);--back-color: var(--color-gray-50)}.excalidraw .ExcButton--color-muted.ExcButton--variant-filled:hover{--back-color: var(--color-gray-60)}.excalidraw .ExcButton--color-muted.ExcButton--variant-filled:active{--back-color: var(--color-gray-80)}.excalidraw .ExcButton--color-muted.ExcButton--variant-outlined,.excalidraw .ExcButton--color-muted.ExcButton--variant-icon{--text-color: var(--color-muted-background);--border-color: var(--color-muted);--back-color: var(--island-bg-color)}.excalidraw .ExcButton--color-muted.ExcButton--variant-outlined:hover,.excalidraw .ExcButton--color-muted.ExcButton--variant-icon:hover{--text-color: var(--color-muted-background-darker);--border-color: var(--color-muted-darker)}.excalidraw .ExcButton--color-muted.ExcButton--variant-outlined:active,.excalidraw .ExcButton--color-muted.ExcButton--variant-icon:active{--text-color: var(--color-muted-background-darker);--border-color: var(--color-muted-darkest)}.excalidraw .ExcButton--color-warning.ExcButton--variant-filled{--text-color: black;--back-color: var(--color-warning-dark)}.excalidraw .ExcButton--color-warning.ExcButton--variant-filled:hover{--back-color: var(--color-warning-darker)}.excalidraw .ExcButton--color-warning.ExcButton--variant-filled:active{--back-color: var(--color-warning-darkest)}.excalidraw .ExcButton--color-warning.ExcButton--variant-outlined,.excalidraw .ExcButton--color-warning.ExcButton--variant-icon{--text-color: var(--color-warning-dark);--border-color: var(--color-warning-dark);--back-color: var(--input-bg-color)}.excalidraw .ExcButton--color-warning.ExcButton--variant-outlined:hover,.excalidraw .ExcButton--color-warning.ExcButton--variant-icon:hover{--text-color: var(--color-warning-darker);--border-color: var(--color-warning-darker)}.excalidraw .ExcButton--color-warning.ExcButton--variant-outlined:active,.excalidraw .ExcButton--color-warning.ExcButton--variant-icon:active{--text-color: var(--color-warning-darkest);--border-color: var(--color-warning-darkest)}.excalidraw .ExcButton--size-large{font-weight:600;font-size:.875rem;min-height:3rem;padding:.5rem 1.5rem;gap:.75rem;letter-spacing:.4px}.excalidraw .ExcButton--size-medium{font-weight:600;font-size:.75rem;min-height:2.5rem;padding:.5rem 1rem;gap:.5rem;letter-spacing:normal}.excalidraw .ExcButton--variant-icon{padding:.5rem .75rem;width:3rem}.excalidraw .ExcButton--fullWidth{width:100%}.excalidraw .ExcButton__icon{width:1.25rem;height:1.25rem}',
""]);h.Z=b},3195:function(g,h,b){var l=b(8081);l=b.n(l);var m=b(3645);b=b.n(m)()(l());b.push([g.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .FixedSideContainer{position:absolute;pointer-events:none}.excalidraw .FixedSideContainer\x3e*{pointer-events:var(--ui-pointerEvents)}.excalidraw .FixedSideContainer_side_top{left:var(--editor-container-padding);top:var(--editor-container-padding);right:var(--editor-container-padding);bottom:var(--editor-container-padding);z-index:2}.excalidraw .FixedSideContainer_side_top.zen-mode{right:42px}",
""]);h.Z=b},2978:function(g,h,b){var l=b(8081);l=b.n(l);var m=b(3645);b=b.n(m)()(l());b.push([g.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .HelpDialog .Modal__content{max-width:960px}.excalidraw .HelpDialog h3{margin:1.5rem 0;font-weight:bold;font-size:1.125rem}.excalidraw .HelpDialog__header{display:flex;flex-wrap:wrap;gap:.75rem}.excalidraw .HelpDialog__btn{display:flex;-webkit-column-gap:.5rem;column-gap:.5rem;align-items:center;border:1px solid var(--default-border-color);padding:.625rem 1rem;border-radius:var(--border-radius-lg);color:var(--text-primary-color);font-weight:600;font-size:.75rem;letter-spacing:.4px}.excalidraw .HelpDialog__btn:hover{text-decoration:none}.excalidraw .HelpDialog__link-icon{line-height:0}.excalidraw .HelpDialog__link-icon svg{width:1rem;height:1rem}.excalidraw .HelpDialog__islands-container{display:grid;grid-column-gap:1.5rem;grid-row-gap:2rem}@media screen and (min-width: 1024px){.excalidraw .HelpDialog__islands-container{grid-template-columns:1fr 1fr}}@media screen and (min-width: 1024px){.excalidraw .HelpDialog__island--tools{grid-area:1/1/2/2}.excalidraw .HelpDialog__island--view{grid-area:2/1/3/2}.excalidraw .HelpDialog__island--editor{grid-area:1/2/3/3}}.excalidraw .HelpDialog__island h4{font-size:1rem;font-weight:bold;margin:0;margin-bottom:.625rem}.excalidraw .HelpDialog__island-content{border:1px solid var(--dialog-border-color);border-radius:var(--border-radius-lg)}.excalidraw .HelpDialog__shortcut{border-bottom:1px solid var(--dialog-border-color);padding:.375rem .75rem;display:flex;justify-content:space-between;align-items:center;font-size:.875rem;-webkit-column-gap:.5rem;column-gap:.5rem}.excalidraw .HelpDialog__shortcut:last-child{border-bottom:none}.excalidraw .HelpDialog__key-container{display:flex;align-items:center;-webkit-column-gap:.25rem;column-gap:.25rem;flex-shrink:0}.excalidraw .HelpDialog__key{display:flex;box-sizing:border-box;font-size:.625rem;background-color:var(--color-primary-light);border-radius:var(--border-radius-md);padding:.5rem;word-break:keep-all;align-items:center;font-family:inherit;line-height:1}",
""]);h.Z=b},1587:function(g,h,b){var l=b(8081);l=b.n(l);var m=b(3645);b=b.n(m)()(l());b.push([g.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .HintViewer{pointer-events:none;box-sizing:border-box;position:absolute;display:flex;justify-content:center;left:0;top:100%;max-width:100%;width:100%;margin-top:.5rem;text-align:center;color:var(--color-gray-40);font-size:.75rem}.excalidraw--mobile.excalidraw .HintViewer{position:static;padding-right:2rem}.excalidraw .HintViewer\x3espan{padding:.25rem}.excalidraw.theme--dark .HintViewer{color:var(--color-gray-60)}",
""]);h.Z=b},9478:function(g,h,b){var l=b(8081);l=b.n(l);var m=b(3645);b=b.n(m)()(l());b.push([g.id,':export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .picker-container{display:inline-block;box-sizing:border-box;margin-right:.25rem}.excalidraw .picker{background:var(--popup-bg-color);border:0 solid rgba(255,255,255,.25);box-shadow:rgba(0,0,0,.25) 2px 2px 4px 2px;border-radius:4px;position:absolute}.excalidraw .picker-container button,.excalidraw .picker button{position:relative;display:flex;align-items:center;justify-content:center}.excalidraw .picker-container button:focus-visible,.excalidraw .picker button:focus-visible{outline:rgba(0,0,0,0);background-color:var(--button-gray-2)}.excalidraw .picker-container button:focus-visible svg,.excalidraw .picker button:focus-visible svg{opacity:1}.excalidraw .picker-container button:hover,.excalidraw .picker button:hover{background-color:var(--button-gray-2)}.excalidraw .picker-container button:active,.excalidraw .picker button:active{background-color:var(--button-gray-3)}.excalidraw .picker-container button:disabled,.excalidraw .picker button:disabled{cursor:not-allowed}.excalidraw .picker-container button svg,.excalidraw .picker button svg{margin:0;width:36px;height:18px;pointer-events:none}.excalidraw .picker button{padding:.25rem .28rem .35rem .25rem}.excalidraw .picker-triangle{width:0;height:0;position:relative;top:-10px;z-index:10}:root[dir\x3dltr] .excalidraw .picker-triangle{left:12px}:root[dir\x3drtl] .excalidraw .picker-triangle{right:12px}.excalidraw .picker-triangle:before{content:"";position:absolute;border-style:solid;border-width:0 9px 10px;border-color:rgba(0,0,0,0) rgba(0,0,0,0) rgba(0,0,0,.1);top:-1px}.excalidraw .picker-triangle:after{content:"";position:absolute;border-style:solid;border-width:0 9px 10px;border-color:rgba(0,0,0,0) rgba(0,0,0,0) var(--popup-bg-color)}.excalidraw .picker-content{padding:.5rem;display:grid;grid-template-columns:repeat(3, auto);grid-gap:.5rem;border-radius:4px}:root[dir\x3drtl] .excalidraw .picker-content{padding:.4rem}.excalidraw .picker-keybinding{position:absolute;bottom:2px;font-size:.7em;color:var(--keybinding-color)}:root[dir\x3dltr] .excalidraw .picker-keybinding{right:2px}:root[dir\x3drtl] .excalidraw .picker-keybinding{left:2px}.excalidraw--mobile.excalidraw .picker-keybinding{display:none}.excalidraw .picker-type-canvasBackground .picker-keybinding{color:#aaa}.excalidraw .picker-type-elementBackground .picker-keybinding{color:#fff}.excalidraw .picker-swatch[aria-label\x3dtransparent] .picker-keybinding{color:#aaa}.excalidraw .picker-type-elementStroke .picker-keybinding{color:#d4d4d4}.excalidraw.theme--dark .picker-type-elementBackground .picker-keybinding{color:#000}.excalidraw.theme--dark .picker-swatch[aria-label\x3dtransparent] .picker-keybinding{color:#000}',
""]);h.Z=b},9706:function(g,h,b){var l=b(8081);l=b.n(l);var m=b(3645);m=b.n(m);var p=b(1667);p=b.n(p);b=new URL(b(9669),b.b);l=m()(l());b=p()(b);l.push([g.id,':export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw{--ImageExportModal-preview-border: #d6d6d6}.excalidraw.theme--dark{--ImageExportModal-preview-border: #5c5c5c}.excalidraw .ImageExportModal{display:flex;flex-direction:row;justify-content:space-between}.excalidraw .ImageExportModal h3{font-family:"Assistant";font-style:normal;font-weight:700;font-size:1.313rem;line-height:130%;padding:0;margin:0}.excalidraw--mobile.excalidraw .ImageExportModal h3{display:none}.excalidraw .ImageExportModal\x3eh3{display:none}.excalidraw--mobile.excalidraw .ImageExportModal\x3eh3{display:block}.excalidraw--mobile.excalidraw .ImageExportModal{flex-direction:column;height:calc(100vh - 5rem)}.excalidraw .ImageExportModal__preview{box-sizing:border-box;display:flex;flex-direction:column;align-items:center;height:360px;width:55%;margin-right:1.5rem}.excalidraw--mobile.excalidraw .ImageExportModal__preview{max-width:unset;margin-right:unset;width:100%;height:unset;flex-grow:1}.excalidraw .ImageExportModal__preview__filename\x3einput{margin-top:1rem}.excalidraw .ImageExportModal__preview__canvas{box-sizing:border-box;width:100%;height:100%;display:flex;flex-grow:1;justify-content:center;align-items:center;background:url('+
b+') left center;border:1px solid var(--ImageExportModal-preview-border);border-radius:12px;overflow:hidden;padding:1rem}.excalidraw .ImageExportModal__preview__canvas\x3ecanvas{max-width:calc(100% - 2rem);max-height:calc(100% - 2rem);-webkit-filter:none !important;filter:none !important}.excalidraw--mobile.excalidraw .ImageExportModal__preview__canvas\x3ecanvas{max-height:100%}.excalidraw--mobile.excalidraw .ImageExportModal__preview__canvas{margin-top:24px;max-width:unset}.excalidraw .ImageExportModal__settings{display:flex;flex-direction:column;flex-wrap:wrap;gap:18px}.excalidraw--mobile.excalidraw .ImageExportModal__settings{margin-left:unset;margin-top:1rem;flex-direction:row;gap:6px 34px;align-content:flex-start}.excalidraw .ImageExportModal__settings__setting{display:flex;flex-direction:row;justify-content:space-between;align-items:center}.excalidraw--mobile.excalidraw .ImageExportModal__settings__setting{flex-direction:column;align-items:start;justify-content:unset;height:52px}.excalidraw .ImageExportModal__settings__setting__label{display:flex;flex-direction:row;align-items:center;font-family:"Assistant";font-weight:600;font-size:1rem;line-height:150%}.excalidraw .ImageExportModal__settings__setting__label svg{width:20px;height:20px;margin-left:10px}.excalidraw .ImageExportModal__settings__setting__content{display:flex;height:100%;align-items:center}.excalidraw .ImageExportModal__settings__buttons{flex-grow:1;flex-wrap:wrap;display:flex;flex-direction:row;gap:11px;align-items:flex-end;align-content:flex-end}.excalidraw--mobile.excalidraw .ImageExportModal__settings__buttons{padding-top:32px;flex-basis:100%;justify-content:center}',
""]);h.Z=l},7369:function(g,h,b){var l=b(8081);l=b.n(l);var m=b(3645);b=b.n(m)()(l());b.push([g.id,".excalidraw .Island{--padding: 0;box-sizing:border-box;background-color:var(--island-bg-color);box-shadow:var(--shadow-island);border-radius:var(--border-radius-lg);padding:calc(var(--padding)*var(--space-factor));position:relative;transition:box-shadow .5s ease-in-out}.excalidraw .Island.zen-mode{box-shadow:none}",""]);h.Z=b},1434:function(g,h,b){var l=b(8081);l=b.n(l);var m=b(3645);b=b.n(m)()(l());
b.push([g.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .layer-ui__wrapper.animate{transition:width .1s ease-in-out}.excalidraw .layer-ui__wrapper{position:absolute;width:100%;height:100%;pointer-events:none;z-index:var(--zIndex-layerUI)}.excalidraw .layer-ui__wrapper__top-right{display:flex;gap:.75rem}.excalidraw .layer-ui__wrapper__footer{width:100%}.excalidraw .layer-ui__wrapper__footer-right{z-index:100;display:flex}.excalidraw .layer-ui__wrapper .zen-mode-transition{transition:-webkit-transform .5s ease-in-out;transition:transform .5s ease-in-out;transition:transform .5s ease-in-out, -webkit-transform .5s ease-in-out}:root[dir\x3dltr] .excalidraw .layer-ui__wrapper .zen-mode-transition.transition-left{-webkit-transform:translate(-999px, 0);transform:translate(-999px, 0)}:root[dir\x3dltr] .excalidraw .layer-ui__wrapper .zen-mode-transition.transition-right{-webkit-transform:translate(999px, 0);transform:translate(999px, 0)}:root[dir\x3drtl] .excalidraw .layer-ui__wrapper .zen-mode-transition.transition-left{-webkit-transform:translate(999px, 0);transform:translate(999px, 0)}:root[dir\x3drtl] .excalidraw .layer-ui__wrapper .zen-mode-transition.transition-right{-webkit-transform:translate(-999px, 0);transform:translate(-999px, 0)}.excalidraw .layer-ui__wrapper .zen-mode-transition.layer-ui__wrapper__footer-left--transition-bottom{-webkit-transform:translate(0, 92px);transform:translate(0, 92px)}.excalidraw .layer-ui__wrapper .disable-zen-mode{padding:10px;position:absolute;bottom:0;opacity:0;visibility:hidden;transition:visibility 0s linear 0s,opacity .5s;font-family:var(--ui-font);font-size:.75rem;font-weight:500;line-height:1;border-radius:var(--border-radius-lg);border:1px solid var(--default-border-color);background-color:var(--island-bg-color);color:var(--text-primary-color)}[dir\x3dltr] .excalidraw .layer-ui__wrapper .disable-zen-mode{right:1rem}[dir\x3drtl] .excalidraw .layer-ui__wrapper .disable-zen-mode{left:1rem}.excalidraw .layer-ui__wrapper .disable-zen-mode:hover{background-color:var(--button-hover-bg)}.excalidraw .layer-ui__wrapper .disable-zen-mode:active{border-color:var(--color-primary)}.excalidraw .layer-ui__wrapper .disable-zen-mode--visible{opacity:1;visibility:visible;transition:visibility 0s linear 300ms,opacity .5s;transition-delay:.8s;pointer-events:var(--ui-pointerEvents)}.excalidraw .layer-ui__wrapper .layer-ui__wrapper__footer-left\x3e*,.excalidraw .layer-ui__wrapper .footer-center\x3e*,.excalidraw .layer-ui__wrapper .layer-ui__wrapper__footer-right\x3e*{pointer-events:var(--ui-pointerEvents)}.excalidraw .layer-ui__wrapper .layer-ui__wrapper__footer-right{margin-top:auto;margin-bottom:auto}",
""]);h.Z=b},8923:function(g,h,b){var l=b(8081);l=b.n(l);var m=b(3645);b=b.n(m)()(l());b.push([g.id,'.excalidraw .layer-ui__library{display:flex;flex-direction:column;flex:1 1 auto}.excalidraw .library-actions-counter{background-color:var(--color-primary);color:var(--color-primary-light);font-weight:bold;display:flex;align-items:center;justify-content:center;border-radius:50%;width:1rem;height:1rem;position:absolute;bottom:-0.25rem;right:-0.25rem;font-size:.625rem;pointer-events:none}.excalidraw .layer-ui__library-message{padding:2rem;min-width:200px;display:flex;flex-direction:column;align-items:center;flex-grow:1;justify-content:center}.excalidraw .layer-ui__library-message span{font-size:.8em}.excalidraw .publish-library-success .Dialog__content{display:flex;flex-direction:column}.excalidraw .publish-library-success-close.ToolIcon_type_button{background-color:#228be6;align-self:flex-end}.excalidraw .publish-library-success-close.ToolIcon_type_button:hover{background-color:#1971c2}.excalidraw .publish-library-success-close.ToolIcon_type_button .ToolIcon__icon{width:auto;font-size:1rem;color:#fff;padding:0 .5rem}.excalidraw .library-menu-control-buttons{display:flex;align-items:center;justify-content:center;gap:.625rem;position:relative}.excalidraw .library-menu-control-buttons--at-bottom::before{content:"";width:calc(100% - 1.5rem);height:1px;position:absolute;top:-1px;background:var(--sidebar-border-color)}.excalidraw .library-menu-browse-button{flex:1;height:var(--lg-button-size);display:flex;align-items:center;justify-content:center;overflow:hidden;position:relative;border-radius:var(--border-radius-lg);background-color:var(--color-primary);color:#fff;text-align:center;white-space:nowrap;text-decoration:none !important;font-weight:600;font-size:.75rem}.excalidraw .library-menu-browse-button:hover{background-color:var(--color-primary-darker)}.excalidraw .library-menu-browse-button:active{background-color:var(--color-primary-darkest)}.excalidraw.theme--dark .library-menu-browse-button{color:var(--color-gray-100)}.excalidraw.excalidraw--mobile .library-menu-browse-button{height:var(--default-button-size)}.excalidraw .layer-ui__library .dropdown-menu{width:auto;top:initial;right:0;left:initial;bottom:100%;margin-bottom:.625rem}.excalidraw .layer-ui__library .dropdown-menu .dropdown-menu-container{width:196px;box-shadow:var(--library-dropdown-shadow);border-radius:var(--border-radius-lg);padding:.25rem .5rem}.excalidraw .layer-ui__library .library-menu-dropdown-container{position:relative}.excalidraw .layer-ui__library .library-menu-dropdown-container--in-heading{padding:0;position:absolute;top:1rem;right:.75rem;z-index:1}.excalidraw .layer-ui__library .library-menu-dropdown-container--in-heading .dropdown-menu{top:100%}',
""]);h.Z=b},6440:function(g,h,b){var l=b(8081);l=b.n(l);var m=b(3645);b=b.n(m)()(l());b.push([g.id,".excalidraw{--container-padding-y: 1.5rem;--container-padding-x: 0.75rem}.excalidraw .library-menu-items__no-items{text-align:center;color:var(--color-gray-70);line-height:1.5;font-size:.875rem;width:100%}.excalidraw .library-menu-items__no-items__label{color:var(--color-primary);font-weight:bold;font-size:1.125rem;margin-bottom:.75rem}.excalidraw.theme--dark .library-menu-items__no-items{color:var(--color-gray-40)}.excalidraw .library-menu-items-container{width:100%;display:flex;flex-grow:1;flex-shrink:1;flex-basis:0;overflow-y:auto;flex-direction:column;height:100%;justify-content:center;margin:0;position:relative}.excalidraw .library-menu-items-container\x3ediv{padding-left:.75rem;padding-right:.75rem}.excalidraw .library-menu-items-container__row{display:grid;grid-template-columns:repeat(4, 1fr);gap:1rem}.excalidraw .library-menu-items-container__items{row-gap:.5rem;padding:var(--container-padding-y) 0;flex:1;overflow-y:auto;overflow-x:hidden;margin-bottom:1rem}.excalidraw .library-menu-items-container__header{color:var(--color-primary);font-size:1.125rem;font-weight:bold;margin-bottom:.75rem;width:100%;padding-right:4rem;box-sizing:border-box}.excalidraw .library-menu-items-container__header--excal{margin-top:2rem}.excalidraw .library-menu-items-container__grid{display:grid;grid-template-columns:1fr 1fr 1fr 1fr;grid-gap:1rem}.excalidraw .library-menu-items-container .separator{width:100%;display:flex;align-items:center;font-weight:500;font-size:.9rem;margin:.6em .2em;color:var(--text-primary-color)}.excalidraw .library-menu-items-private-library-container{min-height:3.75rem;width:100%}",
""]);h.Z=b},5644:function(g,h,b){var l=b(8081);l=b.n(l);var m=b(3645);b=b.n(m)()(l());b.push([g.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .library-unit{align-items:center;border:1px solid rgba(0,0,0,0);display:flex;justify-content:center;position:relative;width:55px;height:55px;box-sizing:border-box;border-radius:var(--border-radius-lg)}.excalidraw .library-unit svg{pointer-events:none}.excalidraw .library-unit--hover{border-color:var(--color-primary)}.excalidraw .library-unit--selected{border-color:var(--color-primary);border-width:1px}.excalidraw .library-unit--skeleton{opacity:.5;background:linear-gradient(-45deg, var(--color-gray-10), var(--color-gray-20), var(--color-gray-10));background-size:200% 200%;-webkit-animation:library-unit__skeleton-opacity-animation .2s linear;animation:library-unit__skeleton-opacity-animation .2s linear}.excalidraw.theme--dark .library-unit--skeleton{background-image:linear-gradient(-45deg, var(--color-gray-100), var(--color-gray-80), var(--color-gray-100))}.excalidraw .library-unit__dragger{display:flex;align-items:center;justify-content:center;height:100%;width:100%}.excalidraw .library-unit__dragger\x3esvg{-webkit-filter:var(--theme-filter);filter:var(--theme-filter);flex-grow:1;max-height:100%;max-width:100%}.excalidraw .library-unit__checkbox-container,.excalidraw .library-unit__checkbox-container:hover,.excalidraw .library-unit__checkbox-container:active{align-items:center;background:none;border:none;color:var(--icon-fill-color);display:flex;justify-content:center;margin:0;padding:.5rem;position:absolute;left:2rem;bottom:2rem;cursor:pointer}.excalidraw .library-unit__checkbox-container input,.excalidraw .library-unit__checkbox-container:hover input,.excalidraw .library-unit__checkbox-container:active input{cursor:pointer}.excalidraw .library-unit__checkbox{position:absolute;top:.125rem;right:.125rem;margin:0}.excalidraw .library-unit__checkbox .Checkbox-box{margin:0;width:1rem;height:1rem;border-radius:4px;background-color:var(--color-primary-light);border:1px solid var(--color-primary);box-shadow:none !important;padding:2px}.excalidraw .library-unit__checkbox.Checkbox:hover .Checkbox-box{background-color:var(--color-primary-light)}.excalidraw .library-unit__checkbox.is-checked .Checkbox-box{background-color:var(--color-primary) !important}.excalidraw .library-unit__checkbox.is-checked .Checkbox-box svg{color:var(--color-primary-light)}.excalidraw .library-unit__removeFromLibrary\x3esvg{height:16px;width:16px}.excalidraw .library-unit__adder{-webkit-transform:scale(1);transform:scale(1);-webkit-animation:library-unit__adder-animation 1s ease-in infinite;animation:library-unit__adder-animation 1s ease-in infinite;position:absolute;width:1.5rem;height:1.5rem;background-color:var(--color-primary);border-radius:var(--border-radius-md);display:flex;justify-content:center;align-items:center;pointer-events:none}.excalidraw .library-unit__adder svg{color:var(--color-primary-light);width:1rem;height:1rem}.excalidraw .library-unit:active .library-unit__adder{-webkit-animation:none;animation:none;-webkit-transform:scale(0.8);transform:scale(0.8)}.excalidraw .library-unit__active{cursor:pointer}@-webkit-keyframes library-unit__adder-animation{0%{-webkit-transform:scale(0.85);transform:scale(0.85)}50%{-webkit-transform:scale(1);transform:scale(1)}100%{-webkit-transform:scale(0.85);transform:scale(0.85)}}@keyframes library-unit__adder-animation{0%{-webkit-transform:scale(0.85);transform:scale(0.85)}50%{-webkit-transform:scale(1);transform:scale(1)}100%{-webkit-transform:scale(0.85);transform:scale(0.85)}}@-webkit-keyframes library-unit__skeleton-opacity-animation{0%{opacity:0}75%{opacity:0}100%{opacity:.5}}@keyframes library-unit__skeleton-opacity-animation{0%{opacity:0}75%{opacity:0}100%{opacity:.5}}",
""]);h.Z=b},6843:function(g,h,b){var l=b(8081);l=b.n(l);var m=b(3645);b=b.n(m)()(l());b.push([g.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw.excalidraw-modal-container{position:absolute;z-index:var(--zIndex-modal)}.excalidraw .Modal{position:absolute;top:0;left:0;right:0;bottom:0;display:flex;align-items:center;justify-content:center;overflow:auto;padding:calc(var(--space-factor)*10)}.excalidraw .Modal .Island{padding:2.5rem !important}.excalidraw .Modal__background{position:fixed;top:0;left:0;right:0;bottom:0;z-index:1;background-color:rgba(18,18,18,.2);-webkit-animation:Modal__background__fade-in .125s linear forwards;animation:Modal__background__fade-in .125s linear forwards}.excalidraw .Modal__content{position:relative;z-index:2;width:100%;max-width:var(--max-width);max-height:100%;opacity:0;-webkit-transform:translateY(10px);transform:translateY(10px);-webkit-animation:Modal__content_fade-in .1s ease-out .05s forwards;animation:Modal__content_fade-in .1s ease-out .05s forwards;position:relative;overflow-y:auto;background:var(--island-bg-color);border:1px solid var(--dialog-border-color);box-shadow:var(--modal-shadow);border-radius:6px;box-sizing:border-box}.excalidraw .Modal__content:focus{outline:none}.excalidraw--mobile.excalidraw .Modal__content{max-width:100%;border:0;border-radius:0}@-webkit-keyframes Modal__background__fade-in{from{opacity:0}to{opacity:1}}@keyframes Modal__background__fade-in{from{opacity:0}to{opacity:1}}@-webkit-keyframes Modal__content_fade-in{from{opacity:0;-webkit-transform:scale(0.9);transform:scale(0.9)}to{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}@keyframes Modal__content_fade-in{from{opacity:0;-webkit-transform:scale(0.9);transform:scale(0.9)}to{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}.excalidraw .Modal__close{color:var(--icon-fill-color);margin:0;padding:.375rem;position:absolute;top:1rem;right:1rem;border:0;background-color:rgba(0,0,0,0);line-height:0;cursor:pointer}.excalidraw .Modal__close svg{width:1.5rem;height:1.5rem}.excalidraw--mobile.excalidraw .Modal{padding:0}.excalidraw--mobile.excalidraw .Modal__content{position:absolute;top:0;left:0;right:0;bottom:0}",
""]);h.Z=b},9439:function(g,h,b){var l=b(8081);l=b.n(l);var m=b(3645);b=b.n(m)()(l());b.push([g.id,':export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .OverwriteConfirm{display:flex;flex-direction:column;align-items:center;gap:.75rem;isolation:isolate}.excalidraw .OverwriteConfirm h3{margin:0;font-weight:700;font-size:1.3125rem;line-height:130%;align-self:flex-start;color:var(--text-primary-color)}.excalidraw .OverwriteConfirm__Description{box-sizing:border-box;display:flex;flex-direction:row;align-items:center;width:100%;gap:1rem;padding:2.5rem;background:var(--color-danger-background);border-radius:.5rem;font-family:"Assistant";font-style:normal;font-weight:400;font-size:1rem;line-height:150%;color:var(--color-danger-color)}.excalidraw--mobile.excalidraw .OverwriteConfirm__Description{flex-direction:column;text-align:center}.excalidraw .OverwriteConfirm__Description__spacer{flex-grow:1}.excalidraw .OverwriteConfirm__Description__icon{box-sizing:border-box;display:flex;align-items:center;justify-content:center;border-radius:2.5rem;background:var(--color-danger-icon-background);width:3.5rem;height:3.5rem;padding:.75rem}.excalidraw .OverwriteConfirm__Description__icon svg{color:var(--color-danger-icon-color);width:1.5rem;height:1.5rem}.excalidraw .OverwriteConfirm__Description.OverwriteConfirm__Description--color-warning{background:var(--color-warning-background);color:var(--color-warning-color)}.excalidraw .OverwriteConfirm__Description.OverwriteConfirm__Description--color-warning .OverwriteConfirm__Description__icon{background:var(--color-warning-icon-background);flex:0 0 auto}.excalidraw .OverwriteConfirm__Description.OverwriteConfirm__Description--color-warning .OverwriteConfirm__Description__icon svg{color:var(--color-warning-icon-color)}.excalidraw .OverwriteConfirm__Actions{display:flex;flex-direction:row;align-items:stretch;justify-items:stretch;justify-content:center;gap:1.5rem}.excalidraw--mobile.excalidraw .OverwriteConfirm__Actions{flex-direction:column}.excalidraw .OverwriteConfirm__Actions__Action{display:flex;flex-direction:column;align-items:center;padding:1.5rem;gap:.75rem;flex-basis:50%;flex-grow:0}.excalidraw .OverwriteConfirm__Actions__Action__content{height:100%;font-size:.875rem;text-align:center}.excalidraw .OverwriteConfirm__Actions__Action h4{font-weight:700;font-size:1.125rem;line-height:130%;margin:0;color:var(--text-primary-color)}',
""]);h.Z=b},8461:function(g,h,b){var l=b(8081);l=b.n(l);var m=b(3645);b=b.n(m)()(l());b.push([g.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw--mobile.excalidraw .PasteChartDialog .Island{display:flex;flex-direction:column}.excalidraw .PasteChartDialog .container{display:flex;align-items:center;justify-content:space-around;flex-wrap:wrap}.excalidraw--mobile.excalidraw .PasteChartDialog .container{flex-direction:column;justify-content:center}.excalidraw .PasteChartDialog .ChartPreview{margin:8px;text-align:center;width:192px;height:128px;border-radius:2px;padding:1px;border:1px solid #ced4da;display:flex;align-items:center;justify-content:center;background:rgba(0,0,0,0)}.excalidraw .PasteChartDialog .ChartPreview div{display:inline-block}.excalidraw .PasteChartDialog .ChartPreview svg{max-height:120px;max-width:186px}.excalidraw .PasteChartDialog .ChartPreview:hover{padding:0;border:2px solid #339af0}",
""]);h.Z=b},9935:function(g,h,b){var l=b(8081);l=b.n(l);var m=b(3645);b=b.n(m)()(l());b.push([g.id,".excalidraw .popover{position:absolute;z-index:10;padding:5px 0 5px;outline:none}",""]);h.Z=b},532:function(g,h,b){var l=b(8081);l=b.n(l);var m=b(3645);b=b.n(m)()(l());b.push([g.id,".ProjectName{margin:auto;display:flex;align-items:center}.ProjectName .TextInput{height:calc(1rem - 3px);width:200px;overflow:hidden;text-align:center;margin-left:8px;text-overflow:ellipsis}.ProjectName .TextInput--readonly{background:none;border:none;width:auto;max-width:200px;padding-left:2px}.ProjectName .TextInput--readonly:hover{background:none}",
""]);h.Z=b},7589:function(g,h,b){var l=b(8081);l=b.n(l);var m=b(3645);b=b.n(m)()(l());b.push([g.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .publish-library__fields{display:flex;flex-direction:column}.excalidraw .publish-library__fields label{padding:1em 0;display:flex;justify-content:space-between;align-items:center}.excalidraw .publish-library__fields label span{font-weight:500;font-size:1rem;color:#868e96}.excalidraw .publish-library__fields label input,.excalidraw .publish-library__fields label textarea{width:70%;padding:.6em;font-family:var(--ui-font)}.excalidraw .publish-library__fields label .required{color:#e03131;margin:.2rem}.excalidraw .publish-library__buttons{display:flex;padding:.2rem 0;justify-content:flex-end;gap:.5rem}.excalidraw .publish-library__buttons .ToolIcon__icon{min-width:2.5rem;width:auto;font-size:1rem}.excalidraw .publish-library__buttons .ToolIcon_type_button{margin-left:1rem;padding:0 .5rem}.excalidraw .publish-library__buttons--confirm.ToolIcon_type_button{background-color:#228be6}.excalidraw .publish-library__buttons--confirm.ToolIcon_type_button:hover{background-color:#1971c2}.excalidraw .publish-library__buttons--cancel.ToolIcon_type_button{background-color:#adb5bd}.excalidraw .publish-library__buttons--cancel.ToolIcon_type_button:hover{background-color:#868e96}.excalidraw .publish-library__buttons .ToolIcon__icon{color:#fff}.excalidraw .publish-library__buttons .ToolIcon__icon .Spinner{--spinner-color: #fff}.excalidraw .publish-library__buttons .ToolIcon__icon .Spinner svg{padding:.5rem}.excalidraw .publish-library .selected-library-items{display:flex;flex-wrap:wrap}.excalidraw .publish-library .selected-library-items .single-library-item-wrapper{width:9rem}.excalidraw .publish-library-warning{color:#fa5252}.excalidraw .publish-library-note{padding:1em 0;font-style:italic;font-size:14px;display:block}.excalidraw .single-library-item{position:relative}.excalidraw .single-library-item-status{position:absolute;top:.3rem;left:.3rem;font-size:.7rem;color:#f03e3e;background:rgba(255,255,255,.9);padding:.1rem .2rem;border-radius:.2rem}.excalidraw .single-library-item__svg{background-color:#fff;padding:.3rem;width:7.5rem;height:7.5rem;border:1px solid var(--button-gray-2)}.excalidraw .single-library-item__svg svg{width:100%;height:100%}.excalidraw .single-library-item .ToolIcon__icon{background-color:#fff;width:auto;height:auto;margin:0 .5rem}.excalidraw .single-library-item .ToolIcon,.excalidraw .single-library-item .ToolIcon_type_button:hover{background-color:#fff}.excalidraw .single-library-item .required,.excalidraw .single-library-item .error{color:#e03131;font-weight:bold;font-size:1rem;margin:.2rem}.excalidraw .single-library-item .error{font-weight:500;margin:0;padding:.3em 0}.excalidraw .single-library-item--remove{position:absolute;top:.2rem;right:1rem}.excalidraw .single-library-item--remove .ToolIcon__icon{margin:0}.excalidraw .single-library-item--remove .ToolIcon__icon{background-color:#fa5252}.excalidraw .single-library-item--remove .ToolIcon__icon:hover{background-color:#f03e3e}.excalidraw .single-library-item--remove .ToolIcon__icon:active{background-color:#e03131}.excalidraw .single-library-item--remove svg{color:#fff;padding:.26rem;border-radius:.3em;width:1rem;height:1rem}",
""]);h.Z=b},6217:function(g,h,b){var l=b(8081);l=b.n(l);var m=b(3645);b=b.n(m)()(l());b.push([g.id,':export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw{--RadioGroup-background: #ffffff;--RadioGroup-border: var(--color-gray-30);--RadioGroup-choice-color-off: var(--color-primary);--RadioGroup-choice-color-off-hover: var(--color-primary-darkest);--RadioGroup-choice-background-off: white;--RadioGroup-choice-background-off-active: var(--color-gray-20);--RadioGroup-choice-color-on: white;--RadioGroup-choice-background-on: var(--color-primary);--RadioGroup-choice-background-on-hover: var(--color-primary-darker);--RadioGroup-choice-background-on-active: var(--color-primary-darkest)}.excalidraw.theme--dark{--RadioGroup-background: var(--color-gray-85);--RadioGroup-border: var(--color-gray-70);--RadioGroup-choice-background-off: var(--color-gray-85);--RadioGroup-choice-background-off-active: var(--color-gray-70);--RadioGroup-choice-color-on: var(--color-gray-85)}.excalidraw .RadioGroup{box-sizing:border-box;display:flex;flex-direction:row;align-items:flex-start;padding:3px;border-radius:10px;background:var(--RadioGroup-background);border:1px solid var(--RadioGroup-border)}.excalidraw .RadioGroup__choice{position:relative;display:flex;align-items:center;justify-content:center;width:32px;height:24px;color:var(--RadioGroup-choice-color-off);background:var(--RadioGroup-choice-background-off);border-radius:8px;font-family:"Assistant";font-style:normal;font-weight:600;font-size:.75rem;line-height:100%;-webkit-user-select:none;user-select:none;letter-spacing:.4px;transition:all 75ms ease-out}.excalidraw .RadioGroup__choice:hover{color:var(--RadioGroup-choice-color-off-hover)}.excalidraw .RadioGroup__choice:active{background:var(--RadioGroup-choice-background-off-active)}.excalidraw .RadioGroup__choice.active{color:var(--RadioGroup-choice-color-on);background:var(--RadioGroup-choice-background-on)}.excalidraw .RadioGroup__choice.active:hover{background:var(--RadioGroup-choice-background-on-hover)}.excalidraw .RadioGroup__choice.active:active{background:var(--RadioGroup-choice-background-on-active)}.excalidraw .RadioGroup__choice input{z-index:1;position:absolute;width:100%;height:100%;margin:0;padding:0;border-radius:8px;-webkit-appearance:none;appearance:none;cursor:pointer}',
""]);h.Z=b},8208:function(g,h,b){var l=b(8081);l=b.n(l);var m=b(3645);b=b.n(m)()(l());b.push([g.id,':export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .sidebar{display:flex;flex-direction:column;position:absolute;top:0;bottom:0;right:0;z-index:5;margin:0;padding:0;box-sizing:border-box;background-color:var(--sidebar-bg-color);box-shadow:var(--sidebar-shadow);pointer-events:var(--ui-pointerEvents);overflow:hidden;border-radius:0;width:calc(302px - var(--space-factor) * 2);border-left:1px solid var(--sidebar-border-color)}:root[dir\x3drtl] .excalidraw .sidebar{left:0;right:auto}.excalidraw .sidebar--docked{box-shadow:none}:root[dir\x3drtl] .excalidraw .sidebar{border-right:1px solid var(--sidebar-border-color);border-left:0}.excalidraw .sidebar__header{box-sizing:border-box;display:flex;justify-content:space-between;align-items:center;width:100%;padding:1rem .75rem;position:relative}.excalidraw .sidebar__header::after{content:"";width:calc(100% - 1.5rem);height:1px;background:var(--sidebar-border-color);position:absolute;bottom:-1px}.excalidraw .sidebar__header__buttons{gap:0;display:flex;align-items:center;margin-left:auto}.excalidraw .sidebar__header__buttons button{display:flex;justify-content:center;align-items:center;padding:.625rem;width:var(--button-width, var(--default-button-size));height:var(--button-height, var(--default-button-size));box-sizing:border-box;border-width:1px;border-style:solid;border-color:var(--button-border, var(--default-border-color));border-radius:var(--border-radius-lg);cursor:pointer;background-color:var(--button-bg, var(--island-bg-color));color:var(--button-color, var(--text-primary-color));--button-bg: transparent;border:0 !important;width:var(--lg-button-size);height:var(--lg-button-size);padding:0}.excalidraw .sidebar__header__buttons button svg{width:var(--button-width, var(--lg-icon-size));height:var(--button-height, var(--lg-icon-size))}.excalidraw .sidebar__header__buttons button:hover{background-color:var(--button-hover-bg, var(--island-bg-color));border-color:var(--button-hover-border, var(--button-border, var(--default-border-color)));color:var(--button-hover-color, var(--button-color, var(--text-primary-color, inherit)))}.excalidraw .sidebar__header__buttons button:active{background-color:var(--button-active-bg, var(--island-bg-color));border-color:var(--button-active-border, var(--color-primary-darkest))}.excalidraw .sidebar__header__buttons button.active{background-color:var(--button-selected-bg, var(--color-primary-light));border-color:var(--button-selected-border, var(--color-primary-light))}.excalidraw .sidebar__header__buttons button.active:hover{background-color:var(--button-selected-hover-bg, var(--color-primary-light))}.excalidraw .sidebar__header__buttons button.active svg{color:var(--button-color, var(--color-primary-darker))}.excalidraw .sidebar__header__buttons button svg{width:var(--lg-icon-size);height:var(--lg-icon-size)}.excalidraw .sidebar__header__buttons button:hover{background:var(--button-hover-bg, var(--island-bg-color))}.excalidraw .sidebar__header__buttons .sidebar__dock.selected svg{stroke:var(--color-primary);fill:var(--color-primary)}.excalidraw .sidebar-tabs-root{display:flex;flex-direction:column;flex:1 1 auto;padding:1rem 0}.excalidraw .sidebar-tabs-root [role\x3dtabpanel]{flex:1;outline:none;flex:1 1 auto;display:flex;flex-direction:column;outline:none}.excalidraw .sidebar-tabs-root [role\x3dtabpanel][data-state\x3dinactive]{display:none !important}.excalidraw .sidebar-tabs-root [role\x3dtablist]{display:grid;gap:1rem;grid-template-columns:repeat(auto-fit, minmax(0, 1fr))}.excalidraw .sidebar-tabs-root\x3e.sidebar__header{padding-top:0;padding-bottom:1rem}.excalidraw .sidebar-tab-trigger{--button-width: auto;--button-bg: transparent;--button-hover-bg: transparent;--button-active-bg: var(--color-primary);--button-hover-color: var(--color-primary);--button-hover-border: var(--color-primary)}.excalidraw .sidebar-tab-trigger[data-state\x3dactive]{--button-bg: var(--color-primary);--button-hover-bg: var(--color-primary-darker);--button-hover-color: var(--color-icon-white);--button-border: var(--color-primary);color:var(--color-icon-white)}.excalidraw .default-sidebar{display:flex;flex-direction:column}.excalidraw .default-sidebar .sidebar-triggers{display:flex;gap:0;padding:2px;margin-top:-3px;margin-bottom:-3px;border:1px solid var(--sidebar-border-color);background:var(--default-bg-color);border-radius:.625rem}.excalidraw .default-sidebar .sidebar-triggers .sidebar-tab-trigger{height:var(--lg-button-size);width:var(--lg-button-size);border:none}',
""]);h.Z=b},7051:function(g,h,b){var l=b(8081);l=b.n(l);var m=b(3645);b=b.n(m)()(l());b.push([g.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .sidebar-trigger{display:flex;justify-content:center;align-items:center;padding:.625rem;width:var(--button-width, var(--default-button-size));height:var(--button-height, var(--default-button-size));box-sizing:border-box;border-width:1px;border-style:solid;border-color:var(--button-border, var(--default-border-color));border-radius:var(--border-radius-lg);cursor:pointer;background-color:var(--button-bg, var(--island-bg-color));color:var(--button-color, var(--text-primary-color));background-color:var(--island-bg-color);width:auto;height:var(--lg-button-size);display:flex;align-items:center;gap:.5rem;line-height:0;font-size:.75rem;letter-spacing:.4px}.excalidraw .sidebar-trigger svg{width:var(--button-width, var(--lg-icon-size));height:var(--button-height, var(--lg-icon-size))}.excalidraw .sidebar-trigger:hover{background-color:var(--button-hover-bg, var(--island-bg-color));border-color:var(--button-hover-border, var(--button-border, var(--default-border-color)));color:var(--button-hover-color, var(--button-color, var(--text-primary-color, inherit)))}.excalidraw .sidebar-trigger:active{background-color:var(--button-active-bg, var(--island-bg-color));border-color:var(--button-active-border, var(--color-primary-darkest))}.excalidraw .sidebar-trigger.active{background-color:var(--button-selected-bg, var(--color-primary-light));border-color:var(--button-selected-border, var(--color-primary-light))}.excalidraw .sidebar-trigger.active:hover{background-color:var(--button-selected-hover-bg, var(--color-primary-light))}.excalidraw .sidebar-trigger.active svg{color:var(--button-color, var(--color-primary-darker))}.excalidraw .sidebar-trigger svg{width:var(--lg-icon-size);height:var(--lg-icon-size)}.excalidraw .default-sidebar-trigger .sidebar-trigger__label{display:block}.excalidraw.excalidraw--mobile .default-sidebar-trigger .sidebar-trigger__label{display:none}",
""]);h.Z=b},5892:function(g,h,b){var l=b(8081);l=b.n(l);var m=b(3645);b=b.n(m)()(l());b.push([g.id,".excalidraw .Spinner{display:flex;align-items:center;justify-content:center;height:100%;margin-left:auto;margin-right:auto;--spinner-color: var(--icon-fill-color)}.excalidraw .Spinner svg{-webkit-animation:rotate 1.6s linear infinite;animation:rotate 1.6s linear infinite;-webkit-animation-delay:var(--spinner-delay);animation-delay:var(--spinner-delay);-webkit-transform-origin:center center;transform-origin:center center}.excalidraw .Spinner circle{stroke:var(--spinner-color);-webkit-animation:dash 1.6s linear 0s infinite;animation:dash 1.6s linear 0s infinite;stroke-linecap:round}@-webkit-keyframes rotate{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes rotate{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@-webkit-keyframes dash{0%{stroke-dasharray:1,300;stroke-dashoffset:0}50%{stroke-dasharray:150,300;stroke-dashoffset:-200}100%{stroke-dasharray:1,300;stroke-dashoffset:-280}}@keyframes dash{0%{stroke-dasharray:1,300;stroke-dashoffset:0}50%{stroke-dasharray:150,300;stroke-dashoffset:-200}100%{stroke-dasharray:1,300;stroke-dashoffset:-280}}",
""]);h.Z=b},3874:function(g,h,b){var l=b(8081);l=b.n(l);var m=b(3645);b=b.n(m)()(l());b.push([g.id,".excalidraw .Stack{--gap: 0;display:grid;gap:calc(var(--space-factor)*var(--gap))}.excalidraw .Stack_vertical{grid-template-columns:auto;grid-auto-flow:row;grid-auto-rows:-webkit-min-content;grid-auto-rows:min-content}.excalidraw .Stack_horizontal{grid-template-rows:auto;grid-auto-flow:column;grid-auto-columns:-webkit-min-content;grid-auto-columns:min-content}",""]);h.Z=b},2681:function(g,h,b){var l=
b(8081);l=b.n(l);var m=b(3645);b=b.n(m)()(l());b.push([g.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .Stats{position:absolute;top:64px;right:12px;font-size:12px;z-index:10;pointer-events:var(--ui-pointerEvents)}.excalidraw .Stats h3{margin:0 24px 8px 0;white-space:nowrap}.excalidraw .Stats .close{float:right;height:16px;width:16px;cursor:pointer}.excalidraw .Stats .close svg{width:100%;height:100%}.excalidraw .Stats table{width:100%}.excalidraw .Stats table th{border-bottom:1px solid var(--input-border-color);padding:4px}.excalidraw .Stats table tr td:nth-child(2){min-width:24px;text-align:right}:root[dir\x3drtl] .excalidraw .Stats{left:12px;right:initial}:root[dir\x3drtl] .excalidraw .Stats h3{margin:0 0 8px 24px}:root[dir\x3drtl] .excalidraw .Stats .close{float:left}",
""]);h.Z=b},7802:function(g,h,b){var l=b(8081);l=b.n(l);var m=b(3645);b=b.n(m)()(l());b.push([g.id,':export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw{--Switch-disabled-color: #d6d6d6;--Switch-track-background: white;--Switch-thumb-background: #3d3d3d}.excalidraw.theme--dark{--Switch-disabled-color: #5c5c5c;--Switch-track-background: #242424;--Switch-thumb-background: #b8b8b8}.excalidraw .Switch{position:relative;box-sizing:border-box;width:40px;height:20px;border-radius:12px;transition-property:background,border;transition-duration:150ms;transition-timing-function:ease-out;background:var(--Switch-track-background);border:1px solid var(--Switch-disabled-color)}.excalidraw .Switch:hover{background:var(--Switch-track-background);border:1px solid #999}.excalidraw .Switch.toggled{background:var(--color-primary);border:1px solid var(--color-primary)}.excalidraw .Switch.toggled:hover{background:var(--color-primary-darker);border:1px solid var(--color-primary-darker)}.excalidraw .Switch.disabled{background:var(--Switch-track-background);border:1px solid var(--Switch-disabled-color)}.excalidraw .Switch.disabled.toggled{background:var(--Switch-disabled-color);border:1px solid var(--Switch-disabled-color)}.excalidraw .Switch:before{content:"";box-sizing:border-box;display:block;pointer-events:none;position:absolute;border-radius:100%;transition:all 150ms ease-out;width:10px;height:10px;top:4px;left:4px;background:var(--Switch-thumb-background)}.excalidraw .Switch:active:before{width:12px}.excalidraw .Switch.toggled:before{width:14px;height:14px;left:22px;top:2px;background:var(--Switch-track-background)}.excalidraw .Switch.toggled:active:before{width:16px;left:20px}.excalidraw .Switch.disabled:before{background:var(--Switch-disabled-color)}.excalidraw .Switch.disabled.toggled:before{background:var(--color-gray-50)}.excalidraw .Switch input{width:100%;height:100%;margin:0;border-radius:12px;-webkit-appearance:none;appearance:none;cursor:pointer}.excalidraw .Switch input:disabled{cursor:unset}',
""]);h.Z=b},6759:function(g,h,b){var l=b(8081);l=b.n(l);var m=b(3645);b=b.n(m)()(l());b.push([g.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .TextInput{display:inline-block}",""]);h.Z=b},9650:function(g,h,b){var l=b(8081);l=b.n(l);var m=b(3645);b=b.n(m)()(l());b.push([g.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .Toast{-webkit-animation:fade-in .5s;animation:fade-in .5s;background-color:var(--button-gray-1);border-radius:4px;bottom:10px;box-sizing:border-box;cursor:default;left:50%;margin-left:-150px;padding:4px 0;position:absolute;text-align:center;width:300px;z-index:999999}.excalidraw .Toast .Toast__message{padding:0 1.6rem;color:var(--popup-text-color);white-space:pre-wrap}.excalidraw .Toast .close{position:absolute;top:0;right:0;padding:.4rem}.excalidraw .Toast .close .ToolIcon__icon{width:1.2rem;height:1.2rem}@-webkit-keyframes fade-in{from{opacity:0}to{opacity:1}}@keyframes fade-in{from{opacity:0}to{opacity:1}}",
""]);h.Z=b},2044:function(g,h,b){var l=b(8081);l=b.n(l);var m=b(3645);b=b.n(m)()(l());b.push([g.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .ToolIcon{border-radius:var(--border-radius-lg);display:inline-flex;align-items:center;position:relative;cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-user-select:none;user-select:none}.excalidraw .ToolIcon__hidden{display:none !important}.excalidraw .ToolIcon.fillable .ToolIcon_type_radio:checked+.ToolIcon__icon,.excalidraw .ToolIcon.fillable .ToolIcon_type_checkbox:checked+.ToolIcon__icon{--icon-fill-color: var(--color-primary-darker)}.excalidraw .ToolIcon.fillable .ToolIcon_type_radio:checked+.ToolIcon__icon svg,.excalidraw .ToolIcon.fillable .ToolIcon_type_checkbox:checked+.ToolIcon__icon svg{fill:var(--icon-fill-color)}.excalidraw .ToolIcon .ToolIcon_type_radio:checked+.ToolIcon__icon,.excalidraw .ToolIcon .ToolIcon_type_checkbox:checked+.ToolIcon__icon{background:var(--color-primary-light);--keybinding-color: var(--color-gray-60)}.excalidraw .ToolIcon .ToolIcon_type_radio:checked+.ToolIcon__icon svg,.excalidraw .ToolIcon .ToolIcon_type_checkbox:checked+.ToolIcon__icon svg{color:var(--color-primary-darker)}.excalidraw .ToolIcon .ToolIcon__keybinding{bottom:4px;right:4px}.excalidraw .ToolIcon .ToolIcon__icon:hover{background:var(--button-hover-bg)}.excalidraw .ToolIcon .ToolIcon__icon:active{background:var(--button-hover-bg);border:1px solid var(--color-primary-darkest)}.excalidraw .ToolIcon--plain{background-color:rgba(0,0,0,0)}.excalidraw .ToolIcon--plain .ToolIcon__icon{width:2rem;height:2rem}.excalidraw .ToolIcon_type_radio,.excalidraw .ToolIcon_type_checkbox{position:absolute;opacity:0;pointer-events:none}.excalidraw .ToolIcon__icon{box-sizing:border-box;width:var(--default-button-size);height:var(--default-button-size);color:var(--icon-fill-color);display:flex;justify-content:center;align-items:center;border-radius:var(--border-radius-lg)}.excalidraw .ToolIcon__icon+.ToolIcon__label{-webkit-margin-start:0;margin-inline-start:0}.excalidraw .ToolIcon__icon svg{position:relative;width:var(--default-icon-size);height:var(--default-icon-size);color:var(--icon-fill-color)}.excalidraw .ToolIcon__label{display:flex;align-items:center;color:var(--icon-fill-color);font-family:var(--ui-font);margin:0 .8em;text-overflow:ellipsis}.excalidraw .ToolIcon__label .Spinner{margin-left:.6em}.excalidraw .ToolIcon_size_small .ToolIcon__icon{width:2rem;height:2rem;font-size:.8em}.excalidraw .ToolIcon_type_button,.excalidraw .Modal .ToolIcon_type_button,.excalidraw .ToolIcon_type_button{padding:0;border:none;margin:0;font-size:inherit;background-color:initial}.excalidraw .ToolIcon_type_button:focus-visible,.excalidraw .Modal .ToolIcon_type_button:focus-visible,.excalidraw .ToolIcon_type_button:focus-visible{box-shadow:0 0 0 2px var(--focus-highlight-color)}.excalidraw .ToolIcon_type_button.ToolIcon--selected,.excalidraw .Modal .ToolIcon_type_button.ToolIcon--selected,.excalidraw .ToolIcon_type_button.ToolIcon--selected{background-color:var(--button-gray-2)}.excalidraw .ToolIcon_type_button.ToolIcon--selected:active,.excalidraw .Modal .ToolIcon_type_button.ToolIcon--selected:active,.excalidraw .ToolIcon_type_button.ToolIcon--selected:active{background-color:var(--button-gray-3)}.excalidraw .ToolIcon_type_button:active,.excalidraw .Modal .ToolIcon_type_button:active,.excalidraw .ToolIcon_type_button:active{background-color:var(--button-gray-3)}.excalidraw .ToolIcon_type_button--show,.excalidraw .Modal .ToolIcon_type_button--show,.excalidraw .ToolIcon_type_button--show{visibility:visible}.excalidraw .ToolIcon_type_button--hide,.excalidraw .Modal .ToolIcon_type_button--hide,.excalidraw .ToolIcon_type_button--hide{display:none !important}.excalidraw .ToolIcon_type_floating{background-color:rgba(0,0,0,0)}.excalidraw .ToolIcon_type_floating:hover{background-color:rgba(0,0,0,0)}.excalidraw .ToolIcon_type_floating:active{background-color:rgba(0,0,0,0)}.excalidraw .ToolIcon_type_floating .ToolIcon__icon{background-color:var(--button-gray-1);width:2rem;height:2rem}.excalidraw .ToolIcon_type_floating .ToolIcon__icon:hover{background-color:var(--button-gray-2)}.excalidraw .ToolIcon_type_floating .ToolIcon__icon:active{background-color:var(--button-gray-3)}.excalidraw .ToolIcon__keybinding{position:absolute;bottom:2px;right:3px;font-size:.625rem;color:var(--keybinding-color);font-family:var(--ui-font);-webkit-user-select:none;user-select:none}:root[dir\x3dltr] .excalidraw .unlocked-icon{left:2px}:root[dir\x3drtl] .excalidraw .unlocked-icon{right:2px}.excalidraw .App-toolbar-container .ToolIcon__icon{width:var(--lg-button-size);height:var(--lg-button-size)}.excalidraw .App-toolbar-container .ToolIcon__icon svg{width:var(--lg-icon-size);height:var(--lg-icon-size)}",
""]);h.Z=b},9144:function(g,h,b){var l=b(8081);l=b.n(l);var m=b(3645);b=b.n(m)()(l());b.push([g.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .App-toolbar.zen-mode .ToolIcon__keybinding,.excalidraw .App-toolbar.zen-mode .HintViewer{display:none}.excalidraw .App-toolbar__divider{width:1px;height:1.5rem;align-self:center;background-color:var(--default-border-color);margin:0 .25rem}.excalidraw .App-toolbar__extra-tools-trigger{box-shadow:none;border:0}.excalidraw .App-toolbar__extra-tools-trigger:active{background-color:var(--button-hover-bg);box-shadow:0 0 0 1px var(--button-active-border, var(--color-primary-darkest)) inset}.excalidraw .App-toolbar__extra-tools-dropdown{margin-top:.375rem;right:0;min-width:11.875rem}",
""]);h.Z=b},6626:function(g,h,b){var l=b(8081);l=b.n(l);var m=b(3645);b=b.n(m)()(l());b.push([g.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw-tooltip{--ui-font: Assistant, system-ui, BlinkMacSystemFont, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;font-family:var(--ui-font);position:fixed;z-index:var(--zIndex-popup);padding:8px;border-radius:6px;box-sizing:border-box;pointer-events:none;word-wrap:break-word;background:#000;line-height:1.5;text-align:center;font-size:13px;font-weight:500;color:#fff;display:none}.excalidraw-tooltip.excalidraw-tooltip--visible{display:block}.excalidraw-tooltip-wrapper{display:flex}.excalidraw-tooltip-icon{width:.9em;height:.9em;margin-left:5px;margin-top:1px;display:flex}.excalidraw--mobile.excalidraw-tooltip-icon{display:none}",
""]);h.Z=b},6359:function(g,h,b){var l=b(8081);l=b.n(l);var m=b(3645);b=b.n(m)()(l());b.push([g.id,".excalidraw .UserList{pointer-events:none;padding:var(--space-factor) var(--space-factor) var(--space-factor) var(--space-factor);display:flex;flex-wrap:wrap;justify-content:flex-end;align-items:center;gap:.625rem;max-height:140px;max-width:290px;overflow:hidden}.excalidraw .UserList:empty{display:none}.excalidraw .UserList\x3e*{pointer-events:var(--ui-pointerEvents)}.excalidraw .UserList_mobile{padding:0;justify-content:normal;margin:.5rem 0}",
""]);h.Z=b},7399:function(g,h,b){var l=b(8081);l=b.n(l);var m=b(3645);b=b.n(m)()(l());b.push([g.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .dropdown-menu{position:absolute;top:100%;margin-top:.25rem}.excalidraw .dropdown-menu--mobile{bottom:55px;top:auto;left:0;width:100%;row-gap:.75rem}.excalidraw .dropdown-menu--mobile .dropdown-menu-container{padding:8px 8px;box-sizing:border-box;background-color:var(--island-bg-color);box-shadow:var(--shadow-island);border-radius:var(--border-radius-lg);position:relative;transition:box-shadow .5s ease-in-out}.excalidraw .dropdown-menu--mobile .dropdown-menu-container.zen-mode{box-shadow:none}.excalidraw .dropdown-menu .dropdown-menu-container{background-color:#fff !important;max-height:calc(100vh - 150px);overflow-y:auto;--gap: 2}.excalidraw .dropdown-menu .dropdown-menu-item-base{display:flex;padding:0 .625rem;-webkit-column-gap:.625rem;column-gap:.625rem;font-size:.875rem;color:var(--color-gray-100);width:100%;box-sizing:border-box;font-weight:normal;font-family:inherit}.excalidraw .dropdown-menu .dropdown-menu-item{background-color:rgba(0,0,0,0);border:0;align-items:center;height:2rem;cursor:pointer;border-radius:var(--border-radius-md)}@media screen and (min-width: 1921px){.excalidraw .dropdown-menu .dropdown-menu-item{height:2.25rem}}.excalidraw .dropdown-menu .dropdown-menu-item__text{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.excalidraw .dropdown-menu .dropdown-menu-item__shortcut{-webkit-margin-start:auto;margin-inline-start:auto;opacity:.5}.excalidraw .dropdown-menu .dropdown-menu-item:hover{background-color:var(--button-hover-bg);text-decoration:none}.excalidraw .dropdown-menu .dropdown-menu-item svg{width:1rem;height:1rem;display:block}.excalidraw .dropdown-menu .dropdown-menu-item-custom{margin-top:.5rem}.excalidraw .dropdown-menu .dropdown-menu-group-title{font-size:14px;text-align:left;margin:10px 0;font-weight:500}.excalidraw.theme--dark .dropdown-menu-item{color:var(--color-gray-40)}.excalidraw.theme--dark .dropdown-menu-container{background-color:var(--color-gray-90) !important}.excalidraw .dropdown-menu-button{display:flex;justify-content:center;align-items:center;padding:.625rem;width:var(--button-width, var(--default-button-size));height:var(--button-height, var(--default-button-size));box-sizing:border-box;border-width:1px;border-style:solid;border-color:var(--button-border, var(--default-border-color));border-radius:var(--border-radius-lg);cursor:pointer;background-color:var(--button-bg, var(--island-bg-color));color:var(--button-color, var(--text-primary-color));background-color:var(--island-bg-color);width:var(--lg-button-size);height:var(--lg-button-size)}.excalidraw .dropdown-menu-button svg{width:var(--button-width, var(--lg-icon-size));height:var(--button-height, var(--lg-icon-size))}.excalidraw .dropdown-menu-button:hover{background-color:var(--button-hover-bg, var(--island-bg-color));border-color:var(--button-hover-border, var(--button-border, var(--default-border-color)));color:var(--button-hover-color, var(--button-color, var(--text-primary-color, inherit)))}.excalidraw .dropdown-menu-button:active{background-color:var(--button-active-bg, var(--island-bg-color));border-color:var(--button-active-border, var(--color-primary-darkest))}.excalidraw .dropdown-menu-button.active{background-color:var(--button-selected-bg, var(--color-primary-light));border-color:var(--button-selected-border, var(--color-primary-light))}.excalidraw .dropdown-menu-button.active:hover{background-color:var(--button-selected-hover-bg, var(--color-primary-light))}.excalidraw .dropdown-menu-button.active svg{color:var(--button-color, var(--color-primary-darker))}.excalidraw .dropdown-menu-button svg{width:var(--lg-icon-size);height:var(--lg-icon-size)}.excalidraw .dropdown-menu-button--mobile{border:none;margin:0;padding:0;width:var(--default-button-size);height:var(--default-button-size)}",
""]);h.Z=b},8793:function(g,h,b){var l=b(8081);l=b.n(l);var m=b(3645);b=b.n(m)()(l());b.push([g.id,".footer-center{pointer-events:none;display:flex;width:100%;justify-content:flex-start;-webkit-margin-end:.6rem;margin-inline-end:.6rem}.footer-center\x3e*{pointer-events:var(--ui-pointerEvents)}",""]);h.Z=b},3397:function(g,h,b){var l=b(8081);l=b.n(l);var m=b(3645);b=b.n(m)()(l());b.push([g.id,':export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .collab-button{--button-bg: var(--color-primary);--button-color: white;--button-border: var(--color-primary);--button-width: var(--lg-button-size);--button-height: var(--lg-button-size);--button-hover-bg: var(--color-primary-darker);--button-hover-border: var(--color-primary-darker);--button-active-bg: var(--color-primary-darker);flex-shrink:0}.excalidraw .collab-button.active.active{background-color:#0fb884;border-color:#0fb884}.excalidraw .collab-button.active.active svg{color:#fff}.excalidraw .collab-button.active.active:hover,.excalidraw .collab-button.active.active:active{background-color:#0fb884;border-color:#0fb884}.excalidraw.theme--dark .collab-button{color:var(--color-gray-90)}.excalidraw .CollabButton.is-collaborating{background-color:var(--button-special-active-bg-color)}.excalidraw .CollabButton.is-collaborating .ToolIcon__icon svg,.excalidraw .CollabButton.is-collaborating .ToolIcon__label{color:var(--icon-green-fill-color)}.excalidraw .CollabButton-collaborators{min-width:1em;min-height:1em;line-height:1;position:absolute;bottom:-5px;padding:3px;border-radius:50%;background-color:#b2f2bb;color:#2b8a3e;font-size:.6rem;font-family:"Cascadia"}:root[dir\x3dltr] .excalidraw .CollabButton-collaborators{right:-5px}:root[dir\x3drtl] .excalidraw .CollabButton-collaborators{left:-5px}',
""]);h.Z=b},4343:function(g,h,b){var l=b(8081);l=b.n(l);var m=b(3645);b=b.n(m)()(l());b.push([g.id,".excalidraw .ActiveFile .ActiveFile__fileName{display:flex;align-items:center}.excalidraw .ActiveFile .ActiveFile__fileName span{text-overflow:ellipsis;overflow:hidden;white-space:nowrap;width:9.3em}.excalidraw .ActiveFile .ActiveFile__fileName svg{width:1.15em;-webkit-margin-end:.3em;margin-inline-end:.3em;-webkit-transform:scaleY(0.9);transform:scaleY(0.9)}",""]);h.Z=b},1569:function(g,h,b){var l=
b(8081);l=b.n(l);var m=b(3645);b=b.n(m)()(l());b.push([g.id,'.excalidraw .virgil{font-family:"Virgil"}.excalidraw .welcome-screen-decor{pointer-events:none;color:var(--color-gray-40)}.excalidraw .welcome-screen-decor a{--color: var(--color-primary);color:var(--color);text-decoration:none;margin-bottom:-6px}.excalidraw.theme--dark .welcome-screen-decor{color:var(--color-gray-60)}@media(max-height: 599px){.excalidraw .welcome-screen-decor-hint{display:none !important}}@media(max-width: 1024px),(max-width: 800px){.excalidraw .welcome-screen-decor-hint .welcome-screen-decor--help,.excalidraw .welcome-screen-decor-hint .welcome-screen-decor--menu{display:none}}.excalidraw .welcome-screen-decor-hint--help{display:flex;position:absolute;right:0;bottom:100%}:root[dir\x3drtl] .excalidraw .welcome-screen-decor-hint--help{left:0;right:auto}.excalidraw .welcome-screen-decor-hint--help svg{margin-top:.5rem;width:85px;height:71px;-webkit-transform:scaleX(-1) rotate(80deg);transform:scaleX(-1) rotate(80deg)}:root[dir\x3drtl] .excalidraw .welcome-screen-decor-hint--help svg{-webkit-transform:rotate(80deg);transform:rotate(80deg)}.excalidraw .welcome-screen-decor-hint--toolbar{position:absolute;top:100%;left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%);margin-top:2.5rem;display:flex;align-items:baseline}.excalidraw .welcome-screen-decor-hint--toolbar .welcome-screen-decor-hint__label{width:120px;position:relative;top:-0.5rem}.excalidraw .welcome-screen-decor-hint--toolbar svg{width:38px;height:78px}:root[dir\x3drtl] .excalidraw .welcome-screen-decor-hint--toolbar svg{-webkit-transform:scaleX(-1);transform:scaleX(-1)}.excalidraw .welcome-screen-decor-hint--menu{position:absolute;width:320px;font-size:1rem;top:100%;margin-top:.25rem;-webkit-margin-start:.6rem;margin-inline-start:.6rem;display:flex;align-items:flex-end;gap:.5rem}.excalidraw .welcome-screen-decor-hint--menu svg{width:41px;height:94px}:root[dir\x3drtl] .excalidraw .welcome-screen-decor-hint--menu svg{-webkit-transform:scaleX(-1);transform:scaleX(-1)}@media(max-width: 860px){.excalidraw .welcome-screen-decor-hint--menu .welcome-screen-decor-hint__label{max-width:160px}}.excalidraw .welcome-screen-center{display:flex;flex-direction:column;gap:2rem;justify-content:center;align-items:center;position:absolute;pointer-events:none;left:1rem;top:1rem;right:1rem;bottom:1rem}.excalidraw .welcome-screen-center__logo{display:flex;align-items:center;-webkit-column-gap:.75rem;column-gap:.75rem;font-size:2.25rem}.excalidraw .welcome-screen-center__heading{font-size:1.125rem;text-align:center}.excalidraw .welcome-screen-menu{display:flex;flex-direction:column;gap:2px;justify-content:center;align-items:center}.excalidraw .welcome-screen-menu-item{box-sizing:border-box;pointer-events:var(--ui-pointerEvents);color:var(--color-gray-50);font-size:.875rem;width:100%;min-width:300px;max-width:400px;display:grid;align-items:center;justify-content:space-between;background:none;border:none;padding:.75rem;border-radius:var(--border-radius-md);grid-template-columns:calc(var(--default-icon-size) + .5rem) 1fr 3rem}.excalidraw .welcome-screen-menu-item__text{display:flex;align-items:center;margin-right:auto;text-align:left;-webkit-column-gap:.5rem;column-gap:.5rem}.excalidraw .welcome-screen-menu-item__icon{width:var(--default-icon-size);height:var(--default-icon-size)}.excalidraw .welcome-screen-menu-item__shortcut{margin-left:auto;color:var(--color-gray-40);font-size:.75rem}.excalidraw .welcome-screen-menu-item:hover{text-decoration:none;background:var(--color-gray-10)}.excalidraw .welcome-screen-menu-item:hover .welcome-screen-menu-item__shortcut{color:var(--color-gray-50)}.excalidraw .welcome-screen-menu-item:hover .welcome-screen-menu-item__text{color:var(--color-gray-100)}.excalidraw .welcome-screen-menu-item:active{background:var(--color-gray-20)}.excalidraw .welcome-screen-menu-item:active .welcome-screen-menu-item__shortcut{color:var(--color-gray-50)}.excalidraw .welcome-screen-menu-item:active .welcome-screen-menu-item__text{color:var(--color-gray-100)}.excalidraw .welcome-screen-menu-item:active--promo{color:var(--color-promo) !important}.excalidraw .welcome-screen-menu-item:active--promo:hover .welcome-screen-menu-item__text{color:var(--color-promo) !important}.excalidraw.theme--dark .welcome-screen-menu-item{color:var(--color-gray-60)}.excalidraw.theme--dark .welcome-screen-menu-item__shortcut{color:var(--color-gray-60)}.excalidraw.theme--dark .welcome-screen-menu-item:hover{background:var(--color-gray-85)}.excalidraw.theme--dark .welcome-screen-menu-item:hover .welcome-screen-menu-item__shortcut{color:var(--color-gray-50)}.excalidraw.theme--dark .welcome-screen-menu-item:hover .welcome-screen-menu-item__text{color:var(--color-gray-10)}.excalidraw.theme--dark .welcome-screen-menu-item:active{background-color:var(--color-gray-90)}.excalidraw.theme--dark .welcome-screen-menu-item:active .welcome-screen-menu-item__text{color:var(--color-gray-10)}@media(max-height: 599px){.excalidraw .welcome-screen-center{margin-top:4rem}}@media(min-height: 600px)and (max-height: 900px){.excalidraw .welcome-screen-center{margin-top:8rem}}@media(max-height: 500px),(max-width: 320px){.excalidraw .welcome-screen-center{display:none}}',
""]);h.Z=b},9915:function(g,h,b){var l=b(8081);l=b.n(l);var m=b(3645);b=b.n(m)()(l());b.push([g.id,".visually-hidden{position:absolute !important;height:1px;width:1px;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);white-space:nowrap;-webkit-user-select:none;user-select:none}.LoadingMessage{position:absolute;top:0;right:0;bottom:0;left:0;z-index:999;display:flex;flex-direction:column;align-items:center;justify-content:center;pointer-events:none}.LoadingMessage .Spinner{font-size:2.8em}.LoadingMessage .LoadingMessage-text{margin-top:1em;font-size:.8em}.LoadingMessage--dark{background-color:#121212;color:#ced4da}",
""]);h.Z=b},9310:function(g,h,b){var l=b(8081);l=b.n(l);var m=b(3645),p=b.n(m);m=b(1667);m=b.n(m);var D=new URL(b(7984),b.b);b=new URL(b(1639),b.b);l=p()(l());p=m()(D);b=m()(b);l.push([g.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}:export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw{--theme-filter: none;--button-destructive-bg-color: #ffe3e3;--button-destructive-color: #c92a2a;--button-gray-1: #e9ecef;--button-gray-2: #ced4da;--button-gray-3: #adb5bd;--button-special-active-bg-color: #ebfbee;--dialog-border-color: var(--color-gray-20);--dropdown-icon: url("+
p+");--focus-highlight-color: #a5d8ff;--icon-fill-color: var(--color-gray-80);--icon-green-fill-color: #2b8a3e;--default-bg-color: #ffffff;--input-bg-color: #ffffff;--input-border-color: #ced4da;--input-hover-bg-color: #f1f3f5;--input-label-color: #495057;--island-bg-color: rgba(255, 255, 255, 0.96);--keybinding-color: var(--color-gray-40);--link-color: #1c7ed6;--overlay-bg-color: rgba(255, 255, 255, 0.88);--popup-bg-color: #ffffff;--popup-secondary-bg-color: #f1f3f5;--popup-text-color: #000000;--popup-text-inverted-color: #ffffff;--select-highlight-color: #339af0;--shadow-island: 0px 7px 14px rgba(0, 0, 0, 0.05), 0px 0px 3.12708px rgba(0, 0, 0, 0.0798), 0px 0px 0.931014px rgba(0, 0, 0, 0.1702);--button-hover-bg: var(--color-gray-10);--default-border-color: var(--color-gray-30);--default-button-size: 2rem;--default-icon-size: 1rem;--lg-button-size: 2.25rem;--lg-icon-size: 1rem;--editor-container-padding: 1rem;--scrollbar-thumb: var(--button-gray-2);--scrollbar-thumb-hover: var(--button-gray-3);--modal-shadow: 0px 100px 80px rgba(0, 0, 0, 0.07), 0px 41.7776px 33.4221px rgba(0, 0, 0, 0.0503198), 0px 22.3363px 17.869px rgba(0, 0, 0, 0.0417275), 0px 12.5216px 10.0172px rgba(0, 0, 0, 0.035), 0px 6.6501px 5.32008px rgba(0, 0, 0, 0.0282725), 0px 2.76726px 2.21381px rgba(0, 0, 0, 0.0196802);--avatar-border-color: var(--color-gray-20);--sidebar-shadow: 0px 100px 80px rgba(0, 0, 0, 0.07), 0px 41.7776px 33.4221px rgba(0, 0, 0, 0.0503198), 0px 22.3363px 17.869px rgba(0, 0, 0, 0.0417275), 0px 12.5216px 10.0172px rgba(0, 0, 0, 0.035), 0px 6.6501px 5.32008px rgba(0, 0, 0, 0.0282725), 0px 2.76726px 2.21381px rgba(0, 0, 0, 0.0196802);--sidebar-border-color: var(--color-gray-20);--sidebar-bg-color: #fff;--library-dropdown-shadow: 0px 15px 6px rgba(0, 0, 0, 0.01), 0px 8px 5px rgba(0, 0, 0, 0.05), 0px 4px 4px rgba(0, 0, 0, 0.09), 0px 1px 2px rgba(0, 0, 0, 0.1), 0px 0px 0px rgba(0, 0, 0, 0.1);--space-factor: 0.25rem;--text-primary-color: var(--color-gray-80);--color-selection: #6965db;--color-icon-white: #ffffff;--color-primary: #6965db;--color-primary-darker: #5b57d1;--color-primary-darkest: #4a47b1;--color-primary-light: #e3e2fe;--color-primary-light-darker: #d7d5ff;--color-gray-10: #f5f5f5;--color-gray-20: #ebebeb;--color-gray-30: #d6d6d6;--color-gray-40: #b8b8b8;--color-gray-50: #999999;--color-gray-60: #7a7a7a;--color-gray-70: #5c5c5c;--color-gray-80: #3d3d3d;--color-gray-85: #242424;--color-gray-90: #1e1e1e;--color-gray-100: #121212;--color-warning: #fceeca;--color-warning-dark: #f5c354;--color-warning-darker: #f3ab2c;--color-warning-darkest: #ec8b14;--color-text-warning: var(--text-primary-color);--color-danger: #db6965;--color-danger-dark: #db6965;--color-danger-darker: #d65550;--color-danger-darkest: #d1413c;--color-danger-text: black;--color-danger-background: #fff0f0;--color-danger-icon-background: #ffdad6;--color-danger-color: #700000;--color-danger-icon-color: #700000;--color-warning-background: var(--color-warning);--color-warning-icon-background: var(--color-warning-dark);--color-warning-color: var(--text-primary-color);--color-warning-icon-color: var(--text-primary-color);--color-muted: var(--color-gray-30);--color-muted-darker: var(--color-gray-60);--color-muted-darkest: var(--color-gray-100);--color-muted-background: var(--color-gray-80);--color-muted-background-darker: var(--color-gray-100);--color-promo: #e70078;--color-success: #268029;--color-success-lighter: #cafccc;--color-logo-icon: var(--color-primary);--color-logo-text: #190064;--border-radius-md: 0.375rem;--border-radius-lg: 0.5rem}@media screen and (min-device-width: 1921px){.excalidraw{--lg-button-size: 2.5rem;--lg-icon-size: 1.25rem;--default-button-size: 2.25rem;--default-icon-size: 1.25rem}}.excalidraw.theme--dark.theme--dark-background-none{background:none}.excalidraw.theme--dark{--theme-filter: invert(93%) hue-rotate(180deg);--button-destructive-bg-color: #5a0000;--button-destructive-color: #ffa8a8;--button-gray-1: #363636;--button-gray-2: #272727;--button-gray-3: #222;--button-special-active-bg-color: #204624;--dialog-border-color: var(--color-gray-80);--dropdown-icon: url("+
b+');--focus-highlight-color: #228be6;--icon-fill-color: var(--color-gray-40);--icon-green-fill-color: #69db7c;--default-bg-color: #121212;--input-bg-color: #121212;--input-border-color: #2e2e2e;--input-hover-bg-color: #181818;--input-label-color: #e9ecef;--island-bg-color: #262627;--keybinding-color: var(--color-gray-60);--link-color: #4dabf7;--overlay-bg-color: rgba(52, 58, 64, 0.12);--popup-bg-color: #2c2c2c;--popup-secondary-bg-color: #222;--popup-text-color: #ced4da;--popup-text-inverted-color: #2c2c2c;--select-highlight-color: #4dabf7;--text-primary-color: var(--color-gray-40);--button-hover-bg: var(--color-gray-80);--default-border-color: var(--color-gray-80);--shadow-island: 0px 13px 33px rgba(0, 0, 0, 0.07), 0px 4.13px 9.94853px rgba(0, 0, 0, 0.0456112), 0px 1.13px 4.13211px rgba(0, 0, 0, 0.035), 0px 0.769896px 1.4945px rgba(0, 0, 0, 0.0243888);--modal-shadow: 0px 100px 80px rgba(0, 0, 0, 0.07), 0px 41.7776px 33.4221px rgba(0, 0, 0, 0.0503198), 0px 22.3363px 17.869px rgba(0, 0, 0, 0.0417275), 0px 12.5216px 10.0172px rgba(0, 0, 0, 0.035), 0px 6.6501px 5.32008px rgba(0, 0, 0, 0.0282725), 0px 2.76726px 2.21381px rgba(0, 0, 0, 0.0196802);--avatar-border-color: var(--color-gray-85);--sidebar-border-color: var(--color-gray-85);--sidebar-bg-color: #191919;--scrollbar-thumb: #343a40;--scrollbar-thumb-hover: #495057;--color-selection: #3530c4;--color-icon-white: var(--color-gray-90);--color-primary: #a8a5ff;--color-primary-darker: #b2aeff;--color-primary-darkest: #beb9ff;--color-primary-light: #4f4d6f;--color-primary-light-darker: #43415e;--color-text-warning: var(--color-gray-80);--color-danger: #ffa8a5;--color-danger-dark: #672120;--color-danger-darker: #8f2625;--color-danger-darkest: #ac2b29;--color-danger-text: #fbcbcc;--color-danger-background: #fbcbcc;--color-danger-icon-background: #672120;--color-danger-color: #261919;--color-danger-icon-color: #fbcbcc;--color-warning-background: var(--color-warning);--color-warning-icon-background: var(--color-warning-dark);--color-warning-color: var(--color-gray-80);--color-warning-icon-color: var(--color-gray-80);--color-muted: var(--color-gray-80);--color-muted-darker: var(--color-gray-60);--color-muted-darkest: var(--color-gray-20);--color-muted-background: var(--color-gray-40);--color-muted-background-darker: var(--color-gray-20);--color-promo: #d297ff;--color-logo-text: #e2dfff}:root{--zIndex-canvas: 1;--zIndex-interactiveCanvas: 2;--zIndex-wysiwyg: 3;--zIndex-layerUI: 4;--zIndex-eyeDropperBackdrop: 5;--zIndex-eyeDropperPreview: 6;--zIndex-modal: 1000;--zIndex-popup: 1001;--zIndex-toast: 999999;--sab: env(safe-area-inset-bottom);--sal: env(safe-area-inset-left);--sar: env(safe-area-inset-right);--sat: env(safe-area-inset-top)}.excalidraw{--ui-font: Assistant, system-ui, BlinkMacSystemFont, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;font-family:var(--ui-font);position:relative;overflow:hidden;color:var(--text-primary-color);display:flex;top:0;bottom:0;left:0;right:0;height:100%;width:100%;-webkit-user-select:none;user-select:none}.excalidraw button{cursor:pointer}.excalidraw:focus{outline:none}.excalidraw a{font-weight:500;text-decoration:none;color:var(--link-color)}.excalidraw a:hover{text-decoration:underline}.excalidraw canvas{touch-action:none;image-rendering:pixelated;image-rendering:-moz-crisp-edges;z-index:var(--zIndex-canvas)}.excalidraw canvas.interactive{z-index:var(--zIndex-interactiveCanvas)}.excalidraw__canvas-wrapper,.excalidraw__canvas.static{pointer-events:none}.excalidraw__canvas{position:absolute}.excalidraw__embeddable{width:100%;height:100%;border:0}.excalidraw__embeddable-container{position:absolute;z-index:2;-webkit-transform-origin:top left;transform-origin:top left;pointer-events:none}.excalidraw.theme--dark canvas{-webkit-filter:var(--theme-filter);filter:var(--theme-filter)}.excalidraw .FixedSideContainer{padding-top:var(--sat, 0);padding-right:var(--sar, 0);padding-bottom:var(--sab, 0);padding-left:var(--sal, 0)}.excalidraw .panelRow{display:flex;justify-content:space-between}.excalidraw .panelColumn{display:flex;flex-direction:column;row-gap:.75rem}.excalidraw .panelColumn h3,.excalidraw .panelColumn legend,.excalidraw .panelColumn .control-label{margin:0;margin-bottom:.25rem;font-size:.75rem;color:var(--text-primary-color);font-weight:normal;display:block}.excalidraw .panelColumn .control-label input{display:block;width:100%}.excalidraw .panelColumn legend{padding:0}.excalidraw .panelColumn .iconSelectList{flex-wrap:wrap;position:relative}.excalidraw .panelColumn .buttonList{flex-wrap:wrap;display:flex;-webkit-column-gap:.5rem;column-gap:.5rem;row-gap:.5rem}.excalidraw .panelColumn .buttonList label{font-size:.75rem}.excalidraw .panelColumn .buttonList input[type\x3dradio],.excalidraw .panelColumn .buttonList input[type\x3dbutton]{opacity:0;position:absolute;pointer-events:none}.excalidraw .panelColumn .buttonList .iconRow{margin-top:8px}.excalidraw .panelColumn fieldset{margin:0;padding:0;border:none}.excalidraw .divider{width:1px;background-color:#e9ecef;margin:1px}.excalidraw .welcome-screen-menu-item:focus-visible,.excalidraw .dropdown-menu-item:focus-visible,.excalidraw button:focus-visible,.excalidraw .buttonList label:focus-within,.excalidraw input:focus-visible{outline:rgba(0,0,0,0);box-shadow:0 0 0 2px var(--focus-highlight-color)}.excalidraw .buttonList .ToolIcon__icon{all:unset !important;display:flex !important}.excalidraw .buttonList button{background-color:rgba(0,0,0,0)}.excalidraw .buttonList label,.excalidraw .buttonList button,.excalidraw .buttonList .zIndexButton{display:flex;justify-content:center;align-items:center;padding:.625rem;width:var(--button-width, var(--default-button-size));height:var(--button-height, var(--default-button-size));box-sizing:border-box;border-width:1px;border-style:solid;border-color:var(--button-border, var(--default-border-color));border-radius:var(--border-radius-lg);cursor:pointer;background-color:var(--button-bg, var(--island-bg-color));color:var(--button-color, var(--text-primary-color));padding:0}.excalidraw .buttonList label svg,.excalidraw .buttonList button svg,.excalidraw .buttonList .zIndexButton svg{width:var(--button-width, var(--lg-icon-size));height:var(--button-height, var(--lg-icon-size))}.excalidraw .buttonList label:hover,.excalidraw .buttonList button:hover,.excalidraw .buttonList .zIndexButton:hover{background-color:var(--button-hover-bg, var(--island-bg-color));border-color:var(--button-hover-border, var(--button-border, var(--default-border-color)));color:var(--button-hover-color, var(--button-color, var(--text-primary-color, inherit)))}.excalidraw .buttonList label:active,.excalidraw .buttonList button:active,.excalidraw .buttonList .zIndexButton:active{background-color:var(--button-active-bg, var(--island-bg-color));border-color:var(--button-active-border, var(--color-primary-darkest))}.excalidraw .buttonList label.active,.excalidraw .buttonList button.active,.excalidraw .buttonList .zIndexButton.active{background-color:var(--button-selected-bg, var(--color-primary-light));border-color:var(--button-selected-border, var(--color-primary-light))}.excalidraw .buttonList label.active:hover,.excalidraw .buttonList button.active:hover,.excalidraw .buttonList .zIndexButton.active:hover{background-color:var(--button-selected-hover-bg, var(--color-primary-light))}.excalidraw .buttonList label.active svg,.excalidraw .buttonList button.active svg,.excalidraw .buttonList .zIndexButton.active svg{color:var(--button-color, var(--color-primary-darker))}.excalidraw .buttonList label svg,.excalidraw .buttonList button svg,.excalidraw .buttonList .zIndexButton svg{width:var(--default-icon-size);height:var(--default-icon-size)}.excalidraw .App-top-bar{z-index:var(--zIndex-layerUI);display:flex;flex-direction:column;align-items:center}.excalidraw .App-bottom-bar{position:absolute;top:0;bottom:0;left:0;right:0;--bar-padding: calc(4 * var(--space-factor));padding-top:max(var(--bar-padding), var(--sat,0));padding-right:var(--sar, 0);padding-bottom:var(--sab, 0);padding-left:var(--sal, 0);z-index:4;display:flex;align-items:flex-end;pointer-events:none}.excalidraw .App-bottom-bar\x3e.Island{width:100%;max-width:100%;min-width:100%;box-sizing:border-box;max-height:100%;display:flex;flex-direction:column;pointer-events:var(--ui-pointerEvents)}.excalidraw .App-bottom-bar\x3e.Island .panelColumn{padding:8px 8px 0 8px}.excalidraw .App-toolbar{width:100%}.excalidraw .App-toolbar .eraser.ToolIcon:hover{--icon-fill-color: #fff;--keybinding-color: #fff}.excalidraw .App-toolbar .eraser.active{background-color:var(--color-primary)}.excalidraw .App-toolbar-content{display:flex;align-items:center;justify-content:space-between;padding:8px}.excalidraw .App-mobile-menu{width:100%;overflow-x:visible;overflow-y:auto;box-sizing:border-box;margin-bottom:var(--bar-padding)}.excalidraw .App-menu{display:grid;color:var(--icon-fill-color)}.excalidraw .shapes-section{display:flex;justify-content:center;pointer-events:none !important}.excalidraw .shapes-section\x3e*{pointer-events:var(--ui-pointerEvents)}.excalidraw .App-menu_top{grid-template-columns:1fr 2fr 1fr;grid-gap:2rem;align-items:flex-start;cursor:default;pointer-events:none !important}.excalidraw .App-menu_top\x3e*{pointer-events:var(--ui-pointerEvents)}@media(min-width: 1536px){.excalidraw .App-menu_top{grid-template-columns:1fr 1fr 1fr;grid-gap:3rem}}.excalidraw .App-menu_top\x3e*:first-child{justify-self:flex-start}.excalidraw .App-menu_top\x3e*:last-child{justify-self:flex-end}.excalidraw .App-menu_bottom{position:absolute;bottom:1rem;display:flex;justify-content:space-between;align-items:flex-start;cursor:default;pointer-events:none !important;box-sizing:border-box;padding:0 1rem}.excalidraw .App-menu_bottom--transition-left section{width:185px}.excalidraw .App-menu_bottom section{display:flex}.excalidraw .App-menu_bottom\x3e*:first-child{justify-self:flex-start}.excalidraw .App-menu_bottom\x3e*:last-child{justify-self:flex-end}.excalidraw .App-menu_left{grid-template-rows:1fr auto 1fr;height:100%}.excalidraw .App-menu_right{grid-template-rows:1fr;height:100%}.excalidraw .App-menu__left{overflow-y:auto;padding:.75rem;width:202px;box-sizing:border-box;position:absolute}.excalidraw .dropdown-select{height:1.5rem;padding:0;-webkit-padding-start:.5rem;padding-inline-start:.5rem;-webkit-padding-end:1.5rem;padding-inline-end:1.5rem;color:var(--icon-fill-color);background-color:var(--button-gray-1);border-radius:var(--space-factor);border:1px solid var(--button-gray-2);font-size:.8rem;font-family:inherit;outline:none;-webkit-appearance:none;appearance:none;background-image:var(--dropdown-icon);background-repeat:no-repeat;background-position:right .7rem top 50%,0 0;background-size:.65em auto,100%}:root[dir\x3drtl] .excalidraw .dropdown-select{background-position:left .7rem top 50%,0 0}.excalidraw .dropdown-select:focus{box-shadow:0 0 0 2px var(--focus-highlight-color)}.excalidraw .dropdown-select:hover{background-color:var(--button-gray-2)}.excalidraw .dropdown-select:active{background-color:var(--button-gray-2)}.excalidraw .dropdown-select__language{height:2rem;background-color:var(--island-bg-color);border-color:var(--default-border-color) !important;cursor:pointer}.excalidraw .dropdown-select__language:hover{background-color:var(--island-bg-color)}.excalidraw .scroll-back-to-content{border-radius:var(--border-radius-lg);background-color:var(--island-bg-color);color:var(--icon-fill-color);border:1px solid var(--default-border-color);padding:10px 20px;position:absolute;left:50%;bottom:30px;-webkit-transform:translateX(-50%);transform:translateX(-50%);pointer-events:var(--ui-pointerEvents);font-family:inherit}.excalidraw .scroll-back-to-content:hover{background-color:var(--button-hover-bg)}.excalidraw .scroll-back-to-content:active{border:1px solid var(--color-primary-darkest)}.excalidraw .help-icon{display:flex;justify-content:center;align-items:center;padding:.625rem;width:var(--button-width, var(--default-button-size));height:var(--button-height, var(--default-button-size));box-sizing:border-box;border-width:1px;border-style:solid;border-color:var(--button-border, var(--default-border-color));border-radius:var(--border-radius-lg);cursor:pointer;background-color:var(--button-bg, var(--island-bg-color));color:var(--button-color, var(--text-primary-color));background-color:var(--island-bg-color);width:var(--lg-button-size);height:var(--lg-button-size)}.excalidraw .help-icon svg{width:var(--button-width, var(--lg-icon-size));height:var(--button-height, var(--lg-icon-size))}.excalidraw .help-icon:hover{background-color:var(--button-hover-bg, var(--island-bg-color));border-color:var(--button-hover-border, var(--button-border, var(--default-border-color)));color:var(--button-hover-color, var(--button-color, var(--text-primary-color, inherit)))}.excalidraw .help-icon:active{background-color:var(--button-active-bg, var(--island-bg-color));border-color:var(--button-active-border, var(--color-primary-darkest))}.excalidraw .help-icon.active{background-color:var(--button-selected-bg, var(--color-primary-light));border-color:var(--button-selected-border, var(--color-primary-light))}.excalidraw .help-icon.active:hover{background-color:var(--button-selected-hover-bg, var(--color-primary-light))}.excalidraw .help-icon.active svg{color:var(--button-color, var(--color-primary-darker))}.excalidraw .help-icon svg{width:var(--lg-icon-size);height:var(--lg-icon-size)}.excalidraw .reset-zoom-button{font-family:var(--ui-font)}.excalidraw .finalize-button{display:grid;grid-auto-flow:column;gap:.4em;margin-top:auto;margin-bottom:auto;-webkit-margin-start:.6em;margin-inline-start:.6em}.excalidraw .undo-redo-buttons,.excalidraw .eraser-buttons{display:grid;grid-auto-flow:column;margin-top:auto;margin-bottom:auto;-webkit-margin-start:.6em;margin-inline-start:.6em}.excalidraw--mobile.excalidraw aside{display:none}.excalidraw--mobile.excalidraw .scroll-back-to-content{bottom:calc(80px + var(--sab, 0));z-index:-1}:root[dir\x3drtl] .excalidraw .rtl-mirror{-webkit-transform:scaleX(-1);transform:scaleX(-1)}.excalidraw .zen-mode-visibility{visibility:visible;opacity:1;height:auto;width:auto;transition:opacity .5s}.excalidraw .zen-mode-visibility.zen-mode-visibility--hidden{visibility:hidden;opacity:0;height:0;width:0;transition:opacity .5s}.excalidraw .disable-pointerEvents{pointer-events:none !important}.excalidraw.excalidraw--view-mode .App-menu{display:flex;justify-content:space-between}.excalidraw input[type\x3dtext],.excalidraw textarea:not(.excalidraw-wysiwyg){color:var(--text-primary-color);border:1.5px solid var(--input-border-color);padding:.75rem;white-space:nowrap;border-radius:var(--space-factor);background-color:var(--input-bg-color)}.excalidraw input[type\x3dtext]:not(:focus):hover,.excalidraw textarea:not(.excalidraw-wysiwyg):not(:focus):hover{background-color:var(--input-hover-bg-color)}.excalidraw input[type\x3dtext]:focus,.excalidraw textarea:not(.excalidraw-wysiwyg):focus{outline:none;box-shadow:0 0 0 2px var(--focus-highlight-color)}@media print{.excalidraw .App-bottom-bar,.excalidraw .FixedSideContainer,.excalidraw .layer-ui__wrapper{display:none}}.excalidraw ::-webkit-scrollbar{width:3px;height:3px}.excalidraw select::-webkit-scrollbar{width:10px}.excalidraw ::-webkit-scrollbar-thumb{background:var(--scrollbar-thumb);border-radius:10px}.excalidraw ::-webkit-scrollbar-thumb:hover{background:var(--scrollbar-thumb-hover)}.excalidraw ::-webkit-scrollbar-thumb:active{background:var(--scrollbar-thumb)}.excalidraw .mobile-misc-tools-container{position:absolute;top:calc(5rem - var(--editor-container-padding));right:calc(var(--editor-container-padding)*-1);display:flex;flex-direction:column;border:1px solid var(--sidebar-border-color);border-top-left-radius:var(--border-radius-lg);border-bottom-left-radius:var(--border-radius-lg);border-right:0;overflow:hidden;background-color:var(--island-bg-color)}.excalidraw .mobile-misc-tools-container .ToolIcon__icon{border-radius:0}.excalidraw .mobile-misc-tools-container .default-sidebar-trigger{border:0}.excalidraw .App-toolbar--mobile{overflow-x:auto;max-width:90vw}.excalidraw .App-toolbar--mobile .ToolIcon__keybinding{display:none}.excalidraw .UserList-Wrapper{margin:0;padding:0;border:none;text-align:left}.excalidraw .UserList-Wrapper legend{display:block;font-size:.75rem;font-weight:400;margin:0 0 .25rem;padding:0}.ErrorSplash.excalidraw{min-height:100vh;padding:20px 0;overflow:auto;display:flex;align-items:center;justify-content:center;-webkit-user-select:text;user-select:text}.ErrorSplash.excalidraw .ErrorSplash-messageContainer{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px;background-color:#ffe3e3;border:3px solid #c92a2a}.ErrorSplash.excalidraw .ErrorSplash-paragraph{margin:15px 0;max-width:600px}.ErrorSplash.excalidraw .ErrorSplash-paragraph.align-center{text-align:center}.ErrorSplash.excalidraw .bigger,.ErrorSplash.excalidraw .bigger button{font-size:1.1em}.ErrorSplash.excalidraw .smaller,.ErrorSplash.excalidraw .smaller button{font-size:.9em}.ErrorSplash.excalidraw .ErrorSplash-details{display:flex;flex-direction:column;align-items:flex-start}.ErrorSplash.excalidraw .ErrorSplash-details textarea{width:100%;margin:10px 0;font-family:"Cascadia";font-size:.8em}.excalidraw__embeddable-container .excalidraw__embeddable-container__inner{overflow:hidden;display:flex;align-items:center;justify-content:center;border-radius:var(--embeddable-radius)}.excalidraw__embeddable-container .excalidraw__embeddable__outer{width:100%;height:100%}.excalidraw__embeddable-container .excalidraw__embeddable__outer\x3e*{border-radius:var(--embeddable-radius)}.excalidraw__embeddable-container .excalidraw__embeddable-hint{position:absolute;z-index:1;background:rgba(0,0,0,.5);padding:1rem 1.6rem;border-radius:12px;color:#fff;font-weight:bold;letter-spacing:.6px;font-family:"Assistant"}',
""]);h.Z=l},6464:function(g,h,b){var l=b(8081);l=b.n(l);var m=b(3645);b=b.n(m)()(l());b.push([g.id,"",""]);b.locals={themeFilter:"invert(93%) hue-rotate(180deg)",rightSidebarWidth:"302px"};h.Z=b},5260:function(g,h,b){var l=b(8081);l=b.n(l);var m=b(3645);b=b.n(m)()(l());b.push([g.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw-hyperlinkContainer{display:flex;align-items:center;justify-content:space-between;position:absolute;box-shadow:0px 2px 4px 0 rgba(0,0,0,.3);z-index:100;background:var(--island-bg-color);border-radius:var(--border-radius-md);box-sizing:border-box;min-height:42px}.excalidraw-hyperlinkContainer-input,.excalidraw-hyperlinkContainer button{z-index:100}.excalidraw-hyperlinkContainer-input,.excalidraw-hyperlinkContainer-link{height:24px;padding:0 8px;line-height:24px;font-size:.9rem;font-weight:500;font-family:var(--ui-font)}.excalidraw-hyperlinkContainer-input{width:18rem;border:none;background-color:rgba(0,0,0,0);color:var(--text-primary-color);outline:none;border:none;box-shadow:none !important}.excalidraw-hyperlinkContainer-link{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:15rem}.excalidraw-hyperlinkContainer button{color:#228be6;background-color:rgba(0,0,0,0) !important;font-weight:500}.excalidraw-hyperlinkContainer button.excalidraw-hyperlinkContainer--remove{color:#c92a2a}.excalidraw-hyperlinkContainer--remove .ToolIcon__icon svg{color:#fa5252}.excalidraw-hyperlinkContainer .ToolIcon__icon{width:2rem;height:2rem}.excalidraw-hyperlinkContainer__buttons{flex:0 0 auto}",
""]);h.Z=b},3645:function(g){g.exports=function(h){var b=[];return b.toString=function(){return this.map(function(l){var m="",p=void 0!==l[5];return l[4]&&(m+="@supports (".concat(l[4],") {")),l[2]&&(m+="@media ".concat(l[2]," {")),p&&(m+="@layer".concat(0<l[5].length?" ".concat(l[5]):""," {")),m+=h(l),p&&(m+="}"),l[2]&&(m+="}"),l[4]&&(m+="}"),m}).join("")},b.i=function(l,m,p,D,v){"string"==typeof l&&(l=[[null,l,void 0]]);var t={};if(p)for(var r=0;r<this.length;r++){var f=this[r][0];null!=f&&(t[f]=
!0)}for(r=0;r<l.length;r++)f=[].concat(l[r]),p&&t[f[0]]||(void 0!==v&&(void 0===f[5]||(f[1]="@layer".concat(0<f[5].length?" ".concat(f[5]):""," {").concat(f[1],"}")),f[5]=v),m&&(f[2]?(f[1]="@media ".concat(f[2]," {").concat(f[1],"}"),f[2]=m):f[2]=m),D&&(f[4]?(f[1]="@supports (".concat(f[4],") {").concat(f[1],"}"),f[4]=D):f[4]="".concat(D)),b.push(f))},b}},1667:function(g){g.exports=function(h,b){return b||={},h?(h=String(h.__esModule?h.default:h),/^['"].*['"]$/.test(h)&&(h=h.slice(1,-1)),b.hash&&
(h+=b.hash),/["'() \t\n]|(%20)/.test(h)||b.needQuotes?'"'.concat(h.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):h):h}},8081:function(g){g.exports=function(h){return h[1]}},1675:function(g,h,b){function l(G,F){var O="undefined"!=typeof Symbol&&G[Symbol.iterator]||G["@@iterator"];if(!O){if(Array.isArray(G)||(O=function(Z,aa){if(Z){if("string"==typeof Z)return m(Z,aa);var W=Object.prototype.toString.call(Z).slice(8,-1);"Object"===W&&Z.constructor&&(W=Z.constructor.name);if("Map"===W||"Set"===W)return Array.from(Z);
if("Arguments"===W||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(W))return m(Z,aa)}}(G))||F&&G&&"number"==typeof G.length){O&&(G=O);var M=0;F=function(){};return{s:F,n:function(){return M>=G.length?{done:!0}:{done:!1,value:G[M++]}},e:function(Z){throw Z;},f:F}}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 I,ia=!0,U=!1;return{s:function(){O=O.call(G)},n:function(){var Z=O.next();return ia=
Z.done,Z},e:function(Z){U=!0;I=Z},f:function(){try{ia||null==O.return||O.return()}finally{if(U)throw I;}}}}function m(G,F){(null==F||F>G.length)&&(F=G.length);for(var O=0,M=Array(F);O<F;O++)M[O]=G[O];return M}function p(G,F){var O=Object.keys(G);if(Object.getOwnPropertySymbols){var M=Object.getOwnPropertySymbols(G);F&&(M=M.filter(function(I){return Object.getOwnPropertyDescriptor(G,I).enumerable}));O.push.apply(O,M)}return O}function D(G){for(var F=1;F<arguments.length;F++){var O=null!=arguments[F]?
arguments[F]:{};F%2?p(Object(O),!0).forEach(function(M){(0,t.Z)(G,M,O[M])}):Object.getOwnPropertyDescriptors?Object.defineProperties(G,Object.getOwnPropertyDescriptors(O)):p(Object(O)).forEach(function(M){Object.defineProperty(G,M,Object.getOwnPropertyDescriptor(O,M))})}return G}b.d(h,{JQ:function(){return R},vD:function(){return L},y7:function(){return S}});var v=b(1930),t=b(7169),r=b(7041),f=b(5734),E=b(7729),B=b(554),J=b(3716),V=b(9472),H=b(7135);g=b(9610);var S=(0,g.z)({name:"unbindText",contextItemLabel:"labels.unbindText",
trackEvent:{category:"element"},predicate:function(G,F,O,M){return M.scene.getSelectedElements(F).some(function(I){return(0,V.Xo)(I)})},perform:function(G,F,O,M){return M.scene.getSelectedElements(F).forEach(function(I){var ia=(0,B.WJ)(I);if(ia){var U,Z=(0,B.X1)(ia.originalText,(0,H.mO)(ia),ia.lineHeight),aa=Z.width,W=Z.height;Z=Z.baseline;var fa=(0,J.eR)(I.id);(0,J.kT)(I.id);var X=(0,B.FE)(I,ia);(0,E.DR)(ia,{containerId:null,width:aa,height:W,baseline:Z,text:ia.originalText,x:X.x,y:X.y});(0,E.DR)(I,
{boundElements:null===(U=I.boundElements)||void 0===U?void 0:U.filter(function(ea){return ea.id!==ia.id}),height:fa||I.height})}}),{elements:G,appState:F,commitToHistory:!0}}}),L=(0,g.z)({name:"bindText",contextItemLabel:"labels.bindText",trackEvent:{category:"element"},predicate:function(G,F,O,M){G=M.scene.getSelectedElements(F);if(2===G.length){var I;F=(0,f.iB)(G[0])||(0,f.iB)(G[1]);if((0,V.mG)(G[0])?I=G[0]:(0,V.mG)(G[1])&&(I=G[1]),F&&I&&null===(0,B.WJ)(I))return!0}return!1},perform:function(G,
F,O,M){var I,ia;O=M.scene.getSelectedElements(F);(0,f.iB)(O[0])&&(0,V.mG)(O[1])?(I=O[0],ia=O[1]):(I=O[1],ia=O[0]);(0,E.DR)(I,{containerId:ia.id,verticalAlign:r.oX.MIDDLE,textAlign:r.I8.CENTER});(0,E.DR)(ia,{boundElements:(ia.boundElements||[]).concat({type:"text",id:I.id})});O=ia.height;return(0,B.oN)(I,ia),(0,J.h_)(ia.id,O),{elements:T(G,ia,I),appState:D(D({},F),{},{selectedElementIds:(0,t.Z)({},ia.id,!0)}),commitToHistory:!0}}}),T=function(G,F,O){G=G.slice();var M=G.findIndex(function(I){return I.id===
O.id});G.splice(M,1);M=G.findIndex(function(I){return I.id===F.id});return G.splice(M+1,0,O),G},R=(0,g.z)({name:"wrapTextInContainer",contextItemLabel:"labels.createContainerFromText",trackEvent:{category:"element"},predicate:function(G,F,O,M){G=M.scene.getSelectedElements(F);F=G.every(function(I){return(0,f.iB)(I)});return 0<G.length&&F},perform:function(G,F,O,M){var I;O=M.scene.getSelectedElements(F);var ia=G.slice(),U={};G=l(O);try{for(O=function(){var Z=I.value;if((0,f.iB)(Z)){var aa,W=(0,f.Up)({type:"rectangle",
backgroundColor:F.currentItemBackgroundColor,boundElements:[].concat((0,v.Z)(Z.boundElements||[]),[{id:Z.id,type:"text"}]),angle:Z.angle,fillStyle:F.currentItemFillStyle,strokeColor:F.currentItemStrokeColor,roughness:F.currentItemRoughness,strokeWidth:F.currentItemStrokeWidth,strokeStyle:F.currentItemStrokeStyle,roundness:"round"===F.currentItemRoundness?{type:(0,V.QI)("rectangle")?r.a6.ADAPTIVE_RADIUS:r.a6.PROPORTIONAL_RADIUS}:null,opacity:100,locked:!1,x:Z.x-r.gK,y:Z.y-r.gK,width:(0,B.NS)(Z.width,
"rectangle"),height:(0,B.NS)(Z.height,"rectangle"),groupIds:Z.groupIds,frameId:Z.frameId});if(null!==(aa=Z.boundElements)&&void 0!==aa&&aa.length){var fa=Z.boundElements.filter(function(X){return"arrow"===X.type}).map(function(X){return X.id});ia.filter(function(X){return fa.includes(X.id)}).forEach(function(X){var ea,pa,va=X.startBinding,ta=X.endBinding;(null===(ea=va)||void 0===ea?void 0:ea.elementId)===Z.id&&(va=D(D({},va),{},{elementId:W.id}));(null===(pa=ta)||void 0===pa?void 0:pa.elementId)===
Z.id&&(ta=D(D({},ta),{},{elementId:W.id}));(va||ta)&&(0,E.DR)(X,{startBinding:va,endBinding:ta},!1)})}(0,E.DR)(Z,{containerId:W.id,verticalAlign:r.oX.MIDDLE,boundElements:null,textAlign:r.I8.CENTER},!1);(0,B.oN)(Z,W);ia=function(X,ea,pa){X=X.slice();var va=X.findIndex(function(ta){return ta.id===ea.id});X.splice(va,1);va=X.findIndex(function(ta){return ta.id===pa.id});return X.splice(va,0,ea),X}([].concat((0,v.Z)(ia),[W]),W,Z);U[W.id]=!0}},G.s();!(I=G.n()).done;)O()}catch(Z){G.e(Z)}finally{G.f()}return{elements:ia,
appState:D(D({},F),{},{selectedElementIds:U}),commitToHistory:!0}}})},8260:function(g,h,b){function l(W,fa){var X=Object.keys(W);if(Object.getOwnPropertySymbols){var ea=Object.getOwnPropertySymbols(W);fa&&(ea=ea.filter(function(pa){return Object.getOwnPropertyDescriptor(W,pa).enumerable}));X.push.apply(X,ea)}return X}function m(W){for(var fa=1;fa<arguments.length;fa++){var X=null!=arguments[fa]?arguments[fa]:{};fa%2?l(Object(X),!0).forEach(function(ea){(0,D.Z)(W,ea,X[ea])}):Object.getOwnPropertyDescriptors?
Object.defineProperties(W,Object.getOwnPropertyDescriptors(X)):l(Object(X)).forEach(function(ea){Object.defineProperty(W,ea,Object.getOwnPropertyDescriptor(X,ea))})}return W}b.d(h,{CZ:function(){return ia},JB:function(){return U},Lo:function(){return I},Zp:function(){return Z},eF:function(){return aa},mo:function(){return M}});var p=b(2577),D=b(7169),v=b(6310),t=b(1119),r=b(4289),f=b(7041),E=b(5734),B=b(8557),J=b(6331),V=b(9547),H=b(6778),S=b(3765),L=b(7135);g=b(9610);var T=b(3440),R=b(7729),G=b(7726),
F=b(8127),O=b(4512);(0,g.z)({name:"changeViewBackgroundColor",trackEvent:!1,predicate:function(W,fa,X,ea){return!!ea.props.UIOptions.canvasActions.changeViewBackgroundColor&&!fa.viewModeEnabled},perform:function(W,fa,X){return{appState:m(m({},fa),X),commitToHistory:!!X.viewBackgroundColor}},PanelComponent:function(W){var fa=W.elements,X=W.appState,ea=W.updateData;W.appProps;return(0,O.jsx)(v.z,{palette:null,topPicks:F.ay,label:(0,B.t)("labels.canvasBackground"),type:"canvasBackground",color:X.viewBackgroundColor,
onChange:function(pa){return ea({viewBackgroundColor:pa})},"data-testid":"canvas-background-picker",elements:fa,appState:X,updateData:ea})}});var M=(0,g.z)({name:"clearCanvas",trackEvent:{category:"canvas"},predicate:function(W,fa,X,ea){return!!ea.props.UIOptions.canvasActions.clearCanvas&&!fa.viewModeEnabled},perform:function(W,fa,X,ea){return ea.imageCache.clear(),{elements:W.map(function(pa){return(0,R.BE)(pa,{isDeleted:!0})}),appState:m(m({},(0,G.im)()),{},{files:{},theme:fa.theme,penMode:fa.penMode,
penDetected:fa.penDetected,exportBackground:fa.exportBackground,exportEmbedScene:fa.exportEmbedScene,gridSize:fa.gridSize,showStats:fa.showStats,pasteDialog:fa.pasteDialog,activeTool:"image"===fa.activeTool.type?m(m({},fa.activeTool),{},{type:"selection"}):fa.activeTool}),commitToHistory:!0}}}),I=(0,g.z)({name:"zoomIn",viewMode:!0,trackEvent:{category:"canvas"},perform:function(W,fa,X,ea){return{appState:m(m({},fa),(0,S.E)({viewportX:fa.width/2+fa.offsetLeft,viewportY:fa.height/2+fa.offsetTop,nextZoom:(0,V.j)(fa.zoom.value+
f.V4)},fa)),commitToHistory:!1}},PanelComponent:function(W){var fa=W.updateData;return(0,O.jsx)(r.V,{type:"button",className:"zoom-in-button zoom-button",icon:t.Sd,title:"".concat((0,B.t)("buttons.zoomIn")," — ").concat((0,L.uY)("CtrlOrCmd++")),"aria-label":(0,B.t)("buttons.zoomIn"),onClick:function(){fa(null)}})},keyTest:function(W){return(W.code===J.aU.EQUAL||W.code===J.aU.NUM_ADD)&&(W[J.tW.CTRL_OR_CMD]||W.shiftKey)}}),ia=(0,g.z)({name:"zoomOut",viewMode:!0,trackEvent:{category:"canvas"},perform:function(W,
fa,X,ea){return{appState:m(m({},fa),(0,S.E)({viewportX:fa.width/2+fa.offsetLeft,viewportY:fa.height/2+fa.offsetTop,nextZoom:(0,V.j)(fa.zoom.value-f.V4)},fa)),commitToHistory:!1}},PanelComponent:function(W){var fa=W.updateData;return(0,O.jsx)(r.V,{type:"button",className:"zoom-out-button zoom-button",icon:t.xL,title:"".concat((0,B.t)("buttons.zoomOut")," — ").concat((0,L.uY)("CtrlOrCmd+-")),"aria-label":(0,B.t)("buttons.zoomOut"),onClick:function(){fa(null)}})},keyTest:function(W){return(W.code===
J.aU.MINUS||W.code===J.aU.NUM_SUBTRACT)&&(W[J.tW.CTRL_OR_CMD]||W.shiftKey)}}),U=((0,g.z)({name:"resetZoom",viewMode:!0,trackEvent:{category:"canvas"},perform:function(W,fa,X,ea){return{appState:m(m({},fa),(0,S.E)({viewportX:fa.width/2+fa.offsetLeft,viewportY:fa.height/2+fa.offsetTop,nextZoom:(0,V.j)(1)},fa)),commitToHistory:!1}},PanelComponent:function(W){var fa=W.updateData;W=W.appState;return(0,O.jsx)(T.u,{label:(0,B.t)("buttons.resetZoom"),style:{height:"100%"},children:(0,O.jsxs)(r.V,{type:"button",
className:"reset-zoom-button zoom-button",title:(0,B.t)("buttons.resetZoom"),"aria-label":(0,B.t)("buttons.resetZoom"),onClick:function(){fa(null)},children:[(100*W.zoom.value).toFixed(0),"%"]})})},keyTest:function(W){return(W.code===J.aU.ZERO||W.code===J.aU.NUM_ZERO)&&(W[J.tW.CTRL_OR_CMD]||W.shiftKey)}}),function(W){var fa=W.appState;var X=W.fitToViewport;var ea=void 0!==X&&X;X=W.viewportZoomFactor;var pa=void 0===X?.7:X,va=(0,E.KP)((0,E.Lm)(W.targetElements));W=(0,p.Z)(va,4);var ta=W[0],xa=W[1],
Ga=W[2],Ia=W[3];X=(ta+Ga)/2;W=(xa+Ia)/2;ea?(ea=Math.min(fa.width/(Ga-ta),fa.height/(Ia-xa))*Math.min(1,Math.max(pa,.1)),ea=Math.min(Math.max(ea,.1),30),X=fa.width/2*(1/ea)-X,W=fa.height/2*(1/ea)-W):(ea=fa.width,pa=fa.height,va=(0,p.Z)(va,4),ea=Math.min(Math.max(Math.floor(Math.min(ea/(va[2]-va[0]),pa/(va[3]-va[1]))/f.V4)*f.V4,f.Zj),1),W=(0,H.s)({scenePoint:{x:X,y:W},viewportDimensions:{width:fa.width,height:fa.height},zoom:{value:ea}}),X=W.scrollX,W=W.scrollY);return{appState:m(m({},fa),{},{scrollX:X,
scrollY:W,zoom:{value:ea}}),commitToHistory:!1}}),Z=((0,g.z)({name:"zoomToFitSelectionInViewport",trackEvent:{category:"canvas"},perform:function(W,fa,X,ea){X=ea.scene.getSelectedElements(fa);return U({targetElements:X.length?X:W,appState:fa,fitToViewport:!1})},keyTest:function(W){return W.code===J.aU.TWO&&W.shiftKey&&!W.altKey&&!W[J.tW.CTRL_OR_CMD]}}),(0,g.z)({name:"zoomToFitSelection",trackEvent:{category:"canvas"},perform:function(W,fa,X,ea){X=ea.scene.getSelectedElements(fa);return U({targetElements:X.length?
X:W,appState:fa,fitToViewport:!0})},keyTest:function(W){return W.code===J.aU.THREE&&W.shiftKey&&!W.altKey&&!W[J.tW.CTRL_OR_CMD]}}),(0,g.z)({name:"zoomToFit",viewMode:!0,trackEvent:{category:"canvas"},perform:function(W,fa){return U({targetElements:W,appState:fa,fitToViewport:!1})},keyTest:function(W){return W.code===J.aU.ONE&&W.shiftKey&&!W.altKey&&!W[J.tW.CTRL_OR_CMD]}}),(0,g.z)({name:"toggleTheme",viewMode:!0,trackEvent:{category:"canvas"},perform:function(W,fa,X){return{appState:m(m({},fa),{},
{theme:X||(fa.theme===f.C6.LIGHT?f.C6.DARK:f.C6.LIGHT)}),commitToHistory:!1}},keyTest:function(W){return W.altKey&&W.shiftKey&&W.code===J.aU.D},predicate:function(W,fa,X,ea){return!!ea.props.UIOptions.canvasActions.toggleTheme}})),aa=((0,g.z)({name:"toggleEraserTool",trackEvent:{category:"toolbar"},perform:function(W,fa){var X;return X=(0,G.EN)(fa)?(0,L.Om)(fa,m(m({},fa.activeTool.lastActiveTool||{type:"selection"}),{},{lastActiveToolBeforeEraser:null})):(0,L.Om)(fa,{type:"eraser",lastActiveToolBeforeEraser:fa.activeTool}),
{appState:m(m({},fa),{},{selectedElementIds:{},selectedGroupIds:{},activeEmbeddable:null,activeTool:X}),commitToHistory:!0}},keyTest:function(W){return W.key===J.tW.E}}),(0,g.z)({name:"toggleHandTool",trackEvent:{category:"toolbar"},perform:function(W,fa,X,ea){var pa;return(0,G.l$)(fa)?pa=(0,L.Om)(fa,m(m({},fa.activeTool.lastActiveTool||{type:"selection"}),{},{lastActiveToolBeforeEraser:null})):(pa=(0,L.Om)(fa,{type:"hand",lastActiveToolBeforeEraser:fa.activeTool}),(0,L.KJ)(ea.interactiveCanvas,f.oc.GRAB)),
{appState:m(m({},fa),{},{selectedElementIds:{},selectedGroupIds:{},activeEmbeddable:null,activeTool:pa}),commitToHistory:!0}},keyTest:function(W){return W.key===J.tW.H}}))},899:function(g,h,b){function l(F,O){var M=Object.keys(F);if(Object.getOwnPropertySymbols){var I=Object.getOwnPropertySymbols(F);O&&(I=I.filter(function(ia){return Object.getOwnPropertyDescriptor(F,ia).enumerable}));M.push.apply(M,I)}return M}function m(F){for(var O=1;O<arguments.length;O++){var M=null!=arguments[O]?arguments[O]:
{};O%2?l(Object(M),!0).forEach(function(I){(0,p.Z)(F,I,M[I])}):Object.getOwnPropertyDescriptors?Object.defineProperties(F,Object.getOwnPropertyDescriptors(M)):l(Object(M)).forEach(function(I){Object.defineProperty(F,I,Object.getOwnPropertyDescriptor(M,I))})}return F}b.d(h,{FA:function(){return T},ZM:function(){return L},jK:function(){return R},uN:function(){return H},yQ:function(){return S},zp:function(){return G}});var p=b(7169);g=b(8950);h=b(2975);var D=b.n(h),v=b(6331);h=b(9610);var t=b(278),r=
b(2283),f=b(2137),E=b(5734),B=b(8557),J,V,H=(0,h.z)({name:"copy",trackEvent:{category:"element"},perform:function(F,O,M,I){F=I.scene.getSelectedElements({selectedElementIds:O.selectedElementIds,includeBoundTextElement:!0,includeElementsInFrames:!0});return(0,t.vQ)(F,I.files),{commitToHistory:!1}},predicate:function(F,O,M,I){return I.device.isMobile&&!!navigator.clipboard},contextItemLabel:"labels.copy",keyTest:void 0}),S=(0,h.z)({name:"paste",trackEvent:{category:"element"},perform:function(F,O,M,
I){return I.pasteFromClipboard(null),{commitToHistory:!1}},predicate:function(F,O,M,I){return I.device.isMobile&&!!navigator.clipboard},contextItemLabel:"labels.paste",keyTest:void 0}),L=(0,h.z)({name:"cut",trackEvent:{category:"element"},perform:function(F,O,M,I){return H.perform(F,O,M,I),r.X.perform(F,O)},predicate:function(F,O,M,I){return I.device.isMobile&&!!navigator.clipboard},contextItemLabel:"labels.cut",keyTest:function(F){return F[v.tW.CTRL_OR_CMD]&&F.key===v.tW.X}}),T=(0,h.z)({name:"copyAsSvg",
trackEvent:{category:"element"},perform:(J=(0,g.Z)(D().mark(function U(O,M,I,ia){var Z;return D().wrap(function(aa){for(;;)switch(aa.prev=aa.next){case 0:if(ia.canvas){aa.next=2;break}return aa.abrupt("return",{commitToHistory:!1});case 2:return Z=ia.scene.getSelectedElements({selectedElementIds:M.selectedElementIds,includeBoundTextElement:!0,includeElementsInFrames:!0}),aa.prev=3,aa.next=6,(0,f.p1)("clipboard-svg",Z.length?Z:(0,E.Lm)(O),M,ia.files,M);case 6:return aa.abrupt("return",{commitToHistory:!1});
case 9:return aa.prev=9,aa.t0=aa.catch(3),console.error(aa.t0),aa.abrupt("return",{appState:m(m({},M),{},{errorMessage:aa.t0.message}),commitToHistory:!1});case 13:case "end":return aa.stop()}},U,null,[[3,9]])})),function(O,M,I,ia){return J.apply(this,arguments)}),predicate:function(O){return t.wx&&0<O.length},contextItemLabel:"labels.copyAsSvg"}),R=(0,h.z)({name:"copyAsPng",trackEvent:{category:"element"},perform:(V=(0,g.Z)(D().mark(function Z(M,I,ia,U){var aa;return D().wrap(function(W){for(;;)switch(W.prev=
W.next){case 0:if(U.canvas){W.next=2;break}return W.abrupt("return",{commitToHistory:!1});case 2:return aa=U.scene.getSelectedElements({selectedElementIds:I.selectedElementIds,includeBoundTextElement:!0,includeElementsInFrames:!0}),W.prev=3,W.next=6,(0,f.p1)("clipboard",aa.length?aa:(0,E.Lm)(M),I,U.files,I);case 6:return W.abrupt("return",{appState:m(m({},I),{},{toast:{message:(0,B.t)("toast.copyToClipboardAsPng",{exportSelection:aa.length?(0,B.t)("toast.selection"):(0,B.t)("toast.canvas"),exportColorScheme:I.exportWithDarkMode?
(0,B.t)("buttons.darkMode"):(0,B.t)("buttons.lightMode")})}}),commitToHistory:!1});case 9:return W.prev=9,W.t0=W.catch(3),console.error(W.t0),W.abrupt("return",{appState:m(m({},I),{},{errorMessage:W.t0.message}),commitToHistory:!1});case 13:case "end":return W.stop()}},Z,null,[[3,9]])})),function(M,I,ia,U){return V.apply(this,arguments)}),predicate:function(M){return t.vt&&0<M.length},contextItemLabel:"labels.copyAsPng",keyTest:function(M){return M.code===v.aU.C&&M.altKey&&M.shiftKey}}),G=(0,h.z)({name:"copyText",
trackEvent:{category:"element"},perform:function(M,I,ia,U){M=U.scene.getSelectedElements({selectedElementIds:I.selectedElementIds,includeBoundTextElement:!0}).reduce(function(Z,aa){return(0,E.iB)(aa)&&Z.push(aa.text),Z},[]).join("\n\n");return(0,t.dd)(M),{commitToHistory:!1}},predicate:function(M,I,ia,U){return t.wx&&U.scene.getSelectedElements({selectedElementIds:I.selectedElementIds,includeBoundTextElement:!0}).some(E.iB)},contextItemLabel:"labels.copyText"})},2283:function(g,h,b){function l(F,
O){var M=Object.keys(F);if(Object.getOwnPropertySymbols){var I=Object.getOwnPropertySymbols(F);O&&(I=I.filter(function(ia){return Object.getOwnPropertyDescriptor(F,ia).enumerable}));M.push.apply(M,I)}return M}function m(F){for(var O=1;O<arguments.length;O++){var M=null!=arguments[O]?arguments[O]:{};O%2?l(Object(M),!0).forEach(function(I){(0,p.Z)(F,I,M[I])}):Object.getOwnPropertyDescriptors?Object.defineProperties(F,Object.getOwnPropertyDescriptors(M)):l(Object(M)).forEach(function(I){Object.defineProperty(F,
I,Object.getOwnPropertyDescriptor(M,I))})}return F}b.d(h,{X:function(){return G}});var p=b(7169),D=b(9547),v=b(6331),t=b(4289),r=b(8557);g=b(9610);var f=b(5734),E=b(7729),B=b(502),J=b(8627),V=b(7267),H=b(9472),S=b(7135),L=b(1119),T=b(4512),R=function(F,O){return F.editingGroupId&&(O=(0,B.Fb)((0,f.Lm)(O),F.editingGroupId),O.length)?m(m({},F),{},{selectedElementIds:(0,p.Z)({},O[0].id,!0)}):F},G=(0,g.z)({name:"deleteSelectedElements",trackEvent:{category:"element",action:"delete"},perform:function(F,
O){if(O.editingLinearElement){var M=O.editingLinearElement,I=M.selectedPointsIndices,ia=M.startBindingElement,U=M.endBindingElement,Z=J._.getElement(M.elementId);if(!Z||null==I)return!1;if(2>Z.points.length)return F=F.map(function(aa){return aa.id===Z.id?(0,E.BE)(aa,{isDeleted:!0}):aa}),{elements:F,appState:m(m({},R(O,F)),{},{editingLinearElement:null}),commitToHistory:!1};M={startBindingElement:null!=I&&I.includes(0)?null:ia,endBindingElement:null!=I&&I.includes(Z.points.length-1)?null:U};return J._.deletePoints(Z,
I),{elements:F,appState:m(m({},O),{},{editingLinearElement:m(m(m({},O.editingLinearElement),M),{},{selectedPointsIndices:0<(null==I?void 0:I[0])?[I[0]-1]:[0]})}),commitToHistory:!0}}M=function(aa,W){var fa=new Set((0,D.eD)(aa.filter(function(X){return"frame"===X.type}),W).map(function(X){return X.id}));return{elements:aa.map(function(X){return W.selectedElementIds[X.id]||X.frameId&&fa.has(X.frameId)||(0,H.Xh)(X)&&W.selectedElementIds[X.containerId]?(0,E.BE)(X,{isDeleted:!0}):X}),appState:m(m({},W),
{},{selectedElementIds:{}})}}(F,O);I=M.elements;M=M.appState;return(0,V.$q)(I,F.filter(function(aa){return O.selectedElementIds[aa.id]})),{elements:I,appState:m(m({},M=R(M,I)),{},{activeTool:(0,S.Om)(O,{type:"selection"}),multiElement:null,activeEmbeddable:null}),commitToHistory:(0,D.N)((0,f.Lm)(F),O)}},contextItemLabel:"labels.delete",keyTest:function(F,O,M){return(F.key===v.tW.BACKSPACE||F.key===v.tW.DELETE)&&!F[v.tW.CTRL_OR_CMD]},PanelComponent:function(F){var O=F.elements,M=F.appState,I=F.updateData;
return(0,T.jsx)(t.V,{type:"button",icon:L.XH,title:(0,r.t)("labels.delete"),"aria-label":(0,r.t)("labels.delete"),onClick:function(){return I(null)},visible:(0,D.N)((0,f.Lm)(O),M)})}})},5064:function(g,h,b){function l(B,J){var V=Object.keys(B);if(Object.getOwnPropertySymbols){var H=Object.getOwnPropertySymbols(B);J&&(H=H.filter(function(S){return Object.getOwnPropertyDescriptor(B,S).enumerable}));V.push.apply(V,H)}return V}function m(B){for(var J=1;J<arguments.length;J++){var V=null!=arguments[J]?
arguments[J]:{};J%2?l(Object(V),!0).forEach(function(H){(0,p.Z)(B,H,V[H])}):Object.getOwnPropertyDescriptors?Object.defineProperties(B,Object.getOwnPropertyDescriptors(V)):l(Object(V)).forEach(function(H){Object.defineProperty(B,H,Object.getOwnPropertyDescriptor(V,H))})}return B}b.d(h,{$:function(){return f},U:function(){return E}});var p=b(7169),D=b(7729),v=b(6331),t=b(7135);g=b(9610);var r=function(B){return B.every(function(J){return!J.locked})},f=(0,g.z)({name:"toggleElementLock",trackEvent:{category:"element"},
predicate:function(B,J,V,H){return!H.scene.getSelectedElements(J).some(function(S){return S.locked&&S.frameId})},perform:function(B,J,V,H){V=H.scene.getSelectedElements({selectedElementIds:J.selectedElementIds,includeBoundTextElement:!0,includeElementsInFrames:!0});if(!V.length)return!1;var S=r(V),L=(0,t.xn)(V);return{elements:B.map(function(T){return L.has(T.id)?(0,D.BE)(T,{locked:S}):T}),appState:m(m({},J),{},{selectedLinearElement:S?null:J.selectedLinearElement}),commitToHistory:!0}},contextItemLabel:function(B,
J,V){B=V.scene.getSelectedElements({selectedElementIds:J.selectedElementIds,includeBoundTextElement:!1});return 1===B.length&&"frame"!==B[0].type?B[0].locked?"labels.elementLock.unlock":"labels.elementLock.lock":r(B)?"labels.elementLock.lockAll":"labels.elementLock.unlockAll"},keyTest:function(B,J,V,H){return B.key.toLocaleLowerCase()===v.tW.L&&B[v.tW.CTRL_OR_CMD]&&B.shiftKey&&0<H.scene.getSelectedElements({selectedElementIds:J.selectedElementIds,includeBoundTextElement:!1}).length}}),E=(0,g.z)({name:"unlockAllElements",
trackEvent:{category:"canvas"},viewMode:!1,predicate:function(B){return B.some(function(J){return J.locked})},perform:function(B,J){var V=B.filter(function(H){return H.locked});return{elements:B.map(function(H){return H.locked?(0,D.BE)(H,{locked:!1}):H}),appState:m(m({},J),{},{selectedElementIds:Object.fromEntries(V.map(function(H){return[H.id,!0]}))}),commitToHistory:!0}},contextItemLabel:"labels.elementLock.unlockAll"})},608:function(g,h,b){function l(Oa,Va){var Ma=Object.keys(Oa);if(Object.getOwnPropertySymbols){var Ua=
Object.getOwnPropertySymbols(Oa);Va&&(Ua=Ua.filter(function(ib){return Object.getOwnPropertyDescriptor(Oa,ib).enumerable}));Ma.push.apply(Ma,Ua)}return Ma}function m(Oa){for(var Va=1;Va<arguments.length;Va++){var Ma=null!=arguments[Va]?arguments[Va]:{};Va%2?l(Object(Ma),!0).forEach(function(Ua){(0,r.Z)(Oa,Ua,Ma[Ua])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Oa,Object.getOwnPropertyDescriptors(Ma)):l(Object(Ma)).forEach(function(Ua){Object.defineProperty(Oa,Ua,Object.getOwnPropertyDescriptor(Ma,
Ua))})}return Oa}function p(Oa,Va){var Ma=Object.keys(Oa);if(Object.getOwnPropertySymbols){var Ua=Object.getOwnPropertySymbols(Oa);Va&&(Ua=Ua.filter(function(ib){return Object.getOwnPropertyDescriptor(Oa,ib).enumerable}));Ma.push.apply(Ma,Ua)}return Ma}function D(Oa){for(var Va=1;Va<arguments.length;Va++){var Ma=null!=arguments[Va]?arguments[Va]:{};Va%2?p(Object(Ma),!0).forEach(function(Ua){(0,r.Z)(Oa,Ua,Ma[Ua])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Oa,Object.getOwnPropertyDescriptors(Ma)):
p(Object(Ma)).forEach(function(Ua){Object.defineProperty(Oa,Ua,Object.getOwnPropertyDescriptor(Ma,Ua))})}return Oa}b.d(h,{XA:function(){return la},Du:function(){return ka},sK:function(){return Ba},zX:function(){return Ka},bJ:function(){return La},_d:function(){return oa},mM:function(){return na},ns:function(){return ua}});var v=b(8950),t=b(2577),r=b(7169);g=b(2975);var f=b.n(g),E=b(1119);g=b(3379);g=b.n(g);h=b(7795);h=b.n(h);var B=b(569);B=b.n(B);var J=b(3565);J=b.n(J);var V=b(9216);V=b.n(V);var H=
b(4589);H=b.n(H);var S=b(6759),L={};L.styleTagTransform=H();L.setAttributes=J();L.insert=B().bind(null,"head");L.domAPI=h();L.insertStyleElement=V();g()(S.Z,L);S.Z&&S.Z.locals&&S.Z.locals;var T=b(9787),R=b(7135);S=b(532);L={};L.styleTagTransform=H();L.setAttributes=J();L.insert=B().bind(null,"head");L.domAPI=h();L.insertStyleElement=V();g()(S.Z,L);S.Z&&S.Z.locals&&S.Z.locals;var G=b(3470),F=b(6331),O=b(4512),M=function(Oa){var Va=(0,G.J0)().id,Ma=(0,T.useState)(Oa.value);Ma=(0,t.Z)(Ma,2);var Ua=Ma[0],
ib=Ma[1];return(0,O.jsxs)("div",{className:"ProjectName",children:[(0,O.jsx)("label",{className:"ProjectName-label",htmlFor:"filename",children:"".concat(Oa.label).concat(Oa.isNameEditable?"":":")}),Oa.isNameEditable?(0,O.jsx)("input",{type:"text",className:"TextInput",onBlur:function(vb){Oa.ignoreFocus||(0,R.qz)(vb.target);vb=vb.target.value;vb!==Oa.value&&Oa.onChange(vb)},onKeyDown:function(vb){vb.key!==F.tW.ENTER||(vb.preventDefault(),vb.nativeEvent.isComposing||229===vb.keyCode)||vb.currentTarget.blur()},
id:"".concat(Va,"-filename"),value:Ua,onChange:function(vb){return ib(vb.target.value)}}):(0,O.jsx)("span",{className:"TextInput TextInput--readonly",id:"".concat(Va,"-filename"),children:Oa.value})]})},I=b(4289),ia=b(3440),U=(b(3041),b(8557)),Z=b(7041),aa=function(Oa){var Va=Oa.title||("dark"===Oa.value?(0,U.t)("buttons.lightMode"):(0,U.t)("buttons.darkMode"));return(0,O.jsx)(I.V,{type:"icon",icon:Oa.value===Z.C6.LIGHT?W.MOON:W.SUN,title:Va,"aria-label":Va,onClick:function(){return Oa.onChange(Oa.value===
Z.C6.DARK?Z.C6.LIGHT:Z.C6.DARK)},"data-testid":"toggle-dark-mode"})},W={SUN:(0,O.jsx)("svg",{width:"512",height:"512",className:"rtl-mirror",viewBox:"0 0 512 512",children:(0,O.jsx)("path",{fill:"currentColor",d:"M256 160c-52.9 0-96 43.1-96 96s43.1 96 96 96 96-43.1 96-96-43.1-96-96-96zm246.4 80.5l-94.7-47.3 33.5-100.4c4.5-13.6-8.4-26.5-21.9-21.9l-100.4 33.5-47.4-94.8c-6.4-12.8-24.6-12.8-31 0l-47.3 94.7L92.7 70.8c-13.6-4.5-26.5 8.4-21.9 21.9l33.5 100.4-94.7 47.4c-12.8 6.4-12.8 24.6 0 31l94.7 47.3-33.5 100.5c-4.5 13.6 8.4 26.5 21.9 21.9l100.4-33.5 47.3 94.7c6.4 12.8 24.6 12.8 31 0l47.3-94.7 100.4 33.5c13.6 4.5 26.5-8.4 21.9-21.9l-33.5-100.4 94.7-47.3c13-6.5 13-24.7.2-31.1zm-155.9 106c-49.9 49.9-131.1 49.9-181 0-49.9-49.9-49.9-131.1 0-181 49.9-49.9 131.1-49.9 181 0 49.9 49.9 49.9 131.1 0 181z"})}),
MOON:(0,O.jsx)("svg",{width:"512",height:"512",className:"rtl-mirror",viewBox:"0 0 512 512",children:(0,O.jsx)("path",{fill:"currentColor",d:"M283.211 512c78.962 0 151.079-35.925 198.857-94.792 7.068-8.708-.639-21.43-11.562-19.35-124.203 23.654-238.262-71.576-238.262-196.954 0-72.222 38.662-138.635 101.498-174.394 9.686-5.512 7.25-20.197-3.756-22.23A258.156 258.156 0 0 0 283.211 0c-141.309 0-256 114.511-256 256 0 141.309 114.511 256 256 256z"})})},fa=b(2137),X=b(5734),ea=b(8165),pa=function(){var Oa=
(0,v.Z)(f().mark(function vb(Ma,Ua,ib){var yb,Wa,hb,ab,Qa,bb;return f().wrap(function(Pa){for(;;)switch(Pa.prev=Pa.next){case 0:if(Wa=(yb=Ua).exportBackground,hb=yb.viewBackgroundColor,ab=yb.name,Qa=yb.fileHandle,bb=(0,ea.Qk)(Qa),Qa&&(0,ea.DQ)(bb)){Pa.next=4;break}throw Error("fileHandle should exist and should be of type svg or png when resaving");case 4:return Ua=m(m({},Ua),{},{exportEmbedScene:!0}),Pa.next=7,(0,fa.p1)(bb,(0,X.Lm)(Ma),Ua,ib,{exportBackground:Wa,viewBackgroundColor:hb,name:ab,fileHandle:Qa});
case 7:return Pa.abrupt("return",{fileHandle:Qa});case 8:case "end":return Pa.stop()}},vb)}));return function(Ma,Ua,ib){return Oa.apply(this,arguments)}}();g=b(9610);var va=b(4646),ta=b(2739),xa=b(9547),Ga=b(6282),Ia,Ya,Fa,Ka=(0,g.z)({name:"changeProjectName",trackEvent:!1,perform:function(Oa,Va,Ma){return{appState:D(D({},Va),{},{name:Ma}),commitToHistory:!1}},PanelComponent:function(Oa){var Va,Ma=Oa.appState,Ua=Oa.updateData,ib=Oa.appProps;Oa=Oa.data;return(0,O.jsx)(M,{label:(0,U.t)("labels.fileTitle"),
value:Ma.name||"Unnamed",onChange:function(vb){return Ua(vb)},isNameEditable:void 0===ib.name&&!Ma.viewModeEnabled,ignoreFocus:null!==(Va=null==Oa?void 0:Oa.ignoreFocus)&&void 0!==Va&&Va})}}),Ba=(0,g.z)({name:"changeExportScale",trackEvent:{category:"export",action:"scale"},perform:function(Oa,Va,Ma){return{appState:D(D({},Va),{},{exportScale:Ma}),commitToHistory:!1}},PanelComponent:function(Oa){var Va=Oa.appState,Ma=Oa.updateData;Oa=(0,X.Lm)(Oa.elements);var Ua=(0,xa.N)(Oa,Va)?(0,xa.eD)(Oa,Va):Oa;
return(0,O.jsx)(O.Fragment,{children:Z.ZB.map(function(ib){var vb=(0,ta.Cg)(Ua,Z.qy,ib),yb=(0,t.Z)(vb,2);vb=yb[0];yb=yb[1];vb="".concat((0,U.t)("imageExportDialog.label.scale")," ").concat(ib,"x (").concat(vb,"x").concat(yb,")");return(0,O.jsx)(I.V,{size:"small",type:"radio",icon:"".concat(ib,"x"),name:"export-canvas-scale",title:vb,"aria-label":vb,id:"export-canvas-scale",checked:ib===Va.exportScale,onChange:function(){return Ma(ib)}},ib)})})}}),la=(0,g.z)({name:"changeExportBackground",trackEvent:{category:"export",
action:"toggleBackground"},perform:function(Oa,Va,Ma){return{appState:D(D({},Va),{},{exportBackground:Ma}),commitToHistory:!1}},PanelComponent:function(Oa){var Va=Oa.updateData;return(0,O.jsx)(va.o,{checked:Oa.appState.exportBackground,onChange:function(Ma){return Va(Ma)},children:(0,U.t)("imageExportDialog.label.withBackground")})}}),ka=(0,g.z)({name:"changeExportEmbedScene",trackEvent:{category:"export",action:"embedScene"},perform:function(Oa,Va,Ma){return{appState:D(D({},Va),{},{exportEmbedScene:Ma}),
commitToHistory:!1}},PanelComponent:function(Oa){var Va=Oa.updateData;return(0,O.jsxs)(va.o,{checked:Oa.appState.exportEmbedScene,onChange:function(Ma){return Va(Ma)},children:[(0,U.t)("imageExportDialog.label.embedScene"),(0,O.jsx)(ia.u,{label:(0,U.t)("imageExportDialog.tooltip.embedScene"),long:!0,children:(0,O.jsx)("div",{className:"excalidraw-tooltip-icon",children:E.Vl})})]})}}),ua=(0,g.z)({name:"saveToActiveFile",trackEvent:{category:"export"},predicate:function(Oa,Va,Ma,Ua){return!!Ua.props.UIOptions.canvasActions.saveToActiveFile&&
!!Va.fileHandle&&!Va.viewModeEnabled},perform:(Ia=(0,v.Z)(f().mark(function vb(Va,Ma,Ua,ib){var yb,Wa,hb;return f().wrap(function(ab){for(;;)switch(ab.prev=ab.next){case 0:if(yb=!!Ma.fileHandle,ab.prev=1,!(0,ea.g8)(Ma.fileHandle)){ab.next=8;break}return ab.next=5,pa(Va,Ma,ib.files);case 5:ab.t0=ab.sent;ab.next=11;break;case 8:return ab.next=10,(0,fa.Um)(Va,Ma,ib.files);case 10:ab.t0=ab.sent;case 11:return Wa=ab.t0,hb=Wa.fileHandle,ab.abrupt("return",{commitToHistory:!1,appState:D(D({},Ma),{},{fileHandle:hb,
toast:yb?{message:null!=hb&&hb.name?(0,U.t)("toast.fileSavedToFilename").replace("{filename}",'"'.concat(hb.name,'"')):(0,U.t)("toast.fileSaved")}:null})});case 16:return ab.prev=16,ab.t1=ab.catch(1),"AbortError"!==(null===ab.t1||void 0===ab.t1?void 0:ab.t1.name)?console.error(ab.t1):console.warn(ab.t1),ab.abrupt("return",{commitToHistory:!1});case 20:case "end":return ab.stop()}},vb,null,[[1,16]])})),function(Va,Ma,Ua,ib){return Ia.apply(this,arguments)}),keyTest:function(Va){return Va.key===F.tW.S&&
Va[F.tW.CTRL_OR_CMD]&&!Va.shiftKey}}),na=(0,g.z)({name:"saveFileToDisk",viewMode:!0,trackEvent:{category:"export"},perform:(Ya=(0,v.Z)(f().mark(function yb(Ma,Ua,ib,vb){var Wa,hb;return f().wrap(function(ab){for(;;)switch(ab.prev=ab.next){case 0:return ab.prev=0,ab.next=3,(0,fa.Um)(Ma,D(D({},Ua),{},{fileHandle:null}),vb.files);case 3:return Wa=ab.sent,hb=Wa.fileHandle,ab.abrupt("return",{commitToHistory:!1,appState:D(D({},Ua),{},{fileHandle:hb})});case 8:return ab.prev=8,ab.t0=ab.catch(0),"AbortError"!==
(null===ab.t0||void 0===ab.t0?void 0:ab.t0.name)?console.error(ab.t0):console.warn(ab.t0),ab.abrupt("return",{commitToHistory:!1});case 12:case "end":return ab.stop()}},yb,null,[[0,8]])})),function(Ma,Ua,ib,vb){return Ya.apply(this,arguments)}),keyTest:function(Ma){return Ma.key===F.tW.S&&Ma.shiftKey&&Ma[F.tW.CTRL_OR_CMD]},PanelComponent:function(Ma){var Ua=Ma.updateData;return(0,O.jsx)(I.V,{type:"button",icon:E.po,title:(0,U.t)("buttons.saveAs"),"aria-label":(0,U.t)("buttons.saveAs"),showAriaLabel:(0,G.Fy)().isMobile,
hidden:!Ga.kr,onClick:function(){return Ua(null)},"data-testid":"save-as-button"})}}),oa=(0,g.z)({name:"loadScene",trackEvent:{category:"export"},predicate:function(Ma,Ua,ib,vb){return!!vb.props.UIOptions.canvasActions.loadScene&&!Ua.viewModeEnabled},perform:(Fa=(0,v.Z)(f().mark(function Wa(Ua,ib,vb,yb){var hb,ab,Qa,bb;return f().wrap(function(Pa){for(;;)switch(Pa.prev=Pa.next){case 0:return Pa.prev=0,Pa.next=3,(0,fa.n8)(ib,Ua);case 3:return hb=Pa.sent,ab=hb.elements,Qa=hb.appState,bb=hb.files,Pa.abrupt("return",
{elements:ab,appState:Qa,files:bb,commitToHistory:!0});case 10:if(Pa.prev=10,Pa.t0=Pa.catch(0),"AbortError"!==(null===Pa.t0||void 0===Pa.t0?void 0:Pa.t0.name)){Pa.next=15;break}return console.warn(Pa.t0),Pa.abrupt("return",!1);case 15:return Pa.abrupt("return",{elements:Ua,appState:D(D({},ib),{},{errorMessage:Pa.t0.message}),files:yb.files,commitToHistory:!1});case 16:case "end":return Pa.stop()}},Wa,null,[[0,10]])})),function(Ua,ib,vb,yb){return Fa.apply(this,arguments)}),keyTest:function(Ua){return Ua[F.tW.CTRL_OR_CMD]&&
Ua.key===F.tW.O}}),La=(0,g.z)({name:"exportWithDarkMode",trackEvent:{category:"export",action:"toggleTheme"},perform:function(Ua,ib,vb){return{appState:D(D({},ib),{},{exportWithDarkMode:vb}),commitToHistory:!1}},PanelComponent:function(Ua){var ib=Ua.updateData;return(0,O.jsx)("div",{style:{display:"flex",justifyContent:"flex-end",marginTop:"-45px",marginBottom:"10px"},children:(0,O.jsx)(aa,{value:Ua.appState.exportWithDarkMode?Z.C6.DARK:Z.C6.LIGHT,onChange:function(vb){ib(vb===Z.C6.DARK)},title:(0,U.t)("imageExportDialog.label.darkMode")})})}})},
650:function(g,h,b){function l(la,ka){var ua=Object.keys(la);if(Object.getOwnPropertySymbols){var na=Object.getOwnPropertySymbols(la);ka&&(na=na.filter(function(oa){return Object.getOwnPropertyDescriptor(la,oa).enumerable}));ua.push.apply(ua,na)}return ua}function m(la){for(var ka=1;ka<arguments.length;ka++){var ua=null!=arguments[ka]?arguments[ka]:{};ka%2?l(Object(ua),!0).forEach(function(na){(0,f.Z)(la,na,ua[na])}):Object.getOwnPropertyDescriptors?Object.defineProperties(la,Object.getOwnPropertyDescriptors(ua)):
l(Object(ua)).forEach(function(na){Object.defineProperty(la,na,Object.getOwnPropertyDescriptor(ua,na))})}return la}function p(la){var ka=la.options,ua=la.value,na=la.label,oa=la.onChange,La=la.onClose,Oa=T().useRef(),Va=T().useRef(),Ma=T().useRef(null);T().useEffect(function(){Va.current?Va.current.focus():Ma.current&&Ma.current.focus()},[]);return(0,V.jsx)("div",{className:"picker",role:"dialog","aria-modal":"true","aria-label":na,onKeyDown:function(Ua){var ib=ka.find(function(hb){return hb.keyBinding===
Ua.key.toLowerCase()});if(Ua.metaKey||Ua.altKey||Ua.ctrlKey||!ib)if(Ua.key===U.tW.TAB)setTimeout(function(){Va.current!==document.activeElement&&La()},0);else if((0,U.Wl)(Ua.key)){var vb=document.activeElement;ib=(0,Z.G3)().rtl;vb=Array.prototype.indexOf.call(Ma.current.children,vb);if(-1!==vb){var yb=ka.length,Wa=vb;switch(Ua.key){case ib?U.tW.ARROW_LEFT:U.tW.ARROW_RIGHT:case U.tW.ARROW_DOWN:Wa=(vb+1)%yb;break;case ib?U.tW.ARROW_RIGHT:U.tW.ARROW_LEFT:case U.tW.ARROW_UP:Wa=(yb+vb-1)%yb}Ma.current.children[Wa].focus()}Ua.preventDefault()}else Ua.key!==
U.tW.ESCAPE&&Ua.key!==U.tW.ENTER||(Ua.preventDefault(),La());else ib=ka.indexOf(ib),Ma.current.children[ib].focus(),Ua.preventDefault();Ua.nativeEvent.stopImmediatePropagation();Ua.stopPropagation()},children:(0,V.jsx)("div",{className:"picker-content",ref:Ma,children:ka.map(function(Ua,ib){return(0,V.jsxs)("button",{className:(0,J.Z)("picker-option",{active:ua===Ua.value}),onClick:function(vb){vb.currentTarget.focus();oa(Ua.value)},title:"".concat(Ua.text," — ").concat(Ua.keyBinding.toUpperCase()),
"aria-label":Ua.text||"none","aria-keyshortcuts":Ua.keyBinding,ref:function(vb){vb&&0===ib&&(Oa.current=vb);vb&&Ua.value===ua&&(Va.current=vb)},onFocus:function(){oa(Ua.value)},children:[Ua.icon,(0,V.jsx)("span",{className:"picker-keybinding",children:Ua.keyBinding})]},Ua.text)})})})}function D(la){var ka,ua=la.value,na=la.label,oa=la.options,La=la.onChange;la=la.group;la=void 0===la?"":la;var Oa=T().useState(!1);Oa=(0,L.Z)(Oa,2);var Va=Oa[0],Ma=Oa[1],Ua=T().useRef(null);Oa=(0,Z.G3)().rtl;return(0,V.jsxs)("div",
{children:[(0,V.jsx)("button",{name:la,className:Va?"active":"","aria-label":na,onClick:function(){return Ma(!Va)},ref:Ua,children:null===(ka=oa.find(function(ib){return ib.value===ua}))||void 0===ka?void 0:ka.icon}),(0,V.jsx)(T().Suspense,{fallback:"",children:Va?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(R.J,m(m({onCloseRequest:function(ib){return ib.target!==Ua.current&&Ma(!1)}},Oa?{right:5.5}:{left:-5.5}),{},{children:(0,V.jsx)(p,{options:oa,value:ua,label:na,onChange:La,onClose:function(){var ib;
Ma(!1);null===(ib=Ua.current)||void 0===ib||ib.focus()}})})),(0,V.jsx)("div",{className:"picker-triangle"})]}):null})]})}function v(la,ka){var ua=Object.keys(la);if(Object.getOwnPropertySymbols){var na=Object.getOwnPropertySymbols(la);ka&&(na=na.filter(function(oa){return Object.getOwnPropertyDescriptor(la,oa).enumerable}));ua.push.apply(ua,na)}return ua}function t(la){for(var ka=1;ka<arguments.length;ka++){var ua=null!=arguments[ka]?arguments[ka]:{};ka%2?v(Object(ua),!0).forEach(function(na){(0,f.Z)(la,
na,ua[na])}):Object.getOwnPropertyDescriptors?Object.defineProperties(la,Object.getOwnPropertyDescriptors(ua)):v(Object(ua)).forEach(function(na){Object.defineProperty(la,na,Object.getOwnPropertyDescriptor(ua,na))})}return la}b.d(h,{Tu:function(){return Ka},Zq:function(){return Ba}});var r=b(1930),f=b(7169),E=b(8127),B=b(5435),J=b(45),V=b(4512),H=function(la){return(0,V.jsx)("div",{className:"buttonList buttonListIcon",children:la.options.map(function(ka){var ua;return"button"===la.type?(0,V.jsx)("button",
{onClick:function(na){return la.onClick(ka.value,na)},className:(0,J.Z)({active:null!==(ua=ka.active)&&void 0!==ua?ua:la.value===ka.value}),"data-testid":ka.testId,title:ka.text,children:ka.icon},ka.text):(0,V.jsxs)("label",{className:(0,J.Z)({active:la.value===ka.value}),title:ka.text,children:[(0,V.jsx)("input",{type:"radio",name:la.group,onChange:function(){return la.onChange(ka.value)},checked:la.value===ka.value,"data-testid":ka.testId}),ka.icon]},ka.text)})})},S=b(6310),L=b(2577);g=b(9787);
var T=b.n(g),R=b(8584);g=b(3379);g=b.n(g);h=b(7795);h=b.n(h);var G=b(569);G=b.n(G);var F=b(3565);F=b.n(F);var O=b(9216);O=b.n(O);var M=b(4589);M=b.n(M);var I=b(9478),ia={};ia.styleTagTransform=M();ia.setAttributes=F();ia.insert=G().bind(null,"head");ia.domAPI=h();ia.insertStyleElement=O();g()(I.Z,ia);I.Z&&I.Z.locals&&I.Z.locals;var U=b(6331),Z=b(8557),aa=b(1119),W=b(7041),fa=b(5734),X=b(7729),ea=b(554),pa=b(9472),va=b(5236),ta=b(9547),xa=b(7786),Ga=b(7135);b=b(9610);var Ia=function(la,ka,ua){var na=
(0,Ga.xn)((0,ta.eD)(la,ka,{includeBoundTextElement:3<arguments.length&&void 0!==arguments[3]&&arguments[3]}));return la.map(function(oa){var La;return na.get(oa.id)||oa.id===(null===(La=ka.editingElement)||void 0===La?void 0:La.id)?ua(oa):oa})},Ya=function(la,ka,ua,na){var oa,La,Oa=ka.editingElement;la=(0,fa.Lm)(la);return null!==(oa=null!==(La=Oa&&ua(Oa))&&void 0!==La?La:(0,ta.N)(la,ka)?(0,ta.PR)(la,ka,ua):na)&&void 0!==oa?oa:na},Fa=function(la,ka,ua,na){var oa=new Set;return{elements:Ia(la,ka,function(La){if((0,fa.iB)(La)){var Oa=
ua(La);oa.add(Oa);Oa=(0,X.BE)(La,{fontSize:Oa});return(0,fa.oN)(Oa,(0,ea.tl)(La)),Va=La,Ma=Oa,(0,pa.Xh)(Ma)?Ma:(0,X.DR)(Ma,{x:"left"===Va.textAlign?Va.x:Va.x+(Va.width-Ma.width)/("center"===Va.textAlign?2:1),y:Va.y+(Va.height-Ma.height)/2},!1)}var Va,Ma;return La},!0),appState:t(t({},ka),{},{currentItemFontSize:1===oa.size?(0,r.Z)(oa)[0]:null!=na?na:ka.currentItemFontSize}),commitToHistory:!0}},Ka=((0,b.z)({name:"changeStrokeColor",trackEvent:!1,perform:function(la,ka,ua){return t(t({},ua.currentItemStrokeColor&&
{elements:Ia(la,ka,function(na){return(0,xa.PD)(na.type)?(0,X.BE)(na,{strokeColor:ua.currentItemStrokeColor}):na},!0)}),{},{appState:t(t({},ka),ua),commitToHistory:!!ua.currentItemStrokeColor})},PanelComponent:function(la){var ka=la.elements,ua=la.appState,na=la.updateData;la.appProps;return(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)("h3",{"aria-hidden":"true",children:(0,Z.t)("labels.stroke")}),(0,V.jsx)(S.z,{topPicks:E.fY,palette:E.Wk,type:"elementStroke",label:(0,Z.t)("labels.stroke"),color:Ya(ka,
ua,function(oa){return oa.strokeColor},ua.currentItemStrokeColor),onChange:function(oa){return na({currentItemStrokeColor:oa})},elements:ka,appState:ua,updateData:na})]})}}),(0,b.z)({name:"changeBackgroundColor",trackEvent:!1,perform:function(la,ka,ua){return t(t({},ua.currentItemBackgroundColor&&{elements:Ia(la,ka,function(na){return(0,X.BE)(na,{backgroundColor:ua.currentItemBackgroundColor})})}),{},{appState:t(t({},ka),ua),commitToHistory:!!ua.currentItemBackgroundColor})},PanelComponent:function(la){var ka=
la.elements,ua=la.appState,na=la.updateData;la.appProps;return(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)("h3",{"aria-hidden":"true",children:(0,Z.t)("labels.background")}),(0,V.jsx)(S.z,{topPicks:E.eq,palette:E.SF,type:"elementBackground",label:(0,Z.t)("labels.background"),color:Ya(ka,ua,function(oa){return oa.backgroundColor},ua.currentItemBackgroundColor),onChange:function(oa){return na({currentItemBackgroundColor:oa})},elements:ka,appState:ua,updateData:na})]})}}),(0,b.z)({name:"changeFillStyle",
trackEvent:!1,perform:function(la,ka,ua,na){return(0,B.L)("element","changeFillStyle","".concat(ua," (").concat(na.device.isMobile?"mobile":"desktop",")")),{elements:Ia(la,ka,function(oa){return(0,X.BE)(oa,{fillStyle:ua})}),appState:t(t({},ka),{},{currentItemFillStyle:ua}),commitToHistory:!0}},PanelComponent:function(la){var ka=la.elements,ua=la.appState,na=la.updateData,oa=(0,ta.eD)(ka,ua);la=0<oa.length&&oa.every(function(La){return"zigzag"===La.fillStyle});return(0,V.jsxs)("fieldset",{children:[(0,V.jsx)("legend",
{children:(0,Z.t)("labels.fill")}),(0,V.jsx)(H,{type:"button",options:[{value:"hachure",text:"".concat(la?(0,Z.t)("labels.zigzag"):(0,Z.t)("labels.hachure")," (").concat((0,Ga.uY)("Alt-Click"),")"),icon:la?aa.lF:aa.a0,active:!!la||void 0},{value:"cross-hatch",text:(0,Z.t)("labels.crossHatch"),icon:aa.np},{value:"solid",text:(0,Z.t)("labels.solid"),icon:aa.X7}],value:Ya(ka,ua,function(La){return La.fillStyle},ua.currentItemFillStyle),onClick:function(La,Oa){La=Oa.altKey&&"hachure"===La&&oa.every(function(Va){return"hachure"===
Va.fillStyle})?"zigzag":La;na(La)}})]})}}),(0,b.z)({name:"changeStrokeWidth",trackEvent:!1,perform:function(la,ka,ua){return{elements:Ia(la,ka,function(na){return(0,X.BE)(na,{strokeWidth:ua})}),appState:t(t({},ka),{},{currentItemStrokeWidth:ua}),commitToHistory:!0}},PanelComponent:function(la){var ka=la.elements,ua=la.appState,na=la.updateData;return(0,V.jsxs)("fieldset",{children:[(0,V.jsx)("legend",{children:(0,Z.t)("labels.strokeWidth")}),(0,V.jsx)(H,{group:"stroke-width",options:[{value:1,text:(0,Z.t)("labels.thin"),
icon:aa.ZA},{value:2,text:(0,Z.t)("labels.bold"),icon:aa.Wl},{value:4,text:(0,Z.t)("labels.extraBold"),icon:aa.m9}],value:Ya(ka,ua,function(oa){return oa.strokeWidth},ua.currentItemStrokeWidth),onChange:function(oa){return na(oa)}})]})}}),(0,b.z)({name:"changeSloppiness",trackEvent:!1,perform:function(la,ka,ua){return{elements:Ia(la,ka,function(na){return(0,X.BE)(na,{seed:(0,va.LU)(),roughness:ua})}),appState:t(t({},ka),{},{currentItemRoughness:ua}),commitToHistory:!0}},PanelComponent:function(la){var ka=
la.elements,ua=la.appState,na=la.updateData;return(0,V.jsxs)("fieldset",{children:[(0,V.jsx)("legend",{children:(0,Z.t)("labels.sloppiness")}),(0,V.jsx)(H,{group:"sloppiness",options:[{value:0,text:(0,Z.t)("labels.architect"),icon:aa.bf},{value:1,text:(0,Z.t)("labels.artist"),icon:aa.kM},{value:2,text:(0,Z.t)("labels.cartoonist"),icon:aa.W2}],value:Ya(ka,ua,function(oa){return oa.roughness},ua.currentItemRoughness),onChange:function(oa){return na(oa)}})]})}}),(0,b.z)({name:"changeStrokeStyle",trackEvent:!1,
perform:function(la,ka,ua){return{elements:Ia(la,ka,function(na){return(0,X.BE)(na,{strokeStyle:ua})}),appState:t(t({},ka),{},{currentItemStrokeStyle:ua}),commitToHistory:!0}},PanelComponent:function(la){var ka=la.elements,ua=la.appState,na=la.updateData;return(0,V.jsxs)("fieldset",{children:[(0,V.jsx)("legend",{children:(0,Z.t)("labels.strokeStyle")}),(0,V.jsx)(H,{group:"strokeStyle",options:[{value:"solid",text:(0,Z.t)("labels.strokeStyle_solid"),icon:aa.ZA},{value:"dashed",text:(0,Z.t)("labels.strokeStyle_dashed"),
icon:aa.a5},{value:"dotted",text:(0,Z.t)("labels.strokeStyle_dotted"),icon:aa.aT}],value:Ya(ka,ua,function(oa){return oa.strokeStyle},ua.currentItemStrokeStyle),onChange:function(oa){return na(oa)}})]})}}),(0,b.z)({name:"changeOpacity",trackEvent:!1,perform:function(la,ka,ua){return{elements:Ia(la,ka,function(na){return(0,X.BE)(na,{opacity:ua})},!0),appState:t(t({},ka),{},{currentItemOpacity:ua}),commitToHistory:!0}},PanelComponent:function(la){var ka,ua=la.elements,na=la.appState,oa=la.updateData;
return(0,V.jsxs)("label",{className:"control-label",children:[(0,Z.t)("labels.opacity"),(0,V.jsx)("input",{type:"range",min:"0",max:"100",step:"10",onChange:function(La){return oa(+La.target.value)},value:null!==(ka=Ya(ua,na,function(La){return La.opacity},na.currentItemOpacity))&&void 0!==ka?ka:void 0})]})}}),(0,b.z)({name:"changeFontSize",trackEvent:!1,perform:function(la,ka,ua){return Fa(la,ka,function(){return ua},ua)},PanelComponent:function(la){var ka=la.elements,ua=la.appState,na=la.updateData;
return(0,V.jsxs)("fieldset",{children:[(0,V.jsx)("legend",{children:(0,Z.t)("labels.fontSize")}),(0,V.jsx)(H,{group:"font-size",options:[{value:16,text:(0,Z.t)("labels.small"),icon:aa.q0,testId:"fontSize-small"},{value:20,text:(0,Z.t)("labels.medium"),icon:aa.nq,testId:"fontSize-medium"},{value:28,text:(0,Z.t)("labels.large"),icon:aa.tW,testId:"fontSize-large"},{value:36,text:(0,Z.t)("labels.veryLarge"),icon:aa.OA,testId:"fontSize-veryLarge"}],value:Ya(ka,ua,function(oa){return(0,fa.iB)(oa)?oa.fontSize:
(oa=(0,ea.WJ)(oa))?oa.fontSize:null},ua.currentItemFontSize||W.n5),onChange:function(oa){return na(oa)}})]})}}),(0,b.z)({name:"decreaseFontSize",trackEvent:!1,perform:function(la,ka,ua){return Fa(la,ka,function(na){return Math.round(1/1.1*na.fontSize)})},keyTest:function(la){return la[U.tW.CTRL_OR_CMD]&&la.shiftKey&&(la.key===U.tW.CHEVRON_LEFT||la.key===U.tW.COMMA)}})),Ba=(0,b.z)({name:"increaseFontSize",trackEvent:!1,perform:function(la,ka,ua){return Fa(la,ka,function(na){return Math.round(1.1*na.fontSize)})},
keyTest:function(la){return la[U.tW.CTRL_OR_CMD]&&la.shiftKey&&(la.key===U.tW.CHEVRON_RIGHT||la.key===U.tW.PERIOD)}});(0,b.z)({name:"changeFontFamily",trackEvent:!1,perform:function(la,ka,ua){return{elements:Ia(la,ka,function(na){if((0,fa.iB)(na)){var oa=(0,X.BE)(na,{fontFamily:ua,lineHeight:(0,ea.PT)(ua)});return(0,fa.oN)(oa,(0,ea.tl)(na)),oa}return na},!0),appState:t(t({},ka),{},{currentItemFontFamily:ua}),commitToHistory:!0}},PanelComponent:function(la){var ka=la.elements,ua=la.appState,na=la.updateData;
la=[{value:W.ut.Virgil,text:(0,Z.t)("labels.handDrawn"),icon:aa.Pm},{value:W.ut.Helvetica,text:(0,Z.t)("labels.normal"),icon:aa.vo},{value:W.ut.Cascadia,text:(0,Z.t)("labels.code"),icon:aa.z6}];return(0,V.jsxs)("fieldset",{children:[(0,V.jsx)("legend",{children:(0,Z.t)("labels.fontFamily")}),(0,V.jsx)(H,{group:"font-family",options:la,value:Ya(ka,ua,function(oa){return(0,fa.iB)(oa)?oa.fontFamily:(oa=(0,ea.WJ)(oa))?oa.fontFamily:null},ua.currentItemFontFamily||W.rk),onChange:function(oa){return na(oa)}})]})}});
(0,b.z)({name:"changeTextAlign",trackEvent:!1,perform:function(la,ka,ua){return{elements:Ia(la,ka,function(na){if((0,fa.iB)(na)){var oa=(0,X.BE)(na,{textAlign:ua});return(0,fa.oN)(oa,(0,ea.tl)(na)),oa}return na},!0),appState:t(t({},ka),{},{currentItemTextAlign:ua}),commitToHistory:!0}},PanelComponent:function(la){var ka=la.elements,ua=la.appState,na=la.updateData;return(0,V.jsxs)("fieldset",{children:[(0,V.jsx)("legend",{children:(0,Z.t)("labels.textAlign")}),(0,V.jsx)(H,{group:"text-align",options:[{value:"left",
text:(0,Z.t)("labels.left"),icon:aa.rr,testId:"align-left"},{value:"center",text:(0,Z.t)("labels.center"),icon:aa.o3,testId:"align-horizontal-center"},{value:"right",text:(0,Z.t)("labels.right"),icon:aa.oT,testId:"align-right"}],value:Ya(ka,ua,function(oa){return(0,fa.iB)(oa)?oa.textAlign:(oa=(0,ea.WJ)(oa))?oa.textAlign:null},ua.currentItemTextAlign),onChange:function(oa){return na(oa)}})]})}});(0,b.z)({name:"changeVerticalAlign",trackEvent:{category:"element"},perform:function(la,ka,ua){return{elements:Ia(la,
ka,function(na){if((0,fa.iB)(na)){var oa=(0,X.BE)(na,{verticalAlign:ua});return(0,fa.oN)(oa,(0,ea.tl)(na)),oa}return na},!0),appState:t({},ka),commitToHistory:!0}},PanelComponent:function(la){var ka=la.elements,ua=la.appState,na=la.updateData;return(0,V.jsx)("fieldset",{children:(0,V.jsx)(H,{group:"text-align",options:[{value:W.oX.TOP,text:(0,Z.t)("labels.alignTop"),icon:(0,V.jsx)(aa.EO,{theme:ua.theme}),testId:"align-top"},{value:W.oX.MIDDLE,text:(0,Z.t)("labels.centerVertically"),icon:(0,V.jsx)(aa.P7,
{theme:ua.theme}),testId:"align-middle"},{value:W.oX.BOTTOM,text:(0,Z.t)("labels.alignBottom"),icon:(0,V.jsx)(aa.aA,{theme:ua.theme}),testId:"align-bottom"}],value:Ya(ka,ua,function(oa){return(0,fa.iB)(oa)&&oa.containerId?oa.verticalAlign:(oa=(0,ea.WJ)(oa))?oa.verticalAlign:null},W.oX.MIDDLE),onChange:function(oa){return na(oa)}})})}});(0,b.z)({name:"changeRoundness",trackEvent:!1,perform:function(la,ka,ua){return{elements:Ia(la,ka,function(na){return(0,X.BE)(na,{roundness:"round"===ua?{type:(0,pa.QI)(na.type)?
W.a6.ADAPTIVE_RADIUS:W.a6.PROPORTIONAL_RADIUS}:null})}),appState:t(t({},ka),{},{currentItemRoundness:ua}),commitToHistory:!0}},PanelComponent:function(la){var ka=la.elements,ua=la.appState,na=la.updateData,oa=(0,ta.Zs)((0,fa.Lm)(ka),ua).some(function(La){var Oa;return(null===(Oa=La.roundness)||void 0===Oa?void 0:Oa.type)===W.a6.LEGACY});return(0,V.jsxs)("fieldset",{children:[(0,V.jsx)("legend",{children:(0,Z.t)("labels.edges")}),(0,V.jsx)(H,{group:"edges",options:[{value:"sharp",text:(0,Z.t)("labels.sharp"),
icon:aa.wr},{value:"round",text:(0,Z.t)("labels.round"),icon:aa.DS}],value:Ya(ka,ua,function(La){return oa?null:La.roundness?"round":"sharp"},(0,ta.sh)(ua.activeTool.type)&&ua.currentItemRoundness||null),onChange:function(La){return na(La)}})]})}});(0,b.z)({name:"changeArrowhead",trackEvent:!1,perform:function(la,ka,ua){return{elements:Ia(la,ka,function(na){if((0,pa.bt)(na)){var oa=ua.position,La=ua.type;if("start"===oa)return(0,X.BE)(na,{startArrowhead:La});if("end"===oa)return(0,X.BE)(na,{endArrowhead:La})}return na}),
appState:t(t({},ka),{},(0,f.Z)({},"start"===ua.position?"currentItemStartArrowhead":"currentItemEndArrowhead",ua.type)),commitToHistory:!0}},PanelComponent:function(la){var ka=la.elements,ua=la.appState,na=la.updateData;la=(0,Z.G3)().rtl;return(0,V.jsxs)("fieldset",{children:[(0,V.jsx)("legend",{children:(0,Z.t)("labels.arrowheads")}),(0,V.jsxs)("div",{className:"iconSelectList buttonList",children:[(0,V.jsx)(D,{label:"arrowhead_start",options:[{value:null,text:(0,Z.t)("labels.arrowhead_none"),icon:aa.fr,
keyBinding:"q"},{value:"arrow",text:(0,Z.t)("labels.arrowhead_arrow"),icon:(0,V.jsx)(aa.il,{flip:!la}),keyBinding:"w"},{value:"bar",text:(0,Z.t)("labels.arrowhead_bar"),icon:(0,V.jsx)(aa.m,{flip:!la}),keyBinding:"e"},{value:"dot",text:(0,Z.t)("labels.arrowhead_dot"),icon:(0,V.jsx)(aa.tn,{flip:!la}),keyBinding:"r"},{value:"triangle",text:(0,Z.t)("labels.arrowhead_triangle"),icon:(0,V.jsx)(aa.j8,{flip:!la}),keyBinding:"t"}],value:Ya(ka,ua,function(oa){return(0,pa.bt)(oa)&&(0,ta.Un)(oa.type)?oa.startArrowhead:
ua.currentItemStartArrowhead},ua.currentItemStartArrowhead),onChange:function(oa){return na({position:"start",type:oa})}}),(0,V.jsx)(D,{label:"arrowhead_end",group:"arrowheads",options:[{value:null,text:(0,Z.t)("labels.arrowhead_none"),keyBinding:"q",icon:aa.fr},{value:"arrow",text:(0,Z.t)("labels.arrowhead_arrow"),keyBinding:"w",icon:(0,V.jsx)(aa.il,{flip:la})},{value:"bar",text:(0,Z.t)("labels.arrowhead_bar"),keyBinding:"e",icon:(0,V.jsx)(aa.m,{flip:la})},{value:"dot",text:(0,Z.t)("labels.arrowhead_dot"),
keyBinding:"r",icon:(0,V.jsx)(aa.tn,{flip:la})},{value:"triangle",text:(0,Z.t)("labels.arrowhead_triangle"),icon:(0,V.jsx)(aa.j8,{flip:la}),keyBinding:"t"}],value:Ya(ka,ua,function(oa){return(0,pa.bt)(oa)&&(0,ta.Un)(oa.type)?oa.endArrowhead:ua.currentItemEndArrowhead},ua.currentItemEndArrowhead),onChange:function(oa){return na({position:"end",type:oa})}})]})]})}})},3218:function(g,h,b){function l(t,r){var f=Object.keys(t);if(Object.getOwnPropertySymbols){var E=Object.getOwnPropertySymbols(t);r&&(E=
E.filter(function(B){return Object.getOwnPropertyDescriptor(t,B).enumerable}));f.push.apply(f,E)}return f}function m(t){for(var r=1;r<arguments.length;r++){var f=null!=arguments[r]?arguments[r]:{};r%2?l(Object(f),!0).forEach(function(E){(0,p.Z)(t,E,f[E])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(f)):l(Object(f)).forEach(function(E){Object.defineProperty(t,E,Object.getOwnPropertyDescriptor(f,E))})}return t}b.d(h,{u:function(){return v}});var p=b(7169);
g=b(9610);var D=b(6331),v=(0,g.z)({name:"stats",viewMode:!0,trackEvent:{category:"menu"},perform:function(t,r){return{appState:m(m({},r),{},{showStats:!this.checked(r)}),commitToHistory:!1}},checked:function(t){return t.showStats},contextItemLabel:"stats.title",keyTest:function(t){return!t[D.tW.CTRL_OR_CMD]&&t.altKey&&t.code===D.aU.SLASH}})},7903:function(g,h,b){function l(Ab,ec){var vc=Object.keys(Ab);if(Object.getOwnPropertySymbols){var Xa=Object.getOwnPropertySymbols(Ab);ec&&(Xa=Xa.filter(function(sa){return Object.getOwnPropertyDescriptor(Ab,
sa).enumerable}));vc.push.apply(vc,Xa)}return vc}function m(Ab){for(var ec=1;ec<arguments.length;ec++){var vc=null!=arguments[ec]?arguments[ec]:{};ec%2?l(Object(vc),!0).forEach(function(Xa){(0,Va.Z)(Ab,Xa,vc[Xa])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Ab,Object.getOwnPropertyDescriptors(vc)):l(Object(vc)).forEach(function(Xa){Object.defineProperty(Ab,Xa,Object.getOwnPropertyDescriptor(vc,Xa))})}return Ab}function p(Ab,ec){var vc="undefined"!=typeof Symbol&&Ab[Symbol.iterator]||
Ab["@@iterator"];if(!vc){if(Array.isArray(Ab)||(vc=function(Ta,wb){if(Ta){if("string"==typeof Ta)return D(Ta,wb);var ac=Object.prototype.toString.call(Ta).slice(8,-1);"Object"===ac&&Ta.constructor&&(ac=Ta.constructor.name);if("Map"===ac||"Set"===ac)return Array.from(Ta);if("Arguments"===ac||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ac))return D(Ta,wb)}}(Ab))||ec&&Ab&&"number"==typeof Ab.length){vc&&(Ab=vc);var Xa=0;ec=function(){};return{s:ec,n:function(){return Xa>=Ab.length?{done:!0}:{done:!1,
value:Ab[Xa++]}},e:function(Ta){throw Ta;},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 sa,qa=!0,Da=!1;return{s:function(){vc=vc.call(Ab)},n:function(){var Ta=vc.next();return qa=Ta.done,Ta},e:function(Ta){Da=!0;sa=Ta},f:function(){try{qa||null==vc.return||vc.return()}finally{if(Da)throw sa;}}}}function D(Ab,ec){(null==ec||ec>Ab.length)&&(ec=Ab.length);for(var vc=0,Xa=Array(ec);vc<
ec;vc++)Xa[vc]=Ab[vc];return Xa}function v(Ab,ec){var vc="undefined"!=typeof Symbol&&Ab[Symbol.iterator]||Ab["@@iterator"];if(!vc){if(Array.isArray(Ab)||(vc=function(Ta,wb){if(Ta){if("string"==typeof Ta)return t(Ta,wb);var ac=Object.prototype.toString.call(Ta).slice(8,-1);"Object"===ac&&Ta.constructor&&(ac=Ta.constructor.name);if("Map"===ac||"Set"===ac)return Array.from(Ta);if("Arguments"===ac||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ac))return t(Ta,wb)}}(Ab))||ec&&Ab&&"number"==typeof Ab.length){vc&&
(Ab=vc);var Xa=0;ec=function(){};return{s:ec,n:function(){return Xa>=Ab.length?{done:!0}:{done:!1,value:Ab[Xa++]}},e:function(Ta){throw Ta;},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 sa,qa=!0,Da=!1;return{s:function(){vc=vc.call(Ab)},n:function(){var Ta=vc.next();return qa=Ta.done,Ta},e:function(Ta){Da=!0;sa=Ta},f:function(){try{qa||null==vc.return||vc.return()}finally{if(Da)throw sa;
}}}}function t(Ab,ec){(null==ec||ec>Ab.length)&&(ec=Ab.length);for(var vc=0,Xa=Array(ec);vc<ec;vc++)Xa[vc]=Ab[vc];return Xa}function r(Ab,ec){var vc=Object.keys(Ab);if(Object.getOwnPropertySymbols){var Xa=Object.getOwnPropertySymbols(Ab);ec&&(Xa=Xa.filter(function(sa){return Object.getOwnPropertyDescriptor(Ab,sa).enumerable}));vc.push.apply(vc,Xa)}return vc}function f(Ab){for(var ec=1;ec<arguments.length;ec++){var vc=null!=arguments[ec]?arguments[ec]:{};ec%2?r(Object(vc),!0).forEach(function(Xa){(0,Va.Z)(Ab,
Xa,vc[Xa])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Ab,Object.getOwnPropertyDescriptors(vc)):r(Object(vc)).forEach(function(Xa){Object.defineProperty(Ab,Xa,Object.getOwnPropertyDescriptor(vc,Xa))})}return Ab}function E(Ab,ec){var vc=Object.keys(Ab);if(Object.getOwnPropertySymbols){var Xa=Object.getOwnPropertySymbols(Ab);ec&&(Xa=Xa.filter(function(sa){return Object.getOwnPropertyDescriptor(Ab,sa).enumerable}));vc.push.apply(vc,Xa)}return vc}function B(Ab){for(var ec=1;ec<arguments.length;ec++){var vc=
null!=arguments[ec]?arguments[ec]:{};ec%2?E(Object(vc),!0).forEach(function(Xa){(0,Va.Z)(Ab,Xa,vc[Xa])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Ab,Object.getOwnPropertyDescriptors(vc)):E(Object(vc)).forEach(function(Xa){Object.defineProperty(Ab,Xa,Object.getOwnPropertyDescriptor(vc,Xa))})}return Ab}function J(Ab,ec){var vc=Object.keys(Ab);if(Object.getOwnPropertySymbols){var Xa=Object.getOwnPropertySymbols(Ab);ec&&(Xa=Xa.filter(function(sa){return Object.getOwnPropertyDescriptor(Ab,
sa).enumerable}));vc.push.apply(vc,Xa)}return vc}function V(Ab){for(var ec=1;ec<arguments.length;ec++){var vc=null!=arguments[ec]?arguments[ec]:{};ec%2?J(Object(vc),!0).forEach(function(Xa){(0,Va.Z)(Ab,Xa,vc[Xa])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Ab,Object.getOwnPropertyDescriptors(vc)):J(Object(vc)).forEach(function(Xa){Object.defineProperty(Ab,Xa,Object.getOwnPropertyDescriptor(vc,Xa))})}return Ab}function H(Ab,ec){var vc=Object.keys(Ab);if(Object.getOwnPropertySymbols){var Xa=
Object.getOwnPropertySymbols(Ab);ec&&(Xa=Xa.filter(function(sa){return Object.getOwnPropertyDescriptor(Ab,sa).enumerable}));vc.push.apply(vc,Xa)}return vc}function S(Ab){for(var ec=1;ec<arguments.length;ec++){var vc=null!=arguments[ec]?arguments[ec]:{};ec%2?H(Object(vc),!0).forEach(function(Xa){(0,Va.Z)(Ab,Xa,vc[Xa])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Ab,Object.getOwnPropertyDescriptors(vc)):H(Object(vc)).forEach(function(Xa){Object.defineProperty(Ab,Xa,Object.getOwnPropertyDescriptor(vc,
Xa))})}return Ab}function L(Ab,ec){var vc=Object.keys(Ab);if(Object.getOwnPropertySymbols){var Xa=Object.getOwnPropertySymbols(Ab);ec&&(Xa=Xa.filter(function(sa){return Object.getOwnPropertyDescriptor(Ab,sa).enumerable}));vc.push.apply(vc,Xa)}return vc}function T(Ab){for(var ec=1;ec<arguments.length;ec++){var vc=null!=arguments[ec]?arguments[ec]:{};ec%2?L(Object(vc),!0).forEach(function(Xa){(0,Va.Z)(Ab,Xa,vc[Xa])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Ab,Object.getOwnPropertyDescriptors(vc)):
L(Object(vc)).forEach(function(Xa){Object.defineProperty(Ab,Xa,Object.getOwnPropertyDescriptor(vc,Xa))})}return Ab}function R(Ab,ec){var vc="undefined"!=typeof Symbol&&Ab[Symbol.iterator]||Ab["@@iterator"];if(!vc){if(Array.isArray(Ab)||(vc=function(Ta,wb){if(Ta){if("string"==typeof Ta)return G(Ta,wb);var ac=Object.prototype.toString.call(Ta).slice(8,-1);"Object"===ac&&Ta.constructor&&(ac=Ta.constructor.name);if("Map"===ac||"Set"===ac)return Array.from(Ta);if("Arguments"===ac||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ac))return G(Ta,
wb)}}(Ab))||ec&&Ab&&"number"==typeof Ab.length){vc&&(Ab=vc);var Xa=0;ec=function(){};return{s:ec,n:function(){return Xa>=Ab.length?{done:!0}:{done:!1,value:Ab[Xa++]}},e:function(Ta){throw Ta;},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 sa,qa=!0,Da=!1;return{s:function(){vc=vc.call(Ab)},n:function(){var Ta=vc.next();return qa=Ta.done,Ta},e:function(Ta){Da=!0;sa=Ta},f:function(){try{qa||
null==vc.return||vc.return()}finally{if(Da)throw sa;}}}}function G(Ab,ec){(null==ec||ec>Ab.length)&&(ec=Ab.length);for(var vc=0,Xa=Array(ec);vc<ec;vc++)Xa[vc]=Ab[vc];return Xa}function F(Ab,ec){var vc=Object.keys(Ab);if(Object.getOwnPropertySymbols){var Xa=Object.getOwnPropertySymbols(Ab);ec&&(Xa=Xa.filter(function(sa){return Object.getOwnPropertyDescriptor(Ab,sa).enumerable}));vc.push.apply(vc,Xa)}return vc}function O(Ab){for(var ec=1;ec<arguments.length;ec++){var vc=null!=arguments[ec]?arguments[ec]:
{};ec%2?F(Object(vc),!0).forEach(function(Xa){(0,Va.Z)(Ab,Xa,vc[Xa])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Ab,Object.getOwnPropertyDescriptors(vc)):F(Object(vc)).forEach(function(Xa){Object.defineProperty(Ab,Xa,Object.getOwnPropertyDescriptor(vc,Xa))})}return Ab}function M(Ab,ec){var vc=Object.keys(Ab);if(Object.getOwnPropertySymbols){var Xa=Object.getOwnPropertySymbols(Ab);ec&&(Xa=Xa.filter(function(sa){return Object.getOwnPropertyDescriptor(Ab,sa).enumerable}));vc.push.apply(vc,
Xa)}return vc}function I(Ab){for(var ec=1;ec<arguments.length;ec++){var vc=null!=arguments[ec]?arguments[ec]:{};ec%2?M(Object(vc),!0).forEach(function(Xa){(0,Va.Z)(Ab,Xa,vc[Xa])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Ab,Object.getOwnPropertyDescriptors(vc)):M(Object(vc)).forEach(function(Xa){Object.defineProperty(Ab,Xa,Object.getOwnPropertyDescriptor(vc,Xa))})}return Ab}function ia(Ab,ec){var vc="undefined"!=typeof Symbol&&Ab[Symbol.iterator]||Ab["@@iterator"];if(!vc){if(Array.isArray(Ab)||
(vc=function(Ta,wb){if(Ta){if("string"==typeof Ta)return U(Ta,wb);var ac=Object.prototype.toString.call(Ta).slice(8,-1);"Object"===ac&&Ta.constructor&&(ac=Ta.constructor.name);if("Map"===ac||"Set"===ac)return Array.from(Ta);if("Arguments"===ac||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ac))return U(Ta,wb)}}(Ab))||ec&&Ab&&"number"==typeof Ab.length){vc&&(Ab=vc);var Xa=0;ec=function(){};return{s:ec,n:function(){return Xa>=Ab.length?{done:!0}:{done:!1,value:Ab[Xa++]}},e:function(Ta){throw Ta;},
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 sa,qa=!0,Da=!1;return{s:function(){vc=vc.call(Ab)},n:function(){var Ta=vc.next();return qa=Ta.done,Ta},e:function(Ta){Da=!0;sa=Ta},f:function(){try{qa||null==vc.return||vc.return()}finally{if(Da)throw sa;}}}}function U(Ab,ec){(null==ec||ec>Ab.length)&&(ec=Ab.length);for(var vc=0,Xa=Array(ec);vc<ec;vc++)Xa[vc]=Ab[vc];return Xa}function Z(Ab,
ec){var vc=Object.keys(Ab);if(Object.getOwnPropertySymbols){var Xa=Object.getOwnPropertySymbols(Ab);ec&&(Xa=Xa.filter(function(sa){return Object.getOwnPropertyDescriptor(Ab,sa).enumerable}));vc.push.apply(vc,Xa)}return vc}function aa(Ab){for(var ec=1;ec<arguments.length;ec++){var vc=null!=arguments[ec]?arguments[ec]:{};ec%2?Z(Object(vc),!0).forEach(function(Xa){(0,Va.Z)(Ab,Xa,vc[Xa])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Ab,Object.getOwnPropertyDescriptors(vc)):Z(Object(vc)).forEach(function(Xa){Object.defineProperty(Ab,
Xa,Object.getOwnPropertyDescriptor(vc,Xa))})}return Ab}function W(Ab,ec){var vc="undefined"!=typeof Symbol&&Ab[Symbol.iterator]||Ab["@@iterator"];if(!vc){if(Array.isArray(Ab)||(vc=function(Ta,wb){if(Ta){if("string"==typeof Ta)return fa(Ta,wb);var ac=Object.prototype.toString.call(Ta).slice(8,-1);"Object"===ac&&Ta.constructor&&(ac=Ta.constructor.name);if("Map"===ac||"Set"===ac)return Array.from(Ta);if("Arguments"===ac||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ac))return fa(Ta,wb)}}(Ab))||ec&&
Ab&&"number"==typeof Ab.length){vc&&(Ab=vc);var Xa=0;ec=function(){};return{s:ec,n:function(){return Xa>=Ab.length?{done:!0}:{done:!1,value:Ab[Xa++]}},e:function(Ta){throw Ta;},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 sa,qa=!0,Da=!1;return{s:function(){vc=vc.call(Ab)},n:function(){var Ta=vc.next();return qa=Ta.done,Ta},e:function(Ta){Da=!0;sa=Ta},f:function(){try{qa||null==
vc.return||vc.return()}finally{if(Da)throw sa;}}}}function fa(Ab,ec){(null==ec||ec>Ab.length)&&(ec=Ab.length);for(var vc=0,Xa=Array(ec);vc<ec;vc++)Xa[vc]=Ab[vc];return Xa}function X(Ab,ec){var vc=Object.keys(Ab);if(Object.getOwnPropertySymbols){var Xa=Object.getOwnPropertySymbols(Ab);ec&&(Xa=Xa.filter(function(sa){return Object.getOwnPropertyDescriptor(Ab,sa).enumerable}));vc.push.apply(vc,Xa)}return vc}function ea(Ab){for(var ec=1;ec<arguments.length;ec++){var vc=null!=arguments[ec]?arguments[ec]:
{};ec%2?X(Object(vc),!0).forEach(function(Xa){(0,Va.Z)(Ab,Xa,vc[Xa])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Ab,Object.getOwnPropertyDescriptors(vc)):X(Object(vc)).forEach(function(Xa){Object.defineProperty(Ab,Xa,Object.getOwnPropertyDescriptor(vc,Xa))})}return Ab}function pa(Ab,ec){var vc=Object.keys(Ab);if(Object.getOwnPropertySymbols){var Xa=Object.getOwnPropertySymbols(Ab);ec&&(Xa=Xa.filter(function(sa){return Object.getOwnPropertyDescriptor(Ab,sa).enumerable}));vc.push.apply(vc,
Xa)}return vc}function va(Ab){for(var ec=1;ec<arguments.length;ec++){var vc=null!=arguments[ec]?arguments[ec]:{};ec%2?pa(Object(vc),!0).forEach(function(Xa){(0,Va.Z)(Ab,Xa,vc[Xa])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Ab,Object.getOwnPropertyDescriptors(vc)):pa(Object(vc)).forEach(function(Xa){Object.defineProperty(Ab,Xa,Object.getOwnPropertyDescriptor(vc,Xa))})}return Ab}function ta(Ab,ec){var vc=Object.keys(Ab);if(Object.getOwnPropertySymbols){var Xa=Object.getOwnPropertySymbols(Ab);
ec&&(Xa=Xa.filter(function(sa){return Object.getOwnPropertyDescriptor(Ab,sa).enumerable}));vc.push.apply(vc,Xa)}return vc}function xa(Ab){for(var ec=1;ec<arguments.length;ec++){var vc=null!=arguments[ec]?arguments[ec]:{};ec%2?ta(Object(vc),!0).forEach(function(Xa){(0,Va.Z)(Ab,Xa,vc[Xa])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Ab,Object.getOwnPropertyDescriptors(vc)):ta(Object(vc)).forEach(function(Xa){Object.defineProperty(Ab,Xa,Object.getOwnPropertyDescriptor(vc,Xa))})}return Ab}
b.d(h,{FL:function(){return Gc},vD:function(){return te.vD},yA:function(){return oa},BZ:function(){return Oa},mo:function(){return bd.mo},uN:function(){return Tb.uN},jK:function(){return Tb.jK},FA:function(){return Tb.FA},pw:function(){return Ib},ZM:function(){return Tb.ZM},X9:function(){return Ga.X},xF:function(){return pc},pL:function(){return Xc},jl:function(){return kb},kt:function(){return tb},EQ:function(){return Nb},nz:function(){return ve.nz},_d:function(){return sc._d},W3:function(){return lb},
mM:function(){return sc.mM},ns:function(){return sc.ns},Yy:function(){return Wa},V:function(){return na},zi:function(){return La},jY:function(){return Db},$h:function(){return pe.$},Pb:function(){return rd},Qs:function(){return $d},u0:function(){return Hd.u},Zp:function(){return bd.Zp},JN:function(){return td},y7:function(){return te.y7},s:function(){return fc},zp:function(){return Tb.zp}});var Ga=b(2283),Ia=b(897),Ya=b(6331),Fa=b(8557),Ka=b(7135),Ba=b(9610),la=b(1119),ka=b(7041),ua=b(4512),na=(0,Ba.z)({name:"sendBackward",
trackEvent:{category:"element"},perform:function(Ab,ec){return{elements:(0,Ia.ux)(Ab,ec),appState:ec,commitToHistory:!0}},contextItemLabel:"labels.sendBackward",keyPriority:40,keyTest:function(Ab){return Ab[Ya.tW.CTRL_OR_CMD]&&!Ab.shiftKey&&Ab.code===Ya.aU.BRACKET_LEFT},PanelComponent:function(Ab){var ec=Ab.updateData;Ab.appState;return(0,ua.jsx)("button",{type:"button",className:"zIndexButton",onClick:function(){return ec(null)},title:"".concat((0,Fa.t)("labels.sendBackward")," — ").concat((0,Ka.uY)("CtrlOrCmd+[")),
children:la.Gc})}}),oa=(0,Ba.z)({name:"bringForward",trackEvent:{category:"element"},perform:function(Ab,ec){return{elements:(0,Ia.jY)(Ab,ec),appState:ec,commitToHistory:!0}},contextItemLabel:"labels.bringForward",keyPriority:40,keyTest:function(Ab){return Ab[Ya.tW.CTRL_OR_CMD]&&!Ab.shiftKey&&Ab.code===Ya.aU.BRACKET_RIGHT},PanelComponent:function(Ab){var ec=Ab.updateData;Ab.appState;return(0,ua.jsx)("button",{type:"button",className:"zIndexButton",onClick:function(){return ec(null)},title:"".concat((0,Fa.t)("labels.bringForward"),
" — ").concat((0,Ka.uY)("CtrlOrCmd+]")),children:la.t5})}}),La=(0,Ba.z)({name:"sendToBack",trackEvent:{category:"element"},perform:function(Ab,ec){return{elements:(0,Ia.yZ)(Ab,ec),appState:ec,commitToHistory:!0}},contextItemLabel:"labels.sendToBack",keyTest:function(Ab){return ka.Um?Ab[Ya.tW.CTRL_OR_CMD]&&Ab.altKey&&Ab.code===Ya.aU.BRACKET_LEFT:Ab[Ya.tW.CTRL_OR_CMD]&&Ab.shiftKey&&Ab.code===Ya.aU.BRACKET_LEFT},PanelComponent:function(Ab){var ec=Ab.updateData;Ab.appState;return(0,ua.jsx)("button",{type:"button",
className:"zIndexButton",onClick:function(){return ec(null)},title:"".concat((0,Fa.t)("labels.sendToBack")," — ").concat(ka.Um?(0,Ka.uY)("CtrlOrCmd+Alt+["):(0,Ka.uY)("CtrlOrCmd+Shift+[")),children:la.pw})}}),Oa=(0,Ba.z)({name:"bringToFront",trackEvent:{category:"element"},perform:function(Ab,ec){return{elements:(0,Ia.rr)(Ab,ec),appState:ec,commitToHistory:!0}},contextItemLabel:"labels.bringToFront",keyTest:function(Ab){return ka.Um?Ab[Ya.tW.CTRL_OR_CMD]&&Ab.altKey&&Ab.code===Ya.aU.BRACKET_RIGHT:Ab[Ya.tW.CTRL_OR_CMD]&&
Ab.shiftKey&&Ab.code===Ya.aU.BRACKET_RIGHT},PanelComponent:function(Ab){var ec=Ab.updateData;Ab.appState;return(0,ua.jsx)("button",{type:"button",className:"zIndexButton",onClick:function(vc){return ec(null)},title:"".concat((0,Fa.t)("labels.bringToFront")," — ").concat(ka.Um?(0,Ka.uY)("CtrlOrCmd+Alt+]"):(0,Ka.uY)("CtrlOrCmd+Shift+]")),children:la.IN})}}),Va=b(7169),Ma=b(502),Ua=b(5734),ib=b(9472),vb=b(8627),yb=b(4485),Wa=(0,Ba.z)({name:"selectAll",trackEvent:{category:"canvas"},perform:function(Ab,
ec,vc,Xa){if(ec.editingLinearElement)return!1;vc=(0,yb.aI)(Ab.filter(function(sa){return!(sa.isDeleted||(0,Ua.iB)(sa)&&sa.containerId||sa.locked)})).reduce(function(sa,qa){return sa[qa.id]=!0,sa},{});return{appState:m(m(m({},ec),(0,Ma.bO)({editingGroupId:null,selectedElementIds:vc},(0,Ua.Lm)(Ab),ec,Xa)),{},{selectedLinearElement:1===Object.keys(vc).length&&(0,ib.bt)(Ab[0])?new vb._(Ab[0],Xa.scene):null}),commitToHistory:!0}},contextItemLabel:"labels.selectAll",keyTest:function(Ab){return Ab[Ya.tW.CTRL_OR_CMD]&&
Ab.key===Ya.tW.A}}),hb=b(1930),ab=b(9547),Qa=b(4289),bb=b(7267),Pa=b(554),Lb=function(Ab){var ec=Ab.slice(),vc=new Set,Xa=function Ta(Da){var wb,ac,Hc,Wc=null===(wb=Da[0])||void 0===wb||null===(ac=wb.groupIds)||void 0===ac?void 0:ac.join("");wb=[Da[0]];ac=[];Da=p(Da.slice(1));try{for(Da.s();!(Hc=Da.n()).done;){var Wd,re=Hc.value;(null===(Wd=re.groupIds)||void 0===Wd?void 0:Wd.join(""))===Wc?wb.push(re):ac.push(re)}}catch(xe){Da.e(xe)}finally{Da.f()}return ac.length?[].concat(wb,(0,hb.Z)(Ta(ac))):
wb},sa=new Map;return ec.forEach(function(Da,Ta){var wb;if(!sa.has(Da.id))if(null!==(wb=Da.groupIds)&&void 0!==wb&&wb.length){var ac,Hc=Da.groupIds[Da.groupIds.length-1];Da=ec.slice(Ta).filter(function(Wc){var Wd,re=null==Wc||null===(Wd=Wc.groupIds)||void 0===Wd?void 0:Wd.some(function(xe){return xe===Hc});return re&&sa.set(Wc.id,!0),re});Da=p(Xa(Da));try{for(Da.s();!(ac=Da.n()).done;)vc.add(ac.value)}catch(Wc){Da.e(Wc)}finally{Da.f()}}else vc.add(Da)}),vc.size!==Ab.length?(console.error("normalizeGroupElementOrder: lost some elements... bailing!"),
Ab):(0,hb.Z)(vc)},xc=function(Ab){return function(ec){var vc=(0,Ka.I4)(ec),Xa=ec.slice(),sa=new Set;return Xa.forEach(function(qa,Da){var Ta;if(qa)if(null!==(Ta=qa.boundElements)&&void 0!==Ta&&Ta.length)sa.add(qa),Xa[Da]=null,qa.boundElements.forEach(function(ac){var Hc=vc.get(ac.id);Hc&&"text"===ac.type&&(sa.add(Hc[0]),Xa[Hc[1]]=null)});else if("text"===qa.type&&qa.containerId){var wb;Ta=vc.get(qa.containerId);null!=Ta&&null!==(wb=Ta[0].boundElements)&&void 0!==wb&&wb.find(function(ac){return ac.id===
qa.id})||(sa.add(qa),Xa[Da]=null)}else sa.add(qa),Xa[Da]=null}),sa.size!==ec.length?(console.error("normalizeBoundElementsOrder: lost some elements... bailing!"),ec):(0,hb.Z)(sa)}(Lb(Ab))},oc=b(3473),pc=(0,Ba.z)({name:"duplicateSelection",trackEvent:{category:"element"},perform:function(Ab,ec){return ec.editingLinearElement?(ec=vb._.duplicateSelectedPoints(ec),!!ec&&{elements:Ab,appState:ec.appState,commitToHistory:!0}):f(f({},Cc(Ab,ec)),{},{commitToHistory:!0})},contextItemLabel:"labels.duplicateSelection",
keyTest:function(Ab){return Ab[Ya.tW.CTRL_OR_CMD]&&Ab.key===Ya.tW.D},PanelComponent:function(Ab){var ec=Ab.elements,vc=Ab.appState,Xa=Ab.updateData;return(0,ua.jsx)(Qa.V,{type:"button",icon:la.NA,title:"".concat((0,Fa.t)("labels.duplicateSelection")," — ").concat((0,Ka.uY)("CtrlOrCmd+D")),"aria-label":(0,Fa.t)("labels.duplicateSelection"),onClick:function(){return Xa(null)},visible:(0,ab.N)((0,Ua.Lm)(ec),vc)})}}),Cc=function(Ab,ec){for(var vc=xc(Ab),Xa=new Map,sa=[],qa=[],Da=new Map,Ta=function(Df){var tf=
(0,Ua.Sy)(ec.editingGroupId,Xa,Df,{x:Df.x+ka.k/2,y:Df.y+ka.k/2});return Da.set(Df.id,tf.id),qa.push(Df),sa.push(tf),tf},wb=(0,Ka.xn)((0,yb.eD)(vc,ec,{includeBoundTextElement:!0,includeElementsInFrames:!0})),ac=new Map,Hc=function(Df){var tf,rg=v(Df);try{for(rg.s();!(tf=rg.n()).done;)ac.set(tf.value.id,!0)}catch(gh){rg.e(gh)}finally{rg.f()}return Df},Wc=[],Wd=-1;++Wd<vc.length;){var re=vc[Wd];if(!ac.get(re.id)){var xe=(0,Pa.WJ)(re),Cf=(0,ib.He)(re);if(wb.get(re.id)){if(re.groupIds.length||xe||Cf){var kf=
(0,Ma.yO)(ec,re);if(kf){re=(0,Ma.Fb)(vc,kf).flatMap(function(Df){return(0,ib.He)(Df)?[].concat((0,hb.Z)((0,oc.wO)(Ab,Df.id)),[Df]):[Df]});Wc.push.apply(Wc,(0,hb.Z)(Hc([].concat((0,hb.Z)(re),(0,hb.Z)(re.map(function(Df){return Ta(Df)}))))));continue}if(xe){Wc.push.apply(Wc,(0,hb.Z)(Hc([re,xe,Ta(re),Ta(xe)])));continue}if(Cf){xe=(0,oc.wO)(vc,re.id);Wc.push.apply(Wc,(0,hb.Z)(Hc([].concat((0,hb.Z)(xe),[re],(0,hb.Z)(xe.map(function(Df){return Ta(Df)})),[Ta(re)]))));continue}}re.frameId&&wb.has(re.frameId)||
Wc.push.apply(Wc,(0,hb.Z)(Hc([re,Ta(re)])))}else Wc.push.apply(Wc,(0,hb.Z)(Hc([re])))}}vc=[];wb=new Map;for(Wd=Wc.length;0<=--Wd;)Hc=Wc[Wd],wb.get(Hc.id)||(wb.set(Hc.id,!0),vc.push(Hc));Wd=vc.reverse();(0,Pa.P7)(Wc,qa,Da);(0,bb.ek)(Wc,qa,Da);(0,oc.xr)(Wd,qa,Da);Wc=(0,yb.aI)(sa);return{elements:Wd,appState:f(f({},ec),(0,Ma.bO)({editingGroupId:ec.editingGroupId,selectedElementIds:Wc.reduce(function(Df,tf){return(0,ib.Xh)(tf)||(Df[tf.id]=!0),Df},{})},(0,Ua.Lm)(Wd),ec,null))}},bd=(b(650),b(8260)),dc=
b(2577),Nc=b(7729),Qc=b(3795),Ad=b(3223),Xc=(0,Ba.z)({name:"finalize",trackEvent:!1,perform:function(Ab,ec,vc,Xa){var sa;vc=Xa.interactiveCanvas;var qa=Xa.focusContainer;Xa=Xa.scene;if(ec.editingLinearElement){var Da=ec.editingLinearElement,Ta=Da.startBindingElement,wb=Da.endBindingElement,ac=vb._.getElement(Da.elementId);if(ac)return(0,ib.Mn)(ac)&&(0,bb.HG)(ac,Ta,wb),{elements:2>ac.points.length||(0,Ua.QD)(ac)?Ab.filter(function(re){return re.id!==ac.id}):void 0,appState:B(B({},ec),{},{cursorButton:"up",
editingLinearElement:null}),commitToHistory:!0}}(Da=ec.pendingImageElementId&&Xa.getElement(ec.pendingImageElementId))&&(0,Nc.DR)(Da,{isDeleted:!0},!1);window.document.activeElement instanceof HTMLElement&&qa();var Hc;if(qa=ec.multiElement?ec.multiElement:"freedraw"===(null===(sa=ec.editingElement)||void 0===sa?void 0:sa.type)?ec.editingElement:null){"freedraw"!==qa.type&&"touch"!==ec.lastPointerDownWith&&(sa=qa.points,(Da=qa.lastCommittedPoint)&&sa[sa.length-1]===Da||(0,Nc.DR)(qa,{points:qa.points.slice(0,
-1)}));(0,Ua.QD)(qa)&&(Ab=Ab.slice(0,-1));sa=(0,Qc.g6)(qa.points,ec.zoom.value);if(("line"===qa.type||"freedraw"===qa.type)&&sa){var Wc=qa.points,Wd=Wc[0];(0,Nc.DR)(qa,{points:Wc.map(function(re,xe){return xe===Wc.length-1?[Wd[0],Wd[1]]:re})})}(0,ib.Mn)(qa)&&!sa&&1<qa.points.length&&(sa=vb._.getPointAtIndexGlobalCoordinates(qa,-1),Da=(0,dc.Z)(sa,2),sa=Da[0],Da=Da[1],(0,bb.R)(qa,ec,Ad.Z.getScene(qa),{x:sa,y:Da}))}return(ec.activeTool.locked||"freedraw"===ec.activeTool.type)&&qa||(0,Ka.z8)(vc),Hc="eraser"===
ec.activeTool.type?(0,Ka.Om)(ec,B(B({},ec.activeTool.lastActiveTool||{type:"selection"}),{},{lastActiveToolBeforeEraser:null})):(0,Ka.Om)(ec,{type:"selection"}),{elements:Ab,appState:B(B({},ec),{},{cursorButton:"up",activeTool:(ec.activeTool.locked||"freedraw"===ec.activeTool.type)&&qa?ec.activeTool:Hc,activeEmbeddable:null,draggingElement:null,multiElement:null,editingElement:null,startBoundElement:null,suggestedBindings:[],selectedElementIds:qa&&!ec.activeTool.locked&&"freedraw"!==ec.activeTool.type?
B(B({},ec.selectedElementIds),{},(0,Va.Z)({},qa.id,!0)):ec.selectedElementIds,selectedLinearElement:qa&&(0,ib.bt)(qa)?new vb._(qa,Xa):ec.selectedLinearElement,pendingImageElementId:null}),commitToHistory:"freedraw"===ec.activeTool.type}},keyTest:function(Ab,ec){return Ab.key===Ya.tW.ESCAPE&&(null!==ec.editingLinearElement||!ec.draggingElement&&null===ec.multiElement)||(Ab.key===Ya.tW.ESCAPE||Ab.key===Ya.tW.ENTER)&&null!==ec.multiElement},PanelComponent:function(Ab){var ec=Ab.appState,vc=Ab.updateData;
Ab=Ab.data;return(0,ua.jsx)(Qa.V,{type:"button",icon:la.$c,title:(0,Fa.t)("buttons.done"),"aria-label":(0,Fa.t)("buttons.done"),onClick:vc,visible:null!=ec.multiElement,size:(null==Ab?void 0:Ab.size)||"medium"})}}),sc=b(608),Sc="{}",Ib=(0,Ba.z)({name:"copyStyles",trackEvent:{category:"element"},perform:function(Ab,ec){var vc=[];Ab=Ab.find(function(sa){return ec.selectedElementIds[sa.id]});if(vc.push(Ab),Ab&&(0,ib.Xo)(Ab)){var Xa=(0,Pa.WJ)(Ab);vc.push(Xa)}return Ab&&(Sc=JSON.stringify(vc)),{appState:V(V({},
ec),{},{toast:{message:(0,Fa.t)("toast.copyStyles")}}),commitToHistory:!1}},contextItemLabel:"labels.copyStyles",keyTest:function(Ab){return Ab[Ya.tW.CTRL_OR_CMD]&&Ab.altKey&&Ab.code===Ya.aU.C}}),lb=(0,Ba.z)({name:"pasteStyles",trackEvent:{category:"element"},perform:function(Ab,ec){var vc=JSON.parse(Sc),Xa=vc[0],sa=vc[1];if(!(0,Ua.r2)(Xa))return{elements:Ab,commitToHistory:!1};var qa=(0,ab.eD)(Ab,ec,{includeBoundTextElement:!0}),Da=qa.map(function(Ta){return Ta.id});return{elements:Ab.map(function(Ta){if(Da.includes(Ta.id)){var wb,
ac,Hc,Wc,Wd,re,xe,Cf=Xa;if((0,Ua.iB)(Ta)&&Ta.containerId&&(Cf=sa),!Cf)return Ta;var kf=(0,Nc.BE)(Ta,{backgroundColor:null===(wb=Cf)||void 0===wb?void 0:wb.backgroundColor,strokeWidth:null===(ac=Cf)||void 0===ac?void 0:ac.strokeWidth,strokeColor:null===(Hc=Cf)||void 0===Hc?void 0:Hc.strokeColor,strokeStyle:null===(Wc=Cf)||void 0===Wc?void 0:Wc.strokeStyle,fillStyle:null===(Wd=Cf)||void 0===Wd?void 0:Wd.fillStyle,opacity:null===(re=Cf)||void 0===re?void 0:re.opacity,roughness:null===(xe=Cf)||void 0===
xe?void 0:xe.roughness,roundness:Cf.roundness?(0,ib.eK)(Cf.roundness.type,Ta)?Cf.roundness:(0,ib.UQ)(Ta):null});if((0,Ua.iB)(kf)){var Df,tf,rg;wb=(null===(Df=Cf)||void 0===Df?void 0:Df.fontSize)||ka.n5;Df=(null===(tf=Cf)||void 0===tf?void 0:tf.fontFamily)||ka.rk;tf=null;(kf=(0,Nc.BE)(kf,{fontSize:wb,fontFamily:Df,textAlign:(null===(rg=Cf)||void 0===rg?void 0:rg.textAlign)||ka.Hg,lineHeight:Cf.lineHeight||(0,Pa.PT)(Df)})).containerId&&(tf=qa.find(function(gh){return(0,Ua.iB)(kf)&&gh.id===kf.containerId})||
null);(0,Ua.oN)(kf,tf)}return"arrow"===kf.type&&(kf=(0,Nc.BE)(kf,{startArrowhead:Cf.startArrowhead,endArrowhead:Cf.endArrowhead})),(0,ib.He)(Ta)&&(kf=(0,Nc.BE)(kf,{roundness:null,backgroundColor:"transparent"})),kf}return Ta}),commitToHistory:!0}},contextItemLabel:"labels.pasteStyles",keyTest:function(Ab){return Ab[Ya.tW.CTRL_OR_CMD]&&Ab.altKey&&Ab.code===Ya.aU.V}});(0,Ba.z)({name:"toggleCanvasMenu",trackEvent:{category:"menu"},perform:function(Ab,ec){return{appState:S(S({},ec),{},{openMenu:"canvas"===
ec.openMenu?null:"canvas"}),commitToHistory:!1}},PanelComponent:function(Ab){var ec=Ab.appState;Ab=Ab.updateData;return(0,ua.jsx)(Qa.V,{type:"button",icon:la.RY,"aria-label":(0,Fa.t)("buttons.menu"),onClick:Ab,selected:"canvas"===ec.openMenu})}});(0,Ba.z)({name:"toggleEditMenu",trackEvent:{category:"menu"},perform:function(Ab,ec){return{appState:S(S({},ec),{},{openMenu:"shape"===ec.openMenu?null:"shape"}),commitToHistory:!1}},PanelComponent:function(Ab){var ec=Ab.appState,vc=Ab.updateData;return(0,ua.jsx)(Qa.V,
{visible:(0,Ua.RT)(ec,(0,Ua.Lm)(Ab.elements)),type:"button",icon:la.DG,"aria-label":(0,Fa.t)("buttons.edit"),onClick:vc,selected:"shape"===ec.openMenu})}});(0,Ba.z)({name:"toggleFullScreen",viewMode:!0,trackEvent:{category:"canvas",predicate:function(Ab){return!(0,Ka.rB)()}},perform:function(){return(0,Ka.rB)()||(0,Ka.wo)(),(0,Ka.rB)()&&(0,Ka.Pr)(),{commitToHistory:!1}}});var Db=(0,Ba.z)({name:"toggleShortcuts",viewMode:!0,trackEvent:{category:"menu",action:"toggleHelpDialog"},perform:function(Ab,
ec,vc,Xa){Ab=Xa.focusContainer;return"help"===ec.openDialog&&Ab(),{appState:S(S({},ec),{},{openDialog:"help"===ec.openDialog?null:"help"}),commitToHistory:!1}},keyTest:function(Ab){return Ab.key===Ya.tW.QUESTION_MARK}}),Gb=b(6655),db=b(5236),rb=function(Ab,ec,vc){Ab=vc.scene.getSelectedElements({selectedElementIds:ec.selectedElementIds,includeBoundTextElement:!0});return 2<=Ab.length&&!function(Xa){if(2<=Xa.length){var sa,qa=R(Xa[0].groupIds);try{var Da=function(){var wb=sa.value;if(Xa.reduce(function(ac,
Hc){return ac&&(0,Ma.Nd)(Hc,wb)},!0))return{v:!0}};for(qa.s();!(sa=qa.n()).done;){var Ta=Da();if("object"===(0,Gb.Z)(Ta))return Ta.v}}catch(wb){qa.e(wb)}finally{qa.f()}}return!1}(Ab)},Nb=(0,Ba.z)({name:"group",trackEvent:{category:"element"},perform:function(Ab,ec,vc,Xa){vc=Xa.scene.getSelectedElements({selectedElementIds:ec.selectedElementIds,includeBoundTextElement:!0});if(2>vc.length)return{appState:ec,elements:Ab,commitToHistory:!1};Xa=(0,Ma.iJ)(ec);if(1===Xa.length){Xa=new Set((0,Ma.Fb)(Ab,Xa[0]).map(function(wb){return wb.id}));
var sa=new Set(vc.map(function(wb){return wb.id}));if((new Set([].concat((0,hb.Z)(Array.from(Xa)),(0,hb.Z)(Array.from(sa))))).size===Xa.size)return{appState:ec,elements:Ab,commitToHistory:!1}}var qa=(0,hb.Z)(Ab);1<(new Set(vc.map(function(wb){return wb.frameId}))).size&&(0,oc.SH)(vc).forEach(function(wb,ac){qa=(0,oc.lz)(qa,wb,ec)});var Da=(0,db.kb)(),Ta=(0,Ka.xn)(vc);qa=qa.map(function(wb){return Ta.get(wb.id)?(0,Nc.BE)(wb,{groupIds:(0,Ma.S_)(wb.groupIds,Da,ec.editingGroupId)}):wb});Ab=(0,Ma.Fb)(qa,
Da);Xa=qa.lastIndexOf(Ab[Ab.length-1]);vc=qa.slice(Xa+1);Xa=qa.slice(0,Xa).filter(function(wb){return!(0,Ma.Nd)(wb,Da)});return qa=[].concat((0,hb.Z)(Xa),(0,hb.Z)(Ab),(0,hb.Z)(vc)),{appState:T(T({},ec),(0,Ma.F$)(Da,T(T({},ec),{},{selectedGroupIds:{}}),(0,Ua.Lm)(qa))),elements:qa,commitToHistory:!0}},contextItemLabel:"labels.group",predicate:function(Ab,ec,vc,Xa){return rb(0,ec,Xa)},keyTest:function(Ab){return!Ab.shiftKey&&Ab[Ya.tW.CTRL_OR_CMD]&&Ab.key===Ya.tW.G},PanelComponent:function(Ab){var ec=
Ab.elements,vc=Ab.appState,Xa=Ab.updateData;return(0,ua.jsx)(Qa.V,{hidden:!rb(0,vc,Ab.app),type:"button",icon:(0,ua.jsx)(la.BF,{theme:vc.theme}),onClick:function(){return Xa(null)},title:"".concat((0,Fa.t)("labels.group")," — ").concat((0,Ka.uY)("CtrlOrCmd+G")),"aria-label":(0,Fa.t)("labels.group"),visible:(0,ab.N)((0,Ua.Lm)(ec),vc)})}}),fc=(0,Ba.z)({name:"ungroup",trackEvent:{category:"element"},perform:function(Ab,ec,vc,Xa){if(0===(0,Ma.iJ)(ec).length)return{appState:ec,elements:Ab,commitToHistory:!1};
var sa=(0,hb.Z)(Ab);Ab=Xa.scene.getSelectedElements(ec).filter(function(Da){return Da.frameId}).map(function(Da){return Xa.scene.getElement(Da.frameId)});var qa=[];sa=sa.map(function(Da){(0,ib.Xh)(Da)&&qa.push(Da.id);var Ta=(0,Ma.h6)(Da.groupIds,ec.selectedGroupIds);return Ta.length===Da.groupIds.length?Da:(0,Nc.BE)(Da,{groupIds:Ta})});vc=(0,Ma.bO)(ec,(0,Ua.Lm)(sa),ec,null);return Ab.forEach(function(Da){Da&&(sa=(0,oc.pr)(sa,(0,oc.ni)(sa,Da,ec),Da,ec))}),vc.selectedElementIds=Object.entries(vc.selectedElementIds).reduce(function(Da,
Ta){Ta=(0,dc.Z)(Ta,2);var wb=Ta[0];return Ta[1]&&!qa.includes(wb)&&(Da[wb]=!0),Da},{}),{appState:T(T({},ec),vc),elements:sa,commitToHistory:!0}},keyTest:function(Ab){return Ab.shiftKey&&Ab[Ya.tW.CTRL_OR_CMD]&&Ab.key===Ya.tW.G.toUpperCase()},contextItemLabel:"labels.ungroup",predicate:function(Ab,ec){return 0<(0,Ma.iJ)(ec).length},PanelComponent:function(Ab){var ec=Ab.elements,vc=Ab.appState,Xa=Ab.updateData;return(0,ua.jsx)(Qa.V,{type:"button",hidden:0===(0,Ma.iJ)(vc).length,icon:(0,ua.jsx)(la.RJ,
{theme:vc.theme}),onClick:function(){return Xa(null)},title:"".concat((0,Fa.t)("labels.ungroup")," — ").concat((0,Ka.uY)("CtrlOrCmd+Shift+G")),"aria-label":(0,Fa.t)("labels.ungroup"),visible:(0,ab.N)((0,Ua.Lm)(ec),vc)})}}),Bc=b(2460),Jc=b(3379),ic=b.n(Jc),Oc=b(7795),Rc=b.n(Oc),fd=b(569),pd=b.n(fd),Ic=b(3565),wc=b.n(Ic),je=b(9216),pf=b.n(je),qe=b(4589),ue=b.n(qe),kd=b(3729),Ae={};Ae.styleTagTransform=ue();Ae.setAttributes=wc();Ae.insert=pd().bind(null,"head");Ae.domAPI=Rc();Ae.insertStyleElement=pf();
ic()(kd.Z,Ae);kd.Z&&kd.Z.locals&&kd.Z.locals;var Bf=b(9787),gg=function(Ab){var ec=Ab.color,vc=Ab.onClick,Xa=Ab.src;Ab=(0,Bc.l)(Ab.name);var sa=(0,Bf.useState)(!1);sa=(0,dc.Z)(sa,2);var qa=sa[1];sa=!sa[0]&&Xa;return(0,ua.jsx)("div",{className:"Avatar",style:sa?void 0:{background:ec},onClick:vc,children:sa?(0,ua.jsx)("img",{className:"Avatar-img",src:Xa,alt:Ab,referrerPolicy:"no-referrer",onError:function(){return qa(!0)}}):Ab})},jc=b(6778);(0,Ba.z)({name:"goToCollaborator",viewMode:!0,trackEvent:{category:"collab"},
perform:function(Ab,ec,vc){return vc?{appState:O(O(O({},ec),(0,jc.s)({scenePoint:vc,viewportDimensions:{width:ec.width,height:ec.height},zoom:ec.zoom})),{},{openMenu:"canvas"===ec.openMenu?null:ec.openMenu}),commitToHistory:!1}:{appState:ec,commitToHistory:!1}},PanelComponent:function(Ab){var ec=Ab.updateData;Ab=(0,dc.Z)(Ab.data,2);var vc=Ab[1];Ab=(0,Bc.G)(Ab[0]);return(0,ua.jsx)(gg,{color:Ab,onClick:function(){return ec(vc.pointer)},name:vc.username||"",src:vc.avatarUrl})}});var Zc=b(1829),Gc=(0,Ba.z)({name:"addToLibrary",
trackEvent:{category:"element"},perform:function(Ab,ec,vc,Xa){var sa,qa=Xa.scene.getSelectedElements({selectedElementIds:ec.selectedElementIds,includeBoundTextElement:!0,includeElementsInFrames:!0});Ab=ia(ka.PR);try{for(vc=function(){var Ta=sa.value;if(qa.some(function(wb){return wb.type===Ta}))return{v:{commitToHistory:!1,appState:I(I({},ec),{},{errorMessage:(0,Fa.t)("errors.libraryElementTypeError.".concat(Ta))})}}},Ab.s();!(sa=Ab.n()).done;){var Da=vc();if("object"===(0,Gb.Z)(Da))return Da.v}}catch(Ta){Ab.e(Ta)}finally{Ab.f()}return Xa.library.getLatestLibrary().then(function(Ta){return Xa.library.setLibrary([{id:(0,db.kb)(),
status:"unpublished",elements:qa.map(Zc.OL),created:Date.now()}].concat((0,hb.Z)(Ta)))}).then(function(){return{commitToHistory:!1,appState:I(I({},ec),{},{toast:{message:(0,Fa.t)("toast.addedToLibrary")}})}}).catch(function(Ta){return{commitToHistory:!1,appState:I(I({},ec),{},{errorMessage:Ta.message})}})},contextItemLabel:"labels.addToLibrary"}),ub=b(9995),Bb=function(Ab,ec,vc){var Xa=vc.axis;vc=vc.position;Ab=(0,ub.v2)(Ab);var sa=(0,dc.Z)("x"===Xa?["minX","maxX"]:["minY","maxY"],2),qa=sa[0];sa=
sa[1];return aa(aa({},{x:0,y:0}),{},"start"===vc?(0,Va.Z)({},Xa,ec[qa]-Ab[qa]):"end"===vc?(0,Va.Z)({},Xa,ec[sa]-Ab[sa]):(0,Va.Z)({},Xa,(ec[qa]+ec[sa])/2-(Ab[qa]+Ab[sa])/2))},Eb=function(Ab,ec,vc,Xa){Ab=Xa.scene.getSelectedElements(ec);return 1<Ab.length&&!Ab.some(function(sa){return"frame"===sa.type})},hd=function(Ab,ec,vc,Xa){Xa=function(qa,Da){var Ta=(0,Ma.AI)(qa),wb=(0,ub.v2)(qa);return Ta.flatMap(function(ac){var Hc=Bb(ac,wb,Da);return ac.map(function(Wc){return(0,Nc.BE)(Wc,{x:Wc.x+Hc.x,y:Wc.y+
Hc.y})})})}(vc.scene.getSelectedElements(ec),Xa);var sa=(0,Ka.xn)(Xa);return(0,oc.Tq)(Ab.map(function(qa){return sa.get(qa.id)||qa}),ec,vc)};(0,Ba.z)({name:"alignTop",trackEvent:{category:"element"},predicate:Eb,perform:function(Ab,ec,vc,Xa){return{appState:ec,elements:hd(Ab,ec,Xa,{position:"start",axis:"y"}),commitToHistory:!0}},keyTest:function(Ab){return Ab[Ya.tW.CTRL_OR_CMD]&&Ab.shiftKey&&Ab.key===Ya.tW.ARROW_UP},PanelComponent:function(Ab){var ec=Ab.elements,vc=Ab.appState,Xa=Ab.updateData;return(0,ua.jsx)(Qa.V,
{hidden:!Eb(0,vc,0,Ab.app),type:"button",icon:la.Ct,onClick:function(){return Xa(null)},title:"".concat((0,Fa.t)("labels.alignTop")," — ").concat((0,Ka.uY)("CtrlOrCmd+Shift+Up")),"aria-label":(0,Fa.t)("labels.alignTop"),visible:(0,ab.N)((0,Ua.Lm)(ec),vc)})}});(0,Ba.z)({name:"alignBottom",trackEvent:{category:"element"},predicate:Eb,perform:function(Ab,ec,vc,Xa){return{appState:ec,elements:hd(Ab,ec,Xa,{position:"end",axis:"y"}),commitToHistory:!0}},keyTest:function(Ab){return Ab[Ya.tW.CTRL_OR_CMD]&&
Ab.shiftKey&&Ab.key===Ya.tW.ARROW_DOWN},PanelComponent:function(Ab){var ec=Ab.elements,vc=Ab.appState,Xa=Ab.updateData;return(0,ua.jsx)(Qa.V,{hidden:!Eb(0,vc,0,Ab.app),type:"button",icon:la.HL,onClick:function(){return Xa(null)},title:"".concat((0,Fa.t)("labels.alignBottom")," — ").concat((0,Ka.uY)("CtrlOrCmd+Shift+Down")),"aria-label":(0,Fa.t)("labels.alignBottom"),visible:(0,ab.N)((0,Ua.Lm)(ec),vc)})}});(0,Ba.z)({name:"alignLeft",trackEvent:{category:"element"},predicate:Eb,perform:function(Ab,
ec,vc,Xa){return{appState:ec,elements:hd(Ab,ec,Xa,{position:"start",axis:"x"}),commitToHistory:!0}},keyTest:function(Ab){return Ab[Ya.tW.CTRL_OR_CMD]&&Ab.shiftKey&&Ab.key===Ya.tW.ARROW_LEFT},PanelComponent:function(Ab){var ec=Ab.elements,vc=Ab.appState,Xa=Ab.updateData;return(0,ua.jsx)(Qa.V,{hidden:!Eb(0,vc,0,Ab.app),type:"button",icon:la.xs,onClick:function(){return Xa(null)},title:"".concat((0,Fa.t)("labels.alignLeft")," — ").concat((0,Ka.uY)("CtrlOrCmd+Shift+Left")),"aria-label":(0,Fa.t)("labels.alignLeft"),
visible:(0,ab.N)((0,Ua.Lm)(ec),vc)})}});(0,Ba.z)({name:"alignRight",trackEvent:{category:"element"},predicate:Eb,perform:function(Ab,ec,vc,Xa){return{appState:ec,elements:hd(Ab,ec,Xa,{position:"end",axis:"x"}),commitToHistory:!0}},keyTest:function(Ab){return Ab[Ya.tW.CTRL_OR_CMD]&&Ab.shiftKey&&Ab.key===Ya.tW.ARROW_RIGHT},PanelComponent:function(Ab){var ec=Ab.elements,vc=Ab.appState,Xa=Ab.updateData;return(0,ua.jsx)(Qa.V,{hidden:!Eb(0,vc,0,Ab.app),type:"button",icon:la.mh,onClick:function(){return Xa(null)},
title:"".concat((0,Fa.t)("labels.alignRight")," — ").concat((0,Ka.uY)("CtrlOrCmd+Shift+Right")),"aria-label":(0,Fa.t)("labels.alignRight"),visible:(0,ab.N)((0,Ua.Lm)(ec),vc)})}});(0,Ba.z)({name:"alignVerticallyCentered",trackEvent:{category:"element"},predicate:Eb,perform:function(Ab,ec,vc,Xa){return{appState:ec,elements:hd(Ab,ec,Xa,{position:"center",axis:"y"}),commitToHistory:!0}},PanelComponent:function(Ab){var ec=Ab.elements,vc=Ab.appState,Xa=Ab.updateData;return(0,ua.jsx)(Qa.V,{hidden:!Eb(0,
vc,0,Ab.app),type:"button",icon:la.ST,onClick:function(){return Xa(null)},title:(0,Fa.t)("labels.centerVertically"),"aria-label":(0,Fa.t)("labels.centerVertically"),visible:(0,ab.N)((0,Ua.Lm)(ec),vc)})}});(0,Ba.z)({name:"alignHorizontallyCentered",trackEvent:{category:"element"},predicate:Eb,perform:function(Ab,ec,vc,Xa){return{appState:ec,elements:hd(Ab,ec,Xa,{position:"center",axis:"x"}),commitToHistory:!0}},PanelComponent:function(Ab){var ec=Ab.elements,vc=Ab.appState,Xa=Ab.updateData;return(0,ua.jsx)(Qa.V,
{hidden:!Eb(0,vc,0,Ab.app),type:"button",icon:la.gK,onClick:function(){return Xa(null)},title:(0,Fa.t)("labels.centerHorizontally"),"aria-label":(0,Fa.t)("labels.centerHorizontally"),visible:(0,ab.N)((0,Ua.Lm)(ec),vc)})}});var Ud=function(Ab,ec){Ab=ec.scene.getSelectedElements(Ab);return 1<Ab.length&&!Ab.some(function(vc){return"frame"===vc.type})},Td=function(Ab,ec,vc,Xa){Xa=function(qa,Da){var Ta,wb=(0,dc.Z)("x"===Da.axis?["minX","midX","maxX","width"]:["minY","midY","maxY","height"],4),ac=wb[0],
Hc=wb[1],Wc=wb[2],Wd=wb[3],re=(0,ub.v2)(qa);qa=(0,Ma.AI)(qa).map(function(jh){return[jh,(0,ub.v2)(jh)]}).sort(function(jh,Uf){return jh[1][Hc]-Uf[1][Hc]});wb=0;var xe=W(qa);try{for(xe.s();!(Ta=xe.n()).done;)wb+=Ta.value[1][Wd]}catch(jh){xe.e(jh)}finally{xe.f()}var Cf=(re[Wd]-wb)/(qa.length-1);if(0>Cf){var kf=qa.findIndex(function(jh){return jh[1][ac]===re[ac]}),Df=qa.findIndex(function(jh){return jh[1][Wc]===re[Wc]}),tf=(qa[Df][1][Hc]-qa[kf][1][Hc])/(qa.length-1),rg=qa[kf][1][Hc];return qa.flatMap(function(jh,
Uf){var hh=(0,dc.Z)(jh,2);jh=hh[0];hh=hh[1];var ti={x:0,y:0};return Uf!==kf&&Uf!==Df&&(rg+=tf,ti[Da.axis]=rg-hh[Hc]),jh.map(function(hi){return(0,Nc.BE)(hi,{x:hi.x+ti.x,y:hi.y+ti.y})})})}var gh=re[ac];return qa.flatMap(function(jh){var Uf=(0,dc.Z)(jh,2);jh=Uf[0];Uf=Uf[1];var hh={x:0,y:0};return hh[Da.axis]=gh-Uf[ac],gh+=Cf,gh+=Uf[Wd],jh.map(function(ti){return(0,Nc.BE)(ti,{x:ti.x+hh.x,y:ti.y+hh.y})})})}(vc.scene.getSelectedElements(ec),Xa);var sa=(0,Ka.xn)(Xa);return(0,oc.Tq)(Ab.map(function(qa){return sa.get(qa.id)||
qa}),ec,vc)},Ue=((0,Ba.z)({name:"distributeHorizontally",trackEvent:{category:"element"},perform:function(Ab,ec,vc,Xa){return{appState:ec,elements:Td(Ab,ec,Xa,{space:"between",axis:"x"}),commitToHistory:!0}},keyTest:function(Ab){return!Ab[Ya.tW.CTRL_OR_CMD]&&Ab.altKey&&Ab.code===Ya.aU.H},PanelComponent:function(Ab){var ec=Ab.elements,vc=Ab.appState,Xa=Ab.updateData;return(0,ua.jsx)(Qa.V,{hidden:!Ud(vc,Ab.app),type:"button",icon:la.uD,onClick:function(){return Xa(null)},title:"".concat((0,Fa.t)("labels.distributeHorizontally"),
" — ").concat((0,Ka.uY)("Alt+H")),"aria-label":(0,Fa.t)("labels.distributeHorizontally"),visible:(0,ab.N)((0,Ua.Lm)(ec),vc)})}}),(0,Ba.z)({name:"distributeVertically",trackEvent:{category:"element"},perform:function(Ab,ec,vc,Xa){return{appState:ec,elements:Td(Ab,ec,Xa,{space:"between",axis:"y"}),commitToHistory:!0}},keyTest:function(Ab){return!Ab[Ya.tW.CTRL_OR_CMD]&&Ab.altKey&&Ab.code===Ya.aU.V},PanelComponent:function(Ab){var ec=Ab.elements,vc=Ab.appState,Xa=Ab.updateData;return(0,ua.jsx)(Qa.V,{hidden:!Ud(vc,
Ab.app),type:"button",icon:la.W5,onClick:function(){return Xa(null)},title:"".concat((0,Fa.t)("labels.distributeVertically")," — ").concat((0,Ka.uY)("Alt+V")),"aria-label":(0,Fa.t)("labels.distributeVertically"),visible:(0,ab.N)((0,Ua.Lm)(ec),vc)})}}),b(9798)),kb=(0,Ba.z)({name:"flipHorizontal",trackEvent:{category:"element"},perform:function(Ab,ec,vc,Xa){return{elements:(0,oc.Tq)(ob(Ab,ec,"horizontal"),ec,Xa),appState:ec,commitToHistory:!0}},keyTest:function(Ab){return Ab.shiftKey&&Ab.code===Ya.aU.H},
contextItemLabel:"labels.flipHorizontal"}),tb=(0,Ba.z)({name:"flipVertical",trackEvent:{category:"element"},perform:function(Ab,ec,vc,Xa){return{elements:(0,oc.Tq)(ob(Ab,ec,"vertical"),ec,Xa),appState:ec,commitToHistory:!0}},keyTest:function(Ab){return Ab.shiftKey&&Ab.code===Ya.aU.V&&!Ab[Ya.tW.CTRL_OR_CMD]},contextItemLabel:"labels.flipVertical"}),ob=function(Ab,ec,vc){var Xa=(0,ab.eD)((0,Ua.Lm)(Ab),ec,{includeBoundTextElement:!0,includeElementsInFrames:!0});ec=Ub(Xa,ec,vc);var sa=(0,Ka.xn)(ec);return Ab.map(function(qa){return sa.get(qa.id)||
qa})},Ub=function(Ab,ec,vc){var Xa=(0,ub.v2)(Ab),sa=Xa.minX,qa=Xa.minY,Da=Xa.maxX;Xa=Xa.maxY;return(0,Ue.LM)({originalElements:(0,Ka.xn)(Ab)},Ab,"nw",!0,"horizontal"===vc?Da:sa,"horizontal"===vc?qa:Xa),((0,bb.N1)(ec)?bb.el:bb.H)(Ab),Ab},Tb=b(899),rd=(0,Ba.z)({name:"gridMode",viewMode:!0,trackEvent:{category:"canvas",predicate:function(Ab){return!Ab.gridSize}},perform:function(Ab,ec){return{appState:ea(ea({},ec),{},{gridSize:this.checked(ec)?null:ka.k}),commitToHistory:!1}},checked:function(Ab){return null!==
Ab.gridSize},predicate:function(Ab,ec,vc){return void 0===vc.gridModeEnabled},contextItemLabel:"labels.showGrid",keyTest:function(Ab){return Ab[Ya.tW.CTRL_OR_CMD]&&Ab.code===Ya.aU.QUOTE}}),td=(0,Ba.z)({name:"zenMode",viewMode:!0,trackEvent:{category:"canvas",predicate:function(Ab){return!Ab.zenModeEnabled}},perform:function(Ab,ec){return{appState:va(va({},ec),{},{zenModeEnabled:!this.checked(ec)}),commitToHistory:!1}},checked:function(Ab){return Ab.zenModeEnabled},predicate:function(Ab,ec,vc){return void 0===
vc.zenModeEnabled},contextItemLabel:"buttons.zenMode",keyTest:function(Ab){return!Ab[Ya.tW.CTRL_OR_CMD]&&Ab.altKey&&Ab.code===Ya.aU.Z}}),Hd=b(3218),te=b(1675),ve=b(6289),pe=b(5064),$d=(0,Ba.z)({name:"toggleLinearEditor",trackEvent:{category:"element"},predicate:function(Ab,ec,vc,Xa){Ab=Xa.scene.getSelectedElements(ec);return!(1!==Ab.length||!(0,ib.bt)(Ab[0]))},perform:function(Ab,ec,vc,Xa){var sa;Ab=Xa.scene.getSelectedElements({selectedElementIds:ec.selectedElementIds,includeBoundTextElement:!0})[0];
vc=(null===(sa=ec.editingLinearElement)||void 0===sa?void 0:sa.elementId)===Ab.id?null:new vb._(Ab,Xa.scene);return{appState:xa(xa({},ec),{},{editingLinearElement:vc}),commitToHistory:!1}},contextItemLabel:function(Ab,ec,vc){var Xa;Ab=vc.scene.getSelectedElements({selectedElementIds:ec.selectedElementIds,includeBoundTextElement:!0})[0];return(null===(Xa=ec.editingLinearElement)||void 0===Xa?void 0:Xa.elementId)===Ab.id?"labels.lineEditor.exit":"labels.lineEditor.edit"}})},9610:function(g,h,b){b.d(h,
{N:function(){return l},z:function(){return m}});var l=[],m=function(p){return l=l.concat(p),p}},6445:function(g,h,b){b.d(h,{C:function(){return m}});g=b(7041);h=b(8557);b=b(7135);var l={toggleTheme:[(0,b.uY)("Shift+Alt+D")],saveScene:[(0,b.uY)("CtrlOrCmd+S")],loadScene:[(0,b.uY)("CtrlOrCmd+O")],clearCanvas:[(0,b.uY)("CtrlOrCmd+Delete")],imageExport:[(0,b.uY)("CtrlOrCmd+Shift+E")],cut:[(0,b.uY)("CtrlOrCmd+X")],copy:[(0,b.uY)("CtrlOrCmd+C")],paste:[(0,b.uY)("CtrlOrCmd+V")],copyStyles:[(0,b.uY)("CtrlOrCmd+Alt+C")],
pasteStyles:[(0,b.uY)("CtrlOrCmd+Alt+V")],selectAll:[(0,b.uY)("CtrlOrCmd+A")],deleteSelectedElements:[(0,b.uY)("Delete")],duplicateSelection:[(0,b.uY)("CtrlOrCmd+D"),(0,b.uY)("Alt+".concat((0,h.t)("helpDialog.drag")))],sendBackward:[(0,b.uY)("CtrlOrCmd+[")],bringForward:[(0,b.uY)("CtrlOrCmd+]")],sendToBack:[g.Um?(0,b.uY)("CtrlOrCmd+Alt+["):(0,b.uY)("CtrlOrCmd+Shift+[")],bringToFront:[g.Um?(0,b.uY)("CtrlOrCmd+Alt+]"):(0,b.uY)("CtrlOrCmd+Shift+]")],copyAsPng:[(0,b.uY)("Shift+Alt+C")],copyAsSvg:[],group:[(0,b.uY)("CtrlOrCmd+G")],
ungroup:[(0,b.uY)("CtrlOrCmd+Shift+G")],gridMode:[(0,b.uY)("CtrlOrCmd+'")],zenMode:[(0,b.uY)("Alt+Z")],stats:[(0,b.uY)("Alt+/")],addToLibrary:[],flipHorizontal:[(0,b.uY)("Shift+H")],flipVertical:[(0,b.uY)("Shift+V")],viewMode:[(0,b.uY)("Alt+R")],hyperlink:[(0,b.uY)("CtrlOrCmd+K")],toggleElementLock:[(0,b.uY)("CtrlOrCmd+Shift+L")]},m=function(p){return(p=l[p])&&0<p.length?p[0]:""}},5435:function(g,h,b){b.d(h,{L:function(){return l}});var l=function(m,p,D,v){try{"undefined"!=typeof window&&!{VITE_APP_BACKEND_V2_GET_URL:"https://json.excalidraw.com/api/v2/",
VITE_APP_BACKEND_V2_POST_URL:"https://json.excalidraw.com/api/v2/post/",VITE_APP_LIBRARY_URL:"https://libraries.excalidraw.com",VITE_APP_LIBRARY_BACKEND:"https://us-central1-excalidraw-room-persistence.cloudfunctions.net/libraries",VITE_APP_PORTAL_URL:"https://portal.excalidraw.com",VITE_APP_PLUS_LP:"https://plus.excalidraw.com",VITE_APP_PLUS_APP:"https://app.excalidraw.com",VITE_APP_WS_SERVER_URL:"",VITE_APP_FIREBASE_CONFIG:'{"apiKey":"AIzaSyAd15pYlMci_xIp9ko6wkEsDzAAA0Dn0RU","authDomain":"excalidraw-room-persistence.firebaseapp.com","databaseURL":"https://excalidraw-room-persistence.firebaseio.com","projectId":"excalidraw-room-persistence","storageBucket":"excalidraw-room-persistence.appspot.com","messagingSenderId":"654800341332","appId":"1:654800341332:web:4a692de832b55bd57ce0c1"}',
VITE_APP_DISABLE_TRACKING:"",VITE_PKG_NAME:"@excalidraw/excalidraw",VITE_PKG_VERSION:"0.16.1",VITE_IS_EXCALIDRAW_NPM_PACKAGE:!0}.VITE_WORKER_ID&&[].includes(m)&&window.sa_event&&window.sa_event(p,{category:m,label:D,value:v})}catch(t){console.error("error during analytics",t)}}},7726:function(g,h,b){b.d(h,{EN:function(){return J},eS:function(){return B},im:function(){return t},l$:function(){return V},s:function(){return E}});var l=b(8127),m=b(7041),p=b(8557),D=b(7135),v=m.ZB.includes(devicePixelRatio)?
devicePixelRatio:1,t=function(){return{showWelcomeScreen:!1,theme:m.C6.LIGHT,collaborators:new Map,currentChartType:"bar",currentItemBackgroundColor:m.HN.backgroundColor,currentItemEndArrowhead:"arrow",currentItemFillStyle:m.HN.fillStyle,currentItemFontFamily:m.rk,currentItemFontSize:m.n5,currentItemOpacity:m.HN.opacity,currentItemRoughness:m.HN.roughness,currentItemStartArrowhead:null,currentItemStrokeColor:m.HN.strokeColor,currentItemRoundness:"round",currentItemStrokeStyle:m.HN.strokeStyle,currentItemStrokeWidth:m.HN.strokeWidth,
currentItemTextAlign:m.Hg,cursorButton:"up",activeEmbeddable:null,draggingElement:null,editingElement:null,editingGroupId:null,editingLinearElement:null,activeTool:{type:"selection",customType:null,locked:m.HN.locked,lastActiveTool:null},penMode:!1,penDetected:!1,errorMessage:null,exportBackground:!0,exportScale:v,exportEmbedScene:!1,exportWithDarkMode:!1,fileHandle:null,gridSize:null,isBindingEnabled:!0,defaultSidebarDockedPreference:!1,isLoading:!1,isResizing:!1,isRotating:!1,lastPointerDownWith:"mouse",
multiElement:null,name:"".concat((0,p.t)("labels.untitled"),"-").concat((0,D.Fc)()),contextMenu:null,openMenu:null,openPopup:null,openSidebar:null,openDialog:null,pasteDialog:{shown:!1,data:null},previousSelectedElementIds:{},resizingElement:null,scrolledOutside:!1,scrollX:0,scrollY:0,selectedElementIds:{},selectedGroupIds:{},selectedElementsAreBeingDragged:!1,selectionElement:null,shouldCacheIgnoreZoom:!1,showStats:!1,startBoundElement:null,suggestedBindings:[],frameRendering:{enabled:!0,clip:!0,
name:!0,outline:!0},frameToHighlight:null,editingFrame:null,elementsToHighlight:null,toast:null,viewBackgroundColor:l.HO.white,zenModeEnabled:!1,zoom:{value:1},viewModeEnabled:!1,pendingImageElementId:null,showHyperlinkPopup:!1,selectedLinearElement:null}},r={showWelcomeScreen:{browser:!0,export:!1,server:!1},theme:{browser:!0,export:!1,server:!1},collaborators:{browser:!1,export:!1,server:!1},currentChartType:{browser:!0,export:!1,server:!1},currentItemBackgroundColor:{browser:!0,export:!1,server:!1},
currentItemEndArrowhead:{browser:!0,export:!1,server:!1},currentItemFillStyle:{browser:!0,export:!1,server:!1},currentItemFontFamily:{browser:!0,export:!1,server:!1},currentItemFontSize:{browser:!0,export:!1,server:!1},currentItemRoundness:{browser:!0,export:!1,server:!1},currentItemOpacity:{browser:!0,export:!1,server:!1},currentItemRoughness:{browser:!0,export:!1,server:!1},currentItemStartArrowhead:{browser:!0,export:!1,server:!1},currentItemStrokeColor:{browser:!0,export:!1,server:!1},currentItemStrokeStyle:{browser:!0,
export:!1,server:!1},currentItemStrokeWidth:{browser:!0,export:!1,server:!1},currentItemTextAlign:{browser:!0,export:!1,server:!1},cursorButton:{browser:!0,export:!1,server:!1},activeEmbeddable:{browser:!1,export:!1,server:!1},draggingElement:{browser:!1,export:!1,server:!1},editingElement:{browser:!1,export:!1,server:!1},editingGroupId:{browser:!0,export:!1,server:!1},editingLinearElement:{browser:!1,export:!1,server:!1},activeTool:{browser:!0,export:!1,server:!1},penMode:{browser:!0,export:!1,server:!1},
penDetected:{browser:!0,export:!1,server:!1},errorMessage:{browser:!1,export:!1,server:!1},exportBackground:{browser:!0,export:!1,server:!1},exportEmbedScene:{browser:!0,export:!1,server:!1},exportScale:{browser:!0,export:!1,server:!1},exportWithDarkMode:{browser:!0,export:!1,server:!1},fileHandle:{browser:!1,export:!1,server:!1},gridSize:{browser:!0,export:!0,server:!0},height:{browser:!1,export:!1,server:!1},isBindingEnabled:{browser:!1,export:!1,server:!1},defaultSidebarDockedPreference:{browser:!0,
export:!1,server:!1},isLoading:{browser:!1,export:!1,server:!1},isResizing:{browser:!1,export:!1,server:!1},isRotating:{browser:!1,export:!1,server:!1},lastPointerDownWith:{browser:!0,export:!1,server:!1},multiElement:{browser:!1,export:!1,server:!1},name:{browser:!0,export:!1,server:!1},offsetLeft:{browser:!1,export:!1,server:!1},offsetTop:{browser:!1,export:!1,server:!1},contextMenu:{browser:!1,export:!1,server:!1},openMenu:{browser:!0,export:!1,server:!1},openPopup:{browser:!1,export:!1,server:!1},
openSidebar:{browser:!0,export:!1,server:!1},openDialog:{browser:!1,export:!1,server:!1},pasteDialog:{browser:!1,export:!1,server:!1},previousSelectedElementIds:{browser:!0,export:!1,server:!1},resizingElement:{browser:!1,export:!1,server:!1},scrolledOutside:{browser:!0,export:!1,server:!1},scrollX:{browser:!0,export:!1,server:!1},scrollY:{browser:!0,export:!1,server:!1},selectedElementIds:{browser:!0,export:!1,server:!1},selectedGroupIds:{browser:!0,export:!1,server:!1},selectedElementsAreBeingDragged:{browser:!1,
export:!1,server:!1},selectionElement:{browser:!1,export:!1,server:!1},shouldCacheIgnoreZoom:{browser:!0,export:!1,server:!1},showStats:{browser:!0,export:!1,server:!1},startBoundElement:{browser:!1,export:!1,server:!1},suggestedBindings:{browser:!1,export:!1,server:!1},frameRendering:{browser:!1,export:!1,server:!1},frameToHighlight:{browser:!1,export:!1,server:!1},editingFrame:{browser:!1,export:!1,server:!1},elementsToHighlight:{browser:!1,export:!1,server:!1},toast:{browser:!1,export:!1,server:!1},
viewBackgroundColor:{browser:!0,export:!0,server:!0},width:{browser:!1,export:!1,server:!1},zenModeEnabled:{browser:!0,export:!1,server:!1},zoom:{browser:!0,export:!1,server:!1},viewModeEnabled:{browser:!1,export:!1,server:!1},pendingImageElementId:{browser:!1,export:!1,server:!1},showHyperlinkPopup:{browser:!1,export:!1,server:!1},selectedLinearElement:{browser:!0,export:!1,server:!1}},f=function(H,S){for(var L={},T=0,R=Object.keys(H);T<R.length;T++){var G=R[T],F=r[G];null!=F&&F[S]&&(L[G]=H[G])}return L},
E=function(H){return f(H,"export")},B=function(H){return f(H,"server")},J=function(H){return"eraser"===H.activeTool.type},V=function(H){return"hand"===H.activeTool.type}},9882:function(g,h,b){function l(I,ia){var U="undefined"!=typeof Symbol&&I[Symbol.iterator]||I["@@iterator"];if(!U){if(Array.isArray(I)||(U=function(X,ea){if(X){if("string"==typeof X)return m(X,ea);var pa=Object.prototype.toString.call(X).slice(8,-1);"Object"===pa&&X.constructor&&(pa=X.constructor.name);if("Map"===pa||"Set"===pa)return Array.from(X);
if("Arguments"===pa||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(pa))return m(X,ea)}}(I))||ia&&I&&"number"==typeof I.length){U&&(I=U);var Z=0;ia=function(){};return{s:ia,n:function(){return Z>=I.length?{done:!0}:{done:!1,value:I[Z++]}},e:function(X){throw X;},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 aa,W=!0,fa=!1;return{s:function(){U=U.call(I)},n:function(){var X=U.next();
return W=X.done,X},e:function(X){fa=!0;aa=X},f:function(){try{W||null==U.return||U.return()}finally{if(fa)throw aa;}}}}function m(I,ia){(null==ia||ia>I.length)&&(ia=I.length);for(var U=0,Z=Array(ia);U<ia;U++)Z[U]=I[U];return Z}function p(I,ia){var U=Object.keys(I);if(Object.getOwnPropertySymbols){var Z=Object.getOwnPropertySymbols(I);ia&&(Z=Z.filter(function(aa){return Object.getOwnPropertyDescriptor(I,aa).enumerable}));U.push.apply(U,Z)}return U}function D(I){for(var ia=1;ia<arguments.length;ia++){var U=
null!=arguments[ia]?arguments[ia]:{};ia%2?p(Object(U),!0).forEach(function(Z){(0,t.Z)(I,Z,U[Z])}):Object.getOwnPropertyDescriptors?Object.defineProperties(I,Object.getOwnPropertyDescriptors(U)):p(Object(U)).forEach(function(Z){Object.defineProperty(I,Z,Object.getOwnPropertyDescriptor(U,Z))})}return I}b.d(h,{dz:function(){return T},i$:function(){return V},ps:function(){return M}});var v=b(1930),t=b(7169),r=b(2577),f=b(8127),E=b(7041),B=b(5734),J=b(5236),V="VALID_SPREADSHEET",H=function(I){return(I=
/^([-+]?)[$€£¥₩]?([-+]?)([\d.,]+)[%]?$/.exec(I))?parseFloat("".concat((I[1]||I[2])+I[3]).replace(/,/g,"")):null},S=function(I,ia){return I.slice(1).every(function(U){return null!==H(U[ia])})},L=function(I){var ia=I[0].length;if(2<ia)return{type:"NOT_SPREADSHEET",reason:"More than 2 columns"};if(1===ia){if(!S(I,0))return{type:"NOT_SPREADSHEET",reason:"Value is not numeric"};ia=null===H(I[0][0]);var U=(ia?I.slice(1):I).map(function(W){return H(W[0])});return 2>U.length?{type:"NOT_SPREADSHEET",reason:"Less than two rows"}:
{type:V,spreadsheet:{title:ia?I[0][0]:null,labels:null,values:U}}}ia=S(I,0);U=S(I,1);if(!ia&&!U)return{type:"NOT_SPREADSHEET",reason:"Value is not numeric"};ia=(0,r.Z)(U?[0,1]:[1,0],2);var Z=ia[0],aa=ia[1];U=(ia=null===H(I[0][aa]))?I.slice(1):I;return 2>U.length?{type:"NOT_SPREADSHEET",reason:"Less than 2 rows"}:{type:V,spreadsheet:{title:ia?I[0][aa]:null,labels:U.map(function(W){return W[Z]}),values:U.map(function(W){return H(W[aa])})}}},T=function(I){var ia=I.trim().split("\n").map(function(Z){return Z.trim().split("\t")});
if(ia.length&&2!==ia[0].length&&(ia=I.trim().split("\n").map(function(Z){return Z.trim().split(",")})),0===ia.length)return{type:"NOT_SPREADSHEET",reason:"No values"};var U=ia[0].length;if(!ia.every(function(Z){return Z.length===U}))return{type:"NOT_SPREADSHEET",reason:"All rows don't have same number of columns"};I=L(ia);return I.type!==V&&(ia=L(function(Z){for(var aa=[],W=0;W<Z[0].length;W++){for(var fa=[],X=0;X<Z.length;X++)fa.push(Z[X][W]);aa.push(fa)}return aa}(ia)),ia.type===V)?ia:I},R=(0,f.sF)(f.C2),
G={fillStyle:"hachure",fontFamily:E.rk,fontSize:E.n5,opacity:100,roughness:1,strokeColor:f.HO.black,roundness:null,strokeStyle:"solid",strokeWidth:1,verticalAlign:E.oX.MIDDLE,locked:!1},F=function(I){return{chartWidth:44*I.values.length+12,chartHeight:280}},O=function(I,ia,U,Z,aa,W){var fa=F(I),X=fa.chartWidth,ea=fa.chartHeight;fa=I.title?(0,B.VL)(D(D({backgroundColor:aa,groupIds:[Z]},G),{},{text:I.title,x:ia+X/2,y:U-256-24-E.n5,roundness:null,textAlign:"center"})):null;W=W?(0,B.Up)(D(D({backgroundColor:aa,
groupIds:[Z]},G),{},{type:"rectangle",x:ia,y:U-ea,width:X,height:ea,strokeColor:f.HO.black,fillStyle:"solid",opacity:6})):null;return[].concat((0,v.Z)(W?[W]:[]),(0,v.Z)(fa?[fa]:[]),(0,v.Z)(function(pa,va,ta,xa,Ga){var Ia;return(null===(Ia=pa.labels)||void 0===Ia?void 0:Ia.map(function(Ya,Fa){return(0,B.VL)(D(D({groupIds:[xa],backgroundColor:Ga},G),{},{text:8<Ya.length?"".concat(Ya.slice(0,5),"..."):Ya,x:va+44*Fa+24,y:ta+6,width:32,angle:5.87,fontSize:16,textAlign:"center",verticalAlign:"top"}))}))||
[]}(I,ia,U,Z,aa)),(0,v.Z)(function(pa,va,ta,xa,Ga){var Ia=(0,B.VL)(D(D({groupIds:[xa],backgroundColor:Ga},G),{},{x:va-12,y:ta-12,text:"0",textAlign:"right"}));return[Ia,(0,B.VL)(D(D({groupIds:[xa],backgroundColor:Ga},G),{},{x:va-12,y:ta-256-Ia.height/2,text:Math.max.apply(Math,(0,v.Z)(pa.values)).toLocaleString(),textAlign:"right"}))]}(I,ia,U,Z,aa)),(0,v.Z)(function(pa,va,ta,xa,Ga){var Ia=F(pa);pa=Ia.chartWidth;Ia=Ia.chartHeight;return[(0,B.y8)(D(D({backgroundColor:Ga,groupIds:[xa]},G),{},{type:"line",
x:va,y:ta,startArrowhead:null,endArrowhead:null,width:pa,points:[[0,0],[pa,0]]})),(0,B.y8)(D(D({backgroundColor:Ga,groupIds:[xa]},G),{},{type:"line",x:va,y:ta,startArrowhead:null,endArrowhead:null,height:Ia,points:[[0,0],[0,-Ia]]})),(0,B.y8)(D(D({backgroundColor:Ga,groupIds:[xa]},G),{},{type:"line",x:va,y:ta-256-12,startArrowhead:null,endArrowhead:null,strokeStyle:"dotted",width:pa,opacity:50,points:[[0,0],[pa,0]]}))]}(I,ia,U,Z,aa)))},M=function(I,ia,U,Z){return"line"===I?function(aa,W,fa){var X,
ea=Math.max.apply(Math,(0,v.Z)(aa.values)),pa=(0,J.kb)(),va=R[Math.floor(Math.random()*R.length)],ta=0,xa=[],Ga=l(aa.values);try{for(Ga.s();!(X=Ga.n()).done;)xa.push([44*ta,-X.value/ea*256]),ta++}catch(Ya){Ga.e(Ya)}finally{Ga.f()}X=Math.max.apply(Math,(0,v.Z)(xa.map(function(Ya){return Ya[0]})));ta=Math.max.apply(Math,(0,v.Z)(xa.map(function(Ya){return Ya[1]})));Ga=Math.min.apply(Math,(0,v.Z)(xa.map(function(Ya){return Ya[0]})));var Ia=Math.min.apply(Math,(0,v.Z)(xa.map(function(Ya){return Ya[1]})));
xa=(0,B.y8)(D(D({backgroundColor:va,groupIds:[pa]},G),{},{type:"line",x:W+12+16,y:fa-12,startArrowhead:null,endArrowhead:null,height:ta-Ia,width:X-Ga,strokeWidth:2,points:xa}));X=aa.values.map(function(Ya,Fa){Fa=44*Fa+6;Ya=-Ya/ea*256+6;return(0,B.Up)(D(D({backgroundColor:va,groupIds:[pa]},G),{},{fillStyle:"solid",strokeWidth:2,type:"ellipse",x:W+Fa+16,y:fa+Ya-24,width:12,height:12}))});ta=aa.values.map(function(Ya,Fa){Fa=44*Fa+6;Ya=Ya/ea*256+18;return(0,B.y8)(D(D({backgroundColor:va,groupIds:[pa]},
G),{},{type:"line",x:W+Fa+16+6,y:fa-Ya,startArrowhead:null,endArrowhead:null,height:Ya,strokeStyle:"dotted",opacity:50,points:[[0,0],[0,Ya]]}))});return[].concat((0,v.Z)(O(aa,W,fa,pa,va,!1)),[xa],(0,v.Z)(ta),(0,v.Z)(X))}(ia,U,Z):function(aa,W,fa){var X=Math.max.apply(Math,(0,v.Z)(aa.values)),ea=(0,J.kb)(),pa=R[Math.floor(Math.random()*R.length)],va=aa.values.map(function(ta,xa){ta=ta/X*256;return(0,B.Up)(D(D({backgroundColor:pa,groupIds:[ea]},G),{},{type:"rectangle",x:W+44*xa+12,y:fa-ta-12,width:32,
height:ta}))});return[].concat((0,v.Z)(va),(0,v.Z)(O(aa,W,fa,ea,pa,!1)))}(ia,U,Z)}},2460:function(g,h,b){b.d(h,{G:function(){return l},l:function(){return m}});var l=function(p){var D=Math,v=D.abs;var t=0;if(0!==p.length)for(var r=0;r<p.length;r++)t=(t<<5)-t+p.charCodeAt(r);p=v.call(D,t);return"hsl(".concat(p%37*10,", ").concat(100,"%, ").concat(83,"%)")},m=function(p){var D;p=null==p||null===(D=p.trim())||void 0===D?void 0:D.codePointAt(0);return(p?String.fromCodePoint(p):"?").toUpperCase()}},278:function(g,
h,b){function l(Z,aa){var W=Object.keys(Z);if(Object.getOwnPropertySymbols){var fa=Object.getOwnPropertySymbols(Z);aa&&(fa=fa.filter(function(X){return Object.getOwnPropertyDescriptor(Z,X).enumerable}));W.push.apply(W,fa)}return W}function m(Z){for(var aa=1;aa<arguments.length;aa++){var W=null!=arguments[aa]?arguments[aa]:{};aa%2?l(Object(W),!0).forEach(function(fa){(0,p.Z)(Z,fa,W[fa])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Z,Object.getOwnPropertyDescriptors(W)):l(Object(W)).forEach(function(fa){Object.defineProperty(Z,
fa,Object.getOwnPropertyDescriptor(W,fa))})}return Z}b.d(h,{dd:function(){return U},mQ:function(){return I},uR:function(){return ia},vQ:function(){return F},vt:function(){return G},wx:function(){return R}});var p=b(7169),D=b(8950);g=b(2975);var v=b.n(g),t=b(2739),r=b(9882),f=b(7041),E=b(9472),B=b(1829),J=b(7729),V=b(3473),H=b(7135),S="",L=!1,T="clipboard"in navigator&&"readText"in navigator.clipboard,R="clipboard"in navigator&&"writeText"in navigator.clipboard,G="clipboard"in navigator&&"write"in
navigator.clipboard&&"ClipboardItem"in window&&"toBlob"in HTMLCanvasElement.prototype,F=function(){var Z=(0,D.Z)(v().mark(function X(W,fa){var ea,pa,va,ta,xa;return v().wrap(function(Ga){for(;;)switch(Ga.prev=Ga.next){case 0:if(ea=new Set(W.filter(function(Ia){return"frame"===Ia.type})),pa=!1,va=W.reduce(function(Ia,Ya){return(0,E.wi)(Ya)&&(pa=!0,fa&&fa[Ya.fileId]&&(Ia[Ya.fileId]=fa[Ya.fileId])),Ia},{}),pa&&!fa&&console.warn("copyToClipboard: attempting to file element(s) without providing associated `files` object."),
ta={type:f.r8.excalidrawClipboard,elements:W.map(function(Ia){return(0,V.$Z)(Ia)&&!ea.has((0,V.$Z)(Ia))?(Ia=(0,B.OL)(Ia),(0,J.DR)(Ia,{frameId:null}),Ia):Ia}),files:fa?va:void 0},xa=JSON.stringify(ta),!(0,H.h2)()){Ga.next=8;break}return Ga.abrupt("return",xa);case 8:return S=xa,Ga.prev=9,L=!1,Ga.next=13,U(xa);case 13:Ga.next=19;break;case 15:Ga.prev=15,Ga.t0=Ga.catch(9),L=!0,console.error(Ga.t0);case 19:case "end":return Ga.stop()}},X,null,[[9,15]])}));return function(W,fa){return Z.apply(this,arguments)}}(),
O=function(){if(!S)return{};try{return JSON.parse(S)}catch(Z){return console.error(Z),{}}},M=function(){var Z=(0,D.Z)(v().mark(function fa(W){var X,ea;return v().wrap(function(pa){for(;;)switch(pa.prev=pa.next){case 0:if(pa.prev=0,!W){pa.next=5;break}pa.t0=null===(X=W.clipboardData)||void 0===X?void 0:X.getData("text/plain");pa.next=11;break;case 5:if(pa.t1=T,!pa.t1){pa.next=10;break}return pa.next=9,navigator.clipboard.readText();case 9:pa.t1=pa.sent;case 10:pa.t0=pa.t1;case 11:return ea=pa.t0,pa.abrupt("return",
(ea||"").trim());case 15:return pa.prev=15,pa.t2=pa.catch(0),pa.abrupt("return","");case 18:case "end":return pa.stop()}},fa,null,[[0,15]])}));return function(W){return Z.apply(this,arguments)}}(),I=function(){var Z=(0,D.Z)(v().mark(function fa(W){var X,ea,pa,va,ta,xa,Ga=arguments;return v().wrap(function(Ia){for(;;)switch(Ia.prev=Ia.next){case 0:return X=1<Ga.length&&void 0!==Ga[1]&&Ga[1],Ia.next=3,M(W);case 3:if((ea=Ia.sent)&&(X||!ea.includes(t.oj))){Ia.next=6;break}return Ia.abrupt("return",O());
case 6:var Ya;if(Ya=!X)Ya=(0,r.dz)(ea),Ya=Ya.type===r.i$?{spreadsheet:Ya.spreadsheet}:null;if(!(pa=Ya)){Ia.next=9;break}return Ia.abrupt("return",pa);case 9:va=O();Ia.prev=10;ta=JSON.parse(ea);xa=ta.type===f.r8.excalidrawClipboardWithAPI;Ya=ta;if(![f.r8.excalidraw,f.r8.excalidrawClipboard,f.r8.excalidrawClipboardWithAPI].includes(null==Ya?void 0:Ya.type)||!Array.isArray(Ya.elements)){Ia.next=15;break}return Ia.abrupt("return",{elements:ta.elements,files:ta.files,text:X?JSON.stringify(ta.elements,
null,2):void 0,programmaticAPI:xa});case 15:Ia.next=19;break;case 17:Ia.prev=17,Ia.t0=Ia.catch(10);case 19:return Ia.abrupt("return",L&&va.elements?m(m({},va),{},{text:X?JSON.stringify(va.elements,null,2):void 0}):{text:ea});case 20:case "end":return Ia.stop()}},fa,null,[[10,17]])}));return function(W){return Z.apply(this,arguments)}}(),ia=function(){var Z=(0,D.Z)(v().mark(function fa(W){return v().wrap(function(X){for(;;)switch(X.prev=X.next){case 0:return X.prev=0,X.next=3,navigator.clipboard.write([new window.ClipboardItem((0,p.Z)({},
f.LO.png,W))]);case 3:case 21:X.next=24;break;case 5:if(X.prev=5,X.t0=X.catch(0),!(0,H.y8)(W)){X.next=23;break}return X.t1=navigator.clipboard,X.t2=window.ClipboardItem,X.t3=p.Z,X.t4={},X.t5=f.LO.png,X.next=15,W;case 15:return X.t6=X.sent,X.t7=(0,X.t3)(X.t4,X.t5,X.t6),X.t8=new X.t2(X.t7),X.t9=[X.t8],X.next=21,X.t1.write.call(X.t1,X.t9);case 23:throw X.t0;case 24:case "end":return X.stop()}},fa,null,[[0,5]])}));return function(W){return Z.apply(this,arguments)}}(),U=function(){var Z=(0,D.Z)(v().mark(function fa(W){var X;
return v().wrap(function(ea){for(;;)switch(ea.prev=ea.next){case 0:if(X=!1,!R){ea.next=11;break}return ea.prev=2,ea.next=5,navigator.clipboard.writeText(W||"");case 5:X=!0;ea.next=11;break;case 8:ea.prev=8,ea.t0=ea.catch(2),console.error(ea.t0);case 11:var pa;if(!(pa=X)){var va=W||" ",ta="rtl"===document.documentElement.getAttribute("dir");pa=document.createElement("textarea");pa.style.border="0";pa.style.padding="0";pa.style.margin="0";pa.style.position="absolute";pa.style[ta?"right":"left"]="-9999px";
pa.style.top="".concat(window.pageYOffset||document.documentElement.scrollTop,"px");pa.style.fontSize="12pt";pa.setAttribute("readonly","");pa.value=va;document.body.appendChild(pa);va=!1;try{pa.select(),pa.setSelectionRange(0,pa.value.length),va=document.execCommand("copy")}catch(xa){console.error(xa)}pa=(pa.remove(),va)}if(pa){ea.next=13;break}throw Error("couldn't copy");case 13:case "end":return ea.stop()}},fa,null,[[2,8]])}));return function(W){return Z.apply(this,arguments)}}()},8127:function(g,
h,b){function l(F,O){var M=Object.keys(F);if(Object.getOwnPropertySymbols){var I=Object.getOwnPropertySymbols(F);O&&(I=I.filter(function(ia){return Object.getOwnPropertyDescriptor(F,ia).enumerable}));M.push.apply(M,I)}return M}function m(F){for(var O=1;O<arguments.length;O++){var M=null!=arguments[O]?arguments[O]:{};O%2?l(Object(M),!0).forEach(function(I){(0,p.Z)(F,I,M[I])}):Object.getOwnPropertyDescriptors?Object.defineProperties(F,Object.getOwnPropertyDescriptors(M)):l(Object(M)).forEach(function(I){Object.defineProperty(F,
I,Object.getOwnPropertyDescriptor(M,I))})}return F}b.d(h,{C2:function(){return f},HO:function(){return J},Lx:function(){return t},SF:function(){return T},Wk:function(){return L},_T:function(){return B},ay:function(){return S},dC:function(){return r},eq:function(){return H},fY:function(){return V},sF:function(){return R},vq:function(){return G},z8:function(){return E}});var p=b(7169),D=b(5284),v,t=5,r=5,f=4,E=4,B=1;g=[0,2,4,6,8];h=function(F,O){return O.map(function(M){return D[F][M]})};var J={transparent:"transparent",
black:"#1e1e1e",white:"#ffffff",gray:h("gray",g),red:h("red",g),pink:h("pink",g),grape:h("grape",g),violet:h("violet",g),blue:h("blue",g),cyan:h("cyan",g),teal:h("teal",g),green:h("green",g),yellow:h("yellow",g),orange:h("orange",g),bronze:["#f8f1ee","#eaddd7","#d2bab0","#a18072","#846358"]};g=(v=J,"cyan blue violet grape pink green teal yellow orange red".split(" ").reduce(function(F,O){return O in v&&(F[O]=v[O]),F},{}));var V=[J.black,J.red[E],J.green[E],J.blue[E],J.yellow[E]],H=[J.transparent,
J.red[B],J.green[B],J.blue[B],J.yellow[B]],S=[J.white,"#f8f9fa","#f5faff","#fffce8","#fdf8f6"],L=m({transparent:J.transparent,white:J.white,gray:J.gray,black:J.black,bronze:J.bronze},g),T=m({transparent:J.transparent,white:J.white,gray:J.gray,black:J.black,bronze:J.bronze},g),R=function(F){return[J.cyan[F],J.blue[F],J.violet[F],J.grape[F],J.pink[F],J.green[F],J.teal[F],J.yellow[F],J.orange[F],J.red[F]]},G=function(F,O,M){return"#".concat((16777216+(F<<16)+(O<<8)+M).toString(16).slice(1))}},5767:function(g,
h,b){b.d(h,{o:function(){return B},w:function(){return E}});var l=b(2577),m=b(3607),p=b(7903),D=b(8557),v=b(593),t=b(3470),r=b(7975),f=b(4512),E=(0,m.cn)(null),B=function(){var J=(0,m.KO)(E,v.yE);J=(0,l.Z)(J,2);var V=J[0],H=J[1],S=(0,t.eh)();return V&&"clearCanvas"===V?(0,f.jsx)(r.Z,{onConfirm:function(){S.executeAction(p.mo);H(null)},onCancel:function(){return H(null)},title:(0,D.t)("clearCanvasDialog.title"),children:(0,f.jsxs)("p",{className:"clear-canvas__content",children:[" ",(0,D.t)("alerts.clearReset")]})}):
null}},3470:function(g,h,b){function l(Sb,Ea){var $b=Object.keys(Sb);if(Object.getOwnPropertySymbols){var Xb=Object.getOwnPropertySymbols(Sb);Ea&&(Xb=Xb.filter(function(sb){return Object.getOwnPropertyDescriptor(Sb,sb).enumerable}));$b.push.apply($b,Xb)}return $b}function m(Sb){for(var Ea=1;Ea<arguments.length;Ea++){var $b=null!=arguments[Ea]?arguments[Ea]:{};Ea%2?l(Object($b),!0).forEach(function(Xb){(0,la.Z)(Sb,Xb,$b[Xb])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Sb,Object.getOwnPropertyDescriptors($b)):
l(Object($b)).forEach(function(Xb){Object.defineProperty(Sb,Xb,Object.getOwnPropertyDescriptor($b,Xb))})}return Sb}function p(Sb,Ea){var $b=Object.keys(Sb);if(Object.getOwnPropertySymbols){var Xb=Object.getOwnPropertySymbols(Sb);Ea&&(Xb=Xb.filter(function(sb){return Object.getOwnPropertyDescriptor(Sb,sb).enumerable}));$b.push.apply($b,Xb)}return $b}function D(Sb){for(var Ea=1;Ea<arguments.length;Ea++){var $b=null!=arguments[Ea]?arguments[Ea]:{};Ea%2?p(Object($b),!0).forEach(function(Xb){(0,la.Z)(Sb,
Xb,$b[Xb])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Sb,Object.getOwnPropertyDescriptors($b)):p(Object($b)).forEach(function(Xb){Object.defineProperty(Sb,Xb,Object.getOwnPropertyDescriptor($b,Xb))})}return Sb}function v(Sb,Ea){var $b=Object.keys(Sb);if(Object.getOwnPropertySymbols){var Xb=Object.getOwnPropertySymbols(Sb);Ea&&(Xb=Xb.filter(function(sb){return Object.getOwnPropertyDescriptor(Sb,sb).enumerable}));$b.push.apply($b,Xb)}return $b}function t(Sb){for(var Ea=1;Ea<arguments.length;Ea++){var $b=
null!=arguments[Ea]?arguments[Ea]:{};Ea%2?v(Object($b),!0).forEach(function(Xb){(0,la.Z)(Sb,Xb,$b[Xb])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Sb,Object.getOwnPropertyDescriptors($b)):v(Object($b)).forEach(function(Xb){Object.defineProperty(Sb,Xb,Object.getOwnPropertyDescriptor($b,Xb))})}return Sb}function r(Sb,Ea){var $b="undefined"!=typeof Symbol&&Sb[Symbol.iterator]||Sb["@@iterator"];if(!$b){if(Array.isArray(Sb)||($b=function(zb,xb){if(zb){if("string"==typeof zb)return f(zb,
xb);var Zb=Object.prototype.toString.call(zb).slice(8,-1);"Object"===Zb&&zb.constructor&&(Zb=zb.constructor.name);if("Map"===Zb||"Set"===Zb)return Array.from(zb);if("Arguments"===Zb||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Zb))return f(zb,xb)}}(Sb))||Ea&&Sb&&"number"==typeof Sb.length){$b&&(Sb=$b);var Xb=0;Ea=function(){};return{s:Ea,n:function(){return Xb>=Sb.length?{done:!0}:{done:!1,value:Sb[Xb++]}},e:function(zb){throw zb;},f:Ea}}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 sb,cc=!0,Qb=!1;return{s:function(){$b=$b.call(Sb)},n:function(){var zb=$b.next();return cc=zb.done,zb},e:function(zb){Qb=!0;sb=zb},f:function(){try{cc||null==$b.return||$b.return()}finally{if(Qb)throw sb;}}}}function f(Sb,Ea){(null==Ea||Ea>Sb.length)&&(Ea=Sb.length);for(var $b=0,Xb=Array(Ea);$b<Ea;$b++)Xb[$b]=Sb[$b];return Xb}function E(Sb,Ea){var $b=Object.keys(Sb);if(Object.getOwnPropertySymbols){var Xb=Object.getOwnPropertySymbols(Sb);Ea&&(Xb=Xb.filter(function(sb){return Object.getOwnPropertyDescriptor(Sb,
sb).enumerable}));$b.push.apply($b,Xb)}return $b}function B(Sb){for(var Ea=1;Ea<arguments.length;Ea++){var $b=null!=arguments[Ea]?arguments[Ea]:{};Ea%2?E(Object($b),!0).forEach(function(Xb){(0,la.Z)(Sb,Xb,$b[Xb])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Sb,Object.getOwnPropertyDescriptors($b)):E(Object($b)).forEach(function(Xb){Object.defineProperty(Sb,Xb,Object.getOwnPropertyDescriptor($b,Xb))})}return Sb}function J(Sb,Ea){var $b=Object.keys(Sb);if(Object.getOwnPropertySymbols){var Xb=
Object.getOwnPropertySymbols(Sb);Ea&&(Xb=Xb.filter(function(sb){return Object.getOwnPropertyDescriptor(Sb,sb).enumerable}));$b.push.apply($b,Xb)}return $b}function V(Sb,Ea){var $b=Object.keys(Sb);if(Object.getOwnPropertySymbols){var Xb=Object.getOwnPropertySymbols(Sb);Ea&&(Xb=Xb.filter(function(sb){return Object.getOwnPropertyDescriptor(Sb,sb).enumerable}));$b.push.apply($b,Xb)}return $b}function H(Sb,Ea){var $b="undefined"!=typeof Symbol&&Sb[Symbol.iterator]||Sb["@@iterator"];if(!$b){if(Array.isArray(Sb)||
($b=function(zb,xb){if(zb){if("string"==typeof zb)return S(zb,xb);var Zb=Object.prototype.toString.call(zb).slice(8,-1);"Object"===Zb&&zb.constructor&&(Zb=zb.constructor.name);if("Map"===Zb||"Set"===Zb)return Array.from(zb);if("Arguments"===Zb||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Zb))return S(zb,xb)}}(Sb))||Ea&&Sb&&"number"==typeof Sb.length){$b&&(Sb=$b);var Xb=0;Ea=function(){};return{s:Ea,n:function(){return Xb>=Sb.length?{done:!0}:{done:!1,value:Sb[Xb++]}},e:function(zb){throw zb;},
f:Ea}}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 sb,cc=!0,Qb=!1;return{s:function(){$b=$b.call(Sb)},n:function(){var zb=$b.next();return cc=zb.done,zb},e:function(zb){Qb=!0;sb=zb},f:function(){try{cc||null==$b.return||$b.return()}finally{if(Qb)throw sb;}}}}function S(Sb,Ea){(null==Ea||Ea>Sb.length)&&(Ea=Sb.length);for(var $b=0,Xb=Array(Ea);$b<Ea;$b++)Xb[$b]=Sb[$b];return Xb}function L(Sb,
Ea){var $b,Xb,sb,cc;return ua().wrap(function(Qb){for(;;)switch(Qb.prev=Qb.next){case 0:$b=!0,Xb=H(Sb),Qb.prev=2,Xb.s();case 4:if((sb=Xb.n()).done){Qb.next=14;break}if(cc=sb.value,$b){Qb.next=9;break}return Qb.next=9,Ea;case 9:return $b=!1,Qb.next=12,cc;case 12:Qb.next=4;break;case 14:Qb.next=19;break;case 16:Qb.prev=16,Qb.t0=Qb.catch(2),Xb.e(Qb.t0);case 19:return Qb.prev=19,Xb.f(),Qb.finish(19);case 22:case "end":return Qb.stop()}},$k,null,[[2,16,19,22]])}function T(Sb,Ea){var $b=Object.keys(Sb);
if(Object.getOwnPropertySymbols){var Xb=Object.getOwnPropertySymbols(Sb);Ea&&(Xb=Xb.filter(function(sb){return Object.getOwnPropertyDescriptor(Sb,sb).enumerable}));$b.push.apply($b,Xb)}return $b}function R(Sb){for(var Ea=1;Ea<arguments.length;Ea++){var $b=null!=arguments[Ea]?arguments[Ea]:{};Ea%2?T(Object($b),!0).forEach(function(Xb){(0,la.Z)(Sb,Xb,$b[Xb])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Sb,Object.getOwnPropertyDescriptors($b)):T(Object($b)).forEach(function(Xb){Object.defineProperty(Sb,
Xb,Object.getOwnPropertyDescriptor($b,Xb))})}return Sb}function G(Sb,Ea){var $b=Object.keys(Sb);if(Object.getOwnPropertySymbols){var Xb=Object.getOwnPropertySymbols(Sb);Ea&&(Xb=Xb.filter(function(sb){return Object.getOwnPropertyDescriptor(Sb,sb).enumerable}));$b.push.apply($b,Xb)}return $b}function F(Sb,Ea){var $b="undefined"!=typeof Symbol&&Sb[Symbol.iterator]||Sb["@@iterator"];if(!$b){if(Array.isArray(Sb)||($b=function(zb,xb){if(zb){if("string"==typeof zb)return O(zb,xb);var Zb=Object.prototype.toString.call(zb).slice(8,
-1);"Object"===Zb&&zb.constructor&&(Zb=zb.constructor.name);if("Map"===Zb||"Set"===Zb)return Array.from(zb);if("Arguments"===Zb||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Zb))return O(zb,xb)}}(Sb))||Ea&&Sb&&"number"==typeof Sb.length){$b&&(Sb=$b);var Xb=0;Ea=function(){};return{s:Ea,n:function(){return Xb>=Sb.length?{done:!0}:{done:!1,value:Sb[Xb++]}},e:function(zb){throw zb;},f:Ea}}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 sb,cc=!0,Qb=!1;return{s:function(){$b=$b.call(Sb)},n:function(){var zb=$b.next();return cc=zb.done,zb},e:function(zb){Qb=!0;sb=zb},f:function(){try{cc||null==$b.return||$b.return()}finally{if(Qb)throw sb;}}}}function O(Sb,Ea){(null==Ea||Ea>Sb.length)&&(Ea=Sb.length);for(var $b=0,Xb=Array(Ea);$b<Ea;$b++)Xb[$b]=Sb[$b];return Xb}function M(Sb,Ea){var $b=Object.keys(Sb);if(Object.getOwnPropertySymbols){var Xb=Object.getOwnPropertySymbols(Sb);Ea&&(Xb=Xb.filter(function(sb){return Object.getOwnPropertyDescriptor(Sb,
sb).enumerable}));$b.push.apply($b,Xb)}return $b}function I(Sb){for(var Ea=1;Ea<arguments.length;Ea++){var $b=null!=arguments[Ea]?arguments[Ea]:{};Ea%2?M(Object($b),!0).forEach(function(Xb){(0,la.Z)(Sb,Xb,$b[Xb])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Sb,Object.getOwnPropertyDescriptors($b)):M(Object($b)).forEach(function(Xb){Object.defineProperty(Sb,Xb,Object.getOwnPropertyDescriptor($b,Xb))})}return Sb}function ia(Sb,Ea){var $b=Object.keys(Sb);if(Object.getOwnPropertySymbols){var Xb=
Object.getOwnPropertySymbols(Sb);Ea&&(Xb=Xb.filter(function(sb){return Object.getOwnPropertyDescriptor(Sb,sb).enumerable}));$b.push.apply($b,Xb)}return $b}function U(Sb,Ea){var $b=Object.keys(Sb);if(Object.getOwnPropertySymbols){var Xb=Object.getOwnPropertySymbols(Sb);Ea&&(Xb=Xb.filter(function(sb){return Object.getOwnPropertyDescriptor(Sb,sb).enumerable}));$b.push.apply($b,Xb)}return $b}function Z(Sb){for(var Ea=1;Ea<arguments.length;Ea++){var $b=null!=arguments[Ea]?arguments[Ea]:{};Ea%2?U(Object($b),
!0).forEach(function(Xb){(0,la.Z)(Sb,Xb,$b[Xb])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Sb,Object.getOwnPropertyDescriptors($b)):U(Object($b)).forEach(function(Xb){Object.defineProperty(Sb,Xb,Object.getOwnPropertyDescriptor($b,Xb))})}return Sb}function aa(Sb,Ea){var $b="undefined"!=typeof Symbol&&Sb[Symbol.iterator]||Sb["@@iterator"];if(!$b){if(Array.isArray(Sb)||($b=function(zb,xb){if(zb){if("string"==typeof zb)return W(zb,xb);var Zb=Object.prototype.toString.call(zb).slice(8,
-1);"Object"===Zb&&zb.constructor&&(Zb=zb.constructor.name);if("Map"===Zb||"Set"===Zb)return Array.from(zb);if("Arguments"===Zb||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Zb))return W(zb,xb)}}(Sb))||Ea&&Sb&&"number"==typeof Sb.length){$b&&(Sb=$b);var Xb=0;Ea=function(){};return{s:Ea,n:function(){return Xb>=Sb.length?{done:!0}:{done:!1,value:Sb[Xb++]}},e:function(zb){throw zb;},f:Ea}}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 sb,cc=!0,Qb=!1;return{s:function(){$b=$b.call(Sb)},n:function(){var zb=$b.next();return cc=zb.done,zb},e:function(zb){Qb=!0;sb=zb},f:function(){try{cc||null==$b.return||$b.return()}finally{if(Qb)throw sb;}}}}function W(Sb,Ea){(null==Ea||Ea>Sb.length)&&(Ea=Sb.length);for(var $b=0,Xb=Array(Ea);$b<Ea;$b++)Xb[$b]=Sb[$b];return Xb}function fa(Sb){var Ea=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,
[],function(){})),!0}catch($b){return!1}}();return function(){var $b=(0,Ba.Z)(Sb);if(Ea){var Xb=(0,Ba.Z)(this).constructor;$b=Reflect.construct($b,arguments,Xb)}else $b=$b.apply(this,arguments);return(0,Ka.Z)(this,$b)}}function X(Sb,Ea){var $b=Object.keys(Sb);if(Object.getOwnPropertySymbols){var Xb=Object.getOwnPropertySymbols(Sb);Ea&&(Xb=Xb.filter(function(sb){return Object.getOwnPropertyDescriptor(Sb,sb).enumerable}));$b.push.apply($b,Xb)}return $b}function ea(Sb){for(var Ea=1;Ea<arguments.length;Ea++){var $b=
null!=arguments[Ea]?arguments[Ea]:{};Ea%2?X(Object($b),!0).forEach(function(Xb){(0,la.Z)(Sb,Xb,$b[Xb])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Sb,Object.getOwnPropertyDescriptors($b)):X(Object($b)).forEach(function(Xb){Object.defineProperty(Sb,Xb,Object.getOwnPropertyDescriptor($b,Xb))})}return Sb}b.d(h,{ZP:function(){return gp},qD:function(){return Jl},hY:function(){return dl},Fy:function(){return tl},eh:function(){return Ri},gF:function(){return ek},J0:function(){return xi},bd:function(){return dk},
n9:function(){return ok}});var pa=b(6655),va=b(2577),ta=b(1930),xa=b(8950),Ga=b(8821),Ia=b(5169),Ya=b(3173),Fa=b(2248),Ka=b(7245),Ba=b(2312),la=b(7169),ka=b(2975),ua=b.n(ka),na=b(9787),oa=b.n(na),La=b(5156),Oa=b(9845),Va=b(45),Ma=b(5605),Ua=b(7903),ib=b(1119),vb=b(4289),yb=b(8557),Wa=b(6331),hb=b(7729),ab=b(7267),Qa=b(7135),bb=b(7041),Pa=b(4512),Lb=function(Sb,Ea,$b){if(!(Ea.multiElement||Ea.resizingElement||Ea.editingElement||Ea.draggingElement)){$b=$b();if(null===$b)return{commitToHistory:!1};var Xb=
(0,Qa.xn)(Sb),sb=$b.elements,cc=(0,Qa.xn)(sb);Sb=Sb.filter(function(Qb){return!cc.has(Qb.id)});sb=sb.map(function(Qb){return(0,hb.BE)(Xb.get(Qb.id)||Qb,Qb)}).concat(Sb.map(function(Qb){return(0,hb.BE)(Qb,{isDeleted:!0})}));return(0,ab.$q)(sb,Sb),{elements:sb,appState:m(m({},Ea),$b.appState),commitToHistory:!1,syncHistory:!0}}return{commitToHistory:!1}},xc=b(5435),oc=function(Sb,Ea,$b,Xb,sb,cc){if(Sb.trackEvent)try{"object"===(0,pa.Z)(Sb.trackEvent)&&(Sb.trackEvent.predicate&&!Sb.trackEvent.predicate($b,
Xb,cc)||(0,xc.L)(Sb.trackEvent.category,Sb.trackEvent.action||Sb.name,"".concat(Ea," (").concat(sb.device.isMobile?"mobile":"desktop",")")))}catch(Qb){console.error("error while logging action:",Qb)}},pc=function(){function Sb(Ea,$b,Xb,sb){var cc=this;(0,Ga.Z)(this,Sb);this.actions={};this.renderAction=function(Qb,zb){var xb=cc.app.props.UIOptions.canvasActions;if(cc.actions[Qb]&&"PanelComponent"in cc.actions[Qb]&&(!(Qb in xb)||xb[Qb])){var Zb=cc.actions[Qb];Qb=Zb.PanelComponent;Qb.displayName="PanelComponent";
var qc=cc.getElementsIncludingDeleted(),Dc=cc.getAppState();return(0,Pa.jsx)(Qb,{elements:cc.getElementsIncludingDeleted(),appState:cc.getAppState(),updateData:function(Yc){oc(Zb,"ui",Dc,qc,cc.app,Yc);cc.updater(Zb.perform(cc.getElementsIncludingDeleted(),cc.getAppState(),Yc,cc.app))},appProps:cc.app.props,app:cc.app,data:zb})}return null};this.isActionEnabled=function(Qb){var zb=cc.getElementsIncludingDeleted(),xb=cc.getAppState();return!Qb.predicate||Qb.predicate(zb,xb,cc.app.props,cc.app)};this.updater=
function(Qb){if(!(Qb&&"then"in Qb))return Ea(Qb);Qb.then(function(zb){return Ea(zb)})};this.getAppState=$b;this.getElementsIncludingDeleted=Xb;this.app=sb}return(0,Ia.Z)(Sb,[{key:"registerAction",value:function(Ea){this.actions[Ea.name]=Ea}},{key:"registerAll",value:function(Ea){var $b=this;Ea.forEach(function(Xb){return $b.registerAction(Xb)})}},{key:"handleKeyDown",value:function(Ea){var $b=this,Xb=this.app.props.UIOptions.canvasActions,sb=Object.values(this.actions).sort(function(xb,Zb){return(Zb.keyPriority||
0)-(xb.keyPriority||0)}).filter(function(xb){return(!(xb.name in Xb)||Xb[xb.name])&&xb.keyTest&&xb.keyTest(Ea,$b.getAppState(),$b.getElementsIncludingDeleted(),$b.app)});if(1!==sb.length)return 1<sb.length&&console.warn("Canceling as multiple actions match this shortcut",sb),!1;var cc=sb[0];if(this.getAppState().viewModeEnabled&&!0!==cc.viewMode)return!1;var Qb=this.getElementsIncludingDeleted(),zb=this.getAppState();return oc(cc,"keyboard",zb,Qb,this.app,null),Ea.preventDefault(),Ea.stopPropagation(),
this.updater(sb[0].perform(Qb,zb,null,this.app)),!0}},{key:"executeAction",value:function(Ea){var $b=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"api",Xb=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null,sb=this.getElementsIncludingDeleted(),cc=this.getAppState();oc(Ea,$b,cc,sb,this.app,Xb);this.updater(Ea.perform(sb,cc,Xb,this.app))}}]),Sb}(),Cc=b(9610),bd=b(7726),dc=b(278),Nc=b(2137),Qc=b(9605),Ad=b(7181),Xc=b(5734),sc=b(8627),Sc=b(1829),Ib=b(9472),lb=function(Sb){Sb=Array.from(Sb.values());
return{x:Gb(Sb,function(Ea){return Ea.x})/Sb.length,y:Gb(Sb,function(Ea){return Ea.y})/Sb.length}},Db=function(Sb){var Ea=(0,va.Z)(Sb,2);Sb=Ea[0];Ea=Ea[1];return Math.hypot(Sb.x-Ea.x,Sb.y-Ea.y)},Gb=function(Sb,Ea){return Sb.reduce(function($b,Xb){return $b+Ea(Xb)},0)},db=b(502),rb=function(){function Sb(){var Ea=this;(0,Ga.Z)(this,Sb);this.elementCache=new Map;this.recording=!0;this.stateHistory=[];this.redoStack=[];this.lastEntry=null;this.generateEntry=function($b,Xb){return Ea.dehydrateHistoryEntry({appState:{selectedElementIds:$b.selectedElementIds,
selectedGroupIds:$b.selectedGroupIds,viewBackgroundColor:$b.viewBackgroundColor,editingLinearElement:$b.editingLinearElement,editingGroupId:$b.editingGroupId,name:$b.name},elements:Xb.reduce(function(sb,cc){if((0,Ib.bt)(cc)&&$b.multiElement&&$b.multiElement.id===cc.id){if($b.multiElement&&$b.multiElement.id===cc.id&&2>cc.points.length)return sb;sb.push(D(D({},cc),{},{points:cc.lastCommittedPoint!==cc.points[cc.points.length-1]?cc.points.slice(0,-1):cc.points}))}else sb.push(cc);return sb},[])})}}
return(0,Ia.Z)(Sb,[{key:"hydrateHistoryEntry",value:function(Ea){var $b=this,Xb=Ea.elements;return{appState:JSON.parse(Ea.appState),elements:Xb.map(function(sb){var cc,Qb=null===(cc=$b.elementCache.get(sb.id))||void 0===cc?void 0:cc.get(sb.versionNonce);if(!Qb)throw Error("Element not found: ".concat(sb.id,":").concat(sb.versionNonce));return Qb})}}},{key:"dehydrateHistoryEntry",value:function(Ea){var $b=this,Xb=Ea.elements;return{appState:JSON.stringify(Ea.appState),elements:Xb.map(function(sb){$b.elementCache.has(sb.id)||
$b.elementCache.set(sb.id,new Map);var cc=$b.elementCache.get(sb.id);return cc.has(sb.versionNonce)||cc.set(sb.versionNonce,(0,Sc.OL)(sb)),{id:sb.id,versionNonce:sb.versionNonce}})}}},{key:"getSnapshotForTest",value:function(){var Ea=this;return{recording:this.recording,stateHistory:this.stateHistory.map(function($b){return Ea.hydrateHistoryEntry($b)}),redoStack:this.redoStack.map(function($b){return Ea.hydrateHistoryEntry($b)})}}},{key:"clear",value:function(){this.stateHistory.length=0;this.redoStack.length=
0;this.lastEntry=null;this.elementCache.clear()}},{key:"shouldCreateEntry",value:function(Ea){var $b,Xb=this.lastEntry;if(!Xb||Ea.elements.length!==Xb.elements.length)return!0;for(var sb=Ea.elements.length-1;-1<sb;sb--){var cc=Ea.elements[sb],Qb=Xb.elements[sb];if(!cc||!Qb||cc.id!==Qb.id||cc.versionNonce!==Qb.versionNonce)return!0}for($b in Ea.appState){var zb,xb;if(("editingLinearElement"!==$b||(null===(zb=Ea.appState[$b])||void 0===zb?void 0:zb.elementId)!==(null===(xb=Xb.appState[$b])||void 0===
xb?void 0:xb.elementId))&&"selectedElementIds"!==$b&&"selectedGroupIds"!==$b&&Ea.appState[$b]!==Xb.appState[$b])return!0}return!1}},{key:"pushEntry",value:function(Ea,$b){Ea=this.generateEntry(Ea,$b);($b=this.hydrateHistoryEntry(Ea))&&this.shouldCreateEntry($b)&&(this.stateHistory.push(Ea),this.lastEntry=$b,this.clearRedoStack())}},{key:"clearRedoStack",value:function(){this.redoStack.splice(0,this.redoStack.length)}},{key:"redoOnce",value:function(){if(0===this.redoStack.length)return null;var Ea=
this.redoStack.pop();return void 0!==Ea?(this.stateHistory.push(Ea),this.hydrateHistoryEntry(Ea)):null}},{key:"undoOnce",value:function(){if(1===this.stateHistory.length)return null;var Ea=this.stateHistory.pop(),$b=this.stateHistory[this.stateHistory.length-1];return void 0!==Ea?(this.redoStack.push(Ea),this.hydrateHistoryEntry($b)):null}},{key:"setCurrentState",value:function(Ea,$b){this.lastEntry=this.hydrateHistoryEntry(this.generateEntry(Ea,$b))}},{key:"resumeRecording",value:function(){this.recording=
!0}},{key:"record",value:function(Ea,$b){this.recording&&(this.pushEntry(Ea,$b),this.recording=!1)}}]),Sb}(),Nb=b(9799),fc=b(3795),Bc=b(9547),Jc=b(3223),ic=b(3765),Oc=[{icon:ib.zu,value:"selection",key:Wa.tW.V,numericKey:Wa.tW[1],fillable:!0},{icon:ib.OW,value:"rectangle",key:Wa.tW.R,numericKey:Wa.tW[2],fillable:!0},{icon:ib.nb,value:"diamond",key:Wa.tW.D,numericKey:Wa.tW[3],fillable:!0},{icon:ib.Re,value:"ellipse",key:Wa.tW.O,numericKey:Wa.tW[4],fillable:!0},{icon:ib.e0,value:"arrow",key:Wa.tW.A,
numericKey:Wa.tW[5],fillable:!0},{icon:ib.zb,value:"line",key:Wa.tW.L,numericKey:Wa.tW[6],fillable:!0},{icon:ib.Pm,value:"freedraw",key:[Wa.tW.P,Wa.tW.X],numericKey:Wa.tW[7],fillable:!1},{icon:ib.VL,value:"text",key:Wa.tW.T,numericKey:Wa.tW[8],fillable:!1},{icon:ib.XB,value:"image",key:null,numericKey:Wa.tW[9],fillable:!1},{icon:ib.$q,value:"eraser",key:Wa.tW.E,numericKey:Wa.tW[0],fillable:!1}],Rc=b(5434),fd=b(8584),pd=b(3379),Ic=b.n(pd),wc=b(7795),je=b.n(wc),pf=b(569),qe=b.n(pf),ue=b(3565),kd=b.n(ue),
Ae=b(9216),Bf=b.n(Ae),gg=b(4589),jc=b.n(gg),Zc=b(6578),Gc={};Gc.styleTagTransform=jc();Gc.setAttributes=kd();Gc.insert=qe().bind(null,"head");Gc.domAPI=je();Gc.insertStyleElement=Bf();Ic()(Zc.Z,Gc);Zc.Z&&Zc.Z.locals&&Zc.Z.locals;var ub=b(6445),Bb=oa().memo(function(Sb){var Ea=Sb.actionManager,$b=Sb.items,Xb=Sb.top;Sb=Sb.left;var sb=ek(),cc=ok(),Qb=dk(),zb=$b.reduce(function(xb,Zb){return!Zb||"separator"!==Zb&&Zb.predicate&&!Zb.predicate(Qb,sb,Ea.app.props,Ea.app)||xb.push(Zb),xb},[]);return(0,Pa.jsx)(fd.J,
{onCloseRequest:function(){return cc({contextMenu:null})},top:Xb,left:Sb,fitInViewport:!0,offsetLeft:sb.offsetLeft,offsetTop:sb.offsetTop,viewportWidth:sb.width,viewportHeight:sb.height,children:(0,Pa.jsx)("ul",{className:"context-menu",onContextMenu:function(xb){return xb.preventDefault()},children:zb.map(function(xb,Zb){var qc;if("separator"===xb)return zb[Zb-1]&&"separator"!==zb[Zb-1]?(0,Pa.jsx)("hr",{className:"context-menu-item-separator"},Zb):null;var Dc=xb.name,Yc="";return xb.contextItemLabel&&
(Yc="function"==typeof xb.contextItemLabel?(0,yb.t)(xb.contextItemLabel(Qb,sb,Ea.app)):(0,yb.t)(xb.contextItemLabel)),(0,Pa.jsx)("li",{"data-testid":Dc,onClick:function(){cc({contextMenu:null},function(){Ea.executeAction(xb,"contextMenu")})},children:(0,Pa.jsxs)("button",{className:(0,Va.Z)("context-menu-item",{dangerous:"deleteSelectedElements"===Dc,checkmark:null===(qc=xb.checked)||void 0===qc?void 0:qc.call(xb,sb)}),children:[(0,Pa.jsx)("div",{className:"context-menu-item__label",children:Yc}),
(0,Pa.jsx)("kbd",{className:"context-menu-item__shortcut",children:Dc?(0,ub.C)(Dc):""})]})},Zb)})})})}),Eb=b(2726),hd=b(6517),Ud=b(7786),Td=b(3440),Ue=b(554),kb=b(6086),tb={};tb.styleTagTransform=jc();tb.setAttributes=kd();tb.insert=qe().bind(null,"head");tb.domAPI=je();tb.insertStyleElement=Bf();Ic()(kb.Z,tb);kb.Z&&kb.Z.locals&&kb.Z.locals;var ob=b(8103),Ub=function(Sb){var Ea,$b=Sb.appState,Xb=Sb.renderAction;Sb=(0,Bc.Zs)((0,Xc.Lm)(Sb.elements),$b);var sb=!1;2===Sb.length&&((0,Ib.Xo)(Sb[0])||(0,Ib.Xo)(Sb[1]))&&
(sb=!0);var cc,Qb=!!$b.editingElement,zb=tl(),xb="rtl"===document.documentElement.getAttribute("dir"),Zb=(0,Bc.$b)($b.activeTool.type)||Sb.some(function(ed){return(0,Bc.$b)(ed.type)&&!(0,Qa.Qm)(ed.backgroundColor)}),qc=(0,Bc.$b)($b.activeTool.type)||Sb.some(function(ed){return(0,Bc.$b)(ed.type)}),Dc=1===Sb.length||sb,Yc=(null===(Ea=Sb[0])||void 0===Ea?void 0:Ea.type)||null;Ea=r(Sb);try{for(Ea.s();!(cc=Ea.n()).done;)if(cc.value.type!==Yc){Yc=null;break}}catch(ed){Ea.e(ed)}finally{Ea.f()}return(0,Pa.jsxs)("div",
{className:"panelColumn",children:[(0,Pa.jsx)("div",{children:((0,Ud.PD)($b.activeTool.type)&&"image"!==$b.activeTool.type&&"image"!==Yc&&"frame"!==Yc||Sb.some(function(ed){return(0,Ud.PD)(ed.type)}))&&Xb("changeStrokeColor")}),qc&&(0,Pa.jsx)("div",{children:Xb("changeBackgroundColor")}),Zb&&Xb("changeFillStyle"),((0,Bc.Zd)($b.activeTool.type)||Sb.some(function(ed){return(0,Bc.Zd)(ed.type)}))&&Xb("changeStrokeWidth"),("freedraw"===$b.activeTool.type||Sb.some(function(ed){return"freedraw"===ed.type}))&&
Xb("changeStrokeShape"),((0,Bc.M9)($b.activeTool.type)||Sb.some(function(ed){return(0,Bc.M9)(ed.type)}))&&(0,Pa.jsxs)(Pa.Fragment,{children:[Xb("changeStrokeStyle"),Xb("changeSloppiness")]}),((0,Bc.sh)($b.activeTool.type)||Sb.some(function(ed){return(0,Bc.sh)(ed.type)}))&&(0,Pa.jsx)(Pa.Fragment,{children:Xb("changeRoundness")}),((0,Bc.bZ)($b.activeTool.type)||Sb.some(function(ed){return(0,Bc.bZ)(ed.type)}))&&(0,Pa.jsxs)(Pa.Fragment,{children:[Xb("changeFontSize"),Xb("changeFontFamily"),(0,Ue.aV)(Sb)&&
Xb("changeTextAlign")]}),(0,Ue.cn)(Sb)&&Xb("changeVerticalAlign"),((0,Bc.Un)($b.activeTool.type)||Sb.some(function(ed){return(0,Bc.Un)(ed.type)}))&&(0,Pa.jsx)(Pa.Fragment,{children:Xb("changeArrowhead")}),Xb("changeOpacity"),(0,Pa.jsxs)("fieldset",{children:[(0,Pa.jsx)("legend",{children:(0,yb.t)("labels.layers")}),(0,Pa.jsxs)("div",{className:"buttonList",children:[Xb("sendToBack"),Xb("sendBackward"),Xb("bringToFront"),Xb("bringForward")]})]}),1<Sb.length&&!sb&&(0,Pa.jsxs)("fieldset",{children:[(0,Pa.jsx)("legend",
{children:(0,yb.t)("labels.align")}),(0,Pa.jsxs)("div",{className:"buttonList",children:[xb?(0,Pa.jsxs)(Pa.Fragment,{children:[Xb("alignRight"),Xb("alignHorizontallyCentered"),Xb("alignLeft")]}):(0,Pa.jsxs)(Pa.Fragment,{children:[Xb("alignLeft"),Xb("alignHorizontallyCentered"),Xb("alignRight")]}),2<Sb.length&&Xb("distributeHorizontally"),(0,Pa.jsx)("div",{style:{flexBasis:"100%",height:0}}),(0,Pa.jsxs)("div",{style:{display:"flex",flexWrap:"wrap",gap:".5rem",marginTop:"-0.5rem"},children:[Xb("alignTop"),
Xb("alignVerticallyCentered"),Xb("alignBottom"),2<Sb.length&&Xb("distributeVertically")]})]})]}),!Qb&&0<Sb.length&&(0,Pa.jsxs)("fieldset",{children:[(0,Pa.jsx)("legend",{children:(0,yb.t)("labels.actions")}),(0,Pa.jsxs)("div",{className:"buttonList",children:[!zb.isMobile&&Xb("duplicateSelection"),!zb.isMobile&&Xb("deleteSelectedElements"),Xb("group"),Xb("ungroup"),Dc&&Xb("hyperlink")]})]})]})},Tb=function(Sb){var Ea=Sb.interactiveCanvas,$b=Sb.activeTool,Xb=Sb.setAppState,sb=Sb.onImageAction,cc=Sb.appState;
Sb=(0,na.useState)(!1);Sb=(0,va.Z)(Sb,2);var Qb=Sb[0],zb=Sb[1];Sb=tl();return(0,Pa.jsxs)(Pa.Fragment,{children:[Oc.map(function(xb,Zb){var qc=xb.value;Zb=xb.icon;var Dc=xb.key,Yc=xb.numericKey;xb=xb.fillable;var ed=(0,yb.t)("toolBar.".concat(qc)),nd=(Dc=Dc&&(0,Qa.Oo)("string"==typeof Dc?Dc:Dc[0]))?"".concat(Dc," ").concat((0,yb.t)("helpDialog.or")," ").concat(Yc):"".concat(Yc);return(0,Pa.jsx)(vb.V,{className:(0,Va.Z)("Shape",{fillable:xb}),type:"radio",icon:Zb,checked:$b.type===qc,name:"editor-current-shape",
title:"".concat((0,Qa.Oo)(ed)," — ").concat(nd),keyBindingLabel:Yc||Dc,"aria-label":(0,Qa.Oo)(ed),"aria-keyshortcuts":nd,"data-testid":"toolbar-".concat(qc),onPointerDown:function(Rd){Rd=Rd.pointerType;cc.penDetected||"pen"!==Rd||Xb({penDetected:!0,penMode:!0})},onChange:function(Rd){Rd=Rd.pointerType;cc.activeTool.type!==qc&&(0,xc.L)("toolbar",qc,"ui");var ce=(0,Qa.Om)(cc,{type:qc});Xb({activeTool:ce,activeEmbeddable:null,multiElement:null,selectedElementIds:{}});(0,Qa.Uk)(Ea,t(t({},cc),{},{activeTool:ce}));
"image"===qc&&sb({pointerType:Rd})}},qc)}),(0,Pa.jsx)("div",{className:"App-toolbar__divider"}),Sb.isMobile?(0,Pa.jsxs)(Pa.Fragment,{children:[(0,Pa.jsx)(vb.V,{className:(0,Va.Z)("Shape",{fillable:!1}),type:"radio",icon:ib.zl,checked:"frame"===$b.type,name:"editor-current-shape",title:"".concat((0,Qa.Oo)((0,yb.t)("toolBar.frame"))," — ").concat(Wa.tW.F.toLocaleUpperCase()),keyBindingLabel:Wa.tW.F.toLocaleUpperCase(),"aria-label":(0,Qa.Oo)((0,yb.t)("toolBar.frame")),"aria-keyshortcuts":Wa.tW.F.toLocaleUpperCase(),
"data-testid":"toolbar-frame",onPointerDown:function(xb){xb=xb.pointerType;cc.penDetected||"pen"!==xb||Xb({penDetected:!0,penMode:!0})},onChange:function(xb){xb.pointerType;(0,xc.L)("toolbar","frame","ui");xb=(0,Qa.Om)(cc,{type:"frame"});Xb({activeTool:xb,multiElement:null,selectedElementIds:{},activeEmbeddable:null})}}),(0,Pa.jsx)(vb.V,{className:(0,Va.Z)("Shape",{fillable:!1}),type:"radio",icon:ib.FL,checked:"embeddable"===$b.type,name:"editor-current-shape",title:(0,Qa.Oo)((0,yb.t)("toolBar.embeddable")),
"aria-label":(0,Qa.Oo)((0,yb.t)("toolBar.embeddable")),"data-testid":"toolbar-embeddable",onPointerDown:function(xb){xb=xb.pointerType;cc.penDetected||"pen"!==xb||Xb({penDetected:!0,penMode:!0})},onChange:function(xb){xb.pointerType;(0,xc.L)("toolbar","embeddable","ui");xb=(0,Qa.Om)(cc,{type:"embeddable"});Xb({activeTool:xb,multiElement:null,selectedElementIds:{},activeEmbeddable:null})}})]}):(0,Pa.jsxs)(ob.Z,{open:Qb,children:[(0,Pa.jsx)(ob.Z.Trigger,{className:"App-toolbar__extra-tools-trigger",
onToggle:function(){return zb(!Qb)},title:(0,yb.t)("toolBar.extraTools"),children:ib.dg}),(0,Pa.jsxs)(ob.Z.Content,{onClickOutside:function(){return zb(!1)},onSelect:function(){return zb(!1)},className:"App-toolbar__extra-tools-dropdown",children:[(0,Pa.jsx)(ob.Z.Item,{onSelect:function(){var xb=(0,Qa.Om)(cc,{type:"frame"});Xb({activeTool:xb,multiElement:null,selectedElementIds:{}})},icon:ib.zl,shortcut:Wa.tW.F.toLocaleUpperCase(),"data-testid":"toolbar-frame",children:(0,yb.t)("toolBar.frame")}),
(0,Pa.jsx)(ob.Z.Item,{onSelect:function(){var xb=(0,Qa.Om)(cc,{type:"embeddable"});Xb({activeTool:xb,multiElement:null,selectedElementIds:{}})},icon:ib.FL,"data-testid":"toolbar-embeddable",children:(0,yb.t)("toolBar.embeddable")})]})]})]})},rd=function(Sb){var Ea=Sb.renderAction;Sb.zoom;return(0,Pa.jsx)(hd.Z.Col,{gap:1,className:"zoom-actions",children:(0,Pa.jsxs)(hd.Z.Row,{align:"center",children:[Ea("zoomOut"),Ea("resetZoom"),Ea("zoomIn")]})})},td=function(Sb){var Ea=Sb.renderAction;return(0,Pa.jsxs)("div",
{className:"undo-redo-buttons ".concat(Sb.className),children:[(0,Pa.jsx)("div",{className:"undo-button-container",children:(0,Pa.jsx)(Td.u,{label:(0,yb.t)("buttons.undo"),children:Ea("undo")})}),(0,Pa.jsx)("div",{className:"redo-button-container",children:(0,Pa.jsxs)(Td.u,{label:(0,yb.t)("buttons.redo"),children:[" ",Ea("redo")]})})]})},Hd=function(Sb){var Ea=Sb.actionManager;return(0,Pa.jsx)("button",{className:(0,Va.Z)("disable-zen-mode",{"disable-zen-mode--visible":Sb.showExitZenModeBtn}),onClick:function(){return Ea.executeAction(Ua.JN)},
children:(0,yb.t)("buttons.exitZenMode")})},te=function(Sb){var Ea=Sb.renderAction;return(0,Pa.jsx)("div",{className:"finalize-button ".concat(Sb.className),children:Ea("finalize",{size:"small"})})},ve=b(810),pe=function(Sb){var Ea=Sb.children,$b=Sb.onClose;Sb=(0,na.useState)(!!Ea);var Xb=(0,va.Z)(Sb,2);Sb=Xb[0];var sb=Xb[1],cc=xi().container;Xb=oa().useCallback(function(){sb(!1);$b&&$b();null==cc||cc.focus()},[$b,cc]);return(0,Pa.jsx)(Pa.Fragment,{children:Sb&&(0,Pa.jsx)(ve.V,{size:"small",onCloseRequest:Xb,
title:(0,yb.t)("errorDialog.title"),children:(0,Pa.jsx)("div",{style:{whiteSpace:"pre-wrap"},children:Ea})})})},$d=b(608),Ab=b(8165),ec=b(6282),vc=b(3529),Xa=b(6217),sa={};sa.styleTagTransform=jc();sa.setAttributes=kd();sa.insert=qe().bind(null,"head");sa.domAPI=je();sa.insertStyleElement=Bf();Ic()(Xa.Z,sa);Xa.Z&&Xa.Z.locals&&Xa.Z.locals;var qa=function(Sb){var Ea=Sb.onChange,$b=Sb.value,Xb=Sb.name;return(0,Pa.jsx)("div",{className:"RadioGroup",children:Sb.choices.map(function(sb){return(0,Pa.jsxs)("div",
{className:(0,Va.Z)("RadioGroup__choice",{active:sb.value===$b}),children:[(0,Pa.jsx)("input",{name:Xb,type:"radio",checked:sb.value===$b,onChange:function(){return Ea(sb.value)}}),sb.label]},sb.label)})})},Da=b(7802),Ta={};Ta.styleTagTransform=jc();Ta.setAttributes=kd();Ta.insert=qe().bind(null,"head");Ta.domAPI=je();Ta.insertStyleElement=Bf();Ic()(Da.Z,Ta);Da.Z&&Da.Z.locals&&Da.Z.locals;var wb=function(Sb){var Ea=Sb.title,$b=Sb.name,Xb=Sb.checked,sb=Sb.onChange;Sb=Sb.disabled;Sb=void 0!==Sb&&Sb;
return(0,Pa.jsx)("div",{className:(0,Va.Z)("Switch",{toggled:Xb,disabled:Sb}),children:(0,Pa.jsx)("input",{name:$b,id:$b,title:Ea,type:"checkbox",checked:Xb,disabled:Sb,onChange:function(){return sb(!Xb)},onKeyDown:function(cc){" "===cc.key&&sb(!Xb)}})})},ac=b(9706),Hc={};Hc.styleTagTransform=jc();Hc.setAttributes=kd();Hc.insert=qe().bind(null,"head");Hc.domAPI=je();Hc.insertStyleElement=Bf();Ic()(ac.Z,Hc);ac.Z&&ac.Z.locals&&ac.Z.locals;var Wc=b(8960),Wd={};Wd.styleTagTransform=jc();Wd.setAttributes=
kd();Wd.insert=qe().bind(null,"head");Wd.domAPI=je();Wd.insertStyleElement=Bf();Ic()(Wc.Z,Wd);Wc.Z&&Wc.Z.locals&&Wc.Z.locals;var re=(0,na.forwardRef)(function(Sb,Ea){var $b=Sb.children,Xb=Sb.startIcon,sb=Sb.onClick,cc=Sb.label,Qb=Sb.variant;Qb=void 0===Qb?"filled":Qb;var zb=Sb.color,xb=Sb.size;xb=void 0===xb?"medium":xb;var Zb=Sb.fullWidth;Sb=Sb.className;return(0,Pa.jsxs)("button",{className:(0,Va.Z)("ExcButton","ExcButton--color-".concat(void 0===zb?"primary":zb),"ExcButton--variant-".concat(Qb),
"ExcButton--size-".concat(xb),{"ExcButton--fullWidth":Zb},Sb),onClick:sb,type:"button","aria-label":cc,ref:Ea,children:[Xb&&(0,Pa.jsx)("div",{className:"ExcButton__icon","aria-hidden":!0,children:Xb}),"icon"!==Qb&&(null!=$b?$b:cc)]})}),xe="filter"in document.createElement("canvas").getContext("2d"),Cf=function(){return(0,Pa.jsxs)("div",{children:[(0,Pa.jsx)("h3",{children:(0,yb.t)("canvasError.cannotShowPreview")}),(0,Pa.jsx)("p",{children:(0,Pa.jsx)("span",{children:(0,yb.t)("canvasError.canvasTooBig")})}),
(0,Pa.jsxs)("em",{children:["(",(0,yb.t)("canvasError.canvasTooBigTip"),")"]})]})},kf=function(Sb){var Ea=Sb.appState,$b=Sb.elements,Xb=Sb.files,sb=Sb.actionManager,cc=Sb.onExportImage;Sb=dl();var Qb=(0,na.useState)(Ea.name),zb=(0,va.Z)(Qb,2);Qb=zb[0];var xb=zb[1];zb=(0,Bc.N)($b,Ea);var Zb=(0,na.useState)(zb),qc=(0,va.Z)(Zb,2);Zb=qc[0];var Dc=qc[1];qc=(0,na.useState)(Ea.exportBackground);var Yc=(0,va.Z)(qc,2);qc=Yc[0];var ed=Yc[1];Yc=(0,na.useState)(Ea.exportWithDarkMode);var nd=(0,va.Z)(Yc,2);Yc=
nd[0];var Rd=nd[1];nd=(0,na.useState)(Ea.exportEmbedScene);var ce=(0,va.Z)(nd,2);nd=ce[0];var Yd=ce[1];ce=(0,na.useState)(Ea.exportScale);var Ne=(0,va.Z)(ce,2);ce=Ne[0];var ag=Ne[1],pg=(0,na.useRef)(null);Ne=(0,na.useState)(null);Ne=(0,va.Z)(Ne,2);var Gf=Ne[0],Tf=Ne[1],nf=Zb?(0,Bc.eD)($b,Ea,{includeBoundTextElement:!0,includeElementsInFrames:!0}):$b;return(0,na.useEffect)(function(){var Ze=pg.current;if(Ze){var xg=Ze.offsetWidth,og=Ze.offsetHeight;xg&&(0,vc.NL)({elements:nf,appState:Ea,files:Xb,exportPadding:bb.qy,
maxWidthOrHeight:Math.max(xg,og)}).then(function(hf){return Tf(null),(0,Ab._c)(hf).then(function(){Ze.replaceChildren(hf)})}).catch(function(hf){console.error(hf);Tf(hf)})}},[Ea,Xb,nf]),(0,Pa.jsxs)("div",{className:"ImageExportModal",children:[(0,Pa.jsx)("h3",{children:(0,yb.t)("imageExportDialog.header")}),(0,Pa.jsxs)("div",{className:"ImageExportModal__preview",children:[(0,Pa.jsx)("div",{className:"ImageExportModal__preview__canvas",ref:pg,children:Gf&&(0,Pa.jsx)(Cf,{})}),(0,Pa.jsx)("div",{className:"ImageExportModal__preview__filename",
children:!ec.kr&&(0,Pa.jsx)("input",{type:"text",className:"TextInput",value:Qb,style:{width:"30ch"},disabled:void 0!==Sb.name||Ea.viewModeEnabled,onChange:function(Ze){xb(Ze.target.value);sb.executeAction($d.zX,"ui",Ze.target.value)}})})]}),(0,Pa.jsxs)("div",{className:"ImageExportModal__settings",children:[(0,Pa.jsx)("h3",{children:(0,yb.t)("imageExportDialog.header")}),zb&&(0,Pa.jsx)(Df,{label:(0,yb.t)("imageExportDialog.label.onlySelected"),name:"exportOnlySelected",children:(0,Pa.jsx)(wb,{name:"exportOnlySelected",
checked:Zb,onChange:function(Ze){Dc(Ze)}})}),(0,Pa.jsx)(Df,{label:(0,yb.t)("imageExportDialog.label.withBackground"),name:"exportBackgroundSwitch",children:(0,Pa.jsx)(wb,{name:"exportBackgroundSwitch",checked:qc,onChange:function(Ze){ed(Ze);sb.executeAction($d.XA,"ui",Ze)}})}),xe&&(0,Pa.jsx)(Df,{label:(0,yb.t)("imageExportDialog.label.darkMode"),name:"exportDarkModeSwitch",children:(0,Pa.jsx)(wb,{name:"exportDarkModeSwitch",checked:Yc,onChange:function(Ze){Rd(Ze);sb.executeAction($d.bJ,"ui",Ze)}})}),
(0,Pa.jsx)(Df,{label:(0,yb.t)("imageExportDialog.label.embedScene"),tooltip:(0,yb.t)("imageExportDialog.tooltip.embedScene"),name:"exportEmbedSwitch",children:(0,Pa.jsx)(wb,{name:"exportEmbedSwitch",checked:nd,onChange:function(Ze){Yd(Ze);sb.executeAction($d.Du,"ui",Ze)}})}),(0,Pa.jsx)(Df,{label:(0,yb.t)("imageExportDialog.label.scale"),name:"exportScale",children:(0,Pa.jsx)(qa,{name:"exportScale",value:ce,onChange:function(Ze){ag(Ze);sb.executeAction($d.sK,"ui",Ze)},choices:bb.ZB.map(function(Ze){return{value:Ze,
label:"".concat(Ze,"×")}})})}),(0,Pa.jsxs)("div",{className:"ImageExportModal__settings__buttons",children:[(0,Pa.jsx)(re,{className:"ImageExportModal__settings__buttons__button",label:(0,yb.t)("imageExportDialog.title.exportToPng"),onClick:function(){return cc(bb.I_.png,nf)},startIcon:ib.aL,children:(0,yb.t)("imageExportDialog.button.exportToPng")}),(0,Pa.jsx)(re,{className:"ImageExportModal__settings__buttons__button",label:(0,yb.t)("imageExportDialog.title.exportToSvg"),onClick:function(){return cc(bb.I_.svg,
nf)},startIcon:ib.aL,children:(0,yb.t)("imageExportDialog.button.exportToSvg")}),(dc.vt||bb.vU)&&(0,Pa.jsx)(re,{className:"ImageExportModal__settings__buttons__button",label:(0,yb.t)("imageExportDialog.title.copyPngToClipboard"),onClick:function(){return cc(bb.I_.clipboard,nf)},startIcon:ib.UI,children:(0,yb.t)("imageExportDialog.button.copyPngToClipboard")})]})]})]})},Df=function(Sb){var Ea=Sb.label,$b=Sb.children,Xb=Sb.tooltip;return(0,Pa.jsxs)("div",{className:"ImageExportModal__settings__setting",
title:Ea,children:[(0,Pa.jsxs)("label",{htmlFor:Sb.name,className:"ImageExportModal__settings__setting__label",children:[Ea,Xb&&(0,Pa.jsx)(Td.u,{label:Xb,long:!0,children:ib.mv})]}),(0,Pa.jsx)("div",{className:"ImageExportModal__settings__setting__content",children:$b})]})},tf=function(Sb){var Ea=Sb.elements,$b=Sb.appState,Xb=Sb.files,sb=Sb.actionManager,cc=Sb.onExportImage;Sb=Sb.onCloseRequest;return"imageExport"!==$b.openDialog?null:(0,Pa.jsx)(ve.V,{onCloseRequest:Sb,size:"wide",title:!1,children:(0,Pa.jsx)(kf,
{elements:Ea,appState:$b,files:Xb,actionManager:sb,onExportImage:cc})})},rg=b(3195),gh={};gh.styleTagTransform=jc();gh.setAttributes=kd();gh.insert=qe().bind(null,"head");gh.domAPI=je();gh.insertStyleElement=Bf();Ic()(rg.Z,gh);rg.Z&&rg.Z.locals&&rg.Z.locals;var jh=function(Sb){var Ea=Sb.children,$b=Sb.className;return(0,Pa.jsx)("div",{className:(0,Va.Z)("FixedSideContainer","FixedSideContainer_side_".concat(Sb.side),$b),children:Ea})},Uf=b(1587),hh={};hh.styleTagTransform=jc();hh.setAttributes=kd();
hh.insert=qe().bind(null,"head");hh.domAPI=je();hh.insertStyleElement=Bf();Ic()(Uf.Z,hh);Uf.Z&&Uf.Z.locals&&Uf.Z.locals;var ti=function(Sb){return(Sb=function(Ea){var $b=Ea.appState,Xb=Ea.isMobile,sb=Ea.device,cc=Ea.app;Ea=$b.activeTool;var Qb=$b.isResizing,zb=$b.isRotating,xb=$b.lastPointerDownWith,Zb=null!==$b.multiElement;if($b.openSidebar&&!sb.canDeviceFitSidebar)return null;if((0,bd.EN)($b))return(0,yb.t)("hints.eraserRevert");if("arrow"===Ea.type||"line"===Ea.type)return Zb?(0,yb.t)("hints.linearElementMulti"):
(0,yb.t)("hints.linearElement");if("freedraw"===Ea.type)return(0,yb.t)("hints.freeDraw");if("text"===Ea.type)return(0,yb.t)("hints.text");if("embeddable"===Ea.type)return(0,yb.t)("hints.embeddable");if("image"===$b.activeTool.type&&$b.pendingImageElementId)return(0,yb.t)("hints.placeImage");sb=cc.scene.getSelectedElements($b);if(Qb&&"mouse"===xb&&1===sb.length)return $b=sb[0],(0,Ib.bt)($b)&&2===$b.points.length?(0,yb.t)("hints.lockAngle"):(0,Ib.pC)($b)?(0,yb.t)("hints.resizeImage"):(0,yb.t)("hints.resize");
if(zb&&"mouse"===xb)return(0,yb.t)("hints.rotate");if(1===sb.length&&(0,Ib.iB)(sb[0]))return(0,yb.t)("hints.text_selected");if($b.editingElement&&(0,Ib.iB)($b.editingElement))return(0,yb.t)("hints.text_editing");if("selection"===Ea.type){var qc;if("selection"===(null===(qc=$b.draggingElement)||void 0===qc?void 0:qc.type)&&!sb.length&&!$b.editingElement&&!$b.editingLinearElement)return(0,yb.t)("hints.deepBoxSelect");if($b.gridSize&&$b.draggingElement)return(0,yb.t)("hints.disableSnapping");if(!sb.length&&
!Xb)return(0,yb.t)("hints.canvasPanning");if(1===sb.length){if((0,Ib.bt)(sb[0]))return $b.editingLinearElement?$b.editingLinearElement.selectedPointsIndices?(0,yb.t)("hints.lineEditor_pointSelected"):(0,yb.t)("hints.lineEditor_nothingSelected"):(0,yb.t)("hints.lineEditor_info");if(!$b.draggingElement&&(0,Ib.mG)(sb[0]))return(0,yb.t)("hints.bindTextToElement")}}return null}({appState:Sb.appState,isMobile:Sb.isMobile,device:Sb.device,app:Sb.app}))?(Sb=(0,Qa.uY)(Sb),(0,Pa.jsx)("div",{className:"HintViewer",
children:(0,Pa.jsx)("span",{children:Sb})})):null},hi=b(8972),Rj=b(9507),Lk=(b(3041),{CHECKED:ib.FC,UNCHECKED:ib._C}),Vl=function(Sb){return(0,Pa.jsxs)("label",{className:(0,Va.Z)("ToolIcon ToolIcon__lock","ToolIcon_size_".concat("medium"),{"is-mobile":Sb.isMobile}),title:"".concat(Sb.title," — Q"),children:[(0,Pa.jsx)("input",{className:"ToolIcon_type_checkbox",type:"checkbox",name:Sb.name,onChange:Sb.onChange,checked:Sb.checked,"aria-label":Sb.title,"data-testid":"toolbar-lock"}),(0,Pa.jsx)("div",
{className:"ToolIcon__icon",children:Sb.checked?Lk.CHECKED:Lk.UNCHECKED})]})},jk=["heading","children"],lj=function(Sb){var Ea=Sb.heading,$b=Sb.children;Sb=(0,Eb.Z)(Sb,jk);var Xb=xi().id,sb=(0,Pa.jsx)("h2",{className:"visually-hidden",id:"".concat(Xb,"-").concat(Ea,"-title"),children:(0,yb.t)("headings.".concat(Ea))});return(0,Pa.jsx)("section",B(B({},Sb),{},{"aria-labelledby":"".concat(Xb,"-").concat(Ea,"-title"),children:"function"==typeof $b?$b(sb):(0,Pa.jsxs)(Pa.Fragment,{children:[sb,$b]})}))},
Gi=b(1347),sh=function(Sb){return Sb.penDetected?(0,Pa.jsxs)("label",{className:(0,Va.Z)("ToolIcon ToolIcon__penMode","ToolIcon_size_".concat("medium"),{"is-mobile":Sb.isMobile}),title:"".concat(Sb.title),children:[(0,Pa.jsx)("input",{className:"ToolIcon_type_checkbox",type:"checkbox",name:Sb.name,onChange:Sb.onChange,checked:Sb.checked,"aria-label":Sb.title}),(0,Pa.jsx)("div",{className:"ToolIcon__icon",children:ib.tb})]}):null},Wl=b(9995),Mi=b(2681),Dj={};Dj.styleTagTransform=jc();Dj.setAttributes=
kd();Dj.insert=qe().bind(null,"head");Dj.domAPI=je();Dj.insertStyleElement=Bf();Ic()(Mi.Z,Dj);Mi.Z&&Mi.Z.locals&&Mi.Z.locals;var Xj=function(Sb){var Ea,$b=(0,Wl.KP)(Sb.elements),Xb=(0,Bc.Zs)(Sb.elements,Sb.appState),sb=(0,Wl.KP)(Xb);return(0,Pa.jsx)("div",{className:"Stats",children:(0,Pa.jsxs)(hi.W,{padding:2,children:[(0,Pa.jsx)("div",{className:"close",onClick:Sb.onClose,children:ib.Tw}),(0,Pa.jsx)("h3",{children:(0,yb.t)("stats.title")}),(0,Pa.jsx)("table",{children:(0,Pa.jsxs)("tbody",{children:[(0,Pa.jsx)("tr",
{children:(0,Pa.jsx)("th",{colSpan:2,children:(0,yb.t)("stats.scene")})}),(0,Pa.jsxs)("tr",{children:[(0,Pa.jsx)("td",{children:(0,yb.t)("stats.elements")}),(0,Pa.jsx)("td",{children:Sb.elements.length})]}),(0,Pa.jsxs)("tr",{children:[(0,Pa.jsx)("td",{children:(0,yb.t)("stats.width")}),(0,Pa.jsx)("td",{children:Math.round($b[2])-Math.round($b[0])})]}),(0,Pa.jsxs)("tr",{children:[(0,Pa.jsx)("td",{children:(0,yb.t)("stats.height")}),(0,Pa.jsx)("td",{children:Math.round($b[3])-Math.round($b[1])})]}),
1===Xb.length&&(0,Pa.jsx)("tr",{children:(0,Pa.jsx)("th",{colSpan:2,children:(0,yb.t)("stats.element")})}),1<Xb.length&&(0,Pa.jsxs)(Pa.Fragment,{children:[(0,Pa.jsx)("tr",{children:(0,Pa.jsx)("th",{colSpan:2,children:(0,yb.t)("stats.selected")})}),(0,Pa.jsxs)("tr",{children:[(0,Pa.jsx)("td",{children:(0,yb.t)("stats.elements")}),(0,Pa.jsx)("td",{children:Xb.length})]})]}),0<Xb.length&&(0,Pa.jsxs)(Pa.Fragment,{children:[(0,Pa.jsxs)("tr",{children:[(0,Pa.jsx)("td",{children:"x"}),(0,Pa.jsx)("td",{children:Math.round(sb[0])})]}),
(0,Pa.jsxs)("tr",{children:[(0,Pa.jsx)("td",{children:"y"}),(0,Pa.jsx)("td",{children:Math.round(sb[1])})]}),(0,Pa.jsxs)("tr",{children:[(0,Pa.jsx)("td",{children:(0,yb.t)("stats.width")}),(0,Pa.jsx)("td",{children:Math.round(sb[2]-sb[0])})]}),(0,Pa.jsxs)("tr",{children:[(0,Pa.jsx)("td",{children:(0,yb.t)("stats.height")}),(0,Pa.jsx)("td",{children:Math.round(sb[3]-sb[1])})]})]}),1===Xb.length&&(0,Pa.jsxs)("tr",{children:[(0,Pa.jsx)("td",{children:(0,yb.t)("stats.angle")}),(0,Pa.jsx)("td",{children:"".concat(Math.round(180*
Xb[0].angle/Math.PI),"°")})]}),null===(Ea=Sb.renderCustomStats)||void 0===Ea?void 0:Ea.call(Sb,Sb.elements,Sb.appState)]})})]})})},oh=function(Sb){return(0,Pa.jsx)(vb.V,{className:(0,Va.Z)("Shape",{fillable:!1}),type:"radio",icon:ib.Hk,name:"editor-current-shape",checked:Sb.checked,title:"".concat(Sb.title," — H"),keyBindingLabel:Sb.isMobile?void 0:Wa.tW.H.toLocaleUpperCase(),"aria-label":"".concat(Sb.title," — H"),"aria-keyshortcuts":Wa.tW.H,"data-testid":"toolbar-hand",onChange:function(){var Ea;
return null===(Ea=Sb.onChange)||void 0===Ea?void 0:Ea.call(Sb)}})},wf=b(5371),cg=function(Sb){var Ea=Sb.appState,$b=Sb.elements,Xb=Sb.actionManager,sb=Sb.setAppState,cc=Sb.onLockToggle,Qb=Sb.onHandToolToggle,zb=Sb.onPenModeToggle,xb=Sb.interactiveCanvas,Zb=Sb.onImageAction,qc=Sb.renderTopRightUI,Dc=Sb.renderCustomStats,Yc=Sb.renderSidebars,ed=Sb.device,nd=Sb.renderWelcomeScreen;Sb=Sb.app;var Rd=(0,wf.R6)(),ce=Rd.WelcomeScreenCenterTunnel,Yd=Rd.MainMenuTunnel,Ne=Rd.DefaultSidebarTriggerTunnel;return(0,Pa.jsxs)(Pa.Fragment,
{children:[Yc(),!Ea.viewModeEnabled&&(0,Pa.jsxs)(jh,{side:"top",className:"App-top-bar",children:[nd&&(0,Pa.jsx)(ce.Out,{}),(0,Pa.jsx)(lj,{heading:"shapes",children:function(ag){return(0,Pa.jsx)(hd.Z.Col,{gap:4,align:"center",children:(0,Pa.jsxs)(hd.Z.Row,{gap:1,className:"App-toolbar-container",children:[(0,Pa.jsxs)(hi.W,{padding:1,className:"App-toolbar App-toolbar--mobile",children:[ag,(0,Pa.jsx)(hd.Z.Row,{gap:1,children:(0,Pa.jsx)(Tb,{appState:Ea,interactiveCanvas:xb,activeTool:Ea.activeTool,
setAppState:sb,onImageAction:function(pg){Zb({insertOnCanvasDirectly:"mouse"!==pg.pointerType})}})})]}),qc&&qc(!0,Ea),(0,Pa.jsxs)("div",{className:"mobile-misc-tools-container",children:[!Ea.viewModeEnabled&&(0,Pa.jsx)(Ne.Out,{}),(0,Pa.jsx)(sh,{checked:Ea.penMode,onChange:zb,title:(0,yb.t)("toolBar.penMode"),isMobile:!0,penDetected:Ea.penDetected}),(0,Pa.jsx)(Vl,{checked:Ea.activeTool.locked,onChange:cc,title:(0,yb.t)("toolBar.lock"),isMobile:!0}),(0,Pa.jsx)(oh,{checked:(0,bd.l$)(Ea),onChange:function(){return Qb()},
title:(0,yb.t)("toolBar.hand"),isMobile:!0})]})]})})}}),(0,Pa.jsx)(ti,{appState:Ea,isMobile:!0,device:ed,app:Sb})]}),!Ea.openMenu&&Ea.showStats&&(0,Pa.jsx)(Xj,{appState:Ea,setAppState:sb,elements:$b,onClose:function(){Xb.executeAction(Ua.u0)},renderCustomStats:Dc}),(0,Pa.jsx)("div",{className:"App-bottom-bar",style:{marginBottom:Gi.nn+2*Gi.WM,marginLeft:Gi.nn+2*Gi.WM,marginRight:Gi.nn+2*Gi.WM},children:(0,Pa.jsxs)(hi.W,{padding:0,children:["shape"===Ea.openMenu&&!Ea.viewModeEnabled&&(0,Xc.RT)(Ea,
$b)?(0,Pa.jsx)(lj,{className:"App-mobile-menu",heading:"selectedShapeActions",children:(0,Pa.jsx)(Ub,{appState:Ea,elements:$b,renderAction:Xb.renderAction})}):null,(0,Pa.jsxs)("footer",{className:"App-toolbar",children:[Ea.viewModeEnabled?(0,Pa.jsx)("div",{className:"App-toolbar-content",children:(0,Pa.jsx)(Yd.Out,{})}):(0,Pa.jsxs)("div",{className:"App-toolbar-content",children:[(0,Pa.jsx)(Yd.Out,{}),Xb.renderAction("toggleEditMenu"),Xb.renderAction("undo"),Xb.renderAction("redo"),Xb.renderAction(Ea.multiElement?
"finalize":"duplicateSelection"),Xb.renderAction("deleteSelectedElements")]}),Ea.scrolledOutside&&!Ea.openMenu&&!Ea.openSidebar&&(0,Pa.jsx)("button",{className:"scroll-back-to-content",onClick:function(){sb(function(ag){return function(pg){for(var Gf=1;Gf<arguments.length;Gf++){var Tf=null!=arguments[Gf]?arguments[Gf]:{};Gf%2?J(Object(Tf),!0).forEach(function(nf){(0,la.Z)(pg,nf,Tf[nf])}):Object.getOwnPropertyDescriptors?Object.defineProperties(pg,Object.getOwnPropertyDescriptors(Tf)):J(Object(Tf)).forEach(function(nf){Object.defineProperty(pg,
nf,Object.getOwnPropertyDescriptor(Tf,nf))})}return pg}({},(0,Bc.W)($b,ag))})},children:(0,yb.t)("buttons.scrollBackToContent")})]})]})})]})},zk=b(5284),ll=b(9882),dh=b(2739),kk=b(8461),Zk={};Zk.styleTagTransform=jc();Zk.setAttributes=kd();Zk.insert=qe().bind(null,"head");Zk.domAPI=je();Zk.insertStyleElement=Bf();Ic()(kk.Z,Zk);kk.Z&&kk.Z.locals&&kk.Z.locals;var mj=function(Sb){var Ea=(0,na.useRef)(null),$b=(0,na.useState)(null);$b=(0,va.Z)($b,2);var Xb=$b[0],sb=$b[1];return(0,na.useLayoutEffect)(function(){if(Sb.spreadsheet){var cc,
Qb=(0,ll.ps)(Sb.chartType,Sb.spreadsheet,0,0);sb(Qb);var zb=Ea.current;return(0,xa.Z)(ua().mark(function Zb(){var qc;return ua().wrap(function(Dc){for(;;)switch(Dc.prev=Dc.next){case 0:return Dc.next=2,(0,dh.$D)(Qb,{exportBackground:!1,viewBackgroundColor:zk.white},null);case 2:cc=Dc.sent,null===(qc=cc.querySelector(".style-fonts"))||void 0===qc||qc.remove(),zb.replaceChildren(),zb.appendChild(cc),Sb.selected&&zb.parentNode.focus();case 7:case "end":return Dc.stop()}},Zb)}))(),function(){zb.replaceChildren()}}},
[Sb.spreadsheet,Sb.chartType,Sb.selected]),(0,Pa.jsx)("button",{className:"ChartPreview",onClick:function(){Xb&&Sb.onClick(Sb.chartType,Xb)},children:(0,Pa.jsx)("div",{ref:Ea})})},ml=function(Sb){var Ea=Sb.setAppState,$b=Sb.appState,Xb=Sb.onClose,sb=Jl().onInsertElements;Sb=oa().useCallback(function(){Xb&&Xb()},[Xb]);var cc=function(Qb,zb){sb(zb);(0,xc.L)("magic","chart",Qb);Ea({currentChartType:Qb,pasteDialog:{shown:!1,data:null}})};return(0,Pa.jsx)(ve.V,{size:"small",onCloseRequest:Sb,title:(0,yb.t)("labels.pasteCharts"),
className:"PasteChartDialog",autofocus:!1,children:(0,Pa.jsxs)("div",{className:"container",children:[(0,Pa.jsx)(mj,{chartType:"bar",spreadsheet:$b.pasteDialog.data,selected:"bar"===$b.currentChartType,onClick:cc}),(0,Pa.jsx)(mj,{chartType:"line",spreadsheet:$b.pasteDialog.data,selected:"line"===$b.currentChartType,onClick:cc})]})})},Ch=b(2978),Yj={};Yj.styleTagTransform=jc();Yj.setAttributes=kd();Yj.insert=qe().bind(null,"head");Yj.domAPI=je();Yj.insertStyleElement=Bf();Ic()(Ch.Z,Yj);Ch.Z&&Ch.Z.locals&&
Ch.Z.locals;var $k=ua().mark(L),Ej=function(){return(0,Pa.jsxs)("div",{className:"HelpDialog__header",children:[(0,Pa.jsxs)("a",{className:"HelpDialog__btn",href:"https://docs.excalidraw.com",target:"_blank",rel:"noopener noreferrer",children:[(0,yb.t)("helpDialog.documentation"),(0,Pa.jsx)("div",{className:"HelpDialog__link-icon",children:ib.h0})]}),(0,Pa.jsxs)("a",{className:"HelpDialog__btn",href:"https://blog.excalidraw.com",target:"_blank",rel:"noopener noreferrer",children:[(0,yb.t)("helpDialog.blog"),
(0,Pa.jsx)("div",{className:"HelpDialog__link-icon",children:ib.h0})]}),(0,Pa.jsxs)("a",{className:"HelpDialog__btn",href:"https://github.com/excalidraw/excalidraw/issues",target:"_blank",rel:"noopener noreferrer",children:[(0,yb.t)("helpDialog.github"),(0,Pa.jsx)("div",{className:"HelpDialog__link-icon",children:ib.h0})]})]})},mg=function(Sb){return(0,Pa.jsxs)(Pa.Fragment,{children:[(0,Pa.jsx)("h3",{children:Sb.title}),(0,Pa.jsx)("div",{className:"HelpDialog__islands-container",children:Sb.children})]})},
hg=function(Sb){return(0,Pa.jsxs)("div",{className:"HelpDialog__island ".concat(Sb.className),children:[(0,Pa.jsx)("h4",{className:"HelpDialog__island-title",children:Sb.caption}),(0,Pa.jsx)("div",{className:"HelpDialog__island-content",children:Sb.children})]})},qf=function(Sb){var Ea=Sb.label,$b=Sb.isOr;$b=void 0===$b||$b;Sb=Sb.shortcuts.map(function(Xb){return(Xb.endsWith("++")?[].concat((0,ta.Z)(Xb.slice(0,-2).split("+")),["+"]):Xb.split("+")).map(function(sb){return(0,Pa.jsx)(nj,{children:(cc=
sb,cc.replace(/\b[a-z]\b/,function(Qb){return Qb.toUpperCase()}))},sb);var cc})});return(0,Pa.jsxs)("div",{className:"HelpDialog__shortcut",children:[(0,Pa.jsx)("div",{children:Ea}),(0,Pa.jsx)("div",{className:"HelpDialog__key-container",children:(0,ta.Z)(L(Sb,$b?(0,yb.t)("helpDialog.or"):null))})]})},nj=function(Sb){return(0,Pa.jsx)("kbd",function(Ea){for(var $b=1;$b<arguments.length;$b++){var Xb=null!=arguments[$b]?arguments[$b]:{};$b%2?V(Object(Xb),!0).forEach(function(sb){(0,la.Z)(Ea,sb,Xb[sb])}):
Object.getOwnPropertyDescriptors?Object.defineProperties(Ea,Object.getOwnPropertyDescriptors(Xb)):V(Object(Xb)).forEach(function(sb){Object.defineProperty(Ea,sb,Object.getOwnPropertyDescriptor(Xb,sb))})}return Ea}({className:"HelpDialog__key"},Sb))},Zh=function(Sb){var Ea=Sb.onClose;Sb=oa().useCallback(function(){Ea&&Ea()},[Ea]);return(0,Pa.jsx)(Pa.Fragment,{children:(0,Pa.jsxs)(ve.V,{onCloseRequest:Sb,title:(0,yb.t)("helpDialog.title"),className:"HelpDialog",children:[(0,Pa.jsx)(Ej,{}),(0,Pa.jsxs)(mg,
{title:(0,yb.t)("helpDialog.shortcuts"),children:[(0,Pa.jsxs)(hg,{className:"HelpDialog__island--tools",caption:(0,yb.t)("helpDialog.tools"),children:[(0,Pa.jsx)(qf,{label:(0,yb.t)("toolBar.hand"),shortcuts:[Wa.tW.H]}),(0,Pa.jsx)(qf,{label:(0,yb.t)("toolBar.selection"),shortcuts:[Wa.tW.V,Wa.tW[1]]}),(0,Pa.jsx)(qf,{label:(0,yb.t)("toolBar.rectangle"),shortcuts:[Wa.tW.R,Wa.tW[2]]}),(0,Pa.jsx)(qf,{label:(0,yb.t)("toolBar.diamond"),shortcuts:[Wa.tW.D,Wa.tW[3]]}),(0,Pa.jsx)(qf,{label:(0,yb.t)("toolBar.ellipse"),
shortcuts:[Wa.tW.O,Wa.tW[4]]}),(0,Pa.jsx)(qf,{label:(0,yb.t)("toolBar.arrow"),shortcuts:[Wa.tW.A,Wa.tW[5]]}),(0,Pa.jsx)(qf,{label:(0,yb.t)("toolBar.line"),shortcuts:[Wa.tW.L,Wa.tW[6]]}),(0,Pa.jsx)(qf,{label:(0,yb.t)("toolBar.freedraw"),shortcuts:[Wa.tW.P,Wa.tW[7]]}),(0,Pa.jsx)(qf,{label:(0,yb.t)("toolBar.text"),shortcuts:[Wa.tW.T,Wa.tW[8]]}),(0,Pa.jsx)(qf,{label:(0,yb.t)("toolBar.image"),shortcuts:[Wa.tW[9]]}),(0,Pa.jsx)(qf,{label:(0,yb.t)("toolBar.eraser"),shortcuts:[Wa.tW.E,Wa.tW[0]]}),(0,Pa.jsx)(qf,
{label:(0,yb.t)("toolBar.frame"),shortcuts:[Wa.tW.F]}),(0,Pa.jsx)(qf,{label:(0,yb.t)("labels.eyeDropper"),shortcuts:[Wa.tW.I,"Shift+S","Shift+G"]}),(0,Pa.jsx)(qf,{label:(0,yb.t)("helpDialog.editLineArrowPoints"),shortcuts:[(0,Qa.uY)("CtrlOrCmd+Enter")]}),(0,Pa.jsx)(qf,{label:(0,yb.t)("helpDialog.editText"),shortcuts:[(0,Qa.uY)("Enter")]}),(0,Pa.jsx)(qf,{label:(0,yb.t)("helpDialog.textNewLine"),shortcuts:[(0,Qa.uY)("Enter"),(0,Qa.uY)("Shift+Enter")]}),(0,Pa.jsx)(qf,{label:(0,yb.t)("helpDialog.textFinish"),
shortcuts:[(0,Qa.uY)("Esc"),(0,Qa.uY)("CtrlOrCmd+Enter")]}),(0,Pa.jsx)(qf,{label:(0,yb.t)("helpDialog.curvedArrow"),shortcuts:["A",(0,yb.t)("helpDialog.click"),(0,yb.t)("helpDialog.click"),(0,yb.t)("helpDialog.click")],isOr:!1}),(0,Pa.jsx)(qf,{label:(0,yb.t)("helpDialog.curvedLine"),shortcuts:["L",(0,yb.t)("helpDialog.click"),(0,yb.t)("helpDialog.click"),(0,yb.t)("helpDialog.click")],isOr:!1}),(0,Pa.jsx)(qf,{label:(0,yb.t)("toolBar.lock"),shortcuts:[Wa.tW.Q]}),(0,Pa.jsx)(qf,{label:(0,yb.t)("helpDialog.preventBinding"),
shortcuts:[(0,Qa.uY)("CtrlOrCmd")]}),(0,Pa.jsx)(qf,{label:(0,yb.t)("toolBar.link"),shortcuts:[(0,Qa.uY)("CtrlOrCmd+K")]})]}),(0,Pa.jsxs)(hg,{className:"HelpDialog__island--view",caption:(0,yb.t)("helpDialog.view"),children:[(0,Pa.jsx)(qf,{label:(0,yb.t)("buttons.zoomIn"),shortcuts:[(0,Qa.uY)("CtrlOrCmd++")]}),(0,Pa.jsx)(qf,{label:(0,yb.t)("buttons.zoomOut"),shortcuts:[(0,Qa.uY)("CtrlOrCmd+-")]}),(0,Pa.jsx)(qf,{label:(0,yb.t)("buttons.resetZoom"),shortcuts:[(0,Qa.uY)("CtrlOrCmd+0")]}),(0,Pa.jsx)(qf,
{label:(0,yb.t)("helpDialog.zoomToFit"),shortcuts:["Shift+1"]}),(0,Pa.jsx)(qf,{label:(0,yb.t)("helpDialog.zoomToSelection"),shortcuts:["Shift+2"]}),(0,Pa.jsx)(qf,{label:(0,yb.t)("helpDialog.movePageUpDown"),shortcuts:["PgUp/PgDn"]}),(0,Pa.jsx)(qf,{label:(0,yb.t)("helpDialog.movePageLeftRight"),shortcuts:["Shift+PgUp/PgDn"]}),(0,Pa.jsx)(qf,{label:(0,yb.t)("buttons.fullScreen"),shortcuts:["F"]}),(0,Pa.jsx)(qf,{label:(0,yb.t)("buttons.zenMode"),shortcuts:[(0,Qa.uY)("Alt+Z")]}),(0,Pa.jsx)(qf,{label:(0,yb.t)("labels.showGrid"),
shortcuts:[(0,Qa.uY)("CtrlOrCmd+'")]}),(0,Pa.jsx)(qf,{label:(0,yb.t)("labels.viewMode"),shortcuts:[(0,Qa.uY)("Alt+R")]}),(0,Pa.jsx)(qf,{label:(0,yb.t)("labels.toggleTheme"),shortcuts:[(0,Qa.uY)("Alt+Shift+D")]}),(0,Pa.jsx)(qf,{label:(0,yb.t)("stats.title"),shortcuts:[(0,Qa.uY)("Alt+/")]})]}),(0,Pa.jsxs)(hg,{className:"HelpDialog__island--editor",caption:(0,yb.t)("helpDialog.editor"),children:[(0,Pa.jsx)(qf,{label:(0,yb.t)("labels.moveCanvas"),shortcuts:[(0,Qa.uY)("Space+".concat((0,yb.t)("helpDialog.drag"))),
(0,Qa.uY)("Wheel+".concat((0,yb.t)("helpDialog.drag")))],isOr:!0}),(0,Pa.jsx)(qf,{label:(0,yb.t)("buttons.clearReset"),shortcuts:[(0,Qa.uY)("CtrlOrCmd+Delete")]}),(0,Pa.jsx)(qf,{label:(0,yb.t)("labels.delete"),shortcuts:[(0,Qa.uY)("Delete")]}),(0,Pa.jsx)(qf,{label:(0,yb.t)("labels.cut"),shortcuts:[(0,Qa.uY)("CtrlOrCmd+X")]}),(0,Pa.jsx)(qf,{label:(0,yb.t)("labels.copy"),shortcuts:[(0,Qa.uY)("CtrlOrCmd+C")]}),(0,Pa.jsx)(qf,{label:(0,yb.t)("labels.paste"),shortcuts:[(0,Qa.uY)("CtrlOrCmd+V")]}),(0,Pa.jsx)(qf,
{label:(0,yb.t)("labels.pasteAsPlaintext"),shortcuts:[(0,Qa.uY)("CtrlOrCmd+Shift+V")]}),(0,Pa.jsx)(qf,{label:(0,yb.t)("labels.selectAll"),shortcuts:[(0,Qa.uY)("CtrlOrCmd+A")]}),(0,Pa.jsx)(qf,{label:(0,yb.t)("labels.multiSelect"),shortcuts:[(0,Qa.uY)("Shift+".concat((0,yb.t)("helpDialog.click")))]}),(0,Pa.jsx)(qf,{label:(0,yb.t)("helpDialog.deepSelect"),shortcuts:[(0,Qa.uY)("CtrlOrCmd+".concat((0,yb.t)("helpDialog.click")))]}),(0,Pa.jsx)(qf,{label:(0,yb.t)("helpDialog.deepBoxSelect"),shortcuts:[(0,Qa.uY)("CtrlOrCmd+".concat((0,yb.t)("helpDialog.drag")))]}),
(dc.vt||bb.vU)&&(0,Pa.jsx)(qf,{label:(0,yb.t)("labels.copyAsPng"),shortcuts:[(0,Qa.uY)("Shift+Alt+C")]}),(0,Pa.jsx)(qf,{label:(0,yb.t)("labels.copyStyles"),shortcuts:[(0,Qa.uY)("CtrlOrCmd+Alt+C")]}),(0,Pa.jsx)(qf,{label:(0,yb.t)("labels.pasteStyles"),shortcuts:[(0,Qa.uY)("CtrlOrCmd+Alt+V")]}),(0,Pa.jsx)(qf,{label:(0,yb.t)("labels.sendToBack"),shortcuts:[bb.Um?(0,Qa.uY)("CtrlOrCmd+Alt+["):(0,Qa.uY)("CtrlOrCmd+Shift+[")]}),(0,Pa.jsx)(qf,{label:(0,yb.t)("labels.bringToFront"),shortcuts:[bb.Um?(0,Qa.uY)("CtrlOrCmd+Alt+]"):
(0,Qa.uY)("CtrlOrCmd+Shift+]")]}),(0,Pa.jsx)(qf,{label:(0,yb.t)("labels.sendBackward"),shortcuts:[(0,Qa.uY)("CtrlOrCmd+[")]}),(0,Pa.jsx)(qf,{label:(0,yb.t)("labels.bringForward"),shortcuts:[(0,Qa.uY)("CtrlOrCmd+]")]}),(0,Pa.jsx)(qf,{label:(0,yb.t)("labels.alignTop"),shortcuts:[(0,Qa.uY)("CtrlOrCmd+Shift+Up")]}),(0,Pa.jsx)(qf,{label:(0,yb.t)("labels.alignBottom"),shortcuts:[(0,Qa.uY)("CtrlOrCmd+Shift+Down")]}),(0,Pa.jsx)(qf,{label:(0,yb.t)("labels.alignLeft"),shortcuts:[(0,Qa.uY)("CtrlOrCmd+Shift+Left")]}),
(0,Pa.jsx)(qf,{label:(0,yb.t)("labels.alignRight"),shortcuts:[(0,Qa.uY)("CtrlOrCmd+Shift+Right")]}),(0,Pa.jsx)(qf,{label:(0,yb.t)("labels.duplicateSelection"),shortcuts:[(0,Qa.uY)("CtrlOrCmd+D"),(0,Qa.uY)("Alt+".concat((0,yb.t)("helpDialog.drag")))]}),(0,Pa.jsx)(qf,{label:(0,yb.t)("helpDialog.toggleElementLock"),shortcuts:[(0,Qa.uY)("CtrlOrCmd+Shift+L")]}),(0,Pa.jsx)(qf,{label:(0,yb.t)("buttons.undo"),shortcuts:[(0,Qa.uY)("CtrlOrCmd+Z")]}),(0,Pa.jsx)(qf,{label:(0,yb.t)("buttons.redo"),shortcuts:bb.ED?
[(0,Qa.uY)("CtrlOrCmd+Y"),(0,Qa.uY)("CtrlOrCmd+Shift+Z")]:[(0,Qa.uY)("CtrlOrCmd+Shift+Z")]}),(0,Pa.jsx)(qf,{label:(0,yb.t)("labels.group"),shortcuts:[(0,Qa.uY)("CtrlOrCmd+G")]}),(0,Pa.jsx)(qf,{label:(0,yb.t)("labels.ungroup"),shortcuts:[(0,Qa.uY)("CtrlOrCmd+Shift+G")]}),(0,Pa.jsx)(qf,{label:(0,yb.t)("labels.flipHorizontal"),shortcuts:[(0,Qa.uY)("Shift+H")]}),(0,Pa.jsx)(qf,{label:(0,yb.t)("labels.flipVertical"),shortcuts:[(0,Qa.uY)("Shift+V")]}),(0,Pa.jsx)(qf,{label:(0,yb.t)("labels.showStroke"),shortcuts:[(0,Qa.uY)("S")]}),
(0,Pa.jsx)(qf,{label:(0,yb.t)("labels.showBackground"),shortcuts:[(0,Qa.uY)("G")]}),(0,Pa.jsx)(qf,{label:(0,yb.t)("labels.decreaseFontSize"),shortcuts:[(0,Qa.uY)("CtrlOrCmd+Shift+\x3c")]}),(0,Pa.jsx)(qf,{label:(0,yb.t)("labels.increaseFontSize"),shortcuts:[(0,Qa.uY)("CtrlOrCmd+Shift+\x3e")]})]})]})]})})},ui=b(9714),oj=b(4241),Tg={};Tg.styleTagTransform=jc();Tg.setAttributes=kd();Tg.insert=qe().bind(null,"head");Tg.domAPI=je();Tg.insertStyleElement=Bf();Ic()(oj.Z,Tg);oj.Z&&oj.Z.locals&&oj.Z.locals;
var $h=function(Sb){var Ea,$b=Sb.children;Sb=Sb.color;return(0,Pa.jsx)("div",{className:"Card",style:(Ea={},(0,la.Z)(Ea,"--card-color","primary"===Sb?"var(--color-primary)":zk[Sb][7]),(0,la.Z)(Ea,"--card-color-darker","primary"===Sb?"var(--color-primary-darker)":zk[Sb][8]),(0,la.Z)(Ea,"--card-color-darkest","primary"===Sb?"var(--color-primary-darkest)":zk[Sb][9]),Ea),children:$b})},fj=b(7955),El={};El.styleTagTransform=jc();El.setAttributes=kd();El.insert=qe().bind(null,"head");El.domAPI=je();El.insertStyleElement=
Bf();Ic()(fj.Z,El);fj.Z&&fj.Z.locals&&fj.Z.locals;var Of=function(Sb){var Ea=Sb.elements,$b=Sb.appState,Xb=Sb.files,sb=Sb.actionManager,cc=Sb.exportOpts,Qb=Sb.canvas,zb=cc.onExportToBackend;return(0,Pa.jsx)("div",{className:"ExportDialog ExportDialog--json",children:(0,Pa.jsxs)("div",{className:"ExportDialog-cards",children:[cc.saveFileToDisk&&(0,Pa.jsxs)($h,{color:"lime",children:[(0,Pa.jsx)("div",{className:"Card-icon",children:ib.TP}),(0,Pa.jsx)("h2",{children:(0,yb.t)("exportDialog.disk_title")}),
(0,Pa.jsxs)("div",{className:"Card-details",children:[(0,yb.t)("exportDialog.disk_details"),!ec.kr&&sb.renderAction("changeProjectName")]}),(0,Pa.jsx)(vb.V,{className:"Card-button",type:"button",title:(0,yb.t)("exportDialog.disk_button"),"aria-label":(0,yb.t)("exportDialog.disk_button"),showAriaLabel:!0,onClick:function(){sb.executeAction($d.mM,"ui")}})]}),zb&&(0,Pa.jsxs)($h,{color:"pink",children:[(0,Pa.jsx)("div",{className:"Card-icon",children:ib.xP}),(0,Pa.jsx)("h2",{children:(0,yb.t)("exportDialog.link_title")}),
(0,Pa.jsx)("div",{className:"Card-details",children:(0,yb.t)("exportDialog.link_details")}),(0,Pa.jsx)(vb.V,{className:"Card-button",type:"button",title:(0,yb.t)("exportDialog.link_button"),"aria-label":(0,yb.t)("exportDialog.link_button"),showAriaLabel:!0,onClick:function(){zb(Ea,$b,Xb,Qb);(0,xc.L)("export","link","ui (".concat((0,Qa.$h)(),")"))}})]}),cc.renderCustomUI&&cc.renderCustomUI(Ea,$b,Xb,Qb)]})})},Ni=function(Sb){var Ea=Sb.elements,$b=Sb.appState,Xb=Sb.files,sb=Sb.actionManager,cc=Sb.exportOpts,
Qb=Sb.canvas,zb=Sb.setAppState;Sb=oa().useCallback(function(){zb({openDialog:null})},[zb]);return(0,Pa.jsx)(Pa.Fragment,{children:"jsonExport"===$b.openDialog&&(0,Pa.jsx)(ve.V,{onCloseRequest:Sb,title:(0,yb.t)("buttons.export"),children:(0,Pa.jsx)(Of,{elements:Ea,appState:$b,files:Xb,actionManager:sb,onCloseRequest:Sb,exportOpts:cc,canvas:Qb})})})},wh=b(3218),nl=function(Sb){return(0,Pa.jsx)("button",{className:"help-icon",onClick:Sb.onClick,type:"button",title:"".concat((0,yb.t)("helpDialog.title"),
" — ?"),"aria-label":(0,yb.t)("helpDialog.title"),children:ib.by})},Sj=function(Sb){var Ea=Sb.appState,$b=Sb.actionManager,Xb=Sb.showExitZenModeBtn;Sb=Sb.renderWelcomeScreen;var sb=(0,wf.R6)(),cc=sb.FooterCenterTunnel;sb=sb.WelcomeScreenHelpHintTunnel;var Qb=tl();Qb=!Ea.viewModeEnabled&&Ea.multiElement&&Qb.isTouchScreen;return(0,Pa.jsxs)("footer",{role:"contentinfo",className:"layer-ui__wrapper__footer App-menu App-menu_bottom",children:[(0,Pa.jsx)("div",{className:(0,Va.Z)("layer-ui__wrapper__footer-left zen-mode-transition",
{"layer-ui__wrapper__footer-left--transition-left":Ea.zenModeEnabled}),children:(0,Pa.jsx)(hd.Z.Col,{gap:2,children:(0,Pa.jsxs)(lj,{heading:"canvasActions",children:[(0,Pa.jsx)(rd,{renderAction:$b.renderAction,zoom:Ea.zoom}),!Ea.viewModeEnabled&&(0,Pa.jsx)(td,{renderAction:$b.renderAction,className:(0,Va.Z)("zen-mode-transition",{"layer-ui__wrapper__footer-left--transition-bottom":Ea.zenModeEnabled})}),Qb&&(0,Pa.jsx)(te,{renderAction:$b.renderAction,className:(0,Va.Z)("zen-mode-transition",{"layer-ui__wrapper__footer-left--transition-left":Ea.zenModeEnabled})})]})})}),
(0,Pa.jsx)(cc.Out,{}),(0,Pa.jsx)("div",{className:(0,Va.Z)("layer-ui__wrapper__footer-right zen-mode-transition",{"transition-right":Ea.zenModeEnabled}),children:(0,Pa.jsxs)("div",{style:{position:"relative"},children:[Sb&&(0,Pa.jsx)(sb.Out,{}),(0,Pa.jsx)(nl,{onClick:function(){return $b.executeAction(Ua.jY)}})]})}),(0,Pa.jsx)(Hd,{actionManager:$b,showExitZenModeBtn:Xb})]})};Sj.displayName="Footer";var im=b(3441),Fj=b(593),Oi=b(3607),Zi=b(3013),Mk=b(5767),Nk=b(3375),ah=b(7233),ai=function(Sb){var Ea=
Sb.children,$b=Sb.actionLabel,Xb=Sb.onClick;return(0,Pa.jsxs)("div",{className:"OverwriteConfirm__Actions__Action",children:[(0,Pa.jsx)("h4",{children:Sb.title}),(0,Pa.jsx)("div",{className:"OverwriteConfirm__Actions__Action__content",children:Ea}),(0,Pa.jsx)(re,{variant:"outlined",color:"muted",label:$b,size:"large",fullWidth:!0,onClick:Xb})]})},Ph=Object.assign(function(Sb){return(0,Pa.jsx)("div",{className:"OverwriteConfirm__Actions",children:Sb.children})},{ExportToImage:function(){var Sb=(0,yb.QT)().t,
Ea=Ri(),$b=ok();return(0,Pa.jsx)(ai,{title:Sb("overwriteConfirm.action.exportToImage.title"),actionLabel:Sb("overwriteConfirm.action.exportToImage.button"),onClick:function(){Ea.executeAction($d.Du,"ui",!0);$b({openDialog:"imageExport"})},children:Sb("overwriteConfirm.action.exportToImage.description")})},SaveToDisk:function(){var Sb=(0,yb.QT)().t,Ea=Ri();return(0,Pa.jsx)(ai,{title:Sb("overwriteConfirm.action.saveToDisk.title"),actionLabel:Sb("overwriteConfirm.action.saveToDisk.button"),onClick:function(){Ea.executeAction(Ua.mM,
"ui")},children:Sb("overwriteConfirm.action.saveToDisk.description")})}}),Ak=b(9439),al={};al.styleTagTransform=jc();al.setAttributes=kd();al.insert=qe().bind(null,"head");al.domAPI=je();al.insertStyleElement=Bf();Ic()(Ak.Z,al);Ak.Z&&Ak.Z.locals&&Ak.Z.locals;var bi=Object.assign((0,Nk.$)("OverwriteConfirmDialog",function(Sb){Sb=Sb.children;var Ea=(0,wf.R6)().OverwriteConfirmDialogTunnel,$b=(0,Oi.KO)(ah.K,Fj.yE);$b=(0,va.Z)($b,2);var Xb=$b[0],sb=$b[1];return Xb.active?(0,Pa.jsx)(Ea.In,{children:(0,Pa.jsx)(ve.V,
{onCloseRequest:function(){Xb.onClose();sb(function(cc){return R(R({},cc),{},{active:!1})})},title:!1,size:916,children:(0,Pa.jsxs)("div",{className:"OverwriteConfirm",children:[(0,Pa.jsx)("h3",{children:Xb.title}),(0,Pa.jsxs)("div",{className:"OverwriteConfirm__Description OverwriteConfirm__Description--color-".concat(Xb.color),children:[(0,Pa.jsx)("div",{className:"OverwriteConfirm__Description__icon",children:ib.UT}),(0,Pa.jsx)("div",{children:Xb.description}),(0,Pa.jsx)("div",{className:"OverwriteConfirm__Description__spacer"}),
(0,Pa.jsx)(re,{color:Xb.color,size:"large",label:Xb.actionLabel,onClick:function(){Xb.onConfirm();sb(function(cc){return R(R({},cc),{},{active:!1})})}})]}),(0,Pa.jsx)(Ph,{children:Sb})]})})}):null}),{Actions:Ph,Action:ai}),bl=b(5990),Di=b(5553),mi=b(8913),Zj=b(1434),ni={};ni.styleTagTransform=jc();ni.setAttributes=kd();ni.insert=qe().bind(null,"head");ni.domAPI=je();ni.insertStyleElement=Bf();Ic()(Zj.Z,ni);Zj.Z&&Zj.Z.locals&&Zj.Z.locals;var Dh=b(9144),vi={};vi.styleTagTransform=jc();vi.setAttributes=
kd();vi.insert=qe().bind(null,"head");vi.domAPI=je();vi.insertStyleElement=Bf();Ic()(Dh.Z,vi);Dh.Z&&Dh.Z.locals&&Dh.Z.locals;var $i=b(5475),pb=["suggestedBindings","startBoundElement","cursorButton","scrollX","scrollY"],mc=["canvas","interactiveCanvas","appState"],yc=["canvas","interactiveCanvas","appState"],Tc=function(Sb){Sb=Sb.UIOptions;return(0,Pa.jsxs)(Zi.Z,{__fallback:!0,children:[(0,Pa.jsx)(Zi.Z.DefaultItems.LoadScene,{}),(0,Pa.jsx)(Zi.Z.DefaultItems.SaveToActiveFile,{}),Sb.canvasActions.export&&
(0,Pa.jsx)(Zi.Z.DefaultItems.Export,{}),Sb.canvasActions.saveAsImage&&(0,Pa.jsx)(Zi.Z.DefaultItems.SaveAsImage,{}),(0,Pa.jsx)(Zi.Z.DefaultItems.Help,{}),(0,Pa.jsx)(Zi.Z.DefaultItems.ClearCanvas,{}),(0,Pa.jsx)(Zi.Z.Separator,{}),(0,Pa.jsx)(Zi.Z.Group,{title:"Excalidraw links",children:(0,Pa.jsx)(Zi.Z.DefaultItems.Socials,{})}),(0,Pa.jsx)(Zi.Z.Separator,{}),(0,Pa.jsx)(Zi.Z.DefaultItems.ToggleTheme,{}),(0,Pa.jsx)(Zi.Z.DefaultItems.ChangeCanvasBackground,{})]})},$c=function(){return(0,Pa.jsxs)(bi,{__fallback:!0,
children:[(0,Pa.jsx)(bi.Actions.SaveToDisk,{}),(0,Pa.jsx)(bi.Actions.ExportToImage,{})]})},ld=function(Sb){Sb.suggestedBindings;Sb.startBoundElement;Sb.cursorButton;Sb.scrollX;Sb.scrollY;return(0,Eb.Z)(Sb,pb)},Ed=oa().memo(function(Sb){var Ea,$b,Xb=Sb.actionManager,sb=Sb.appState,cc=Sb.files,Qb=Sb.setAppState,zb=Sb.elements,xb=Sb.canvas,Zb=Sb.interactiveCanvas,qc=Sb.onLockToggle,Dc=Sb.onHandToolToggle,Yc=Sb.onPenModeToggle,ed=Sb.showExitZenModeBtn,nd=Sb.renderTopRightUI,Rd=Sb.renderCustomStats,ce=
Sb.UIOptions,Yd=Sb.onImageAction,Ne=Sb.onExportImage,ag=Sb.renderWelcomeScreen,pg=Sb.children,Gf=Sb.app,Tf=tl(),nf=(0,wf.ZC)();Sb=(0,Oi.KO)(mi.$,Fj.yE);Sb=(0,va.Z)(Sb,2);var Ze=Sb[0],xg=Sb[1],og=function(){return ce.canvasActions.export?(0,Pa.jsx)(Ni,{elements:zb,appState:sb,files:cc,actionManager:Xb,exportOpts:ce.canvasActions.export,canvas:xb,setAppState:Qb}):null},hf=function(){return ce.canvasActions.saveAsImage?(0,Pa.jsx)(tf,{elements:zb,appState:sb,files:cc,actionManager:Xb,onExportImage:Ne,
onCloseRequest:function(){return Qb({openDialog:null})}}):null};Sb=function(){return(0,Pa.jsx)(Di.O,{__fallback:!0,onDock:function(xh){(0,xc.L)("sidebar","toggleDock (".concat(xh?"dock":"undock",")"),"(".concat(Tf.isMobile?"mobile":"desktop",")"))}})};var th=(0,Oi.Dv)(im.t6,Fj.yE);pg=(0,Pa.jsxs)(Pa.Fragment,{children:[pg,(0,Pa.jsx)(Tc,{UIOptions:ce}),(0,Pa.jsx)(Di.O.Trigger,{__fallback:!0,icon:ib.Vq,title:(0,Qa.Oo)((0,yb.t)("toolBar.library")),onToggle:function(xh){xh&&(0,xc.L)("sidebar","".concat(bb.Cc.name,
" (open)"),"button (".concat(Tf.isMobile?"mobile":"desktop",")"))},tab:bb.Cc.defaultTab,children:(0,yb.t)("toolBar.library")}),(0,Pa.jsx)($c,{}),sb.isLoading&&(0,Pa.jsx)(Rj.z,{delay:250}),sb.errorMessage&&(0,Pa.jsx)(pe,{onClose:function(){return Qb({errorMessage:null})},children:sb.errorMessage}),Ze&&!Tf.isMobile&&(0,Pa.jsx)(mi.p,{colorPickerType:Ze.colorPickerType,onCancel:function(){xg(null)},onChange:function(xh,Qh,Hg,tg){tg=tg.altKey;if("elementBackground"===xh||"elementStroke"===xh)if(Hg.length){var Hh,
Gj,zn=F(Hg);try{for(zn.s();!(Gj=zn.n()).done;){var Xl=Gj.value;(0,hb.DR)(Xl,(0,la.Z)({},tg&&Ze.swapPreviewOnAlt?"elementBackground"===xh?"strokeColor":"backgroundColor":"elementBackground"===xh?"backgroundColor":"strokeColor",Qh),!1);$i.R.delete(Xl)}}catch(yo){zn.e(yo)}finally{zn.f()}null===(Hh=Jc.Z.getScene(Hg[0]))||void 0===Hh||Hh.informMutation()}else Qb("elementBackground"===xh?{currentItemBackgroundColor:Qh}:{currentItemStrokeColor:Qh})},onSelect:function(xh,Qh){var Hg;xg(function(tg){return null!=
tg&&tg.keepOpenOnAlt&&Qh.altKey?tg:null});null==Ze||null===(Hg=Ze.onSelect)||void 0===Hg||Hg.call(Ze,xh,Qh)}}),"help"===sb.openDialog&&(0,Pa.jsx)(Zh,{onClose:function(){Qb({openDialog:null})}}),(0,Pa.jsx)(Mk.o,{}),(0,Pa.jsx)(nf.OverwriteConfirmDialogTunnel.Out,{}),hf(),og(),sb.pasteDialog.shown&&(0,Pa.jsx)(ml,{setAppState:Qb,appState:sb,onClose:function(){return Qb({pasteDialog:{shown:!1,data:null}})}}),Tf.isMobile&&(0,Pa.jsx)(cg,{app:Gf,appState:sb,elements:zb,actionManager:Xb,renderJSONExportDialog:og,
renderImageExportDialog:hf,setAppState:Qb,onLockToggle:qc,onHandToolToggle:Dc,onPenModeToggle:Yc,interactiveCanvas:Zb,onImageAction:Yd,renderTopRightUI:nd,renderCustomStats:Rd,renderSidebars:Sb,device:Tf,renderWelcomeScreen:ag}),!Tf.isMobile&&(0,Pa.jsxs)(Pa.Fragment,{children:[(0,Pa.jsxs)("div",{className:"layer-ui__wrapper",style:sb.openSidebar&&th&&Tf.canDeviceFitSidebar?{width:"calc(100% - ".concat(bb.EE,"px)")}:{},children:[ag&&(0,Pa.jsx)(nf.WelcomeScreenCenterTunnel.Out,{}),($b=(0,Xc.RT)(sb,
zb),(0,Pa.jsx)(jh,{side:"top",children:(0,Pa.jsxs)("div",{className:"App-menu App-menu_top",children:[(0,Pa.jsxs)(hd.Z.Col,{gap:6,className:(0,Va.Z)("App-menu_top__left"),children:[(0,Pa.jsxs)("div",{style:{position:"relative"},children:[(0,Pa.jsx)(nf.MainMenuTunnel.Out,{}),ag&&(0,Pa.jsx)(nf.WelcomeScreenMenuHintTunnel.Out,{})]}),$b&&(0,Pa.jsx)(lj,{heading:"selectedShapeActions",className:(0,Va.Z)("selected-shape-actions zen-mode-transition",{"transition-left":sb.zenModeEnabled}),children:(0,Pa.jsx)(hi.W,
{className:bb.$C.SHAPE_ACTIONS_MENU,padding:2,style:{maxHeight:"".concat(sb.height-166,"px")},children:(0,Pa.jsx)(Ub,{appState:sb,elements:zb,renderAction:Xb.renderAction})})})]}),!sb.viewModeEnabled&&(0,Pa.jsx)(lj,{heading:"shapes",className:"shapes-section",children:function(xh){return(0,Pa.jsxs)("div",{style:{position:"relative"},children:[ag&&(0,Pa.jsx)(nf.WelcomeScreenToolbarHintTunnel.Out,{}),(0,Pa.jsx)(hd.Z.Col,{gap:4,align:"start",children:(0,Pa.jsx)(hd.Z.Row,{gap:1,className:(0,Va.Z)("App-toolbar-container",
{"zen-mode":sb.zenModeEnabled}),children:(0,Pa.jsxs)(hi.W,{padding:1,className:(0,Va.Z)("App-toolbar",{"zen-mode":sb.zenModeEnabled}),children:[(0,Pa.jsx)(ti,{appState:sb,isMobile:Tf.isMobile,device:Tf,app:Gf}),xh,(0,Pa.jsxs)(hd.Z.Row,{gap:1,children:[(0,Pa.jsx)(sh,{zenModeEnabled:sb.zenModeEnabled,checked:sb.penMode,onChange:Yc,title:(0,yb.t)("toolBar.penMode"),penDetected:sb.penDetected}),(0,Pa.jsx)(Vl,{checked:sb.activeTool.locked,onChange:qc,title:(0,yb.t)("toolBar.lock")}),(0,Pa.jsx)("div",{className:"App-toolbar__divider"}),
(0,Pa.jsx)(oh,{checked:(0,bd.l$)(sb),onChange:function(){return Dc()},title:(0,yb.t)("toolBar.hand"),isMobile:!0}),(0,Pa.jsx)(Tb,{appState:sb,interactiveCanvas:Zb,activeTool:sb.activeTool,setAppState:Qb,onImageAction:function(Qh){Yd({insertOnCanvasDirectly:"mouse"!==Qh.pointerType})}})]})]})})})]})}}),(0,Pa.jsxs)("div",{className:(0,Va.Z)("layer-ui__wrapper__top-right zen-mode-transition",{"transition-right":sb.zenModeEnabled}),children:[(0,Pa.jsx)(ui.Z,{collaborators:sb.collaborators}),null==nd?
void 0:nd(Tf.isMobile,sb),!sb.viewModeEnabled&&(!th||(null===(Ea=sb.openSidebar)||void 0===Ea?void 0:Ea.name)!==bb.Cc.name)&&(0,Pa.jsx)(nf.DefaultSidebarTriggerTunnel.Out,{})]})]})})),(0,Pa.jsx)(Sj,{appState:sb,actionManager:Xb,showExitZenModeBtn:ed,renderWelcomeScreen:ag}),sb.showStats&&(0,Pa.jsx)(Xj,{appState:sb,setAppState:Qb,elements:zb,onClose:function(){Xb.executeAction(wh.u)},renderCustomStats:Rd}),sb.scrolledOutside&&(0,Pa.jsx)("button",{className:"scroll-back-to-content",onClick:function(){Qb(function(xh){return function(Qh){for(var Hg=
1;Hg<arguments.length;Hg++){var tg=null!=arguments[Hg]?arguments[Hg]:{};Hg%2?G(Object(tg),!0).forEach(function(Hh){(0,la.Z)(Qh,Hh,tg[Hh])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Qh,Object.getOwnPropertyDescriptors(tg)):G(Object(tg)).forEach(function(Hh){Object.defineProperty(Qh,Hh,Object.getOwnPropertyDescriptor(tg,Hh))})}return Qh}({},(0,Bc.W)(zb,xh))})},children:(0,yb.t)("buttons.scrollBackToContent")})]}),Sb()]})]});return(0,Pa.jsx)(bl.k.Provider,{value:sb,children:(0,Pa.jsx)(Oi.zt,
{scope:nf.jotaiScope,children:(0,Pa.jsx)(wf.A3.Provider,{value:nf,children:pg})})})},function(Sb,Ea){if(Sb.children!==Ea.children)return!1;Sb.canvas;Sb.interactiveCanvas;var $b=Sb.appState;Sb=(0,Eb.Z)(Sb,mc);var Xb=(Ea.canvas,Ea.interactiveCanvas,Ea.appState);Ea=(0,Eb.Z)(Ea,yc);return(0,Qa.w8)(ld($b),ld(Xb),{selectedElementIds:Qa.w8,selectedGroupIds:Qa.w8})&&(0,Qa.w8)(Sb,Ea)}),Xd=b(9650),oe={};oe.styleTagTransform=jc();oe.setAttributes=kd();oe.insert=qe().bind(null,"head");oe.domAPI=je();oe.insertStyleElement=
Bf();Ic()(Xd.Z,oe);Xd.Z&&Xd.Z.locals&&Xd.Z.locals;var ye=function(Sb){var Ea=Sb.message,$b=Sb.onClose,Xb=Sb.closable;Xb=void 0!==Xb&&Xb;Sb=Sb.duration;var sb=void 0===Sb?5E3:Sb,cc=(0,na.useRef)(0),Qb=sb!==1/0,zb=(0,na.useCallback)(function(){Qb&&(cc.current=window.setTimeout(function(){return $b()},sb))},[$b,sb,Qb]);(0,na.useEffect)(function(){if(Qb)return zb(),function(){return clearTimeout(cc.current)}},[zb,Ea,sb,Qb]);return(0,Pa.jsxs)("div",{className:"Toast",onMouseEnter:Qb?function(){return clearTimeout(null==
cc?void 0:cc.current)}:void 0,onMouseLeave:Qb?zb:void 0,children:[(0,Pa.jsx)("p",{className:"Toast__message",children:Ea}),Xb&&(0,Pa.jsx)(vb.V,{icon:ib.Tw,"aria-label":"close",type:"icon",onClick:$b,className:"close"})]})},ie=(0,Cc.z)({name:"viewMode",viewMode:!0,trackEvent:{category:"canvas",predicate:function(Sb){return!Sb.viewModeEnabled}},perform:function(Sb,Ea){return{appState:I(I({},Ea),{},{viewModeEnabled:!this.checked(Ea)}),commitToHistory:!1}},checked:function(Sb){return Sb.viewModeEnabled},
predicate:function(Sb,Ea,$b){return void 0===$b.viewModeEnabled},contextItemLabel:"labels.viewMode",keyTest:function(Sb){return!Sb[Wa.tW.CTRL_OR_CMD]&&Sb.altKey&&Sb.code===Wa.aU.R}}),se=b(6897),Ke=b(200),Se=b.n(Ke),Nd=b(4238),Le=b(6289),ne=b(8132),Qf=b(6519),ee=b(5064),Qe=(0,Ia.Z)(function $b(Ea){var Xb=this,sb=Ea.scene;Ea=Ea.onSceneUpdated;(0,Ga.Z)(this,$b);this.onFontsLoaded=function(cc){if(cc.every(function(zb){zb="".concat(zb.family,"-").concat(zb.style,"-").concat(zb.weight);return!!$b.loadedFontFaces.has(zb)||
($b.loadedFontFaces.add(zb),!1)}))return!1;var Qb=!1;Xb.scene.mapElements(function(zb){return(0,Xc.iB)(zb)&&!(0,Ib.Xh)(zb)?($i.R.delete(zb),Qb=!0,(0,hb.BE)(zb,function(xb){for(var Zb=1;Zb<arguments.length;Zb++){var qc=null!=arguments[Zb]?arguments[Zb]:{};Zb%2?ia(Object(qc),!0).forEach(function(Dc){(0,la.Z)(xb,Dc,qc[Dc])}):Object.getOwnPropertyDescriptors?Object.defineProperties(xb,Object.getOwnPropertyDescriptors(qc)):ia(Object(qc)).forEach(function(Dc){Object.defineProperty(xb,Dc,Object.getOwnPropertyDescriptor(qc,
Dc))})}return xb}({},(0,Xc.JZ)(zb)))):zb});Qb&&Xb.onSceneUpdated()};this.loadFontsForElements=function(){var cc=(0,xa.Z)(ua().mark(function xb(zb){var Zb;return ua().wrap(function(qc){for(;;)switch(qc.prev=qc.next){case 0:return qc.next=2,Promise.all((0,ta.Z)(new Set(zb.filter(function(Dc){return(0,Xc.iB)(Dc)}).map(function(Dc){return Dc.fontFamily}))).map(function(Dc){var Yc,ed,nd,Rd;Dc=(0,Qa.mO)({fontFamily:Dc,fontSize:16});if(null===(Yc=document.fonts)||void 0===Yc||null===(ed=Yc.check)||void 0===
ed||!ed.call(Yc,Dc))return null===(nd=document.fonts)||void 0===nd||null===(Rd=nd.load)||void 0===Rd?void 0:Rd.call(nd,Dc)}));case 2:Zb=qc.sent,Xb.onFontsLoaded(Zb.flat().filter(Boolean));case 4:case "end":return qc.stop()}},xb)}));return function(zb){return cc.apply(this,arguments)}}();this.scene=sb;this.onSceneUpdated=Ea});Qe.loadedFontFaces=new Set;var rf=b(3473),sg=b(4485),Jg=b(899),Mg=function(Ea,$b){Ea=$b.scene.getSelectedElements(Ea);return 1===Ea.length&&"frame"===Ea[0].type},Oe=(0,Cc.z)({name:"selectAllElementsInFrame",
trackEvent:{category:"canvas"},perform:function(Ea,$b,Xb,sb){return(Xb=sb.scene.getSelectedElements($b)[0])&&"frame"===Xb.type?(Xb=(0,rf.wO)((0,Xc.Lm)(Ea),Xb.id).filter(function(cc){return!("text"===cc.type&&cc.containerId)}),{elements:Ea,appState:Z(Z({},$b),{},{selectedElementIds:Xb.reduce(function(cc,Qb){return cc[Qb.id]=!0,cc},{})}),commitToHistory:!1}):{elements:Ea,appState:$b,commitToHistory:!1}},contextItemLabel:"labels.selectAllElementsInFrame",predicate:function(Ea,$b,Xb,sb){return Mg($b,
sb)}}),Wf=(0,Cc.z)({name:"removeAllElementsFromFrame",trackEvent:{category:"history"},perform:function(Ea,$b,Xb,sb){return(Xb=sb.scene.getSelectedElements($b)[0])&&"frame"===Xb.type?{elements:(0,rf.yZ)(Ea,Xb,$b),appState:Z(Z({},$b),{},{selectedElementIds:(0,la.Z)({},Xb.id,!0)}),commitToHistory:!0}:{elements:Ea,appState:$b,commitToHistory:!1}},contextItemLabel:"labels.removeAllElementsFromFrame",predicate:function(Ea,$b,Xb,sb){return Mg($b,sb)}}),vg=((0,Cc.z)({name:"updateFrameRendering",viewMode:!0,
trackEvent:{category:"canvas"},perform:function(Ea,$b){return{elements:Ea,appState:Z(Z({},$b),{},{frameRendering:Z(Z({},$b.frameRendering),{},{enabled:!$b.frameRendering.enabled})}),commitToHistory:!1}},contextItemLabel:"labels.updateFrameRendering",checked:function(Ea){return Ea.frameRendering.enabled}}),(0,Cc.z)({name:"setFrameAsActiveTool",trackEvent:{category:"toolbar"},perform:function(Ea,$b,Xb,sb){Xb=(0,Qa.Om)($b,{type:"frame"});return(0,Qa.Uk)(sb.interactiveCanvas,Z(Z({},$b),{},{activeTool:Xb})),
{elements:Ea,appState:Z(Z({},$b),{},{activeTool:(0,Qa.Om)($b,{type:"frame"})}),commitToHistory:!1}},keyTest:function(Ea){return!Ea[Wa.tW.CTRL_OR_CMD]&&!Ea.shiftKey&&!Ea.altKey&&Ea.key.toLocaleLowerCase()===Wa.tW.F}}),b(8260)),$g=b(1675),Gh=b(1601),Qk=function(){return(0,Pa.jsxs)("div",{"data-testid":"brave-measure-text-error",children:[(0,Pa.jsx)("p",{children:(0,Pa.jsx)(Gh.Z,{i18nKey:"errors.brave_measure_text_error.line1",bold:function(Ea){return(0,Pa.jsx)("span",{style:{fontWeight:600},children:Ea})}})}),
(0,Pa.jsx)("p",{children:(0,Pa.jsx)(Gh.Z,{i18nKey:"errors.brave_measure_text_error.line2",bold:function(Ea){return(0,Pa.jsx)("span",{style:{fontWeight:600},children:Ea})}})}),(0,Pa.jsx)("p",{children:(0,Pa.jsx)(Gh.Z,{i18nKey:"errors.brave_measure_text_error.line3",link:function(Ea){return(0,Pa.jsx)("a",{href:"http://docs.excalidraw.com/docs/@excalidraw/excalidraw/faq#turning-off-aggresive-block-fingerprinting-in-brave-browser",children:Ea})}})}),(0,Pa.jsx)("p",{children:(0,Pa.jsx)(Gh.Z,{i18nKey:"errors.brave_measure_text_error.line4",
issueLink:function(Ea){return(0,Pa.jsx)("a",{href:"https://github.com/excalidraw/excalidraw/issues/new",children:Ea})},discordLink:function(Ea){return(0,Pa.jsxs)("a",{href:"https://discord.gg/UexuTaE",children:[Ea,"."]})}})})]})},ug=b(6419),Zl=b(5743),ql=function(Ea){return{zoom:Ea.zoom,scrollX:Ea.scrollX,scrollY:Ea.scrollY,width:Ea.width,height:Ea.height,viewModeEnabled:Ea.viewModeEnabled,editingGroupId:Ea.editingGroupId,editingLinearElement:Ea.editingLinearElement,selectedElementIds:Ea.selectedElementIds,
frameToHighlight:Ea.frameToHighlight,offsetLeft:Ea.offsetLeft,offsetTop:Ea.offsetTop,theme:Ea.theme,pendingImageElementId:Ea.pendingImageElementId,selectionElement:Ea.selectionElement,selectedGroupIds:Ea.selectedGroupIds,selectedLinearElement:Ea.selectedLinearElement,multiElement:Ea.multiElement,isBindingEnabled:Ea.isBindingEnabled,suggestedBindings:Ea.suggestedBindings,isRotating:Ea.isRotating,elementsToHighlight:Ea.elementsToHighlight,openSidebar:Ea.openSidebar,showHyperlinkPopup:Ea.showHyperlinkPopup,
collaborators:Ea.collaborators,activeEmbeddable:Ea.activeEmbeddable}},Qi=oa().memo(function(Ea){var $b=(0,na.useRef)(!1);return(0,na.useEffect)(function(){var Xb;if($b.current){var sb={},cc={},Qb={},zb={},xb={};Ea.appState.collaborators.forEach(function(qc,Dc){if(qc.selectedElementIds)for(var Yc=0,ed=Object.keys(qc.selectedElementIds);Yc<ed.length;Yc++){var nd=ed[Yc];nd in Qb||(Qb[nd]=[]);Qb[nd].push(Dc)}qc.pointer&&(qc.username&&(zb[Dc]=qc.username),qc.userState&&(xb[Dc]=qc.userState),cc[Dc]=(0,Qa._i)({sceneX:qc.pointer.x,
sceneY:qc.pointer.y},Ea.appState),sb[Dc]=qc.button)});var Zb=(null===(Xb=Ea.containerRef)||void 0===Xb?void 0:Xb.current)&&getComputedStyle(Ea.containerRef.current).getPropertyValue("--color-selection")||"#6965db";(0,Zl.tp)({canvas:Ea.canvas,elements:Ea.elements,visibleElements:Ea.visibleElements,selectedElements:Ea.selectedElements,scale:window.devicePixelRatio,appState:Ea.appState,renderConfig:{remotePointerViewportCoords:cc,remotePointerButton:sb,remoteSelectedElementIds:Qb,remotePointerUsernames:zb,
remotePointerUserStates:xb,selectionColor:Zb,renderScrollbars:!1},callback:Ea.renderInteractiveSceneCallback},(0,Qa.G9)())}else $b.current=!0}),(0,Pa.jsx)("canvas",{className:"excalidraw__canvas interactive",style:{width:Ea.appState.width,height:Ea.appState.height,cursor:Ea.appState.viewModeEnabled?bb.oc.GRAB:bb.oc.AUTO},width:Ea.appState.width*Ea.scale,height:Ea.appState.height*Ea.scale,ref:Ea.handleCanvasRef,onContextMenu:Ea.onContextMenu,onPointerMove:Ea.onPointerMove,onPointerUp:Ea.onPointerUp,
onPointerCancel:Ea.onPointerCancel,onTouchMove:Ea.onTouchMove,onPointerDown:Ea.onPointerDown,onDoubleClick:Ea.appState.viewModeEnabled?void 0:Ea.onDoubleClick,children:(0,yb.t)("labels.drawingCanvas")})},function(Ea,$b){return Ea.selectionNonce===$b.selectionNonce&&Ea.versionNonce===$b.versionNonce&&Ea.scale===$b.scale&&Ea.elements===$b.elements&&Ea.visibleElements===$b.visibleElements&&Ea.selectedElements===$b.selectedElements&&(0,Qa.w8)(ql(Ea.appState),ql($b.appState))}),rl=function(Ea){return{zoom:Ea.zoom,
scrollX:Ea.scrollX,scrollY:Ea.scrollY,width:Ea.width,height:Ea.height,viewModeEnabled:Ea.viewModeEnabled,offsetLeft:Ea.offsetLeft,offsetTop:Ea.offsetTop,theme:Ea.theme,pendingImageElementId:Ea.pendingImageElementId,shouldCacheIgnoreZoom:Ea.shouldCacheIgnoreZoom,viewBackgroundColor:Ea.viewBackgroundColor,exportScale:Ea.exportScale,selectedElementsAreBeingDragged:Ea.selectedElementsAreBeingDragged,gridSize:Ea.gridSize,frameRendering:Ea.frameRendering,selectedElementIds:Ea.selectedElementIds,frameToHighlight:Ea.frameToHighlight,
editingGroupId:Ea.editingGroupId}},Il=oa().memo(function(Ea){var $b=(0,na.useRef)(null),Xb=(0,na.useRef)(!1);return(0,na.useEffect)(function(){var sb=$b.current;if(sb){var cc=Ea.canvas;Xb.current||(Xb.current=!0,sb.replaceChildren(cc),cc.classList.add("excalidraw__canvas","static"));sb="".concat(Ea.appState.width,"px");var Qb="".concat(Ea.appState.height,"px");cc.style.width!==sb&&(cc.style.width=sb);cc.style.height!==Qb&&(cc.style.height=Qb);sb=Ea.appState.width*Ea.scale;Qb=Ea.appState.height*Ea.scale;
cc.width!==sb&&(cc.width=sb);cc.height!==Qb&&(cc.height=Qb);(0,Zl.AW)({canvas:cc,rc:Ea.rc,scale:Ea.scale,elements:Ea.elements,visibleElements:Ea.visibleElements,appState:Ea.appState,renderConfig:Ea.renderConfig},(0,Qa.G9)())}}),(0,Pa.jsx)("div",{className:"excalidraw__canvas-wrapper",ref:$b})},function(Ea,$b){return Ea.versionNonce===$b.versionNonce&&Ea.scale===$b.scale&&Ea.elements===$b.elements&&Ea.visibleElements===$b.visibleElements&&(0,Qa.w8)(rl(Ea.appState),rl($b.appState))}),sl=function(){function Ea($b){var Xb=
this;(0,Ga.Z)(this,Ea);this.getRenderableElements=(0,Qa.HP)(function(sb){var cc=sb.zoom,Qb=sb.offsetLeft,zb=sb.offsetTop,xb=sb.scrollX,Zb=sb.scrollY,qc=sb.height,Dc=sb.width,Yc=sb.editingElement,ed=sb.pendingImageElementId;sb=(sb.versionNonce,function(nd){var Rd=nd.editingElement,ce=nd.pendingImageElementId;return nd.elements.filter(function(Yd){return!((0,Ib.pC)(Yd)&&ce===Yd.id||Rd&&"text"===Rd.type&&Yd.id===Rd.id)})}({elements:Xb.scene.getNonDeletedElements(),editingElement:Yc,pendingImageElementId:ed}));
cc=function(nd){var Rd=nd.zoom,ce=nd.offsetLeft,Yd=nd.offsetTop,Ne=nd.scrollX,ag=nd.scrollY,pg=nd.height,Gf=nd.width;return nd.elements.filter(function(Tf){return(0,Nb.PZ)(Tf,Gf,pg,{zoom:Rd,offsetLeft:ce,offsetTop:Yd,scrollX:Ne,scrollY:ag})})}({elements:sb,zoom:cc,offsetLeft:Qb,offsetTop:zb,scrollX:xb,scrollY:Zb,height:qc,width:Dc});return{canvasElements:sb,visibleElements:cc}});this.scene=$b}return(0,Ia.Z)(Ea,[{key:"destroy",value:function(){(0,Zl.n_)();this.getRenderableElements.clear()}}]),Ea}(),
Jn=oa().createContext(null),Tj=oa().createContext(null),Ei={isSmScreen:!1,isMobile:!1,isTouchScreen:!1,canDeviceFitSidebar:!1,isLandscape:!1},Ih=oa().createContext(Ei);Ih.displayName="DeviceContext";var cl=oa().createContext({container:null,id:null});cl.displayName="ExcalidrawContainerContext";var $l=oa().createContext([]);$l.displayName="ExcalidrawElementsContext";var Ck=oa().createContext(ea(ea({},(0,bd.im)()),{},{width:0,height:0,offsetLeft:0,offsetTop:0}));Ck.displayName="ExcalidrawAppStateContext";
var mm=oa().createContext(function(){console.warn("unitialized ExcalidrawSetAppStateContext context!")});mm.displayName="ExcalidrawSetAppStateContext";var am=oa().createContext(null);am.displayName="ExcalidrawActionManagerContext";var Jl=function(){return(0,na.useContext)(Jn)},dl=function(){return(0,na.useContext)(Tj)},tl=function(){return(0,na.useContext)(Ih)},xi=function(){return(0,na.useContext)(cl)},dk=function(){return(0,na.useContext)($l)},ek=function(){return(0,na.useContext)(Ck)},ok=function(){return(0,na.useContext)(mm)},
Ri=function(){return(0,na.useContext)(am)},Ci=!1,Li=0,rj=!1,xk=!1,kj=!1,Ji={horizontal:null,vertical:null},Jk=0,Kk=!1,ik=new Map,Cj=!1,bm=0,yn=!1,yk=null,dj=new Map,bj=null,Ul=null,nm=null,Hm=function(Ea){function $b(Qb){(0,Ga.Z)(this,$b);var zb=cc.call(this,Qb);co.call((0,Ya.Z)(zb));var xb,Zb=(0,bd.im)(),qc=Qb.excalidrawRef,Dc=Qb.viewModeEnabled;Dc=void 0!==Dc&&Dc;var Yc=Qb.zenModeEnabled;Yc=void 0!==Yc&&Yc;var ed=Qb.gridModeEnabled;ed=void 0!==ed&&ed;var nd=Qb.theme;nd=void 0===nd?Zb.theme:nd;Qb=
Qb.name;Qb=void 0===Qb?Zb.name:Qb;if(zb.state=ea(ea(ea({},Zb),{},{theme:nd,isLoading:!0},zb.getCanvasOffsets()),{},{viewModeEnabled:Dc,zenModeEnabled:Yc,gridSize:ed?bb.k:null,name:Qb,width:window.innerWidth,height:window.innerHeight}),zb.id=(0,Ma.x0)(),zb.library=new Qc.ZP((0,Ya.Z)(zb)),zb.scene=new Jc.Z,zb.canvas=document.createElement("canvas"),zb.rc=Oa.Z.canvas(zb.canvas),zb.renderer=new sl(zb.scene),qc){var Rd;Zb="current"in qc&&(null===(Rd=qc.current)||void 0===Rd?void 0:Rd.readyPromise)||(0,Qa.PI)();
Rd={ready:!0,readyPromise:Zb,updateScene:zb.updateScene,updateLibrary:zb.library.updateLibrary,addFiles:zb.addFiles,resetScene:zb.resetScene,getSceneElementsIncludingDeleted:zb.getSceneElementsIncludingDeleted,history:{clear:zb.resetHistory},scrollToContent:zb.scrollToContent,getSceneElements:zb.getSceneElements,getAppState:function(){return zb.state},getFiles:function(){return zb.files},refresh:zb.refresh,setToast:zb.setToast,id:zb.id,setActiveTool:zb.setActiveTool,setCursor:zb.setCursor,resetCursor:zb.resetCursor,
updateFrameRendering:zb.updateFrameRendering,toggleSidebar:zb.toggleSidebar};"function"==typeof qc?qc(Rd):qc.current=Rd;Zb.resolve(Rd)}return zb.excalidrawContainerValue={container:zb.excalidrawContainerRef.current,id:zb.id},zb.fonts=new Qe({scene:zb.scene,onSceneUpdated:zb.onSceneUpdated}),zb.history=new rb,zb.actionManager=new pc(zb.syncActionResult,function(){return zb.state},function(){return zb.scene.getElementsIncludingDeleted()},(0,Ya.Z)(zb)),zb.actionManager.registerAll(Cc.N),zb.actionManager.registerAction((xb=
zb.history,{name:"undo",trackEvent:{category:"history"},perform:function(ce,Yd){return Lb(ce,Yd,function(){return xb.undoOnce()})},keyTest:function(ce){return ce[Wa.tW.CTRL_OR_CMD]&&ce.key.toLowerCase()===Wa.tW.Z&&!ce.shiftKey},PanelComponent:function(ce){var Yd=ce.updateData;ce=ce.data;return(0,Pa.jsx)(vb.V,{type:"button",icon:ib.UE,"aria-label":(0,yb.t)("buttons.undo"),onClick:Yd,size:(null==ce?void 0:ce.size)||"medium"})},commitToHistory:function(){return!1}})),zb.actionManager.registerAction(function(ce){return{name:"redo",
trackEvent:{category:"history"},perform:function(Yd,Ne){return Lb(Yd,Ne,function(){return ce.redoOnce()})},keyTest:function(Yd){return Yd[Wa.tW.CTRL_OR_CMD]&&Yd.shiftKey&&Yd.key.toLowerCase()===Wa.tW.Z||bb.ED&&Yd.ctrlKey&&!Yd.shiftKey&&Yd.key===Wa.tW.Y},PanelComponent:function(Yd){var Ne=Yd.updateData;Yd=Yd.data;return(0,Pa.jsx)(vb.V,{type:"button",icon:ib.zG,"aria-label":(0,yb.t)("buttons.redo"),onClick:Ne,size:(null==Yd?void 0:Yd.size)||"medium"})},commitToHistory:function(){return!1}}}(zb.history)),
zb}(0,Fa.Z)($b,Ea);var Xb,sb,cc=fa($b);return(0,Ia.Z)($b,[{key:"onWindowMessage",value:function(Qb){if("https://player.vimeo.com"===Qb.origin||"https://www.youtube.com"===Qb.origin){var zb=null;try{zb=JSON.parse(Qb.data)}catch(ed){}if(zb)switch(Qb.origin){case "https://player.vimeo.com":if("paused"===zb.method){var xb,Zb=null,qc=document.body.querySelectorAll("iframe.excalidraw__embeddable");if(qc){var Dc;qc=aa(qc);try{for(qc.s();!(Dc=qc.n()).done;){var Yc=Dc.value;Yc.contentWindow===Qb.source&&(Zb=
Yc.contentWindow)}}catch(ed){qc.e(ed)}finally{qc.f()}null===(xb=Zb)||void 0===xb||xb.postMessage(JSON.stringify({method:zb.value?"play":"pause",value:!0}),"*")}}break;case "https://www.youtube.com":"infoDelivery"===zb.event&&zb.info&&zb.id&&"number"==typeof zb.info.playerState&&(Qb=zb.id,zb=zb.info.playerState,Object.values(bb.vf).includes(zb)&&ik.set(Qb,zb))}}}},{key:"updateEmbeddableRef",value:function(Qb,zb){zb&&this.iFrameRefs.set(Qb,zb)}},{key:"getHTMLIFrameElement",value:function(Qb){return this.iFrameRefs.get(Qb)}},
{key:"handleEmbeddableCenterClick",value:function(Qb){var zb,xb,Zb,qc,Dc=this;if((null===(zb=this.state.activeEmbeddable)||void 0===zb?void 0:zb.element)!==Qb||"active"!==(null===(xb=this.state.activeEmbeddable)||void 0===xb?void 0:xb.state))if(setTimeout(function(){Dc.setState({activeEmbeddable:{element:Qb,state:"active"},selectedElementIds:(0,la.Z)({},Qb.id,!0),draggingElement:null,selectionElement:null})},100),zb=this.getHTMLIFrameElement(Qb.id),null!=zb&&zb.contentWindow){if(zb.src.includes("youtube"))switch(xb=
ik.get(Qb.id),xb||(ik.set(Qb.id,bb.vf.UNSTARTED),zb.contentWindow.postMessage(JSON.stringify({event:"listening",id:Qb.id}),"*")),xb){case bb.vf.PLAYING:case bb.vf.BUFFERING:null===(Zb=zb.contentWindow)||void 0===Zb||Zb.postMessage(JSON.stringify({event:"command",func:"pauseVideo",args:""}),"*");break;default:null===(qc=zb.contentWindow)||void 0===qc||qc.postMessage(JSON.stringify({event:"command",func:"playVideo",args:""}),"*")}zb.src.includes("player.vimeo.com")&&zb.contentWindow.postMessage(JSON.stringify({method:"paused"}),
"*")}}},{key:"isEmbeddableCenter",value:function(Qb,zb,xb,Zb){var qc,Dc;return Qb&&!zb.altKey&&!zb.shiftKey&&!zb.metaKey&&!zb.ctrlKey&&((null===(qc=this.state.activeEmbeddable)||void 0===qc?void 0:qc.element)!==Qb||"hover"===(null===(Dc=this.state.activeEmbeddable)||void 0===Dc?void 0:Dc.state)||!this.state.activeEmbeddable)&&xb>=Qb.x+Qb.width/3&&xb<=Qb.x+2*Qb.width/3&&Zb>=Qb.y+Qb.height/3&&Zb<=Qb.y+2*Qb.height/3}},{key:"renderEmbeddables",value:function(){var Qb=this,zb=this.state.zoom.value,xb=
this.state.width,Zb=this.state.height,qc=this.scene.getNonDeletedElements().filter(function(Dc){return(0,Ib.gs)(Dc)&&!!Dc.validated});return(0,Pa.jsx)(Pa.Fragment,{children:qc.map(function(Dc){var Yc,ed,nd,Rd,ce,Yd,Ne,ag,pg=(0,Qa._i)({sceneX:Dc.x,sceneY:Dc.y},Qb.state),Gf=pg.x;pg=pg.y;var Tf=(0,Rc.LM)((0,ne.ye)(Dc.link||"")),nf=(0,Nb.PZ)(Dc,xb,Zb,Qb.state),Ze=(null===(Yc=Qb.state.activeEmbeddable)||void 0===Yc?void 0:Yc.element)===Dc&&"active"===(null===(ed=Qb.state.activeEmbeddable)||void 0===ed?
void 0:ed.state);Yc=(null===(nd=Qb.state.activeEmbeddable)||void 0===nd?void 0:nd.element)===Dc&&"hover"===(null===(Rd=Qb.state.activeEmbeddable)||void 0===Rd?void 0:Rd.state);return(0,Pa.jsx)("div",{className:(0,Va.Z)("excalidraw__embeddable-container",{"is-hovered":Yc}),style:(0,la.Z)({transform:nf?"translate(".concat(Gf-Qb.state.offsetLeft,"px, ").concat(pg-Qb.state.offsetTop,"px) scale(").concat(zb,")"):"none",display:nf?"block":"none",opacity:Dc.opacity/100},"--embeddable-radius","".concat((0,fc.yW)(Math.min(Dc.width,
Dc.height),Dc),"px")),children:(0,Pa.jsxs)("div",{className:"excalidraw__embeddable-container__inner",style:{width:nf?"".concat(Dc.width,"px"):0,height:nf?"".concat(Dc.height,"px"):0,transform:nf?"rotate(".concat(Dc.angle,"rad)"):"none",pointerEvents:Ze?bb.XI.enabled:bb.XI.disabled},children:[Yc&&(0,Pa.jsx)("div",{className:"excalidraw__embeddable-hint",children:(0,yb.t)("buttons.embeddableInteractionButton")}),(0,Pa.jsx)("div",{className:"excalidraw__embeddable__outer",style:{padding:"".concat(Dc.strokeWidth,
"px")},children:null!==(ce=null===(Yd=(Ne=Qb.props).renderEmbeddable)||void 0===Yd?void 0:Yd.call(Ne,Dc,Qb.state))&&void 0!==ce?ce:(0,Pa.jsx)("iframe",{ref:function(xg){return Qb.updateEmbeddableRef(Dc.id,xg)},className:"excalidraw__embeddable",srcDoc:"document"===(null==Tf?void 0:Tf.type)?Tf.srcdoc(Qb.state.theme):void 0,src:"document"!==(null==Tf?void 0:Tf.type)?null!==(ag=null==Tf?void 0:Tf.link)&&void 0!==ag?ag:"":void 0,scrolling:"no",referrerPolicy:"no-referrer-when-downgrade",title:"Excalidraw Embedded Content",
allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0,sandbox:"allow-same-origin allow-scripts allow-forms allow-popups allow-popups-to-escape-sandbox allow-presentation allow-downloads"})})]})},Dc.id)})})}},{key:"render",value:function(){var Qb,zb,xb,Zb=this,qc=this.scene.getSelectedElements(this.state),Dc=this.props,Yc=Dc.renderTopRightUI;Dc=Dc.renderCustomStats;var ed=this.scene.getVersionNonce(),nd=this.renderer.getRenderableElements({versionNonce:ed,
zoom:this.state.zoom,offsetLeft:this.state.offsetLeft,offsetTop:this.state.offsetTop,scrollX:this.state.scrollX,scrollY:this.state.scrollY,height:this.state.height,width:this.state.width,editingElement:this.state.editingElement,pendingImageElementId:this.state.pendingImageElementId}),Rd=nd.canvasElements;nd=nd.visibleElements;return(0,Pa.jsx)("div",{className:(0,Va.Z)("excalidraw excalidraw-container",{"excalidraw--view-mode":this.state.viewModeEnabled,"excalidraw--mobile":this.device.isMobile}),
style:(0,la.Z)({},"--ui-pointerEvents",this.state.selectionElement||this.state.draggingElement||this.state.resizingElement||this.state.editingElement&&!(0,Xc.iB)(this.state.editingElement)?bb.XI.disabled:bb.XI.enabled),ref:this.excalidrawContainerRef,onDrop:this.handleAppOnDrop,tabIndex:0,onKeyDown:this.props.handleKeyboardGlobally?void 0:this.onKeyDown,children:(0,Pa.jsx)(Jn.Provider,{value:this,children:(0,Pa.jsx)(Tj.Provider,{value:this.props,children:(0,Pa.jsx)(cl.Provider,{value:this.excalidrawContainerValue,
children:(0,Pa.jsx)(Ih.Provider,{value:this.device,children:(0,Pa.jsx)(mm.Provider,{value:this.setAppState,children:(0,Pa.jsx)(Ck.Provider,{value:this.state,children:(0,Pa.jsxs)($l.Provider,{value:this.scene.getNonDeletedElements(),children:[(0,Pa.jsxs)(am.Provider,{value:this.actionManager,children:[(0,Pa.jsx)(Ed,{canvas:this.canvas,interactiveCanvas:this.interactiveCanvas,appState:this.state,files:this.files,setAppState:this.setAppState,actionManager:this.actionManager,elements:this.scene.getNonDeletedElements(),
onLockToggle:this.toggleLock,onPenModeToggle:this.togglePenMode,onHandToolToggle:this.onHandToolToggle,langCode:(0,yb.G3)().code,renderTopRightUI:Yc,renderCustomStats:Dc,showExitZenModeBtn:void 0===(null===(Qb=this.props)||void 0===Qb?void 0:Qb.zenModeEnabled)&&this.state.zenModeEnabled,UIOptions:this.props.UIOptions,onImageAction:this.onImageAction,onExportImage:this.onExportImage,renderWelcomeScreen:!this.state.isLoading&&this.state.showWelcomeScreen&&"selection"===this.state.activeTool.type&&!this.state.zenModeEnabled&&
!this.scene.getElementsIncludingDeleted().length,app:this,children:this.props.children}),(0,Pa.jsx)("div",{className:"excalidraw-textEditorContainer"}),(0,Pa.jsx)("div",{className:"excalidraw-contextMenuContainer"}),(0,Pa.jsx)("div",{className:"excalidraw-eye-dropper-container"}),1===qc.length&&!this.state.contextMenu&&this.state.showHyperlinkPopup&&(0,Pa.jsx)(Le.nW,{element:qc[0],setAppState:this.setAppState,onLinkOpen:this.props.onLinkOpen,setToast:this.setToast},qc[0].id),null!==this.state.toast&&
(0,Pa.jsx)(ye,{message:this.state.toast.message,onClose:function(){return Zb.setToast(null)},duration:this.state.toast.duration,closable:this.state.toast.closable}),this.state.contextMenu&&(0,Pa.jsx)(Bb,{items:this.state.contextMenu.items,top:this.state.contextMenu.top,left:this.state.contextMenu.left,actionManager:this.actionManager}),(0,Pa.jsx)(Il,{canvas:this.canvas,rc:this.rc,elements:Rd,visibleElements:nd,versionNonce:ed,selectionNonce:null===(zb=this.state.selectionElement)||void 0===zb?void 0:
zb.versionNonce,scale:window.devicePixelRatio,appState:this.state,renderConfig:{imageCache:this.imageCache,isExporting:!1,renderGrid:!0}}),(0,Pa.jsx)(Qi,{containerRef:this.excalidrawContainerRef,canvas:this.interactiveCanvas,elements:Rd,visibleElements:nd,selectedElements:qc,versionNonce:ed,selectionNonce:null===(xb=this.state.selectionElement)||void 0===xb?void 0:xb.versionNonce,scale:window.devicePixelRatio,appState:this.state,renderInteractiveSceneCallback:this.renderInteractiveSceneCallback,handleCanvasRef:this.handleInteractiveCanvasRef,
onContextMenu:this.handleCanvasContextMenu,onPointerMove:this.handleCanvasPointerMove,onPointerUp:this.handleCanvasPointerUp,onPointerCancel:this.removePointer,onTouchMove:this.handleTouchMove,onPointerDown:this.handleCanvasPointerDown,onDoubleClick:this.handleCanvasDoubleClick}),this.renderFrameNames()]}),this.renderEmbeddables()]})})})})})})})})}},{key:"componentDidMount",value:(sb=(0,xa.Z)(ua().mark(function zb(){var xb,Zb,qc,Dc,Yc,ed,nd=this;return ua().wrap(function(Rd){for(;;)switch(Rd.prev=
Rd.next){case 0:this.unmounted=!1,this.excalidrawContainerValue.container=this.excalidrawContainerRef.current,"production"===bb.Vi.TEST&&(this.setState.bind(this),Object.defineProperties(window.h,{state:{configurable:!0,get:function(){return nd.state}},setState:{configurable:!0,value:function(){return nd.setState.apply(nd,arguments)}},app:{configurable:!0,value:this},history:{configurable:!0,value:this.history}})),this.scene.addCallback(this.onSceneUpdated),this.addEventListeners(),this.props.autoFocus&&
this.excalidrawContainerRef.current&&this.focusContainer(),this.excalidrawContainerRef.current&&!(0,Qa.h2)()&&this.refreshDeviceState(this.excalidrawContainerRef.current),"ResizeObserver"in window&&null!==(xb=this.excalidrawContainerRef)&&void 0!==xb&&xb.current?(this.resizeObserver=new ResizeObserver(function(){nd.refreshDeviceState(nd.excalidrawContainerRef.current);nd.updateDOMRect()}),null===(Zb=this.resizeObserver)||void 0===Zb||Zb.observe(this.excalidrawContainerRef.current)):window.matchMedia&&
(qc=window.matchMedia("(max-width: ".concat(bb.kV,"px), (max-height: ").concat(bb.Yx,"px) and (max-width: ").concat(bb.sS,"px)")),Dc=window.matchMedia("(max-width: ".concat(bb.eF,"px)")),Yc=window.matchMedia("(min-width: ".concat(null!=this.props.UIOptions.dockedSidebarBreakpoint?this.props.UIOptions.dockedSidebarBreakpoint:bb.sk,"px)")),ed=function(){nd.excalidrawContainerRef.current.getBoundingClientRect();nd.device=(0,Qa.v4)(nd.device,{isSmScreen:Dc.matches,isMobile:qc.matches,canDeviceFitSidebar:Yc.matches})},
qc.addListener(ed),this.detachIsMobileMqHandler=function(){return qc.removeListener(ed)}),(new URLSearchParams(window.location.search.slice(1))).has("web-share-target")?this.restoreFileFromShare():this.updateDOMRect(this.initializeScene),(0,bb.jP)()&&!(0,Ue.eB)()&&this.setState({errorMessage:(0,Pa.jsx)(Qk,{})});case 11:case "end":return Rd.stop()}},zb,this)})),function(){return sb.apply(this,arguments)})},{key:"componentWillUnmount",value:function(){var zb;this.renderer.destroy();this.scene=new Jc.Z;
this.renderer=new sl(this.scene);this.files={};this.imageCache.clear();null===(zb=this.resizeObserver)||void 0===zb||zb.disconnect();this.unmounted=!0;this.removeEventListeners();this.scene.destroy();this.library.destroy();$i.R.destroy();clearTimeout(Jk);Bc.N.clearCache();db.bO.clearCache();Jk=0}},{key:"removeEventListeners",value:function(){var zb,xb,Zb,qc,Dc;document.removeEventListener(bb.Ks.POINTER_UP,this.removePointer);document.removeEventListener(bb.Ks.COPY,this.onCopy);document.removeEventListener(bb.Ks.PASTE,
this.pasteFromClipboard);document.removeEventListener(bb.Ks.CUT,this.onCut);null===(zb=this.excalidrawContainerRef.current)||void 0===zb||zb.removeEventListener(bb.Ks.WHEEL,this.onWheel);null===(xb=this.nearestScrollableContainer)||void 0===xb||xb.removeEventListener(bb.Ks.SCROLL,this.onScroll);document.removeEventListener(bb.Ks.KEYDOWN,this.onKeyDown,!1);document.removeEventListener(bb.Ks.MOUSE_MOVE,this.updateCurrentCursorPosition,!1);document.removeEventListener(bb.Ks.KEYUP,this.onKeyUp);window.removeEventListener(bb.Ks.RESIZE,
this.onResize,!1);window.removeEventListener(bb.Ks.UNLOAD,this.onUnload,!1);window.removeEventListener(bb.Ks.BLUR,this.onBlur,!1);null===(Zb=this.excalidrawContainerRef.current)||void 0===Zb||Zb.removeEventListener(bb.Ks.DRAG_OVER,this.disableEvent,!1);null===(qc=this.excalidrawContainerRef.current)||void 0===qc||qc.removeEventListener(bb.Ks.DROP,this.disableEvent,!1);document.removeEventListener(bb.Ks.GESTURE_START,this.onGestureStart,!1);document.removeEventListener(bb.Ks.GESTURE_CHANGE,this.onGestureChange,
!1);document.removeEventListener(bb.Ks.GESTURE_END,this.onGestureEnd,!1);null===(Dc=this.detachIsMobileMqHandler)||void 0===Dc||Dc.call(this);window.removeEventListener(bb.Ks.MESSAGE,this.onWindowMessage,!1)}},{key:"addEventListeners",value:function(){var zb,xb,Zb,qc,Dc,Yc=this;this.removeEventListeners();window.addEventListener(bb.Ks.MESSAGE,this.onWindowMessage,!1);document.addEventListener(bb.Ks.POINTER_UP,this.removePointer);document.addEventListener(bb.Ks.COPY,this.onCopy);null===(zb=this.excalidrawContainerRef.current)||
void 0===zb||zb.addEventListener(bb.Ks.WHEEL,this.onWheel,{passive:!1});this.props.handleKeyboardGlobally&&document.addEventListener(bb.Ks.KEYDOWN,this.onKeyDown,!1);document.addEventListener(bb.Ks.KEYUP,this.onKeyUp,{passive:!0});document.addEventListener(bb.Ks.MOUSE_MOVE,this.updateCurrentCursorPosition);null===(xb=document.fonts)||void 0===xb||null===(Zb=xb.addEventListener)||void 0===Zb||Zb.call(xb,"loadingdone",function(ed){Yc.fonts.onFontsLoaded(ed.fontfaces)});document.addEventListener(bb.Ks.GESTURE_START,
this.onGestureStart,!1);document.addEventListener(bb.Ks.GESTURE_CHANGE,this.onGestureChange,!1);document.addEventListener(bb.Ks.GESTURE_END,this.onGestureEnd,!1);this.state.viewModeEnabled||(document.addEventListener(bb.Ks.PASTE,this.pasteFromClipboard),document.addEventListener(bb.Ks.CUT,this.onCut),this.props.detectScroll&&(this.nearestScrollableContainer=(0,Qa.Ip)(this.excalidrawContainerRef.current),this.nearestScrollableContainer.addEventListener(bb.Ks.SCROLL,this.onScroll)),window.addEventListener(bb.Ks.RESIZE,
this.onResize,!1),window.addEventListener(bb.Ks.UNLOAD,this.onUnload,!1),window.addEventListener(bb.Ks.BLUR,this.onBlur,!1),null===(qc=this.excalidrawContainerRef.current)||void 0===qc||qc.addEventListener(bb.Ks.DRAG_OVER,this.disableEvent,!1),null===(Dc=this.excalidrawContainerRef.current)||void 0===Dc||Dc.addEventListener(bb.Ks.DROP,this.disableEvent,!1))}},{key:"componentDidUpdate",value:function(zb,xb){var Zb,qc,Dc,Yc,ed=this;(this.updateEmbeddables(),this.state.showWelcomeScreen||this.scene.getElementsIncludingDeleted().length||
this.setState({showWelcomeScreen:!0}),this.excalidrawContainerRef.current&&zb.UIOptions.dockedSidebarBreakpoint!==this.props.UIOptions.dockedSidebarBreakpoint&&this.refreshDeviceState(this.excalidrawContainerRef.current),xb.scrollX===this.state.scrollX&&xb.scrollY===this.state.scrollY)||null!==(Dc=this.props)&&void 0!==Dc&&null!==(Yc=Dc.onScrollChange)&&void 0!==Yc&&Yc.call(Dc,this.state.scrollX,this.state.scrollY);Object.keys(this.state.selectedElementIds).length&&(0,bd.EN)(this.state)&&this.setState({activeTool:(0,Qa.Om)(this.state,
{type:"selection"})});"eraser"===this.state.activeTool.type&&xb.theme!==this.state.theme&&(0,Qa.OF)(this.interactiveCanvas,this.state.theme);"selection"===xb.activeTool.type&&"selection"!==this.state.activeTool.type&&this.state.showHyperlinkPopup&&this.setState({showHyperlinkPopup:!1});zb.langCode!==this.props.langCode&&this.updateLanguage();zb.viewModeEnabled!==this.props.viewModeEnabled&&this.setState({viewModeEnabled:!!this.props.viewModeEnabled});xb.viewModeEnabled!==this.state.viewModeEnabled&&
(this.addEventListeners(),this.deselectElements());zb.zenModeEnabled!==this.props.zenModeEnabled&&this.setState({zenModeEnabled:!!this.props.zenModeEnabled});zb.theme!==this.props.theme&&this.props.theme&&this.setState({theme:this.props.theme});zb.gridModeEnabled!==this.props.gridModeEnabled&&this.setState({gridSize:this.props.gridModeEnabled?bb.k:null});this.props.name&&zb.name!==this.props.name&&this.setState({name:this.props.name});null===(Zb=this.excalidrawContainerRef.current)||void 0===Zb||
Zb.classList.toggle("theme--dark","dark"===this.state.theme);this.state.editingLinearElement&&!this.state.selectedElementIds[this.state.editingLinearElement.elementId]&&setTimeout(function(){ed.state.editingLinearElement&&ed.actionManager.executeAction(Ua.pL)});null!==(qc=this.state.editingElement)&&void 0!==qc&&qc.isDeleted&&this.setState({editingElement:null});this.state.selectedLinearElement&&!this.state.selectedElementIds[this.state.selectedLinearElement.elementId]&&this.setState({selectedLinearElement:null});
var nd,Rd;zb=xb.multiElement;(xb.activeTool!==this.state.activeTool&&null!=zb&&(0,ab.N1)(this.state)&&(0,Ib.Mn)(zb,!1)&&(0,ab.R)(zb,this.state,this.scene,(0,Qa.AK)(sc._.getPointAtIndexGlobalCoordinates(zb,-1))),this.history.record(this.state,this.scene.getElementsIncludingDeleted()),this.state.isLoading)||null===(nd=(Rd=this.props).onChange)||void 0===nd||nd.call(Rd,this.scene.getElementsIncludingDeleted(),this.state,this.files)}},{key:"addTextFromPaste",value:function(zb){var xb=this,Zb=1<arguments.length&&
void 0!==arguments[1]&&arguments[1],qc=(0,Qa.dE)({clientX:this.lastViewportPosition.x,clientY:this.lastViewportPosition.y},this.state),Dc=qc.x;qc=qc.y;var Yc={x:Dc,y:qc,strokeColor:this.state.currentItemStrokeColor,backgroundColor:this.state.currentItemBackgroundColor,fillStyle:this.state.currentItemFillStyle,strokeWidth:this.state.currentItemStrokeWidth,strokeStyle:this.state.currentItemStrokeStyle,roundness:null,roughness:this.state.currentItemRoughness,opacity:this.state.currentItemOpacity,text:zb,
fontSize:this.state.currentItemFontSize,fontFamily:this.state.currentItemFontFamily,textAlign:this.state.currentItemTextAlign,verticalAlign:bb.hs,locked:!1},ed=qc,nd=Zb?[zb]:zb.split("\n");qc=nd.reduce(function(ce,Yd,Ne){Yd=Yd.trim();var ag=(0,Ue.PT)(Yc.fontFamily);if(Yd.length)Ne=xb.getTopLayerFrameAtSceneCoords({x:Dc,y:ed}),Ne=(0,Xc.VL)(ea(ea({},Yc),{},{x:Dc,y:ed,text:Yd,lineHeight:ag,frameId:Ne?Ne.id:null})),ce.push(Ne),ed+=Ne.height+10;else{var pg;(null===(pg=nd[Ne-1])||void 0===pg?0:pg.trim())&&
(ed+=(0,Ue.Rg)(Yc.fontSize,ag)+10)}return ce},[]);if(0!==qc.length){var Rd=qc[0].frameId;Rd?this.scene.insertElementsAtIndex(qc,this.scene.getElementIndex(Rd)):this.scene.replaceAllElements([].concat((0,ta.Z)(this.scene.getElementsIncludingDeleted()),(0,ta.Z)(qc)));this.setState({selectedElementIds:(0,sg.Oh)(Object.fromEntries(qc.map(function(ce){return[ce.id,!0]})),this.state)});!Zb&&1<qc.length&&!1===yn&&!this.device.isMobile&&(this.setToast({message:(0,yb.t)("toast.pasteAsSingleElement",{shortcut:(0,Qa.uY)("CtrlOrCmd+Shift+V")}),
duration:5E3}),yn=!0);this.history.resumeRecording()}}},{key:"handleTextWysiwyg",value:function(zb,xb){var Zb=this;xb=xb.isExistingElement;var qc=void 0!==xb&&xb,Dc=function(Yc,ed,nd){Zb.scene.replaceAllElements((0,ta.Z)(Zb.scene.getElementsIncludingDeleted().map(function(Rd){return Rd.id===zb.id&&(0,Xc.iB)(Rd)?(0,Xc.N_)(Rd,{text:Yc,isDeleted:nd,originalText:ed}):Rd})))};(0,Xc.b_)({id:zb.id,canvas:this.canvas,getViewportCoords:function(Yc,ed){Yc=(0,Qa._i)({sceneX:Yc,sceneY:ed},Zb.state);return[Yc.x-
Zb.state.offsetLeft,Yc.y-Zb.state.offsetTop]},onChange:(0,Qa.tH)(function(Yc){Dc(Yc,Yc,!1);(0,Xc.qP)(zb)&&(0,ab.Ww)(zb)}),onSubmit:(0,Qa.tH)(function(Yc){var ed=Yc.text,nd=Yc.viaKeyboard;Yc=Yc.originalText;var Rd=!ed.trim();if(Dc(ed,Yc,Rd),!Rd&&nd){var ce=zb.containerId?zb.containerId:zb.id;Zb.setState(function(Yd){return{selectedElementIds:(0,sg.Oh)(ea(ea({},Yd.selectedElementIds),{},(0,la.Z)({},ce,!0)),Yd)}})}Rd&&(0,ab.$q)(Zb.scene.getNonDeletedElements(),[zb]);Rd&&!qc||Zb.history.resumeRecording();
Zb.setState({draggingElement:null,editingElement:null});Zb.state.activeTool.locked&&(0,Qa.Uk)(Zb.interactiveCanvas,Zb.state);Zb.focusContainer()}),element:zb,excalidrawContainer:this.excalidrawContainerRef.current,app:this});this.deselectElements();Dc(zb.text,zb.originalText,!1)}},{key:"deselectElements",value:function(){this.setState({selectedElementIds:(0,sg.Oh)({},this.state),selectedGroupIds:{},editingGroupId:null,activeEmbeddable:null})}},{key:"getTextElementAtPosition",value:function(zb,xb){return(zb=
this.getElementAtPosition(zb,xb,{includeBoundTextElement:!0}))&&(0,Xc.iB)(zb)&&!zb.isDeleted?zb:null}},{key:"getElementAtPosition",value:function(zb,xb,Zb){var qc=this.getElementsAtPosition(zb,xb,null==Zb?void 0:Zb.includeBoundTextElement,null==Zb?void 0:Zb.includeLockedElements);if(1<qc.length){if(null!=Zb&&Zb.preferSelected)for(Zb=qc.length-1;-1<Zb;Zb--)if(this.state.selectedElementIds[qc[Zb].id])return qc[Zb];Zb=qc[qc.length-1];return(0,Xc.wB)(Zb,this.state,this.frameNameBoundsCache,zb,xb)?qc[qc.length-
2]:Zb}return 1===qc.length?qc[0]:null}},{key:"getElementsAtPosition",value:function(zb,xb){var Zb=this,qc=2<arguments.length&&void 0!==arguments[2]&&arguments[2],Dc=3<arguments.length&&void 0!==arguments[3]&&arguments[3],Yc=qc&&Dc?this.scene.getNonDeletedElements():this.scene.getNonDeletedElements().filter(function(ed){return(Dc||!ed.locked)&&(qc||!((0,Xc.iB)(ed)&&ed.containerId))});return(0,Bc.CJ)(Yc,function(ed){return(0,Xc.wX)(ed,Zb.state,Zb.frameNameBoundsCache,zb,xb)}).filter(function(ed){ed=
(0,rf.$Z)(ed);return!(ed&&Zb.state.frameRendering.enabled&&Zb.state.frameRendering.clip)||(0,rf.Dn)({x:zb,y:xb},ed)})}},{key:"handleHoverSelectedLinearElement",value:function(zb,xb,Zb){var qc=sc._.getElement(zb.elementId),Dc=(0,Ue.WJ)(qc);if(qc)if(this.state.selectedLinearElement){var Yc=-1,ed=null;(0,Nd.Qu)(qc,this.state,this.frameNameBoundsCache,[xb,Zb])?(Yc=sc._.getPointIndexUnderCursor(qc,this.state.zoom,xb,Zb),ed=sc._.getSegmentMidpointHitCoords(zb,{x:xb,y:Zb},this.state),0<=Yc||ed?(0,Qa.KJ)(this.interactiveCanvas,
bb.oc.POINTER):(0,Qa.KJ)(this.interactiveCanvas,bb.oc.MOVE)):((0,Qf.oY)([qc],this.state)&&(0,Xc.wB)(qc,this.state,this.frameNameBoundsCache,xb,Zb)||Dc&&(0,Xc.wX)(Dc,this.state,this.frameNameBoundsCache,xb,Zb))&&(0,Qa.KJ)(this.interactiveCanvas,bb.oc.MOVE);this.state.selectedLinearElement.hoverPointIndex!==Yc&&this.setState({selectedLinearElement:ea(ea({},this.state.selectedLinearElement),{},{hoverPointIndex:Yc})});sc._.arePointsEqual(this.state.selectedLinearElement.segmentMidPointHoveredCoords,ed)||
this.setState({selectedLinearElement:ea(ea({},this.state.selectedLinearElement),{},{segmentMidPointHoveredCoords:ed})})}else(0,Qa.KJ)(this.interactiveCanvas,bb.oc.AUTO)}},{key:"maybeCleanupAfterMissingPointerUp",value:function(zb){null!==yk&&yk(zb)}},{key:"updateGestureOnPointerDown",value:function(zb){dj.set(zb.pointerId,{x:zb.clientX,y:zb.clientY});2===dj.size&&(bj=lb(dj),nm=this.state.zoom.value,Ul=Db(Array.from(dj.values())))}},{key:"initialPointerDownState",value:function(zb){var xb=(0,Qa.dE)(zb,
this.state),Zb=this.scene.getSelectedElements(this.state),qc=(0,Xc.KP)(Zb),Dc=(0,va.Z)(qc,4);qc=Dc[0];var Yc=Dc[1],ed=Dc[2];Dc=Dc[3];return{origin:xb,withCmdOrCtrl:zb[Wa.tW.CTRL_OR_CMD],originInGrid:(0,Qa.AK)((0,fc.wC)(xb.x,xb.y,zb[Wa.tW.CTRL_OR_CMD]?null:this.state.gridSize)),scrollbars:(0,Bc._4)(Ji,zb.clientX-this.state.offsetLeft,zb.clientY-this.state.offsetTop),lastCoords:ea({},xb),originalElements:this.scene.getNonDeletedElements().reduce(function(nd,Rd){return nd.set(Rd.id,(0,Sc.OL)(Rd)),nd},
new Map),resize:{handleType:!1,isResizing:!1,offset:{x:0,y:0},arrowDirection:"origin",center:{x:(ed+qc)/2,y:(Dc+Yc)/2}},hit:{element:null,allHitElements:[],wasAddedToSelection:!1,hasBeenDuplicated:!1,hasHitCommonBoundingBoxOfSelectedElements:this.isHittingCommonBoundingBoxOfSelectedElements(xb,Zb)},drag:{hasOccurred:!1,offset:null},eventListeners:{onMove:null,onUp:null,onKeyUp:null,onKeyDown:null},boxSelection:{hasOccurred:!1},elementIdsToErase:{}}}},{key:"handleDraggingScrollBar",value:function(zb,
xb){var Zb=this;if(!xb.scrollbars.isOverEither||this.state.multiElement)return!1;kj=!0;xb.lastCoords.x=zb.clientX;xb.lastCoords.y=zb.clientY;var qc=(0,Qa.$9)(function(Yc){Yc.target instanceof HTMLElement&&Zb.handlePointerMoveOverScrollbars(Yc,xb)}),Dc=(0,Qa.tH)(function(){kj=!1;(0,Qa.Uk)(Zb.interactiveCanvas,Zb.state);yk=null;Zb.setState({cursorButton:"up"});Zb.savePointer(zb.clientX,zb.clientY,"up");window.removeEventListener(bb.Ks.POINTER_MOVE,qc);window.removeEventListener(bb.Ks.POINTER_UP,Dc);
qc.flush()});return yk=Dc,window.addEventListener(bb.Ks.POINTER_MOVE,qc),window.addEventListener(bb.Ks.POINTER_UP,Dc),!0}},{key:"isASelectedElement",value:function(zb){return null!=zb&&this.state.selectedElementIds[zb.id]}},{key:"isHittingCommonBoundingBoxOfSelectedElements",value:function(zb,xb){if(2>xb.length)return!1;var Zb=10/this.state.zoom.value;xb=(0,Xc.KP)(xb);xb=(0,va.Z)(xb,4);var qc=xb[1],Dc=xb[2],Yc=xb[3];return zb.x>xb[0]-Zb&&zb.x<Dc+Zb&&zb.y>qc-Zb&&zb.y<Yc+Zb}},{key:"getCurrentItemRoundness",
value:function(zb){return"round"===this.state.currentItemRoundness?{type:(0,Ib.QI)(zb)?bb.a6.ADAPTIVE_RADIUS:bb.a6.PROPORTIONAL_RADIUS}:null}},{key:"onKeyDownFromPointerDownHandler",value:function(zb){var xb=this;return(0,Qa.tH)(function(Zb){xb.maybeHandleResize(zb,Zb)||xb.maybeDragNewGenericElement(zb,Zb)})}},{key:"onKeyUpFromPointerDownHandler",value:function(zb){var xb=this;return(0,Qa.tH)(function(Zb){Zb.key===Wa.tW.ALT&&Zb.preventDefault();xb.maybeHandleResize(zb,Zb)||xb.maybeDragNewGenericElement(zb,
Zb)})}},{key:"onPointerMoveFromPointerDownHandler",value:function(zb){var xb=this;return(0,Qa.$9)(function(Zb){var qc;if(null===zb.drag.offset&&(zb.drag.offset=(0,Qa.AK)((0,Xc.$V)(xb.scene.getSelectedElements(xb.state),zb.origin.x,zb.origin.y))),Zb.target instanceof HTMLElement&&!xb.handlePointerMoveOverScrollbars(Zb,zb)){var Dc=(0,Qa.dE)(Zb,xb.state);if((0,bd.EN)(xb.state))xb.handleEraser(Zb,zb,Dc);else{var Yc=(0,fc.wC)(Dc.x,Dc.y,Zb[Wa.tW.CTRL_OR_CMD]?null:xb.state.gridSize),ed=(0,va.Z)(Yc,2);Yc=
ed[0];ed=ed[1];if(zb.drag.hasOccurred||"arrow"!==xb.state.activeTool.type&&"line"!==xb.state.activeTool.type||!((0,fc.LW)(Dc.x,Dc.y,zb.origin.x,zb.origin.y)<bb.f)){if(zb.resize.isResizing&&(zb.lastCoords.x=Dc.x,zb.lastCoords.y=Dc.y,xb.maybeHandleResize(zb,Zb)))return!0;if(xb.state.selectedLinearElement){var nd=xb.state.editingLinearElement||xb.state.selectedLinearElement;if(sc._.shouldAddMidpoint(xb.state.selectedLinearElement,Dc,xb.state)){var Rd=sc._.addMidpoint(xb.state.selectedLinearElement,Dc,
xb.state,!Zb[Wa.tW.CTRL_OR_CMD]);return Rd?void(0,La.flushSync)(function(){xb.state.selectedLinearElement&&xb.setState({selectedLinearElement:ea(ea({},xb.state.selectedLinearElement),{},{pointerDownState:Rd.pointerDownState,selectedPointsIndices:Rd.selectedPointsIndices})});xb.state.editingLinearElement&&xb.setState({editingLinearElement:ea(ea({},xb.state.editingLinearElement),{},{pointerDownState:Rd.pointerDownState,selectedPointsIndices:Rd.selectedPointsIndices})})}):void 0}if(null!==nd.pointerDownState.segmentMidpoint.value&&
!nd.pointerDownState.segmentMidpoint.added)return;if(sc._.handlePointDragging(Zb,xb.state,Dc.x,Dc.y,function(hf,th){xb.maybeSuggestBindingsForLinearElementAtCoords(hf,th)},nd))return zb.lastCoords.x=Dc.x,zb.lastCoords.y=Dc.y,zb.drag.hasOccurred=!0,xb.state.editingLinearElement&&!xb.state.editingLinearElement.isDragging&&xb.setState({editingLinearElement:ea(ea({},xb.state.editingLinearElement),{},{isDragging:!0})}),void(xb.state.selectedLinearElement.isDragging||xb.setState({selectedLinearElement:ea(ea({},
xb.state.selectedLinearElement),{},{isDragging:!0})}))}nd=zb.hit.allHitElements.some(function(hf){return xb.isASelectedElement(hf)});var ce=xb.state.editingLinearElement&&Zb.shiftKey&&xb.state.editingLinearElement.elementId===(null===(qc=zb.hit.element)||void 0===qc?void 0:qc.id);if((nd||zb.hit.hasHitCommonBoundingBoxOfSelectedElements)&&!ce){var Yd;qc=xb.scene.getSelectedElements(xb.state);if(qc.every(function(hf){return hf.locked}))return;nd=qc.find(function(hf){return(0,Ib.He)(hf)});ce=xb.getTopLayerFrameAtSceneCoords(Dc);
if(xb.setState({frameToHighlight:ce&&!nd?ce:null}),zb.drag.hasOccurred=!0,xb.setState({selectedElementsAreBeingDragged:!0}),0<qc.length&&!zb.withCmdOrCtrl&&!xb.state.editingElement&&"active"!==(null===(Yd=xb.state.activeEmbeddable)||void 0===Yd?void 0:Yd.state)){Yc=(0,fc.wC)(Dc.x-zb.drag.offset.x,Dc.y-zb.drag.offset.y,Zb[Wa.tW.CTRL_OR_CMD]?null:xb.state.gridSize);ed=(0,va.Z)(Yc,2);Yc=ed[0];ed=ed[1];Yd=[Math.abs(Dc.x-zb.origin.x),Math.abs(Dc.y-zb.origin.y)];Dc=Yd[0];Yd=Yd[1];nd=Zb.shiftKey;if(!xb.state.editingFrame&&
(0,Xc.o8)(zb,qc,Yc,ed,nd,Dc,Yd,xb.state,xb.scene),xb.maybeSuggestBindingForAll(qc),Zb.altKey&&!zb.hit.hasBeenDuplicated){zb.hit.hasBeenDuplicated=!0;var Ne;Dc=[];qc=[];nd=new Map;Yd=new Map;ce=zb.hit.element;var ag=new Set(xb.scene.getSelectedElements({selectedElementIds:xb.state.selectedElementIds,includeBoundTextElement:!0,includeElementsInFrames:!0}).map(function(hf){return hf.id})),pg=aa(xb.scene.getElementsIncludingDeleted());try{for(pg.s();!(Ne=pg.n()).done;){var Gf=Ne.value;if(ag.has(Gf.id)||
Gf.id===(null==ce?void 0:ce.id)&&zb.hit.wasAddedToSelection){var Tf=(0,Xc.Sy)(xb.state.editingGroupId,nd,Gf),nf=(0,fc.wC)(zb.origin.x-zb.drag.offset.x,zb.origin.y-zb.drag.offset.y,Zb[Wa.tW.CTRL_OR_CMD]?null:xb.state.gridSize),Ze=(0,va.Z)(nf,2);(0,hb.DR)(Tf,{x:Tf.x+(Ze[0]-Yc),y:Tf.y+(Ze[1]-ed)});Dc.push(Tf);qc.push(Gf);Yd.set(Gf.id,Tf.id)}else Dc.push(Gf)}}catch(hf){pg.e(hf)}finally{pg.f()}Zb=[].concat(Dc,qc);(0,Ue.P7)(Dc,qc,Yd);(0,ab.ek)(Zb,qc,Yd,"duplicatesServeAsOld");(0,rf.xr)(Zb,qc,Yd);xb.scene.replaceAllElements(Zb)}return}}if(Ne=
xb.state.draggingElement)if("freedraw"===Ne.type?(Gf=Ne.points,Tf=Dc.x-Ne.x,nf=Dc.y-Ne.y,Ze=0<Gf.length&&Gf[Gf.length-1],Ze&&Ze[0]===Tf&&Ze[1]===nf||(Ze=Ne.simulatePressure?Ne.pressures:[].concat((0,ta.Z)(Ne.pressures),[Zb.pressure]),(0,hb.DR)(Ne,{points:[].concat((0,ta.Z)(Gf),[[Tf,nf]]),pressures:Ze}))):(0,Ib.bt)(Ne)?(zb.drag.hasOccurred=!0,xb.setState({selectedElementsAreBeingDragged:!0}),Gf=Ne.points,Tf=Yc-Ne.x,nf=ed-Ne.y,(0,Wa.Ge)(Zb)&&2===Gf.length&&(nf=(0,Xc.o4)(Ne.x,Ne.y,Dc.x,Dc.y),Tf=nf.width,
nf=nf.height),1===Gf.length?(0,hb.DR)(Ne,{points:[].concat((0,ta.Z)(Gf),[[Tf,nf]])}):2===Gf.length&&(0,hb.DR)(Ne,{points:[].concat((0,ta.Z)(Gf.slice(0,-1)),[[Tf,nf]])}),(0,Ib.Mn)(Ne,!1)&&xb.maybeSuggestBindingsForLinearElementAtCoords(Ne,[Dc],xb.state.startBoundElement)):(zb.lastCoords.x=Dc.x,zb.lastCoords.y=Dc.y,xb.maybeDragNewGenericElement(zb,Zb)),"selection"===xb.state.activeTool.type)if(zb.boxSelection.hasOccurred=!0,Gf=xb.scene.getNonDeletedElements(),xb.state.editingLinearElement)sc._.handleBoxSelection(Zb,
xb.state,xb.setState.bind(xb));else{var xg=!0;!Zb.shiftKey&&(0,Bc.N)(Gf,xb.state)&&(zb.withCmdOrCtrl&&zb.hit.element?xb.setState(function(hf){return(0,db.bO)(ea(ea({},hf),{},{selectedElementIds:(0,la.Z)({},zb.hit.element.id,!0)}),xb.scene.getNonDeletedElements(),hf,xb)}):xg=!1);var og=(0,Bc.Yp)(Gf,Ne);xb.setState(function(hf){var th=ea(ea({},xg&&hf.selectedElementIds),og.reduce(function(xh,Qh){return xh[Qh.id]=!0,xh},{}));return zb.hit.element&&(og.length?delete th[zb.hit.element.id]:th[zb.hit.element.id]=
!0),hf=xg?hf:ea(ea({},hf),{},{selectedGroupIds:{},editingGroupId:null}),ea(ea({},(0,db.bO)({editingGroupId:hf.editingGroupId,selectedElementIds:th},xb.scene.getNonDeletedElements(),hf,xb)),{},{selectedLinearElement:1===og.length&&(0,Ib.bt)(og[0])?new sc._(og[0],xb.scene):null,showHyperlinkPopup:!(1!==og.length||!og[0].link&&!(0,Ib.gs)(og[0]))&&"info"})})}}}}})}},{key:"handlePointerMoveOverScrollbars",value:function(zb,xb){return xb.scrollbars.isOverHorizontal?(zb=zb.clientX,this.translateCanvas({scrollX:this.state.scrollX-
(zb-xb.lastCoords.x)/this.state.zoom.value}),xb.lastCoords.x=zb,!0):xb.scrollbars.isOverVertical?(zb=zb.clientY,this.translateCanvas({scrollY:this.state.scrollY-(zb-xb.lastCoords.y)/this.state.zoom.value}),xb.lastCoords.y=zb,!0):!1}},{key:"onPointerUpFromPointerDownHandler",value:function(zb){var xb=this;return(0,Qa.tH)(function(Zb){zb.eventListeners.onMove&&zb.eventListeners.onMove.flush();var qc,Dc,Yc=xb.state,ed=Yc.draggingElement,nd=Yc.resizingElement,Rd=Yc.multiElement,ce=Yc.activeTool,Yd=Yc.isResizing;
Yc=Yc.isRotating;if(xb.setState({isResizing:!1,isRotating:!1,resizingElement:null,selectionElement:null,frameToHighlight:null,elementsToHighlight:null,cursorButton:"up",editingElement:Rd||(0,Xc.iB)(xb.state.editingElement)?xb.state.editingElement:null}),xb.savePointer(Zb.clientX,Zb.clientY,"up"),xb.setState({selectedElementsAreBeingDragged:!1}),xb.state.editingLinearElement)zb.boxSelection.hasOccurred||(null===(qc=zb.hit)||void 0===qc||null===(Dc=qc.element)||void 0===Dc?void 0:Dc.id)===xb.state.editingLinearElement.elementId?
(qc=sc._.handlePointerUp(Zb,xb.state.editingLinearElement,xb.state),qc!==xb.state.editingLinearElement&&xb.setState({editingLinearElement:qc,suggestedBindings:[]})):xb.actionManager.executeAction(Ua.pL);else if(xb.state.selectedLinearElement){var Ne,ag;(null===(Ne=zb.hit)||void 0===Ne||null===(ag=Ne.element)||void 0===ag?void 0:ag.id)!==xb.state.selectedLinearElement.elementId?1<xb.scene.getSelectedElements(xb.state).length&&xb.setState({selectedLinearElement:null}):(qc=sc._.handlePointerUp(Zb,xb.state.selectedLinearElement,
xb.state),Dc=qc.startBindingElement,Ne=qc.endBindingElement,ag=xb.scene.getElement(qc.elementId),(0,Ib.Mn)(ag)&&(0,ab.HG)(ag,Dc,Ne),qc!==xb.state.selectedLinearElement&&xb.setState({selectedLinearElement:ea(ea({},qc),{},{selectedPointsIndices:null}),suggestedBindings:[]}))}if(yk=null,window.removeEventListener(bb.Ks.POINTER_MOVE,zb.eventListeners.onMove),window.removeEventListener(bb.Ks.POINTER_UP,zb.eventListeners.onUp),window.removeEventListener(bb.Ks.KEYDOWN,zb.eventListeners.onKeyDown),window.removeEventListener(bb.Ks.KEYUP,
zb.eventListeners.onKeyUp),xb.state.pendingImageElementId&&xb.setState({pendingImageElementId:null}),"freedraw"===(null==ed?void 0:ed.type)){Yd=(0,Qa.dE)(Zb,xb.state);ce=ed.points;var pg=Yd.x-ed.x;Yd=Yd.y-ed.y;pg===ce[0][0]&&Yd===ce[0][1]&&(Yd+=1E-4,pg+=1E-4);Zb=ed.simulatePressure?[]:[].concat((0,ta.Z)(ed.pressures),[Zb.pressure]);return(0,hb.DR)(ed,{points:[].concat((0,ta.Z)(ce),[[pg,Yd]]),pressures:Zb,lastCommittedPoint:[pg,Yd]}),void xb.actionManager.executeAction(Ua.pL)}if((0,Ib.pC)(ed))try{xb.initializeImageDimensions(ed),
xb.setState({selectedElementIds:(0,sg.Oh)((0,la.Z)({},ed.id,!0),xb.state)},function(){xb.actionManager.executeAction(Ua.pL)})}catch(hf){console.error(hf),xb.scene.replaceAllElements(xb.scene.getElementsIncludingDeleted().filter(function(th){return th.id!==ed.id})),xb.actionManager.executeAction(Ua.pL)}else if((0,Ib.bt)(ed))1<ed.points.length&&xb.history.resumeRecording(),Zb=(0,Qa.dE)(Zb,xb.state),zb.drag.hasOccurred||!ed||Rd?zb.drag.hasOccurred&&!Rd&&((0,ab.N1)(xb.state)&&(0,Ib.Mn)(ed,!1)&&(0,ab.R)(ed,
xb.state,xb.scene,Zb),xb.setState({suggestedBindings:[],startBoundElement:null}),ce.locked?xb.setState(function(hf){return{draggingElement:null}}):((0,Qa.z8)(xb.interactiveCanvas),xb.setState(function(hf){return{draggingElement:null,activeTool:(0,Qa.Om)(xb.state,{type:"selection"}),selectedElementIds:(0,sg.Oh)(ea(ea({},hf.selectedElementIds),{},(0,la.Z)({},ed.id,!0)),hf),selectedLinearElement:new sc._(ed,xb.scene)}}))):((0,hb.DR)(ed,{points:[].concat((0,ta.Z)(ed.points),[[Zb.x-ed.x,Zb.y-ed.y]])}),
xb.setState({multiElement:ed,editingElement:xb.state.draggingElement}));else{if("selection"!==ce.type&&ed&&(0,Xc.QD)(ed))return xb.scene.replaceAllElements(xb.scene.getElementsIncludingDeleted().slice(0,-1)),void xb.setState({draggingElement:null});if(ed){if(zb.drag.hasOccurred)if(Rd=(0,Qa.dE)(Zb,xb.state),xb.state.selectedLinearElement&&xb.state.selectedLinearElement.isDragging)Rd=xb.scene.getElement(xb.state.selectedLinearElement.elementId),null!=Rd&&Rd.frameId&&(qc=(0,rf.$Z)(Rd))&&Rd&&((0,rf.cO)(Rd,
qc)||((0,hb.DR)(Rd,{groupIds:[]}),xb.scene.replaceAllElements((0,rf.lz)(xb.scene.getElementsIncludingDeleted(),[Rd],xb.state))));else{var Gf=xb.getTopLayerFrameAtSceneCoords(Rd);qc=xb.scene.getSelectedElements(xb.state);var Tf=xb.scene.getElementsIncludingDeleted();Rd=function(hf){if(0<hf.length){var th;hf=aa(hf);try{for(hf.s();!(th=hf.n()).done;){var xh=th.value,Qh=xh.groupIds.indexOf(xb.state.editingGroupId);(0,hb.DR)(xh,{groupIds:xh.groupIds.slice(0,Qh)},!1)}}catch(Hg){hf.e(Hg)}finally{hf.f()}Tf.forEach(function(Hg){Hg.groupIds.length&&
2>(0,db.Fb)(Tf,Hg.groupIds[Hg.groupIds.length-1]).length&&(0,hb.DR)(Hg,{groupIds:[]},!1)});xb.setState({editingGroupId:null})}};Gf&&!xb.state.selectedElementIds[Gf.id]?(qc=qc.filter(function(hf){return hf.frameId!==Gf.id&&(0,rf.Qs)(hf,Tf,xb.state)}),xb.state.editingGroupId&&Rd(qc),Tf=(0,rf.A_)(Tf,qc,Gf)):!Gf&&xb.state.editingGroupId&&(qc=qc.filter(function(hf){return hf.frameId&&!(0,rf.Qs)(hf,Tf,xb.state)}),Rd(qc));Tf=(0,rf.Tq)(Tf,xb.state,xb);xb.scene.replaceAllElements(Tf)}"frame"===ed.type&&(Rd=
(0,rf.fj)(xb.scene.getElementsIncludingDeleted(),ed),xb.scene.replaceAllElements((0,rf.A_)(xb.scene.getElementsIncludingDeleted(),Rd,ed)));(0,hb.DR)(ed,(0,Xc.Qp)(ed))}if(nd&&xb.history.resumeRecording(),nd&&(0,Xc.QD)(nd)&&xb.scene.replaceAllElements(xb.scene.getElementsIncludingDeleted().filter(function(hf){return hf.id!==nd.id})),zb.resize.isResizing){var nf;Rd=(0,rf.Tq)(xb.scene.getElementsIncludingDeleted(),xb.state,xb);qc=xb.scene.getSelectedElements(xb.state).filter(function(hf){return"frame"===
hf.type});qc=aa(qc);try{for(qc.s();!(nf=qc.n()).done;){var Ze=nf.value;Rd=(0,rf.pr)(Rd,(0,rf.ni)(xb.scene.getElementsIncludingDeleted(),Ze,xb.state),Ze,xb.state)}}catch(hf){qc.e(hf)}finally{qc.f()}xb.scene.replaceAllElements(Rd)}var xg=zb.hit.element;(null===(pg=xb.state.selectedLinearElement)||void 0===pg?void 0:pg.elementId)!==(null==xg?void 0:xg.id)&&(0,Ib.bt)(xg)&&1===xb.scene.getSelectedElements(xb.state).length&&xb.setState({selectedLinearElement:new sc._(xg,xb.scene)});if((0,bd.EN)(xb.state))0===
(0,fc.LW)(xb.lastPointerDown.clientX,xb.lastPointerDown.clientY,xb.lastPointerUp.clientX,xb.lastPointerUp.clientY)&&(Zb=(0,Qa.dE)({clientX:xb.lastPointerUp.clientX,clientY:xb.lastPointerUp.clientY},xb.state),xb.getElementsAtPosition(Zb.x,Zb.y).forEach(function(hf){return zb.elementIdsToErase[hf.id]={erase:!0,opacity:hf.opacity}})),xb.eraseElements(zb);else{var og;(Object.keys(zb.elementIdsToErase).length&&xb.restoreReadyToEraseElements(zb),!xg||zb.drag.hasOccurred||zb.hit.wasAddedToSelection||xb.state.editingLinearElement&&
zb.boxSelection.hasOccurred)||(Zb.shiftKey&&!xb.state.editingLinearElement?xb.state.selectedElementIds[xg.id]?(0,db.zq)(xb.state,xg)?xb.setState(function(hf){var th,xh=ea({},hf.selectedElementIds),Qh=aa(xg.groupIds.flatMap(function(Hg){return(0,db.Fb)(xb.scene.getNonDeletedElements(),Hg)}));try{for(Qh.s();!(th=Qh.n()).done;)delete xh[th.value.id]}catch(Hg){Qh.e(Hg)}finally{Qh.f()}return{selectedGroupIds:ea(ea({},hf.selectedElementIds),xg.groupIds.map(function(Hg){return(0,la.Z)({},Hg,!1)}).reduce(function(Hg,
tg){return ea(ea({},Hg),tg)},{})),selectedElementIds:(0,sg.Oh)(xh,hf)}}):null!==(og=xb.state.selectedLinearElement)&&void 0!==og&&og.isDragging||xb.setState(function(hf){var th=ea({},hf.selectedElementIds);delete th[xg.id];var xh=(0,Bc.eD)(xb.scene.getNonDeletedElements(),{selectedElementIds:th});return ea(ea({},(0,db.bO)({editingGroupId:hf.editingGroupId,selectedElementIds:th},xb.scene.getNonDeletedElements(),hf,xb)),{},{selectedLinearElement:1===xh.length&&(0,Ib.bt)(xh[0])?new sc._(xh[0],xb.scene):
hf.selectedLinearElement})}):xg.frameId&&xb.state.selectedElementIds[xg.frameId]?xb.setState(function(hf){var th,xh,Qh=ea(ea({},hf.selectedElementIds),{},(0,la.Z)({},xg.id,!0));return delete Qh[xg.frameId],(null!==(th=null===(xh=xb.scene.getElement(xg.frameId))||void 0===xh?void 0:xh.groupIds)&&void 0!==th?th:[]).flatMap(function(Hg){return(0,db.Fb)(xb.scene.getNonDeletedElements(),Hg)}).forEach(function(Hg){delete Qh[Hg.id]}),ea(ea({},(0,db.bO)({editingGroupId:hf.editingGroupId,selectedElementIds:Qh},
xb.scene.getNonDeletedElements(),hf,xb)),{},{showHyperlinkPopup:!(!xg.link&&!(0,Ib.gs)(xg))&&"info"})}):xb.setState(function(hf){return{selectedElementIds:(0,sg.Oh)(ea(ea({},hf.selectedElementIds),{},(0,la.Z)({},xg.id,!0)),hf)}}):xb.setState(function(hf){var th;return ea(ea({},(0,db.bO)({editingGroupId:hf.editingGroupId,selectedElementIds:(0,la.Z)({},xg.id,!0)},xb.scene.getNonDeletedElements(),hf,xb)),{},{selectedLinearElement:(0,Ib.bt)(xg)&&(null===(th=hf.selectedLinearElement)||void 0===th?void 0:
th.elementId)!==xg.id?new sc._(xg,xb.scene):hf.selectedLinearElement})}));zb.drag.hasOccurred||xb.state.isResizing||!(xg&&(0,Xc.wB)(xg,xb.state,xb.frameNameBoundsCache,zb.origin.x,zb.origin.y)||!xg&&zb.hit.hasHitCommonBoundingBoxOfSelectedElements)?(!ce.locked&&"freedraw"!==ce.type&&ed&&"selection"!==ed.type&&xb.setState(function(hf){return{selectedElementIds:(0,sg.Oh)(ea(ea({},hf.selectedElementIds),{},(0,la.Z)({},ed.id,!0)),hf),showHyperlinkPopup:(0,Ib.gs)(ed)&&!ed.link?"editor":hf.showHyperlinkPopup}}),
("selection"!==ce.type||(0,Bc.N)(xb.scene.getNonDeletedElements(),xb.state))&&xb.history.resumeRecording(),(zb.drag.hasOccurred||Yd||Yc)&&((0,ab.N1)(xb.state)?ab.el:ab.H)(xb.scene.getSelectedElements(xb.state)),ce.locked||"freedraw"===ce.type?xb.setState({draggingElement:null,suggestedBindings:[]}):((0,Qa.z8)(xb.interactiveCanvas),xb.setState({draggingElement:null,suggestedBindings:[],activeTool:(0,Qa.Om)(xb.state,{type:"selection"})})),xg&&xb.lastPointerUp&&xb.lastPointerDown&&300>xb.lastPointerUp.timeStamp-
xb.lastPointerDown.timeStamp&&1>=dj.size&&(0,Ib.gs)(xg)&&xb.isEmbeddableCenter(xg,xb.lastPointerUp,zb.origin.x,zb.origin.y)&&xb.handleEmbeddableCenterClick(xg)):xb.state.editingLinearElement?xb.setState({editingLinearElement:null}):xb.setState({selectedElementIds:(0,sg.Oh)({},xb.state),selectedGroupIds:{},editingGroupId:null,activeEmbeddable:null})}}})}},{key:"maybeSuggestBindingForAll",value:function(zb){50<zb.length||(zb=(0,ab.ZB)(zb),this.setState({suggestedBindings:zb}))}},{key:"clearSelection",
value:function(zb){this.setState(function(xb){return{selectedElementIds:(0,sg.Oh)({},xb),activeEmbeddable:null,selectedGroupIds:{},editingGroupId:xb.editingGroupId&&null!=zb&&(0,db.Nd)(zb,xb.editingGroupId)?xb.editingGroupId:null}});this.setState({selectedElementIds:(0,sg.Oh)({},this.state),activeEmbeddable:null,previousSelectedElementIds:this.state.selectedElementIds})}},{key:"getTextWysiwygSnappedToCenterPosition",value:function(zb,xb,Zb,qc){if(qc){var Dc=qc.x+qc.width/2,Yc=qc.y+qc.height/2;qc=
(0,Ue.TP)(qc,Zb);if(qc&&(Dc=qc.x,Yc=qc.y),Math.hypot(zb-Dc,xb-Yc)<bb.wZ)return zb=(0,Qa._i)({sceneX:Dc,sceneY:Yc},Zb),{viewportX:zb.x,viewportY:zb.y,elementCenterX:Dc,elementCenterY:Yc}}}},{key:"getCanvasOffsets",value:function(){var zb;return null!==(zb=this.excalidrawContainerRef)&&void 0!==zb&&zb.current?(zb=this.excalidrawContainerRef.current.getBoundingClientRect(),{offsetLeft:zb.left,offsetTop:zb.top}):{offsetLeft:0,offsetTop:0}}},{key:"updateLanguage",value:(Xb=(0,xa.Z)(ua().mark(function xb(){var Zb,
qc=this;return ua().wrap(function(Dc){for(;;)switch(Dc.prev=Dc.next){case 0:return Zb=yb.Mj.find(function(Yc){return Yc.code===qc.props.langCode})||yb.Fp,Dc.next=3,(0,yb.m0)(Zb);case 3:this.setAppState({});case 4:case "end":return Dc.stop()}},xb,this)})),function(){return Xb.apply(this,arguments)})}],[{key:"resetTapTwice",value:function(){Ci=!1}}]),$b}(oa().Component);Hm.defaultProps={UIOptions:bb.cW};var co=function(){var Ea=this;this.interactiveCanvas=null;this.unmounted=!1;this.device=Ei;this.excalidrawContainerRef=
oa().createRef();this.files={};this.imageCache=new Map;this.iFrameRefs=new Map;this.lastPointerUp=this.lastPointerDown=null;this.lastViewportPosition={x:0,y:0};this.updateEmbeddables=function(){var $b=new Map,Xb=!1;Ea.scene.getNonDeletedElements().filter(function(sb){if((0,Ib.gs)(sb)&&($b.set(sb.id,!0),null==sb.validated)){Xb=!0;var cc=(0,Rc.xm)(sb.link,Ea.props.validateEmbeddable);(0,hb.DR)(sb,{validated:cc},!1);$i.R.delete(sb)}return!1});Xb&&Ea.scene.informMutation();Ea.iFrameRefs.forEach(function(sb,
cc){$b.has(cc)||Ea.iFrameRefs.delete(cc)})};this.getFrameNameDOMId=function($b){return"".concat(Ea.id,"-frame-name-").concat($b.id)};this.frameNameBoundsCache={get:function($b){var Xb=Ea.frameNameBoundsCache._cache.get($b.id);if(!Xb||Xb.zoom!==Ea.state.zoom.value||Xb.versionNonce!==$b.versionNonce){var sb=document.getElementById(Ea.getFrameNameDOMId($b));if(sb){var cc=sb.getBoundingClientRect();sb=(0,Qa.dE)({clientX:cc.x,clientY:cc.y},Ea.state);cc=(0,Qa.dE)({clientX:cc.right,clientY:cc.bottom},Ea.state);
return Xb={x:sb.x,y:sb.y,width:cc.x-sb.x,height:cc.y-sb.y,angle:0,zoom:Ea.state.zoom.value,versionNonce:$b.versionNonce},Ea.frameNameBoundsCache._cache.set($b.id,Xb),Xb}return null}return Xb},_cache:new Map};this.renderFrameNames=function(){if(!Ea.state.frameRendering.enabled||!Ea.state.frameRendering.name)return null;var $b="dark"===Ea.state.theme;return Ea.scene.getNonDeletedFrames().map(function(Xb,sb){if(!(0,Nb.PZ)(Xb,Ea.canvas.width/window.devicePixelRatio,Ea.canvas.height/window.devicePixelRatio,
{offsetLeft:Ea.state.offsetLeft,offsetTop:Ea.state.offsetTop,scrollX:Ea.state.scrollX,scrollY:Ea.state.scrollY,zoom:Ea.state.zoom}))return null;var cc=(0,Qa._i)({sceneX:Xb.x,sceneY:Xb.y},Ea.state),Qb=cc.x;cc=cc.y;var zb=(0,Qa._i)({sceneX:Xb.x+Xb.width,sceneY:Xb.y+Xb.height},Ea.state).x,xb=function(){var Zb;""===(null===(Zb=Xb.name)||void 0===Zb?void 0:Zb.trim())&&(0,hb.DR)(Xb,{name:null});Ea.setState({editingFrame:null})};Xb.id===Ea.state.editingFrame?(sb=null==Xb.name?"Frame ".concat(sb+1):Xb.name,
sb=(0,Pa.jsx)("input",{autoFocus:!0,value:sb,onChange:function(Zb){(0,hb.DR)(Xb,{name:Zb.target.value})},onBlur:function(){return xb()},onKeyDown:function(Zb){Zb.key!==Wa.tW.ESCAPE&&Zb.key!==Wa.tW.ENTER||xb()},style:{background:Ea.state.viewBackgroundColor,filter:$b?bb.ZF:"none",zIndex:2,border:"none",display:"block",padding:"".concat(6,"px"),borderRadius:4,boxShadow:"inset 0 0 0 1px var(--color-primary)",fontFamily:"Assistant",fontSize:"14px",transform:"translateY(-".concat(6,"px)"),color:"var(--color-gray-80)",
overflow:"hidden",maxWidth:"".concat(Math.min(zb-Qb-6,document.body.clientWidth-Qb-6),"px")},size:sb.length+1||1,dir:"auto",autoComplete:"off",autoCapitalize:"off",autoCorrect:"off"})):sb=null==Xb.name||""===Xb.name.trim()?"Frame ".concat(sb+1):Xb.name.trim();return(0,Pa.jsx)("div",{id:Ea.getFrameNameDOMId(Xb),style:{position:"absolute",top:"".concat(cc-20-Ea.state.offsetTop,"px"),left:"".concat(Qb-Ea.state.offsetLeft-(Ea.state.editingFrame===Xb.id?6:0),"px"),zIndex:2,fontSize:"14px",color:$b?"var(--color-gray-60)":
"var(--color-gray-50)",width:"max-content",maxWidth:"".concat(zb-Qb+12,"px"),overflow:Xb.id===Ea.state.editingFrame?"visible":"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",cursor:bb.oc.MOVE,pointerEvents:Ea.state.viewModeEnabled?bb.XI.disabled:bb.XI.inheritFromUI},onPointerDown:function(Zb){return Ea.handleCanvasPointerDown(Zb)},onWheel:function(Zb){return Ea.handleWheel(Zb)},onContextMenu:Ea.handleCanvasContextMenu,onDoubleClick:function(){Ea.setState({editingFrame:Xb.id})},children:sb},Xb.id)})};
this.focusContainer=function(){var $b;null===($b=Ea.excalidrawContainerRef.current)||void 0===$b||$b.focus()};this.getSceneElementsIncludingDeleted=function(){return Ea.scene.getElementsIncludingDeleted()};this.getSceneElements=function(){return Ea.scene.getNonDeletedElements()};this.onInsertElements=function($b){Ea.addElementsFromPasteOrLibrary({elements:$b,position:"center",files:null})};this.onExportImage=function(){var $b=(0,xa.Z)(ua().mark(function Qb(sb,cc){var zb;return ua().wrap(function(xb){for(;;)switch(xb.prev=
xb.next){case 0:return(0,xc.L)("export",sb,"ui"),xb.next=3,(0,Nc.p1)(sb,cc,Ea.state,Ea.files,{exportBackground:Ea.state.exportBackground,name:Ea.state.name,viewBackgroundColor:Ea.state.viewBackgroundColor}).catch(Qa.FG).catch(function(Zb){console.error(Zb);Ea.setState({errorMessage:Zb.message})});case 3:zb=xb.sent,Ea.state.exportEmbedScene&&zb&&(0,Ab.g8)(zb)&&Ea.setState({fileHandle:zb});case 5:case "end":return xb.stop()}},Qb)}));return function(sb,cc){return $b.apply(this,arguments)}}();this.openEyeDropper=
function($b){var Xb=$b.type;Fj.e_.set(mi.$,{swapPreviewOnAlt:!0,colorPickerType:"stroke"===Xb?"elementStroke":"elementBackground",onSelect:function(sb,cc){var Qb="background"===Xb&&cc.altKey||"stroke"===Xb&&!cc.altKey;Ea.scene.getSelectedElements(Ea.state).length&&"selection"===Ea.state.activeTool.type?Ea.updateScene({elements:Ea.scene.getElementsIncludingDeleted().map(function(zb){return Ea.state.selectedElementIds[zb.id]?(0,hb.BE)(zb,(0,la.Z)({},Qb?"strokeColor":"backgroundColor",sb)):zb})}):Qb?
Ea.syncActionResult({appState:ea(ea({},Ea.state),{},{currentItemStrokeColor:sb}),commitToHistory:!0}):Ea.syncActionResult({appState:ea(ea({},Ea.state),{},{currentItemBackgroundColor:sb}),commitToHistory:!0})},keepOpenOnAlt:!1})};this.syncActionResult=(0,Qa.tH)(function($b){if(!Ea.unmounted&&!1!==$b){var Xb=null;if($b.elements&&($b.elements.forEach(function(pg){var Gf;(null===(Gf=Ea.state.editingElement)||void 0===Gf?void 0:Gf.id)===pg.id&&Ea.state.editingElement!==pg&&(0,Xc.qP)(pg)&&(Xb=pg)}),Ea.scene.replaceAllElements($b.elements),
$b.commitToHistory&&Ea.history.resumeRecording()),$b.files&&(Ea.files=$b.replaceFiles?$b.files:ea(ea({},Ea.files),$b.files),Ea.addNewImagesToImageCache()),$b.appState||Xb||Ea.state.contextMenu){var sb,cc,Qb,zb,xb,Zb,qc,Dc,Yc,ed;$b.commitToHistory&&Ea.history.resumeRecording();var nd=(null==$b||null===(sb=$b.appState)||void 0===sb?void 0:sb.viewModeEnabled)||!1,Rd=(null==$b||null===(cc=$b.appState)||void 0===cc?void 0:cc.zenModeEnabled)||!1,ce=(null==$b||null===(Qb=$b.appState)||void 0===Qb?void 0:
Qb.gridSize)||null,Yd=(null==$b||null===(zb=$b.appState)||void 0===zb?void 0:zb.theme)||Ea.props.theme||bb.C6.LIGHT,Ne=null!==(xb=null==$b||null===(Zb=$b.appState)||void 0===Zb?void 0:Zb.name)&&void 0!==xb?xb:Ea.state.name,ag=null!==(qc=null==$b||null===(Dc=$b.appState)||void 0===Dc?void 0:Dc.errorMessage)&&void 0!==qc?qc:Ea.state.errorMessage;void 0!==Ea.props.viewModeEnabled&&(nd=Ea.props.viewModeEnabled);void 0!==Ea.props.zenModeEnabled&&(Rd=Ea.props.zenModeEnabled);void 0!==Ea.props.gridModeEnabled&&
(ce=Ea.props.gridModeEnabled?bb.k:null);void 0!==Ea.props.name&&(Ne=Ea.props.name);null!==(ed=Xb=Xb||(null===(Yc=$b.appState)||void 0===Yc?void 0:Yc.editingElement)||null)&&void 0!==ed&&ed.isDeleted&&(Xb=null);Ea.setState(function(pg){return Object.assign($b.appState||{},{contextMenu:null,editingElement:Xb,viewModeEnabled:nd,zenModeEnabled:Rd,gridSize:ce,theme:Yd,name:Ne,errorMessage:ag})},function(){$b.syncHistory&&Ea.history.setCurrentState(Ea.state,Ea.scene.getElementsIncludingDeleted())})}}});
this.onBlur=(0,Qa.tH)(function(){rj=!1;Ea.setState({isBindingEnabled:!0})});this.onUnload=function(){Ea.onBlur()};this.disableEvent=function($b){$b.preventDefault()};this.resetHistory=function(){Ea.history.clear()};this.resetScene=(0,Qa.tH)(function($b){Ea.scene.replaceAllElements([]);Ea.setState(function(Xb){return ea(ea({},(0,bd.im)()),{},{isLoading:(null==$b||!$b.resetLoadingState)&&Xb.isLoading,theme:Ea.state.theme})});Ea.resetHistory()});this.initializeScene=(0,xa.Z)(ua().mark(function Xb(){var sb,
cc,Qb,zb,xb;return ua().wrap(function(Zb){for(;;)switch(Zb.prev=Zb.next){case 0:return"launchQueue"in window&&"LaunchParams"in window&&window.launchQueue.setConsumer(function(){var qc=(0,xa.Z)(ua().mark(function ed(Yc){var nd,Rd;return ua().wrap(function(ce){for(;;)switch(ce.prev=ce.next){case 0:if(Yc.files.length){ce.next=2;break}return ce.abrupt("return");case 2:return nd=Yc.files[0],ce.next=5,nd.getFile();case 5:Rd=ce.sent,Ea.loadFileToCanvas(new File([Rd],Rd.name||"",{type:Rd.type}),nd);case 7:case "end":return ce.stop()}},
ed)}));return function(Yc){return qc.apply(this,arguments)}}()),Ea.props.theme&&Ea.setState({theme:Ea.props.theme}),Ea.state.isLoading||Ea.setState({isLoading:!0}),Qb=null,Zb.prev=4,Zb.next=7,Ea.props.initialData;case 7:if(Zb.t0=Zb.sent,Zb.t0){Zb.next=10;break}Zb.t0=null;case 10:Qb=Zb.t0;null!==(zb=Qb)&&void 0!==zb&&zb.libraryItems&&Ea.library.updateLibrary({libraryItems:Qb.libraryItems,merge:!0}).catch(function(qc){console.error(qc)});Zb.next=18;break;case 14:Zb.prev=14,Zb.t1=Zb.catch(4),console.error(Zb.t1),
Qb={appState:{errorMessage:Zb.t1.message||"Encountered an error during importing or restoring scene data"}};case 18:(xb=(0,Ad.nu)(Qb,null,null,{repairBindings:!0})).appState=ea(ea({},xb.appState),{},{theme:Ea.props.theme||xb.appState.theme,openSidebar:(null===(sb=xb.appState)||void 0===sb?void 0:sb.openSidebar)||Ea.state.openSidebar,activeTool:"image"===xb.appState.activeTool.type?ea(ea({},xb.appState.activeTool),{},{type:"selection"}):xb.appState.activeTool,isLoading:!1,toast:Ea.state.toast}),null!==
(cc=Qb)&&void 0!==cc&&cc.scrollToContent&&(xb.appState=ea(ea({},xb.appState),(0,Bc.W)(xb.elements,ea(ea({},xb.appState),{},{width:Ea.state.width,height:Ea.state.height,offsetTop:Ea.state.offsetTop,offsetLeft:Ea.state.offsetLeft})))),Ea.fonts.loadFontsForElements(xb.elements),Ea.resetHistory(),Ea.syncActionResult(ea(ea({},xb),{},{commitToHistory:!0}));case 24:case "end":return Zb.stop()}},Xb,null,[[4,14]])}));this.refreshDeviceState=function(Xb){var sb=Xb.getBoundingClientRect();Xb=sb.width;sb=sb.height;
Ea.device=(0,Qa.v4)(Ea.device,{isLandscape:Xb>sb,isSmScreen:Xb<bb.eF,isMobile:Xb<bb.kV||sb<bb.Yx&&Xb<bb.sS,canDeviceFitSidebar:Xb>(null!=Ea.props.UIOptions.dockedSidebarBreakpoint?Ea.props.UIOptions.dockedSidebarBreakpoint:bb.sk)})};this.onResize=(0,Qa.tH)(function(){Ea.scene.getElementsIncludingDeleted().forEach(function(Xb){return $i.R.delete(Xb)});Ea.setState({})});this.renderInteractiveSceneCallback=function(Xb){var sb=Xb.atLeastOneVisibleElement,cc=Xb.scrollBars;Xb=Xb.elements;cc&&(Ji=cc);sb=
!(0,Xc.iB)(Ea.state.editingElement)&&!sb&&0<Xb.length;Ea.state.scrolledOutside!==sb&&Ea.setState({scrolledOutside:sb});Ea.scheduleImageRefresh()};this.onScroll=(0,Qa.Ds)(function(){var Xb=Ea.getCanvasOffsets(),sb=Xb.offsetTop,cc=Xb.offsetLeft;Ea.setState(function(Qb){return Qb.offsetLeft===cc&&Qb.offsetTop===sb?null:{offsetTop:sb,offsetLeft:cc}})},bb.HM);this.onCut=(0,Qa.tH)(function(Xb){var sb;(null===(sb=Ea.excalidrawContainerRef.current)||void 0===sb?0:sb.contains(document.activeElement))&&!(0,Qa.s)(Xb.target)&&
(Ea.cutAll(),Xb.preventDefault(),Xb.stopPropagation())});this.onCopy=(0,Qa.tH)(function(Xb){var sb;(null===(sb=Ea.excalidrawContainerRef.current)||void 0===sb?0:sb.contains(document.activeElement))&&!(0,Qa.s)(Xb.target)&&(Ea.copyAll(),Xb.preventDefault(),Xb.stopPropagation())});this.cutAll=function(){Ea.actionManager.executeAction(Ua.ZM,"keyboard")};this.copyAll=function(){Ea.actionManager.executeAction(Ua.uN,"keyboard")};this.onTouchStart=function(Xb){if(bb.Dt||Xb.preventDefault(),!Ci)return Ci=
!0,clearTimeout(Li),void(Li=window.setTimeout(Hm.resetTapTwice,bb.Gj));if(Ci&&1===Xb.touches.length){var sb=Xb.touches[0];Ea.handleCanvasDoubleClick({clientX:sb.clientX,clientY:sb.clientY});Ci=!1;clearTimeout(Li)}bb.Dt&&Xb.preventDefault();2===Xb.touches.length&&Ea.setState({selectedElementIds:(0,sg.Oh)({},Ea.state),activeEmbeddable:null})};this.onTouchEnd=function(Xb){Ea.resetContextMenuTimer();0<Xb.touches.length?Ea.setState({previousSelectedElementIds:{},selectedElementIds:(0,sg.Oh)(Ea.state.previousSelectedElementIds,
Ea.state)}):dj.clear()};this.pasteFromClipboard=(0,Qa.tH)(function(){var Xb=(0,xa.Z)(ua().mark(function Qb(cc){var zb,xb,Zb,qc,Dc,Yc,ed,nd,Rd,ce,Yd,Ne,ag,pg,Gf,Tf,nf;return ua().wrap(function(Ze){for(;;)switch(Ze.prev=Ze.next){case 0:if(Zb=!(!Cj||!cc),qc=document.activeElement,Dc=null===(zb=Ea.excalidrawContainerRef.current)||void 0===zb?void 0:zb.contains(qc),!cc||Dc){Ze.next=5;break}return Ze.abrupt("return");case 5:if(Yc=document.elementFromPoint(Ea.lastViewportPosition.x,Ea.lastViewportPosition.y),
!cc||Yc instanceof HTMLCanvasElement&&!(0,Qa.s)(qc)){Ze.next=8;break}return Ze.abrupt("return");case 8:return ed=null==cc||null===(xb=cc.clipboardData)||void 0===xb?void 0:xb.files[0],Ze.next=11,(0,dc.mQ)(cc,Zb);case 11:if(nd=Ze.sent,ed||!nd.text||Zb||(Rd=nd.text.trim()).startsWith("\x3csvg")&&Rd.endsWith("\x3c/svg\x3e")&&(ed=(0,Ab.Pn)(Rd)),ce=(0,Qa.dE)({clientX:Ea.lastViewportPosition.x,clientY:Ea.lastViewportPosition.y},Ea.state),Yd=ce.x,Ne=ce.y,!(0,Ab.Wr)(ed)||nd.spreadsheet){Ze.next=20;break}return ag=
Ea.createImageElement({sceneX:Yd,sceneY:Ne}),Ea.insertImageElement(ag,ed),Ea.initializeImageDimensions(ag),Ea.setState({selectedElementIds:(0,sg.Oh)((0,la.Z)({},ag.id,!0),Ea.state)}),Ze.abrupt("return");case 20:if(!Ea.props.onPaste){Ze.next=32;break}return Ze.prev=21,Ze.next=24,Ea.props.onPaste(nd,cc);case 24:if(Ze.t0=Ze.sent,!1!==Ze.t0){Ze.next=27;break}return Ze.abrupt("return");case 27:Ze.next=32;break;case 29:Ze.prev=29,Ze.t1=Ze.catch(21),console.error(Ze.t1);case 32:if(!nd.errorMessage){Ze.next=
36;break}Ea.setState({errorMessage:nd.errorMessage});Ze.next=52;break;case 36:if(!nd.spreadsheet||Zb){Ze.next=40;break}Ea.setState({pasteDialog:{data:nd.spreadsheet,shown:!0}});Ze.next=52;break;case 40:if(!nd.elements){Ze.next=45;break}pg=nd.programmaticAPI?(0,ug.w)(nd.elements):nd.elements;Ea.addElementsFromPasteOrLibrary({elements:pg,files:nd.files||null,position:"cursor",retainSeed:Zb});Ze.next=52;break;case 45:if(!nd.text){Ze.next=52;break}if(Tf=(0,Rc.eX)(nd.text),Zb||!(0,Rc.xm)(Tf,Ea.props.validateEmbeddable)||
!/^(http|https):\/\/[^\s/$.?#].[^\s]*$/.test(Tf)&&"video"!==(null===(Gf=(0,Rc.LM)(Tf))||void 0===Gf?void 0:Gf.type)){Ze.next=51;break}return(nf=Ea.insertEmbeddableElement({sceneX:Yd,sceneY:Ne,link:(0,ne.$u)(Tf)}))&&Ea.setState({selectedElementIds:(0,la.Z)({},nf.id,!0)}),Ze.abrupt("return");case 51:Ea.addTextFromPaste(nd.text,Zb);case 52:Ea.setActiveTool({type:"selection"}),null==cc||cc.preventDefault();case 54:case "end":return Ze.stop()}},Qb,null,[[21,29]])}));return function(cc){return Xb.apply(this,
arguments)}}());this.addElementsFromPasteOrLibrary=function(Xb){var sb=(0,Ad.ET)(Xb.elements,null,void 0),cc=(0,Xc.KP)(sb);cc=(0,va.Z)(cc,4);var Qb=cc[0],zb=cc[1],xb=cc[3];cc=(0,Qa.TE)(Qb,cc[2])/2;xb=(0,Qa.TE)(zb,xb)/2;var Zb="object"===(0,pa.Z)(Xb.position)?Xb.position.clientX:"cursor"===Xb.position?Ea.lastViewportPosition.x:Ea.state.width/2+Ea.state.offsetLeft,qc="object"===(0,pa.Z)(Xb.position)?Xb.position.clientY:"cursor"===Xb.position?Ea.lastViewportPosition.y:Ea.state.height/2+Ea.state.offsetTop;
Zb=(0,Qa.dE)({clientX:Zb,clientY:qc},Ea.state);cc=(0,fc.wC)(Zb.x-cc,Zb.y-xb,Ea.state.gridSize);cc=(0,va.Z)(cc,2);var Dc=cc[0],Yc=cc[1];sb=(0,Sc._N)(sb.map(function(ed){return(0,hb.BE)(ed,{x:ed.x+Dc-Qb,y:ed.y+Yc-zb})}),{randomizeSeed:!Xb.retainSeed});cc=[].concat((0,ta.Z)(Ea.scene.getElementsIncludingDeleted()),(0,ta.Z)(sb));Ea.scene.replaceAllElements(cc);sb.forEach(function(ed){if((0,Xc.iB)(ed)&&(0,Ib.Xh)(ed)){var nd=(0,Ue.tl)(ed);(0,Xc.oN)(ed,nd)}});Xb.files&&(Ea.files=ea(ea({},Ea.files),Xb.files));
Ea.history.resumeRecording();sb=(0,sg.aI)(sb);Ea.setState(ea(ea({},Ea.state),{},{openSidebar:Ea.state.openSidebar&&Ea.device.canDeviceFitSidebar&&Fj.e_.get(im.t6)?Ea.state.openSidebar:null},(0,db.bO)({editingGroupId:null,selectedElementIds:sb.reduce(function(ed,nd){return(0,Ib.Xh)(nd)||(ed[nd.id]=!0),ed},{})},Ea.scene.getNonDeletedElements(),Ea.state,Ea)),function(){Xb.files&&Ea.addNewImagesToImageCache()});Ea.setActiveTool({type:"selection"})};this.setAppState=function(Xb,sb){Ea.setState(Xb,sb)};
this.removePointer=function(Xb){Jk&&Ea.resetContextMenuTimer();dj.delete(Xb.pointerId)};this.toggleLock=function(){var Xb=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"ui";Ea.state.activeTool.locked||(0,xc.L)("toolbar","toggleLock","".concat(Xb," (").concat(Ea.device.isMobile?"mobile":"desktop",")"));Ea.setState(function(sb){return{activeTool:ea(ea(ea({},sb.activeTool),(0,Qa.Om)(Ea.state,sb.activeTool.locked?{type:"selection"}:sb.activeTool)),{},{locked:!sb.activeTool.locked})}})};this.updateFrameRendering=
function(Xb){Ea.setState(function(sb){var cc,Qb,zb,xb,Zb="function"==typeof Xb?Xb(sb.frameRendering):Xb;return{frameRendering:{enabled:null!==(cc=null==Zb?void 0:Zb.enabled)&&void 0!==cc?cc:sb.frameRendering.enabled,clip:null!==(Qb=null==Zb?void 0:Zb.clip)&&void 0!==Qb?Qb:sb.frameRendering.clip,name:null!==(zb=null==Zb?void 0:Zb.name)&&void 0!==zb?zb:sb.frameRendering.name,outline:null!==(xb=null==Zb?void 0:Zb.outline)&&void 0!==xb?xb:sb.frameRendering.outline}}})};this.togglePenMode=function(){Ea.setState(function(Xb){return{penMode:!Xb.penMode}})};
this.onHandToolToggle=function(){Ea.actionManager.executeAction(vg.eF)};this.zoomCanvas=function(Xb){Ea.setState(ea({},(0,ic.E)({viewportX:Ea.state.width/2+Ea.state.offsetLeft,viewportY:Ea.state.height/2+Ea.state.offsetTop,nextZoom:(0,Bc.j)(Xb)},Ea.state)))};this.cancelInProgresAnimation=null;this.scrollToContent=function(){var Xb,sb=0<arguments.length&&void 0!==arguments[0]?arguments[0]:Ea.scene.getNonDeletedElements(),cc=1<arguments.length?arguments[1]:void 0;null===(Xb=Ea.cancelInProgresAnimation)||
void 0===Xb||Xb.call(Ea);var Qb=Array.isArray(sb)?sb:[sb];Xb=Ea.state.zoom;sb=Ea.state.scrollX;var zb=Ea.state.scrollY;null!=cc&&cc.fitToContent||null!=cc&&cc.fitToViewport?(Qb=(0,vg.JB)({targetElements:Qb,appState:Ea.state,fitToViewport:!(null==cc||!cc.fitToViewport),viewportZoomFactor:null==cc?void 0:cc.viewportZoomFactor}).appState,Xb=Qb.zoom,sb=Qb.scrollX,zb=Qb.scrollY):(Qb=(0,Bc.W)(Qb,Ea.state),sb=Qb.scrollX,zb=Qb.scrollY);if(null!=cc&&cc.animate){var xb,Zb=(0,Qa.B4)({fromValues:{scrollX:Ea.state.scrollX,
scrollY:Ea.state.scrollY,zoom:Ea.state.zoom.value},toValues:{scrollX:sb,scrollY:zb,zoom:Xb.value},interpolateValue:function(qc,Dc,Yc,ed){if("zoom"===ed)return qc*Math.pow(Dc/qc,(0,Qa.Vv)(Yc))},onStep:function(qc){Ea.setState({scrollX:qc.scrollX,scrollY:qc.scrollY,zoom:{value:qc.zoom}})},onStart:function(){Ea.setState({shouldCacheIgnoreZoom:!0})},onEnd:function(){Ea.setState({shouldCacheIgnoreZoom:!1})},onCancel:function(){Ea.setState({shouldCacheIgnoreZoom:!1})},duration:null!==(xb=null==cc?void 0:
cc.duration)&&void 0!==xb?xb:500});Ea.cancelInProgresAnimation=function(){Zb();Ea.cancelInProgresAnimation=null}}else Ea.setState({scrollX:sb,scrollY:zb,zoom:Xb})};this.translateCanvas=function(Xb){var sb;null===(sb=Ea.cancelInProgresAnimation)||void 0===sb||sb.call(Ea);Ea.setState(Xb)};this.setToast=function(Xb){Ea.setState({toast:Xb})};this.restoreFileFromShare=(0,xa.Z)(ua().mark(function sb(){var cc,Qb,zb,xb;return ua().wrap(function(Zb){for(;;)switch(Zb.prev=Zb.next){case 0:return Zb.prev=0,Zb.next=
3,caches.open("web-share-target");case 3:return cc=Zb.sent,Zb.next=6,cc.match("shared-file");case 6:if(!(Qb=Zb.sent)){Zb.next=16;break}return Zb.next=10,Qb.blob();case 10:return zb=Zb.sent,xb=new File([zb],zb.name||"",{type:zb.type}),Ea.loadFileToCanvas(xb,null),Zb.next=15,cc.delete("shared-file");case 15:window.history.replaceState(null,bb.iC,window.location.pathname);case 16:Zb.next=21;break;case 18:Zb.prev=18,Zb.t0=Zb.catch(0),Ea.setState({errorMessage:Zb.t0.message});case 21:case "end":return Zb.stop()}},
sb,null,[[0,18]])}));this.addFiles=(0,Qa.tH)(function(sb){var cc=sb.reduce(function(Qb,zb){return Qb.set(zb.id,zb),Qb},new Map);Ea.files=ea(ea({},Ea.files),Object.fromEntries(cc));Ea.scene.getNonDeletedElements().forEach(function(Qb){(0,Ib.wi)(Qb)&&cc.has(Qb.fileId)&&(Ea.imageCache.delete(Qb.fileId),$i.R.delete(Qb))});Ea.scene.informMutation();Ea.addNewImagesToImageCache()});this.updateScene=(0,Qa.tH)(function(sb){sb.commitToHistory&&Ea.history.resumeRecording();sb.appState&&Ea.setState(sb.appState);
sb.elements&&Ea.scene.replaceAllElements(sb.elements);sb.collaborators&&Ea.setState({collaborators:sb.collaborators})});this.onSceneUpdated=function(){Ea.setState({})};this.toggleSidebar=function(sb){var cc,Qb,zb=sb.name,xb=sb.tab;sb=sb.force;void 0===sb?cc=(null===(Qb=Ea.state.openSidebar)||void 0===Qb?void 0:Qb.name)===zb?null:zb:cc=sb?zb:null;return Ea.setState({openSidebar:cc?{name:cc,tab:xb}:null}),!!cc};this.updateCurrentCursorPosition=(0,Qa.tH)(function(sb){Ea.lastViewportPosition.x=sb.clientX;
Ea.lastViewportPosition.y=sb.clientY});this.onKeyDown=(0,Qa.tH)(function(sb){if("Proxy"in window&&(!sb.shiftKey&&/^[A-Z]$/.test(sb.key)||sb.shiftKey&&/^[a-z]$/.test(sb.key))&&(sb=new Proxy(sb,{get:function(Yc,ed){var nd=Yc[ed];return"function"==typeof nd?nd.bind(Yc):"key"===ed?sb.shiftKey?Yc.key.toUpperCase():Yc.key.toLowerCase():nd}})),sb[Wa.tW.CTRL_OR_CMD]&&sb.key.toLowerCase()===Wa.tW.V&&(Cj=sb.shiftKey,clearTimeout(bm),bm=window.setTimeout(function(){Cj=!1},100)),!sb[Wa.tW.CTRL_OR_CMD]||!(0,Qa.s)(sb.target)||
sb.code!==Wa.aU.MINUS&&sb.code!==Wa.aU.EQUAL){if(!((0,Qa.s)(sb.target)&&sb.key!==Wa.tW.ESCAPE||(0,Wa.Wl)(sb.key)&&(0,Qa._Z)(sb.target)))if(sb.key!==Wa.tW.QUESTION_MARK){if(sb.key.toLowerCase()===Wa.tW.E&&sb.shiftKey&&sb[Wa.tW.CTRL_OR_CMD])return sb.preventDefault(),void Ea.setState({openDialog:"imageExport"});if(sb.key===Wa.tW.PAGE_UP||sb.key===Wa.tW.PAGE_DOWN){var cc=(sb.shiftKey?Ea.state.width:Ea.state.height)/Ea.state.zoom.value;sb.key===Wa.tW.PAGE_DOWN&&(cc=-cc);sb.shiftKey?Ea.translateCanvas(function(Yc){return{scrollX:Yc.scrollX+
cc}}):Ea.translateCanvas(function(Yc){return{scrollY:Yc.scrollY+cc}})}if(!Ea.actionManager.handleKeyDown(sb)&&!Ea.state.viewModeEnabled){if(sb[Wa.tW.CTRL_OR_CMD]&&Ea.state.isBindingEnabled&&Ea.setState({isBindingEnabled:!1}),(0,Wa.Wl)(sb.key)){var Qb=Ea.state.gridSize&&(sb.shiftKey?bb.$e:Ea.state.gridSize)||(sb.shiftKey?bb.Iw:bb.$e),zb=0,xb=0;sb.key===Wa.tW.ARROW_LEFT?zb=-Qb:sb.key===Wa.tW.ARROW_RIGHT?zb=Qb:sb.key===Wa.tW.ARROW_UP?xb=-Qb:sb.key===Wa.tW.ARROW_DOWN&&(xb=Qb);var Zb=Ea.scene.getSelectedElements({selectedElementIds:Ea.state.selectedElementIds,
includeBoundTextElement:!0,includeElementsInFrames:!0});Zb.forEach(function(Yc){(0,hb.DR)(Yc,{x:Yc.x+zb,y:Yc.y+xb});(0,ab.Ww)(Yc,{simultaneouslyUpdated:Zb})});Ea.maybeSuggestBindingForAll(Zb);sb.preventDefault()}else if(sb.key===Wa.tW.ENTER){var qc=Ea.scene.getSelectedElements(Ea.state);if(1===qc.length){var Dc=qc[0];if(sb[Wa.tW.CTRL_OR_CMD])(0,Ib.bt)(Dc)&&(Ea.state.editingLinearElement&&Ea.state.editingLinearElement.elementId===qc[0].id||(Ea.history.resumeRecording(),Ea.setState({editingLinearElement:new sc._(Dc,
Ea.scene)})));else{if((0,Xc.iB)(Dc)||(0,Ue.Zr)(Dc))return(0,Xc.iB)(Dc)||(Qb=Dc),qc=(0,Ue.TP)(Dc,Ea.state),Ea.startTextEditing({sceneX:qc.x,sceneY:qc.y,container:Qb}),void sb.preventDefault();(0,Ib.He)(Dc)&&Ea.setState({editingFrame:Dc.id})}}}else sb.ctrlKey||sb.altKey||sb.metaKey||null!==Ea.state.draggingElement||((Qb=function(Yc){var ed=Oc.find(function(nd,Rd){return null!=nd.numericKey&&Yc===nd.numericKey.toString()||nd.key&&("string"==typeof nd.key?nd.key===Yc:nd.key.includes(Yc))});return(null==
ed?void 0:ed.value)||null}(sb.key))?(Ea.state.activeTool.type!==Qb&&(0,xc.L)("toolbar",Qb,"keyboard (".concat(Ea.device.isMobile?"mobile":"desktop",")")),Ea.setActiveTool({type:Qb}),sb.stopPropagation()):sb.key===Wa.tW.Q&&(Ea.toggleLock("keyboard"),sb.stopPropagation()));if(sb.key===Wa.tW.SPACE&&0===dj.size&&(rj=!0,(0,Qa.KJ)(Ea.interactiveCanvas,bb.oc.GRAB),sb.preventDefault()),!(sb.key!==Wa.tW.G&&sb.key!==Wa.tW.S||sb.altKey||sb[Wa.tW.CTRL_OR_CMD])){Qb=Ea.scene.getSelectedElements(Ea.state);if("selection"===
Ea.state.activeTool.type&&!Qb.length)return;sb.key===Wa.tW.G&&((0,Bc.$b)(Ea.state.activeTool.type)||Qb.some(function(Yc){return(0,Bc.$b)(Yc.type)}))&&(Ea.setState({openPopup:"elementBackground"}),sb.stopPropagation());sb.key===Wa.tW.S&&(Ea.setState({openPopup:"elementStroke"}),sb.stopPropagation())}!sb[Wa.tW.CTRL_OR_CMD]||sb.key!==Wa.tW.BACKSPACE&&sb.key!==Wa.tW.DELETE||Fj.e_.set(Mk.w,"clearCanvas");qc=sb.key.toLocaleLowerCase();Qb=qc===Wa.tW.S&&sb.shiftKey;qc=sb.key===Wa.tW.I||qc===Wa.tW.G&&sb.shiftKey;
(Qb||qc)&&Ea.openEyeDropper({type:Qb?"stroke":"background"})}}else Ea.setState({openDialog:"help"})}else sb.preventDefault()});this.onWheel=(0,Qa.tH)(function(sb){sb.target instanceof HTMLCanvasElement||!sb.ctrlKey||sb.preventDefault()});this.onKeyUp=(0,Qa.tH)(function(sb){if(sb.key===Wa.tW.SPACE&&(Ea.state.viewModeEnabled?(0,Qa.KJ)(Ea.interactiveCanvas,bb.oc.GRAB):"selection"===Ea.state.activeTool.type?(0,Qa.z8)(Ea.interactiveCanvas):((0,Qa.Uk)(Ea.interactiveCanvas,Ea.state),Ea.setState({selectedElementIds:(0,sg.Oh)({},
Ea.state),selectedGroupIds:{},editingGroupId:null,activeEmbeddable:null})),rj=!1),sb[Wa.tW.CTRL_OR_CMD]||Ea.state.isBindingEnabled||Ea.setState({isBindingEnabled:!0}),(0,Wa.Wl)(sb.key))sb=Ea.scene.getSelectedElements(Ea.state),(0,ab.N1)(Ea.state)?(0,ab.el)(sb):(0,ab.H)(sb),Ea.setState({suggestedBindings:[]})});this.setActiveTool=function(sb){sb=(0,Qa.Om)(Ea.state,sb);"hand"===sb.type?(0,Qa.KJ)(Ea.interactiveCanvas,bb.oc.GRAB):rj||(0,Qa.Uk)(Ea.interactiveCanvas,Ea.state);(0,Qa.wO)(document.activeElement)&&
Ea.focusContainer();(0,Ib.dt)(sb.type)||Ea.setState({suggestedBindings:[]});"image"===sb.type&&Ea.onImageAction();"selection"!==sb.type?Ea.setState({activeTool:sb,selectedElementIds:(0,sg.Oh)({},Ea.state),selectedGroupIds:{},editingGroupId:null,activeEmbeddable:null}):Ea.setState({activeTool:sb,activeEmbeddable:null})};this.setCursor=function(sb){(0,Qa.KJ)(Ea.interactiveCanvas,sb)};this.resetCursor=function(){(0,Qa.z8)(Ea.interactiveCanvas)};this.isTouchScreenMultiTouchGesture=function(){return 2<=
dj.size};this.onGestureStart=(0,Qa.tH)(function(sb){sb.preventDefault();Ea.isTouchScreenMultiTouchGesture()&&Ea.setState({selectedElementIds:(0,sg.Oh)({},Ea.state),activeEmbeddable:null});nm=Ea.state.zoom.value});this.onGestureChange=(0,Qa.tH)(function(sb){if(sb.preventDefault(),!Ea.isTouchScreenMultiTouchGesture()){var cc=nm;cc&&Ea.setState(function(Qb){return ea({},(0,ic.E)({viewportX:Ea.lastViewportPosition.x,viewportY:Ea.lastViewportPosition.y,nextZoom:(0,Bc.j)(cc*sb.scale)},Qb))})}});this.onGestureEnd=
(0,Qa.tH)(function(sb){sb.preventDefault();Ea.isTouchScreenMultiTouchGesture()&&Ea.setState({previousSelectedElementIds:{},selectedElementIds:(0,sg.Oh)(Ea.state.previousSelectedElementIds,Ea.state)});nm=null});this.startTextEditing=function(sb){var cc,Qb,zb,xb=sb.sceneX,Zb=sb.sceneY,qc=sb.insertAtParentCenter;sb=sb.container;var Dc=!1,Yc=(void 0===qc||qc)&&Ea.getTextWysiwygSnappedToCenterPosition(xb,Zb,Ea.state,sb);sb&&Yc&&((0,Ue.WJ)(sb)||(Dc=!0));qc=Ea.scene.getSelectedElements(Ea.state);var ed=
(null===(cc=qc=1===qc.length?(0,Xc.iB)(qc[0])?qc[0]:sb?(0,Ue.WJ)(qc[0]):Ea.getTextElementAtPosition(xb,Zb):Ea.getTextElementAtPosition(xb,Zb))||void 0===cc?void 0:cc.fontFamily)||Ea.state.currentItemFontFamily;cc=(null===qc||void 0===qc?void 0:qc.lineHeight)||(0,Ue.PT)(ed);var nd=Ea.state.currentItemFontSize;!qc&&Dc&&sb&&!(0,Ib.Yv)(sb)&&(xb=(0,Ue.AT)((0,Qa.mO)({fontSize:nd,fontFamily:ed}),cc),Zb=(0,Ue.w_)(nd,cc),Zb=Math.max(sb.height,Zb),xb=Math.max(sb.width,xb),(0,hb.DR)(sb,{height:Zb,width:xb}),
xb=sb.x+xb/2,Zb=sb.y+Zb/2,Yc&&=Ea.getTextWysiwygSnappedToCenterPosition(xb,Zb,Ea.state,sb));var Rd=Ea.getTopLayerFrameAtSceneCoords({x:xb,y:Zb});Yc=qc||(0,Xc.VL)({x:Yc?Yc.elementCenterX:xb,y:Yc?Yc.elementCenterY:Zb,strokeColor:Ea.state.currentItemStrokeColor,backgroundColor:Ea.state.currentItemBackgroundColor,fillStyle:Ea.state.currentItemFillStyle,strokeWidth:Ea.state.currentItemStrokeWidth,strokeStyle:Ea.state.currentItemStrokeStyle,roughness:Ea.state.currentItemRoughness,opacity:Ea.state.currentItemOpacity,
text:"",fontSize:nd,fontFamily:ed,textAlign:Yc?"center":Ea.state.currentItemTextAlign,verticalAlign:Yc?bb.oX.MIDDLE:bb.hs,containerId:Dc?null==sb?void 0:sb.id:void 0,groupIds:null!==(Qb=null==sb?void 0:sb.groupIds)&&void 0!==Qb?Qb:[],lineHeight:cc,angle:null!==(zb=null==sb?void 0:sb.angle)&&void 0!==zb?zb:0,frameId:Rd?Rd.id:null});(!qc&&Dc&&sb&&(0,hb.DR)(sb,{boundElements:(sb.boundElements||[]).concat({type:"text",id:Yc.id})}),Ea.setState({editingElement:Yc}),qc)||(sb&&Dc?(Qb=Ea.scene.getElementIndex(sb.id),
Ea.scene.insertElementAtIndex(Yc,Qb+1)):Ea.scene.addNewElement(Yc));Ea.setState({editingElement:Yc});Ea.handleTextWysiwyg(Yc,{isExistingElement:!!qc})};this.handleCanvasDoubleClick=function(sb){if(!Ea.state.multiElement&&"selection"===Ea.state.activeTool.type){var cc=Ea.scene.getSelectedElements(Ea.state);if(1===cc.length&&(0,Ib.bt)(cc[0])){if(sb[Wa.tW.CTRL_OR_CMD]&&(!Ea.state.editingLinearElement||Ea.state.editingLinearElement.elementId!==cc[0].id))return Ea.history.resumeRecording(),void Ea.setState({editingLinearElement:new sc._(cc[0],
Ea.scene)});if(Ea.state.editingLinearElement&&Ea.state.editingLinearElement.elementId===cc[0].id)return}(0,Qa.z8)(Ea.interactiveCanvas);var Qb=(0,Qa.dE)(sb,Ea.state);cc=Qb.x;Qb=Qb.y;if(0<(0,db.iJ)(Ea.state).length){var zb=Ea.getElementAtPosition(cc,Qb),xb=zb&&(0,db.YS)(zb,Ea.state.selectedGroupIds);if(xb)return void Ea.setState(function(qc){return ea(ea({},qc),(0,db.bO)({editingGroupId:xb,selectedElementIds:(0,la.Z)({},zb.id,!0)},Ea.scene.getNonDeletedElements(),qc,Ea))})}if((0,Qa.z8)(Ea.interactiveCanvas),
!sb[Wa.tW.CTRL_OR_CMD]&&!Ea.state.viewModeEnabled){var Zb=Ea.getElementAtPosition(cc,Qb);if((0,Ib.gs)(Zb))return void Ea.setState({activeEmbeddable:{element:Zb,state:"active"}});(Zb=(0,Ue.OW)(Ea.scene.getNonDeletedElements(),Ea.state,cc,Qb))&&((0,Ib.Xo)(Zb)||!(0,Qa.Qm)(Zb.backgroundColor)||(0,Nd.Qu)(Zb,Ea.state,Ea.frameNameBoundsCache,[cc,Qb]))&&(Qb=(0,Ue.TP)(Zb,Ea.state),cc=Qb.x,Qb=Qb.y);Ea.startTextEditing({sceneX:cc,sceneY:Qb,insertAtParentCenter:!sb.altKey,container:Zb})}}};this.getElementLinkAtPosition=
function(sb,cc){var Qb=1/0;return Ea.scene.getNonDeletedElements().slice().reverse().find(function(zb,xb){return cc&&zb.id===cc.id&&(Qb=xb),zb.link&&xb<=Qb&&(0,Le.Ni)(zb,Ea.state,[sb.x,sb.y],Ea.device.isMobile)})};this.redirectToLink=function(sb,cc){var Qb=(0,fc.LW)(Ea.lastPointerDown.clientX,Ea.lastPointerDown.clientY,Ea.lastPointerUp.clientX,Ea.lastPointerUp.clientY);if(!(!Ea.hitLinkElement||cc&&Qb>bb.f||!cc&&0!==Qb)&&(cc=(0,Qa.dE)(Ea.lastPointerDown,Ea.state),cc=(0,Le.Ni)(Ea.hitLinkElement,Ea.state,
[cc.x,cc.y],Ea.device.isMobile),Qb=(0,Qa.dE)(Ea.lastPointerUp,Ea.state),Qb=(0,Le.Ni)(Ea.hitLinkElement,Ea.state,[Qb.x,Qb.y],Ea.device.isMobile),cc&&Qb)){var zb,xb;(cc=Ea.hitLinkElement.link)&&(cc=(0,ne.$u)(cc),Ea.props.onLinkOpen&&(xb=(0,Qa.ag)(bb.Ks.EXCALIDRAW_LINK,sb.nativeEvent),Ea.props.onLinkOpen(ea(ea({},Ea.hitLinkElement),{},{link:cc}),xb)),null===(zb=xb)||void 0===zb||!zb.defaultPrevented)&&(sb=(0,ne.q$)(cc)?"_self":"_blank",(sb=window.open(void 0,sb))&&(sb.opener=null,sb.location=cc))}};
this.getTopLayerFrameAtSceneCoords=function(sb){var cc=Ea.scene.getNonDeletedFrames().filter(function(Qb){return(0,rf.Dn)(sb,Qb)});return cc.length?cc[cc.length-1]:null};this.handleCanvasPointerMove=function(sb){Ea.savePointer(sb.clientX,sb.clientY,Ea.state.cursorButton);dj.has(sb.pointerId)&&dj.set(sb.pointerId,{x:sb.clientX,y:sb.clientY});var cc=nm;if(2===dj.size&&bj&&cc&&Ul){var Qb=lb(dj),zb=Qb.x-bj.x,xb=Qb.y-bj.y;bj=Qb;var Zb=Db(Array.from(dj.values())),qc=(Zb="freedraw"===Ea.state.activeTool.type&&
Ea.state.penMode?1:Zb/Ul)?(0,Bc.j)(cc*Zb):Ea.state.zoom.value;Ea.setState(function(pg){pg=(0,ic.E)({viewportX:Qb.x,viewportY:Qb.y,nextZoom:qc},pg);Ea.translateCanvas({zoom:pg.zoom,scrollX:pg.scrollX+zb/qc,scrollY:pg.scrollY+xb/qc,shouldCacheIgnoreZoom:!0})});Ea.resetShouldCacheIgnoreZoomDebounced()}else bj=Ul=nm=null;if(!(rj||xk||kj||(0,bd.l$)(Ea.state))){cc=(0,Bc._4)(Ji,sb.clientX-Ea.state.offsetLeft,sb.clientY-Ea.state.offsetTop).isOverEither;Ea.state.draggingElement||Ea.state.multiElement||(cc?
(0,Qa.z8)(Ea.interactiveCanvas):(0,Qa.Uk)(Ea.interactiveCanvas,Ea.state));Zb=(0,Qa.dE)(sb,Ea.state);var Dc=Zb.x,Yc=Zb.y;if(Ea.state.editingLinearElement&&!Ea.state.editingLinearElement.isDragging){var ed=sc._.handlePointerMove(sb,Dc,Yc,Ea.state);ed&&ed!==Ea.state.editingLinearElement&&(0,La.flushSync)(function(){Ea.setState({editingLinearElement:ed})});null!=(null==ed?void 0:ed.lastUncommittedPoint)?Ea.maybeSuggestBindingAtCursor(Zb):(0,La.flushSync)(function(){Ea.setState({suggestedBindings:[]})})}if((0,Ib.Lx)(Ea.state.activeTool.type)){var nd=
Ea.state.draggingElement;(0,Ib.Mn)(nd,!1)?Ea.maybeSuggestBindingsForLinearElementAtCoords(nd,[Zb],Ea.state.startBoundElement):Ea.maybeSuggestBindingAtCursor(Zb)}if(Ea.state.multiElement){var Rd=Ea.state.multiElement;Zb=Rd.x;nd=Rd.y;cc=Rd.points;var ce=Rd.lastCommittedPoint,Yd=cc[cc.length-1];if((0,Qa.Uk)(Ea.interactiveCanvas,Ea.state),Yd===ce)(0,fc.LW)(Dc-Zb,Yc-nd,Yd[0],Yd[1])>=bb.qx?(0,hb.DR)(Rd,{points:[].concat((0,ta.Z)(cc),[[Dc-Zb,Yc-nd]])}):(0,Qa.KJ)(Ea.interactiveCanvas,bb.oc.POINTER);else if(2<
cc.length&&ce&&(0,fc.LW)(Dc-Zb,Yc-nd,ce[0],ce[1])<bb.qx)(0,Qa.KJ)(Ea.interactiveCanvas,bb.oc.POINTER),(0,hb.DR)(Rd,{points:cc.slice(0,-1)});else{var Ne;Dc=(0,fc.wC)(Dc,Yc,sb[Wa.tW.CTRL_OR_CMD]?null:Ea.state.gridSize);Yc=(0,va.Z)(Dc,2);Dc=Yc[0];Yc=Yc[1];ce=null!==(Ne=null==Rd?void 0:Rd.lastCommittedPoint)&&void 0!==Ne?Ne:[0,0];ce=(0,va.Z)(ce,2);Ne=ce[0];ce=ce[1];Yd=Dc-Zb-Ne;var ag=Yc-nd-ce;(0,Wa.Ge)(sb)&&(sb=(0,Xc.o4)(Ne+Zb,ce+nd,Dc,Yc),Yd=sb.width,ag=sb.height);(0,fc.g6)(cc,Ea.state.zoom.value)&&
(0,Qa.KJ)(Ea.interactiveCanvas,bb.oc.POINTER);(0,hb.DR)(Rd,{points:[].concat((0,ta.Z)(cc.slice(0,-1)),[[Ne+Yd,ce+ag]])})}}else if(!(sb.buttons||"selection"!==Ea.state.activeTool.type&&"text"!==Ea.state.activeTool.type&&"eraser"!==Ea.state.activeTool.type)){nd=Ea.scene.getNonDeletedElements();Ne=Ea.scene.getSelectedElements(Ea.state);if(1!==Ne.length||cc||Ea.state.editingLinearElement){if(1<Ne.length&&!cc&&(nd=(0,Xc.n2)((0,Xc.KP)(Ne),Dc,Yc,Ea.state.zoom,sb.pointerType)))return void(0,Qa.KJ)(Ea.interactiveCanvas,
(0,Xc.Un)({transformHandleType:nd}))}else if((nd=(0,Xc.jt)(nd,Ea.state,Dc,Yc,Ea.state.zoom,sb.pointerType))&&nd.transformHandleType)return void(0,Qa.KJ)(Ea.interactiveCanvas,(0,Xc.Un)(nd));nd=Ea.getElementAtPosition(Zb.x,Zb.y);(Ea.hitLinkElement=Ea.getElementLinkAtPosition(Zb,nd),(0,bd.EN)(Ea.state))||(Ea.hitLinkElement&&!Ea.state.selectedElementIds[Ea.hitLinkElement.id]?((0,Qa.KJ)(Ea.interactiveCanvas,bb.oc.POINTER),(0,Le.Pp)(Ea.hitLinkElement,Ea.state)):((0,Le.lV)(),nd&&(nd.link||(0,Ib.gs)(nd))&&
Ea.state.selectedElementIds[nd.id]&&!Ea.state.contextMenu&&!Ea.state.showHyperlinkPopup)?Ea.setState({showHyperlinkPopup:"info"}):"text"===Ea.state.activeTool.type?(0,Qa.KJ)(Ea.interactiveCanvas,(0,Xc.iB)(nd)?bb.oc.TEXT:bb.oc.CROSSHAIR):Ea.state.viewModeEnabled?(0,Qa.KJ)(Ea.interactiveCanvas,bb.oc.GRAB):cc?(0,Qa.KJ)(Ea.interactiveCanvas,bb.oc.AUTO):Ea.state.selectedLinearElement?Ea.handleHoverSelectedLinearElement(Ea.state.selectedLinearElement,Dc,Yc):sb[Wa.tW.CTRL_OR_CMD]?(0,Qa.KJ)(Ea.interactiveCanvas,
bb.oc.AUTO):!nd&&!Ea.isHittingCommonBoundingBoxOfSelectedElements(Zb,Ne)||null!=nd&&nd.locked||(nd&&(0,Ib.gs)(nd)&&Ea.isEmbeddableCenter(nd,sb,Dc,Yc)?((0,Qa.KJ)(Ea.interactiveCanvas,bb.oc.POINTER),Ea.setState({activeEmbeddable:{element:nd,state:"hover"}})):((0,Qa.KJ)(Ea.interactiveCanvas,bb.oc.MOVE),"hover"===(null===(Rd=Ea.state.activeEmbeddable)||void 0===Rd?void 0:Rd.state)&&Ea.setState({activeEmbeddable:null}))))}}};this.handleEraser=function(sb,cc,Qb){for(var zb=function(Rd){Rd.forEach(function(ce){ce.locked||
(xb.push(ce.id),sb.altKey?cc.elementIdsToErase[ce.id]&&cc.elementIdsToErase[ce.id].erase&&(cc.elementIdsToErase[ce.id].erase=!1):cc.elementIdsToErase[ce.id]||(cc.elementIdsToErase[ce.id]={erase:!0,opacity:ce.opacity}))})},xb=[],Zb=(0,fc.LW)(cc.lastCoords.x,cc.lastCoords.y,Qb.x,Qb.y),qc=10/Ea.state.zoom.value,Dc=ea({},cc.lastCoords),Yc=0;Yc<=Zb&&(zb(Ea.getElementsAtPosition(Dc.x,Dc.y)),Yc!==Zb);){var ed=(Yc=Math.min(Yc+qc,Zb))/Zb,nd=(1-ed)*Dc.y+ed*Qb.y;Dc.x=(1-ed)*Dc.x+ed*Qb.x;Dc.y=nd}zb=Ea.scene.getElementsIncludingDeleted().map(function(Rd){var ce=
(0,Ib.Xh)(Rd)&&xb.includes(Rd.containerId)?Rd.containerId:Rd.id;if(xb.includes(ce)){if(!sb.altKey)return(0,hb.BE)(Rd,{opacity:bb.xY});if(cc.elementIdsToErase[ce]&&!1===cc.elementIdsToErase[ce].erase)return(0,hb.BE)(Rd,{opacity:cc.elementIdsToErase[ce].opacity})}return Rd});Ea.scene.replaceAllElements(zb);cc.lastCoords.x=Qb.x;cc.lastCoords.y=Qb.y};this.handleTouchMove=function(sb){Kk=!0};this.handleCanvasPointerDown=function(sb){var cc,Qb;if(Ea.state.contextMenu&&Ea.setState({contextMenu:null}),Ea.updateGestureOnPointerDown(sb),
"touch"===sb.pointerType&&Ea.state.draggingElement&&"freedraw"===Ea.state.draggingElement.type){var zb=Ea.state.draggingElement;Ea.updateScene(ea(ea({},10>zb.points.length?{elements:Ea.scene.getElementsIncludingDeleted().filter(function(qc){return qc.id!==zb.id})}:{}),{},{appState:{draggingElement:null,editingElement:null,startBoundElement:null,suggestedBindings:[],selectedElementIds:(0,sg.Oh)(Object.keys(Ea.state.selectedElementIds).filter(function(qc){return qc!==zb.id}).reduce(function(qc,Dc){return qc[Dc]=
Ea.state.selectedElementIds[Dc],qc},{}),Ea.state)}}))}else{var xb=document.getSelection();if(null!=xb&&xb.anchorNode&&xb.removeAllRanges(),Ea.maybeOpenContextMenuAfterPointerDownOnTouchDevices(sb),Ea.maybeCleanupAfterMissingPointerUp(sb),Ea.state.penDetected||"pen"!==sb.pointerType||Ea.setState(function(qc){return{penMode:!0,penDetected:!0}}),!Ea.device.isTouchScreen&&["pen","touch"].includes(sb.pointerType)&&(Ea.device=(0,Qa.v4)(Ea.device,{isTouchScreen:!0})),!(xk||(Ea.lastPointerDown=sb,Ea.setState({lastPointerDownWith:sb.pointerType,
cursorButton:"down"}),Ea.savePointer(sb.clientX,sb.clientY,"down"),Ea.handleCanvasPanUsingWheelOrSpaceDrag(sb)||sb.button!==bb.Oh.MAIN&&sb.button!==bb.Oh.TOUCH||1<dj.size)))if(xb=Ea.initialPointerDownState(sb),Ea.setState({selectedElementsAreBeingDragged:!1}),!Ea.handleDraggingScrollBar(sb,xb))if(Ea.clearSelectionIfNotUsingSelection(),Ea.updateBindingEnabledOnPointerMove(sb),!Ea.handleSelectionOnPointerDown(sb,xb))if(!Ea.state.penMode||"touch"!==sb.pointerType||"selection"===Ea.state.activeTool.type||
"text"===Ea.state.activeTool.type||"image"===Ea.state.activeTool.type)if("text"!==Ea.state.activeTool.type){if("arrow"===Ea.state.activeTool.type||"line"===Ea.state.activeTool.type)Ea.handleLinearElementOnPointerDown(sb,Ea.state.activeTool.type,xb);else if("image"===Ea.state.activeTool.type){(0,Qa.KJ)(Ea.interactiveCanvas,bb.oc.CROSSHAIR);var Zb=Ea.state.pendingImageElementId&&Ea.scene.getElement(Ea.state.pendingImageElementId);if(!Zb)return;Ea.setState({draggingElement:Zb,editingElement:Zb,pendingImageElementId:null,
multiElement:null});sb=(0,Qa.dE)(sb,Ea.state);(0,hb.DR)(Zb,{x:sb.x,y:sb.y})}else"freedraw"===Ea.state.activeTool.type?Ea.handleFreeDrawElementOnPointerDown(sb,Ea.state.activeTool.type,xb):"custom"===Ea.state.activeTool.type?(0,Qa.KJ)(Ea.interactiveCanvas,bb.oc.AUTO):"frame"===Ea.state.activeTool.type?Ea.createFrameElementOnPointerDown(xb):"eraser"!==Ea.state.activeTool.type&&"hand"!==Ea.state.activeTool.type&&Ea.createGenericElementOnPointerDown(Ea.state.activeTool.type,xb);null===(cc=Ea.props)||
void 0===cc||null===(Qb=cc.onPointerDown)||void 0===Qb||Qb.call(cc,Ea.state.activeTool,xb);cc=Ea.onPointerMoveFromPointerDownHandler(xb);Qb=Ea.onPointerUpFromPointerDownHandler(xb);sb=Ea.onKeyDownFromPointerDownHandler(xb);Zb=Ea.onKeyUpFromPointerDownHandler(xb);yk=Qb;Ea.state.viewModeEnabled||(window.addEventListener(bb.Ks.POINTER_MOVE,cc),window.addEventListener(bb.Ks.POINTER_UP,Qb),window.addEventListener(bb.Ks.KEYDOWN,sb),window.addEventListener(bb.Ks.KEYUP,Zb),xb.eventListeners.onMove=cc,xb.eventListeners.onUp=
Qb,xb.eventListeners.onKeyUp=Zb,xb.eventListeners.onKeyDown=sb)}else Ea.handleTextOnPointerDown(sb,xb)}};this.handleCanvasPointerUp=function(sb){var cc,Qb;Ea.removePointer(sb);Ea.lastPointerUp=sb;var zb=(0,Qa.dE)({clientX:sb.clientX,clientY:sb.clientY},Ea.state),xb=sb.timeStamp-(null!==(cc=null===(Qb=Ea.lastPointerDown)||void 0===Qb?void 0:Qb.timeStamp)&&void 0!==cc?cc:0);if(Ea.device.isMobile&&300>xb&&(cc=Ea.getElementAtPosition(zb.x,zb.y),(0,Ib.gs)(cc)&&Ea.isEmbeddableCenter(cc,sb,zb.x,zb.y)))return void Ea.handleEmbeddableCenterClick(cc);
Ea.device.isTouchScreen&&(cc=Ea.getElementAtPosition(zb.x,zb.y),Ea.hitLinkElement=Ea.getElementLinkAtPosition(zb,cc));Ea.hitLinkElement&&!Ea.state.selectedElementIds[Ea.hitLinkElement.id]?300>xb&&"embeddable"===Ea.hitLinkElement.type&&!(0,Le.wq)(Ea.hitLinkElement,Ea.state,[zb.x,zb.y])?Ea.handleEmbeddableCenterClick(Ea.hitLinkElement):Ea.redirectToLink(sb,Ea.device.isTouchScreen):Ea.state.viewModeEnabled&&Ea.setState({activeEmbeddable:null,selectedElementIds:{}})};this.maybeOpenContextMenuAfterPointerDownOnTouchDevices=
function(sb){"touch"===sb.pointerType&&(Kk=!1,Jk?Kk=!0:Jk=window.setTimeout(function(){Jk=0;Kk||Ea.handleCanvasContextMenu(sb)},bb.nM))};this.resetContextMenuTimer=function(){clearTimeout(Jk);Jk=0;Kk=!1};this.handleCanvasPanUsingWheelOrSpaceDrag=function(sb){if(!(1>=dj.size&&(sb.button===bb.Oh.WHEEL||sb.button===bb.Oh.MAIN&&rj||(0,bd.l$)(Ea.state)||Ea.state.viewModeEnabled))||(0,Xc.iB)(Ea.state.editingElement))return!1;xk=!0;sb.preventDefault();var cc=!1,Qb=/Linux/.test(window.navigator.platform);
(0,Qa.KJ)(Ea.interactiveCanvas,bb.oc.GRABBING);var zb=sb.clientX,xb=sb.clientY,Zb=(0,Qa.$9)(function(Dc){var Yc=zb-Dc.clientX,ed=xb-Dc.clientY;if(zb=Dc.clientX,xb=Dc.clientY,Qb&&!cc&&(1<Math.abs(Yc)||1<Math.abs(ed))){cc=!0;var nd=function Yd(ce){document.body.removeEventListener(bb.Ks.PASTE,Yd);ce.stopPropagation()};document.body.addEventListener(bb.Ks.PASTE,nd);window.addEventListener(bb.Ks.POINTER_UP,function Yd(){setTimeout(function(){document.body.removeEventListener(bb.Ks.PASTE,nd);window.removeEventListener(bb.Ks.POINTER_UP,
Yd)},100)})}Ea.translateCanvas({scrollX:Ea.state.scrollX-Yc/Ea.state.zoom.value,scrollY:Ea.state.scrollY-ed/Ea.state.zoom.value})}),qc=(0,Qa.tH)(yk=function(){yk=null;xk=!1;rj||(Ea.state.viewModeEnabled?(0,Qa.KJ)(Ea.interactiveCanvas,bb.oc.GRAB):(0,Qa.Uk)(Ea.interactiveCanvas,Ea.state));Ea.setState({cursorButton:"up"});Ea.savePointer(sb.clientX,sb.clientY,"up");window.removeEventListener(bb.Ks.POINTER_MOVE,Zb);window.removeEventListener(bb.Ks.POINTER_UP,qc);window.removeEventListener(bb.Ks.BLUR,qc);
Zb.flush()});return window.addEventListener(bb.Ks.BLUR,qc),window.addEventListener(bb.Ks.POINTER_MOVE,Zb,{passive:!0}),window.addEventListener(bb.Ks.POINTER_UP,qc),!0};this.clearSelectionIfNotUsingSelection=function(){"selection"!==Ea.state.activeTool.type&&Ea.setState({selectedElementIds:(0,sg.Oh)({},Ea.state),selectedGroupIds:{},editingGroupId:null,activeEmbeddable:null})};this.handleSelectionOnPointerDown=function(sb,cc){if("selection"===Ea.state.activeTool.type){var Qb=Ea.scene.getNonDeletedElements(),
zb=Ea.scene.getSelectedElements(Ea.state);1!==zb.length||Ea.state.editingLinearElement?1<zb.length&&(cc.resize.handleType=(0,Xc.n2)((0,Xc.KP)(zb),cc.origin.x,cc.origin.y,Ea.state.zoom,sb.pointerType)):(Qb=(0,Xc.jt)(Qb,Ea.state,cc.origin.x,cc.origin.y,Ea.state.zoom,sb.pointerType),null!=Qb&&(Ea.setState({resizingElement:Qb.element}),cc.resize.handleType=Qb.transformHandleType));if(cc.resize.handleType)cc.resize.isResizing=!0,cc.resize.offset=(0,Qa.AK)((0,Xc.xx)(cc.resize.handleType,zb,cc.origin.x,
cc.origin.y)),1===zb.length&&(0,Ib.bt)(zb[0])&&2===zb[0].points.length&&(cc.resize.arrowDirection=(0,Xc.T)(cc.resize.handleType,zb[0]));else{var xb;if(Ea.state.selectedLinearElement&&(zb=sc._.handlePointerDown(sb,Ea.state,Ea.history,cc.origin,Ea.state.editingLinearElement||Ea.state.selectedLinearElement),zb.hitElement&&(cc.hit.element=zb.hitElement),zb.linearElementEditor&&(Ea.setState({selectedLinearElement:zb.linearElementEditor}),Ea.state.editingLinearElement&&Ea.setState({editingLinearElement:zb.linearElementEditor})),
zb.didAddPoint))return!0;if((cc.hit.element=null!==(xb=cc.hit.element)&&void 0!==xb?xb:Ea.getElementAtPosition(cc.origin.x,cc.origin.y),cc.hit.element)&&Ea.getElementLinkAtPosition({x:cc.origin.x,y:cc.origin.y},cc.hit.element))return!1;cc.hit.allHitElements=Ea.getElementsAtPosition(cc.origin.x,cc.origin.y);var Zb=cc.hit.element;xb=cc.hit.allHitElements.some(function(qc){return Ea.isASelectedElement(qc)});if(null!==Zb&&xb||sb.shiftKey||cc.hit.hasHitCommonBoundingBoxOfSelectedElements||Ea.clearSelection(Zb),
Ea.state.editingLinearElement)Ea.setState({selectedElementIds:(0,sg.Oh)((0,la.Z)({},Ea.state.editingLinearElement.elementId,!0),Ea.state)});else if(null!=Zb){if(sb[Wa.tW.CTRL_OR_CMD])return Ea.state.selectedElementIds[Zb.id]||(cc.hit.wasAddedToSelection=!0),Ea.setState(function(qc){return ea(ea({},(0,db.iE)(qc,Zb)),{},{previousSelectedElementIds:Ea.state.selectedElementIds})}),!1;Ea.state.selectedElementIds[Zb.id]||(Ea.state.editingGroupId&&!(0,db.Nd)(Zb,Ea.state.editingGroupId)&&Ea.setState({selectedElementIds:(0,sg.Oh)({},
Ea.state),selectedGroupIds:{},editingGroupId:null,activeEmbeddable:null}),xb||cc.hit.hasHitCommonBoundingBoxOfSelectedElements||(Ea.setState(function(qc){var Dc=ea(ea({},qc.selectedElementIds),{},(0,la.Z)({},Zb.id,!0)),Yc=[];if(Object.keys(qc.selectedElementIds).forEach(function(nd){(nd=Ea.scene.getElement(nd))&&Yc.push(nd)}),"frame"===Zb.type)(0,rf.wO)(Yc,Zb.id).forEach(function(nd){delete Dc[nd.id]});else if(Zb.frameId)Dc[Zb.frameId]&&delete Dc[Zb.id];else{var ed=new Set(Zb.groupIds.flatMap(function(nd){return(0,db.Fb)(Ea.scene.getNonDeletedElements(),
nd)}).filter(function(nd){return"frame"===nd.type}).map(function(nd){return nd.id}));0<ed.size&&Yc.forEach(function(nd){nd.frameId&&ed.has(nd.frameId)&&(delete Dc[nd.id],nd.groupIds.flatMap(function(Rd){return(0,db.Fb)(Ea.scene.getNonDeletedElements(),Rd)}).forEach(function(Rd){delete Dc[Rd.id]}))})}return ea(ea({},(0,db.bO)({editingGroupId:qc.editingGroupId,selectedElementIds:Dc},Ea.scene.getNonDeletedElements(),qc,Ea)),{},{showHyperlinkPopup:!(!Zb.link&&!(0,Ib.gs)(Zb))&&"info"})}),cc.hit.wasAddedToSelection=
!0))}Ea.setState({previousSelectedElementIds:Ea.state.selectedElementIds})}}return!1};this.handleTextOnPointerDown=function(sb,cc){if(!(0,Xc.iB)(Ea.state.editingElement)){var Qb=cc.origin.x;cc=cc.origin.y;var zb=Ea.getElementAtPosition(Qb,cc,{includeBoundTextElement:!0}),xb=(0,Ue.OW)(Ea.scene.getNonDeletedElements(),Ea.state,Qb,cc);(0,Ib.Xo)(zb)&&(xb=zb,Qb=zb.x+zb.width/2,cc=zb.y+zb.height/2);Ea.startTextEditing({sceneX:Qb,sceneY:cc,insertAtParentCenter:!sb.altKey,container:xb});(0,Qa.z8)(Ea.interactiveCanvas);
Ea.state.activeTool.locked||Ea.setState({activeTool:(0,Qa.Om)(Ea.state,{type:"selection"})})}};this.handleFreeDrawElementOnPointerDown=function(sb,cc,Qb){var zb=(0,fc.wC)(Qb.origin.x,Qb.origin.y,null),xb=(0,va.Z)(zb,2);zb=xb[0];xb=xb[1];var Zb=Ea.getTopLayerFrameAtSceneCoords({x:zb,y:xb}),qc=(0,Sc.KE)({type:cc,x:zb,y:xb,strokeColor:Ea.state.currentItemStrokeColor,backgroundColor:Ea.state.currentItemBackgroundColor,fillStyle:Ea.state.currentItemFillStyle,strokeWidth:Ea.state.currentItemStrokeWidth,
strokeStyle:Ea.state.currentItemStrokeStyle,roughness:Ea.state.currentItemRoughness,opacity:Ea.state.currentItemOpacity,roundness:null,simulatePressure:.5===sb.pressure,locked:!1,frameId:Zb?Zb.id:null});Ea.setState(function(Dc){var Yc=ea({},Dc.selectedElementIds);return delete Yc[qc.id],{selectedElementIds:(0,sg.Oh)(Yc,Dc)}});sb=qc.simulatePressure?qc.pressures:[].concat((0,ta.Z)(qc.pressures),[sb.pressure]);(0,hb.DR)(qc,{points:[[0,0]],pressures:sb});Qb=(0,ab.Y9)(Qb.origin,Ea.scene);Ea.scene.addNewElement(qc);
Ea.setState({draggingElement:qc,editingElement:qc,startBoundElement:Qb,suggestedBindings:[]})};this.insertEmbeddableElement=function(sb){var cc,Qb=sb.link;sb=(0,fc.wC)(sb.sceneX,sb.sceneY,null!==(cc=Ea.lastPointerDown)&&void 0!==cc&&cc[Wa.tW.CTRL_OR_CMD]?null:Ea.state.gridSize);sb=(0,va.Z)(sb,2);cc=sb[0];sb=sb[1];var zb=(0,Rc.LM)(Qb);if(zb)return zb.warning&&Ea.setToast({message:zb.warning,closable:!0}),Qb=(0,Sc.M)({type:"embeddable",x:cc,y:sb,strokeColor:"transparent",backgroundColor:"transparent",
fillStyle:Ea.state.currentItemFillStyle,strokeWidth:Ea.state.currentItemStrokeWidth,strokeStyle:Ea.state.currentItemStrokeStyle,roughness:Ea.state.currentItemRoughness,roundness:Ea.getCurrentItemRoundness("embeddable"),opacity:Ea.state.currentItemOpacity,locked:!1,width:zb.aspectRatio.w,height:zb.aspectRatio.h,link:Qb,validated:null}),Ea.scene.replaceAllElements([].concat((0,ta.Z)(Ea.scene.getElementsIncludingDeleted()),[Qb])),Qb};this.createImageElement=function(sb){var cc;sb=(0,fc.wC)(sb.sceneX,
sb.sceneY,null!==(cc=Ea.lastPointerDown)&&void 0!==cc&&cc[Wa.tW.CTRL_OR_CMD]?null:Ea.state.gridSize);sb=(0,va.Z)(sb,2);cc=sb[0];sb=sb[1];var Qb=Ea.getTopLayerFrameAtSceneCoords({x:cc,y:sb});return(0,Xc.vw)({type:"image",x:cc,y:sb,strokeColor:Ea.state.currentItemStrokeColor,backgroundColor:Ea.state.currentItemBackgroundColor,fillStyle:Ea.state.currentItemFillStyle,strokeWidth:Ea.state.currentItemStrokeWidth,strokeStyle:Ea.state.currentItemStrokeStyle,roughness:Ea.state.currentItemRoughness,roundness:null,
opacity:Ea.state.currentItemOpacity,locked:!1,frameId:Qb?Qb.id:null})};this.handleLinearElementOnPointerDown=function(sb,cc,Qb){if(Ea.state.multiElement){var zb=Ea.state.multiElement;if("line"===zb.type&&(0,fc.g6)(zb.points,Ea.state.zoom.value))return(0,hb.DR)(zb,{lastCommittedPoint:zb.points[zb.points.length-1]}),void Ea.actionManager.executeAction(Ua.pL);cc=zb.x;sb=zb.y;var xb=zb.lastCommittedPoint;if(1<zb.points.length&&xb&&(0,fc.LW)(Qb.origin.x-cc,Qb.origin.y-sb,xb[0],xb[1])<bb.qx)return void Ea.actionManager.executeAction(Ua.pL);
Ea.setState(function(ed){return{selectedElementIds:(0,sg.Oh)(ea(ea({},ed.selectedElementIds),{},(0,la.Z)({},zb.id,!0)),ed)}});(0,hb.DR)(zb,{lastCommittedPoint:zb.points[zb.points.length-1]});(0,Qa.KJ)(Ea.interactiveCanvas,bb.oc.POINTER)}else{sb=(0,fc.wC)(Qb.origin.x,Qb.origin.y,sb[Wa.tW.CTRL_OR_CMD]?null:Ea.state.gridSize);xb=(0,va.Z)(sb,2);sb=xb[0];xb=xb[1];var Zb=Ea.getTopLayerFrameAtSceneCoords({x:sb,y:xb}),qc=Ea.state,Dc=qc.currentItemStartArrowhead;qc=qc.currentItemEndArrowhead;Dc=(0,va.Z)("arrow"===
cc?[Dc,qc]:[null,null],2);var Yc=(0,Xc.y8)({type:cc,x:sb,y:xb,strokeColor:Ea.state.currentItemStrokeColor,backgroundColor:Ea.state.currentItemBackgroundColor,fillStyle:Ea.state.currentItemFillStyle,strokeWidth:Ea.state.currentItemStrokeWidth,strokeStyle:Ea.state.currentItemStrokeStyle,roughness:Ea.state.currentItemRoughness,opacity:Ea.state.currentItemOpacity,roundness:"round"===Ea.state.currentItemRoundness?{type:bb.a6.PROPORTIONAL_RADIUS}:null,startArrowhead:Dc[0],endArrowhead:Dc[1],locked:!1,frameId:Zb?
Zb.id:null});Ea.setState(function(ed){var nd=ea({},ed.selectedElementIds);return delete nd[Yc.id],{selectedElementIds:(0,sg.Oh)(nd,ed)}});(0,hb.DR)(Yc,{points:[].concat((0,ta.Z)(Yc.points),[[0,0]])});Qb=(0,ab.Y9)(Qb.origin,Ea.scene);Ea.scene.addNewElement(Yc);Ea.setState({draggingElement:Yc,editingElement:Yc,startBoundElement:Qb,suggestedBindings:[]})}};this.createGenericElementOnPointerDown=function(sb,cc){var Qb,zb;cc=(0,fc.wC)(cc.origin.x,cc.origin.y,null!==(Qb=Ea.lastPointerDown)&&void 0!==Qb&&
Qb[Wa.tW.CTRL_OR_CMD]?null:Ea.state.gridSize);cc=(0,va.Z)(cc,2);Qb=cc[0];cc=cc[1];var xb=Ea.getTopLayerFrameAtSceneCoords({x:Qb,y:cc});Qb={x:Qb,y:cc,strokeColor:Ea.state.currentItemStrokeColor,backgroundColor:Ea.state.currentItemBackgroundColor,fillStyle:Ea.state.currentItemFillStyle,strokeWidth:Ea.state.currentItemStrokeWidth,strokeStyle:Ea.state.currentItemStrokeStyle,roughness:Ea.state.currentItemRoughness,opacity:Ea.state.currentItemOpacity,roundness:Ea.getCurrentItemRoundness(sb),locked:!1,frameId:xb?
xb.id:null};"selection"===(zb="embeddable"===sb?(0,Sc.M)(ea({type:"embeddable",validated:null},Qb)):(0,Xc.Up)(ea({type:sb},Qb))).type?Ea.setState({selectionElement:zb,draggingElement:zb}):(Ea.scene.addNewElement(zb),Ea.setState({multiElement:null,draggingElement:zb,editingElement:zb}))};this.createFrameElementOnPointerDown=function(sb){var cc;sb=(0,fc.wC)(sb.origin.x,sb.origin.y,null!==(cc=Ea.lastPointerDown)&&void 0!==cc&&cc[Wa.tW.CTRL_OR_CMD]?null:Ea.state.gridSize);cc=(0,va.Z)(sb,2);cc=(0,Sc.M3)(ea({x:cc[0],
y:cc[1],opacity:Ea.state.currentItemOpacity,locked:!1},bb.iG));Ea.scene.replaceAllElements([].concat((0,ta.Z)(Ea.scene.getElementsIncludingDeleted()),[cc]));Ea.setState({multiElement:null,draggingElement:cc,editingElement:cc})};this.restoreReadyToEraseElements=function(sb){var cc=Ea.scene.getElementsIncludingDeleted().map(function(Qb){return sb.elementIdsToErase[Qb.id]&&sb.elementIdsToErase[Qb.id].erase?(0,hb.BE)(Qb,{opacity:sb.elementIdsToErase[Qb.id].opacity}):(0,Ib.Xh)(Qb)&&sb.elementIdsToErase[Qb.containerId]&&
sb.elementIdsToErase[Qb.containerId].erase?(0,hb.BE)(Qb,{opacity:sb.elementIdsToErase[Qb.containerId].opacity}):Qb.frameId&&sb.elementIdsToErase[Qb.frameId]&&sb.elementIdsToErase[Qb.frameId].erase?(0,hb.BE)(Qb,{opacity:sb.elementIdsToErase[Qb.frameId].opacity}):Qb});Ea.scene.replaceAllElements(cc)};this.eraseElements=function(sb){var cc=Ea.scene.getElementsIncludingDeleted().map(function(Qb){return sb.elementIdsToErase[Qb.id]&&sb.elementIdsToErase[Qb.id].erase||(0,Ib.Xh)(Qb)&&sb.elementIdsToErase[Qb.containerId]&&
sb.elementIdsToErase[Qb.containerId].erase||Qb.frameId&&sb.elementIdsToErase[Qb.frameId]&&sb.elementIdsToErase[Qb.frameId].erase?(0,hb.BE)(Qb,{isDeleted:!0}):Qb});Ea.history.resumeRecording();Ea.scene.replaceAllElements(cc)};this.initializeImage=function(){var sb=(0,xa.Z)(ua().mark(function zb(Qb){var xb,Zb,qc,Dc,Yc,ed,nd,Rd,ce,Yd,Ne,ag,pg,Gf,Tf;return ua().wrap(function(nf){for(;;)switch(nf.prev=nf.next){case 0:if(Dc=Qb.imageFile,Yc=Qb.imageElement,ed=Qb.showCursorImagePreview,nd=void 0!==ed&&ed,
(0,Ab.Wr)(Dc)){nf.next=3;break}throw Error((0,yb.t)("errors.unsupportedFileType"));case 3:if(Rd=Dc.type,(0,Qa.KJ)(Ea.interactiveCanvas,"wait"),Rd!==bb.LO.svg){nf.next=23;break}return nf.prev=6,nf.t0=Ab.Pn,nf.t1=se.bp,nf.next=11,Dc.text();case 11:return nf.t2=nf.sent,nf.next=14,(0,nf.t1)(nf.t2);case 14:nf.t3=nf.sent;nf.t4=Dc.name;Dc=(0,nf.t0)(nf.t3,nf.t4);nf.next=23;break;case 19:throw nf.prev=19,nf.t5=nf.catch(6),console.warn(nf.t5),Error((0,yb.t)("errors.svgImageInsertError"));case 23:return nf.next=
25,(null===(xb=(Zb=Ea.props).generateIdForFile)||void 0===xb?void 0:xb.call(Zb,Dc))||(0,Ab.tW)(Dc);case 25:if(ce=nf.sent){nf.next=29;break}throw console.warn("Couldn't generate file id or the supplied `generateIdForFile` didn't resolve to one."),Error((0,yb.t)("errors.imageInsertError"));case 29:if(null!=(Yd=Ea.files[ce])&&Yd.dataURL){nf.next=42;break}return nf.prev=31,nf.next=34,(0,Ab.Tu)(Dc,{maxWidthOrHeight:bb.h6});case 34:Dc=nf.sent;nf.next=40;break;case 37:nf.prev=37,nf.t6=nf.catch(31),console.error("error trying to resing image file on insertion",
nf.t6);case 40:if(!(Dc.size>bb.$n)){nf.next=42;break}throw Error((0,yb.t)("errors.fileTooBig",{maxSize:"".concat(Math.trunc(bb.$n/1024/1024),"MB")}));case 42:if(nd&&(ag=null===(Ne=Ea.files[ce])||void 0===Ne?void 0:Ne.dataURL,pg=ag&&(0,Ab.KG)(ag),Ea.setImagePreviewCursor(pg||Dc)),nf.t7=null===(qc=Ea.files[ce])||void 0===qc?void 0:qc.dataURL,nf.t7){nf.next=48;break}return nf.next=47,(0,Ab.Sf)(Dc);case 47:nf.t7=nf.sent;case 48:return Gf=nf.t7,Tf=(0,hb.DR)(Yc,{fileId:ce},!1),nf.abrupt("return",new Promise(function(){var Ze=
(0,xa.Z)(ua().mark(function th(og,hf){var xh,Qh;return ua().wrap(function(Hg){for(;;)switch(Hg.prev=Hg.next){case 0:if(Hg.prev=0,Ea.files=ea(ea({},Ea.files),{},(0,la.Z)({},ce,{mimeType:Rd,id:ce,dataURL:Gf,created:Date.now(),lastRetrieved:Date.now()})),Qh=Ea.imageCache.get(ce)){Hg.next=7;break}return Ea.addNewImagesToImageCache(),Hg.next=7,Ea.updateImageCache([Tf]);case 7:if(!((null==Qh?void 0:Qh.image)instanceof Promise)){Hg.next=10;break}return Hg.next=10,Qh.image;case 10:Ea.state.pendingImageElementId!==
Tf.id&&(null===(xh=Ea.state.draggingElement)||void 0===xh?void 0:xh.id)!==Tf.id&&Ea.initializeImageDimensions(Tf,!0);og(Tf);Hg.next=18;break;case 14:Hg.prev=14,Hg.t0=Hg.catch(0),console.error(Hg.t0),hf(Error((0,yb.t)("errors.imageInsertError")));case 18:return Hg.prev=18,nd||(0,Qa.z8)(Ea.interactiveCanvas),Hg.finish(18);case 21:case "end":return Hg.stop()}},th,null,[[0,14,18,21]])}));return function(og,hf){return Ze.apply(this,arguments)}}()));case 51:case "end":return nf.stop()}},zb,null,[[6,19],
[31,37]])}));return function(Qb){return sb.apply(this,arguments)}}();this.insertImageElement=function(){var sb=(0,xa.Z)(ua().mark(function Zb(Qb,zb,xb){return ua().wrap(function(qc){for(;;)switch(qc.prev=qc.next){case 0:return Ea.scene.addNewElement(Qb),qc.prev=1,qc.next=4,Ea.initializeImage({imageFile:zb,imageElement:Qb,showCursorImagePreview:xb});case 4:qc.next=11;break;case 6:qc.prev=6,qc.t0=qc.catch(1),(0,hb.DR)(Qb,{isDeleted:!0}),Ea.actionManager.executeAction(Ua.pL),Ea.setState({errorMessage:qc.t0.message||
(0,yb.t)("errors.imageInsertError")});case 11:case "end":return qc.stop()}},Zb,null,[[1,6]])}));return function(Qb,zb,xb){return sb.apply(this,arguments)}}();this.setImagePreviewCursor=function(){var sb=(0,xa.Z)(ua().mark(function zb(Qb){var xb,Zb,qc,Dc,Yc,ed,nd;return ua().wrap(function(Rd){for(;;)switch(Rd.prev=Rd.next){case 0:return xb=96,Rd.next=3,(0,Ab.Tu)(Qb,{maxWidthOrHeight:xb});case 3:return Zb=Rd.sent,Rd.next=6,(0,Ab.Sf)(Zb);case 6:if(qc=Rd.sent,Qb.type!==bb.LO.svg){Rd.next=20;break}return Rd.next=
10,(0,se.PK)(qc);case 10:Dc=Rd.sent,Yc=Math.min(Dc.height,xb),(ed=Dc.width/Dc.height*Yc)>xb&&(Yc=(ed=xb)*(Dc.height/Dc.width)),(nd=document.createElement("canvas")).height=Yc,nd.width=ed,nd.getContext("2d").drawImage(Dc,0,0,ed,Yc),qc=nd.toDataURL(bb.LO.svg);case 20:Ea.state.pendingImageElementId&&(0,Qa.KJ)(Ea.interactiveCanvas,"url(".concat(qc,") 4 4, auto"));case 21:case "end":return Rd.stop()}},zb)}));return function(Qb){return sb.apply(this,arguments)}}();this.onImageAction=(0,xa.Z)(ua().mark(function cc(){var Qb,
zb,xb,Zb,qc,Dc,Yc,ed,nd,Rd=arguments;return ua().wrap(function(ce){for(;;)switch(ce.prev=ce.next){case 0:return Qb=0<Rd.length&&void 0!==Rd[0]?Rd[0]:{insertOnCanvasDirectly:!1},zb=Qb.insertOnCanvasDirectly,ce.prev=1,xb=Ea.state.width/2+Ea.state.offsetLeft,Zb=Ea.state.height/2+Ea.state.offsetTop,qc=(0,Qa.dE)({clientX:xb,clientY:Zb},Ea.state),Dc=qc.x,Yc=qc.y,ce.next=7,(0,ec.I$)({description:"Image",extensions:Object.keys(bb.KL)});case 7:ed=ce.sent;nd=Ea.createImageElement({sceneX:Dc,sceneY:Yc});zb?
(Ea.insertImageElement(nd,ed),Ea.initializeImageDimensions(nd),Ea.setState({selectedElementIds:(0,sg.Oh)((0,la.Z)({},nd.id,!0),Ea.state)},function(){Ea.actionManager.executeAction(Ua.pL)})):Ea.setState({pendingImageElementId:nd.id},function(){Ea.insertImageElement(nd,ed,!0)});ce.next=16;break;case 12:ce.prev=12,ce.t0=ce.catch(1),"AbortError"!==ce.t0.name?console.error(ce.t0):console.warn(ce.t0),Ea.setState({pendingImageElementId:null,editingElement:null,activeTool:(0,Qa.Om)(Ea.state,{type:"selection"})},
function(){Ea.actionManager.executeAction(Ua.pL)});case 16:case "end":return ce.stop()}},cc,null,[[1,12]])}));this.initializeImageDimensions=function(cc){var Qb,zb=1<arguments.length&&void 0!==arguments[1]&&arguments[1],xb=(0,Ib.wi)(cc)&&(null===(Qb=Ea.imageCache.get(cc.fileId))||void 0===Qb?void 0:Qb.image);if(!xb||xb instanceof Promise)cc.width<bb.f/Ea.state.zoom.value&&cc.height<bb.f/Ea.state.zoom.value&&(xb=100/Ea.state.zoom.value,(0,hb.DR)(cc,{x:cc.x-xb/2,y:cc.y-xb/2,width:xb,height:xb}));else if(zb||
cc.width<bb.f/Ea.state.zoom.value&&cc.height<bb.f/Ea.state.zoom.value)Qb=Math.min(xb.naturalHeight,Math.min(Math.max(Ea.state.height-120,160),Math.floor(.5*Ea.state.height)/Ea.state.zoom.value)),xb=xb.naturalWidth/xb.naturalHeight*Qb,(0,hb.DR)(cc,{x:cc.x+cc.width/2-xb/2,y:cc.y+cc.height/2-Qb/2,width:xb,height:Qb})};this.updateImageCache=function(){var cc=(0,xa.Z)(ua().mark(function xb(zb){var Zb,qc,Dc,Yc,ed,nd,Rd,ce=arguments;return ua().wrap(function(Yd){for(;;)switch(Yd.prev=Yd.next){case 0:return Zb=
1<ce.length&&void 0!==ce[1]?ce[1]:Ea.files,Yd.next=3,(0,se.Xx)({imageCache:Ea.imageCache,fileIds:zb.map(function(Ne){return Ne.fileId}),files:Zb});case 3:if(qc=Yd.sent,Dc=qc.updatedFiles,Yc=qc.erroredFiles,Dc.size||Yc.size){ed=aa(zb);try{for(ed.s();!(nd=ed.n()).done;)Rd=nd.value,Dc.has(Rd.fileId)&&$i.R.delete(Rd)}catch(Ne){ed.e(Ne)}finally{ed.f()}}return Yc.size&&Ea.scene.replaceAllElements(Ea.scene.getElementsIncludingDeleted().map(function(Ne){return(0,Ib.wi)(Ne)&&Yc.has(Ne.fileId)?(0,hb.BE)(Ne,
{status:"error"}):Ne})),Yd.abrupt("return",{updatedFiles:Dc,erroredFiles:Yc});case 9:case "end":return Yd.stop()}},xb)}));return function(zb){return cc.apply(this,arguments)}}();this.addNewImagesToImageCache=(0,xa.Z)(ua().mark(function Qb(){var zb,xb,Zb,qc,Dc=arguments;return ua().wrap(function(Yc){for(;;)switch(Yc.prev=Yc.next){case 0:if(zb=0<Dc.length&&void 0!==Dc[0]?Dc[0]:(0,se.oA)(Ea.scene.getNonDeletedElements()),xb=1<Dc.length&&void 0!==Dc[1]?Dc[1]:Ea.files,!(Zb=zb.filter(function(ed){return!ed.isDeleted&&
!Ea.imageCache.has(ed.fileId)})).length){Yc.next=9;break}return Yc.next=6,Ea.updateImageCache(Zb,xb);case 6:qc=Yc.sent,qc.updatedFiles.size&&Ea.scene.informMutation();case 9:case "end":return Yc.stop()}},Qb)}));this.scheduleImageRefresh=Se()(function(){Ea.addNewImagesToImageCache()},bb.LL);this.updateBindingEnabledOnPointerMove=function(Qb){Qb=(0,ab.cz)(Qb);Ea.state.isBindingEnabled!==Qb&&Ea.setState({isBindingEnabled:Qb})};this.maybeSuggestBindingAtCursor=function(Qb){Qb=(0,ab.Y9)(Qb,Ea.scene);Ea.setState({suggestedBindings:null!=
Qb?[Qb]:[]})};this.maybeSuggestBindingsForLinearElementAtCoords=function(Qb,zb,xb){zb.length&&(zb=zb.reduce(function(Zb,qc){qc=(0,ab.Y9)(qc,Ea.scene);return null==qc||(0,ab.DK)(Qb,null==xb?void 0:xb.id,qc)||Zb.push(qc),Zb},[]),Ea.setState({suggestedBindings:zb}))};this.handleInteractiveCanvasRef=function(Qb){var zb,xb,Zb;null!==Qb?(Ea.interactiveCanvas=Qb,Ea.interactiveCanvas.addEventListener(bb.Ks.WHEEL,Ea.handleWheel),Ea.interactiveCanvas.addEventListener(bb.Ks.TOUCH_START,Ea.onTouchStart),Ea.interactiveCanvas.addEventListener(bb.Ks.TOUCH_END,
Ea.onTouchEnd)):(null===(zb=Ea.interactiveCanvas)||void 0===zb||zb.removeEventListener(bb.Ks.WHEEL,Ea.handleWheel),null===(xb=Ea.interactiveCanvas)||void 0===xb||xb.removeEventListener(bb.Ks.TOUCH_START,Ea.onTouchStart),null===(Zb=Ea.interactiveCanvas)||void 0===Zb||Zb.removeEventListener(bb.Ks.TOUCH_END,Ea.onTouchEnd))};this.handleAppOnDrop=function(){var Qb=(0,xa.Z)(ua().mark(function Zb(xb){var qc,Dc,Yc,ed,nd,Rd,ce,Yd,Ne,ag,pg,Gf,Tf,nf,Ze,xg;return ua().wrap(function(og){for(;;)switch(og.prev=
og.next){case 0:return og.next=2,(0,Ab.bv)(xb);case 2:if(Yc=og.sent,ed=Yc.file,nd=Yc.fileHandle,Rd=(0,Qa.dE)(xb,Ea.state),ce=Rd.x,Yd=Rd.y,og.prev=6,!(0,Ab.Wr)(ed)){og.next=26;break}if((null==ed?void 0:ed.type)!==bb.LO.png&&(null==ed?void 0:ed.type)!==bb.LO.svg){og.next=21;break}return og.prev=9,og.next=12,(0,Nc.cT)(ed,Ea.state,Ea.scene.getElementsIncludingDeleted(),nd);case 12:return Ne=og.sent,Ea.syncActionResult(ea(ea({},Ne),{},{appState:ea(ea({},Ne.appState||Ea.state),{},{isLoading:!1}),replaceFiles:!0,
commitToHistory:!0})),og.abrupt("return");case 17:if(og.prev=17,og.t0=og.catch(9),"EncodingError"===og.t0.name){og.next=21;break}throw og.t0;case 21:return ag=Ea.createImageElement({sceneX:ce,sceneY:Yd}),Ea.insertImageElement(ag,ed),Ea.initializeImageDimensions(ag),Ea.setState({selectedElementIds:(0,sg.Oh)((0,la.Z)({},ag.id,!0),Ea.state)}),og.abrupt("return");case 26:og.next=31;break;case 28:return og.prev=28,og.t1=og.catch(6),og.abrupt("return",Ea.setState({isLoading:!1,errorMessage:og.t1.message}));
case 31:if(!(pg=xb.dataTransfer.getData(bb.LO.excalidrawlib))||"string"!=typeof pg){og.next=35;break}try{Gf=(0,Ab.wf)(pg),Ea.addElementsFromPasteOrLibrary({elements:(0,Qc.WV)(Gf),position:xb,files:null})}catch(hf){Ea.setState({errorMessage:hf.message})}return og.abrupt("return");case 35:if(!ed){og.next=38;break}return og.next=38,Ea.loadFileToCanvas(ed,nd);case 38:null!==(qc=xb.dataTransfer)&&void 0!==qc&&null!==(Dc=qc.types)&&void 0!==Dc&&Dc.includes("text/plain")&&(Ze=null===(Tf=xb.dataTransfer)||
void 0===Tf?void 0:Tf.getData("text"))&&(0,Rc.xm)(Ze,Ea.props.validateEmbeddable)&&(/^(http|https):\/\/[^\s/$.?#].[^\s]*$/.test(Ze)||"video"===(null===(nf=(0,Rc.LM)(Ze))||void 0===nf?void 0:nf.type))&&(xg=Ea.insertEmbeddableElement({sceneX:ce,sceneY:Yd,link:(0,ne.$u)(Ze)}))&&Ea.setState({selectedElementIds:(0,la.Z)({},xg.id,!0)});case 39:case "end":return og.stop()}},Zb,null,[[6,28],[9,17]])}));return function(xb){return Qb.apply(this,arguments)}}();this.loadFileToCanvas=function(){var Qb=(0,xa.Z)(ua().mark(function qc(xb,
Zb){var Dc;return ua().wrap(function(Yc){for(;;)switch(Yc.prev=Yc.next){case 0:return Yc.next=2,(0,Ab.gY)(xb);case 2:return xb=Yc.sent,Yc.prev=3,Yc.next=6,(0,Ab.ZY)(xb,Ea.state,Ea.scene.getElementsIncludingDeleted(),Zb);case 6:if((Dc=Yc.sent).type!==bb.LO.excalidraw){Yc.next=12;break}Ea.setState({isLoading:!0});Ea.syncActionResult(ea(ea({},Dc.data),{},{appState:ea(ea({},Dc.data.appState||Ea.state),{},{isLoading:!1}),replaceFiles:!0,commitToHistory:!0}));Yc.next=15;break;case 12:if(Dc.type!==bb.LO.excalidrawlib){Yc.next=
15;break}return Yc.next=15,Ea.library.updateLibrary({libraryItems:xb,merge:!0,openLibraryMenu:!0}).catch(function(ed){console.error(ed);Ea.setState({errorMessage:(0,yb.t)("errors.importLibraryError")})});case 15:Yc.next=20;break;case 17:Yc.prev=17,Yc.t0=Yc.catch(3),Ea.setState({isLoading:!1,errorMessage:Yc.t0.message});case 20:case "end":return Yc.stop()}},qc,null,[[3,17]])}));return function(xb,Zb){return Qb.apply(this,arguments)}}();this.handleCanvasContextMenu=function(Qb){if(Qb.preventDefault(),
!("pointerType"in Qb.nativeEvent&&"touch"===Qb.nativeEvent.pointerType||"pointerType"in Qb.nativeEvent&&"pen"===Qb.nativeEvent.pointerType&&Qb.button!==bb.Oh.SECONDARY)||"selection"===Ea.state.activeTool.type){var zb=(0,Qa.dE)(Qb,Ea.state),xb=zb.x,Zb=zb.y;zb=Ea.getElementAtPosition(xb,Zb,{preferSelected:!0,includeLockedElements:!0});var qc=Ea.scene.getSelectedElements(Ea.state);xb=Ea.isHittingCommonBoundingBoxOfSelectedElements({x:xb,y:Zb},qc);var Dc=zb||xb?"element":"canvas";xb=Ea.excalidrawContainerRef.current.getBoundingClientRect();
var Yc=Qb.clientX-xb.left,ed=Qb.clientY-xb.top;(0,xc.L)("contextMenu","openContextMenu",Dc);Ea.setState(ea(ea({},zb&&!Ea.state.selectedElementIds[zb.id]?ea(ea(ea({},Ea.state),(0,db.bO)({editingGroupId:Ea.state.editingGroupId,selectedElementIds:(0,la.Z)({},zb.id,!0)},Ea.scene.getNonDeletedElements(),Ea.state,Ea)),{},{selectedLinearElement:(0,Ib.bt)(zb)?new sc._(zb,Ea.scene):null}):Ea.state),{},{showHyperlinkPopup:!1}),function(){Ea.setState({contextMenu:{top:ed,left:Yc,items:Ea.getContextMenuItems(Dc)}})})}};
this.maybeDragNewGenericElement=function(Qb,zb){var xb=Ea.state.draggingElement,Zb=Qb.lastCoords;if(xb)if("selection"===xb.type&&"eraser"!==Ea.state.activeTool.type)(0,Xc.EJ)(xb,Ea.state.activeTool.type,Qb.origin.x,Qb.origin.y,Zb.x,Zb.y,(0,Qa.TE)(Qb.origin.x,Zb.x),(0,Qa.TE)(Qb.origin.y,Zb.y),(0,Wa.E0)(zb),(0,Wa.OA)(zb));else{var qc;Zb=(0,fc.wC)(Zb.x,Zb.y,zb[Wa.tW.CTRL_OR_CMD]?null:Ea.state.gridSize);var Dc=(0,va.Z)(Zb,2);Zb=Dc[0];Dc=Dc[1];var Yc=(0,Ib.wi)(xb)&&(null===(qc=Ea.imageCache.get(xb.fileId))||
void 0===qc?void 0:qc.image);qc=!Yc||Yc instanceof Promise?null:Yc.width/Yc.height;(0,Xc.EJ)(xb,Ea.state.activeTool.type,Qb.originInGrid.x,Qb.originInGrid.y,Zb,Dc,(0,Qa.TE)(Qb.originInGrid.x,Zb),(0,Qa.TE)(Qb.originInGrid.y,Dc),(0,Ib.pC)(xb)?!(0,Wa.E0)(zb):(0,Wa.E0)(zb),(0,Wa.OA)(zb),qc);Ea.maybeSuggestBindingForAll([xb]);"frame"===Ea.state.activeTool.type&&Ea.setState({elementsToHighlight:(0,rf.ni)(Ea.scene.getNonDeletedElements(),xb,Ea.state)})}};this.maybeHandleResize=function(Qb,zb){var xb=Ea.scene.getSelectedElements(Ea.state),
Zb=xb.filter(function(Rd){return"frame"===Rd.type}),qc=Qb.resize.handleType;if(0<Zb.length&&"rotation"===qc)return!1;Ea.setState({isResizing:qc&&"rotation"!==qc,isRotating:"rotation"===qc,activeEmbeddable:null});var Dc=Qb.lastCoords;Dc=(0,fc.wC)(Dc.x-Qb.resize.offset.x,Dc.y-Qb.resize.offset.y,zb[Wa.tW.CTRL_OR_CMD]?null:Ea.state.gridSize);var Yc=(0,va.Z)(Dc,2);Dc=Yc[0];Yc=Yc[1];var ed=new Map;if(Zb.forEach(function(Rd){(0,rf.wO)(Ea.scene.getNonDeletedElements(),Rd.id).forEach(function(ce){ed.set(Rd.id+
ce.id,{x:ce.x-Rd.x,y:ce.y-Rd.y})})}),(0,Xc.vY)(Qb,qc,xb,Qb.resize.arrowDirection,(0,Wa.Ge)(zb),(0,Wa.OA)(zb),1===xb.length&&(0,Ib.pC)(xb[0])?!(0,Wa.E0)(zb):(0,Wa.E0)(zb),Dc,Yc,Qb.resize.center.x,Qb.resize.center.y)){Ea.maybeSuggestBindingForAll(xb);var nd=new Set;return Zb.forEach(function(Rd){var ce=(0,rf.wO)(Ea.scene.getNonDeletedElements(),Rd.id);qc&&(qc.includes("w")&&ce.forEach(function(Yd){var Ne,ag;(0,hb.DR)(Yd,{x:Rd.x+((null===(Ne=ed.get(Rd.id+Yd.id))||void 0===Ne?void 0:Ne.x)||0),y:Rd.y+
((null===(ag=ed.get(Rd.id+Yd.id))||void 0===ag?void 0:ag.y)||0)})}),qc.includes("n")&&ce.forEach(function(Yd){var Ne,ag;(0,hb.DR)(Yd,{x:Rd.x+((null===(Ne=ed.get(Rd.id+Yd.id))||void 0===Ne?void 0:Ne.x)||0),y:Rd.y+((null===(ag=ed.get(Rd.id+Yd.id))||void 0===ag?void 0:ag.y)||0)})}));(0,rf.ni)(Ea.scene.getNonDeletedElements(),Rd,Ea.state).forEach(function(Yd){return nd.add(Yd)})}),Ea.setState({elementsToHighlight:(0,ta.Z)(nd)}),!0}return!1};this.getContextMenuItems=function(Qb){var zb=[];return zb.push(Ua.jK,
Ua.FA),"canvas"===Qb?Ea.state.viewModeEnabled?[].concat(zb,[Ua.Pb,Ua.JN,ie,Ua.u0]):[Jg.yQ,"separator",Ua.jK,Ua.FA,Ua.zp,"separator",Ua.Yy,ee.U,"separator",Ua.Pb,Ua.JN,ie,Ua.u0]:(zb.push(Ua.zp),Ea.state.viewModeEnabled?[Ua.uN].concat(zb):[Ua.ZM,Ua.uN,Jg.yQ,Oe,Wf,"separator"].concat(zb,["separator",Ua.pw,Ua.W3,"separator",Ua.EQ,Ua.y7,Ua.vD,$g.JQ,Ua.s,"separator",Ua.FL,"separator",Ua.V,Ua.yA,Ua.zi,Ua.BZ,"separator",Ua.jl,Ua.kt,"separator",Ua.Qs,Ua.nz,Ua.xF,Ua.$h,"separator",Ua.X9]))};this.handleWheel=
(0,Qa.tH)(function(Qb){if(Qb.preventDefault(),!xk){var zb=Qb.deltaX,xb=Qb.deltaY;if(Qb.metaKey||Qb.ctrlKey){Qb=Math.sign(xb);var Zb=100*bb.V4,qc=Math.abs(xb),Dc=xb;qc>Zb&&(Dc=Zb*Qb);var Yc=Ea.state.zoom.value-Dc/100;return Yc+=Math.log10(Math.max(1,Ea.state.zoom.value))*-Qb*Math.min(1,qc/20),Ea.translateCanvas(function(ed){return ea(ea({},(0,ic.E)({viewportX:Ea.lastViewportPosition.x,viewportY:Ea.lastViewportPosition.y,nextZoom:(0,Bc.j)(Yc)},ed)),{},{shouldCacheIgnoreZoom:!0})}),void Ea.resetShouldCacheIgnoreZoomDebounced()}Qb.shiftKey?
Ea.translateCanvas(function(ed){return{scrollX:ed.scrollX-(xb||zb)/ed.zoom.value}}):Ea.translateCanvas(function(ed){var nd=ed.zoom;return{scrollX:ed.scrollX-zb/nd.value,scrollY:ed.scrollY-xb/nd.value}})}});this.savePointer=function(Qb,zb,xb){var Zb,qc;Qb&&zb&&(Qb=(0,Qa.dE)({clientX:Qb,clientY:zb},Ea.state),isNaN(Qb.x)||isNaN(Qb.y),null===(Zb=(qc=Ea.props).onPointerUpdate)||void 0===Zb||Zb.call(qc,{pointer:Qb,button:xb,pointersMap:dj}))};this.resetShouldCacheIgnoreZoomDebounced=(0,Qa.Ds)(function(){Ea.unmounted||
Ea.setState({shouldCacheIgnoreZoom:!1})},300);this.updateDOMRect=function(Qb){var zb;if(null!==(zb=Ea.excalidrawContainerRef)&&void 0!==zb&&zb.current){var xb=Ea.excalidrawContainerRef.current.getBoundingClientRect();zb=xb.width;var Zb=xb.height,qc=xb.left;xb=xb.top;var Dc=Ea.state,Yc=Dc.height,ed=Dc.offsetTop,nd=Dc.offsetLeft;if(zb===Dc.width&&Zb===Yc&&qc===nd&&xb===ed)return void(Qb&&Qb());Ea.setState({width:zb,height:Zb,offsetLeft:qc,offsetTop:xb},function(){Qb&&Qb()})}};this.refresh=function(){Ea.setState(ea({},
Ea.getCanvasOffsets()))}};"production"===bb.Vi.TEST&&(window.h=window.h||{},Object.defineProperties(window.h,{elements:{configurable:!0,get:function(){var Ea;return null===(Ea=this.app)||void 0===Ea?void 0:Ea.scene.getElementsIncludingDeleted()},set:function(Ea){var $b;return null===($b=this.app)||void 0===$b?void 0:$b.scene.replaceAllElements(Ea)}}}));var gp=Hm},3589:function(g,h,b){function l(T,R){var G=Object.keys(T);if(Object.getOwnPropertySymbols){var F=Object.getOwnPropertySymbols(T);R&&(F=
F.filter(function(O){return Object.getOwnPropertyDescriptor(T,O).enumerable}));G.push.apply(G,F)}return G}function m(T){for(var R=1;R<arguments.length;R++){var G=null!=arguments[R]?arguments[R]:{};R%2?l(Object(G),!0).forEach(function(F){(0,p.Z)(T,F,G[F])}):Object.getOwnPropertyDescriptors?Object.defineProperties(T,Object.getOwnPropertyDescriptors(G)):l(Object(G)).forEach(function(F){Object.defineProperty(T,F,Object.getOwnPropertyDescriptor(G,F))})}return T}b.d(h,{z:function(){return L}});var p=b(7169),
D=b(2726),v=b(45),t=b(7135);g=b(3379);g=b.n(g);h=b(7795);h=b.n(h);var r=b(569);r=b.n(r);var f=b(3565);f=b.n(f);var E=b(9216);E=b.n(E);var B=b(4589);B=b.n(B);var J=b(3137),V={};V.styleTagTransform=B();V.setAttributes=f();V.insert=r().bind(null,"head");V.domAPI=h();V.insertStyleElement=E();g()(J.Z,V);J.Z&&J.Z.locals&&J.Z.locals;var H=b(4512),S=["type","onSelect","selected","children","className"],L=function(T){var R=T.type;R=void 0===R?"button":R;var G=T.onSelect,F=T.selected,O=T.children,M=T.className;
M=void 0===M?"":M;T=(0,D.Z)(T,S);return(0,H.jsx)("button",m(m({onClick:(0,t.Mj)(T.onClick,function(I){G()}),type:R,className:(0,v.Z)("excalidraw-button",M,{selected:F})},T),{},{children:O}))}},4646:function(g,h,b){b.d(h,{o:function(){return B}});var l=b(45),m=b(1119);g=b(3379);g=b.n(g);h=b(7795);h=b.n(h);var p=b(569);p=b.n(p);var D=b(3565);D=b.n(D);var v=b(9216);v=b.n(v);var t=b(4589);t=b.n(t);var r=b(6029),f={};f.styleTagTransform=t();f.setAttributes=D();f.insert=p().bind(null,"head");f.domAPI=h();
f.insertStyleElement=v();g()(r.Z,f);r.Z&&r.Z.locals&&r.Z.locals;var E=b(4512),B=function(J){var V=J.children,H=J.checked,S=J.onChange;return(0,E.jsxs)("div",{className:(0,l.Z)("Checkbox",J.className,{"is-checked":H}),onClick:function(L){S(!H,L);L.currentTarget.querySelector(".Checkbox-box").focus()},children:[(0,E.jsx)("button",{className:"Checkbox-box",role:"checkbox","aria-checked":H,children:m.eQ}),(0,E.jsx)("div",{className:"Checkbox-label",children:V})]})}},6310:function(g,h,b){function l(){const pb=
new CustomEvent("dismissableLayer.update");document.dispatchEvent(pb)}function m(pb,mc,yc,{discrete:Tc}){const $c=yc.originalEvent.target;yc=new CustomEvent(pb,{bubbles:!1,cancelable:!0,detail:yc});mc&&$c.addEventListener(pb,mc,{once:!0});Tc?(0,ic.jH)($c,yc):$c.dispatchEvent(yc)}function p(){(0,Lb.useEffect)(()=>{var pb,mc;const yc=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",null!==(pb=yc[0])&&void 0!==pb?pb:D()),document.body.insertAdjacentElement("beforeend",
null!==(mc=yc[1])&&void 0!==mc?mc:D()),Ic++,()=>{1===Ic&&document.querySelectorAll("[data-radix-focus-guard]").forEach(Tc=>Tc.remove());Ic--}},[])}function D(){const pb=document.createElement("span");return pb.setAttribute("data-radix-focus-guard",""),pb.tabIndex=0,pb.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",pb}function v(pb){const mc=[];for(pb=document.createTreeWalker(pb,NodeFilter.SHOW_ELEMENT,{acceptNode:yc=>{const Tc="INPUT"===yc.tagName&&"hidden"===yc.type;
return yc.disabled||yc.hidden||Tc?NodeFilter.FILTER_SKIP:0<=yc.tabIndex?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});pb.nextNode();)mc.push(pb.currentNode);return mc}function t(pb,mc){for(const yc of pb)if(!r(yc,{upTo:mc}))return yc}function r(pb,{upTo:mc}){if("hidden"===getComputedStyle(pb).visibility)return!0;for(;pb&&(void 0===mc||pb!==mc);){if("none"===getComputedStyle(pb).display)return!0;pb=pb.parentElement}return!1}function f(pb,{select:mc=!1}={}){if(pb&&pb.focus){const yc=document.activeElement;
pb.focus({preventScroll:!0});pb!==yc&&pb instanceof HTMLInputElement&&"select"in pb&&mc&&pb.select()}}function E(pb,mc){pb=[...pb];mc=pb.indexOf(mc);return-1!==mc&&pb.splice(mc,1),pb}function B(pb){return pb.split("-")[0]}function J(pb){return["top","bottom"].includes(B(pb))?"x":"y"}function V(pb){return"y"===pb?"height":"width"}function H(pb,mc,yc){let {reference:Tc,floating:$c}=pb;var ld=Tc.x+Tc.width/2-$c.width/2;const Ed=Tc.y+Tc.height/2-$c.height/2;pb=J(mc);var Xd=V(pb);Xd=Tc[Xd]/2-$c[Xd]/2;
const oe="x"===pb;switch(B(mc)){case "top":ld={x:ld,y:Tc.y-$c.height};break;case "bottom":ld={x:ld,y:Tc.y+Tc.height};break;case "right":ld={x:Tc.x+Tc.width,y:Ed};break;case "left":ld={x:Tc.x-$c.width,y:Ed};break;default:ld={x:Tc.x,y:Tc.y}}switch(mc.split("-")[1]){case "start":ld[pb]-=Xd*(yc&&oe?-1:1);break;case "end":ld[pb]+=Xd*(yc&&oe?-1:1)}return ld}function S(pb){return"number"!=typeof pb?{top:0,right:0,bottom:0,left:0,...pb}:{top:pb,right:pb,bottom:pb,left:pb}}function L(pb){return{...pb,top:pb.y,
left:pb.x,right:pb.x+pb.width,bottom:pb.y+pb.height}}async function T(pb,mc){var yc;void 0===mc&&(mc={});const {x:Tc,y:$c,platform:ld,rects:Ed,elements:Xd,strategy:oe}=pb,{boundary:ye="clippingAncestors",rootBoundary:ie="viewport",elementContext:se="floating",altBoundary:Ke=!1,padding:Se=0}=mc;pb=S(Se);const Nd=Xd[Ke?"floating"===se?"reference":"floating":se];mc=L(await ld.getClippingRect({element:null==(yc=await (null==ld.isElement?void 0:ld.isElement(Nd)))||yc?Nd:Nd.contextElement||await (null==
ld.getDocumentElement?void 0:ld.getDocumentElement(Xd.floating)),boundary:ye,rootBoundary:ie,strategy:oe}));yc=L(ld.convertOffsetParentRelativeRectToViewportRelativeRect?await ld.convertOffsetParentRelativeRectToViewportRelativeRect({rect:"floating"===se?{...Ed.floating,x:Tc,y:$c}:Ed.reference,offsetParent:await (null==ld.getOffsetParent?void 0:ld.getOffsetParent(Xd.floating)),strategy:oe}):Ed[se]);return{top:mc.top-yc.top+pb.top,bottom:yc.bottom-mc.bottom+pb.bottom,left:mc.left-yc.left+pb.left,right:yc.right-
mc.right+pb.right}}function R(pb){return pb.replace(/left|right|bottom|top/g,mc=>Bf[mc])}function G(pb,mc,yc){void 0===yc&&(yc=!1);const Tc=pb.split("-")[1],$c=J(pb);pb=V($c);yc="x"===$c?Tc===(yc?"end":"start")?"right":"left":"start"===Tc?"bottom":"top";return mc.reference[pb]>mc.floating[pb]&&(yc=R(yc)),{main:yc,cross:R(yc)}}function F(pb){return pb.replace(/start|end/g,mc=>gg[mc])}function O(pb,mc){return{top:pb.top-mc.height,right:pb.right-mc.width,bottom:pb.bottom-mc.height,left:pb.left-mc.width}}
function M(pb){return jc.some(mc=>0<=pb[mc])}function I(pb){return null==pb?window:pb&&pb.document&&pb.location&&pb.alert&&pb.setInterval?pb:(pb=pb.ownerDocument)&&pb.defaultView||window}function ia(pb){return I(pb).getComputedStyle(pb)}function U(pb){return pb&&pb.document&&pb.location&&pb.alert&&pb.setInterval?"":pb?(pb.nodeName||"").toLowerCase():""}function Z(){const pb=navigator.userAgentData;return null!=pb&&pb.brands?pb.brands.map(mc=>mc.brand+"/"+mc.version).join(" "):navigator.userAgent}
function aa(pb){return pb instanceof I(pb).HTMLElement}function W(pb){return pb instanceof I(pb).Element}function fa(pb){return"undefined"!=typeof ShadowRoot&&(pb instanceof I(pb).ShadowRoot||pb instanceof ShadowRoot)}function X(pb){const {overflow:mc,overflowX:yc,overflowY:Tc}=ia(pb);return/auto|scroll|overlay|hidden/.test(mc+Tc+yc)}function ea(pb){const mc=/firefox/i.test(Z());pb=ia(pb);return"none"!==pb.transform||"none"!==pb.perspective||"paint"===pb.contain||["transform","perspective"].includes(pb.willChange)||
mc&&"filter"===pb.willChange||mc&&!!pb.filter&&"none"!==pb.filter}function pa(){return!/^((?!chrome|android).)*safari/i.test(Z())}function va(pb,mc,yc){var Tc,$c,ld,Ed;void 0===mc&&(mc=!1);void 0===yc&&(yc=!1);var Xd=pb.getBoundingClientRect();let oe=1,ye=1;mc&&aa(pb)&&(oe=0<pb.offsetWidth&&Ue(Xd.width)/pb.offsetWidth||1,ye=0<pb.offsetHeight&&Ue(Xd.height)/pb.offsetHeight||1);pb=W(pb)?I(pb):window;mc=!pa()&&yc;yc=(Xd.left+(mc&&null!=(Tc=null==($c=pb.visualViewport)?void 0:$c.offsetLeft)?Tc:0))/oe;
Tc=(Xd.top+(mc&&null!=(ld=null==(Ed=pb.visualViewport)?void 0:Ed.offsetTop)?ld:0))/ye;ld=Xd.width/oe;Xd=Xd.height/ye;return{width:ld,height:Xd,top:Tc,right:yc+ld,bottom:Tc+Xd,left:yc,x:yc,y:Tc}}function ta(pb){return(mc=pb,(mc instanceof I(mc).Node?pb.ownerDocument:pb.document)||window.document).documentElement;var mc}function xa(pb){return W(pb)?{scrollLeft:pb.scrollLeft,scrollTop:pb.scrollTop}:{scrollLeft:pb.pageXOffset,scrollTop:pb.pageYOffset}}function Ga(pb){return va(ta(pb)).left+xa(pb).scrollLeft}
function Ia(pb){return"html"===U(pb)?pb:pb.assignedSlot||pb.parentNode||(fa(pb)?pb.host:null)||ta(pb)}function Ya(pb){return aa(pb)&&"fixed"!==getComputedStyle(pb).position?pb.offsetParent:null}function Fa(pb){for(var mc=I(pb),yc=Ya(pb);yc&&["table","td","th"].includes(U(yc))&&"static"===getComputedStyle(yc).position;)yc=Ya(yc);if(!yc||"html"!==U(yc)&&("body"!==U(yc)||"static"!==getComputedStyle(yc).position||ea(yc))){if(!yc)a:{pb=Ia(pb);for(fa(pb)&&(pb=pb.host);aa(pb)&&!["html","body"].includes(U(pb));){if(ea(pb)){yc=
pb;break a}pb=pb.parentNode}yc=null}mc=yc||mc}return mc}function Ka(pb){if(aa(pb))return{width:pb.offsetWidth,height:pb.offsetHeight};pb=va(pb);return{width:pb.width,height:pb.height}}function Ba(pb){const mc=Ia(pb);return["html","body","#document"].includes(U(mc))?pb.ownerDocument.body:aa(mc)&&X(mc)?mc:Ba(mc)}function la(pb,mc){var yc;void 0===mc&&(mc=[]);var Tc=Ba(pb);pb=Tc===(null==(yc=pb.ownerDocument)?void 0:yc.body);yc=I(Tc);Tc=pb?[yc].concat(yc.visualViewport||[],X(Tc)?Tc:[]):Tc;mc=mc.concat(Tc);
return pb?mc:mc.concat(la(Tc))}function ka(pb,mc,yc){return"viewport"===mc?L(function(Tc,$c){var ld=I(Tc),Ed=ta(Tc);ld=ld.visualViewport;Tc=Ed.clientWidth;Ed=Ed.clientHeight;let Xd=0,oe=0;if(ld){Tc=ld.width;Ed=ld.height;const ye=pa();(ye||!ye&&"fixed"===$c)&&(Xd=ld.offsetLeft,oe=ld.offsetTop)}return{width:Tc,height:Ed,x:Xd,y:oe}}(pb,yc)):W(mc)?function(Tc,$c){var ld=va(Tc,!1,"fixed"===$c);$c=ld.top+Tc.clientTop;ld=ld.left+Tc.clientLeft;return{top:$c,left:ld,x:ld,y:$c,right:ld+Tc.clientWidth,bottom:$c+
Tc.clientHeight,width:Tc.clientWidth,height:Tc.clientHeight}}(mc,yc):L(function(Tc){var $c;const ld=ta(Tc);var Ed=xa(Tc);const Xd=null==($c=Tc.ownerDocument)?void 0:$c.body;$c=Td(ld.scrollWidth,ld.clientWidth,Xd?Xd.scrollWidth:0,Xd?Xd.clientWidth:0);const oe=Td(ld.scrollHeight,ld.clientHeight,Xd?Xd.scrollHeight:0,Xd?Xd.clientHeight:0);Tc=-Ed.scrollLeft+Ga(Tc);Ed=-Ed.scrollTop;return"rtl"===ia(Xd||ld).direction&&(Tc+=Td(ld.clientWidth,Xd?Xd.clientWidth:0)-$c),{width:$c,height:oe,x:Tc,y:Ed}}(ta(pb)))}
function ua(pb){const mc=la(pb),yc=["absolute","fixed"].includes(ia(pb).position)&&aa(pb)?Fa(pb):pb;return W(yc)?mc.filter(Tc=>{var $c;if($c=W(Tc))a:if($c=null==yc.getRootNode?void 0:yc.getRootNode(),Tc.contains(yc))$c=!0;else{if($c&&fa($c)){$c=yc;do{if($c&&Tc===$c){$c=!0;break a}$c=$c.parentNode||$c.host}while($c)}$c=!1}return $c&&"body"!==U(Tc)}):[]}function na(pb,mc,yc,Tc){void 0===Tc&&(Tc={});const {ancestorScroll:$c=!0,ancestorResize:ld=!0,elementResize:Ed=!0,animationFrame:Xd=!1}=Tc,oe=$c&&
!Xd,ye=ld&&!Xd,ie=oe||ye?[...(W(pb)?la(pb):[]),...la(mc)]:[];ie.forEach(Nd=>{oe&&Nd.addEventListener("scroll",yc,{passive:!0});ye&&Nd.addEventListener("resize",yc)});let se,Ke=null;if(Ed){let Nd=!0;Ke=new ResizeObserver(()=>{Nd||yc();Nd=!1});W(pb)&&!Xd&&Ke.observe(pb);Ke.observe(mc)}let Se=Xd?va(pb):null;return Xd&&function Le(){const ne=va(pb);!Se||ne.x===Se.x&&ne.y===Se.y&&ne.width===Se.width&&ne.height===Se.height||yc();Se=ne;se=requestAnimationFrame(Le)}(),yc(),()=>{var Le;ie.forEach(ne=>{oe&&
ne.removeEventListener("scroll",yc);ye&&ne.removeEventListener("resize",yc)});null==(Le=Ke)||Le.disconnect();Ke=null;Xd&&cancelAnimationFrame(se)}}function oa(pb,mc){if(pb===mc)return!0;if(typeof pb!=typeof mc)return!1;if("function"==typeof pb&&pb.toString()===mc.toString())return!0;var yc;let Tc,$c;if(pb&&mc&&"object"==typeof pb){if(Array.isArray(pb)){if(yc=pb.length,yc!=mc.length)return!1;for(Tc=yc;0!=Tc--;)if(!oa(pb[Tc],mc[Tc]))return!1;return!0}if($c=Object.keys(pb),yc=$c.length,yc!==Object.keys(mc).length)return!1;
for(Tc=yc;0!=Tc--;)if(!Object.prototype.hasOwnProperty.call(mc,$c[Tc]))return!1;for(Tc=yc;0!=Tc--;)if(yc=$c[Tc],!("_owner"===yc&&pb.$$typeof||oa(pb[yc],mc[yc])))return!1;return!0}return pb!=pb&&mc!=mc}function La(pb){let {middleware:mc,placement:yc="bottom",strategy:Tc="absolute",whileElementsMounted:$c}=void 0===pb?{}:pb;const ld=Lb.useRef(null),Ed=Lb.useRef(null),Xd=function(Qe){const rf=Lb.useRef(Qe);return Tb(()=>{rf.current=Qe}),rf}($c),oe=Lb.useRef(null),[ye,ie]=Lb.useState({x:null,y:null,strategy:Tc,
placement:yc,middlewareData:{}}),[se,Ke]=Lb.useState(mc);oa(null==se?void 0:se.map(Qe=>{({options:Qe}=Qe);return Qe}),null==mc?void 0:mc.map(Qe=>{({options:Qe}=Qe);return Qe}))||Ke(mc);const Se=Lb.useCallback(()=>{ld.current&&Ed.current&&tb(ld.current,Ed.current,{middleware:se,placement:yc,strategy:Tc}).then(Qe=>{Nd.current&&ob.flushSync(()=>{ie(Qe)})})},[se,yc,Tc]);Tb(()=>{Nd.current&&Se()},[Se]);const Nd=Lb.useRef(!1);Tb(()=>(Nd.current=!0,()=>{Nd.current=!1}),[]);const Le=Lb.useCallback(()=>{if("function"==
typeof oe.current&&(oe.current(),oe.current=null),ld.current&&Ed.current)if(Xd.current){const Qe=Xd.current(ld.current,Ed.current,Se);oe.current=Qe}else Se()},[Se,Xd]),ne=Lb.useCallback(Qe=>{ld.current=Qe;Le()},[Le]),Qf=Lb.useCallback(Qe=>{Ed.current=Qe;Le()},[Le]),ee=Lb.useMemo(()=>({reference:ld,floating:Ed}),[]);return Lb.useMemo(()=>({...ye,update:Se,refs:ee,reference:ne,floating:Qf}),[ye,Se,ee,ne,Qf])}function Oa(pb){return void 0!==pb}function Va(pb){return null!==pb}function Ma(pb){const [mc,
yc="center"]=pb.split("-");return[mc,yc]}function Ua(pb,mc){var yc={},Tc;for(Tc in pb)Object.prototype.hasOwnProperty.call(pb,Tc)&&0>mc.indexOf(Tc)&&(yc[Tc]=pb[Tc]);if(null!=pb&&"function"==typeof Object.getOwnPropertySymbols){var $c=0;for(Tc=Object.getOwnPropertySymbols(pb);$c<Tc.length;$c++)0>mc.indexOf(Tc[$c])&&Object.prototype.propertyIsEnumerable.call(pb,Tc[$c])&&(yc[Tc[$c]]=pb[Tc[$c]])}return yc}function ib(pb,mc){return yc=mc||null,Tc=function(ld){return pb.forEach(function(Ed){return"function"==
typeof Ed?Ed(ld):Ed&&(Ed.current=ld),Ed})},($c=(0,Lb.useState)(function(){return{value:yc,callback:Tc,facade:{get current(){return $c.value},set current(ld){var Ed=$c.value;Ed!==ld&&($c.value=ld,$c.callback(ld,Ed))}}}})[0]).callback=Tc,$c.facade;var yc,Tc,$c}function vb(pb){return pb}function yb(pb,mc){void 0===mc&&(mc=vb);var yc=[],Tc=!1;return{read:function(){if(Tc)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return yc.length?yc[yc.length-
1]:pb},useMedium:function($c){var ld=mc($c,Tc);return yc.push(ld),function(){yc=yc.filter(function(Ed){return Ed!==ld})}},assignSyncMedium:function($c){for(Tc=!0;yc.length;){var ld=yc;yc=[];ld.forEach($c)}yc={push:function(Ed){return $c(Ed)},filter:function(){return yc}}},assignMedium:function($c){Tc=!0;var ld=[];if(yc.length){var Ed=yc;yc=[];Ed.forEach($c);ld=yc}var Xd=function(){var oe=ld;ld=[];oe.forEach($c)};Promise.resolve().then(Xd);yc={push:function(oe){ld.push(oe);Promise.resolve().then(Xd)},
filter:function(oe){return ld=ld.filter(oe),yc}}}}}b.d(h,{z:function(){return $i},L:function(){return ni}});var Wa=b(2577),hb=b(7135),ab=b(45),Qa=b(8127),bb=b(4512),Pa=function(pb){var mc,yc=pb.onChange,Tc=pb.type,$c=pb.activeColor;pb=pb.topPicks;return"elementStroke"===Tc&&(mc=Qa.fY),"elementBackground"===Tc&&(mc=Qa.eq),"canvasBackground"===Tc&&(mc=Qa.ay),pb&&(mc=pb),mc?(0,bb.jsx)("div",{className:"color-picker__top-picks",children:mc.map(function(ld){return(0,bb.jsx)("button",{className:(0,ab.Z)("color-picker__button",
{active:ld===$c,"is-transparent":"transparent"===ld||!ld}),style:{"--swatch-color":ld},type:"button",title:ld,onClick:function(){return yc(ld)},children:(0,bb.jsx)("div",{className:"color-picker__button-outline"})},ld)})}):(console.error("Invalid type for TopPicks"),null)},Lb=b(9787),xc=b.n(Lb),oc=b(8557),pc=b(3607),Cc=b(1930),bd=function(pb){var mc=pb.color,yc=0;for(pb=Object.entries(pb.palette);yc<pb.length;yc++){var Tc=(0,Wa.Z)(pb[yc],2),$c=Tc[0];Tc=Tc[1];if(Array.isArray(Tc)){if(Tc=Tc.indexOf(mc),
-1<Tc)return{colorName:$c,shade:Tc}}else if(Tc===mc)return{colorName:$c,shade:null}}return null},dc=[["q","w","e","r","t"],["a","s","d","f","g"],["z","x","c","v","b"]].flat(),Nc=function(pb){var mc=pb.color;return!Object.values(pb.palette).flat().includes(mc)},Qc=(0,pc.cn)(null),Ad=function(pb){var mc=pb.keyLabel,yc=pb.isCustomColor,Tc=pb.isShade;Tc=void 0!==Tc&&Tc;var $c=bb.jsxs;a:{pb=pb.color;if(void 0!==yc&&yc&&(yc=(new Option).style,yc.color=pb,yc.color)){var ld=yc.color.replace(/^(rgb|rgba)\(/,
"").replace(/\)$/,"").replace(/\s/g,"").split(",");pb=parseInt(ld[0]);yc=parseInt(ld[1]);ld=parseInt(ld[2]);pb=160<=(299*pb+587*yc+114*ld)/1E3?"black":"white";break a}"transparent"===pb?pb="black":(yc=parseInt(pb.substring(1,3),16),ld=parseInt(pb.substring(3,5),16),pb=parseInt(pb.substring(5,7),16),pb=160<=(299*yc+587*ld+114*pb)/1E3?"black":"white")}return $c.call(bb,"div",{className:"color-picker__button__hotkey-label",style:{color:pb},children:[Tc&&"⇧",mc]})},Xc=function(pb){var mc=pb.onChange,
yc=pb.palette;pb=bd({color:pb.hex||"transparent",palette:yc});var Tc=(0,pc.KO)(Qc);Tc=(0,Wa.Z)(Tc,2);var $c=Tc[0],ld=Tc[1],Ed=(0,Lb.useRef)(null);if((0,Lb.useEffect)(function(){Ed.current&&"shades"===$c&&Ed.current.focus()},[pb,$c]),pb){var Xd=pb.colorName,oe=pb.shade;yc=yc[Xd];if(Array.isArray(yc))return(0,bb.jsx)("div",{className:"color-picker-content--default shades",children:yc.map(function(ye,ie){return(0,bb.jsxs)("button",{ref:ie===oe&&"shades"===$c?Ed:void 0,tabIndex:-1,type:"button",className:(0,ab.Z)("color-picker__button color-picker__button--large",
{active:ie===oe}),"aria-label":"Shade",title:"".concat(Xd," - ").concat(ie+1),style:ye?{"--swatch-color":ye}:void 0,onClick:function(){mc(ye);ld("shades")},children:[(0,bb.jsx)("div",{className:"color-picker__button-outline"}),(0,bb.jsx)(Ad,{color:ye,keyLabel:ie+1,isShade:!0})]},ie)})})}return(0,bb.jsxs)("div",{className:"color-picker-content--default",style:{position:"relative"},tabIndex:-1,children:[(0,bb.jsx)("button",{type:"button",tabIndex:-1,className:"color-picker__button color-picker__button--large color-picker__button--no-focus-visible"}),
(0,bb.jsx)("div",{tabIndex:-1,style:{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",textAlign:"center",fontSize:"0.75rem"},children:(0,oc.t)("colorPicker.noShades")})]})},sc=function(pb){var mc=pb.palette,yc=pb.color,Tc=pb.onChange,$c=(pb.label,pb.activeShade),ld=bd({color:yc||"transparent",palette:mc});pb=(0,pc.KO)(Qc);pb=(0,Wa.Z)(pb,2);var Ed=pb[0],Xd=pb[1],oe=(0,Lb.useRef)(null);return(0,Lb.useEffect)(function(){oe.current&&"baseColors"===
Ed&&oe.current.focus()},[null==ld?void 0:ld.colorName,Ed]),(0,bb.jsx)("div",{className:"color-picker-content--default",children:Object.entries(mc).map(function(ye,ie){var se=(0,Wa.Z)(ye,2);ye=se[0];se=se[1];var Ke=(Array.isArray(se)?se[$c]:se)||"transparent";ie=dc[ie];se=(0,oc.t)("colors.".concat(ye.replace(/\d+/,"")),null,"");return(0,bb.jsxs)("button",{ref:(null==ld?void 0:ld.colorName)===ye?oe:void 0,tabIndex:-1,type:"button",className:(0,ab.Z)("color-picker__button color-picker__button--large",
{active:(null==ld?void 0:ld.colorName)===ye,"is-transparent":"transparent"===Ke||!Ke}),onClick:function(){Tc(Ke);Xd("baseColors")},title:"".concat(se).concat(Ke.startsWith("#")?" ".concat(Ke):""," — ").concat(ie),"aria-label":"".concat(se," — ").concat(ie),style:Ke?{"--swatch-color":Ke}:void 0,"data-testid":"color-".concat(ye),children:[(0,bb.jsx)("div",{className:"color-picker__button-outline"}),(0,bb.jsx)(Ad,{color:Ke,keyLabel:ie})]},ye)})})},Sc=function(pb){var mc=pb.colors,yc=pb.color,Tc=pb.onChange,
$c=pb.label;pb=(0,pc.KO)(Qc);pb=(0,Wa.Z)(pb,2);var ld=pb[0],Ed=pb[1],Xd=(0,Lb.useRef)(null);return(0,Lb.useEffect)(function(){Xd.current&&Xd.current.focus()},[yc,ld]),(0,bb.jsx)("div",{className:"color-picker-content--default",children:mc.map(function(oe,ye){return(0,bb.jsxs)("button",{ref:yc===oe?Xd:void 0,tabIndex:-1,type:"button",className:(0,ab.Z)("color-picker__button color-picker__button--large",{active:yc===oe,"is-transparent":"transparent"===oe||!oe}),onClick:function(){Tc(oe);Ed("custom")},
title:oe,"aria-label":$c,style:{"--swatch-color":oe},children:[(0,bb.jsx)("div",{className:"color-picker__button-outline"}),(0,bb.jsx)(Ad,{color:oe,keyLabel:ye+1,isCustomColor:!0})]},ye)})})},Ib=b(6331),lb=function(pb,mc,yc){var Tc,$c=Math.ceil(yc/Qa.dC);switch(mc=null!==(Tc=mc)&&void 0!==Tc?Tc:-1,pb){case "ArrowLeft":return--mc,0>mc?yc-1:mc;case "ArrowRight":return(mc+1)%yc;case "ArrowDown":return $c=mc+Qa.dC,$c>=yc?mc%Qa.dC:$c;case "ArrowUp":return mc-=Qa.dC,mc=0>mc?Qa.dC*$c+mc:mc,mc>=yc?void 0:
mc}},Db=function(pb){var mc=pb.event,yc=pb.activeColorPickerSection,Tc=pb.palette,$c=pb.color,ld=pb.onChange,Ed=pb.customColors,Xd=pb.setActiveColorPickerSection,oe=(pb.updateData,pb.activeShade),ye=pb.onEyeDropperToggle;pb=pb.onEscape;if(mc[Ib.tW.CTRL_OR_CMD])return!1;if(mc.key===Ib.tW.ESCAPE)return pb(mc),!0;if(mc.key===Ib.tW.ALT)return ye(!0),!0;if(mc.key===Ib.tW.I)return ye(),!0;ye=bd({color:$c,palette:Tc});return mc.key===Ib.tW.TAB?(oe=Object.entries({custom:!!Ed.length,baseColors:!0,shades:null!=
(null==ye?void 0:ye.shade),hex:!0}).reduce(function(ie,se){se=(0,Wa.Z)(se,2);var Ke=se[0];return se[1]&&ie.push(Ke),ie},[]),yc=oe.indexOf(yc),ye=mc.shiftKey?-1:1,yc=oe[yc+ye>oe.length-1?0:0>yc+ye?oe.length-1:yc+ye],(yc&&Xd(yc),"custom"===yc)?ld(Ed[0]):"baseColors"===yc&&(Object.entries(Tc).find(function(ie){var se=(0,Wa.Z)(ie,2);ie=se[0];se=se[1];return Array.isArray(se)?se.includes($c):se===$c?ie:null})||ld(Qa.HO.black)),mc.preventDefault(),mc.stopPropagation(),!0):function(ie){var se=ie.e,Ke=ie.colorObj,
Se=ie.onChange,Nd=ie.palette,Le=ie.customColors,ne=ie.setActiveColorPickerSection;ie=ie.activeShade;return null!=(null==Ke?void 0:Ke.shade)&&["Digit1","Digit2","Digit3","Digit4","Digit5"].includes(se.code)&&se.shiftKey?(ie=Number(se.code.slice(-1))-1,Se(Nd[Ke.colorName][ie]),ne("shades"),!0):["1","2","3","4","5"].includes(se.key)&&Le[Number(se.key)-1]?(Se(Le[Number(se.key)-1]),ne("custom"),!0):dc.includes(se.key)?(Ke=dc.indexOf(se.key),Nd=Nd[Object.keys(Nd)[Ke]],Se(Array.isArray(Nd)?Nd[ie]:Nd),ne("baseColors"),
!0):!1}({e:mc,colorObj:ye,onChange:ld,palette:Tc,customColors:Ed,setActiveColorPickerSection:Xd,activeShade:oe})?!0:"shades"===yc&&ye&&(Xd=lb(mc.key,ye.shade,Qa.dC),void 0!==Xd)?(ld(Tc[ye.colorName][Xd]),!0):"baseColors"===yc&&ye&&(ye=ye.colorName,Xd=Object.keys(Tc),ye=Xd.indexOf(ye),ye=lb(mc.key,ye,Xd.length),void 0!==ye)?(Ed=Tc[Xd[ye]],ld(Array.isArray(Ed)?Ed[oe]:Ed),!0):"custom"===yc&&(Tc=Ed.indexOf($c),mc=lb(mc.key,Tc,Ed.length),void 0!==mc)?(ld(Ed[mc]),!0):!1},Gb=function(pb){return(0,bb.jsx)("div",
{className:"color-picker__heading",children:pb.children})},db=b(7041),rb=function(pb){var mc,yc=pb.color,Tc=pb.onChange,$c=pb.label,ld=pb.type,Ed=pb.elements,Xd=pb.palette,oe=pb.updateData,ye=pb.children,ie=pb.onEyeDropperToggle,se=pb.onEscape;pb=xc().useState(function(){return"canvasBackground"===ld?[]:function(ee,Qe,rf){var sg={elementBackground:"backgroundColor",elementStroke:"strokeColor"};ee=ee.filter(function(Mg){return Mg.isDeleted?!1:Nc({color:Mg[sg[Qe]],palette:rf})});var Jg=new Map;return ee.forEach(function(Mg){Mg=
Mg[sg[Qe]];Jg.has(Mg)?Jg.set(Mg,Jg.get(Mg)+1):Jg.set(Mg,1)}),(0,Cc.Z)(Jg.entries()).sort(function(Mg,Oe){return Oe[1]-Mg[1]}).map(function(Mg){return Mg[0]}).slice(0,Qa.Lx)}(Ed,ld,Xd)});var Ke=(0,Wa.Z)(pb,1)[0];pb=(0,pc.KO)(Qc);pb=(0,Wa.Z)(pb,2);var Se=pb[0],Nd=pb[1],Le=bd({color:yc,palette:Xd});(0,Lb.useEffect)(function(){if(!Se){var ee=Nc({color:yc,palette:Xd}),Qe=ee&&!Ke.includes(yc);Nd(Qe?"hex":ee?"custom":null!=(null==Le?void 0:Le.shade)?"shades":"baseColors")}},[Se,yc,Xd,Nd,Le,Ke]);pb=(0,Lb.useState)(null!==
(mc=null==Le?void 0:Le.shade)&&void 0!==mc?mc:"elementBackground"===ld?Qa._T:Qa.z8);mc=(0,Wa.Z)(pb,2);var ne=mc[0],Qf=mc[1];(0,Lb.useEffect)(function(){null!=(null==Le?void 0:Le.shade)&&Qf(Le.shade);var ee=function(Qe){Qe.key===Ib.tW.ALT&&ie(!1)};return document.addEventListener(db.Ks.KEYUP,ee,{capture:!0}),function(){document.removeEventListener(db.Ks.KEYUP,ee,{capture:!0})}},[Le,ie]);mc=xc().useRef(null);return(0,bb.jsx)("div",{role:"dialog","aria-modal":"true","aria-label":(0,oc.t)("labels.colorPicker"),
children:(0,bb.jsxs)("div",{ref:mc,onKeyDown:function(ee){Db({event:ee,activeColorPickerSection:Se,palette:Xd,color:yc,onChange:Tc,onEyeDropperToggle:ie,customColors:Ke,setActiveColorPickerSection:Nd,updateData:oe,activeShade:ne,onEscape:se})&&(ee.preventDefault(),ee.stopPropagation())},className:"color-picker-content",tabIndex:-1,children:[!!Ke.length&&(0,bb.jsxs)("div",{children:[(0,bb.jsx)(Gb,{children:(0,oc.t)("colorPicker.mostUsedCustomColors")}),(0,bb.jsx)(Sc,{colors:Ke,color:yc,label:(0,oc.t)("colorPicker.mostUsedCustomColors"),
onChange:Tc})]}),(0,bb.jsxs)("div",{children:[(0,bb.jsx)(Gb,{children:(0,oc.t)("colorPicker.colors")}),(0,bb.jsx)(sc,{color:yc,label:$c,palette:Xd,onChange:Tc,activeShade:ne})]}),(0,bb.jsxs)("div",{children:[(0,bb.jsx)(Gb,{children:(0,oc.t)("colorPicker.shades")}),(0,bb.jsx)(Xc,{hex:yc,onChange:Tc,palette:Xd})]}),ye]})})},Nb=b(11),fc=b(7217),Bc=b(9335),Jc=b(1267),ic=b(3119),Oc=b(3060);let Rc;const fd=(0,Lb.createContext)({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),
pd=(0,Lb.forwardRef)((pb,mc)=>{var yc;const {disableOutsidePointerEvents:Tc=!1,onEscapeKeyDown:$c,onPointerDownOutside:ld,onFocusOutside:Ed,onInteractOutside:Xd,onDismiss:oe,...ye}=pb,ie=(0,Lb.useContext)(fd),[se,Ke]=(0,Lb.useState)(null),Se=null!==(yc=null==se?void 0:se.ownerDocument)&&void 0!==yc?yc:null===globalThis||void 0===globalThis?void 0:globalThis.document,[,Nd]=(0,Lb.useState)({});mc=(0,Bc.e)(mc,Qe=>Ke(Qe));yc=Array.from(ie.layers);var [Le]=[...ie.layersWithOutsidePointerEventsDisabled].slice(-1);
Le=yc.indexOf(Le);const ne=se?yc.indexOf(se):-1;yc=0<ie.layersWithOutsidePointerEventsDisabled.size;const Qf=ne>=Le;Le=function(Qe,rf=null===globalThis||void 0===globalThis?void 0:globalThis.document){const sg=(0,Oc.W)(Qe),Jg=(0,Lb.useRef)(!1),Mg=(0,Lb.useRef)(()=>{});return(0,Lb.useEffect)(()=>{const Oe=vg=>{if(vg.target&&!Jg.current){const $g={originalEvent:vg};function Gh(){m("dismissableLayer.pointerDownOutside",sg,$g,{discrete:!0})}"touch"===vg.pointerType?(rf.removeEventListener("click",Mg.current),
Mg.current=Gh,rf.addEventListener("click",Mg.current,{once:!0})):Gh()}Jg.current=!1},Wf=window.setTimeout(()=>{rf.addEventListener("pointerdown",Oe)},0);return()=>{window.clearTimeout(Wf);rf.removeEventListener("pointerdown",Oe);rf.removeEventListener("click",Mg.current)}},[rf,sg]),{onPointerDownCapture:()=>Jg.current=!0}}(Qe=>{const rf=Qe.target,sg=[...ie.branches].some(Jg=>Jg.contains(rf));Qf&&!sg&&(null==ld||ld(Qe),null==Xd||Xd(Qe),Qe.defaultPrevented||null==oe||oe())},Se);const ee=function(Qe,
rf=null===globalThis||void 0===globalThis?void 0:globalThis.document){const sg=(0,Oc.W)(Qe),Jg=(0,Lb.useRef)(!1);return(0,Lb.useEffect)(()=>{const Mg=Oe=>{Oe.target&&!Jg.current&&m("dismissableLayer.focusOutside",sg,{originalEvent:Oe},{discrete:!1})};return rf.addEventListener("focusin",Mg),()=>rf.removeEventListener("focusin",Mg)},[rf,sg]),{onFocusCapture:()=>Jg.current=!0,onBlurCapture:()=>Jg.current=!1}}(Qe=>{const rf=Qe.target;[...ie.branches].some(sg=>sg.contains(rf))||(null==Ed||Ed(Qe),null==
Xd||Xd(Qe),Qe.defaultPrevented||null==oe||oe())},Se);return function(Qe,rf=null===globalThis||void 0===globalThis?void 0:globalThis.document){const sg=(0,Oc.W)(Qe);(0,Lb.useEffect)(()=>{const Jg=Mg=>{"Escape"===Mg.key&&sg(Mg)};return rf.addEventListener("keydown",Jg),()=>rf.removeEventListener("keydown",Jg)},[sg,rf])}(Qe=>{ne===ie.layers.size-1&&(null==$c||$c(Qe),!Qe.defaultPrevented&&oe&&(Qe.preventDefault(),oe()))},Se),(0,Lb.useEffect)(()=>{if(se)return Tc&&(0===ie.layersWithOutsidePointerEventsDisabled.size&&
(Rc=Se.body.style.pointerEvents,Se.body.style.pointerEvents="none"),ie.layersWithOutsidePointerEventsDisabled.add(se)),ie.layers.add(se),l(),()=>{Tc&&1===ie.layersWithOutsidePointerEventsDisabled.size&&(Se.body.style.pointerEvents=Rc)}},[se,Se,Tc,ie]),(0,Lb.useEffect)(()=>()=>{se&&(ie.layers.delete(se),ie.layersWithOutsidePointerEventsDisabled.delete(se),l())},[se,ie]),(0,Lb.useEffect)(()=>{const Qe=()=>Nd({});return document.addEventListener("dismissableLayer.update",Qe),()=>document.removeEventListener("dismissableLayer.update",
Qe)},[]),(0,Lb.createElement)(ic.WV.div,(0,Nb.Z)({},ye,{ref:mc,style:{pointerEvents:yc?Qf?"auto":"none":void 0,...pb.style},onFocusCapture:(0,fc.M)(pb.onFocusCapture,ee.onFocusCapture),onBlurCapture:(0,fc.M)(pb.onBlurCapture,ee.onBlurCapture),onPointerDownCapture:(0,fc.M)(pb.onPointerDownCapture,Le.onPointerDownCapture)}))});let Ic=0;const wc={bubbles:!1,cancelable:!0},je=(0,Lb.forwardRef)((pb,mc)=>{const {loop:yc=!1,trapped:Tc=!1,onMountAutoFocus:$c,onUnmountAutoFocus:ld,...Ed}=pb,[Xd,oe]=(0,Lb.useState)(null),
ye=(0,Oc.W)($c),ie=(0,Oc.W)(ld),se=(0,Lb.useRef)(null);pb=(0,Bc.e)(mc,Se=>oe(Se));const Ke=(0,Lb.useRef)({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;(0,Lb.useEffect)(()=>{if(Tc){function Se(Le){!Ke.paused&&Xd&&(Le=Le.target,Xd.contains(Le)?se.current=Le:f(se.current,{select:!0}))}function Nd(Le){!Ke.paused&&Xd&&(Xd.contains(Le.relatedTarget)||f(se.current,{select:!0}))}return document.addEventListener("focusin",Se),document.addEventListener("focusout",Nd),()=>{document.removeEventListener("focusin",
Se);document.removeEventListener("focusout",Nd)}}},[Tc,Xd,Ke.paused]);(0,Lb.useEffect)(()=>{if(Xd){pf.add(Ke);const Nd=document.activeElement;if(!Xd.contains(Nd)){const Le=new CustomEvent("focusScope.autoFocusOnMount",wc);Xd.addEventListener("focusScope.autoFocusOnMount",ye);Xd.dispatchEvent(Le);Le.defaultPrevented||(!function(ne,{select:Qf=!1}={}){const ee=document.activeElement;for(const Qe of ne)if(f(Qe,{select:Qf}),document.activeElement!==ee)break}((Se=v(Xd),Se.filter(ne=>"A"!==ne.tagName)),
{select:!0}),document.activeElement===Nd&&f(Xd))}return()=>{Xd.removeEventListener("focusScope.autoFocusOnMount",ye);setTimeout(()=>{const Le=new CustomEvent("focusScope.autoFocusOnUnmount",wc);Xd.addEventListener("focusScope.autoFocusOnUnmount",ie);Xd.dispatchEvent(Le);Le.defaultPrevented||f(null!=Nd?Nd:document.body,{select:!0});Xd.removeEventListener("focusScope.autoFocusOnUnmount",ie);pf.remove(Ke)},0)}}var Se},[Xd,ye,ie,Ke]);mc=(0,Lb.useCallback)(Se=>{if((yc||Tc)&&!Ke.paused){var Nd=document.activeElement;
if("Tab"===Se.key&&!Se.altKey&&!Se.ctrlKey&&!Se.metaKey&&Nd){const ne=Se.currentTarget;var Le=ne;const Qf=v(Le),ee=t(Qf,Le);Le=t(Qf.reverse(),Le);const [Qe,rf]=[ee,Le];Qe&&rf?Se.shiftKey||Nd!==rf?Se.shiftKey&&Nd===Qe&&(Se.preventDefault(),yc&&f(rf,{select:!0})):(Se.preventDefault(),yc&&f(Qe,{select:!0})):Nd===ne&&Se.preventDefault()}}},[yc,Tc,Ke.paused]);return(0,Lb.createElement)(ic.WV.div,(0,Nb.Z)({tabIndex:-1},Ed,{ref:pb,onKeyDown:mc}))}),pf=function(){let pb=[];return{add(mc){const yc=pb[0];mc===
yc||null!=yc&&yc.pause();pb=E(pb,mc);pb.unshift(mc)},remove(mc){var yc;pb=E(pb,mc);null===(yc=pb[0])||void 0===yc||yc.resume()}}}();var qe=b(5622);const ue=Math.min,kd=Math.max,Ae=pb=>({name:"arrow",options:pb,async fn(mc){const {element:yc,padding:Tc=0}=null!=pb?pb:{},{x:$c,y:ld,placement:Ed,rects:Xd,platform:oe}=mc;if(null==yc)return{};mc=S(Tc);const ye={x:$c,y:ld},ie=J(Ed),se=Ed.split("-")[1],Ke=V(ie);var Se=await oe.getDimensions(yc);const Nd="y"===ie?"top":"left",Le="y"===ie?"bottom":"right";
var ne=Xd.reference[Ke]+Xd.reference[ie]-ye[ie]-Xd.floating[Ke];const Qf=ye[ie]-Xd.reference[ie];var ee=await (null==oe.getOffsetParent?void 0:oe.getOffsetParent(yc));let Qe=ee?"y"===ie?ee.clientHeight||0:ee.clientWidth||0:0;0===Qe&&(Qe=Xd.floating[Ke]);ee=mc[Nd];const rf=Qe-Se[Ke]-mc[Le];Se=Qe/2-Se[Ke]/2+(ne/2-Qf/2);ne=kd(ee,ue(Se,rf));return{[ie]:ye[ie]-(0<("start"===se?mc[Nd]:mc[Le])&&Se!==ne&&Xd.reference[Ke]<=Xd.floating[Ke]?Se<ee?ee-Se:rf-Se:0),data:{[ie]:ne,centerOffset:Se-ne}}}}),Bf={left:"right",
right:"left",bottom:"top",top:"bottom"},gg={start:"end",end:"start"},jc=["top","right","bottom","left"],Zc=(jc.reduce((pb,mc)=>pb.concat(mc,mc+"-start",mc+"-end"),[]),function(pb){return void 0===pb&&(pb={}),{name:"flip",options:pb,async fn(mc){var yc;const {placement:Tc,middlewareData:$c,rects:ld,initialPlacement:Ed,platform:Xd,elements:oe}=mc,{mainAxis:ye=!0,crossAxis:ie=!0,fallbackPlacements:se,fallbackStrategy:Ke="bestFit",flipAlignment:Se=!0,...Nd}=pb,Le=B(Tc);var ne=se||(Le!==Ed&&Se?function(Jg){const Mg=
R(Jg);return[F(Jg),Mg,F(Mg)]}(Ed):[R(Ed)]);ne=[Ed,...ne];const Qf=await T(mc,Nd),ee=[];mc=(null==(yc=$c.flip)?void 0:yc.overflows)||[];if(ye&&ee.push(Qf[Le]),ie){const {main:Jg,cross:Mg}=G(Tc,ld,await (null==Xd.isRTL?void 0:Xd.isRTL(oe.floating)));ee.push(Qf[Jg],Qf[Mg])}if(mc=[...mc,{placement:Tc,overflows:ee}],!ee.every(Jg=>0>=Jg)){var Qe,rf;yc=(null!=(Qe=null==(rf=$c.flip)?void 0:rf.index)?Qe:0)+1;if(Qe=ne[yc])return{data:{index:yc,overflows:mc},reset:{placement:Qe}};Qe="bottom";switch(Ke){case "bestFit":var sg;
(mc=null==(sg=mc.map(Jg=>[Jg,Jg.overflows.filter(Mg=>0<Mg).reduce((Mg,Oe)=>Mg+Oe,0)]).sort((Jg,Mg)=>Jg[1]-Mg[1])[0])?void 0:sg[0].placement)&&(Qe=mc);break;case "initialPlacement":Qe=Ed}if(Tc!==Qe)return{reset:{placement:Qe}}}return{}}}}),Gc=function(pb){let {strategy:mc="referenceHidden",...yc}=void 0===pb?{}:pb;return{name:"hide",async fn(Tc){const {rects:$c}=Tc;switch(mc){case "referenceHidden":return Tc=O(await T(Tc,{...yc,elementContext:"reference"}),$c.reference),{data:{referenceHiddenOffsets:Tc,
referenceHidden:M(Tc)}};case "escaped":return Tc=O(await T(Tc,{...yc,altBoundary:!0}),$c.floating),{data:{escapedOffsets:Tc,escaped:M(Tc)}};default:return{}}}}},ub=function(pb){return void 0===pb&&(pb=0),{name:"offset",options:pb,async fn(mc){const {x:yc,y:Tc}=mc;mc=await async function($c,ld){const {placement:Ed,platform:Xd,elements:oe}=$c;var ye=await (null==Xd.isRTL?void 0:Xd.isRTL(oe.floating)),ie=B(Ed);const se=Ed.split("-")[1],Ke="x"===J(Ed);ie=["left","top"].includes(ie)?-1:1;ye=ye&&Ke?-1:
1;$c="function"==typeof ld?ld($c):ld;let {mainAxis:Se,crossAxis:Nd,alignmentAxis:Le}="number"==typeof $c?{mainAxis:$c,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...$c};return se&&"number"==typeof Le&&(Nd="end"===se?-1*Le:Le),Ke?{x:Nd*ye,y:Se*ie}:{x:Se*ie,y:Nd*ye}}(mc,pb);return{x:yc+mc.x,y:Tc+mc.y,data:mc}}}},Bb=function(pb){return void 0===pb&&(pb={}),{name:"shift",options:pb,async fn(mc){const {x:yc,y:Tc,placement:$c}=mc,{mainAxis:ld=!0,crossAxis:Ed=!1,limiter:Xd=
{fn:Nd=>{let {x:Le,y:ne}=Nd;return{x:Le,y:ne}}},...oe}=pb;var ye={x:yc,y:Tc};const ie=await T(mc,oe),se=J(B($c)),Ke="x"===se?"y":"x";let Se=ye[se];ye=ye[Ke];ld&&(Se=kd(Se+ie["y"===se?"top":"left"],ue(Se,Se-ie["y"===se?"bottom":"right"])));Ed&&(ye=kd(ye+ie["y"===Ke?"top":"left"],ue(ye,ye-ie["y"===Ke?"bottom":"right"])));mc=Xd.fn({...mc,[se]:Se,[Ke]:ye});return{...mc,data:{x:mc.x-yc,y:mc.y-Tc}}}}},Eb=function(pb){return void 0===pb&&(pb={}),{options:pb,fn(mc){const {x:yc,y:Tc,placement:$c,rects:ld,
middlewareData:Ed}=mc,{offset:Xd=0,mainAxis:oe=!0,crossAxis:ye=!0}=pb;var ie={x:yc,y:Tc};mc=J($c);const se="x"===mc?"y":"x";let Ke=ie[mc];ie=ie[se];var Se="function"==typeof Xd?Xd({...ld,placement:$c}):Xd;Se="number"==typeof Se?{mainAxis:Se,crossAxis:0}:{mainAxis:0,crossAxis:0,...Se};if(oe){var Nd="y"===mc?"height":"width",Le=ld.reference[mc]-ld.floating[Nd]+Se.mainAxis;Nd=ld.reference[mc]+ld.reference[Nd]-Se.mainAxis;Ke<Le?Ke=Le:Ke>Nd&&(Ke=Nd)}if(ye){var ne,Qf,ee,Qe;const rf="y"===mc?"width":"height";
Le=["top","left"].includes(B($c));Nd=ld.reference[se]-ld.floating[rf]+(Le&&null!=(ne=null==(Qf=Ed.offset)?void 0:Qf[se])?ne:0)+(Le?0:Se.crossAxis);ne=ld.reference[se]+ld.reference[rf]+(Le?0:null!=(ee=null==(Qe=Ed.offset)?void 0:Qe[se])?ee:0)-(Le?Se.crossAxis:0);ie<Nd?ie=Nd:ie>ne&&(ie=ne)}return{[mc]:Ke,[se]:ie}}}},hd=function(pb){return void 0===pb&&(pb={}),{name:"size",options:pb,async fn(mc){const {placement:yc,rects:Tc,platform:$c,elements:ld}=mc,{apply:Ed,...Xd}=pb;var oe=await T(mc,Xd),ye=B(yc),
ie=yc.split("-")[1],se;let Ke;"top"===ye||"bottom"===ye?(se=ye,Ke=ie===(await (null==$c.isRTL?void 0:$c.isRTL(ld.floating))?"start":"end")?"left":"right"):(Ke=ye,se="end"===ie?"top":"bottom");ye=kd(oe.left,0);ie=kd(oe.right,0);const Se=kd(oe.top,0),Nd=kd(oe.bottom,0);se={availableHeight:Tc.floating.height-(["left","right"].includes(yc)?2*(0!==Se||0!==Nd?Se+Nd:kd(oe.top,oe.bottom)):oe[se]),availableWidth:Tc.floating.width-(["top","bottom"].includes(yc)?2*(0!==ye||0!==ie?ye+ie:kd(oe.left,oe.right)):
oe[Ke])};oe=await $c.getDimensions(ld.floating);null==Ed||Ed({...mc,...se});mc=await $c.getDimensions(ld.floating);return oe.width!==mc.width||oe.height!==mc.height?{reset:{rects:!0}}:{}}}},Ud=Math.min,Td=Math.max,Ue=Math.round,kb={getClippingRect:function(pb){let {element:mc,boundary:yc,rootBoundary:Tc,strategy:$c}=pb;pb=[...("clippingAncestors"===yc?ua(mc):[].concat(yc)),Tc];pb=pb.reduce((ld,Ed)=>{Ed=ka(mc,Ed,$c);return ld.top=Td(Ed.top,ld.top),ld.right=Ud(Ed.right,ld.right),ld.bottom=Ud(Ed.bottom,
ld.bottom),ld.left=Td(Ed.left,ld.left),ld},ka(mc,pb[0],$c));return{width:pb.right-pb.left,height:pb.bottom-pb.top,x:pb.left,y:pb.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(pb){let {rect:mc,offsetParent:yc,strategy:Tc}=pb;var $c=aa(yc);const ld=ta(yc);if(yc===ld)return mc;pb={scrollLeft:0,scrollTop:0};var Ed=0,Xd=0;($c||!$c&&"fixed"!==Tc)&&(("body"!==U(yc)||X(ld))&&(pb=xa(yc)),aa(yc))&&($c=va(yc,!0),Ed=$c.x+yc.clientLeft,Xd=$c.y+yc.clientTop);return{...mc,x:mc.x-pb.scrollLeft+
Ed,y:mc.y-pb.scrollTop+Xd}},isElement:W,getDimensions:Ka,getOffsetParent:Fa,getDocumentElement:ta,getElementRects:pb=>{let {reference:mc,floating:yc,strategy:Tc}=pb;pb=Fa(yc);var $c=aa(pb);const ld=ta(pb);var Ed;if(Ed=$c)Ed=va(pb),Ed=Ue(Ed.width)!==pb.offsetWidth||Ue(Ed.height)!==pb.offsetHeight;Ed=va(mc,Ed,"fixed"===Tc);let Xd={scrollLeft:0,scrollTop:0};var oe=0,ye=0;if($c||!$c&&"fixed"!==Tc)(("body"!==U(pb)||X(ld))&&(Xd=xa(pb)),aa(pb))?($c=va(pb,!0),oe=$c.x+pb.clientLeft,ye=$c.y+pb.clientTop):ld&&
(oe=Ga(ld));return{reference:{x:Ed.left+Xd.scrollLeft-oe,y:Ed.top+Xd.scrollTop-ye,width:Ed.width,height:Ed.height},floating:{...Ka(yc),x:0,y:0}}},getClientRects:pb=>Array.from(pb.getClientRects()),isRTL:pb=>"rtl"===ia(pb).direction},tb=(pb,mc,yc)=>(async(Tc,$c,ld)=>{const {placement:Ed="bottom",strategy:Xd="absolute",middleware:oe=[],platform:ye}=ld;ld=await (null==ye.isRTL?void 0:ye.isRTL($c));let ie=await ye.getElementRects({reference:Tc,floating:$c,strategy:Xd}),{x:se,y:Ke}=H(ie,Ed,ld),Se=Ed,Nd=
{},Le=0;for(let ne=0;ne<oe.length;ne++){const {name:Qf,fn:ee}=oe[ne],{x:Qe,y:rf,data:sg,reset:Jg}=await ee({x:se,y:Ke,initialPlacement:Ed,placement:Se,strategy:Xd,middlewareData:Nd,rects:ie,platform:ye,elements:{reference:Tc,floating:$c}});se=null!=Qe?Qe:se;Ke=null!=rf?rf:Ke;Nd={...Nd,[Qf]:{...Nd[Qf],...sg}};Jg&&50>=Le&&(Le++,"object"==typeof Jg&&(Jg.placement&&(Se=Jg.placement),Jg.rects&&(ie=!0===Jg.rects?await ye.getElementRects({reference:Tc,floating:$c,strategy:Xd}):Jg.rects),{x:se,y:Ke}=H(ie,
Se,ld)),ne=-1)}return{x:se,y:Ke,placement:Se,strategy:Xd,middlewareData:Nd}})(pb,mc,{platform:kb,...yc});var ob=b(5156),Ub=b.n(ob),Tb="undefined"!=typeof document?Lb.useLayoutEffect:Lb.useEffect;const rd=pb=>{const {element:mc,padding:yc}=pb;return{name:"arrow",options:pb,fn(Tc){return $c=mc,Object.prototype.hasOwnProperty.call($c,"current")?null!=mc.current?Ae({element:mc.current,padding:yc}).fn(Tc):{}:mc?Ae({element:mc,padding:yc}).fn(Tc):{};var $c}}},td=(0,Lb.forwardRef)((pb,mc)=>{const {children:yc,
width:Tc=10,height:$c=5,...ld}=pb;return(0,Lb.createElement)(ic.WV.svg,(0,Nb.Z)({},ld,{ref:mc,width:Tc,height:$c,viewBox:"0 0 30 10",preserveAspectRatio:"none"}),pb.asChild?yc:(0,Lb.createElement)("polygon",{points:"0,0 30,0 15,10"}))});var Hd=b(3348);const [te,ve]=(0,Jc.b)("Popper"),[pe,$d]=te("Popper"),Ab=(0,Lb.forwardRef)((pb,mc)=>{const {__scopePopper:yc,virtualRef:Tc,...$c}=pb,ld=$d("PopperAnchor",yc),Ed=(0,Lb.useRef)(null);pb=(0,Bc.e)(mc,Ed);return(0,Lb.useEffect)(()=>{ld.onAnchorChange((null==
Tc?void 0:Tc.current)||Ed.current)}),Tc?null:(0,Lb.createElement)(ic.WV.div,(0,Nb.Z)({},$c,{ref:pb}))}),[ec,vc]=te("PopperContent"),[Xa,sa]=te("PopperContent",{hasParent:!1,positionUpdateFns:new Set}),qa=(0,Lb.forwardRef)((pb,mc)=>{var yc,Tc,$c,ld,Ed,Xd,oe,ye;const {__scopePopper:ie,side:se="bottom",sideOffset:Ke=0,align:Se="center",alignOffset:Nd=0,arrowPadding:Le=0,collisionBoundary:ne=[],collisionPadding:Qf=0,sticky:ee="partial",hideWhenDetached:Qe=!1,avoidCollisions:rf=!0,onPlaced:sg,...Jg}=pb,
Mg=$d("PopperContent",ie),[Oe,Wf]=(0,Lb.useState)(null);mc=(0,Bc.e)(mc,xi=>Wf(xi));const [vg,$g]=(0,Lb.useState)(null);var Gh=function(xi){const [dk,ek]=(0,Lb.useState)(void 0);return(0,Hd.b)(()=>{if(xi){ek({width:xi.offsetWidth,height:xi.offsetHeight});const ok=new ResizeObserver(Ri=>{if(Array.isArray(Ri)&&Ri.length){Ri=Ri[0];if("borderBoxSize"in Ri){Ri=Ri.borderBoxSize;var Ci=Array.isArray(Ri)?Ri[0]:Ri;Ri=Ci.inlineSize;Ci=Ci.blockSize}else Ri=xi.offsetWidth,Ci=xi.offsetHeight;ek({width:Ri,height:Ci})}});
return ok.observe(xi,{box:"border-box"}),()=>ok.unobserve(xi)}ek(void 0)},[xi]),dk}(vg),Qk=null!==(yc=null==Gh?void 0:Gh.width)&&void 0!==yc?yc:0;yc=null!==(Tc=null==Gh?void 0:Gh.height)&&void 0!==Tc?Tc:0;Tc=se+("center"!==Se?"-"+Se:"");Gh="number"==typeof Qf?Qf:{top:0,right:0,bottom:0,left:0,...Qf};const ug=Array.isArray(ne)?ne:[ne],Zl=0<ug.length;Gh={padding:Gh,boundary:ug.filter(Va),altBoundary:Zl};const {reference:ql,floating:Qi,strategy:rl,x:Il,y:sl,placement:Jn,middlewareData:Tj,update:Ei}=
La({strategy:"fixed",placement:Tc,whileElementsMounted:na,middleware:[wb(),ub({mainAxis:Ke+yc,alignmentAxis:Nd}),rf?Bb({mainAxis:!0,crossAxis:!1,limiter:"partial"===ee?Eb():void 0,...Gh}):void 0,vg?rd({element:vg,padding:Le}):void 0,rf?Zc({...Gh}):void 0,hd({...Gh,apply:({elements:xi,availableWidth:dk,availableHeight:ek})=>{xi.floating.style.setProperty("--radix-popper-available-width",`${dk}px`);xi.floating.style.setProperty("--radix-popper-available-height",`${ek}px`)}}),ac({arrowWidth:Qk,arrowHeight:yc}),
Qe?Gc({strategy:"referenceHidden"}):void 0].filter(Oa)});(0,Hd.b)(()=>{ql(Mg.anchor)},[ql,Mg.anchor]);const Ih=null!==Il&&null!==sl,[cl,$l]=Ma(Jn),Ck=(0,Oc.W)(sg);(0,Hd.b)(()=>{Ih&&(null==Ck||Ck())},[Ih,Ck]);Qk=null===($c=Tj.arrow)||void 0===$c?void 0:$c.x;$c=null===(ld=Tj.arrow)||void 0===ld?void 0:ld.y;ld=0!==(null===(Ed=Tj.arrow)||void 0===Ed?void 0:Ed.centerOffset);const [mm,am]=(0,Lb.useState)();(0,Hd.b)(()=>{Oe&&am(window.getComputedStyle(Oe).zIndex)},[Oe]);const {hasParent:Jl,positionUpdateFns:dl}=
sa("PopperContent",ie),tl=!Jl;(0,Lb.useLayoutEffect)(()=>{if(!tl)return dl.add(Ei),()=>{dl.delete(Ei)}},[tl,dl,Ei]);(0,Hd.b)(()=>{tl&&Ih&&Array.from(dl).reverse().forEach(xi=>requestAnimationFrame(xi))},[tl,Ih,dl]);Ed={"data-side":cl,"data-align":$l,...Jg,ref:mc,style:{...Jg.style,animation:Ih?void 0:"none",opacity:null!==(Xd=Tj.hide)&&void 0!==Xd&&Xd.referenceHidden?0:void 0}};return(0,Lb.createElement)("div",{ref:Qi,"data-radix-popper-content-wrapper":"",style:{position:rl,left:0,top:0,transform:Ih?
`translate3d(${Math.round(Il)}px, ${Math.round(sl)}px, 0)`:"translate3d(0, -200%, 0)",minWidth:"max-content",zIndex:mm,"--radix-popper-transform-origin":[null===(oe=Tj.transformOrigin)||void 0===oe?void 0:oe.x,null===(ye=Tj.transformOrigin)||void 0===ye?void 0:ye.y].join(" ")},dir:pb.dir},(0,Lb.createElement)(ec,{scope:ie,placedSide:cl,onArrowChange:$g,arrowX:Qk,arrowY:$c,shouldHideArrow:ld},tl?(0,Lb.createElement)(Xa,{scope:ie,hasParent:!0,positionUpdateFns:dl},(0,Lb.createElement)(ic.WV.div,Ed)):
(0,Lb.createElement)(ic.WV.div,Ed)))}),Da={top:"bottom",right:"left",bottom:"top",left:"right"},Ta=(0,Lb.forwardRef)(function(pb,mc){const {__scopePopper:yc,...Tc}=pb;pb=vc("PopperArrow",yc);return(0,Lb.createElement)("span",{ref:pb.onArrowChange,style:{position:"absolute",left:pb.arrowX,top:pb.arrowY,[Da[pb.placedSide]]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[pb.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",
left:"translateY(50%) rotate(-90deg) translateX(50%)"}[pb.placedSide],visibility:pb.shouldHideArrow?"hidden":void 0}},(0,Lb.createElement)(td,(0,Nb.Z)({},Tc,{ref:mc,style:{...Tc.style,display:"block"}})))}),wb=()=>({name:"anchorCssProperties",fn(pb){const {rects:mc,elements:yc}=pb,{width:Tc,height:$c}=mc.reference;return yc.floating.style.setProperty("--radix-popper-anchor-width",`${Tc}px`),yc.floating.style.setProperty("--radix-popper-anchor-height",`${$c}px`),{}}}),ac=pb=>({name:"transformOrigin",
options:pb,fn(mc){var yc,Tc,$c,ld,Ed;const {placement:Xd,rects:oe,middlewareData:ye}=mc,ie=(mc=0!==(null===(yc=ye.arrow)||void 0===yc?void 0:yc.centerOffset))?0:pb.arrowWidth;yc=mc?0:pb.arrowHeight;const [se,Ke]=Ma(Xd),Se={start:"0%",center:"50%",end:"100%"}[Ke],Nd=(null!==(Tc=null===($c=ye.arrow)||void 0===$c?void 0:$c.x)&&void 0!==Tc?Tc:0)+ie/2;Tc=(null!==(ld=null===(Ed=ye.arrow)||void 0===Ed?void 0:Ed.y)&&void 0!==ld?ld:0)+yc/2;Ed=ld="";return"bottom"===se?(ld=mc?Se:`${Nd}px`,Ed=-yc+"px"):"top"===
se?(ld=mc?Se:`${Nd}px`,Ed=`${oe.floating.height+yc}px`):"right"===se?(ld=-yc+"px",Ed=mc?Se:`${Tc}px`):"left"===se&&(ld=`${oe.floating.width+yc}px`,Ed=mc?Se:`${Tc}px`),{data:{x:ld,y:Ed}}}}),Hc=pb=>{const {__scopePopper:mc,children:yc}=pb,[Tc,$c]=(0,Lb.useState)(null);return(0,Lb.createElement)(pe,{scope:mc,anchor:Tc,onAnchorChange:$c},yc)},Wc=(0,Lb.forwardRef)((pb,mc)=>{var yc;const {container:Tc=null===globalThis||void 0===globalThis||null===(yc=globalThis.document)||void 0===yc?void 0:yc.body,...$c}=
pb;return Tc?Ub().createPortal((0,Lb.createElement)(ic.WV.div,(0,Nb.Z)({},$c,{ref:mc})),Tc):null});var Wd=b(1483),re=b(4801),xe=b(2673),Cf=function(pb){return"undefined"==typeof document?null:(Array.isArray(pb)?pb[0]:pb).ownerDocument.body},kf=new WeakMap,Df=new WeakMap,tf={},rg=0,gh=function(pb){return pb&&(pb.host||gh(pb.parentNode))},jh=function(pb,mc,yc,Tc){pb=function(ie,se){return se.map(function(Ke){if(ie.contains(Ke))return Ke;var Se=gh(Ke);return Se&&ie.contains(Se)?Se:(console.error("aria-hidden",
Ke,"in not contained inside",ie,". Doing nothing"),null)}).filter(function(Ke){return!!Ke})}(mc,Array.isArray(pb)?pb:[pb]);tf[yc]||(tf[yc]=new WeakMap);var $c=tf[yc],ld=[],Ed=new Set,Xd=new Set(pb),oe=function(ie){ie&&!Ed.has(ie)&&(Ed.add(ie),oe(ie.parentNode))};pb.forEach(oe);var ye=function(ie){ie&&!Xd.has(ie)&&Array.prototype.forEach.call(ie.children,function(se){if(Ed.has(se))ye(se);else{var Ke=se.getAttribute(Tc);Ke=null!==Ke&&"false"!==Ke;var Se=(kf.get(se)||0)+1,Nd=($c.get(se)||0)+1;kf.set(se,
Se);$c.set(se,Nd);ld.push(se);1===Se&&Ke&&Df.set(se,!0);1===Nd&&se.setAttribute(yc,"true");Ke||se.setAttribute(Tc,"true")}})};return ye(mc),Ed.clear(),rg++,function(){ld.forEach(function(ie){var se=kf.get(ie)-1,Ke=$c.get(ie)-1;kf.set(ie,se);$c.set(ie,Ke);se||(Df.has(ie)||ie.removeAttribute(Tc),Df.delete(ie));Ke||ie.removeAttribute(yc)});--rg||(kf=new WeakMap,kf=new WeakMap,Df=new WeakMap,tf={})}},Uf=function(pb,mc,yc){void 0===yc&&(yc="data-aria-hidden");var Tc=Array.from(Array.isArray(pb)?pb:[pb]);
return(pb=mc||Cf(pb))?(Tc.push.apply(Tc,Array.from(pb.querySelectorAll("[aria-live]"))),jh(Tc,pb,yc,"aria-hidden")):function(){return null}},hh=function(){return hh=Object.assign||function(pb){for(var mc,yc=1,Tc=arguments.length;yc<Tc;yc++)for(var $c in mc=arguments[yc])Object.prototype.hasOwnProperty.call(mc,$c)&&(pb[$c]=mc[$c]);return pb},hh.apply(this,arguments)};Object.create;Object.create;var ti=function(pb){void 0===pb&&(pb={});var mc=yb(null);return mc.options=hh({async:!0,ssr:!1},pb),mc}(),
hi=function(){},Rj=Lb.forwardRef(function(pb,mc){var yc=Lb.useRef(null),Tc=Lb.useState({onScrollCapture:hi,onWheelCapture:hi,onTouchMoveCapture:hi}),$c=Tc[0];Tc=Tc[1];var ld=pb.forwardProps,Ed=pb.children,Xd=pb.className,oe=pb.removeScrollBar,ye=pb.enabled,ie=pb.shards,se=pb.sideCar,Ke=pb.noIsolation,Se=pb.inert,Nd=pb.allowPinchZoom,Le=pb.as;Le=void 0===Le?"div":Le;pb=Ua(pb,"forwardProps children className removeScrollBar enabled shards sideCar noIsolation inert allowPinchZoom as".split(" "));mc=
ib([yc,mc]);$c=hh(hh({},pb),$c);return Lb.createElement(Lb.Fragment,null,ye&&Lb.createElement(se,{sideCar:ti,removeScrollBar:oe,shards:ie,noIsolation:Ke,inert:Se,setCallbacks:Tc,allowPinchZoom:!!Nd,lockRef:yc}),ld?Lb.cloneElement(Lb.Children.only(Ed),hh(hh({},$c),{ref:mc})):Lb.createElement(Le,hh({},$c,{className:Xd,ref:mc}),Ed))});Rj.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Rj.classNames={fullWidth:"width-before-scroll-bar",zeroRight:"right-scroll-bar-position"};var Lk=function(pb){var mc=
pb.sideCar;pb=Ua(pb,["sideCar"]);if(!mc)throw Error("Sidecar: please provide `sideCar` property to import the right car");mc=mc.read();if(!mc)throw Error("Sidecar medium not found");return Lb.createElement(mc,hh({},pb))};Lk.isSideCarExport=!0;var Vl=function(){var pb=0,mc=null;return{add:function(yc){var Tc,$c;if($c=0==pb){if(document){$c=document.createElement("style");$c.type="text/css";var ld=b.nc;$c=(ld&&$c.setAttribute("nonce",ld),$c)}else $c=null;$c=mc=$c}$c&&((Tc=mc).styleSheet?Tc.styleSheet.cssText=
yc:Tc.appendChild(document.createTextNode(yc)),yc=mc,(document.head||document.getElementsByTagName("head")[0]).appendChild(yc));pb++},remove:function(){!--pb&&mc&&(mc.parentNode&&mc.parentNode.removeChild(mc),mc=null)}}},jk=function(){var pb,mc=(pb=Vl(),function(yc,Tc){Lb.useEffect(function(){return pb.add(yc),function(){pb.remove()}},[yc&&Tc])});return function(yc){return mc(yc.styles,yc.dynamic),null}},lj={left:0,top:0,right:0,gap:0},Gi=jk(),sh=function(pb,mc,yc,Tc){var $c=pb.left,ld=pb.top,Ed=
pb.right;pb=pb.gap;return void 0===yc&&(yc="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(Tc,";\n padding-right: ").concat(pb,"px ").concat(Tc,";\n }\n body {\n overflow: hidden ").concat(Tc,";\n overscroll-behavior: contain;\n ").concat([mc&&"position: relative ".concat(Tc,";"),"margin"===yc&&"\n padding-left: ".concat($c,"px;\n padding-top: ").concat(ld,"px;\n padding-right: ").concat(Ed,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(pb,
"px ").concat(Tc,";\n "),"padding"===yc&&"padding-right: ".concat(pb,"px ").concat(Tc,";")].filter(Boolean).join(""),"\n }\n \n .").concat("right-scroll-bar-position"," {\n right: ").concat(pb,"px ").concat(Tc,";\n }\n \n .").concat("width-before-scroll-bar"," {\n margin-right: ").concat(pb,"px ").concat(Tc,";\n }\n \n .").concat("right-scroll-bar-position"," .").concat("right-scroll-bar-position"," {\n right: 0 ").concat(Tc,";\n }\n \n .").concat("width-before-scroll-bar",
" .").concat("width-before-scroll-bar"," {\n margin-right: 0 ").concat(Tc,";\n }\n \n body {\n ").concat("--removed-body-scroll-bar-size",": ").concat(pb,"px;\n }\n")},Wl=function(pb){var mc=pb.noRelative,yc=pb.noImportant;pb=pb.gapMode;var Tc=void 0===pb?"margin":pb;pb=Lb.useMemo(function(){var $c=Tc;if(void 0===$c&&($c="margin"),"undefined"==typeof window)$c=lj;else{var ld=window.getComputedStyle(document.body),Ed=ld["padding"===$c?"paddingTop":"marginTop"],Xd=ld["padding"===$c?"paddingRight":
"marginRight"];$c=[parseInt(ld["padding"===$c?"paddingLeft":"marginLeft"]||"",10)||0,parseInt(Ed||"",10)||0,parseInt(Xd||"",10)||0];$c={left:$c[0],top:$c[1],right:$c[2],gap:Math.max(0,window.innerWidth-document.documentElement.clientWidth+$c[2]-$c[0])}}return $c},[Tc]);return Lb.createElement(Gi,{styles:sh(pb,!mc,Tc,yc?"":"!important")})},Mi=!1;if("undefined"!=typeof window)try{var Dj=Object.defineProperty({},"passive",{get:function(){return Mi=!0,!0}});window.addEventListener("test",Dj,Dj);window.removeEventListener("test",
Dj,Dj)}catch(pb){Mi=!1}var Xj=!!Mi&&{passive:!1},oh=function(pb,mc){var yc=window.getComputedStyle(pb);return"hidden"!==yc[mc]&&!(yc.overflowY===yc.overflowX&&"TEXTAREA"!==pb.tagName&&"visible"===yc[mc])},wf=function(pb,mc){do{if("undefined"!=typeof ShadowRoot&&mc instanceof ShadowRoot&&(mc=mc.host),cg(pb,mc)){var yc=zk(pb,mc);if(yc[1]>yc[2])return!0}mc=mc.parentNode}while(mc&&mc!==document.body);return!1},cg=function(pb,mc){return"v"===pb?oh(mc,"overflowY"):oh(mc,"overflowX")},zk=function(pb,mc){return"v"===
pb?[(yc=mc).scrollTop,yc.scrollHeight,yc.clientHeight]:[mc.scrollLeft,mc.scrollWidth,mc.clientWidth];var yc},ll=function(pb){return"changedTouches"in pb?[pb.changedTouches[0].clientX,pb.changedTouches[0].clientY]:[0,0]},dh=function(pb){return pb&&"current"in pb?pb.current:pb},kk=function(pb){return"\n .block-interactivity-".concat(pb," {pointer-events: none;}\n .allow-interactivity-").concat(pb," {pointer-events: all;}\n")},Zk=0,mj=[],ml,Ch=(ml=function(pb){var mc=Lb.useRef([]),yc=Lb.useRef([0,
0]),Tc=Lb.useRef(),$c=Lb.useState(Zk++)[0],ld=Lb.useState(function(){return jk()})[0],Ed=Lb.useRef(pb);Lb.useEffect(function(){Ed.current=pb},[pb]);Lb.useEffect(function(){if(pb.inert){document.body.classList.add("block-interactivity-".concat($c));var Nd=function(Le,ne,Qf){if(Qf||2===arguments.length)for(var ee,Qe=0,rf=ne.length;Qe<rf;Qe++)!ee&&Qe in ne||(ee||=Array.prototype.slice.call(ne,0,Qe),ee[Qe]=ne[Qe]);return Le.concat(ee||Array.prototype.slice.call(ne))}([pb.lockRef.current],(pb.shards||
[]).map(dh),!0).filter(Boolean);return Nd.forEach(function(Le){return Le.classList.add("allow-interactivity-".concat($c))}),function(){document.body.classList.remove("block-interactivity-".concat($c));Nd.forEach(function(Le){return Le.classList.remove("allow-interactivity-".concat($c))})}}},[pb.inert,pb.lockRef.current,pb.shards]);var Xd=Lb.useCallback(function(Nd,Le){if("touches"in Nd&&2===Nd.touches.length)return!Ed.current.allowPinchZoom;var ne,Qf=ll(Nd),ee=yc.current,Qe="deltaX"in Nd?Nd.deltaX:
ee[0]-Qf[0];Qf="deltaY"in Nd?Nd.deltaY:ee[1]-Qf[1];ee=Nd.target;var rf=Math.abs(Qe)>Math.abs(Qf)?"h":"v";if("touches"in Nd&&"h"===rf&&"range"===ee.type)return!1;var sg=wf(rf,ee);if(!sg)return!0;if(sg?ne=rf:(ne="v"===rf?"h":"v",sg=wf(rf,ee)),!sg)return!1;if(!Tc.current&&"changedTouches"in Nd&&(Qe||Qf)&&(Tc.current=ne),!ne)return!0;ne=Tc.current||ne;Qf="h"===ne?Qe:Qf;Qe=window.getComputedStyle(Le).direction;Qe="h"===ne&&"rtl"===Qe?-1:1;rf=Qe*Qf;Nd=Nd.target;Qf=Le.contains(Nd);ee=!1;rf=0<rf;var Jg=sg=
0;do{var Mg=zk(ne,Nd),Oe=Mg[0];Mg=Mg[1]-Mg[2]-Qe*Oe;(Oe||Mg)&&cg(ne,Nd)&&(sg+=Mg,Jg+=Oe);Nd=Nd.parentNode}while(!Qf&&Nd!==document.body||Qf&&(Le.contains(Nd)||Le===Nd));return(rf&&(0===sg||!1)||!rf&&(0===Jg||!1))&&(ee=!0),ee},[]),oe=Lb.useCallback(function(Nd){if(mj.length&&mj[mj.length-1]===ld){var Le="deltaY"in Nd?[Nd.deltaX,Nd.deltaY]:ll(Nd),ne=mc.current.filter(function(Qf){var ee;if(ee=Qf.name===Nd.type&&Qf.target===Nd.target)Qf=Qf.delta,ee=Qf[0]===Le[0]&&Qf[1]===Le[1];return ee})[0];ne&&ne.should?
Nd.cancelable&&Nd.preventDefault():ne||(ne=(Ed.current.shards||[]).map(dh).filter(Boolean).filter(function(Qf){return Qf.contains(Nd.target)}),(0<ne.length?Xd(Nd,ne[0]):!Ed.current.noIsolation)&&Nd.cancelable&&Nd.preventDefault())}},[]),ye=Lb.useCallback(function(Nd,Le,ne,Qf){var ee={name:Nd,delta:Le,target:ne,should:Qf};mc.current.push(ee);setTimeout(function(){mc.current=mc.current.filter(function(Qe){return Qe!==ee})},1)},[]),ie=Lb.useCallback(function(Nd){yc.current=ll(Nd);Tc.current=void 0},
[]),se=Lb.useCallback(function(Nd){ye(Nd.type,[Nd.deltaX,Nd.deltaY],Nd.target,Xd(Nd,pb.lockRef.current))},[]),Ke=Lb.useCallback(function(Nd){ye(Nd.type,ll(Nd),Nd.target,Xd(Nd,pb.lockRef.current))},[]);Lb.useEffect(function(){return mj.push(ld),pb.setCallbacks({onScrollCapture:se,onWheelCapture:se,onTouchMoveCapture:Ke}),document.addEventListener("wheel",oe,Xj),document.addEventListener("touchmove",oe,Xj),document.addEventListener("touchstart",ie,Xj),function(){mj=mj.filter(function(Nd){return Nd!==
ld});document.removeEventListener("wheel",oe,Xj);document.removeEventListener("touchmove",oe,Xj);document.removeEventListener("touchstart",ie,Xj)}},[]);var Se=pb.removeScrollBar;return Lb.createElement(Lb.Fragment,null,pb.inert?Lb.createElement(ld,{styles:kk($c)}):null,Se?Lb.createElement(Wl,{gapMode:"margin"}):null)},ti.useMedium(ml),Lk),Yj=Lb.forwardRef(function(pb,mc){return Lb.createElement(Rj,hh({},pb,{ref:mc,sideCar:Ch}))});Yj.classNames=Rj.classNames;const [$k]=(0,Jc.b)("Popover",[ve]),Ej=
ve(),[mg,hg]=$k("Popover"),qf=(0,Lb.forwardRef)((pb,mc)=>{const {__scopePopover:yc,...Tc}=pb,$c=hg("PopoverTrigger",yc),ld=Ej(yc);mc=(0,Bc.e)(mc,$c.triggerRef);pb=(0,Lb.createElement)(ic.WV.button,(0,Nb.Z)({type:"button","aria-haspopup":"dialog","aria-expanded":$c.open,"aria-controls":$c.contentId,"data-state":$c.open?"open":"closed"},Tc,{ref:mc,onClick:(0,fc.M)(pb.onClick,$c.onOpenToggle)}));return $c.hasCustomAnchor?pb:(0,Lb.createElement)(Ab,(0,Nb.Z)({asChild:!0},ld),pb)}),[nj,Zh]=$k("PopoverPortal",
{forceMount:void 0}),ui=(0,Lb.forwardRef)((pb,mc)=>{const yc=Zh("PopoverContent",pb.__scopePopover),{forceMount:Tc=yc.forceMount,...$c}=pb;pb=hg("PopoverContent",pb.__scopePopover);return(0,Lb.createElement)(Wd.z,{present:Tc||pb.open},pb.modal?(0,Lb.createElement)(oj,(0,Nb.Z)({},$c,{ref:mc})):(0,Lb.createElement)(Tg,(0,Nb.Z)({},$c,{ref:mc})))}),oj=(0,Lb.forwardRef)((pb,mc)=>{const yc=hg("PopoverContent",pb.__scopePopover),Tc=(0,Lb.useRef)(null);mc=(0,Bc.e)(mc,Tc);const $c=(0,Lb.useRef)(!1);return(0,Lb.useEffect)(()=>
{const ld=Tc.current;if(ld)return Uf(ld)},[]),(0,Lb.createElement)(Yj,{as:re.g7,allowPinchZoom:!0},(0,Lb.createElement)($h,(0,Nb.Z)({},pb,{ref:mc,trapFocus:yc.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:(0,fc.M)(pb.onCloseAutoFocus,ld=>{var Ed;ld.preventDefault();$c.current||null===(Ed=yc.triggerRef.current)||void 0===Ed||Ed.focus()}),onPointerDownOutside:(0,fc.M)(pb.onPointerDownOutside,ld=>{ld=ld.detail.originalEvent;const Ed=0===ld.button&&!0===ld.ctrlKey;$c.current=2===ld.button||Ed},
{checkForDefaultPrevented:!1}),onFocusOutside:(0,fc.M)(pb.onFocusOutside,ld=>ld.preventDefault(),{checkForDefaultPrevented:!1})})))}),Tg=(0,Lb.forwardRef)((pb,mc)=>{const yc=hg("PopoverContent",pb.__scopePopover),Tc=(0,Lb.useRef)(!1);return(0,Lb.createElement)($h,(0,Nb.Z)({},pb,{ref:mc,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:$c=>{var ld,Ed;(null===(ld=pb.onCloseAutoFocus)||void 0===ld||ld.call(pb,$c),$c.defaultPrevented)||(Tc.current||null===(Ed=yc.triggerRef.current)||void 0===
Ed||Ed.focus(),$c.preventDefault());Tc.current=!1},onInteractOutside:$c=>{var ld,Ed;null===(ld=pb.onInteractOutside)||void 0===ld||ld.call(pb,$c);$c.defaultPrevented||(Tc.current=!0);ld=$c.target;(null===(Ed=yc.triggerRef.current)||void 0===Ed?0:Ed.contains(ld))&&$c.preventDefault()}}))}),$h=(0,Lb.forwardRef)((pb,mc)=>{const {__scopePopover:yc,trapFocus:Tc,onOpenAutoFocus:$c,onCloseAutoFocus:ld,disableOutsidePointerEvents:Ed,onEscapeKeyDown:Xd,onPointerDownOutside:oe,onFocusOutside:ye,onInteractOutside:ie,
...se}=pb,Ke=hg("PopoverContent",yc);pb=Ej(yc);return p(),(0,Lb.createElement)(je,{asChild:!0,loop:!0,trapped:Tc,onMountAutoFocus:$c,onUnmountAutoFocus:ld},(0,Lb.createElement)(pd,{asChild:!0,disableOutsidePointerEvents:Ed,onInteractOutside:ie,onEscapeKeyDown:Xd,onPointerDownOutside:oe,onFocusOutside:ye,onDismiss:()=>Ke.onOpenChange(!1)},(0,Lb.createElement)(qa,(0,Nb.Z)({"data-state":Ke.open?"open":"closed",role:"dialog",id:Ke.contentId},pb,se,{ref:mc,style:{...se.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)"}}))))}),
fj=(0,Lb.forwardRef)((pb,mc)=>{const {__scopePopover:yc,...Tc}=pb;pb=Ej(yc);return(0,Lb.createElement)(Ta,(0,Nb.Z)({},pb,Tc,{ref:mc}))}),El=pb=>{const {__scopePopover:mc,children:yc,open:Tc,defaultOpen:$c,onOpenChange:ld,modal:Ed=!1}=pb;pb=Ej(mc);const Xd=(0,Lb.useRef)(null),[oe,ye]=(0,Lb.useState)(!1),[ie=!1,se]=(0,xe.T)({prop:Tc,defaultProp:$c,onChange:ld});return(0,Lb.createElement)(Hc,pb,(0,Lb.createElement)(mg,{scope:mc,contentId:(0,qe.M)(),triggerRef:Xd,open:ie,onOpenChange:se,onOpenToggle:(0,Lb.useCallback)(()=>
se(Ke=>!Ke),[se]),hasCustomAnchor:oe,onCustomAnchorAdd:(0,Lb.useCallback)(()=>ye(!0),[]),onCustomAnchorRemove:(0,Lb.useCallback)(()=>ye(!1),[]),modal:Ed},yc))},Of=pb=>{const {__scopePopover:mc,forceMount:yc,children:Tc,container:$c}=pb;pb=hg("PopoverPortal",mc);return(0,Lb.createElement)(nj,{scope:mc,forceMount:yc},(0,Lb.createElement)(Wd.z,{present:yc||pb.open},(0,Lb.createElement)(Wc,{asChild:!0,container:$c},Tc)))};var Ni=b(3470),wh=b(593),nl=b(1119),Sj=b(8913),im=function(pb){var mc=pb.color,
yc=pb.onChange,Tc=pb.label,$c=pb.colorPickerType;pb=(0,Ni.Fy)();var ld=(0,Lb.useState)(mc),Ed=(0,Wa.Z)(ld,2);ld=Ed[0];var Xd=Ed[1];Ed=(0,pc.KO)(Qc);var oe=(0,Wa.Z)(Ed,2);Ed=oe[0];var ye=oe[1];(0,Lb.useEffect)(function(){Xd(mc)},[mc]);var ie=(0,Lb.useCallback)(function(Le){Le=Le.toLowerCase();var ne=ni(Le);ne&&yc(ne);Xd(Le)},[yc]),se=(0,Lb.useRef)(null),Ke=(0,Lb.useRef)(null);(0,Lb.useEffect)(function(){se.current&&se.current.focus()},[Ed]);oe=(0,pc.KO)(Sj.$,wh.yE);oe=(0,Wa.Z)(oe,2);var Se=oe[0],Nd=
oe[1];return(0,Lb.useEffect)(function(){return function(){Nd(null)}},[Nd]),(0,bb.jsxs)("div",{className:"color-picker__input-label",children:[(0,bb.jsx)("div",{className:"color-picker__input-hash",children:"#"}),(0,bb.jsx)("input",{ref:"hex"===Ed?se:void 0,style:{border:0,padding:0},spellCheck:!1,className:"color-picker-input","aria-label":Tc,onChange:function(Le){ie(Le.target.value)},value:(ld||"").replace(/^#/,""),onBlur:function(){Xd(mc)},tabIndex:-1,onFocus:function(){return ye("hex")},onKeyDown:function(Le){var ne;
Le.key!==Ib.tW.TAB&&(Le.key===Ib.tW.ESCAPE&&(null===(ne=Ke.current)||void 0===ne||ne.focus()),Le.stopPropagation())}}),!pb.isMobile&&(0,bb.jsxs)(bb.Fragment,{children:[(0,bb.jsx)("div",{style:{width:"1px",height:"1.25rem",backgroundColor:"var(--default-border-color)"}}),(0,bb.jsx)("div",{ref:Ke,className:(0,ab.Z)("excalidraw-eye-dropper-trigger",{selected:Se}),onClick:function(){return Nd(function(Le){return Le?null:{keepOpenOnAlt:!1,onSelect:function(ne){return yc(ne)},colorPickerType:$c}})},title:"".concat((0,oc.t)("labels.eyeDropper"),
" — ").concat(Ib.tW.I.toLocaleUpperCase()," or ").concat((0,hb.uY)("Alt")," "),children:nl.$W})]})]})},Fj=b(3379),Oi=b.n(Fj),Zi=b(7795),Mk=b.n(Zi),Nk=b(569),ah=b.n(Nk),ai=b(3565),Ph=b.n(ai),Ak=b(9216),al=b.n(Ak),bi=b(4589),bl=b.n(bi),Di=b(4269),mi={};mi.styleTagTransform=bl();mi.setAttributes=Ph();mi.insert=ah().bind(null,"head");mi.domAPI=Mk();mi.insertStyleElement=al();Oi()(Di.Z,mi);Di.Z&&Di.Z.locals&&Di.Z.locals;var Zj=function(pb){var mc=(new Option).style;return mc.color=pb,!!mc.color},ni=function(pb){return(0,hb.Qm)(pb)?
pb:Zj("#".concat(pb))?"#".concat(pb):Zj(pb)?pb:null},Dh=function(pb){var mc=pb.type,yc=pb.color,Tc=pb.onChange,$c=pb.label,ld=pb.elements,Ed=pb.palette;Ed=void 0===Ed?Qa.HO:Ed;var Xd=pb.updateData;pb=(0,pc.KO)(Qc);var oe=(0,Wa.Z)(pb,2)[1];pb=(0,pc.KO)(Sj.$,wh.yE);pb=(0,Wa.Z)(pb,2);var ye=pb[0],ie=pb[1],se=(0,Ni.J0)().container,Ke=(0,Ni.Fy)();pb=Ke.isMobile;Ke=Ke.isLandscape;var Se=(0,bb.jsxs)("div",{children:[(0,bb.jsx)(Gb,{children:(0,oc.t)("colorPicker.hexCode")}),(0,bb.jsx)(im,{color:yc,label:$c,
onChange:function(ne){Tc(ne)},colorPickerType:mc})]}),Nd=(0,Lb.useRef)(null),Le=function(){var ne,Qf;null===(ne=Nd.current)||void 0===ne||null===(Qf=ne.querySelector(".color-picker-content"))||void 0===Qf||Qf.focus()};return(0,bb.jsx)(Of,{container:se,children:(0,bb.jsxs)(ui,{ref:Nd,className:"focus-visible-none","data-prevent-outside-click":!0,onFocusOutside:function(ne){Le();ne.preventDefault()},onPointerDownOutside:function(ne){ye&&ne.preventDefault()},onCloseAutoFocus:function(ne){ne.stopPropagation();
ne.preventDefault();se&&!(0,hb.y1)(document.activeElement)&&se.focus();Xd({openPopup:null});oe(null)},side:pb&&!Ke?"bottom":"right",align:pb&&!Ke?"center":"start",alignOffset:-16,sideOffset:20,style:{zIndex:"var(--zIndex-layerUI)",backgroundColor:"var(--popup-bg-color)",maxWidth:"208px",maxHeight:window.innerHeight,padding:"12px",borderRadius:"8px",boxSizing:"border-box",overflowY:"auto",boxShadow:"0px 7px 14px rgba(0, 0, 0, 0.05), 0px 0px 3.12708px rgba(0, 0, 0, 0.0798), 0px 0px 0.931014px rgba(0, 0, 0, 0.1702)"},
children:[Ed?(0,bb.jsx)(rb,{palette:Ed,color:yc,onChange:function(ne){Tc(ne)},onEyeDropperToggle:function(ne){ie(function(Qf){return ne?((Qf=Qf||{keepOpenOnAlt:!0,onSelect:Tc,colorPickerType:mc}).keepOpenOnAlt=!0,Qf):!1===ne||Qf?null:{keepOpenOnAlt:!1,onSelect:Tc,colorPickerType:mc}})},onEscape:function(ne){ye?ie(null):(0,hb.s)(ne.target)?Le():Xd({openPopup:null})},label:$c,type:mc,elements:ld,updateData:Xd,children:Se}):Se,(0,bb.jsx)(fj,{width:20,height:10,style:{fill:"var(--popup-bg-color)",filter:"drop-shadow(rgba(0, 0, 0, 0.05) 0px 3px 2px)"}})]})})},
vi=function(pb){var mc=pb.label,yc=pb.color;pb=pb.type;return(0,bb.jsx)(qf,{type:"button",className:(0,ab.Z)("color-picker__button active-color",{"is-transparent":"transparent"===yc||!yc}),"aria-label":mc,style:yc?{"--swatch-color":yc}:void 0,title:"elementStroke"===pb?(0,oc.t)("labels.showStroke"):(0,oc.t)("labels.showBackground"),children:(0,bb.jsx)("div",{className:"color-picker__button-outline"})})},$i=function(pb){var mc=pb.type,yc=pb.color,Tc=pb.onChange,$c=pb.label,ld=pb.elements,Ed=pb.palette;
Ed=void 0===Ed?Qa.HO:Ed;var Xd=pb.updateData,oe=pb.appState;return(0,bb.jsx)("div",{children:(0,bb.jsxs)("div",{role:"dialog","aria-modal":"true",className:"color-picker-container",children:[(0,bb.jsx)(Pa,{activeColor:yc,onChange:Tc,type:mc,topPicks:pb.topPicks}),(0,bb.jsx)("div",{style:{width:1,height:"100%",backgroundColor:"var(--default-border-color)",margin:"0 auto"}}),(0,bb.jsxs)(El,{open:oe.openPopup===mc,onOpenChange:function(ye){Xd({openPopup:ye?mc:null})},children:[(0,bb.jsx)(vi,{color:yc,
label:$c,type:mc}),oe.openPopup===mc&&(0,bb.jsx)(Dh,{type:mc,color:yc,onChange:Tc,label:$c,elements:ld,palette:Ed,updateData:Xd})]})]})})}},7975:function(g,h,b){function l(M,I){var ia=Object.keys(M);if(Object.getOwnPropertySymbols){var U=Object.getOwnPropertySymbols(M);I&&(U=U.filter(function(Z){return Object.getOwnPropertyDescriptor(M,Z).enumerable}));ia.push.apply(ia,U)}return ia}function m(M){for(var I=1;I<arguments.length;I++){var ia=null!=arguments[I]?arguments[I]:{};I%2?l(Object(ia),!0).forEach(function(U){(0,p.Z)(M,
U,ia[U])}):Object.getOwnPropertyDescriptors?Object.defineProperties(M,Object.getOwnPropertyDescriptors(ia)):l(Object(ia)).forEach(function(U){Object.defineProperty(M,U,Object.getOwnPropertyDescriptor(ia,U))})}return M}b.d(h,{Z:function(){return O}});var p=b(7169),D=b(2726),v=b(8557),t=b(810);g=b(3379);g=b.n(g);h=b(7795);h=b.n(h);var r=b(569);r=b.n(r);var f=b(3565);f=b.n(f);var E=b(9216);E=b.n(E);var B=b(4589);B=b.n(B);var J=b(9393),V={};V.styleTagTransform=B();V.setAttributes=f();V.insert=r().bind(null,
"head");V.domAPI=h();V.insertStyleElement=E();g()(J.Z,V);J.Z&&J.Z.locals&&J.Z.locals;var H=b(7003),S=b(3607),L=b(8136),T=b(3470),R=b(593),G=b(4512),F="onConfirm onCancel children confirmText cancelText className".split(" "),O=function(M){var I=M.onConfirm,ia=M.onCancel,U=M.children,Z=M.confirmText;Z=void 0===Z?(0,v.t)("buttons.confirm"):Z;var aa=M.cancelText;aa=void 0===aa?(0,v.t)("buttons.cancel"):aa;var W=M.className;W=void 0===W?"":W;M=(0,D.Z)(M,F);var fa=(0,T.n9)(),X=(0,S.b9)(L.uh,R.yE),ea=(0,T.J0)().container;
return(0,G.jsxs)(t.V,m(m({onCloseRequest:ia,size:"small"},M),{},{className:"confirm-dialog ".concat(W),children:[U,(0,G.jsxs)("div",{className:"confirm-dialog-buttons",children:[(0,G.jsx)(H.Z,{label:aa,onClick:function(){fa({openMenu:null});X(!1);ia();null==ea||ea.focus()}}),(0,G.jsx)(H.Z,{label:Z,onClick:function(){fa({openMenu:null});X(!1);I();null==ea||ea.focus()},actionType:"danger"})]})]}))}},5553:function(g,h,b){function l(F,O){var M=Object.keys(F);if(Object.getOwnPropertySymbols){var I=Object.getOwnPropertySymbols(F);
O&&(I=I.filter(function(ia){return Object.getOwnPropertyDescriptor(F,ia).enumerable}));M.push.apply(M,I)}return M}function m(F){for(var O=1;O<arguments.length;O++){var M=null!=arguments[O]?arguments[O]:{};O%2?l(Object(M),!0).forEach(function(I){(0,D.Z)(F,I,M[I])}):Object.getOwnPropertyDescriptors?Object.defineProperties(F,Object.getOwnPropertyDescriptors(M)):l(Object(M)).forEach(function(I){Object.defineProperty(F,I,Object.getOwnPropertyDescriptor(M,I))})}return F}b.d(h,{O:function(){return G}});
var p=b(2726),D=b(7169),v=b(45),t=b(7041),r=b(5371),f=b(5990),E=b(8557),B=b(7135),J=b(3470);g=b(3375);var V=b(8136),H=b(3441),S=b(4512),L=b(9787),T=["children"],R=["children","className","onDock","docked"];b=(0,g.$)("DefaultSidebarTrigger",function(F){var O=(0,r.R6)().DefaultSidebarTriggerTunnel;return(0,S.jsx)(O.In,{children:(0,S.jsx)(H.YE.Trigger,m(m({},F),{},{className:"default-sidebar-trigger",name:t.Cc.name}))})});b.displayName="DefaultSidebarTrigger";h=function(F){var O=F.children;F=(0,p.Z)(F,
T);var M=(0,r.R6)().DefaultSidebarTabTriggersTunnel;return(0,S.jsx)(M.In,{children:(0,S.jsx)(H.YE.TabTriggers,m(m({},F),{},{children:O}))})};h.displayName="DefaultTabTriggers";var G=Object.assign((0,g.$)("DefaultSidebar",function(F){var O=F.children,M=F.className,I=F.onDock,ia=F.docked;F=(0,p.Z)(F,R);var U=(0,f.I)(),Z=(0,J.n9)(),aa=(0,r.R6)().DefaultSidebarTabTriggersTunnel;return(0,L.createElement)(H.YE,m(m({},F),{},{name:"default",key:"default",className:(0,v.Z)("default-sidebar",M),docked:null!=
ia?ia:U.defaultSidebarDockedPreference,onDock:!1===I||!I&&null!=ia?void 0:(0,B.Mj)(I,function(W){Z({defaultSidebarDockedPreference:W})})}),(0,S.jsxs)(H.YE.Tabs,{children:[(0,S.jsxs)(H.YE.Header,{children:[F.__fallback&&(0,S.jsx)("div",{style:{color:"var(--color-primary)",fontSize:"1.2em",fontWeight:"bold",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",paddingRight:"1em"},children:(0,E.t)("toolBar.library")}),(0,S.jsx)(aa.Out,{})]}),(0,S.jsx)(H.YE.Tab,{tab:t.tf,children:(0,S.jsx)(V.rY,
{})}),O]}))}),{Trigger:b,TabTriggers:h})},810:function(g,h,b){function l(Z){if(Z&&"number"==typeof Z)return Z;switch(Z){case "small":return 550;case "wide":return 1024;default:return 800}}b.d(h,{V:function(){return U}});var m=b(2577),p=b(45),D=b(9787),v=b(8557),t=b(3470),r=b(6331);g=b(3379);g=b.n(g);h=b(7795);h=b.n(h);var f=b(569);f=b.n(f);var E=b(3565);E=b.n(E);var B=b(9216);B=b.n(B);var J=b(4589);J=b.n(J);var V=b(9482),H={};H.styleTagTransform=J();H.setAttributes=E();H.insert=f().bind(null,"head");
H.domAPI=h();H.insertStyleElement=B();g()(V.Z,H);V.Z&&V.Z.locals&&V.Z.locals;var S=b(1119),L=b(8972);V=b(6843);H={};H.styleTagTransform=J();H.setAttributes=E();H.insert=f().bind(null,"head");H.domAPI=h();H.insertStyleElement=B();g()(V.Z,H);V.Z&&V.Z.locals&&V.Z.locals;var T=b(5156),R=b(7124),G=b(4512),F=function(Z){var aa=Z.closeOnClickOutside;aa=void 0===aa||aa;var W=(0,R.F)({className:"excalidraw-modal-container"});return W?(0,T.createPortal)((0,G.jsxs)("div",{className:(0,p.Z)("Modal",Z.className),
role:"dialog","aria-modal":"true",onKeyDown:function(fa){fa.key===r.tW.ESCAPE&&(fa.nativeEvent.stopImmediatePropagation(),fa.stopPropagation(),Z.onCloseRequest())},"aria-labelledby":Z.labelledBy,"data-prevent-outside-click":!0,children:[(0,G.jsx)("div",{className:"Modal__background",onClick:aa?Z.onCloseRequest:void 0}),(0,G.jsx)("div",{className:"Modal__content",style:{"--max-width":"".concat(Z.maxWidth,"px")},tabIndex:0,children:Z.children})]}),W):null},O=b(7135),M=b(3607),I=b(8136),ia=b(593),U=
function(Z){var aa=function(){var xa=(0,D.useState)(null);xa=(0,m.Z)(xa,2);var Ga=xa[1];return[xa[0],(0,D.useCallback)(function(Ia){return Ga(Ia)},[])]}();aa=(0,m.Z)(aa,2);var W=aa[0];aa=aa[1];var fa=(0,D.useState)(document.activeElement),X=(0,m.Z)(fa,1)[0];fa=(0,t.J0)().id;var ea=(0,t.Fy)();(0,D.useEffect)(function(){if(W){var xa=(0,O.xp)(W);0<xa.length&&!1!==Z.autofocus&&(xa[1]||xa[0]).focus();var Ga=function(Ia){if(Ia.key===r.tW.TAB){var Ya=(0,O.xp)(W),Fa=document.activeElement,Ka=Ya.findIndex(function(Ba){return Ba===
Fa});0===Ka&&Ia.shiftKey?(Ya[Ya.length-1].focus(),Ia.preventDefault()):Ka!==Ya.length-1||Ia.shiftKey||(Ya[0].focus(),Ia.preventDefault())}};return W.addEventListener("keydown",Ga),function(){return W.removeEventListener("keydown",Ga)}}},[W,Z.autofocus]);var pa=(0,t.n9)(),va=(0,M.b9)(I.uh,ia.yE),ta=function(){pa({openMenu:null});va(!1);X.focus();Z.onCloseRequest()};return(0,G.jsx)(F,{className:(0,p.Z)("Dialog",Z.className),labelledBy:"dialog-title",maxWidth:l(Z.size),onCloseRequest:ta,closeOnClickOutside:Z.closeOnClickOutside,
children:(0,G.jsxs)(L.W,{ref:aa,children:[Z.title&&(0,G.jsx)("h2",{id:"".concat(fa,"-dialog-title"),className:"Dialog__title",children:(0,G.jsx)("span",{className:"Dialog__titleContent",children:Z.title})}),(0,G.jsx)("button",{className:"Dialog__close",onClick:ta,title:(0,v.t)("buttons.close"),"aria-label":(0,v.t)("buttons.close"),children:ea.isMobile?S.op:S.Tw}),(0,G.jsx)("div",{className:"Dialog__content",children:Z.children})]})})}},7003:function(g,h,b){function l(T,R){var G=Object.keys(T);if(Object.getOwnPropertySymbols){var F=
Object.getOwnPropertySymbols(T);R&&(F=F.filter(function(O){return Object.getOwnPropertyDescriptor(T,O).enumerable}));G.push.apply(G,F)}return G}function m(T){for(var R=1;R<arguments.length;R++){var G=null!=arguments[R]?arguments[R]:{};R%2?l(Object(G),!0).forEach(function(F){(0,p.Z)(T,F,G[F])}):Object.getOwnPropertyDescriptors?Object.defineProperties(T,Object.getOwnPropertyDescriptors(G)):l(Object(G)).forEach(function(F){Object.defineProperty(T,F,Object.getOwnPropertyDescriptor(G,F))})}return T}b.d(h,
{Z:function(){return L}});var p=b(7169),D=b(2726),v=b(45);g=b(3379);g=b.n(g);h=b(7795);h=b.n(h);var t=b(569);t=b.n(t);var r=b(3565);r=b.n(r);var f=b(9216);f=b.n(f);var E=b(4589);E=b.n(E);var B=b(6148),J={};J.styleTagTransform=E();J.setAttributes=r();J.insert=t().bind(null,"head");J.domAPI=h();J.insertStyleElement=f();g()(B.Z,J);B.Z&&B.Z.locals&&B.Z.locals;var V=b(399),H=b(4512),S="label onClick className children actionType type isLoading".split(" "),L=function(T){var R=T.label,G=T.onClick,F=T.className,
O=T.children,M=T.actionType,I=T.type;I=void 0===I?"button":I;var ia=T.isLoading;T=(0,D.Z)(T,S);M=M?"Dialog__action-button--".concat(M):"";return(0,H.jsxs)("button",m(m({className:(0,v.Z)("Dialog__action-button",M,F),type:I,"aria-label":R,onClick:G},T),{},{children:[O&&(0,H.jsx)("div",{style:ia?{visibility:"hidden"}:{},children:O}),(0,H.jsx)("div",{style:ia?{visibility:"hidden"}:{},children:R}),ia&&(0,H.jsx)("div",{style:{position:"absolute",inset:0},children:(0,H.jsx)(V.Z,{})})]}))}},8913:function(g,
h,b){b.d(h,{p:function(){return O},$:function(){return F}});g=b(3607);var l=b(9787),m=b(5156),p=b(8127),D=b(7041),v=b(5990),t=b(7124),r=b(4358),f=b(6331),E=b(9547),B=b(3470);h=b(3379);h=b.n(h);var J=b(7795);J=b.n(J);var V=b(569);V=b.n(V);var H=b(3565);H=b.n(H);var S=b(9216);S=b.n(S);var L=b(4589);L=b.n(L);var T=b(7522),R={};R.styleTagTransform=L();R.setAttributes=H();R.insert=V().bind(null,"head");R.domAPI=J();R.insertStyleElement=S();h()(T.Z,R);T.Z&&T.Z.locals&&T.Z.locals;var G=b(4512),F=(0,g.cn)(null),
O=function(M){var I=M.onCancel,ia=M.onChange,U=M.onSelect,Z=M.colorPickerType,aa=(0,t.F)({className:"excalidraw-eye-dropper-backdrop",parentSelector:".excalidraw-eye-dropper-container"}),W=(0,v.I)();M=(0,B.bd)();var fa=(0,B.qD)();M=(0,E.eD)(M,W);var X=function(va){var ta=(0,l.useRef)(va);return Object.assign(ta.current,va),ta.current}({app:fa,onCancel:I,onChange:ia,onSelect:U,selectedElements:M}),ea=(0,B.J0)().container;(0,l.useEffect)(function(){var va=pa.current;if(va&&fa.canvas&&aa){var ta=!1,
xa=fa.canvas.getContext("2d"),Ga=function(la){la=xa.getImageData((la.clientX-W.offsetLeft)*window.devicePixelRatio,(la.clientY-W.offsetTop)*window.devicePixelRatio,1,1).data;return(0,p.vq)(la[0],la[1],la[2])},Ia=function(la){var ka=la.clientX,ua=la.clientY;la=la.altKey;va.style.top="".concat(ua+20,"px");va.style.left="".concat(ka+20,"px");ka=Ga({clientX:ka,clientY:ua});ta&&X.onChange(Z,ka,X.selectedElements,{altKey:la});va.style.background=ka},Ya=function(){X.onCancel()},Fa=function(la){ta=!0;la.stopImmediatePropagation()},
Ka=function(la){ta=!1;null==ea||ea.focus();la.stopImmediatePropagation();la.preventDefault();var ka=Ga(la);X.onSelect(ka,la)},Ba=function(la){la.key===f.tW.ESCAPE&&(la.preventDefault(),la.stopImmediatePropagation(),Ya())};return aa.tabIndex=-1,aa.focus(),Ia({clientX:X.app.lastViewportPosition.x,clientY:X.app.lastViewportPosition.y,altKey:!1}),aa.addEventListener(D.Ks.KEYDOWN,Ba),aa.addEventListener(D.Ks.POINTER_DOWN,Fa),aa.addEventListener(D.Ks.POINTER_UP,Ka),window.addEventListener("pointermove",
Ia,{passive:!0}),window.addEventListener(D.Ks.BLUR,Ya),function(){ta=!1;aa.removeEventListener(D.Ks.KEYDOWN,Ba);aa.removeEventListener(D.Ks.POINTER_DOWN,Fa);aa.removeEventListener(D.Ks.POINTER_UP,Ka);window.removeEventListener("pointermove",Ia);window.removeEventListener(D.Ks.BLUR,Ya)}}},[X,fa.canvas,aa,Z,ea,W.offsetLeft,W.offsetTop]);var pa=(0,l.useRef)(null);return(0,r.O)(pa,function(){I()},function(va){return!!va.target.closest(".excalidraw-eye-dropper-trigger, .excalidraw-eye-dropper-backdrop")}),
aa?(0,m.createPortal)((0,G.jsx)("div",{ref:pa,className:"excalidraw-eye-dropper-preview"}),aa):null}},8972:function(g,h,b){function l(H,S){var L=Object.keys(H);if(Object.getOwnPropertySymbols){var T=Object.getOwnPropertySymbols(H);S&&(T=T.filter(function(R){return Object.getOwnPropertyDescriptor(H,R).enumerable}));L.push.apply(L,T)}return L}function m(H){for(var S=1;S<arguments.length;S++){var L=null!=arguments[S]?arguments[S]:{};S%2?l(Object(L),!0).forEach(function(T){(0,p.Z)(H,T,L[T])}):Object.getOwnPropertyDescriptors?
Object.defineProperties(H,Object.getOwnPropertyDescriptors(L)):l(Object(L)).forEach(function(T){Object.defineProperty(H,T,Object.getOwnPropertyDescriptor(L,T))})}return H}b.d(h,{W:function(){return V}});var p=b(7169);g=b(3379);g=b.n(g);h=b(7795);h=b.n(h);var D=b(569);D=b.n(D);var v=b(3565);v=b.n(v);var t=b(9216);t=b.n(t);var r=b(4589);r=b.n(r);var f=b(7369),E={};E.styleTagTransform=r();E.setAttributes=v();E.insert=D().bind(null,"head");E.domAPI=h();E.insertStyleElement=t();g()(f.Z,E);f.Z&&f.Z.locals&&
f.Z.locals;g=b(9787);g=b.n(g);var B=b(45),J=b(4512),V=g().forwardRef(function(H,S){var L=H.children,T=H.padding,R=H.style;return(0,J.jsx)("div",{className:(0,B.Z)("Island",H.className),style:m({"--padding":T},R),ref:S,children:L})})},8136:function(g,h,b){function l(Ib,lb){var Db=Object.keys(Ib);if(Object.getOwnPropertySymbols){var Gb=Object.getOwnPropertySymbols(Ib);lb&&(Gb=Gb.filter(function(db){return Object.getOwnPropertyDescriptor(Ib,db).enumerable}));Db.push.apply(Db,Gb)}return Db}function m(Ib){for(var lb=
1;lb<arguments.length;lb++){var Db=null!=arguments[lb]?arguments[lb]:{};lb%2?l(Object(Db),!0).forEach(function(Gb){(0,O.Z)(Ib,Gb,Db[Gb])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Ib,Object.getOwnPropertyDescriptors(Db)):l(Object(Db)).forEach(function(Gb){Object.defineProperty(Ib,Gb,Object.getOwnPropertyDescriptor(Db,Gb))})}return Ib}function p(Ib,lb){var Db="undefined"!=typeof Symbol&&Ib[Symbol.iterator]||Ib["@@iterator"];if(!Db){if(Array.isArray(Ib)||(Db=function(fc,Bc){if(fc){if("string"==
typeof fc)return D(fc,Bc);var Jc=Object.prototype.toString.call(fc).slice(8,-1);"Object"===Jc&&fc.constructor&&(Jc=fc.constructor.name);if("Map"===Jc||"Set"===Jc)return Array.from(fc);if("Arguments"===Jc||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Jc))return D(fc,Bc)}}(Ib))||lb&&Ib&&"number"==typeof Ib.length){Db&&(Ib=Db);var Gb=0;lb=function(){};return{s:lb,n:function(){return Gb>=Ib.length?{done:!0}:{done:!1,value:Ib[Gb++]}},e:function(fc){throw fc;},f:lb}}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 db,rb=!0,Nb=!1;return{s:function(){Db=Db.call(Ib)},n:function(){var fc=Db.next();return rb=fc.done,fc},e:function(fc){Nb=!0;db=fc},f:function(){try{rb||null==Db.return||Db.return()}finally{if(Nb)throw db;}}}}function D(Ib,lb){(null==lb||lb>Ib.length)&&(lb=Ib.length);for(var Db=0,Gb=Array(lb);Db<lb;Db++)Gb[Db]=Ib[Db];return Gb}function v(Ib,lb){var Db=Object.keys(Ib);if(Object.getOwnPropertySymbols){var Gb=Object.getOwnPropertySymbols(Ib);lb&&(Gb=Gb.filter(function(db){return Object.getOwnPropertyDescriptor(Ib,
db).enumerable}));Db.push.apply(Db,Gb)}return Db}function t(Ib){for(var lb=1;lb<arguments.length;lb++){var Db=null!=arguments[lb]?arguments[lb]:{};lb%2?v(Object(Db),!0).forEach(function(Gb){(0,O.Z)(Ib,Gb,Db[Gb])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Ib,Object.getOwnPropertyDescriptors(Db)):v(Object(Db)).forEach(function(Gb){Object.defineProperty(Ib,Gb,Object.getOwnPropertyDescriptor(Db,Gb))})}return Ib}function r(Ib){var lb=Ib.isLoading,Db=Ib.libraryItems,Gb=Ib.onAddToLibrary,
db=Ib.onInsertLibraryItems,rb=Ib.pendingElements,Nb=Ib.theme,fc=Ib.id,Bc=Ib.libraryReturnUrl,Jc=Ib.onSelectItems,ic=Ib.selectedItems,Oc=(0,L.useRef)(null),Rc=function(Zc){var Gc=(0,Ya.KO)(dc);Gc=(0,H.Z)(Gc,2);var ub=Gc[0],Bb=Gc[1];return(0,L.useEffect)(function(){var Eb=Zc.current;if(Eb){var hd=bd()(function(){Bb(Eb.scrollTop)},200);return Eb.addEventListener("scroll",hd),function(){hd.cancel();Eb.removeEventListener("scroll",hd)}}},[Zc,Bb]),ub}(Oc);(0,L.useEffect)(function(){var Zc;0<Rc&&(null===
(Zc=Oc.current)||void 0===Zc||Zc.scrollTo(0,Rc))},[]);Ib=(0,hb.yT)().svgCache;var fd=(0,L.useMemo)(function(){return Db.filter(function(Zc){return"published"!==Zc.status})},[Db]),pd=(0,L.useMemo)(function(){return Db.filter(function(Zc){return"published"===Zc.status})},[Db]),Ic=!Db.length&&!rb.length,wc=!rb.length&&!fd.length&&!pd.length,je=(0,L.useState)(null);je=(0,H.Z)(je,2);var pf=je[0],qe=je[1];je=(0,L.useCallback)(function(Zc,Gc){var ub=!ic.includes(Zc),Bb=[].concat((0,J.Z)(fd),(0,J.Z)(pd));
if(ub){if(Gc.shiftKey&&pf){var Eb=Bb.findIndex(function(Td){return Td.id===pf}),hd=Bb.findIndex(function(Td){return Td.id===Zc});if(-1===Eb||-1===hd)return void Jc([].concat((0,J.Z)(ic),[Zc]));var Ud=(0,I.xn)(ic);Gc=Bb.reduce(function(Td,Ue,kb){return(kb>=Eb&&kb<=hd||Ud.has(Ue.id))&&Td.push(Ue.id),Td},[]);Jc(Gc)}else Jc([].concat((0,J.Z)(ic),[Zc]));qe(Zc)}else qe(null),Jc(ic.filter(function(Td){return Td!==Zc}))},[pf,Jc,pd,ic,fd]);var ue=(0,L.useCallback)(function(Zc){return(ic.includes(Zc)?Db.filter(function(Gc){return ic.includes(Gc.id)}):
Db.filter(function(Gc){return Gc.id===Zc})).map(function(Gc){return t(t({},Gc),{},{elements:(0,aa._N)(Gc.elements,{randomizeSeed:!0})})})},[Db,ic]),kd=(0,L.useCallback)(function(Zc,Gc){Gc.dataTransfer.setData(U.LO.excalidrawlib,(0,M.NI)(ue(Zc)))},[ue]),Ae=(0,L.useCallback)(function(Zc){return!!Zc&&ic.includes(Zc)},[ic]),Bf=(0,L.useCallback)(function(){Gb(rb)},[rb,Gb]),gg=(0,L.useCallback)(function(Zc){Zc&&db(ue(Zc))},[ue,db]),jc=Ib.size>=Db.length?64:17;return(0,W.jsxs)("div",{className:"library-menu-items-container",
style:rb.length||fd.length||pd.length?{justifyContent:"flex-start"}:{borderBottom:0},children:[!wc&&(0,W.jsx)(bb,{selectedItems:ic,onSelectItems:Jc,className:"library-menu-dropdown-container--in-heading"}),(0,W.jsxs)(ia.Z.Col,{className:"library-menu-items-container__items",align:"start",gap:1,style:{flex:0<pd.length?1:"0 1 auto",marginBottom:0},ref:Oc,children:[(0,W.jsxs)(W.Fragment,{children:[!wc&&(0,W.jsx)("div",{className:"library-menu-items-container__header",children:(0,G.t)("labels.personalLib")}),
lb&&(0,W.jsx)("div",{style:{position:"absolute",top:"var(--container-padding-y)",right:"var(--container-padding-x)",transform:"translateY(50%)"},children:(0,W.jsx)(Z.Z,{})}),rb.length||fd.length?(0,W.jsxs)(pc,{children:[0<rb.length&&(0,W.jsx)(Cc,{itemsRenderedPerBatch:jc,items:[{id:null,elements:rb}],onItemSelectToggle:je,onItemDrag:kd,onClick:Bf,isItemSelected:Ae,svgCache:Ib}),(0,W.jsx)(Cc,{itemsRenderedPerBatch:jc,items:fd,onItemSelectToggle:je,onItemDrag:kd,onClick:gg,isItemSelected:Ae,svgCache:Ib})]}):
(0,W.jsxs)("div",{className:"library-menu-items__no-items",children:[(0,W.jsx)("div",{className:"library-menu-items__no-items__label",children:(0,G.t)("library.noItems")}),(0,W.jsx)("div",{className:"library-menu-items__no-items__hint",children:0<pd.length?(0,G.t)("library.hint_emptyPrivateLibrary"):(0,G.t)("library.hint_emptyLibrary")})]})]}),(0,W.jsxs)(W.Fragment,{children:[(0<pd.length||0<rb.length||0<fd.length)&&(0,W.jsx)("div",{className:"library-menu-items-container__header library-menu-items-container__header--excal",
children:(0,G.t)("labels.excalidrawLib")}),0<pd.length?(0,W.jsx)(pc,{children:(0,W.jsx)(Cc,{itemsRenderedPerBatch:jc,items:pd,onItemSelectToggle:je,onItemDrag:kd,onClick:gg,isItemSelected:Ae,svgCache:Ib})}):0<fd.length?(0,W.jsx)("div",{style:{margin:"1rem 0",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",width:"100%",fontSize:".9rem"},children:(0,G.t)("library.noItems")}):null]}),Ic&&(0,W.jsx)(ea,{style:{padding:"16px 0",width:"100%"},id:fc,libraryReturnUrl:Bc,theme:Nb,
children:(0,W.jsx)(bb,{selectedItems:ic,onSelectItems:Jc})})]})]})}function f(Ib,lb){var Db="undefined"!=typeof Symbol&&Ib[Symbol.iterator]||Ib["@@iterator"];if(!Db){if(Array.isArray(Ib)||(Db=function(fc,Bc){if(fc){if("string"==typeof fc)return E(fc,Bc);var Jc=Object.prototype.toString.call(fc).slice(8,-1);"Object"===Jc&&fc.constructor&&(Jc=fc.constructor.name);if("Map"===Jc||"Set"===Jc)return Array.from(fc);if("Arguments"===Jc||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Jc))return E(fc,Bc)}}(Ib))||
lb&&Ib&&"number"==typeof Ib.length){Db&&(Ib=Db);var Gb=0;lb=function(){};return{s:lb,n:function(){return Gb>=Ib.length?{done:!0}:{done:!1,value:Ib[Gb++]}},e:function(fc){throw fc;},f:lb}}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 db,rb=!0,Nb=!1;return{s:function(){Db=Db.call(Ib)},n:function(){var fc=Db.next();return rb=fc.done,fc},e:function(fc){Nb=!0;db=fc},f:function(){try{rb||
null==Db.return||Db.return()}finally{if(Nb)throw db;}}}}function E(Ib,lb){(null==lb||lb>Ib.length)&&(lb=Ib.length);for(var Db=0,Gb=Array(lb);Db<lb;Db++)Gb[Db]=Ib[Db];return Gb}b.d(h,{rY:function(){return Sc},uh:function(){return Ad}});var B=b(6655),J=b(1930),V=b(8950),H=b(2577);g=b(2975);var S=b.n(g),L=b(9787),T=b.n(L),R=b(9605),G=b(8557),F=b(5236),O=b(7169),M=b(4038),I=b(7135),ia=b(6517),U=b(7041),Z=b(399),aa=b(1829),W=b(4512),fa=function(Ib){var lb=Ib.theme,Db=Ib.id;Ib=Ib.libraryReturnUrl||window.location.origin+
window.location.pathname;return(0,W.jsx)("a",{className:"library-menu-browse-button",href:"".concat("https://libraries.excalidraw.com","?target\x3d").concat(window.name||"_blank","\x26referrer\x3d").concat(Ib,"\x26useHash\x3dtrue\x26token\x3d").concat(Db,"\x26theme\x3d").concat(lb,"\x26version\x3d").concat(U.Kr.excalidrawLibrary),target:"_excalidraw_libraries",children:(0,G.t)("labels.libraries")})},X=b(45),ea=function(Ib){var lb=Ib.libraryReturnUrl,Db=Ib.theme,Gb=Ib.id,db=Ib.style,rb=Ib.children;
return(0,W.jsxs)("div",{className:(0,X.Z)("library-menu-control-buttons",Ib.className),style:db,children:[(0,W.jsx)(fa,{id:Gb,libraryReturnUrl:lb,theme:Db}),rb]})},pa=b(1601),va=b(593),ta=b(3470),xa=b(1119),Ga=b(4289),Ia=b(6282),Ya=b(3607),Fa=b(7975),Ka=b(5284),Ba=b(810),la=b(3529),ka=b(8165),ua=b(7003);g=b(3379);g=b.n(g);h=b(7795);h=b.n(h);var na=b(569);na=b.n(na);var oa=b(3565);oa=b.n(oa);var La=b(9216);La=b.n(La);var Oa=b(4589);Oa=b.n(Oa);var Va=b(7589),Ma={};Ma.styleTagTransform=Oa();Ma.setAttributes=
oa();Ma.insert=na().bind(null,"head");Ma.domAPI=h();Ma.insertStyleElement=La();g()(Va.Z,Ma);Va.Z&&Va.Z.locals&&Va.Z.locals;var Ua=function(){var Ib=(0,V.Z)(S().mark(function Gb(Db){var db,rb,Nb,fc,Bc,Jc,ic,Oc,Rc,fd,pd,Ic,wc,je,pf,qe,ue;return S().wrap(function(kd){for(;;)switch(kd.prev=kd.next){case 0:db=6,rb=128,Nb=Math.round(rb/16),fc=Math.max(Math.round(rb/64),2),Bc=(0,I.yo)(Db,db),(Jc=document.createElement("canvas")).width=Bc[0].length*rb+2*(Bc[0].length+1)*Nb-2*Nb,Jc.height=Bc.length*rb+2*(Bc.length+
1)*Nb-2*Nb,(ic=Jc.getContext("2d")).fillStyle=Ka.white,ic.fillRect(0,0,Jc.width,Jc.height),Oc=p(Db.entries()),kd.prev=12,Oc.s();case 14:if((Rc=Oc.n()).done){kd.next=28;break}return fd=(0,H.Z)(Rc.value,2),pd=fd[0],Ic=fd[1],kd.next=18,(0,la.NL)({elements:Ic.elements,files:null,maxWidthOrHeight:rb});case 18:wc=kd.sent,je=wc.width,pf=wc.height,qe=Math.floor(pd/db)*(rb+2*Nb),ue=pd%db*(rb+2*Nb),ic.drawImage(wc,ue+(rb-je)/2+Nb,qe+(rb-pf)/2+Nb),ic.lineWidth=fc,ic.strokeStyle=Ka.gray[4],ic.strokeRect(ue+Nb/
2,qe+Nb/2,rb+Nb,rb+Nb);case 26:kd.next=14;break;case 28:kd.next=33;break;case 30:kd.prev=30,kd.t0=kd.catch(12),Oc.e(kd.t0);case 33:return kd.prev=33,Oc.f(),kd.finish(33);case 36:return kd.t1=ka.Tu,kd.t2=File,kd.next=40,(0,ka._c)(Jc);case 40:return kd.t3=kd.sent,kd.t4=[kd.t3],kd.t5={type:U.LO.png},kd.t6=new kd.t2(kd.t4,"preview",kd.t5),kd.t7={outputType:U.LO.jpg,maxWidthOrHeight:5E3},kd.next=47,(0,kd.t1)(kd.t6,kd.t7);case 47:return kd.abrupt("return",kd.sent);case 48:case "end":return kd.stop()}},
Gb,null,[[12,30,33,36]])}));return function(Db){return Ib.apply(this,arguments)}}(),ib=function(Ib){var lb=Ib.libItem,Db=Ib.appState,Gb=Ib.index,db=Ib.onChange;Ib=Ib.onRemove;var rb=(0,L.useRef)(null),Nb=(0,L.useRef)(null);return(0,L.useEffect)(function(){var fc=rb.current;fc&&(0,V.Z)(S().mark(function Jc(){var ic;return S().wrap(function(Oc){for(;;)switch(Oc.prev=Oc.next){case 0:return Oc.next=2,(0,la.$D)({elements:lb.elements,appState:m(m({},Db),{},{viewBackgroundColor:Ka.white,exportBackground:!0}),
files:null});case 2:ic=Oc.sent,fc.innerHTML=ic.outerHTML;case 4:case "end":return Oc.stop()}},Jc)}))()},[lb.elements,Db]),(0,W.jsxs)("div",{className:"single-library-item",children:["published"===lb.status&&(0,W.jsx)("span",{className:"single-library-item-status",children:(0,G.t)("labels.statusPublished")}),(0,W.jsx)("div",{ref:rb,className:"single-library-item__svg"}),(0,W.jsx)(Ga.V,{"aria-label":(0,G.t)("buttons.remove"),type:"button",icon:xa.Tw,className:"single-library-item--remove",onClick:Ib.bind(null,
lb.id),title:(0,G.t)("buttons.remove")}),(0,W.jsxs)("div",{style:{display:"flex",margin:"0.8rem 0",width:"100%",fontSize:"14px",fontWeight:500,flexDirection:"column"},children:[(0,W.jsxs)("label",{style:{display:"flex",justifyContent:"space-between",flexDirection:"column"},children:[(0,W.jsxs)("div",{style:{padding:"0.5em 0"},children:[(0,W.jsx)("span",{style:{fontWeight:500,color:Ka.gray[6]},children:(0,G.t)("publishDialog.itemName")}),(0,W.jsx)("span",{"aria-hidden":"true",className:"required",
children:"*"})]}),(0,W.jsx)("input",{type:"text",ref:Nb,style:{width:"80%",padding:"0.2rem"},defaultValue:lb.name,placeholder:"Item name",onChange:function(fc){db(fc.target.value,Gb)}})]}),(0,W.jsx)("span",{className:"error",children:lb.error})]})]})},vb=function(Ib){var lb=Ib.onClose,Db=Ib.libraryItems,Gb=Ib.appState,db=Ib.onSuccess,rb=Ib.onError,Nb=Ib.updateItemsInStorage,fc=Ib.onRemove;Ib=(0,L.useState)({authorName:"",githubHandle:"",name:"",description:"",twitterHandle:"",website:""});Ib=(0,H.Z)(Ib,
2);var Bc=Ib[0],Jc=Ib[1];Ib=(0,L.useState)(!1);var ic=(0,H.Z)(Ib,2);Ib=ic[0];var Oc=ic[1];(0,L.useEffect)(function(){a:{try{var qe=localStorage.getItem("publish-library-data");if(qe){var ue=JSON.parse(qe);break a}}catch(kd){console.error(kd)}ue=null}ue&&Jc(ue)},[]);ic=(0,L.useState)(Db.slice());ic=(0,H.Z)(ic,2);var Rc=ic[0],fd=ic[1];(0,L.useEffect)(function(){fd(Db.slice())},[Db]);var pd;ic=function(qe){Jc(m(m({},Bc),{},(0,O.Z)({},qe.target.name,qe.target.value)))};var Ic=function(){var qe=(0,V.Z)(S().mark(function Ae(kd){var Bf,
gg,jc,Zc,Gc,ub,Bb;return S().wrap(function(Eb){for(;;)switch(Eb.prev=Eb.next){case 0:if(kd.preventDefault(),Oc(!0),Bf=[],gg=!1,Rc.forEach(function(hd){var Ud="";hd.name||(Ud=(0,G.t)("publishDialog.errors.required"),gg=!0);Bf.push(m(m({},hd),{},{error:Ud}))}),!gg){Eb.next=9;break}return fd(Bf),Oc(!1),Eb.abrupt("return");case 9:return Eb.next=11,Ua(Rc);case 11:jc=Eb.sent,Zc={type:U.r8.excalidrawLibrary,version:U.Kr.excalidrawLibrary,source:U.pb,libraryItems:Rc},Gc=JSON.stringify(Zc,null,2),ub=new Blob([Gc],
{type:"application/json"}),(Bb=new FormData).append("excalidrawLib",ub),Bb.append("previewImage",jc),Bb.append("previewImageType",jc.type),Bb.append("title",Bc.name),Bb.append("authorName",Bc.authorName),Bb.append("githubHandle",Bc.githubHandle),Bb.append("name",Bc.name),Bb.append("description",Bc.description),Bb.append("twitterHandle",Bc.twitterHandle),Bb.append("website",Bc.website),fetch("".concat("https://us-central1-excalidraw-room-persistence.cloudfunctions.net/libraries","/submit"),{method:"post",
body:Bb}).then(function(hd){return hd.ok?hd.json().then(function(Ud){Ud=Ud.url;localStorage.removeItem("publish-library-data");db({url:Ud,authorName:Bc.authorName,items:Rc})}):hd.json().catch(function(){throw Error(hd.statusText||"something went wrong");}).then(function(Ud){throw Error(Ud.message||hd.statusText||"something went wrong");})},function(hd){console.error(hd);rb(hd);Oc(!1)}).catch(function(hd){console.error(hd);rb(hd);Oc(!1)});case 27:case "end":return Eb.stop()}},Ae)}));return function(kd){return qe.apply(this,
arguments)}}(),wc=(0,L.useCallback)(function(){Nb(Rc);try{localStorage.setItem("publish-library-data",JSON.stringify(Bc))}catch(qe){console.error(qe)}lb()},[Rc,lb,Nb,Bc]),je=!!Db.length,pf=Db.some(function(qe){return"published"===qe.status});return(0,W.jsx)(Ba.V,{onCloseRequest:wc,title:(0,G.t)("publishDialog.title"),className:"publish-library",children:je?(0,W.jsxs)("form",{onSubmit:Ic,children:[(0,W.jsx)("div",{className:"publish-library-note",children:(0,W.jsx)(pa.Z,{i18nKey:"publishDialog.noteDescription",
link:function(qe){return(0,W.jsx)("a",{href:"https://libraries.excalidraw.com",target:"_blank",rel:"noopener noreferrer",children:qe})}})}),(0,W.jsx)("span",{className:"publish-library-note",children:(0,W.jsx)(pa.Z,{i18nKey:"publishDialog.noteGuidelines",link:function(qe){return(0,W.jsx)("a",{href:"https://github.com/excalidraw/excalidraw-libraries#guidelines",target:"_blank",rel:"noopener noreferrer",children:qe})}})}),(0,W.jsx)("div",{className:"publish-library-note",children:(0,G.t)("publishDialog.noteItems")}),
pf&&(0,W.jsx)("span",{className:"publish-library-note publish-library-warning",children:(0,G.t)("publishDialog.republishWarning")}),(pd=[],Rc.forEach(function(qe,ue){pd.push((0,W.jsx)("div",{className:"single-library-item-wrapper",children:(0,W.jsx)(ib,{libItem:qe,appState:Gb,index:ue,onChange:function(kd,Ae){var Bf=Rc.slice();Bf[Ae].name=kd;fd(Bf)},onRemove:fc})},ue))}),(0,W.jsx)("div",{className:"selected-library-items",children:pd})),(0,W.jsxs)("div",{className:"publish-library__fields",children:[(0,W.jsxs)("label",
{children:[(0,W.jsxs)("div",{children:[(0,W.jsx)("span",{children:(0,G.t)("publishDialog.libraryName")}),(0,W.jsx)("span",{"aria-hidden":"true",className:"required",children:"*"})]}),(0,W.jsx)("input",{type:"text",name:"name",required:!0,value:Bc.name,onChange:ic,placeholder:(0,G.t)("publishDialog.placeholder.libraryName")})]}),(0,W.jsxs)("label",{style:{alignItems:"flex-start"},children:[(0,W.jsxs)("div",{children:[(0,W.jsx)("span",{children:(0,G.t)("publishDialog.libraryDesc")}),(0,W.jsx)("span",
{"aria-hidden":"true",className:"required",children:"*"})]}),(0,W.jsx)("textarea",{name:"description",rows:4,required:!0,value:Bc.description,onChange:ic,placeholder:(0,G.t)("publishDialog.placeholder.libraryDesc")})]}),(0,W.jsxs)("label",{children:[(0,W.jsxs)("div",{children:[(0,W.jsx)("span",{children:(0,G.t)("publishDialog.authorName")}),(0,W.jsx)("span",{"aria-hidden":"true",className:"required",children:"*"})]}),(0,W.jsx)("input",{type:"text",name:"authorName",required:!0,value:Bc.authorName,
onChange:ic,placeholder:(0,G.t)("publishDialog.placeholder.authorName")})]}),(0,W.jsxs)("label",{children:[(0,W.jsx)("span",{children:(0,G.t)("publishDialog.githubUsername")}),(0,W.jsx)("input",{type:"text",name:"githubHandle",value:Bc.githubHandle,onChange:ic,placeholder:(0,G.t)("publishDialog.placeholder.githubHandle")})]}),(0,W.jsxs)("label",{children:[(0,W.jsx)("span",{children:(0,G.t)("publishDialog.twitterUsername")}),(0,W.jsx)("input",{type:"text",name:"twitterHandle",value:Bc.twitterHandle,
onChange:ic,placeholder:(0,G.t)("publishDialog.placeholder.twitterHandle")})]}),(0,W.jsxs)("label",{children:[(0,W.jsx)("span",{children:(0,G.t)("publishDialog.website")}),(0,W.jsx)("input",{type:"text",name:"website",pattern:"https?://.+",title:(0,G.t)("publishDialog.errors.website"),value:Bc.website,onChange:ic,placeholder:(0,G.t)("publishDialog.placeholder.website")})]}),(0,W.jsx)("span",{className:"publish-library-note",children:(0,W.jsx)(pa.Z,{i18nKey:"publishDialog.noteLicense",link:function(qe){return(0,W.jsx)("a",
{href:"https://github.com/excalidraw/excalidraw-libraries/blob/main/LICENSE",target:"_blank",rel:"noopener noreferrer",children:qe})}})})]}),(0,W.jsxs)("div",{className:"publish-library__buttons",children:[(0,W.jsx)(ua.Z,{label:(0,G.t)("buttons.cancel"),onClick:wc,"data-testid":"cancel-clear-canvas-button"}),(0,W.jsx)(ua.Z,{type:"submit",label:(0,G.t)("buttons.submit"),actionType:"primary",isLoading:Ib})]})]}):(0,W.jsx)("p",{style:{padding:"1em",textAlign:"center",fontWeight:500},children:(0,G.t)("publishDialog.atleastOneLibItem")})})},
yb=b(8103),Wa=b(5990),hb=b(1903),ab=function(Ib,lb){return Ib.filter(function(Db){return lb.includes(Db.id)})},Qa=function(Ib){var lb,Db,Gb=Ib.setAppState,db=Ib.selectedItems,rb=Ib.library,Nb=Ib.onRemoveFromLibrary,fc=Ib.resetLibrary,Bc=Ib.onSelectItems,Jc=Ib.appState;Ib=Ib.className;var ic=(0,Ya.KO)(R.rF,va.yE),Oc=(0,H.Z)(ic,1)[0];ic=(0,Ya.KO)(Ad,va.yE);ic=(0,H.Z)(ic,2);var Rc=ic[0],fd=ic[1];ic=(0,L.useState)(!1);var pd=(0,H.Z)(ic,2);ic=pd[0];var Ic=pd[1],wc=!!db.length,je=wc?Oc.libraryItems.filter(function(jc){return db.includes(jc.id)}):
Oc.libraryItems;pd=wc?(0,G.t)("buttons.remove"):(0,G.t)("buttons.resetLibrary");var pf=(0,L.useState)(!1),qe=(0,H.Z)(pf,2);pf=qe[0];var ue=qe[1];qe=(0,L.useState)(null);qe=(0,H.Z)(qe,2);var kd=qe[0],Ae=qe[1];qe=(0,L.useCallback)(function(){return(0,W.jsxs)(Ba.V,{onCloseRequest:function(){return Ae(null)},title:(0,G.t)("publishSuccessDialog.title"),className:"publish-library-success",size:"small",children:[(0,W.jsx)("p",{children:(0,W.jsx)(pa.Z,{i18nKey:"publishSuccessDialog.content",authorName:kd.authorName,
link:function(jc){return(0,W.jsx)("a",{href:null==kd?void 0:kd.url,target:"_blank",rel:"noopener noreferrer",children:jc})}})}),(0,W.jsx)(Ga.V,{type:"button",title:(0,G.t)("buttons.close"),"aria-label":(0,G.t)("buttons.close"),label:(0,G.t)("buttons.close"),onClick:function(){return Ae(null)},"data-testid":"publish-library-success-close",className:"publish-library-success-close"})]})},[Ae,kd]);var Bf=function(){var jc=(0,V.Z)(S().mark(function Gc(){return S().wrap(function(ub){for(;;)switch(ub.prev=
ub.next){case 0:return ub.prev=0,ub.next=3,rb.updateLibrary({libraryItems:(0,Ia.I$)({description:"Excalidraw library files"}),merge:!0,openLibraryMenu:!0});case 3:ub.next=11;break;case 5:if(ub.prev=5,ub.t0=ub.catch(0),"AbortError"!==(null===ub.t0||void 0===ub.t0?void 0:ub.t0.name)){ub.next=10;break}return console.warn(ub.t0),ub.abrupt("return");case 10:Gb({errorMessage:(0,G.t)("errors.importLibraryError")});case 11:case "end":return ub.stop()}},Gc,null,[[0,5]])}));return function(){return jc.apply(this,
arguments)}}(),gg=function(){var jc=(0,V.Z)(S().mark(function Gc(){var ub;return S().wrap(function(Bb){for(;;)switch(Bb.prev=Bb.next){case 0:if(!wc){Bb.next=4;break}Bb.t0=je;Bb.next=7;break;case 4:return Bb.next=6,rb.getLatestLibrary();case 6:Bb.t0=Bb.sent;case 7:ub=Bb.t0,(0,M.t1)(ub).catch(I.FG).catch(function(Eb){Gb({errorMessage:Eb.message})});case 9:case "end":return Bb.stop()}},Gc)}));return function(){return jc.apply(this,arguments)}}();return(0,W.jsxs)("div",{className:(0,X.Z)("library-menu-dropdown-container",
Ib),children:[(0,W.jsxs)(yb.Z,{open:Rc,children:[(0,W.jsx)(yb.Z.Trigger,{onToggle:function(){return fd(!Rc)},children:xa.YA}),(0,W.jsxs)(yb.Z.Content,{onClickOutside:function(){return fd(!1)},onSelect:function(){return fd(!1)},className:"library-menu",children:[!wc&&(0,W.jsx)(yb.Z.Item,{onSelect:Bf,icon:xa.Tl,"data-testid":"lib-dropdown--load",children:(0,G.t)("buttons.load")}),!!je.length&&(0,W.jsx)(yb.Z.Item,{onSelect:gg,icon:xa.Hy,"data-testid":"lib-dropdown--export",children:(0,G.t)("buttons.export")}),
!!je.length&&(0,W.jsx)(yb.Z.Item,{onSelect:function(){return Ic(!0)},icon:xa.XH,children:pd}),wc&&(0,W.jsx)(yb.Z.Item,{icon:xa.Nw,onSelect:function(){return ue(!0)},"data-testid":"lib-dropdown--remove",children:(0,G.t)("buttons.publishLibrary")})]})]}),0<db.length&&(0,W.jsx)("div",{className:"library-actions-counter",children:db.length}),ic&&(lb=db.length?(0,G.t)("alerts.removeItemsFromsLibrary",{count:db.length}):(0,G.t)("alerts.resetLibrary"),Db=db.length?(0,G.t)("confirmDialog.removeItemsFromLib"):
(0,G.t)("confirmDialog.resetLibrary"),(0,W.jsx)(Fa.Z,{onConfirm:function(){db.length?Nb():fc();Ic(!1)},onCancel:function(){Ic(!1)},title:Db,children:(0,W.jsx)("p",{children:lb})})),pf&&(0,W.jsx)(vb,{onClose:function(){return ue(!1)},libraryItems:ab(Oc.libraryItems,db),appState:Jc,onSuccess:function(jc){return function(Zc,Gc){ue(!1);Ae({url:Zc.url,authorName:Zc.authorName});Zc=Gc.slice();Zc.forEach(function(ub){db.includes(ub.id)&&(ub.status="published")});rb.setLibrary(Zc)}(jc,Oc.libraryItems)},onError:function(jc){return window.alert(jc)},
updateItemsInStorage:function(){return rb.setLibrary(Oc.libraryItems)},onRemove:function(jc){return Bc(db.filter(function(Zc){return Zc!==jc}))}}),kd&&qe()]})},bb=function(Ib){var lb=Ib.selectedItems,Db=Ib.onSelectItems;Ib=Ib.className;var Gb=(0,ta.qD)().library,db=(0,hb.yT)(),rb=db.clearLibraryCache,Nb=db.deleteItemsFromLibraryCache;db=(0,Wa.I)();var fc=(0,ta.n9)(),Bc=(0,Ya.KO)(R.rF,va.yE),Jc=(0,H.Z)(Bc,1)[0],ic=function(){var Oc=(0,V.Z)(S().mark(function pd(fd){var Ic;return S().wrap(function(wc){for(;;)switch(wc.prev=
wc.next){case 0:Ic=fd.filter(function(je){return!lb.includes(je.id)}),Gb.setLibrary(Ic).catch(function(){fc({errorMessage:(0,G.t)("alerts.errorRemovingFromLibrary")})}),Nb(lb),Db([]);case 4:case "end":return wc.stop()}},pd)}));return function(fd){return Oc.apply(this,arguments)}}();return(0,W.jsx)(Qa,{appState:db,setAppState:fc,selectedItems:lb,onSelectItems:Db,library:Gb,onRemoveFromLibrary:function(){return ic(Jc.libraryItems)},resetLibrary:function(){Gb.resetLibrary();rb()},className:Ib})};Va=
b(5644);Ma={};Ma.styleTagTransform=Oa();Ma.setAttributes=oa();Ma.insert=na().bind(null,"head");Ma.domAPI=h();Ma.insertStyleElement=La();g()(Va.Z,Ma);Va.Z&&Va.Z.locals&&Va.Z.locals;var Pa=b(4646),Lb=(0,L.memo)(function(Ib){var lb=Ib.id,Db=Ib.elements,Gb=Ib.isPending,db=Ib.onClick,rb=Ib.selected,Nb=Ib.onToggle,fc=Ib.onDrag;Ib=Ib.svgCache;var Bc=(0,L.useRef)(null),Jc=(0,hb.mF)(lb,Db,Ib);(0,L.useEffect)(function(){var fd=Bc.current;if(fd)return Jc&&(fd.innerHTML=Jc.outerHTML),function(){fd.innerHTML=
""}},[Jc]);Ib=(0,L.useState)(!1);var ic=(0,H.Z)(Ib,2);Ib=ic[0];var Oc=ic[1];ic=(0,ta.Fy)().isMobile;var Rc=Gb&&(0,W.jsx)("div",{className:"library-unit__adder",children:xa.pO});return(0,W.jsxs)("div",{className:(0,X.Z)("library-unit",{"library-unit__active":Db,"library-unit--hover":Db&&Ib,"library-unit--selected":rb,"library-unit--skeleton":!Jc}),onMouseEnter:function(){return Oc(!0)},onMouseLeave:function(){return Oc(!1)},children:[(0,W.jsx)("div",{className:(0,X.Z)("library-unit__dragger",{"library-unit__pulse":!!Gb}),
ref:Bc,draggable:!!Db,onClick:Db||Gb?function(fd){lb&&fd.shiftKey?Nb(lb,fd):db(lb)}:void 0,onDragStart:function(fd){lb?(Oc(!1),fc(lb,fd)):fd.preventDefault()}}),Rc,lb&&Db&&(Ib||ic||rb)&&(0,W.jsx)(Pa.o,{checked:rb,onChange:function(fd,pd){return Nb(lb,pd)},className:"library-unit__checkbox"})]})}),xc=function(){return(0,W.jsx)("div",{className:"library-unit library-unit--skeleton"})},oc=T().useTransition||function(){return[!1,(0,L.useCallback)(function(Ib){return Ib()},[])]},pc=function(Ib){return(0,W.jsx)("div",
{className:"library-menu-items-container__grid",children:Ib.children})},Cc=(0,L.memo)(function(Ib){var lb=Ib.items,Db=Ib.onItemSelectToggle,Gb=Ib.onItemDrag,db=Ib.isItemSelected,rb=Ib.onClick,Nb=Ib.svgCache,fc=Ib.itemsRenderedPerBatch;Ib=oc();var Bc=(0,H.Z)(Ib,2)[1];Ib=(0,L.useState)(0);Ib=(0,H.Z)(Ib,2);var Jc=Ib[0],ic=Ib[1];return(0,L.useEffect)(function(){Jc<lb.length&&Bc(function(){ic(Jc+fc)})},[Jc,lb.length,Bc,fc]),(0,W.jsx)(W.Fragment,{children:lb.map(function(Oc,Rc){var fd;return Rc<Jc?(0,W.jsx)(Lb,
{elements:null==Oc?void 0:Oc.elements,isPending:!(null!=Oc&&Oc.id||null==Oc||!Oc.elements),onClick:rb,svgCache:Nb,id:null==Oc?void 0:Oc.id,selected:db(Oc.id),onToggle:Db,onDrag:Gb},null!==(fd=null==Oc?void 0:Oc.id)&&void 0!==fd?fd:Rc):(0,W.jsx)(xc,{},Rc)})})});T=b(200);var bd=b.n(T),dc=(0,Ya.cn)(0);T=b(6440);Va={};Va.styleTagTransform=Oa();Va.setAttributes=oa();Va.insert=na().bind(null,"head");Va.domAPI=h();Va.insertStyleElement=La();g()(T.Z,Va);T.Z&&T.Z.locals&&T.Z.locals;var Nc=b(5435),Qc=b(9547);
b=b(8923);T={};T.styleTagTransform=Oa();T.setAttributes=oa();T.insert=na().bind(null,"head");T.domAPI=h();T.insertStyleElement=La();g()(b.Z,T);b.Z&&b.Z.locals&&b.Z.locals;var Ad=(0,Ya.cn)(!1),Xc=function(Ib){return(0,W.jsx)("div",{className:"layer-ui__library",children:Ib.children})},sc=function(Ib){var lb=Ib.onInsertLibraryItems,Db=Ib.pendingElements,Gb=Ib.onAddToLibrary,db=Ib.setAppState,rb=Ib.libraryReturnUrl,Nb=Ib.library,fc=Ib.id,Bc=Ib.theme,Jc=Ib.selectedItems;Ib=Ib.onSelectItems;var ic=(0,Ya.KO)(R.rF,
va.yE),Oc=(0,H.Z)(ic,1)[0];ic=(0,L.useCallback)(function(pd){(function(){var Ic=(0,V.Z)(S().mark(function qe(je,pf){var ue,kd,Ae,Bf,gg;return S().wrap(function(jc){for(;;)switch(jc.prev=jc.next){case 0:(0,Nc.L)("element","addToLibrary","ui"),ue=f(U.PR),jc.prev=2,Ae=function(){var Zc=kd.value;if(je.some(function(Gc){return Gc.type===Zc}))return{v:db({errorMessage:(0,G.t)("errors.libraryElementTypeError.".concat(Zc))})}},ue.s();case 5:if((kd=ue.n()).done){jc.next=11;break}if(Bf=Ae(),"object"!==(0,B.Z)(Bf)){jc.next=
9;break}return jc.abrupt("return",Bf.v);case 9:jc.next=5;break;case 11:jc.next=16;break;case 13:jc.prev=13,jc.t0=jc.catch(2),ue.e(jc.t0);case 16:return jc.prev=16,ue.f(),jc.finish(16);case 19:gg=[{status:"unpublished",elements:je,id:(0,F.kb)(),created:Date.now()}].concat((0,J.Z)(pf)),Gb(),Nb.setLibrary(gg).catch(function(){db({errorMessage:(0,G.t)("alerts.errorAddingToLibrary")})});case 22:case "end":return jc.stop()}},qe,null,[[2,13,16,19]])}));return function(je,pf){return Ic.apply(this,arguments)}})()(pd,
Oc.libraryItems)},[Gb,Nb,db,Oc.libraryItems]);var Rc=(0,L.useMemo)(function(){return Oc.libraryItems},[Oc]);if("loading"===Oc.status&&!Oc.isInitialized)return(0,W.jsx)(Xc,{children:(0,W.jsx)("div",{className:"layer-ui__library-message",children:(0,W.jsxs)("div",{children:[(0,W.jsx)(Z.Z,{size:"2em"}),(0,W.jsx)("span",{children:(0,G.t)("labels.libraryLoadingMessage")})]})})});var fd=0<Oc.libraryItems.length||0<Db.length;return(0,W.jsxs)(Xc,{children:[(0,W.jsx)(r,{isLoading:"loading"===Oc.status,libraryItems:Rc,
onAddToLibrary:ic,onInsertLibraryItems:lb,pendingElements:Db,id:fc,libraryReturnUrl:rb,theme:Bc,onSelectItems:Ib,selectedItems:Jc}),fd&&(0,W.jsx)(ea,{className:"library-menu-control-buttons--at-bottom",style:{padding:"16px 12px 0 12px"},id:fc,libraryReturnUrl:rb,theme:Bc})]})},Sc=function(){var Ib=(0,ta.qD)(),lb=Ib.library,Db=Ib.id,Gb=Ib.onInsertElements;Ib=(0,ta.hY)();var db=(0,Wa.I)(),rb=(0,ta.n9)(),Nb=(0,ta.bd)(),fc=(0,L.useState)([]),Bc=(0,H.Z)(fc,2);fc=Bc[0];Bc=Bc[1];var Jc=(0,L.useMemo)(function(){return lb},
[lb]);Nb=function(Rc,fd){var pd=function(){return(0,Qc.eD)(fd,Rc,{includeBoundTextElement:!0,includeElementsInFrames:!0})},Ic=(0,L.useRef)(pd()),wc=(0,L.useRef)(Rc),je=(0,L.useRef)(fd);return(0,I.w8)(Rc.selectedElementIds,wc.current.selectedElementIds)&&(0,I.w8)(fd,je.current)||(Ic.current=pd(),wc.current=Rc,je.current=fd),Ic.current}(db,Nb);var ic=(0,L.useCallback)(function(Rc){Gb((0,R.WV)(Rc))},[Gb]),Oc=(0,L.useCallback)(function(){rb({selectedElementIds:{},selectedGroupIds:{},activeEmbeddable:null})},
[rb]);return(0,W.jsx)(sc,{pendingElements:Nb,onInsertLibraryItems:ic,onAddToLibrary:Oc,setAppState:rb,libraryReturnUrl:Ib.libraryReturnUrl,library:Jc,id:Db,theme:db.theme,selectedItems:fc,onSelectItems:Bc})}},9507:function(g,h,b){b.d(h,{z:function(){return f}});var l=b(2577),m=b(8557),p=b(9787),D=b(399),v=b(45),t=b(7041),r=b(4512),f=function(E){var B=E.delay;E=E.theme;var J=(0,p.useState)(!!B);J=(0,l.Z)(J,2);var V=J[0],H=J[1];return(0,p.useEffect)(function(){if(B){var S=setTimeout(function(){H(!1)},
B);return function(){return clearTimeout(S)}}},[B]),V?null:(0,r.jsxs)("div",{className:(0,v.Z)("LoadingMessage",{"LoadingMessage--dark":E===t.C6.DARK}),children:[(0,r.jsx)("div",{children:(0,r.jsx)(D.Z,{})}),(0,r.jsx)("div",{className:"LoadingMessage-text",children:(0,m.t)("labels.loadingScene")})]})}},7233:function(g,h,b){function l(r){return m.apply(this,arguments)}function m(){return(m=(0,p.Z)(D().mark(function E(f){var B,J,V,H;return D().wrap(function(S){for(;;)switch(S.prev=S.next){case 0:return B=
f.title,J=f.description,V=f.actionLabel,H=f.color,S.abrupt("return",new Promise(function(L){v.e_.set(t,{active:!0,onConfirm:function(){return L(!0)},onClose:function(){return L(!1)},onReject:function(){return L(!1)},title:B,description:J,actionLabel:V,color:H})}));case 2:case "end":return S.stop()}},E)}))).apply(this,arguments)}b.d(h,{K:function(){return t},_:function(){return l}});var p=b(8950);g=b(2975);var D=b.n(g);g=b(3607);var v=b(593),t=(0,g.cn)({active:!1})},8584:function(g,h,b){b.d(h,{J:function(){return V}});
var l=b(9787);g=b(3379);g=b.n(g);h=b(7795);h=b.n(h);var m=b(569);m=b.n(m);var p=b(3565);p=b.n(p);var D=b(9216);D=b.n(D);var v=b(4589);v=b.n(v);var t=b(9935),r={};r.styleTagTransform=v();r.setAttributes=p();r.insert=m().bind(null,"head");r.domAPI=h();r.insertStyleElement=D();g()(t.Z,r);t.Z&&t.Z.locals&&t.Z.locals;var f=b(5156),E=b(7135),B=b(6331),J=b(4512),V=function(H){var S=H.children,L=H.left,T=H.top,R=H.onCloseRequest,G=H.fitInViewport,F=void 0!==G&&G;G=H.offsetLeft;var O=void 0===G?0:G;G=H.offsetTop;
var M=void 0===G?0:G;G=H.viewportWidth;var I=void 0===G?window.innerWidth:G;H=H.viewportHeight;var ia=void 0===H?window.innerHeight:H,U=(0,l.useRef)(null);(0,l.useEffect)(function(){var aa=U.current;if(aa){aa.contains(document.activeElement)||aa.focus();var W=function(fa){if(fa.key===B.tW.TAB){var X=(0,E.xp)(aa),ea=document.activeElement,pa=X.findIndex(function(Ga){return Ga===ea});if(ea===aa){var va;fa.shiftKey?null===(va=X[X.length-1])||void 0===va||va.focus():X[0].focus();fa.preventDefault();fa.stopImmediatePropagation()}else if(0===
pa&&fa.shiftKey){var ta;null===(ta=X[X.length-1])||void 0===ta||ta.focus();fa.preventDefault();fa.stopImmediatePropagation()}else if(pa===X.length-1&&!fa.shiftKey){var xa;null===(xa=X[0])||void 0===xa||xa.focus();fa.preventDefault();fa.stopImmediatePropagation()}}};return aa.addEventListener("keydown",W),function(){return aa.removeEventListener("keydown",W)}}},[]);var Z=(0,l.useRef)(null);return(0,l.useLayoutEffect)(function(){if(F&&U.current&&null!=T&&null!=L){var aa,W,fa=U.current,X=fa.getBoundingClientRect(),
ea=X.width;X=X.height;if((null===(aa=Z.current)||void 0===aa?void 0:aa.top)!==T||(null===(W=Z.current)||void 0===W?void 0:W.left)!==L)Z.current={top:T,left:L},ea>=I?(fa.style.width="".concat(I,"px"),fa.style.left="0px",fa.style.overflowX="scroll"):fa.style.left="".concat(L+ea-O>I?I-ea-10:L,"px"),X>=ia?(fa.style.height="".concat(ia-20,"px"),fa.style.top="10px",fa.style.overflowY="scroll"):fa.style.top="".concat(T+X-M>ia?ia-X:T,"px")}},[T,L,F,I,ia,O,M]),(0,l.useEffect)(function(){if(R){var aa=function(W){var fa;
null!==(fa=U.current)&&void 0!==fa&&fa.contains(W.target)||(0,f.unstable_batchedUpdates)(function(){return R(W)})};return document.addEventListener("pointerdown",aa,!1),function(){return document.removeEventListener("pointerdown",aa,!1)}}},[R]),(0,J.jsx)("div",{className:"popover",ref:U,tabIndex:-1,children:S})}},3441:function(g,h,b){function l(ic){const Oc=(0,T.useContext)(Ma);return ic||Oc||"ltr"}function m(ic){const Oc=document.activeElement;for(const Rc of ic){if(Rc===Oc)break;if(Rc.focus(),document.activeElement!==
Oc)break}}function p(ic,Oc){var Rc=Object.keys(ic);if(Object.getOwnPropertySymbols){var fd=Object.getOwnPropertySymbols(ic);Oc&&(fd=fd.filter(function(pd){return Object.getOwnPropertyDescriptor(ic,pd).enumerable}));Rc.push.apply(Rc,fd)}return Rc}function D(ic){for(var Oc=1;Oc<arguments.length;Oc++){var Rc=null!=arguments[Oc]?arguments[Oc]:{};Oc%2?p(Object(Rc),!0).forEach(function(fd){(0,S.Z)(ic,fd,Rc[fd])}):Object.getOwnPropertyDescriptors?Object.defineProperties(ic,Object.getOwnPropertyDescriptors(Rc)):
p(Object(Rc)).forEach(function(fd){Object.defineProperty(ic,fd,Object.getOwnPropertyDescriptor(Rc,fd))})}return ic}function v(ic,Oc){var Rc=Object.keys(ic);if(Object.getOwnPropertySymbols){var fd=Object.getOwnPropertySymbols(ic);Oc&&(fd=fd.filter(function(pd){return Object.getOwnPropertyDescriptor(ic,pd).enumerable}));Rc.push.apply(Rc,fd)}return Rc}function t(ic){for(var Oc=1;Oc<arguments.length;Oc++){var Rc=null!=arguments[Oc]?arguments[Oc]:{};Oc%2?v(Object(Rc),!0).forEach(function(fd){(0,S.Z)(ic,
fd,Rc[fd])}):Object.getOwnPropertyDescriptors?Object.defineProperties(ic,Object.getOwnPropertyDescriptors(Rc)):v(Object(Rc)).forEach(function(fd){Object.defineProperty(ic,fd,Object.getOwnPropertyDescriptor(Rc,fd))})}return ic}function r(ic,Oc){var Rc=Object.keys(ic);if(Object.getOwnPropertySymbols){var fd=Object.getOwnPropertySymbols(ic);Oc&&(fd=fd.filter(function(pd){return Object.getOwnPropertyDescriptor(ic,pd).enumerable}));Rc.push.apply(Rc,fd)}return Rc}function f(ic){for(var Oc=1;Oc<arguments.length;Oc++){var Rc=
null!=arguments[Oc]?arguments[Oc]:{};Oc%2?r(Object(Rc),!0).forEach(function(fd){(0,S.Z)(ic,fd,Rc[fd])}):Object.getOwnPropertyDescriptors?Object.defineProperties(ic,Object.getOwnPropertyDescriptors(Rc)):r(Object(Rc)).forEach(function(fd){Object.defineProperty(ic,fd,Object.getOwnPropertyDescriptor(Rc,fd))})}return ic}function E(ic,Oc){var Rc=Object.keys(ic);if(Object.getOwnPropertySymbols){var fd=Object.getOwnPropertySymbols(ic);Oc&&(fd=fd.filter(function(pd){return Object.getOwnPropertyDescriptor(ic,
pd).enumerable}));Rc.push.apply(Rc,fd)}return Rc}function B(ic){for(var Oc=1;Oc<arguments.length;Oc++){var Rc=null!=arguments[Oc]?arguments[Oc]:{};Oc%2?E(Object(Rc),!0).forEach(function(fd){(0,S.Z)(ic,fd,Rc[fd])}):Object.getOwnPropertyDescriptors?Object.defineProperties(ic,Object.getOwnPropertyDescriptors(Rc)):E(Object(Rc)).forEach(function(fd){Object.defineProperty(ic,fd,Object.getOwnPropertyDescriptor(Rc,fd))})}return ic}function J(ic,Oc){var Rc=Object.keys(ic);if(Object.getOwnPropertySymbols){var fd=
Object.getOwnPropertySymbols(ic);Oc&&(fd=fd.filter(function(pd){return Object.getOwnPropertyDescriptor(ic,pd).enumerable}));Rc.push.apply(Rc,fd)}return Rc}function V(ic){for(var Oc=1;Oc<arguments.length;Oc++){var Rc=null!=arguments[Oc]?arguments[Oc]:{};Oc%2?J(Object(Rc),!0).forEach(function(fd){(0,S.Z)(ic,fd,Rc[fd])}):Object.getOwnPropertyDescriptors?Object.defineProperties(ic,Object.getOwnPropertyDescriptors(Rc)):J(Object(Rc)).forEach(function(fd){Object.defineProperty(ic,fd,Object.getOwnPropertyDescriptor(Rc,
fd))})}return ic}b.d(h,{YE:function(){return Jc},t6:function(){return fc}});var H=b(2577),S=b(7169),L=b(2726),T=b(9787),R=b.n(T),G=b(8972),F=b(3607),O=b(593),M=R().createContext({}),I=b(45),ia=b(8557),U=b(3470),Z=b(1119),aa=b(3440),W=b(3589),fa=b(4512);g=function(ic){var Oc=ic.children;ic=ic.className;var Rc=(0,U.Fy)(),fd=(0,T.useContext)(M);Rc=!(!Rc.canDeviceFitSidebar||!fd.shouldRenderDockButton);return(0,fa.jsxs)("div",{className:(0,I.Z)("sidebar__header",ic),"data-testid":"sidebar-header",children:[Oc,
(0,fa.jsxs)("div",{className:"sidebar__header__buttons",children:[Rc&&(0,fa.jsx)(aa.u,{label:(0,ia.t)("labels.sidebarLock"),children:(0,fa.jsx)(W.z,{onSelect:function(){var pd;return null===(pd=fd.onDock)||void 0===pd?void 0:pd.call(fd,!fd.docked)},selected:!!fd.docked,className:"sidebar__dock","data-testid":"sidebar-dock","aria-label":(0,ia.t)("labels.sidebarLock"),children:Z.qQ})}),(0,fa.jsx)(W.z,{"data-testid":"sidebar-close",className:"sidebar__close",onSelect:fd.onCloseRequest,"aria-label":(0,ia.t)("buttons.close"),
children:Z.Tw})]})]})};g.displayName="SidebarHeader";var X=b(7135),ea=b(6331),pa=b(7041),va=b(5990);h=b(3379);h=b.n(h);var ta=b(7795);ta=b.n(ta);var xa=b(569);xa=b.n(xa);var Ga=b(3565);Ga=b.n(Ga);var Ia=b(9216);Ia=b.n(Ia);var Ya=b(4589);Ya=b.n(Ya);var Fa=b(7051),Ka={};Ka.styleTagTransform=Ya();Ka.setAttributes=Ga();Ka.insert=xa().bind(null,"head");Ka.domAPI=ta();Ka.insertStyleElement=Ia();h()(Fa.Z,Ka);Fa.Z&&Fa.Z.locals&&Fa.Z.locals;Fa=function(ic){var Oc,Rc=ic.name,fd=ic.tab,pd=ic.icon,Ic=ic.title,
wc=ic.children,je=ic.onToggle,pf=ic.className;ic=ic.style;var qe=(0,U.n9)(),ue=(0,va.I)();return(0,fa.jsxs)("label",{title:Ic,children:[(0,fa.jsx)("input",{className:"ToolIcon_type_checkbox",type:"checkbox",onChange:function(kd){var Ae;null===(Ae=document.querySelector(".layer-ui__wrapper"))||void 0===Ae||Ae.classList.remove("animate");kd=kd.target.checked;qe({openSidebar:kd?{name:Rc,tab:fd}:null});null==je||je(kd)},checked:(null===(Oc=ue.openSidebar)||void 0===Oc?void 0:Oc.name)===Rc,"aria-label":Ic,
"aria-keyshortcuts":"0"}),(0,fa.jsxs)("div",{className:(0,I.Z)("sidebar-trigger",pf),style:ic,children:[pd&&(0,fa.jsx)("div",{children:pd}),wc&&(0,fa.jsx)("div",{className:"sidebar-trigger__label",children:wc})]})]})};Fa.displayName="SidebarTrigger";var Ba=b(11),la=b(7217),ka=b(1267),ua=b(9335),na=b(4801),oa=b(5622),La=b(3119),Oa=b(3060),Va=b(2673);const Ma=(0,T.createContext)(void 0),Ua={bubbles:!1,cancelable:!0},[ib,vb,yb]=function(ic){var Oc=ic+"CollectionProvider";const [Rc,fd]=(0,ka.b)(Oc),[pd,
Ic]=Rc(Oc,{collectionRef:{current:null},itemMap:new Map}),wc=ic+"CollectionSlot";Oc=R().forwardRef((qe,ue)=>{const {scope:kd,children:Ae}=qe;qe=Ic(wc,kd);ue=(0,ua.e)(ue,qe.collectionRef);return R().createElement(na.g7,{ref:ue},Ae)});const je=ic+"CollectionItemSlot",pf=R().forwardRef((qe,ue)=>{const {scope:kd,children:Ae,...Bf}=qe,gg=R().useRef(null);qe=(0,ua.e)(ue,gg);const jc=Ic(je,kd);return R().useEffect(()=>(jc.itemMap.set(gg,{ref:gg,...Bf}),()=>{jc.itemMap.delete(gg)})),R().createElement(na.g7,
{["data-radix-collection-item"]:"",ref:qe},Ae)});return[{Provider:qe=>{const {scope:ue,children:kd}=qe;qe=R().useRef(null);const Ae=R().useRef(new Map).current;return R().createElement(pd,{scope:ue,itemMap:Ae,collectionRef:qe},kd)},Slot:Oc,ItemSlot:pf},function(qe){const ue=Ic(ic+"CollectionConsumer",qe);return R().useCallback(()=>{const kd=ue.collectionRef.current;if(!kd)return[];const Ae=Array.from(kd.querySelectorAll("[data-radix-collection-item]"));return Array.from(ue.itemMap.values()).sort((Bf,
gg)=>Ae.indexOf(Bf.ref.current)-Ae.indexOf(gg.ref.current))},[ue.collectionRef,ue.itemMap])},fd]}("RovingFocusGroup"),[Wa,hb]=(0,ka.b)("RovingFocusGroup",[yb]),[ab,Qa]=Wa("RovingFocusGroup"),bb=(0,T.forwardRef)((ic,Oc)=>(0,T.createElement)(ib.Provider,{scope:ic.__scopeRovingFocusGroup},(0,T.createElement)(ib.Slot,{scope:ic.__scopeRovingFocusGroup},(0,T.createElement)(Pa,(0,Ba.Z)({},ic,{ref:Oc}))))),Pa=(0,T.forwardRef)((ic,Oc)=>{const {__scopeRovingFocusGroup:Rc,orientation:fd,loop:pd=!1,dir:Ic,currentTabStopId:wc,
defaultCurrentTabStopId:je,onCurrentTabStopIdChange:pf,onEntryFocus:qe,...ue}=ic,kd=(0,T.useRef)(null);Oc=(0,ua.e)(Oc,kd);const Ae=l(Ic),[Bf=null,gg]=(0,Va.T)({prop:wc,defaultProp:je,onChange:pf}),[jc,Zc]=(0,T.useState)(!1),Gc=(0,Oa.W)(qe),ub=vb(Rc),Bb=(0,T.useRef)(!1),[Eb,hd]=(0,T.useState)(0);return(0,T.useEffect)(()=>{const Ud=kd.current;if(Ud)return Ud.addEventListener("rovingFocusGroup.onEntryFocus",Gc),()=>Ud.removeEventListener("rovingFocusGroup.onEntryFocus",Gc)},[Gc]),(0,T.createElement)(ab,
{scope:Rc,orientation:fd,dir:Ae,loop:pd,currentTabStopId:Bf,onItemFocus:(0,T.useCallback)(Ud=>gg(Ud),[gg]),onItemShiftTab:(0,T.useCallback)(()=>Zc(!0),[]),onFocusableItemAdd:(0,T.useCallback)(()=>hd(Ud=>Ud+1),[]),onFocusableItemRemove:(0,T.useCallback)(()=>hd(Ud=>Ud-1),[])},(0,T.createElement)(La.WV.div,(0,Ba.Z)({tabIndex:jc||0===Eb?-1:0,"data-orientation":fd},ue,{ref:Oc,style:{outline:"none",...ic.style},onMouseDown:(0,la.M)(ic.onMouseDown,()=>{Bb.current=!0}),onFocus:(0,la.M)(ic.onFocus,Ud=>{var Td=
!Bb.current;Ud.target===Ud.currentTarget&&Td&&!jc&&(Td=new CustomEvent("rovingFocusGroup.onEntryFocus",Ua),(Ud.currentTarget.dispatchEvent(Td),Td.defaultPrevented)||(Ud=ub().filter(Ue=>Ue.focusable),m([Ud.find(Ue=>Ue.active),Ud.find(Ue=>Ue.id===Bf),...Ud].filter(Boolean).map(Ue=>Ue.ref.current))));Bb.current=!1}),onBlur:(0,la.M)(ic.onBlur,()=>Zc(!1))})))}),Lb=(0,T.forwardRef)((ic,Oc)=>{const {__scopeRovingFocusGroup:Rc,focusable:fd=!0,active:pd=!1,tabStopId:Ic,...wc}=ic;var je=(0,oa.M)();const pf=
Ic||je,qe=Qa("RovingFocusGroupItem",Rc);je=qe.currentTabStopId===pf;const ue=vb(Rc),{onFocusableItemAdd:kd,onFocusableItemRemove:Ae}=qe;return(0,T.useEffect)(()=>{if(fd)return kd(),()=>Ae()},[fd,kd,Ae]),(0,T.createElement)(ib.ItemSlot,{scope:Rc,id:pf,focusable:fd,active:pd},(0,T.createElement)(La.WV.span,(0,Ba.Z)({tabIndex:je?0:-1,"data-orientation":qe.orientation},wc,{ref:Oc,onMouseDown:(0,la.M)(ic.onMouseDown,Bf=>{fd?qe.onItemFocus(pf):Bf.preventDefault()}),onFocus:(0,la.M)(ic.onFocus,()=>qe.onItemFocus(pf)),
onKeyDown:(0,la.M)(ic.onKeyDown,Bf=>{if("Tab"===Bf.key&&Bf.shiftKey)return void qe.onItemShiftTab();if(Bf.target===Bf.currentTarget){var gg=function(Gc,ub,Bb){Gc=Gc.key;Bb="rtl"!==Bb?Gc:"ArrowLeft"===Gc?"ArrowRight":"ArrowRight"===Gc?"ArrowLeft":Gc;return"vertical"===ub&&["ArrowLeft","ArrowRight"].includes(Bb)||"horizontal"===ub&&["ArrowUp","ArrowDown"].includes(Bb)?void 0:xc[Bb]}(Bf,qe.orientation,qe.dir);if(void 0!==gg){Bf.preventDefault();let Gc=ue().filter(ub=>ub.focusable).map(ub=>ub.ref.current);
if("last"===gg)Gc.reverse();else if("prev"===gg||"next"===gg)"prev"===gg&&Gc.reverse(),Bf=Gc.indexOf(Bf.currentTarget),Gc=qe.loop?(Zc=Bf+1,(jc=Gc).map((ub,Bb)=>jc[(Zc+Bb)%jc.length])):Gc.slice(Bf+1);setTimeout(()=>m(Gc))}var jc,Zc}})})))}),xc={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};var oc=b(1483);[Ka]=(0,ka.b)("Tabs",[hb]);const pc=hb(),[Cc,bd]=Ka("Tabs"),dc=(0,T.forwardRef)((ic,Oc)=>{const {__scopeTabs:Rc,value:fd,
onValueChange:pd,defaultValue:Ic,orientation:wc="horizontal",dir:je,activationMode:pf="automatic",...qe}=ic;ic=l(je);const [ue,kd]=(0,Va.T)({prop:fd,onChange:pd,defaultProp:Ic});return(0,T.createElement)(Cc,{scope:Rc,baseId:(0,oa.M)(),value:ue,onValueChange:kd,orientation:wc,dir:ic,activationMode:pf},(0,T.createElement)(La.WV.div,(0,Ba.Z)({dir:ic,"data-orientation":wc},qe,{ref:Oc})))}),Nc=(0,T.forwardRef)((ic,Oc)=>{const {__scopeTabs:Rc,loop:fd=!0,...pd}=ic;ic=bd("TabsList",Rc);const Ic=pc(Rc);return(0,T.createElement)(bb,
(0,Ba.Z)({asChild:!0},Ic,{orientation:ic.orientation,dir:ic.dir,loop:fd}),(0,T.createElement)(La.WV.div,(0,Ba.Z)({role:"tablist","aria-orientation":ic.orientation},pd,{ref:Oc})))}),Qc=(0,T.forwardRef)((ic,Oc)=>{const {__scopeTabs:Rc,value:fd,disabled:pd=!1,...Ic}=ic,wc=bd("TabsTrigger",Rc),je=pc(Rc),pf=`${wc.baseId}-trigger-${fd}`,qe=`${wc.baseId}-content-${fd}`,ue=fd===wc.value;return(0,T.createElement)(Lb,(0,Ba.Z)({asChild:!0},je,{focusable:!pd,active:ue}),(0,T.createElement)(La.WV.button,(0,Ba.Z)({type:"button",
role:"tab","aria-selected":ue,"aria-controls":qe,"data-state":ue?"active":"inactive","data-disabled":pd?"":void 0,disabled:pd,id:pf},Ic,{ref:Oc,onMouseDown:(0,la.M)(ic.onMouseDown,kd=>{pd||0!==kd.button||!1!==kd.ctrlKey?kd.preventDefault():wc.onValueChange(fd)}),onKeyDown:(0,la.M)(ic.onKeyDown,kd=>{[" ","Enter"].includes(kd.key)&&wc.onValueChange(fd)}),onFocus:(0,la.M)(ic.onFocus,()=>{const kd="manual"!==wc.activationMode;ue||pd||!kd||wc.onValueChange(fd)})})))}),Ad=(0,T.forwardRef)((ic,Oc)=>{const {__scopeTabs:Rc,
value:fd,forceMount:pd,children:Ic,...wc}=ic,je=bd("TabsContent",Rc),pf=`${je.baseId}-trigger-${fd}`,qe=`${je.baseId}-content-${fd}`,ue=fd===je.value,kd=(0,T.useRef)(ue);return(0,T.useEffect)(()=>{const Ae=requestAnimationFrame(()=>kd.current=!1);return()=>cancelAnimationFrame(Ae)},[]),(0,T.createElement)(oc.z,{present:pd||ue},({present:Ae})=>(0,T.createElement)(La.WV.div,(0,Ba.Z)({"data-state":ue?"active":"inactive","data-orientation":je.orientation,role:"tabpanel","aria-labelledby":pf,hidden:!Ae,
id:qe,tabIndex:0},wc,{ref:Oc,style:{...ic.style,animationDuration:kd.current?"0s":void 0}}),Ae&&Ic))});var Xc=["children"];Ka=function(ic){var Oc=ic.children;ic=(0,L.Z)(ic,Xc);return(0,fa.jsx)(Nc,D(D({className:"sidebar-triggers"},ic),{},{children:Oc}))};Ka.displayName="SidebarTabTriggers";var sc=["children","tab","onSelect"],Sc=function(ic){var Oc=ic.children,Rc=ic.tab,fd=ic.onSelect;ic=(0,L.Z)(ic,sc);return(0,fa.jsx)(Qc,{value:Rc,asChild:!0,onSelect:fd,children:(0,fa.jsx)("button",t(t({type:"button",
className:"excalidraw-button sidebar-tab-trigger"},ic),{},{children:Oc}))})};Sc.displayName="SidebarTabTrigger";var Ib=["children"],lb=function(ic){var Oc=ic.children;ic=(0,L.Z)(ic,Ib);var Rc=(0,va.I)(),fd=(0,U.n9)();if(!Rc.openSidebar)return null;var pd=Rc.openSidebar.name;return(0,fa.jsx)(dc,f(f({className:"sidebar-tabs-root",value:Rc.openSidebar.tab,onValueChange:function(Ic){return fd(function(wc){return f(f({},wc),{},{openSidebar:f(f({},wc.openSidebar),{},{name:pd,tab:Ic})})})}},ic),{},{children:Oc}))};
lb.displayName="SidebarTabs";var Db=["tab","children"],Gb=function(ic){var Oc=ic.tab,Rc=ic.children;ic=(0,L.Z)(ic,Db);return(0,fa.jsx)(Ad,B(B({},ic),{},{value:Oc,children:Rc}))};Gb.displayName="SidebarTab";var db=b(4358);b=b(8208);var rb={};rb.styleTagTransform=Ya();rb.setAttributes=Ga();rb.insert=xa().bind(null,"head");rb.domAPI=ta();rb.insertStyleElement=Ia();h()(b.Z,rb);b.Z&&b.Z.locals&&b.Z.locals;var Nb=["name","children","onDock","docked","className"],fc=(0,F.cn)(!1),Bc=(0,T.forwardRef)(function(ic,
Oc){ic.name;var Rc=ic.children,fd=ic.onDock,pd=ic.docked,Ic=ic.className;ic=(0,L.Z)(ic,Nb);var wc=(0,U.n9)(),je=(0,F.b9)(fc,O.yE);(0,T.useLayoutEffect)(function(){return je(!!pd),function(){je(!1)}},[je,pd]);var pf=(0,T.useRef)({});pf.current.onCloseRequest=function(){wc({openSidebar:null})};pf.current.onDock=function(Ae){return null==fd?void 0:fd(Ae)};pf.current=(0,X.v4)(pf.current,{docked:pd,shouldRenderDockButton:!!fd&&null!=pd});var qe=(0,T.useRef)(null);(0,T.useImperativeHandle)(Oc,function(){return qe.current});
var ue=(0,U.Fy)(),kd=(0,T.useCallback)(function(){document.querySelector(".Dialog")||wc({openSidebar:null})},[wc]);return(0,db.O)(qe,(0,T.useCallback)(function(Ae){Ae.target.closest(".sidebar-trigger")||pd&&ue.canDeviceFitSidebar||kd()},[kd,pd,ue.canDeviceFitSidebar])),(0,T.useEffect)(function(){var Ae=function(Bf){Bf.key!==ea.tW.ESCAPE||pd&&ue.canDeviceFitSidebar||kd()};return document.addEventListener(pa.Ks.KEYDOWN,Ae),function(){document.removeEventListener(pa.Ks.KEYDOWN,Ae)}},[kd,pd,ue.canDeviceFitSidebar]),
(0,fa.jsx)(G.W,V(V({},ic),{},{className:(0,I.Z)("sidebar",{"sidebar--docked":pd},Ic),ref:qe,children:(0,fa.jsx)(M.Provider,{value:pf.current,children:Rc})}))});Bc.displayName="SidebarInner";var Jc=Object.assign((0,T.forwardRef)(function(ic,Oc){var Rc,fd=(0,va.I)(),pd=ic.onStateChange,Ic=(0,T.useRef)(fd.openSidebar);(0,T.useEffect)(function(){var qe,ue,kd,Ae,Bf;(!fd.openSidebar&&(null==Ic||null===(qe=Ic.current)||void 0===qe?void 0:qe.name)===ic.name||(null===(ue=fd.openSidebar)||void 0===ue?void 0:
ue.name)===ic.name&&(null==Ic||null===(kd=Ic.current)||void 0===kd?void 0:kd.name)!==ic.name||(null===(Ae=Ic.current)||void 0===Ae?void 0:Ae.name)===ic.name)&&fd.openSidebar!==Ic.current&&(null==pd||pd((null===(Bf=fd.openSidebar)||void 0===Bf?void 0:Bf.name)!==ic.name?null:fd.openSidebar));Ic.current=fd.openSidebar},[fd.openSidebar,pd,ic.name]);var wc=(0,T.useState)(!1);wc=(0,H.Z)(wc,2);var je=wc[0],pf=wc[1];return(0,T.useLayoutEffect)(function(){return pf(!0),function(){return pf(!1)}},[]),je&&(null===
(Rc=fd.openSidebar)||void 0===Rc?void 0:Rc.name)===ic.name?(0,T.createElement)(Bc,V(V({},ic),{},{ref:Oc,key:ic.name})):null}),{Header:g,TabTriggers:Ka,TabTrigger:Sc,Tabs:lb,Tab:Gb,Trigger:Fa});Jc.displayName="Sidebar"},399:function(g,h,b){b.d(h,{Z:function(){return B}});var l=b(7169);g=b(9787);var m=b.n(g);g=b(3379);g=b.n(g);h=b(7795);h=b.n(h);var p=b(569);p=b.n(p);var D=b(3565);D=b.n(D);var v=b(9216);v=b.n(v);var t=b(4589);t=b.n(t);var r=b(5892),f={};f.styleTagTransform=t();f.setAttributes=D();f.insert=
p().bind(null,"head");f.domAPI=h();f.insertStyleElement=v();g()(r.Z,f);r.Z&&r.Z.locals&&r.Z.locals;var E=b(4512),B=function(J){var V=J.size;V=void 0===V?"1em":V;var H=J.circleWidth;H=void 0===H?8:H;J=J.synchronized;J=void 0!==J&&J;var S=-m().useRef(Date.now()).current%1600;return(0,E.jsx)("div",{className:"Spinner",children:(0,E.jsx)("svg",{viewBox:"0 0 100 100",style:(0,l.Z)({width:V,height:V},"--spinner-delay",J?"".concat(S,"ms"):0),children:(0,E.jsx)("circle",{cx:"50",cy:"50",r:50-H/2,strokeWidth:H,
fill:"none",strokeMiterlimit:"10"})})})}},6517:function(g,h,b){function l(H,S){var L=Object.keys(H);if(Object.getOwnPropertySymbols){var T=Object.getOwnPropertySymbols(H);S&&(T=T.filter(function(R){return Object.getOwnPropertyDescriptor(H,R).enumerable}));L.push.apply(L,T)}return L}function m(H){for(var S=1;S<arguments.length;S++){var L=null!=arguments[S]?arguments[S]:{};S%2?l(Object(L),!0).forEach(function(T){(0,p.Z)(H,T,L[T])}):Object.getOwnPropertyDescriptors?Object.defineProperties(H,Object.getOwnPropertyDescriptors(L)):
l(Object(L)).forEach(function(T){Object.defineProperty(H,T,Object.getOwnPropertyDescriptor(L,T))})}return H}b.d(h,{Z:function(){return V}});var p=b(7169);g=b(3379);g=b.n(g);h=b(7795);h=b.n(h);var D=b(569);D=b.n(D);var v=b(3565);v=b.n(v);var t=b(9216);t=b.n(t);var r=b(4589);r=b.n(r);var f=b(3874),E={};E.styleTagTransform=r();E.setAttributes=v();E.insert=D().bind(null,"head");E.domAPI=h();E.insertStyleElement=t();g()(f.Z,E);f.Z&&f.Z.locals&&f.Z.locals;g=b(9787);var B=b(45),J=b(4512),V={Row:(0,g.forwardRef)(function(H,
S){var L=H.children,T=H.gap,R=H.align,G=H.justifyContent,F=H.style;return(0,J.jsx)("div",{className:(0,B.Z)("Stack Stack_horizontal",H.className),style:m({"--gap":T,alignItems:R,justifyContent:G},F),ref:S,children:L})}),Col:(0,g.forwardRef)(function(H,S){var L=H.children,T=H.gap,R=H.align,G=H.justifyContent,F=H.style;return(0,J.jsx)("div",{className:(0,B.Z)("Stack Stack_vertical",H.className),style:m({"--gap":T,justifyItems:R,justifyContent:G},F),ref:S,children:L})})}},4289:function(g,h,b){b.d(h,
{V:function(){return J}});var l=b(8950),m=b(2577);g=b(2975);var p=b.n(g),D=(b(3041),b(9787)),v=b.n(D),t=b(45),r=b(3470),f=b(8946),E=b(399),B=b(4512),J=v().forwardRef(function(V,H){var S=(0,r.J0)().id,L=v().useRef(null);v().useImperativeHandle(H,function(){return L.current});H="ToolIcon_size_".concat(V.size);var T=(0,D.useState)(!1),R=(0,m.Z)(T,2);T=R[0];var G=R[1],F=(0,D.useRef)(!0);R=function(){var M=(0,l.Z)(p().mark(function U(ia){var Z,aa;return p().wrap(function(W){for(;;)switch(W.prev=W.next){case 0:if(!((aa=
"onClick"in V&&(null===(Z=V.onClick)||void 0===Z?void 0:Z.call(V,ia)))&&"then"in aa)){W.next=18;break}return W.prev=2,G(!0),W.next=6,aa;case 6:W.next=15;break;case 8:if(W.prev=8,W.t0=W.catch(2),W.t0 instanceof f._){W.next=14;break}throw W.t0;case 14:console.warn(W.t0);case 15:return W.prev=15,F.current&&G(!1),W.finish(15);case 18:case "end":return W.stop()}},U,null,[[2,8,15,18]])}));return function(ia){return M.apply(this,arguments)}}();(0,D.useEffect)(function(){return function(){F.current=!1}},
[]);var O=(0,D.useRef)(null);return"button"===V.type||"icon"===V.type||"submit"===V.type?(S="icon"===V.type?"button":V.type,(0,B.jsxs)("button",{className:(0,t.Z)("ToolIcon_type_button",H,V.className,V.visible&&!V.hidden?"ToolIcon_type_button--show":"ToolIcon_type_button--hide",{ToolIcon:!V.hidden,"ToolIcon--selected":V.selected,"ToolIcon--plain":"icon"===V.type}),style:V.style,"data-testid":V["data-testid"],hidden:V.hidden,title:V.title,"aria-label":V["aria-label"],type:S,onClick:R,ref:L,disabled:T||
V.isLoading,children:[(V.icon||V.label)&&(0,B.jsxs)("div",{className:"ToolIcon__icon","aria-hidden":"true",children:[V.icon||V.label,V.keyBindingLabel&&(0,B.jsx)("span",{className:"ToolIcon__keybinding",children:V.keyBindingLabel}),V.isLoading&&(0,B.jsx)(E.Z,{})]}),V.showAriaLabel&&(0,B.jsxs)("div",{className:"ToolIcon__label",children:[V["aria-label"]," ",T&&(0,B.jsx)(E.Z,{})]}),V.children]})):(0,B.jsxs)("label",{className:(0,t.Z)("ToolIcon",V.className),title:V.title,onPointerDown:function(M){var I;
O.current=M.pointerType||null;null===(I=V.onPointerDown)||void 0===I||I.call(V,{pointerType:M.pointerType||null})},onPointerUp:function(){requestAnimationFrame(function(){O.current=null})},children:[(0,B.jsx)("input",{className:"ToolIcon_type_radio ".concat(H),type:"radio",name:V.name,"aria-label":V["aria-label"],"aria-keyshortcuts":V["aria-keyshortcuts"],"data-testid":V["data-testid"],id:"".concat(S,"-").concat(V.id),onChange:function(){var M;null===(M=V.onChange)||void 0===M||M.call(V,{pointerType:O.current})},
checked:V.checked,ref:L}),(0,B.jsxs)("div",{className:"ToolIcon__icon",children:[V.icon,V.keyBindingLabel&&(0,B.jsx)("span",{className:"ToolIcon__keybinding",children:V.keyBindingLabel})]})]})});J.defaultProps={visible:!0,className:"",size:"medium"};J.displayName="ToolButton"},3440:function(g,h,b){b.d(h,{u:function(){return J},bK:function(){return E},Js:function(){return B}});g=b(3379);g=b.n(g);h=b(7795);h=b.n(h);var l=b(569);l=b.n(l);var m=b(3565);m=b.n(m);var p=b(9216);p=b.n(p);var D=b(4589);D=
b.n(D);var v=b(6626),t={};t.styleTagTransform=D();t.setAttributes=m();t.insert=l().bind(null,"head");t.domAPI=h();t.insertStyleElement=p();g()(v.Z,t);v.Z&&v.Z.locals&&v.Z.locals;var r=b(9787),f=b(4512),E=function(){var V=document.querySelector(".excalidraw-tooltip");if(V)return V;V=document.createElement("div");return document.body.appendChild(V),V.classList.add("excalidraw-tooltip"),V},B=function(V,H){var S,L=2<arguments.length&&void 0!==arguments[2]?arguments[2]:"bottom",T=V.getBoundingClientRect(),
R=window.innerWidth,G=window.innerHeight,F=H.left+H.width/2-T.width/2;0>F?F=5:F+T.width>=R&&(F=R-T.width-5);"bottom"===L?(S=H.top+H.height+5)+T.height>=G&&(S=H.top-T.height-5):0>(S=H.top-T.height-5)&&(S=H.top+H.height+5);Object.assign(V.style,{top:"".concat(S,"px"),left:"".concat(F,"px")})},J=function(V){var H=V.children,S=V.label,L=V.long,T=void 0!==L&&L;V=V.style;return(0,r.useEffect)(function(){return function(){return E().classList.remove("excalidraw-tooltip--visible")}},[]),(0,f.jsx)("div",{className:"excalidraw-tooltip-wrapper",
onPointerEnter:function(R){var G=R.currentTarget;R=E();R.classList.add("excalidraw-tooltip--visible");R.style.minWidth=T?"50ch":"10ch";R.style.maxWidth=T?"50ch":"15ch";R.textContent=S;G=G.getBoundingClientRect();B(R,G)},onPointerLeave:function(){return E().classList.remove("excalidraw-tooltip--visible")},style:V,children:H})}},1601:function(g,h,b){var l=b(2726),m=b(1930);g=b(9787);var p=b.n(g),D=b(8557),v=["i18nKey","children"],t=/({{[\w-]+}})|(<[\w-]+>)|(<\/[\w-]+>)/g,r=/{{([\w-]+)}}/,f=/<([\w-]+)>/,
E=/<\/([\w-]+)>/;h.Z=function(B){var J=B.i18nKey;B=(B.children,(0,l.Z)(B,v));var V=(0,D.QT)().t;return p().createElement.apply(p(),[p().Fragment,{}].concat((0,m.Z)(function(H,S){var L=[{name:"",children:[]}];return H.split(t).filter(Boolean).forEach(function(T){var R=T.match(f),G=T.match(E),F=T.match(r);null!==R?(T=R[1],S.hasOwnProperty(T)?L.push({name:T,children:[]}):console.warn("Trans: missed to pass in prop ".concat(T," for interpolating ").concat(H))):null!==G?G[1]===L[L.length-1].name?(R=L.pop(),
T=p().createElement.apply(p(),[p().Fragment,{}].concat((0,m.Z)(R.children))),R=S[R.name],"function"==typeof R&&L[L.length-1].children.push(R(T))):console.warn("Trans: unexpected end tag ".concat(T," for interpolating ").concat(H)):null!==F?(T=F[1],S.hasOwnProperty(T)?L[L.length-1].children.push(S[T]):console.warn("Trans: key ".concat(T," not in props for interpolating ").concat(H))):L[L.length-1].children.push(T)}),1!==L.length&&console.warn("Trans: stack not empty for interpolating ".concat(H)),
L[0].children}(V(J),B))))}},9714:function(g,h,b){b.d(h,{Z:function(){return H}});var l=b(2577);g=b(3379);g=b.n(g);h=b(7795);h=b.n(h);var m=b(569);m=b.n(m);var p=b(3565);p=b.n(p);var D=b(9216);D=b.n(D);var v=b(4589);v=b.n(v);var t=b(6359),r={};r.styleTagTransform=v();r.setAttributes=p();r.insert=m().bind(null,"head");r.domAPI=h();r.insertStyleElement=D();g()(t.Z,r);t.Z&&t.Z.locals&&t.Z.locals;g=b(9787);var f=b.n(g),E=b(45),B=b(3440),J=b(3470),V=b(4512),H=function(S){var L=S.className,T=S.mobile;S=
S.collaborators;var R=(0,J.eh)(),G=new Map;S.forEach(function(F,O){G.set(F.id||O,F)});S=0<G.size&&Array.from(G).filter(function(F){F=(0,l.Z)(F,2);F=(F[0],F[1]);return 0!==Object.keys(F).length}).map(function(F){var O=(0,l.Z)(F,2);F=O[0];O=O[1];var M=R.renderAction("goToCollaborator",[F,O]);return T?(0,V.jsx)(B.u,{label:O.username||"Unknown user",children:M},F):(0,V.jsx)(f().Fragment,{children:M},F)});return(0,V.jsx)("div",{className:(0,E.Z)("UserList",L,{UserList_mobile:T}),children:S})}},8103:function(g,
h,b){function l(ea,pa){var va=Object.keys(ea);if(Object.getOwnPropertySymbols){var ta=Object.getOwnPropertySymbols(ea);pa&&(ta=ta.filter(function(xa){return Object.getOwnPropertyDescriptor(ea,xa).enumerable}));va.push.apply(va,ta)}return va}function m(ea){for(var pa=1;pa<arguments.length;pa++){var va=null!=arguments[pa]?arguments[pa]:{};pa%2?l(Object(va),!0).forEach(function(ta){(0,v.Z)(ea,ta,va[ta])}):Object.getOwnPropertyDescriptors?Object.defineProperties(ea,Object.getOwnPropertyDescriptors(va)):
l(Object(va)).forEach(function(ta){Object.defineProperty(ea,ta,Object.getOwnPropertyDescriptor(va,ta))})}return ea}function p(ea,pa){var va=Object.keys(ea);if(Object.getOwnPropertySymbols){var ta=Object.getOwnPropertySymbols(ea);pa&&(ta=ta.filter(function(xa){return Object.getOwnPropertyDescriptor(ea,xa).enumerable}));va.push.apply(va,ta)}return va}function D(ea){for(var pa=1;pa<arguments.length;pa++){var va=null!=arguments[pa]?arguments[pa]:{};pa%2?p(Object(va),!0).forEach(function(ta){(0,v.Z)(ea,
ta,va[ta])}):Object.getOwnPropertyDescriptors?Object.defineProperties(ea,Object.getOwnPropertyDescriptors(va)):p(Object(va)).forEach(function(ta){Object.defineProperty(ea,ta,Object.getOwnPropertyDescriptor(va,ta))})}return ea}b.d(h,{Z:function(){return X}});var v=b(7169),t=b(2726),r=b(45),f=b(3470),E=b(4512),B=["className","children","onToggle","title"];g=function(ea){var pa=ea.className,va=void 0===pa?"":pa;pa=ea.children;var ta=ea.onToggle,xa=ea.title;ea=(0,t.Z)(ea,B);var Ga=(0,f.Fy)();va=(0,r.Z)("dropdown-menu-button ".concat(va),
"zen-mode-transition",{"dropdown-menu-button--mobile":Ga.isMobile}).trim();return(0,E.jsx)("button",m(m({"data-prevent-outside-click":!0,className:va,onClick:ta,type:"button","data-testid":"dropdown-menu-button",title:xa},ea),{},{children:pa}))};g.displayName="DropdownMenuTrigger";h=b(6986);var J=function(){return(0,E.jsx)("div",{style:{height:"1px",backgroundColor:"var(--default-border-color)",margin:".5rem 0"}})};J.displayName="DropdownMenuSeparator";var V=function(ea){var pa=ea.children,va=ea.className,
ta=ea.style;ea=ea.title;return(0,E.jsxs)("div",{className:"dropdown-menu-group ".concat(void 0===va?"":va),style:ta,children:[ea&&(0,E.jsx)("p",{className:"dropdown-menu-group-title",children:ea}),pa]})};V.displayName="DropdownMenuGroup";var H=b(8972),S=b(6517),L=b(9787),T=b.n(L),R=b(3936),G=b(4358),F=function(ea){var pa=ea.children,va=ea.onClickOutside,ta=ea.className,xa=void 0===ta?"":ta;ta=ea.onSelect;ea=ea.style;var Ga=(0,f.Fy)(),Ia=(0,L.useRef)(null);(0,G.O)(Ia,function(){null==va||va()});xa=
(0,r.Z)("dropdown-menu ".concat(xa),{"dropdown-menu--mobile":Ga.isMobile}).trim();return(0,E.jsx)(R.N7.Provider,{value:{onSelect:ta},children:(0,E.jsx)("div",{ref:Ia,className:xa,style:ea,"data-testid":"dropdown-menu",children:Ga.isMobile?(0,E.jsx)(S.Z.Col,{className:"dropdown-menu-container",children:pa}):(0,E.jsx)(H.W,{className:"dropdown-menu-container",padding:2,style:{zIndex:2},children:pa})})})};F.displayName="DropdownMenuContent";var O=b(9996),M=["children","className"],I=b(3379);I=b.n(I);
var ia=b(7795);ia=b.n(ia);var U=b(569);U=b.n(U);var Z=b(3565);Z=b.n(Z);var aa=b(9216);aa=b.n(aa);var W=b(4589);W=b.n(W);b=b(7399);var fa={};fa.styleTagTransform=W();fa.setAttributes=Z();fa.insert=U().bind(null,"head");fa.domAPI=ia();fa.insertStyleElement=aa();I()(b.Z,fa);b.Z&&b.Z.locals&&b.Z.locals;b=function(ea){var pa=ea.children;ea=ea.open;var va=function(ta){return T().Children.toArray(ta).find(function(xa){return T().isValidElement(xa)&&"string"!=typeof xa.type&&(null==xa?void 0:xa.type.displayName)&&
"DropdownMenuTrigger"===xa.type.displayName})||null}(pa);pa=function(ta){return T().Children.toArray(ta).find(function(xa){return T().isValidElement(xa)&&"string"!=typeof xa.type&&(null==xa?void 0:xa.type.displayName)&&"DropdownMenuContent"===xa.type.displayName})||null}(pa);return(0,E.jsxs)(E.Fragment,{children:[va,ea&&pa]})};b.Trigger=g;b.Content=F;b.Item=h.Z;b.ItemLink=O.Z;b.ItemCustom=function(ea){var pa=ea.children,va=ea.className;va=void 0===va?"":va;ea=(0,t.Z)(ea,M);return(0,E.jsx)("div",D(D({},
ea),{},{className:"dropdown-menu-item-base dropdown-menu-item-custom ".concat(va).trim(),children:pa}))};b.Group=V;b.Separator=J;var X=b;b.displayName="DropdownMenu"},6986:function(g,h,b){function l(E,B){var J=Object.keys(E);if(Object.getOwnPropertySymbols){var V=Object.getOwnPropertySymbols(E);B&&(V=V.filter(function(H){return Object.getOwnPropertyDescriptor(E,H).enumerable}));J.push.apply(J,V)}return J}function m(E){for(var B=1;B<arguments.length;B++){var J=null!=arguments[B]?arguments[B]:{};B%
2?l(Object(J),!0).forEach(function(V){(0,p.Z)(E,V,J[V])}):Object.getOwnPropertyDescriptors?Object.defineProperties(E,Object.getOwnPropertyDescriptors(J)):l(Object(J)).forEach(function(V){Object.defineProperty(E,V,Object.getOwnPropertyDescriptor(J,V))})}return E}var p=b(7169),D=b(2726),v=b(3936),t=b(8618),r=b(4512),f=["icon","onSelect","children","shortcut","className"];g=function(E){var B,J=E.icon,V=E.onSelect,H=E.children,S=E.shortcut,L=E.className;E=(0,D.Z)(E,f);V=(0,v.qZ)(E.onClick,V);return(0,r.jsx)("button",
m(m({},E),{},{onClick:V,type:"button",className:(0,v.n)(L),title:null!==(B=E.title)&&void 0!==B?B:E["aria-label"],children:(0,r.jsx)(t.Z,{icon:J,shortcut:S,children:H})}))};h.Z=g;g.displayName="DropdownMenuItem"},8618:function(g,h,b){var l=b(3470),m=b(4512);h.Z=function(p){var D=p.icon,v=p.shortcut;p=p.children;var t=(0,l.Fy)();return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("div",{className:"dropdown-menu-item__icon",children:D}),(0,m.jsx)("div",{className:"dropdown-menu-item__text",children:p}),
v&&!t.isMobile&&(0,m.jsx)("div",{className:"dropdown-menu-item__shortcut",children:v})]})}},9996:function(g,h,b){function l(E,B){var J=Object.keys(E);if(Object.getOwnPropertySymbols){var V=Object.getOwnPropertySymbols(E);B&&(V=V.filter(function(H){return Object.getOwnPropertyDescriptor(E,H).enumerable}));J.push.apply(J,V)}return J}function m(E){for(var B=1;B<arguments.length;B++){var J=null!=arguments[B]?arguments[B]:{};B%2?l(Object(J),!0).forEach(function(V){(0,p.Z)(E,V,J[V])}):Object.getOwnPropertyDescriptors?
Object.defineProperties(E,Object.getOwnPropertyDescriptors(J)):l(Object(J)).forEach(function(V){Object.defineProperty(E,V,Object.getOwnPropertyDescriptor(J,V))})}return E}var p=b(7169),D=b(2726),v=b(8618),t=b(3936),r=b(4512),f="icon shortcut href children onSelect className".split(" ");g=function(E){var B,J=E.icon,V=E.shortcut,H=E.href,S=E.children,L=E.onSelect,T=E.className;T=void 0===T?"":T;E=(0,D.Z)(E,f);L=(0,t.qZ)(E.onClick,L);return(0,r.jsx)("a",m(m({},E),{},{href:H,target:"_blank",rel:"noreferrer",
className:(0,t.n)(T),title:null!==(B=E.title)&&void 0!==B?B:E["aria-label"],onClick:L,children:(0,r.jsx)(v.Z,{icon:J,shortcut:V,children:S})}))};h.Z=g;g.displayName="DropdownMenuItemLink"},3936:function(g,h,b){b.d(h,{N7:function(){return D},n:function(){return v},qZ:function(){return t}});var l=b(9787);g=b.n(l);var m=b(7041),p=b(7135),D=g().createContext({}),v=function(){return"dropdown-menu-item dropdown-menu-item-base ".concat(0<arguments.length&&void 0!==arguments[0]?arguments[0]:"").trim()},t=
function(r,f){var E=(0,l.useContext)(D);return(0,p.Mj)(r,function(B){var J;B=new CustomEvent(m.Ks.MENU_ITEM_SELECT,{bubbles:!0,cancelable:!0});(null==f||f(B),B.defaultPrevented)||null===(J=E.onSelect)||void 0===J||J.call(E,B)})}},3375:function(g,h,b){function l(E,B){var J=Object.keys(E);if(Object.getOwnPropertySymbols){var V=Object.getOwnPropertySymbols(E);B&&(V=V.filter(function(H){return Object.getOwnPropertyDescriptor(E,H).enumerable}));J.push.apply(J,V)}return J}b.d(h,{$:function(){return f}});
var m=b(7169),p=b(2577),D=b(3607),v=b(9787),t=b(5371),r=b(4512),f=function(E,B){var J=(0,D.cn)(0),V=function(H){var S=(0,t.R6)().jotaiScope;S=(0,D.KO)(J,S);var L=(0,p.Z)(S,2)[1],T=(0,v.useRef)({preferHost:!1,counter:0});return(0,v.useLayoutEffect)(function(){var R=T.current;return L(function(G){G+=1;return R.counter=G,G}),function(){L(function(G){--G;return R.counter=G,G||(R.preferHost=!1),G})}},[L]),H.__fallback||(T.current.preferHost=!0),!T.current.counter&&H.__fallback&&T.current.preferHost||1<
T.current.counter&&H.__fallback?null:(0,r.jsx)(B,function(R){for(var G=1;G<arguments.length;G++){var F=null!=arguments[G]?arguments[G]:{};G%2?l(Object(F),!0).forEach(function(O){(0,m.Z)(R,O,F[O])}):Object.getOwnPropertyDescriptors?Object.defineProperties(R,Object.getOwnPropertyDescriptors(F)):l(Object(F)).forEach(function(O){Object.defineProperty(R,O,Object.getOwnPropertyDescriptor(F,O))})}return R}({},H))};return V.displayName=E,V}},1119:function(g,h,b){function l(pe,$d){var Ab=Object.keys(pe);if(Object.getOwnPropertySymbols){var ec=
Object.getOwnPropertySymbols(pe);$d&&(ec=ec.filter(function(vc){return Object.getOwnPropertyDescriptor(pe,vc).enumerable}));Ab.push.apply(Ab,ec)}return Ab}function m(pe){for(var $d=1;$d<arguments.length;$d++){var Ab=null!=arguments[$d]?arguments[$d]:{};$d%2?l(Object(Ab),!0).forEach(function(ec){(0,p.Z)(pe,ec,Ab[ec])}):Object.getOwnPropertyDescriptors?Object.defineProperties(pe,Object.getOwnPropertyDescriptors(Ab)):l(Object(Ab)).forEach(function(ec){Object.defineProperty(pe,ec,Object.getOwnPropertyDescriptor(Ab,
ec))})}return pe}b.d(h,{$W:function(){return Hd},$c:function(){return Qa},$q:function(){return xa},BF:function(){return Gb},Ct:function(){return bd},D7:function(){return Oa},DG:function(){return Wa},DJ:function(){return ia},DS:function(){return pf},EO:function(){return Td},ET:function(){return La},FC:function(){return O},FL:function(){return Fa},Gc:function(){return oc},HL:function(){return dc},Hk:function(){return ob},Hy:function(){return ua},IN:function(){return pc},J8:function(){return hb},NA:function(){return Ka},
NW:function(){return la},Nw:function(){return tb},OA:function(){return Gc},OW:function(){return Z},P7:function(){return kb},Pm:function(){return pa},RJ:function(){return db},RY:function(){return ka},Re:function(){return W},ST:function(){return sc},Sd:function(){return Ga},TP:function(){return ab},Tl:function(){return yb},Tw:function(){return lb},UE:function(){return bb},UI:function(){return Tb},UT:function(){return td},VL:function(){return va},Vl:function(){return Lb},Vq:function(){return L},W2:function(){return wc},
W5:function(){return Xc},Wl:function(){return ic},X7:function(){return Bc},XB:function(){return ta},XH:function(){return Ya},YA:function(){return R},ZA:function(){return Jc},Zm:function(){return Va},_C:function(){return F},_U:function(){return I},a0:function(){return Nb},a1:function(){return ib},a5:function(){return Rc},aA:function(){return Ue},aL:function(){return Ub},aT:function(){return fd},bf:function(){return pd},by:function(){return na},dg:function(){return te},e0:function(){return fa},eQ:function(){return Ma},
fr:function(){return qe},gK:function(){return Sc},h0:function(){return oa},il:function(){return ue},j8:function(){return Bf},jn:function(){return Ib},kL:function(){return Ba},kM:function(){return Ic},lF:function(){return rb},m:function(){return Ae},m9:function(){return Oc},mh:function(){return Qc},mv:function(){return rd},nb:function(){return aa},np:function(){return fc},nq:function(){return jc},o3:function(){return hd},oQ:function(){return M},oT:function(){return Ud},op:function(){return Db},pO:function(){return T},
po:function(){return vb},pw:function(){return Cc},q0:function(){return gg},qQ:function(){return G},rr:function(){return Eb},t5:function(){return xc},tW:function(){return Zc},tb:function(){return ea},tn:function(){return kd},uD:function(){return Ad},vo:function(){return ub},wr:function(){return je},xL:function(){return Ia},xP:function(){return Ua},xs:function(){return Nc},z6:function(){return Bb},zG:function(){return Pa},zb:function(){return X},zl:function(){return ve},zu:function(){return U}});var p=
b(7169),D=b(2726),v=b(9787),t=b.n(v),r=b(5284),f=b(45),E=b(7041),B=b(4512),J=["width","height","mirror","style"],V=function(pe){var $d=1<arguments.length&&void 0!==arguments[1]?arguments[1]:512;$d="number"==typeof $d?{width:$d}:$d;var Ab=$d.width;Ab=void 0===Ab?512:Ab;var ec=$d.height;ec=void 0===ec?Ab:ec;var vc=$d.mirror,Xa=$d.style;$d=(0,D.Z)($d,J);return(0,B.jsx)("svg",m(m({"aria-hidden":"true",focusable:"false",role:"img",viewBox:"0 0 ".concat(Ab," ").concat(ec),className:(0,f.Z)({"rtl-mirror":vc}),
style:Xa},$d),{},{children:"string"==typeof pe?(0,B.jsx)("path",{fill:"currentColor",d:pe}):pe}))},H={width:24,height:24,fill:"none",strokeWidth:2,stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"},S={width:20,height:20,fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"},L=(V((0,B.jsxs)("g",{strokeWidth:"1.5",children:[(0,B.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,B.jsx)("rect",{x:3,y:8,width:18,height:4,rx:1}),(0,B.jsx)("line",{x1:12,
y1:8,x2:12,y2:21}),(0,B.jsx)("path",{d:"M19 12v7a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-7"}),(0,B.jsx)("path",{d:"M7.5 8a2.5 2.5 0 0 1 0 -5a4.8 8 0 0 1 4.5 5a4.8 8 0 0 1 4.5 -5a2.5 2.5 0 0 1 0 5"})]}),H),V((0,B.jsxs)("g",{strokeWidth:"1.5",children:[(0,B.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,B.jsx)("path",{d:"M3 19a9 9 0 0 1 9 0a9 9 0 0 1 9 0"}),(0,B.jsx)("path",{d:"M3 6a9 9 0 0 1 9 0a9 9 0 0 1 9 0"}),(0,B.jsx)("line",{x1:"3",y1:"6",x2:"3",y2:"19"}),(0,B.jsx)("line",{x1:"12",
y1:"6",x2:"12",y2:"19"}),(0,B.jsx)("line",{x1:"21",y1:"6",x2:"21",y2:"19"})]}),H)),T=V((0,B.jsxs)("svg",{strokeWidth:"1.5",children:[(0,B.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,B.jsx)("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),(0,B.jsx)("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]}),H),R=V((0,B.jsxs)("g",{strokeWidth:"1.5",children:[(0,B.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,B.jsx)("circle",{cx:"12",cy:"12",r:"1"}),(0,B.jsx)("circle",{cx:"12",cy:"19",r:"1"}),
(0,B.jsx)("circle",{cx:"12",cy:"5",r:"1"})]}),H),G=V((0,B.jsxs)("svg",{strokeWidth:"1.5",children:[(0,B.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,B.jsx)("path",{d:"M9 4v6l-2 4v2h10v-2l-2 -4v-6"}),(0,B.jsx)("line",{x1:"12",y1:"16",x2:"12",y2:"21"}),(0,B.jsx)("line",{x1:"8",y1:"4",x2:"16",y2:"4"})]}),H),F=V((0,B.jsxs)("g",{children:[(0,B.jsx)("path",{d:"M13.542 8.542H6.458a2.5 2.5 0 0 0-2.5 2.5v3.75a2.5 2.5 0 0 0 2.5 2.5h7.084a2.5 2.5 0 0 0 2.5-2.5v-3.75a2.5 2.5 0 0 0-2.5-2.5Z",
stroke:"currentColor",strokeWidth:"1.25"}),(0,B.jsx)("path",{d:"M10 13.958a1.042 1.042 0 1 0 0-2.083 1.042 1.042 0 0 0 0 2.083Z",stroke:"currentColor",strokeWidth:"1.25"}),(0,B.jsx)("mask",{id:"UnlockedIcon",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:6,y:1,width:9,height:9,children:(0,B.jsx)("path",{stroke:"none",d:"M6.399 9.561V5.175c0-.93.401-1.823 1.116-2.48a3.981 3.981 0 0 1 2.693-1.028c1.01 0 1.98.37 2.694 1.027.715.658 1.116 1.55 1.116 2.481",fill:"#fff"})}),(0,B.jsx)("g",{mask:"url(#UnlockedIcon)",
children:(0,B.jsx)("path",{stroke:"none",d:"M5.149 9.561v1.25h2.5v-1.25h-2.5Zm5.06-7.894V.417v1.25Zm2.559 3.508v1.25h2.5v-1.25h-2.5ZM7.648 8.51V5.175h-2.5V8.51h2.5Zm0-3.334c0-.564.243-1.128.713-1.561L6.668 1.775c-.959.883-1.52 2.104-1.52 3.4h2.5Zm.713-1.561a2.732 2.732 0 0 1 1.847-.697v-2.5c-1.31 0-2.585.478-3.54 1.358L8.36 3.614Zm1.847-.697c.71 0 1.374.26 1.847.697l1.694-1.839a5.231 5.231 0 0 0-3.54-1.358v2.5Zm1.847.697c.47.433.713.997.713 1.561h2.5c0-1.296-.56-2.517-1.52-3.4l-1.693 1.839Z",fill:"currentColor"})})]}),
S),O=V((0,B.jsxs)("g",{strokeWidth:"1.25",children:[(0,B.jsx)("path",{d:"M13.542 8.542H6.458a2.5 2.5 0 0 0-2.5 2.5v3.75a2.5 2.5 0 0 0 2.5 2.5h7.084a2.5 2.5 0 0 0 2.5-2.5v-3.75a2.5 2.5 0 0 0-2.5-2.5Z"}),(0,B.jsx)("path",{d:"M10 13.958a1.042 1.042 0 1 0 0-2.083 1.042 1.042 0 0 0 0 2.083Z"}),(0,B.jsx)("path",{d:"M6.667 8.333V5.417C6.667 3.806 8.159 2.5 10 2.5c1.841 0 3.333 1.306 3.333 2.917v2.916"})]}),S),M=V((0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)("path",{d:"M38.5 83.5c-14-2-17.833-10.473-21-22.5C14.333 48.984 12 22 12 12.5",
stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"}),(0,B.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m12.005 10.478 7.905 14.423L6 25.75l6.005-15.273Z",fill:"currentColor"}),(0,B.jsx)("path",{d:"M12.005 10.478c1.92 3.495 3.838 7 7.905 14.423m-7.905-14.423c3.11 5.683 6.23 11.368 7.905 14.423m0 0c-3.68.226-7.35.455-13.91.85m13.91-.85c-5.279.33-10.566.647-13.91.85m0 0c1.936-4.931 3.882-9.86 6.005-15.273M6 25.75c2.069-5.257 4.135-10.505 6.005-15.272",stroke:"currentColor",strokeWidth:2,
strokeLinecap:"round"})]}),{width:41,height:94,fill:"none"}),I=V((0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)("path",{d:"M18.026 1.232c-5.268 13.125-5.548 33.555 3.285 42.311 8.823 8.75 33.31 12.304 42.422 13.523",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"}),(0,B.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m72.181 59.247-13.058-10-2.948 13.62 16.006-3.62Z",fill:"currentColor"}),(0,B.jsx)("path",{d:"M72.181 59.247c-3.163-2.429-6.337-4.856-13.058-10m13.058 10c-5.145-3.936-10.292-7.882-13.058-10m0 0c-.78 3.603-1.563 7.196-2.948 13.62m2.948-13.62c-1.126 5.168-2.24 10.346-2.948 13.62m0 0c5.168-1.166 10.334-2.343 16.006-3.62m-16.006 3.62c5.51-1.248 11.01-2.495 16.006-3.62",
stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"})]}),{width:85,height:71,fill:"none"}),ia=V((0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)("path",{d:"M1 77c14-2 31.833-11.973 35-24 3.167-12.016-6-35-9.5-43.5",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"}),(0,B.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m24.165 1.093-2.132 16.309 13.27-4.258-11.138-12.05Z",fill:"currentColor"}),(0,B.jsx)("path",{d:"M24.165 1.093c-.522 3.953-1.037 7.916-2.132 16.309m2.131-16.309c-.835 6.424-1.68 12.854-2.13 16.308m0 0c3.51-1.125 7.013-2.243 13.27-4.257m-13.27 4.257c5.038-1.608 10.08-3.232 13.27-4.257m0 0c-3.595-3.892-7.197-7.777-11.14-12.05m11.14 12.05c-3.837-4.148-7.667-8.287-11.14-12.05",
stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"})]}),{width:38,height:78,fill:"none"}),U=(V((0,B.jsx)("g",{fill:"currentColor",children:(0,B.jsx)("path",{d:"M39.9 32.889a.326.326 0 0 0-.279-.056c-2.094-3.083-4.774-6-7.343-8.833l-.419-.472a.212.212 0 0 0-.056-.139.586.586 0 0 0-.167-.111l-.084-.083-.056-.056c-.084-.167-.28-.278-.475-.167-.782.39-1.507.973-2.206 1.528-.92.722-1.842 1.445-2.708 2.25a8.405 8.405 0 0 0-.977 1.028c-.14.194-.028.361.14.444-.615.611-1.23 1.223-1.843 1.861a.315.315 0 0 0-.084.223c0 .083.056.166.111.194l1.09.833v.028c1.535 1.528 4.244 3.611 7.12 5.861.418.334.865.667 1.284 1 .195.223.39.473.558.695.084.11.28.139.391.055.056.056.14.111.196.167a.398.398 0 0 0 .167.056.255.255 0 0 0 .224-.111.394.394 0 0 0 .055-.167c.029 0 .028.028.056.028a.318.318 0 0 0 .224-.084l5.082-5.528a.309.309 0 0 0 0-.444Zm-14.63-1.917a.485.485 0 0 0 .111.14c.586.5 1.2 1 1.843 1.555l-2.569-1.945-.251-.166c-.056-.028-.112-.084-.168-.111l-.195-.167.056-.056.055-.055.112-.111c.866-.861 2.346-2.306 3.1-3.028-.81.805-2.43 3.167-2.095 3.944Zm8.767 6.89-2.122-1.612a44.713 44.713 0 0 0-2.625-2.5c1.145.861 2.122 1.611 2.262 1.75 1.117.972 1.06.806 1.815 1.445l.921.666a1.06 1.06 0 0 1-.251.25Zm.558.416-.056-.028c.084-.055.168-.111.252-.194l-.196.222ZM1.089 5.75c.055.361.14.722.195 1.056.335 1.833.67 3.5 1.284 4.75l.252.944c.084.361.223.806.363.917 1.424 1.25 3.602 3.11 5.947 4.889a.295.295 0 0 0 .363 0s0 .027.028.027a.254.254 0 0 0 .196.084.318.318 0 0 0 .223-.084c2.988-3.305 5.221-6.027 6.813-8.305.112-.111.14-.278.14-.417.111-.111.195-.25.307-.333.111-.111.111-.306 0-.39l-.028-.027c0-.055-.028-.139-.084-.167-.698-.666-1.2-1.138-1.731-1.638-.922-.862-1.871-1.75-3.881-3.75l-.028-.028c-.028-.028-.056-.056-.112-.056-.558-.194-1.703-.389-3.127-.639C6.087 2.223 3.21 1.723.614.944c0 0-.168 0-.196.028l-.083.084c-.028.027-.056.055-.224.11h.056-.056c.028.167.028.278.084.473 0 .055.112.5.112.555l.782 3.556Zm15.496 3.278-.335-.334c.084.112.196.195.335.334Zm-3.546 4.666-.056.056c0-.028.028-.056.056-.056Zm-2.038-10c.168.167.866.834 1.033.973-.726-.334-2.54-1.167-3.379-1.445.838.167 1.983.334 2.346.472ZM1.424 2.306c.419.722.754 3.222 1.089 5.666-.196-.778-.335-1.555-.503-2.278-.251-1.277-.503-2.416-.838-3.416.056 0 .14 0 .252.028Zm-.168-.584c-.112 0-.223-.028-.307-.028 0-.027 0-.055-.028-.055.14 0 .223.028.335.083Zm-1.089.222c0-.027 0-.027 0 0ZM39.453 1.333c.028-.11-.558-.61-.363-.639.42-.027.42-.666 0-.666-.558.028-1.144.166-1.675.25-.977.194-1.982.389-2.96.61-2.205.473-4.383.973-6.561 1.557-.67.194-1.424.333-2.066.666-.224.111-.196.333-.084.472-.056.028-.084.028-.14.056-.195.028-.363.056-.558.083-.168.028-.252.167-.224.334 0 .027.028.083.028.11-1.173 1.556-2.485 3.195-3.909 4.945-1.396 1.611-2.876 3.306-4.356 5.056-4.719 5.5-10.052 11.75-15.943 17.25a.268.268 0 0 0 0 .389c.028.027.056.055.084.055-.084.084-.168.14-.252.222-.056.056-.084.111-.084.167a.605.605 0 0 0-.111.139c-.112.111-.112.305.028.389.111.11.307.11.39-.028.029-.028.029-.056.056-.056a.44.44 0 0 1 .615 0c.335.362.67.723.977 1.028l-.698-.583c-.112-.111-.307-.083-.39.028-.113.11-.085.305.027.389l7.427 6.194c.056.056.112.056.196.056s.14-.028.195-.084l.168-.166c.028.027.083.027.111.027.084 0 .14-.027.196-.083 10.052-10.055 18.15-17.639 27.42-24.417.083-.055.111-.166.111-.25.112 0 .196-.083.251-.194 1.704-5.194 2.039-9.806 2.15-12.083v-.028c0-.028.028-.056.028-.083.028-.056.028-.084.028-.084a1.626 1.626 0 0 0-.111-1.028ZM21.472 9.5c.446-.5.893-1.028 1.34-1.5-2.876 3.778-7.65 9.583-14.408 16.5 4.607-5.083 9.242-10.333 13.068-15ZM5.193 35.778h.084-.084Zm3.462 3.194c-.027-.028-.027-.028 0-.028v.028Zm4.16-3.583c.224-.25.448-.472.699-.722 0 0 0 .027.028.027-.252.223-.475.445-.726.695Zm1.146-1.111c.14-.14.279-.334.446-.5l.028-.028c1.648-1.694 3.351-3.389 5.082-5.111l.028-.028c.419-.333.921-.694 1.368-1.028a379.003 379.003 0 0 0-6.952 6.695ZM24.794 6.472c-.921 1.195-1.954 2.778-2.82 4.028-2.736 3.944-11.532 13.583-11.727 13.75a1976.983 1976.983 0 0 1-8.042 7.639l-.167.167c-.14-.167-.14-.417.028-.556C14.49 19.861 22.03 10.167 25.074 5.917c-.084.194-.14.36-.28.555Zm4.83 5.695c-1.116-.64-1.646-1.64-1.34-2.611l.084-.334c.028-.083.084-.194.14-.277.307-.5.754-.917 1.257-1.167.027 0 .055 0 .083-.028-.028-.056-.028-.139-.028-.222.028-.167.14-.278.335-.278.335 0 1.369.306 1.76.639.111.083.223.194.335.305.14.167.363.445.474.667.056.028.112.306.196.445.056.222.111.472.084.694-.028.028 0 .194-.028.194a2.668 2.668 0 0 1-.363 1.028c-.028.028-.028.056-.056.084l-.028.027c-.14.223-.335.417-.53.556-.643.444-1.369.583-2.095.389 0 0-.195-.084-.28-.111Zm8.154-.834a39.098 39.098 0 0 1-.893 3.167c0 .028-.028.083 0 .111-.056 0-.084.028-.14.056-2.206 1.61-4.356 3.305-6.506 5.028 1.843-1.64 3.686-3.306 5.613-4.945.558-.5.949-1.139 1.06-1.861l.28-1.667v-.055c.14-.334.67-.195.586.166Z",
fill:"currentColor"})}),{width:40,height:40,fill:"none"}),V((0,B.jsxs)("g",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,B.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,B.jsx)("path",{d:"M6 6l4.153 11.793a0.365 .365 0 0 0 .331 .207a0.366 .366 0 0 0 .332 -.207l2.184 -4.793l4.787 -1.994a0.355 .355 0 0 0 .213 -.323a0.355 .355 0 0 0 -.213 -.323l-11.787 -4.36z"}),(0,B.jsx)("path",{d:"M13.5 13.5l4.5 4.5"})]}),{fill:"none",width:22,height:22,strokeWidth:1.25})),
Z=V((0,B.jsxs)("g",{strokeWidth:"1.5",children:[(0,B.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,B.jsx)("rect",{x:"4",y:"4",width:"16",height:"16",rx:"2"})]}),H),aa=V((0,B.jsxs)("g",{strokeWidth:"1.5",children:[(0,B.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,B.jsx)("path",{d:"M10.5 20.4l-6.9 -6.9c-.781 -.781 -.781 -2.219 0 -3l6.9 -6.9c.781 -.781 2.219 -.781 3 0l6.9 6.9c.781 .781 .781 2.219 0 3l-6.9 6.9c-.781 .781 -2.219 .781 -3 0z"})]}),H),W=V((0,B.jsxs)("g",{strokeWidth:"1.5",
children:[(0,B.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,B.jsx)("circle",{cx:"12",cy:"12",r:"9"})]}),H),fa=V((0,B.jsxs)("g",{strokeWidth:"1.5",children:[(0,B.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,B.jsx)("line",{x1:"5",y1:"12",x2:"19",y2:"12"}),(0,B.jsx)("line",{x1:"15",y1:"16",x2:"19",y2:"12"}),(0,B.jsx)("line",{x1:"15",y1:"8",x2:"19",y2:"12"})]}),H),X=V((0,B.jsx)("path",{d:"M4.167 10h11.666",strokeWidth:"1.5"}),S),ea=V((0,B.jsxs)("g",{strokeWidth:"1.25",
children:[(0,B.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,B.jsx)("path",{d:"M20 17v-12c0 -1.121 -.879 -2 -2 -2s-2 .879 -2 2v12l2 2l2 -2z"}),(0,B.jsx)("path",{d:"M16 7h4"}),(0,B.jsx)("path",{d:"M18 19h-13a2 2 0 1 1 0 -4h4a2 2 0 1 0 0 -4h-3"})]}),H),pa=V((0,B.jsxs)("g",{strokeWidth:"1.25",children:[(0,B.jsx)("path",{clipRule:"evenodd",d:"m7.643 15.69 7.774-7.773a2.357 2.357 0 1 0-3.334-3.334L4.31 12.357a3.333 3.333 0 0 0-.977 2.357v1.953h1.953c.884 0 1.732-.352 2.357-.977Z"}),(0,B.jsx)("path",
{d:"m11.25 5.417 3.333 3.333"})]}),S),va=V((0,B.jsxs)("g",{strokeWidth:"1.5",children:[(0,B.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,B.jsx)("line",{x1:"4",y1:"20",x2:"7",y2:"20"}),(0,B.jsx)("line",{x1:"14",y1:"20",x2:"21",y2:"20"}),(0,B.jsx)("line",{x1:"6.9",y1:"15",x2:"13.8",y2:"15"}),(0,B.jsx)("line",{x1:"10.2",y1:"6.3",x2:"16",y2:"20"}),(0,B.jsx)("polyline",{points:"5 20 11 4 13 4 20 20"})]}),H),ta=V((0,B.jsxs)("g",{strokeWidth:"1.25",children:[(0,B.jsx)("path",{d:"M12.5 6.667h.01"}),
(0,B.jsx)("path",{d:"M4.91 2.625h10.18a2.284 2.284 0 0 1 2.285 2.284v10.182a2.284 2.284 0 0 1-2.284 2.284H4.909a2.284 2.284 0 0 1-2.284-2.284V4.909a2.284 2.284 0 0 1 2.284-2.284Z"}),(0,B.jsx)("path",{d:"m3.333 12.5 3.334-3.333c.773-.745 1.726-.745 2.5 0l4.166 4.166"}),(0,B.jsx)("path",{d:"m11.667 11.667.833-.834c.774-.744 1.726-.744 2.5 0l1.667 1.667"})]}),S),xa=V((0,B.jsxs)("g",{strokeWidth:"1.5",children:[(0,B.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,B.jsx)("path",{d:"M19 20h-10.5l-4.21 -4.3a1 1 0 0 1 0 -1.41l10 -10a1 1 0 0 1 1.41 0l5 5a1 1 0 0 1 0 1.41l-9.2 9.3"}),
(0,B.jsx)("path",{d:"M18 13.3l-6.3 -6.3"})]}),H),Ga=V((0,B.jsx)("path",{strokeWidth:"1.25",d:"M10 4.167v11.666M4.167 10h11.666"}),S),Ia=V((0,B.jsx)("path",{d:"M5 10h10",strokeWidth:"1.25"}),S),Ya=V((0,B.jsx)("path",{strokeWidth:"1.25",d:"M3.333 5.833h13.334M8.333 9.167v5M11.667 9.167v5M4.167 5.833l.833 10c0 .92.746 1.667 1.667 1.667h6.666c.92 0 1.667-.746 1.667-1.667l.833-10M7.5 5.833v-2.5c0-.46.373-.833.833-.833h3.334c.46 0 .833.373.833.833v2.5"}),S),Fa=V((0,B.jsxs)("g",{strokeWidth:"1.25",children:[(0,B.jsx)("polyline",
{points:"12 16 18 10 12 4"}),(0,B.jsx)("polyline",{points:"8 4 2 10 8 16"})]}),S),Ka=V((0,B.jsxs)("g",{strokeWidth:"1.25",children:[(0,B.jsx)("path",{d:"M14.375 6.458H8.958a2.5 2.5 0 0 0-2.5 2.5v5.417a2.5 2.5 0 0 0 2.5 2.5h5.417a2.5 2.5 0 0 0 2.5-2.5V8.958a2.5 2.5 0 0 0-2.5-2.5Z"}),(0,B.jsx)("path",{clipRule:"evenodd",d:"M11.667 3.125c.517 0 .986.21 1.325.55.34.338.55.807.55 1.325v1.458H8.333c-.485 0-.927.185-1.26.487-.343.312-.57.75-.609 1.24l-.005 5.357H5a1.87 1.87 0 0 1-1.326-.55 1.87 1.87 0 0 1-.549-1.325V5c0-.518.21-.987.55-1.326.338-.34.807-.549 1.325-.549h6.667Z"})]}),
S),Ba=V((0,B.jsx)("path",{clipRule:"evenodd",d:"M10 2.5h.328a6.25 6.25 0 0 0 6.6 10.372A7.5 7.5 0 1 1 10 2.493V2.5Z",stroke:"currentColor"}),S),la=V((0,B.jsx)("g",{stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",children:(0,B.jsx)("path",{d:"M10 12.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5ZM10 4.167V2.5M14.167 5.833l1.166-1.166M15.833 10H17.5M14.167 14.167l1.166 1.166M10 15.833V17.5M5.833 14.167l-1.166 1.166M5 10H3.333M5.833 5.833 4.667 4.667"})}),S),ka=V((0,B.jsxs)("g",
{strokeWidth:"1.5",children:[(0,B.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,B.jsx)("line",{x1:"4",y1:"6",x2:"20",y2:"6"}),(0,B.jsx)("line",{x1:"4",y1:"12",x2:"20",y2:"12"}),(0,B.jsx)("line",{x1:"4",y1:"18",x2:"20",y2:"18"})]}),H),ua=V((0,B.jsx)("path",{strokeWidth:"1.25",d:"M3.333 14.167v1.666c0 .92.747 1.667 1.667 1.667h10c.92 0 1.667-.746 1.667-1.667v-1.666M5.833 9.167 10 13.333l4.167-4.166M10 3.333v10"}),S),na=V((0,B.jsxs)("g",{strokeWidth:"1.5",children:[(0,B.jsx)("path",{stroke:"none",
d:"M0 0h24v24H0z",fill:"none"}),(0,B.jsx)("circle",{cx:"12",cy:"12",r:"9"}),(0,B.jsx)("line",{x1:"12",y1:"17",x2:"12",y2:"17.01"}),(0,B.jsx)("path",{d:"M12 13.5a1.5 1.5 0 0 1 1 -1.5a2.6 2.6 0 1 0 -3 -4"})]}),H),oa=V((0,B.jsx)("path",{strokeWidth:"1.25",d:"M9.167 5.833H5.833c-1.254 0-2.5 1.282-2.5 2.5v5.834c0 1.283 1.252 2.5 2.5 2.5h5.834c1.251 0 2.5-1.25 2.5-2.5v-3.334M8.333 11.667l8.334-8.334M12.5 3.333h4.167V7.5"}),S),La=V((0,B.jsx)("path",{d:"M7.5 15.833c-3.583 1.167-3.583-2.083-5-2.5m10 4.167v-2.917c0-.833.083-1.166-.417-1.666 2.334-.25 4.584-1.167 4.584-5a3.833 3.833 0 0 0-1.084-2.667 3.5 3.5 0 0 0-.083-2.667s-.917-.25-2.917 1.084a10.25 10.25 0 0 0-5.166 0C5.417 2.333 4.5 2.583 4.5 2.583a3.5 3.5 0 0 0-.083 2.667 3.833 3.833 0 0 0-1.084 2.667c0 3.833 2.25 4.75 4.584 5-.5.5-.5 1-.417 1.666V17.5",
strokeWidth:"1.25"}),S),Oa=V((0,B.jsxs)("g",{strokeWidth:"1.25",children:[(0,B.jsx)("path",{d:"M7.5 10.833a.833.833 0 1 0 0-1.666.833.833 0 0 0 0 1.666ZM12.5 10.833a.833.833 0 1 0 0-1.666.833.833 0 0 0 0 1.666ZM6.25 6.25c2.917-.833 4.583-.833 7.5 0M5.833 13.75c2.917.833 5.417.833 8.334 0"}),(0,B.jsx)("path",{d:"M12.917 14.167c0 .833 1.25 2.5 1.666 2.5 1.25 0 2.361-1.39 2.917-2.5.556-1.39.417-4.861-1.25-9.584-1.214-.846-2.5-1.116-3.75-1.25l-.833 2.084M7.083 14.167c0 .833-1.13 2.5-1.526 2.5-1.191 0-2.249-1.39-2.778-2.5-.529-1.39-.397-4.861 1.19-9.584 1.157-.846 2.318-1.116 3.531-1.25l.833 2.084"})]}),
S),Va=V((0,B.jsxs)("g",{strokeWidth:"1.25",children:[(0,B.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,B.jsx)("path",{d:"M22 4.01c-1 .49 -1.98 .689 -3 .99c-1.121 -1.265 -2.783 -1.335 -4.38 -.737s-2.643 2.06 -2.62 3.737v1c-3.245 .083 -6.135 -1.395 -8 -4c0 0 -4.182 7.433 4 11c-1.872 1.247 -3.739 2.088 -6 2c3.308 1.803 6.913 2.423 10.034 1.517c3.58 -1.04 6.522 -3.723 7.651 -7.742a13.84 13.84 0 0 0 .497 -3.753c-.002 -.249 1.51 -2.772 1.818 -4.013z"})]}),H),Ma=V((0,B.jsx)("polyline",{fill:"none",
stroke:"currentColor",points:"20 6 9 17 4 12"}),{width:24,height:24}),Ua=V((0,B.jsxs)("g",{strokeWidth:"1.25",children:[(0,B.jsx)("path",{d:"M8.333 11.667a2.917 2.917 0 0 0 4.167 0l3.333-3.334a2.946 2.946 0 1 0-4.166-4.166l-.417.416"}),(0,B.jsx)("path",{d:"M11.667 8.333a2.917 2.917 0 0 0-4.167 0l-3.333 3.334a2.946 2.946 0 0 0 4.166 4.166l.417-.416"})]}),S),ib=V("M433.941 129.941l-83.882-83.882A48 48 0 0 0 316.118 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h352c26.51 0 48-21.49 48-48V163.882a48 48 0 0 0-14.059-33.941zM224 416c-35.346 0-64-28.654-64-64 0-35.346 28.654-64 64-64s64 28.654 64 64c0 35.346-28.654 64-64 64zm96-304.52V212c0 6.627-5.373 12-12 12H76c-6.627 0-12-5.373-12-12V108c0-6.627 5.373-12 12-12h228.52c3.183 0 6.235 1.264 8.485 3.515l3.48 3.48A11.996 11.996 0 0 1 320 111.48z",
{width:448,height:512}),vb=V("M252 54L203 8a28 27 0 00-20-8H28C12 0 0 12 0 27v195c0 15 12 26 28 26h204c15 0 28-11 28-26V73a28 27 0 00-8-19zM130 213c-21 0-37-16-37-36 0-19 16-35 37-35 20 0 37 16 37 35 0 20-17 36-37 36zm56-169v56c0 4-4 6-7 6H44c-4 0-7-2-7-6V42c0-4 3-7 7-7h133l4 2 3 2a7 7 0 012 5z M296 201l87 95-188 205-78 9c-10 1-19-8-18-20l9-84zm141-14l-41-44a31 31 0 00-46 0l-38 41 87 95 38-42c13-14 13-36 0-50z",{width:448,height:512}),yb=V((0,B.jsx)("path",{d:"m9.257 6.351.183.183H15.819c.34 0 .727.182 1.051.506.323.323.505.708.505 1.05v5.819c0 .316-.183.7-.52 1.035-.337.338-.723.522-1.037.522H4.182c-.352 0-.74-.181-1.058-.5-.318-.318-.499-.705-.499-1.057V5.182c0-.351.181-.736.5-1.054.32-.321.71-.503 1.057-.503H6.53l2.726 2.726Z",
strokeWidth:"1.25"}),S),Wa=(V("M384 112v352c0 26.51-21.49 48-48 48H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h80c0-35.29 28.71-64 64-64s64 28.71 64 64h80c26.51 0 48 21.49 48 48zM192 40c-13.255 0-24 10.745-24 24s10.745 24 24 24 24-10.745 24-24-10.745-24-24-24m96 114v-20a6 6 0 0 0-6-6H102a6 6 0 0 0-6 6v20a6 6 0 0 0 6 6h180a6 6 0 0 0 6-6z",{width:384,height:512}),V("M204.3 5C104.9 24.4 24.8 104.3 5.2 203.4c-37 187 131.7 326.4 258.8 306.7 41.2-6.4 61.4-54.6 42.5-91.7-23.1-45.4 9.9-98.4 60.9-98.4h79.7c35.8 0 64.8-29.6 64.9-65.3C511.5 97.1 368.1-26.9 204.3 5zM96 320c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm32-128c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128-64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128 64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32z")),
hb=V((0,B.jsxs)("g",{strokeWidth:"1.25",children:[(0,B.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,B.jsx)("path",{d:"M15 8h.01"}),(0,B.jsx)("path",{d:"M12 20h-5a3 3 0 0 1 -3 -3v-10a3 3 0 0 1 3 -3h10a3 3 0 0 1 3 3v5"}),(0,B.jsx)("path",{d:"M4 15l4 -4c.928 -.893 2.072 -.893 3 0l4 4"}),(0,B.jsx)("path",{d:"M14 14l1 -1c.617 -.593 1.328 -.793 2.009 -.598"}),(0,B.jsx)("path",{d:"M19 16v6"}),(0,B.jsx)("path",{d:"M22 19l-3 3l-3 -3"})]}),H),ab=V("M216 0h80c13.3 0 24 10.7 24 24v168h87.7c17.8 0 26.7 21.5 14.1 34.1L269.7 378.3c-7.5 7.5-19.8 7.5-27.3 0L90.1 226.1c-12.6-12.6-3.7-34.1 14.1-34.1H192V24c0-13.3 10.7-24 24-24zm296 376v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h146.7l49 49c20.1 20.1 52.5 20.1 72.6 0l49-49H488c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z",
{width:512,height:512}),Qa=(V("M416 208H272V64c0-17.67-14.33-32-32-32h-32c-17.67 0-32 14.33-32 32v144H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h144v144c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32V304h144c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z",{width:448,height:512}),V("M416 208H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h384c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z",{width:448,height:512}),V("M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z")),
bb=(V("M16 132h416c8.837 0 16-7.163 16-16V76c0-8.837-7.163-16-16-16H16C7.163 60 0 67.163 0 76v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16z"),V((0,B.jsx)("path",{d:"M7.5 10.833 4.167 7.5 7.5 4.167M4.167 7.5h9.166a3.333 3.333 0 0 1 0 6.667H12.5",strokeWidth:"1.25"}),S)),Pa=V((0,B.jsx)("path",
{d:"M12.5 10.833 15.833 7.5 12.5 4.167M15.833 7.5H6.667a3.333 3.333 0 1 0 0 6.667H7.5",strokeWidth:"1.25"}),S),Lb=V("M504 256c0 136.997-111.043 248-248 248S8 392.997 8 256C8 119.083 119.043 8 256 8s248 111.083 248 248zM262.655 90c-54.497 0-89.255 22.957-116.549 63.758-3.536 5.286-2.353 12.415 2.715 16.258l34.699 26.31c5.205 3.947 12.621 3.008 16.665-2.122 17.864-22.658 30.113-35.797 57.303-35.797 20.429 0 45.698 13.148 45.698 32.958 0 14.976-12.363 22.667-32.534 33.976C247.128 238.528 216 254.941 216 296v4c0 6.627 5.373 12 12 12h56c6.627 0 12-5.373 12-12v-1.333c0-28.462 83.186-29.647 83.186-106.667 0-58.002-60.165-102-116.531-102zM256 338c-25.365 0-46 20.635-46 46 0 25.364 20.635 46 46 46s46-20.636 46-46c0-25.365-20.635-46-46-46z",
{mirror:!0}),xc=(V((0,B.jsx)("path",{d:"M5 12.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5ZM15 7.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5ZM15 17.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5ZM7.25 8.917l5.5-2.834M7.25 11.083l5.5 2.834",strokeWidth:"1.5"}),S),V("M16 5l-1.42 1.42-1.59-1.59V16h-1.98V4.83L9.42 6.42 8 5l4-4 4 4zm4 5v11c0 1.1-.9 2-2 2H6c-1.11 0-2-.9-2-2V10c0-1.11.89-2 2-2h3v2H6v11h12V10h-3V8h3c1.1 0 2 .89 2 2z",{width:24,height:24}),V((0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)("path",{fill:"currentColor",
d:"M40 5.6v6.1l-4.1.7c-8.9 1.4-16.5 6.9-20.6 15C13 32 10.9 43 12.4 43c.4 0 2.4-1.3 4.4-3 5-3.9 12.1-7 18.2-7.7l5-.6v12.8l11.2-11.3L62.5 22 51.2 10.8 40-.5v6.1zm10.2 22.6L44 34.5v-6.8l-6.9.6c-3.9.3-9.8 1.7-13.2 3.1-3.5 1.4-6.5 2.4-6.7 2.2-.9-1 3-7.5 6.4-10.8C28 18.6 34.4 16 40.1 16c3.7 0 3.9-.1 3.9-3.2V9.5l6.2 6.3 6.3 6.2-6.3 6.2z"}),(0,B.jsx)("path",{stroke:"currentColor",fill:"currentColor",d:"M0 36v20h48v-6.2c0-6 0-6.1-2-4.3-1.1 1-2 2.9-2 4.2V52H4V34c0-17.3-.1-18-2-18s-2 .7-2 20z"})]}),{width:64,
height:64}),V((0,B.jsx)("path",{stroke:"currentColor",strokeWidth:"40",fill:"currentColor",d:"M148 560a318 318 0 0 0 522 110 316 316 0 0 0 0-450 316 316 0 0 0-450 0c-11 11-21 22-30 34v4h47c25 0 46 21 46 46s-21 45-46 45H90c-13 0-25-6-33-14-9-9-14-20-14-33V156c0-25 20-45 45-45s45 20 45 45v32l1 1a401 401 0 0 1 623 509l212 212a42 42 0 0 1-59 59L698 757A401 401 0 0 1 65 570a42 42 0 0 1 83-10z"}),{width:1024}),V((0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",
strokeLinecap:"round",strokeLinejoin:"round",children:[(0,B.jsx)("path",{d:"M13.889 4.167H8.333c-.767 0-1.389.622-1.389 1.389v5.555c0 .767.622 1.389 1.39 1.389h5.555c.767 0 1.389-.622 1.389-1.389V5.556c0-.767-.622-1.39-1.39-1.39Z",fill:"currentColor"}),(0,B.jsx)("path",{d:"M12.5 12.5v1.389a1.389 1.389 0 0 1-1.389 1.389H5.556a1.389 1.389 0 0 1-1.39-1.39V8.334a1.389 1.389 0 0 1 1.39-1.389h1.388"})]}),(0,B.jsx)("defs",{children:(0,B.jsx)("clipPath",{id:"a",children:(0,B.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),
S)),oc=V((0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,B.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.944 12.5H12.5v1.389a1.389 1.389 0 0 1-1.389 1.389H5.556a1.389 1.389 0 0 1-1.39-1.39V8.334a1.389 1.389 0 0 1 1.39-1.389h1.388",fill:"currentColor"}),(0,B.jsx)("path",{d:"M13.889 4.167H8.333c-.767 0-1.389.621-1.389 1.389v5.555c0 .767.622 1.389 1.39 1.389h5.555c.767 0 1.389-.622 1.389-1.389V5.556c0-.768-.622-1.39-1.39-1.39Z"})]}),
(0,B.jsx)("defs",{children:(0,B.jsx)("clipPath",{id:"a",children:(0,B.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),S),pc=V((0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[(0,B.jsx)("path",{d:"M8.775 6.458h2.45a2.316 2.316 0 0 1 2.317 2.316v2.452a2.316 2.316 0 0 1-2.316 2.316H8.774a2.316 2.316 0 0 1-2.317-2.316V8.774a2.316 2.316 0 0 1 2.317-2.316Z",fill:"currentColor"}),(0,B.jsx)("path",{d:"M5.441 9.792h2.451a2.316 2.316 0 0 1 2.316 2.316v2.45a2.316 2.316 0 0 1-2.316 2.317h-2.45a2.316 2.316 0 0 1-2.317-2.316v-2.451a2.316 2.316 0 0 1 2.316-2.316ZM12.108 3.125h2.45a2.316 2.316 0 0 1 2.317 2.316v2.451a2.316 2.316 0 0 1-2.316 2.316h-2.451a2.316 2.316 0 0 1-2.316-2.316v-2.45a2.316 2.316 0 0 1 2.316-2.317Z"})]}),
(0,B.jsx)("defs",{children:(0,B.jsx)("clipPath",{id:"a",children:(0,B.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),S),Cc=V((0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)("g",{clipPath:"url(#a)",children:[(0,B.jsx)("path",{d:"M5.441 9.792h2.451a2.316 2.316 0 0 1 2.316 2.316v2.45a2.316 2.316 0 0 1-2.316 2.317h-2.45a2.316 2.316 0 0 1-2.317-2.316v-2.451a2.316 2.316 0 0 1 2.316-2.316Z",stroke:"currentColor",strokeWidth:"1.25"}),(0,B.jsx)("path",{d:"M5.441 9.792h2.451a2.316 2.316 0 0 1 2.316 2.316v2.45a2.316 2.316 0 0 1-2.316 2.317h-2.45a2.316 2.316 0 0 1-2.317-2.316v-2.451a2.316 2.316 0 0 1 2.316-2.316Z",
stroke:"currentColor",strokeWidth:"1.25"}),(0,B.jsx)("mask",{id:"SendToBackIcon",fill:"#fff",children:(0,B.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.167 5.833v2.06a2.941 2.941 0 0 0 2.94 2.94h2.06v.393a2.941 2.941 0 0 1-2.941 2.94h-.393v-2.058a2.941 2.941 0 0 0-2.94-2.941h-2.06v-.393a2.941 2.941 0 0 1 2.942-2.94h.392Z"})}),(0,B.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.167 5.833v2.06a2.941 2.941 0 0 0 2.94 2.94h2.06v.393a2.941 2.941 0 0 1-2.941 2.94h-.393v-2.058a2.941 2.941 0 0 0-2.94-2.941h-2.06v-.393a2.941 2.941 0 0 1 2.942-2.94h.392Z",
fill:"currentColor"}),(0,B.jsx)("path",{d:"M9.167 5.833h1.25v-1.25h-1.25v1.25Zm5 5h1.25v-1.25h-1.25v1.25Zm-3.334 3.334h-1.25v1.25h1.25v-1.25Zm-5-5h-1.25v1.25h1.25v-1.25Zm2.084-3.334v2.06h2.5v-2.06h-2.5Zm0 2.06a4.191 4.191 0 0 0 4.19 4.19v-2.5a1.691 1.691 0 0 1-1.69-1.69h-2.5Zm4.19 4.19h2.06v-2.5h-2.06v2.5Zm.81-1.25v.393h2.5v-.393h-2.5Zm0 .393c0 .933-.758 1.69-1.691 1.69v2.5a4.191 4.191 0 0 0 4.19-4.19h-2.5Zm-1.691 1.69h-.393v2.5h.393v-2.5Zm.857 1.25v-2.058h-2.5v2.059h2.5Zm0-2.058a4.191 4.191 0 0 0-4.19-4.191v2.5c.933 0 1.69.757 1.69 1.69h2.5Zm-4.19-4.191h-2.06v2.5h2.06v-2.5Zm-.81 1.25v-.393h-2.5v.393h2.5Zm0-.393c0-.934.758-1.69 1.692-1.69v-2.5a4.191 4.191 0 0 0-4.192 4.19h2.5Zm1.692-1.69h.392v-2.5h-.392v2.5Z",
fill:"currentColor",mask:"url(#SendToBackIcon)"}),(0,B.jsx)("path",{d:"M12.108 3.125h2.45a2.316 2.316 0 0 1 2.317 2.316v2.451a2.316 2.316 0 0 1-2.316 2.316h-2.451a2.316 2.316 0 0 1-2.316-2.316v-2.45a2.316 2.316 0 0 1 2.316-2.317Z",stroke:"currentColor",strokeWidth:"1.25"})]}),(0,B.jsx)("defs",{children:(0,B.jsx)("clipPath",{id:"a",children:(0,B.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),S),bd=V((0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",
children:[(0,B.jsx)("path",{d:"M3.333 3.333h13.334",strokeLinecap:"round",strokeLinejoin:"round"}),(0,B.jsx)("path",{d:"M13.542 6.458h-.417c-.92 0-1.667.747-1.667 1.667v7.083c0 .92.746 1.667 1.667 1.667h.417c.92 0 1.666-.746 1.666-1.667V8.125c0-.92-.746-1.667-1.666-1.667ZM6.875 6.458h-.417c-.92 0-1.666.747-1.666 1.667v3.75c0 .92.746 1.667 1.666 1.667h.417c.92 0 1.667-.746 1.667-1.667v-3.75c0-.92-.747-1.667-1.667-1.667Z"})]}),(0,B.jsx)("defs",{children:(0,B.jsx)("clipPath",{id:"a",children:(0,B.jsx)("path",
{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),S),dc=V((0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[(0,B.jsx)("path",{d:"M3.333 16.667h13.334",strokeLinecap:"round",strokeLinejoin:"round"}),(0,B.jsx)("path",{d:"M6.875 3.125h-.417c-.92 0-1.666.746-1.666 1.667v7.083c0 .92.746 1.667 1.666 1.667h.417c.92 0 1.667-.746 1.667-1.667V4.792c0-.92-.747-1.667-1.667-1.667ZM13.542 5.817h-.417c-.92 0-1.667.747-1.667 1.667v4.391c0 .92.746 1.667 1.667 1.667h.417c.92 0 1.666-.746 1.666-1.667V7.484c0-.92-.746-1.667-1.666-1.667Z"})]}),
(0,B.jsx)("defs",{children:(0,B.jsx)("clipPath",{id:"a",children:(0,B.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),S),Nc=V((0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[(0,B.jsx)("path",{d:"M3.333 3.333v13.334",strokeLinecap:"round",strokeLinejoin:"round"}),(0,B.jsx)("path",{d:"M15.208 4.792H8.125c-.92 0-1.667.746-1.667 1.666v.417c0 .92.747 1.667 1.667 1.667h7.083c.92 0 1.667-.747 1.667-1.667v-.417c0-.92-.746-1.666-1.667-1.666ZM12.516 11.458H8.125c-.92 0-1.667.746-1.667 1.667v.417c0 .92.747 1.666 1.667 1.666h4.391c.92 0 1.667-.746 1.667-1.666v-.417c0-.92-.746-1.667-1.667-1.667Z"})]}),
(0,B.jsx)("defs",{children:(0,B.jsx)("clipPath",{id:"a",children:(0,B.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),S),Qc=V((0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[(0,B.jsx)("path",{d:"M16.667 3.333v13.334",strokeLinecap:"round",strokeLinejoin:"round"}),(0,B.jsx)("path",{d:"M11.875 4.792H4.792c-.92 0-1.667.746-1.667 1.666v.417c0 .92.746 1.667 1.667 1.667h7.083c.92 0 1.667-.747 1.667-1.667v-.417c0-.92-.746-1.666-1.667-1.666ZM11.683 11.458H7.292c-.92 0-1.667.746-1.667 1.667v.417c0 .92.746 1.666 1.667 1.666h4.39c.921 0 1.667-.746 1.667-1.666v-.417c0-.92-.746-1.667-1.666-1.667Z"})]}),
(0,B.jsx)("defs",{children:(0,B.jsx)("clipPath",{id:"a",children:(0,B.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),S),Ad=V((0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[(0,B.jsx)("path",{d:"M16.667 3.333v13.334M3.333 3.333v13.334",strokeLinecap:"round",strokeLinejoin:"round"}),(0,B.jsx)("path",{d:"M14.375 10.208v-.416c0-.92-.746-1.667-1.667-1.667H7.292c-.92 0-1.667.746-1.667 1.667v.416c0 .92.746 1.667 1.667 1.667h5.416c.92 0 1.667-.746 1.667-1.667Z"})]}),
(0,B.jsx)("defs",{children:(0,B.jsx)("clipPath",{id:"a",children:(0,B.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),S),Xc=V((0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[(0,B.jsx)("path",{d:"M3.333 3.333h13.334M3.333 16.667h13.334",strokeLinecap:"round",strokeLinejoin:"round"}),(0,B.jsx)("path",{d:"M10.208 5.625h-.416c-.92 0-1.667.746-1.667 1.667v5.416c0 .92.746 1.667 1.667 1.667h.416c.92 0 1.667-.746 1.667-1.667V7.292c0-.92-.746-1.667-1.667-1.667Z"})]}),
(0,B.jsx)("defs",{children:(0,B.jsx)("clipPath",{id:"a",children:(0,B.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),S),sc=V((0,B.jsxs)("g",{stroke:"currentColor",strokeWidth:"1.25",children:[(0,B.jsx)("path",{d:"M1.667 10h2.916",strokeLinecap:"round",strokeLinejoin:"round"}),(0,B.jsx)("path",{d:"M8.333 10h3.334",strokeLinejoin:"round"}),(0,B.jsx)("path",{d:"M15.417 10h2.916",strokeLinecap:"round",strokeLinejoin:"round"}),(0,B.jsx)("path",{d:"M6.875 4.792h-.417c-.92 0-1.666.746-1.666 1.666v7.084c0 .92.746 1.666 1.666 1.666h.417c.92 0 1.667-.746 1.667-1.666V6.458c0-.92-.747-1.666-1.667-1.666ZM13.542 6.458h-.417c-.92 0-1.667.747-1.667 1.667v3.75c0 .92.746 1.667 1.667 1.667h.417c.92 0 1.666-.746 1.666-1.667v-3.75c0-.92-.746-1.667-1.666-1.667Z"})]}),
S),Sc=V((0,B.jsxs)("g",{stroke:"currentColor",strokeWidth:"1.25",children:[(0,B.jsx)("path",{d:"M10 18.333v-2.916",strokeLinecap:"round",strokeLinejoin:"round"}),(0,B.jsx)("path",{d:"M10 11.667V8.333",strokeLinejoin:"round"}),(0,B.jsx)("path",{d:"M10 4.583V1.667",strokeLinecap:"round",strokeLinejoin:"round"}),(0,B.jsx)("path",{d:"M4.792 13.125v.417c0 .92.746 1.666 1.666 1.666h7.084c.92 0 1.666-.746 1.666-1.666v-.417c0-.92-.746-1.667-1.666-1.667H6.458c-.92 0-1.666.746-1.666 1.667ZM6.458 6.458v.417c0 .92.747 1.667 1.667 1.667h3.75c.92 0 1.667-.747 1.667-1.667v-.417c0-.92-.746-1.666-1.667-1.666h-3.75c-.92 0-1.667.746-1.667 1.666Z"})]}),
S),Ib=V((0,B.jsxs)("g",{strokeWidth:"1.5",children:[(0,B.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,B.jsx)("circle",{cx:"9",cy:"7",r:"4"}),(0,B.jsx)("path",{d:"M3 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2"}),(0,B.jsx)("path",{d:"M16 3.13a4 4 0 0 1 0 7.75"}),(0,B.jsx)("path",{d:"M21 21v-2a4 4 0 0 0 -3 -3.85"})]}),H),lb=(V("M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm115.7 272l-176 101c-15.8 8.8-35.7-2.5-35.7-21V152c0-18.4 19.8-29.8 35.7-21l176 107c16.4 9.2 16.4 32.9 0 42z"),
V("M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm96 328c0 8.8-7.2 16-16 16H176c-8.8 0-16-7.2-16-16V176c0-8.8 7.2-16 16-16h160c8.8 0 16 7.2 16 16v160z"),V((0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",children:(0,B.jsx)("path",{d:"M15 5 5 15M5 5l10 10"})}),(0,B.jsx)("defs",{children:(0,B.jsx)("clipPath",{id:"a",children:(0,B.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),
S)),Db=V("M34.52 239.03L228.87 44.69c9.37-9.37 24.57-9.37 33.94 0l22.67 22.67c9.36 9.36 9.37 24.52.04 33.9L131.49 256l154.02 154.75c9.34 9.38 9.32 24.54-.04 33.9l-22.67 22.67c-9.37 9.37-24.57 9.37-33.94 0L34.52 272.97c-9.37-9.37-9.37-24.57 0-33.94z",{width:320,height:512,style:{marginLeft:"-0.2rem"},mirror:!0}),Gb=(V("M464 0c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48H176c-26.51 0-48-21.49-48-48V48c0-26.51 21.49-48 48-48h288M176 416c-44.112 0-80-35.888-80-80V128H48c-26.51 0-48 21.49-48 48v288c0 26.51 21.49 48 48 48h288c26.51 0 48-21.49 48-48v-48H176z",
{mirror:!0}),V("M11.553 22.894a.998.998 0 00.894 0s3.037-1.516 5.465-4.097C19.616 16.987 21 14.663 21 12V5a1 1 0 00-.649-.936l-8-3a.998.998 0 00-.702 0l-8 3A1 1 0 003 5v7c0 2.663 1.384 4.987 3.088 6.797 2.428 2.581 5.465 4.097 5.465 4.097zm-1.303-8.481l6.644-6.644a.856.856 0 111.212 1.212l-7.25 7.25a.856.856 0 01-1.212 0l-3.75-3.75a.856.856 0 111.212-1.212l3.144 3.144z",{width:24}),V("M369.9 97.9L286 14C277 5 264.8-.1 252.1-.1H48C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V131.9c0-12.7-5.1-25-14.1-34zM332.1 128H256V51.9l76.1 76.1zM48 464V48h160v104c0 13.3 10.7 24 24 24h104v288H48zm32-48h224V288l-23.5-23.5c-4.7-4.7-12.3-4.7-17 0L176 352l-39.5-39.5c-4.7-4.7-12.3-4.7-17 0L80 352v64zm48-240c-26.5 0-48 21.5-48 48s21.5 48 48 48 48-21.5 48-48-21.5-48-48-48z",
{width:384,height:512}),t().memo(function(pe){pe=pe.theme;return V((0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)("path",{d:"M25 26H111V111H25",fill:"var(--icon-fill-color)"}),(0,B.jsx)("path",{d:"M25 111C25 80.2068 25 49.4135 25 26M25 26C48.6174 26 72.2348 26 111 26H25ZM25 26C53.3671 26 81.7343 26 111 26H25ZM111 26C111 52.303 111 78.606 111 111V26ZM111 26C111 51.2947 111 76.5893 111 111V26ZM111 111C87.0792 111 63.1585 111 25 111H111ZM111 111C87.4646 111 63.9293 111 25 111H111ZM25 111C25 81.1514 25 51.3028 25 26V111Z",
stroke:"var(--icon-fill-color)",strokeWidth:"2"}),(0,B.jsx)("path",{d:"M100 100H160V160H100",fill:"var(--icon-fill-color)"}),(0,B.jsx)("path",{d:"M100 160C100 144.106 100 128.211 100 100M100 100C117.706 100 135.412 100 160 100H100ZM100 100C114.214 100 128.428 100 160 100H100ZM160 100C160 120.184 160 140.369 160 160V100ZM160 100C160 113.219 160 126.437 160 160V100ZM160 160C145.534 160 131.068 160 100 160H160ZM160 160C143.467 160 126.934 160 100 160H160ZM100 160C100 143.661 100 127.321 100 100V160Z",
stroke:"var(--icon-fill-color)",strokeWidth:"2"}),(0,B.jsxs)("g",{fill:pe===E.C6.LIGHT?r.white:"#1e1e1e",stroke:"var(--icon-fill-color)",strokeWidth:"6",children:[(0,B.jsx)("rect",{x:"2.5",y:"2.5",width:"30",height:"30"}),(0,B.jsx)("rect",{x:"2.5",y:"149.5",width:"30",height:"30"}),(0,B.jsx)("rect",{x:"147.5",y:"149.5",width:"30",height:"30"}),(0,B.jsx)("rect",{x:"147.5",y:"2.5",width:"30",height:"30"})]})]}),{width:182,height:182,mirror:!0})})),db=t().memo(function(pe){pe=pe.theme;return V((0,B.jsxs)(B.Fragment,
{children:[(0,B.jsx)("path",{d:"M25 26H111V111H25",fill:"var(--icon-fill-color)"}),(0,B.jsx)("path",{d:"M25 111C25 80.2068 25 49.4135 25 26M25 26C48.6174 26 72.2348 26 111 26H25ZM25 26C53.3671 26 81.7343 26 111 26H25ZM111 26C111 52.303 111 78.606 111 111V26ZM111 26C111 51.2947 111 76.5893 111 111V26ZM111 111C87.0792 111 63.1585 111 25 111H111ZM111 111C87.4646 111 63.9293 111 25 111H111ZM25 111C25 81.1514 25 51.3028 25 26V111Z",stroke:"var(--icon-fill-color)",strokeWidth:"2"}),(0,B.jsx)("path",{d:"M100 100H160V160H100",
fill:"var(--icon-fill-color)"}),(0,B.jsx)("path",{d:"M100 160C100 144.106 100 128.211 100 100M100 100C117.706 100 135.412 100 160 100H100ZM100 100C114.214 100 128.428 100 160 100H100ZM160 100C160 120.184 160 140.369 160 160V100ZM160 100C160 113.219 160 126.437 160 160V100ZM160 160C145.534 160 131.068 160 100 160H160ZM160 160C143.467 160 126.934 160 100 160H160ZM100 160C100 143.661 100 127.321 100 100V160Z",stroke:"var(--icon-fill-color)",strokeWidth:"2"}),(0,B.jsxs)("g",{fill:pe===E.C6.LIGHT?r.white:
"#1e1e1e",stroke:"var(--icon-fill-color)",strokeWidth:"6",children:[(0,B.jsx)("rect",{x:"2.5",y:"2.5",width:"30",height:"30"}),(0,B.jsx)("rect",{x:"78.5",y:"149.5",width:"30",height:"30"}),(0,B.jsx)("rect",{x:"147.5",y:"149.5",width:"30",height:"30"}),(0,B.jsx)("rect",{x:"147.5",y:"78.5",width:"30",height:"30"}),(0,B.jsx)("rect",{x:"105.5",y:"2.5",width:"30",height:"30"}),(0,B.jsx)("rect",{x:"2.5",y:"102.5",width:"30",height:"30"})]})]}),{width:182,height:182,mirror:!0})}),rb=V((0,B.jsx)("g",{strokeWidth:1.25,
children:(0,B.jsx)("path",{d:"M5.879 2.625h8.242a3.27 3.27 0 0 1 3.254 3.254v8.242a3.27 3.27 0 0 1-3.254 3.254H5.88a3.27 3.27 0 0 1-3.254-3.254V5.88A3.27 3.27 0 0 1 5.88 2.626l-.001-.001ZM4.518 16.118l7.608-12.83m.198 13.934 5.051-9.897M2.778 9.675l9.348-6.387m-7.608 12.83 12.857-8.793"})}),S),Nb=V((0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)("path",{d:"M5.879 2.625h8.242a3.254 3.254 0 0 1 3.254 3.254v8.242a3.254 3.254 0 0 1-3.254 3.254H5.88a3.254 3.254 0 0 1-3.254-3.254V5.88a3.254 3.254 0 0 1 3.254-3.254Z",
stroke:"currentColor",strokeWidth:"1.25"}),(0,B.jsx)("mask",{id:"FillHachureIcon",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:2,y:2,width:16,height:16,children:(0,B.jsx)("path",{d:"M5.879 2.625h8.242a3.254 3.254 0 0 1 3.254 3.254v8.242a3.254 3.254 0 0 1-3.254 3.254H5.88a3.254 3.254 0 0 1-3.254-3.254V5.88a3.254 3.254 0 0 1 3.254-3.254Z",fill:"currentColor",stroke:"currentColor",strokeWidth:"1.25"})}),(0,B.jsx)("g",{mask:"url(#FillHachureIcon)",children:(0,B.jsx)("path",{d:"M2.258 15.156 15.156 2.258M7.324 20.222 20.222 7.325m-20.444 5.35L12.675-.222m-8.157 18.34L17.416 5.22",
stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})})]}),S),fc=V((0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)("g",{clipPath:"url(#a)",children:[(0,B.jsx)("path",{d:"M5.879 2.625h8.242a3.254 3.254 0 0 1 3.254 3.254v8.242a3.254 3.254 0 0 1-3.254 3.254H5.88a3.254 3.254 0 0 1-3.254-3.254V5.88a3.254 3.254 0 0 1 3.254-3.254Z",stroke:"currentColor",strokeWidth:"1.25"}),(0,B.jsx)("mask",{id:"FillCrossHatchIcon",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:-1,y:-1,
width:22,height:22,children:(0,B.jsx)("path",{d:"M2.426 15.044 15.044 2.426M7.383 20 20 7.383M0 12.617 12.617 0m-7.98 17.941L17.256 5.324m-2.211 12.25L2.426 4.956M20 12.617 7.383 0m5.234 20L0 7.383m17.941 7.98L5.324 2.745",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),(0,B.jsx)("g",{mask:"url(#FillCrossHatchIcon)",children:(0,B.jsx)("path",{d:"M14.121 2H5.88A3.879 3.879 0 0 0 2 5.879v8.242A3.879 3.879 0 0 0 5.879 18h8.242A3.879 3.879 0 0 0 18 14.121V5.88A3.879 3.879 0 0 0 14.121 2Z",
fill:"currentColor"})})]}),(0,B.jsx)("defs",{children:(0,B.jsx)("clipPath",{id:"a",children:(0,B.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),S),Bc=V((0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)("g",{clipPath:"url(#a)",children:(0,B.jsx)("path",{d:"M4.91 2.625h10.18a2.284 2.284 0 0 1 2.285 2.284v10.182a2.284 2.284 0 0 1-2.284 2.284H4.909a2.284 2.284 0 0 1-2.284-2.284V4.909a2.284 2.284 0 0 1 2.284-2.284Z",stroke:"currentColor",strokeWidth:"1.25"})}),(0,B.jsx)("defs",{children:(0,B.jsx)("clipPath",
{id:"a",children:(0,B.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),m(m({},S),{},{fill:"currentColor"})),Jc=V((0,B.jsx)(B.Fragment,{children:(0,B.jsx)("path",{d:"M4.167 10h11.666",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),S),ic=V((0,B.jsx)("path",{d:"M5 10h10",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round"}),S),Oc=V((0,B.jsx)("path",{d:"M5 10h10",stroke:"currentColor",strokeWidth:"3.75",strokeLinecap:"round",
strokeLinejoin:"round"}),S),Rc=V((0,B.jsxs)("g",{strokeWidth:"2",children:[(0,B.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,B.jsx)("path",{d:"M5 12h2"}),(0,B.jsx)("path",{d:"M17 12h2"}),(0,B.jsx)("path",{d:"M11 12h2"})]}),H),fd=V((0,B.jsxs)("g",{strokeWidth:"2",children:[(0,B.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,B.jsx)("path",{d:"M4 12v.01"}),(0,B.jsx)("path",{d:"M8 12v.01"}),(0,B.jsx)("path",{d:"M12 12v.01"}),(0,B.jsx)("path",{d:"M16 12v.01"}),(0,B.jsx)("path",
{d:"M20 12v.01"})]}),H),pd=V((0,B.jsx)("path",{d:"M2.5 12.038c1.655-.885 5.9-3.292 8.568-4.354 2.668-1.063.101 2.821 1.32 3.104 1.218.283 5.112-1.814 5.112-1.814",strokeWidth:"1.25"}),S),Ic=V((0,B.jsx)("path",{d:"M2.5 12.563c1.655-.886 5.9-3.293 8.568-4.355 2.668-1.062.101 2.822 1.32 3.105 1.218.283 5.112-1.814 5.112-1.814m-13.469 2.23c2.963-1.586 6.13-5.62 7.468-4.998 1.338.623-1.153 4.11-.132 5.595 1.02 1.487 6.133-1.43 6.133-1.43",strokeWidth:"1.25"}),S),wc=V((0,B.jsx)("path",{d:"M2.5 11.936c1.737-.879 8.627-5.346 10.42-5.268 1.795.078-.418 5.138.345 5.736.763.598 3.53-1.789 4.235-2.147M2.929 9.788c1.164-.519 5.47-3.28 6.987-3.114 1.519.165 1 3.827 2.121 4.109 1.122.281 3.839-2.016 4.606-2.42",
strokeWidth:"1.25"}),S),je=V((0,B.jsxs)("svg",{strokeWidth:"1.5",children:[(0,B.jsx)("path",{d:"M3.33334 9.99998V6.66665C3.33334 6.04326 3.33403 4.9332 3.33539 3.33646C4.95233 3.33436 6.06276 3.33331 6.66668 3.33331H10"}),(0,B.jsx)("path",{d:"M13.3333 3.33331V3.34331"}),(0,B.jsx)("path",{d:"M16.6667 3.33331V3.34331"}),(0,B.jsx)("path",{d:"M16.6667 6.66669V6.67669"}),(0,B.jsx)("path",{d:"M16.6667 10V10.01"}),(0,B.jsx)("path",{d:"M3.33334 13.3333V13.3433"}),(0,B.jsx)("path",{d:"M16.6667 13.3333V13.3433"}),
(0,B.jsx)("path",{d:"M3.33334 16.6667V16.6767"}),(0,B.jsx)("path",{d:"M6.66666 16.6667V16.6767"}),(0,B.jsx)("path",{d:"M10 16.6667V16.6767"}),(0,B.jsx)("path",{d:"M13.3333 16.6667V16.6767"}),(0,B.jsx)("path",{d:"M16.6667 16.6667V16.6767"})]}),S),pf=V((0,B.jsxs)("g",{strokeWidth:"1.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,B.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,B.jsx)("path",{d:"M4 12v-4a4 4 0 0 1 4 -4h4"}),(0,B.jsx)("line",{x1:"16",
y1:"4",x2:"16",y2:"4.01"}),(0,B.jsx)("line",{x1:"20",y1:"4",x2:"20",y2:"4.01"}),(0,B.jsx)("line",{x1:"20",y1:"8",x2:"20",y2:"8.01"}),(0,B.jsx)("line",{x1:"20",y1:"12",x2:"20",y2:"12.01"}),(0,B.jsx)("line",{x1:"4",y1:"16",x2:"4",y2:"16.01"}),(0,B.jsx)("line",{x1:"20",y1:"16",x2:"20",y2:"16.01"}),(0,B.jsx)("line",{x1:"4",y1:"20",x2:"4",y2:"20.01"}),(0,B.jsx)("line",{x1:"8",y1:"20",x2:"8",y2:"20.01"}),(0,B.jsx)("line",{x1:"12",y1:"20",x2:"12",y2:"20.01"}),(0,B.jsx)("line",{x1:"16",y1:"20",x2:"16",y2:"20.01"}),
(0,B.jsx)("line",{x1:"20",y1:"20",x2:"20",y2:"20.01"})]}),H),qe=V((0,B.jsx)("path",{d:"M6 10H34",stroke:"currentColor",strokeWidth:2,fill:"none"}),{width:40,height:20}),ue=t().memo(function(pe){pe=pe.flip;return V((0,B.jsxs)("g",{transform:void 0!==pe&&pe?"translate(40, 0) scale(-1, 1)":"",stroke:"currentColor",strokeWidth:2,fill:"none",children:[(0,B.jsx)("path",{d:"M34 10H6M34 10L27 5M34 10L27 15"}),(0,B.jsx)("path",{d:"M27.5 5L34.5 10L27.5 15"})]}),{width:40,height:20})}),kd=t().memo(function(pe){pe=
pe.flip;return V((0,B.jsxs)("g",{stroke:"currentColor",fill:"currentColor",transform:void 0!==pe&&pe?"translate(40, 0) scale(-1, 1)":"",children:[(0,B.jsx)("path",{d:"M32 10L6 10",strokeWidth:2}),(0,B.jsx)("circle",{r:"4",transform:"matrix(-1 0 0 1 30 10)"})]}),{width:40,height:20})}),Ae=t().memo(function(pe){pe=pe.flip;return V((0,B.jsx)("g",{transform:void 0!==pe&&pe?"translate(40, 0) scale(-1, 1)":"",children:(0,B.jsx)("path",{d:"M34 10H5.99996M34 10L34 5M34 10L34 15",stroke:"currentColor",strokeWidth:2,
fill:"none"})}),{width:40,height:20})}),Bf=t().memo(function(pe){pe=pe.flip;return V((0,B.jsxs)("g",{stroke:"currentColor",fill:"currentColor",transform:void 0!==pe&&pe?"translate(40, 0) scale(-1, 1)":"",children:[(0,B.jsx)("path",{d:"M32 10L6 10",strokeWidth:2}),(0,B.jsx)("path",{d:"M27.5 5.5L34.5 10L27.5 14.5L27.5 5.5"})]}),{width:40,height:20})}),gg=V((0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)("g",{clipPath:"url(#a)",children:(0,B.jsx)("path",{d:"M14.167 6.667a3.333 3.333 0 0 0-3.334-3.334H9.167a3.333 3.333 0 0 0 0 6.667h1.666a3.333 3.333 0 0 1 0 6.667H9.167a3.333 3.333 0 0 1-3.334-3.334",
stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),(0,B.jsx)("defs",{children:(0,B.jsx)("clipPath",{id:"a",children:(0,B.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),S),jc=V((0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)("g",{clipPath:"url(#a)",children:(0,B.jsx)("path",{d:"M5 16.667V3.333L10 15l5-11.667v13.334",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),(0,B.jsx)("defs",{children:(0,B.jsx)("clipPath",{id:"a",
children:(0,B.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),S),Zc=V((0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)("g",{clipPath:"url(#a)",children:(0,B.jsx)("path",{d:"M5.833 3.333v13.334h8.334",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),(0,B.jsx)("defs",{children:(0,B.jsx)("clipPath",{id:"a",children:(0,B.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),S),Gc=V((0,B.jsx)(B.Fragment,{children:(0,B.jsx)("path",{d:"m1.667 3.333 6.666 13.334M8.333 3.333 1.667 16.667M11.667 3.333v13.334h6.666",
stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),S),ub=V((0,B.jsx)(B.Fragment,{children:(0,B.jsx)("g",{stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",children:(0,B.jsx)("path",{d:"M5.833 16.667v-10a3.333 3.333 0 0 1 3.334-3.334h1.666a3.333 3.333 0 0 1 3.334 3.334v10M5.833 10.833h8.334"})})}),S),Bb=V((0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",
strokeLinejoin:"round",children:(0,B.jsx)("path",{d:"M5.833 6.667 2.5 10l3.333 3.333M14.167 6.667 17.5 10l-3.333 3.333M11.667 3.333 8.333 16.667"})}),(0,B.jsx)("defs",{children:(0,B.jsx)("clipPath",{id:"a",children:(0,B.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),S),Eb=V((0,B.jsxs)("g",{stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,children:[(0,B.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,B.jsx)("line",{x1:"4",y1:"8",x2:"20",
y2:"8"}),(0,B.jsx)("line",{x1:"4",y1:"12",x2:"12",y2:"12"}),(0,B.jsx)("line",{x1:"4",y1:"16",x2:"16",y2:"16"})]}),H),hd=V((0,B.jsxs)("g",{stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,B.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,B.jsx)("line",{x1:"4",y1:"8",x2:"20",y2:"8"}),(0,B.jsx)("line",{x1:"8",y1:"12",x2:"16",y2:"12"}),(0,B.jsx)("line",{x1:"6",y1:"16",x2:"18",y2:"16"})]}),H),Ud=V((0,B.jsxs)("g",{stroke:"currentColor",fill:"none",
strokeLinecap:"round",strokeLinejoin:"round",children:[(0,B.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,B.jsx)("line",{x1:"4",y1:"8",x2:"20",y2:"8"}),(0,B.jsx)("line",{x1:"10",y1:"12",x2:"20",y2:"12"}),(0,B.jsx)("line",{x1:"8",y1:"16",x2:"20",y2:"16"})]}),H),Td=t().memo(function(pe){pe.theme;return V((0,B.jsxs)("g",{strokeWidth:"1.5",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,B.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),
(0,B.jsx)("line",{x1:"4",y1:"4",x2:"20",y2:"4"}),(0,B.jsx)("rect",{x:"9",y:"8",width:"6",height:"12",rx:"2"})]}),H)}),Ue=t().memo(function(pe){pe.theme;return V((0,B.jsxs)("g",{strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,B.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,B.jsx)("line",{x1:"4",y1:"20",x2:"20",y2:"20"}),(0,B.jsx)("rect",{x:"9",y:"4",width:"6",height:"12",rx:"2"})]}),H)}),kb=t().memo(function(pe){pe.theme;return V((0,B.jsxs)("g",
{strokeWidth:"1.5",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,B.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,B.jsx)("line",{x1:"4",y1:"12",x2:"9",y2:"12"}),(0,B.jsx)("line",{x1:"15",y1:"12",x2:"20",y2:"12"}),(0,B.jsx)("rect",{x:"9",y:"6",width:"6",height:"12",rx:"2"})]}),H)}),tb=V((0,B.jsx)("path",{d:"M537.6 226.6c4.1-10.7 6.4-22.4 6.4-34.6 0-53-43-96-96-96-19.7 0-38.1 6-53.3 16.2C367 64.2 315.3 32 256 32c-88.4 0-160 71.6-160 160 0 2.7.1 5.4.2 8.1C40.2 219.8 0 273.2 0 336c0 79.5 64.5 144 144 144h368c70.7 0 128-57.3 128-128 0-61.9-44-113.6-102.4-125.4zM393.4 288H328v112c0 8.8-7.2 16-16 16h-48c-8.8 0-16-7.2-16-16V288h-65.4c-14.3 0-21.4-17.2-11.3-27.3l105.4-105.4c6.2-6.2 16.4-6.2 22.6 0l105.4 105.4c10.1 10.1 2.9 27.3-11.3 27.3z",
fill:"currentColor"}),{width:640,height:512}),ob=(V((0,B.jsx)("path",{d:"M480 416C497.7 416 512 430.3 512 448C512 465.7 497.7 480 480 480H150.6C133.7 480 117.4 473.3 105.4 461.3L25.37 381.3C.3786 356.3 .3786 315.7 25.37 290.7L258.7 57.37C283.7 32.38 324.3 32.38 349.3 57.37L486.6 194.7C511.6 219.7 511.6 260.3 486.6 285.3L355.9 416H480zM265.4 416L332.7 348.7L195.3 211.3L70.63 336L150.6 416L265.4 416z"})),V((0,B.jsxs)("g",{strokeWidth:1.25,children:[(0,B.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",
fill:"none"}),(0,B.jsx)("path",{d:"M8 13v-7.5a1.5 1.5 0 0 1 3 0v6.5"}),(0,B.jsx)("path",{d:"M11 5.5v-2a1.5 1.5 0 1 1 3 0v8.5"}),(0,B.jsx)("path",{d:"M14 5.5a1.5 1.5 0 0 1 3 0v6.5"}),(0,B.jsx)("path",{d:"M17 7.5a1.5 1.5 0 0 1 3 0v8.5a6 6 0 0 1 -6 6h-2h.208a6 6 0 0 1 -5.012 -2.7a69.74 69.74 0 0 1 -.196 -.3c-.312 -.479 -1.407 -2.388 -3.286 -5.728a1.5 1.5 0 0 1 .536 -2.022a1.867 1.867 0 0 1 2.28 .28l1.47 1.47"})]}),H)),Ub=V((0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",
fill:"none"}),(0,B.jsx)("path",{d:"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2"}),(0,B.jsx)("path",{d:"M7 11l5 5l5 -5"}),(0,B.jsx)("path",{d:"M12 4l0 12"})]}),H),Tb=V((0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,B.jsx)("path",{d:"M8 8m0 2a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v8a2 2 0 0 1 -2 2h-8a2 2 0 0 1 -2 -2z"}),(0,B.jsx)("path",{d:"M16 8v-2a2 2 0 0 0 -2 -2h-8a2 2 0 0 0 -2 2v8a2 2 0 0 0 2 2h2"})]}),H),rd=V((0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)("path",
{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,B.jsx)("path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"}),(0,B.jsx)("path",{d:"M12 17l0 .01"}),(0,B.jsx)("path",{d:"M12 13.5a1.5 1.5 0 0 1 1 -1.5a2.6 2.6 0 1 0 -3 -4"})]}),H),td=(V((0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,B.jsx)("path",{d:"M7 4v16l13 -8z"})]}),H),V((0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,B.jsx)("path",{d:"M17 4h-10a3 3 0 0 0 -3 3v10a3 3 0 0 0 3 3h10a3 3 0 0 0 3 -3v-10a3 3 0 0 0 -3 -3z",
strokeWidth:"0",fill:"currentColor"})]}),H),V((0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,B.jsx)("path",{d:"M5 12l5 5l10 -10"})]}),H),V((0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,B.jsx)("path",{d:"M10.24 3.957l-8.422 14.06a1.989 1.989 0 0 0 1.7 2.983h16.845a1.989 1.989 0 0 0 1.7 -2.983l-8.423 -14.06a1.989 1.989 0 0 0 -3.4 0z"}),(0,B.jsx)("path",{d:"M12 9v4"}),(0,B.jsx)("path",{d:"M12 17h.01"})]}),
H)),Hd=V((0,B.jsxs)("g",{strokeWidth:1.25,children:[(0,B.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,B.jsx)("path",{d:"M11 7l6 6"}),(0,B.jsx)("path",{d:"M4 16l11.7 -11.7a1 1 0 0 1 1.4 0l2.6 2.6a1 1 0 0 1 0 1.4l-11.7 11.7h-4v-4z"})]}),H),te=V((0,B.jsxs)("g",{strokeWidth:1.5,children:[(0,B.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,B.jsx)("path",{d:"M12 3l-4 7h8z"}),(0,B.jsx)("path",{d:"M17 17m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0"}),(0,B.jsx)("path",{d:"M4 14m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z"})]}),
H),ve=V((0,B.jsxs)("g",{strokeWidth:1.5,children:[(0,B.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,B.jsx)("path",{d:"M4 7l16 0"}),(0,B.jsx)("path",{d:"M4 17l16 0"}),(0,B.jsx)("path",{d:"M7 4l0 16"}),(0,B.jsx)("path",{d:"M17 4l0 16"})]}),H)},3013:function(g,h,b){b.d(h,{Z:function(){return Ka}});g={};b.r(g);b.d(g,{ChangeCanvasBackground:function(){return va},ClearCanvas:function(){return ea},Export:function(){return ta},Help:function(){return X},LiveCollaborationTrigger:function(){return Ga},
LoadScene:function(){return aa},SaveAsImage:function(){return fa},SaveToActiveFile:function(){return W},Socials:function(){return xa},ToggleTheme:function(){return pa}});var l=b(3470),m=b(8103),p=b(8950);h=b(2975);var D=b.n(h),v=b(6445),t=b(8557),r=b(1119),f=b(6986),E=b(9996),B=b(7903);h=b(3379);h=b.n(h);var J=b(7795);J=b.n(J);var V=b(569);V=b.n(V);var H=b(3565);H=b.n(H);var S=b(9216);S=b.n(S);var L=b(4589);L=b.n(L);var T=b(4343),R={};R.styleTagTransform=L();R.setAttributes=H();R.insert=V().bind(null,
"head");R.domAPI=J();R.insertStyleElement=S();h()(T.Z,R);T.Z&&T.Z.locals&&T.Z.locals;var G=b(45),F=b(3607),O=b(5767),M=b(593),I=b(5990),ia=b(7233),U=b(1601),Z=b(4512),aa=function(){var Ba=(0,t.QT)().t,la=(0,l.eh)(),ka=(0,l.bd)();if(!la.isActionEnabled(B._d))return null;var ua=function(){var na=(0,p.Z)(D().mark(function La(){return D().wrap(function(Oa){for(;;)switch(Oa.prev=Oa.next){case 0:if(Oa.t0=!ka.length,Oa.t0){Oa.next=5;break}return Oa.next=4,(0,ia._)({title:Ba("overwriteConfirm.modal.loadFromFile.title"),
actionLabel:Ba("overwriteConfirm.modal.loadFromFile.button"),color:"warning",description:(0,Z.jsx)(U.Z,{i18nKey:"overwriteConfirm.modal.loadFromFile.description",bold:function(Va){return(0,Z.jsx)("strong",{children:Va})},br:function(){return(0,Z.jsx)("br",{})}})});case 4:Oa.t0=Oa.sent;case 5:if(!Oa.t0){Oa.next=7;break}la.executeAction(B._d);case 7:case "end":return Oa.stop()}},La)}));return function(){return na.apply(this,arguments)}}();return(0,Z.jsx)(f.Z,{icon:r.Tl,onSelect:ua,"data-testid":"load-button",
shortcut:(0,v.C)("loadScene"),"aria-label":Ba("buttons.load"),children:Ba("buttons.load")})};aa.displayName="LoadScene";var W=function(){var Ba=(0,t.QT)().t,la=(0,l.eh)();return la.isActionEnabled(B.ns)?(0,Z.jsx)(f.Z,{shortcut:(0,v.C)("saveScene"),"data-testid":"save-button",onSelect:function(){return la.executeAction(B.ns)},icon:r.a1,"aria-label":"".concat(Ba("buttons.save")),children:"".concat(Ba("buttons.save"))}):null};W.displayName="SaveToActiveFile";var fa=function(){var Ba=(0,l.n9)(),la=(0,t.QT)().t;
return(0,Z.jsx)(f.Z,{icon:r.J8,"data-testid":"image-export-button",onSelect:function(){return Ba({openDialog:"imageExport"})},shortcut:(0,v.C)("imageExport"),"aria-label":la("buttons.exportImage"),children:la("buttons.exportImage")})};fa.displayName="SaveAsImage";var X=function(){var Ba=(0,t.QT)().t,la=(0,l.eh)();return(0,Z.jsx)(f.Z,{"data-testid":"help-menu-item",icon:r.by,onSelect:function(){return la.executeAction(B.jY)},shortcut:"?","aria-label":Ba("helpDialog.title"),children:Ba("helpDialog.title")})};
X.displayName="Help";var ea=function(){var Ba=(0,t.QT)().t,la=(0,F.b9)(O.w,M.yE);return(0,l.eh)().isActionEnabled(B.mo)?(0,Z.jsx)(f.Z,{icon:r.XH,onSelect:function(){return la("clearCanvas")},"data-testid":"clear-canvas-button","aria-label":Ba("buttons.clearReset"),children:Ba("buttons.clearReset")}):null};ea.displayName="ClearCanvas";var pa=function(){var Ba=(0,t.QT)().t,la=(0,I.I)(),ka=(0,l.eh)();return ka.isActionEnabled(B.Zp)?(0,Z.jsx)(f.Z,{onSelect:function(ua){return ua.preventDefault(),ka.executeAction(B.Zp)},
icon:"dark"===la.theme?r.NW:r.kL,"data-testid":"toggle-dark-mode",shortcut:(0,v.C)("toggleTheme"),"aria-label":"dark"===la.theme?Ba("buttons.lightMode"):Ba("buttons.darkMode"),children:"dark"===la.theme?Ba("buttons.lightMode"):Ba("buttons.darkMode")}):null};pa.displayName="ToggleTheme";var va=function(){var Ba=(0,t.QT)().t,la=(0,I.I)(),ka=(0,l.eh)(),ua=(0,l.hY)();return la.viewModeEnabled||!ua.UIOptions.canvasActions.changeViewBackgroundColor?null:(0,Z.jsxs)("div",{style:{marginTop:"0.5rem"},children:[(0,Z.jsx)("div",
{"data-testid":"canvas-background-label",style:{fontSize:".75rem",marginBottom:".5rem"},children:Ba("labels.canvasBackground")}),(0,Z.jsx)("div",{style:{padding:"0 0.625rem"},children:ka.renderAction("changeViewBackgroundColor")})]})};va.displayName="ChangeCanvasBackground";var ta=function(){var Ba=(0,t.QT)().t,la=(0,l.n9)();return(0,Z.jsx)(f.Z,{icon:r.Hy,onSelect:function(){la({openDialog:"jsonExport"})},"data-testid":"json-export-button","aria-label":Ba("buttons.export"),children:Ba("buttons.export")})};
ta.displayName="Export";var xa=function(){return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(E.Z,{icon:r.ET,href:"https://github.com/excalidraw/excalidraw","aria-label":"GitHub",children:"GitHub"}),(0,Z.jsx)(E.Z,{icon:r.D7,href:"https://discord.gg/UexuTaE","aria-label":"Discord",children:"Discord"}),(0,Z.jsx)(E.Z,{icon:r.Zm,href:"https://twitter.com/excalidraw","aria-label":"Twitter",children:"Twitter"})]})};xa.displayName="Socials";var Ga=function(Ba){var la=Ba.onSelect;Ba=Ba.isCollaborating;var ka=
(0,t.QT)().t;return(0,Z.jsx)(f.Z,{"data-testid":"collab-button",icon:r.jn,className:(0,G.Z)({"active-collab":Ba}),onSelect:la,children:ka("labels.liveCollaboration")})};Ga.displayName="LiveCollaborationTrigger";var Ia=b(9714);h=b(3375);var Ya=b(7135),Fa=b(5371),Ka=Object.assign((0,h.$)("MainMenu",function(Ba){var la=Ba.children;Ba=Ba.onSelect;var ka=(0,Fa.R6)().MainMenuTunnel,ua=(0,l.Fy)(),na=(0,I.I)(),oa=(0,l.n9)(),La=ua.isMobile?void 0:function(){return oa({openMenu:null})};return(0,Z.jsx)(ka.In,
{children:(0,Z.jsxs)(m.Z,{open:"canvas"===na.openMenu,children:[(0,Z.jsx)(m.Z.Trigger,{onToggle:function(){oa({openMenu:"canvas"===na.openMenu?null:"canvas"})},"data-testid":"main-menu-trigger",children:r.RY}),(0,Z.jsxs)(m.Z.Content,{onClickOutside:La,onSelect:(0,Ya.Mj)(Ba,function(){oa({openMenu:null})}),children:[la,ua.isMobile&&0<na.collaborators.size&&(0,Z.jsxs)("fieldset",{className:"UserList-Wrapper",children:[(0,Z.jsx)("legend",{children:(0,t.t)("labels.collaborators")}),(0,Z.jsx)(Ia.Z,{mobile:!0,
collaborators:na.collaborators})]})]})]})})}),{Trigger:m.Z.Trigger,Item:m.Z.Item,ItemLink:m.Z.ItemLink,ItemCustom:m.Z.ItemCustom,Group:m.Z.Group,Separator:m.Z.Separator,DefaultItems:g})},7041:function(g,h,b){function l(Jc,ic){var Oc=Object.keys(Jc);if(Object.getOwnPropertySymbols){var Rc=Object.getOwnPropertySymbols(Jc);ic&&(Rc=Rc.filter(function(fd){return Object.getOwnPropertyDescriptor(Jc,fd).enumerable}));Oc.push.apply(Oc,Rc)}return Oc}b.d(h,{iC:function(){return T},vL:function(){return Xc},bY:function(){return Ad},
gK:function(){return Qc},$C:function(){return fa},oc:function(){return ia},_9:function(){return Db},HN:function(){return rb},qy:function(){return pc},rk:function(){return Ga},n5:function(){return xa},h6:function(){return Cc},Rx:function(){return lb},Cc:function(){return fc},Hg:function(){return Ia},cW:function(){return Wa},hs:function(){return Ya},f:function(){return R},xY:function(){return Ib},Iw:function(){return F},$e:function(){return O},Vi:function(){return W},Ks:function(){return E},r8:function(){return ka},
I_:function(){return la},ZB:function(){return oc},pb:function(){return ua},ut:function(){return X},iG:function(){return pa},k:function(){return Fa},sA:function(){return Ua},KL:function(){return Ka},LL:function(){return na},PR:function(){return Bc},tf:function(){return Nb},EE:function(){return Lb},qx:function(){return G},$n:function(){return bd},zK:function(){return xc},LO:function(){return Ba},CP:function(){return ta},Zj:function(){return Ma},Yx:function(){return bb},sS:function(){return Qa},kV:function(){return ab},
sk:function(){return Pa},eF:function(){return hb},Oh:function(){return U},XI:function(){return Z},WR:function(){return db},a6:function(){return Gb},HM:function(){return Oa},ay:function(){return I},hR:function(){return dc},Gj:function(){return oa},I8:function(){return Sc},wZ:function(){return M},C6:function(){return ea},ZF:function(){return ib},nM:function(){return La},ah:function(){return yb},UO:function(){return vb},Kr:function(){return Nc},oX:function(){return sc},_D:function(){return va},vf:function(){return aa},
V4:function(){return Va},Dt:function(){return V},jP:function(){return L},Um:function(){return B},vU:function(){return H},G6:function(){return S},ED:function(){return J}});var m=b(7169);g=b(3379);g=b.n(g);h=b(7795);h=b.n(h);var p=b(569);p=b.n(p);var D=b(3565);D=b.n(D);var v=b(9216);v=b.n(v);var t=b(4589);t=b.n(t);var r=b(6464),f={};f.styleTagTransform=t();f.setAttributes=D();f.insert=p().bind(null,"head");f.domAPI=h();f.insertStyleElement=v();g()(r.Z,f);g=r.Z&&r.Z.locals?r.Z.locals:void 0;b=b(8127);
var E,B=/Mac|iPod|iPhone|iPad/.test(navigator.platform),J=/^Win/.test(navigator.platform),V=/\b(android)\b/i.test(navigator.userAgent),H="netscape"in window&&1<navigator.userAgent.indexOf("rv:")&&1<navigator.userAgent.indexOf("Gecko"),S=-1===navigator.userAgent.indexOf("Chrome")&&-1!==navigator.userAgent.indexOf("Safari"),L=function(){var Jc,ic;return"isBrave"===(null===(Jc=navigator.brave)||void 0===Jc||null===(ic=Jc.isBrave)||void 0===ic?void 0:ic.name)},T="Excalidraw",R=10,G=8,F=5,O=1,M=30,I=Math.PI/
12,ia={TEXT:"text",CROSSHAIR:"crosshair",GRABBING:"grabbing",GRAB:"grab",POINTER:"pointer",MOVE:"move",AUTO:""},U={MAIN:0,WHEEL:1,SECONDARY:2,TOUCH:-1},Z={enabled:"all",disabled:"none",inheritFromUI:"var(--ui-pointerEvents)"};!function(Jc){Jc.COPY="copy";Jc.PASTE="paste";Jc.CUT="cut";Jc.KEYDOWN="keydown";Jc.KEYUP="keyup";Jc.MOUSE_MOVE="mousemove";Jc.RESIZE="resize";Jc.UNLOAD="unload";Jc.FOCUS="focus";Jc.BLUR="blur";Jc.DRAG_OVER="dragover";Jc.DROP="drop";Jc.GESTURE_END="gestureend";Jc.BEFORE_UNLOAD=
"beforeunload";Jc.GESTURE_START="gesturestart";Jc.GESTURE_CHANGE="gesturechange";Jc.POINTER_MOVE="pointermove";Jc.POINTER_DOWN="pointerdown";Jc.POINTER_UP="pointerup";Jc.STATE_CHANGE="statechange";Jc.WHEEL="wheel";Jc.TOUCH_START="touchstart";Jc.TOUCH_END="touchend";Jc.HASHCHANGE="hashchange";Jc.VISIBILITY_CHANGE="visibilitychange";Jc.SCROLL="scroll";Jc.EXCALIDRAW_LINK="excalidraw-link";Jc.MENU_ITEM_SELECT="menu.itemSelect";Jc.MESSAGE="message"}(E||={});var aa={UNSTARTED:-1,ENDED:0,PLAYING:1,PAUSED:2,
BUFFERING:3,CUED:5},W={TEST:"test",DEVELOPMENT:"development"},fa={SHAPE_ACTIONS_MENU:"App-menu__left"},X={Virgil:1,Helvetica:2,Cascadia:3},ea={LIGHT:"light",DARK:"dark"},pa={strokeColor:"#bbb",strokeWidth:1,strokeStyle:"solid",fillStyle:"solid",roughness:0,roundness:null,backgroundColor:"transparent",radius:8},va="Segoe UI Emoji",ta=1,xa=20,Ga=X.Virgil,Ia="left",Ya="top",Fa=20,Ka={svg:"image/svg+xml",png:"image/png",jpg:"image/jpeg",gif:"image/gif",webp:"image/webp",bmp:"image/bmp",ico:"image/x-icon",
avif:"image/avif",jfif:"image/jfif"},Ba=function(Jc){for(var ic=1;ic<arguments.length;ic++){var Oc=null!=arguments[ic]?arguments[ic]:{};ic%2?l(Object(Oc),!0).forEach(function(Rc){(0,m.Z)(Jc,Rc,Oc[Rc])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Jc,Object.getOwnPropertyDescriptors(Oc)):l(Object(Oc)).forEach(function(Rc){Object.defineProperty(Jc,Rc,Object.getOwnPropertyDescriptor(Oc,Rc))})}return Jc}({json:"application/json",excalidraw:"application/vnd.excalidraw+json",excalidrawlib:"application/vnd.excalidrawlib+json",
"excalidraw.svg":"image/svg+xml","excalidraw.png":"image/png",binary:"application/octet-stream"},Ka),la={png:"png",svg:"svg",clipboard:"clipboard"},ka={excalidraw:"excalidraw",excalidrawClipboard:"excalidraw/clipboard",excalidrawLibrary:"excalidrawlib",excalidrawClipboardWithAPI:"excalidraw-api/clipboard"},ua=window.EXCALIDRAW_EXPORT_SOURCE||window.location.origin,na=500,oa=300,La=500,Oa=100,Va=.1,Ma=.1,Ua=300,ib=g.themeFilter,vb={addLibrary:"addLibrary"},yb={addLibrary:"addLibrary"},Wa={canvasActions:{changeViewBackgroundColor:!0,
clearCanvas:!0,export:{saveFileToDisk:!0},loadScene:!0,saveToActiveFile:!0,toggleTheme:null,saveAsImage:!0}},hb=640,ab=730,Qa=1E3,bb=500,Pa=1229,Lb=parseInt(g.rightSidebarWidth),xc=2,oc=[1,2,3],pc=10,Cc=1440,bd=2097152,dc="http://www.w3.org/2000/svg",Nc={excalidraw:2,excalidrawLibrary:2},Qc=5,Ad=.7,Xc=11,sc={TOP:"top",MIDDLE:"middle",BOTTOM:"bottom"},Sc={LEFT:"left",CENTER:"center",RIGHT:"right"},Ib=20,lb=.25,Db=32,Gb={LEGACY:1,PROPORTIONAL_RADIUS:2,ADAPTIVE_RADIUS:3},db="__precedingElement__",rb=
{strokeColor:b.HO.black,backgroundColor:b.HO.transparent,fillStyle:"hachure",strokeWidth:1,strokeStyle:"solid",roughness:1,opacity:100,locked:!1},Nb="library",fc={name:"default",defaultTab:Nb},Bc=new Set(["embeddable","image"])},5371:function(g,h,b){function l(){const S=r(L=>({current:[],version:0,set:L}));return{In:({children:L})=>{const T=S(G=>G.set),R=S(G=>G.version);return B(()=>{T(G=>({version:G.version+1}))},[]),B(()=>(T(({current:G})=>({current:[...G,L]})),()=>T(({current:G})=>({current:G.filter(F=>
F!==L)}))),[L,R]),null},Out:()=>{const L=S(T=>T.current);return p().createElement(p().Fragment,null,L)}}}b.d(h,{A3:function(){return J},ZC:function(){return H},R6:function(){return V}});var m=b(9787),p=b.n(m);const D=S=>{let L;const T=new Set,R=(O,M)=>{O="function"==typeof O?O(L):O;if(!Object.is(O,L)){const I=L;L=(null!=M?M:"object"!=typeof O)?O:Object.assign({},L,O);T.forEach(ia=>ia(L,I))}},G=()=>L,F={setState:R,getState:G,subscribe:O=>(T.add(O),()=>T.delete(O)),destroy:()=>{console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected.");
T.clear()}};return L=S(R,G,F),F};g=b(5668);const {useSyncExternalStoreWithSelector:v}=g,t=S=>{"function"!=typeof S&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const L="function"==typeof S?S?D(S):D:S;S=(T,R)=>function(G,F=G.getState,O){G=v(G.subscribe,G.getState,G.getServerState||G.getState,F,O);return(0,m.useDebugValue)(G),G}(L,T,R);return Object.assign(S,L),S},r=S=>S?t(S):t;var f,E;const B="undefined"!=
typeof window&&(null!=(f=window.document)&&f.createElement||"ReactNative"===(null==(E=window.navigator)?void 0:E.product))?p().useLayoutEffect:p().useEffect;var J=p().createContext(null),V=function(){return p().useContext(J)},H=function(){return p().useMemo(function(){return{MainMenuTunnel:l(),WelcomeScreenMenuHintTunnel:l(),WelcomeScreenToolbarHintTunnel:l(),WelcomeScreenHelpHintTunnel:l(),WelcomeScreenCenterTunnel:l(),FooterCenterTunnel:l(),DefaultSidebarTriggerTunnel:l(),DefaultSidebarTabTriggersTunnel:l(),
OverwriteConfirmDialogTunnel:l(),jotaiScope:Symbol()}},[])}},5990:function(g,h,b){b.d(h,{I:function(){return p},k:function(){return m}});g=b(9787);var l=b.n(g),m=l().createContext(null),p=function(){return l().useContext(m)}},8165:function(g,h,b){function l(Ba,la){var ka=Object.keys(Ba);if(Object.getOwnPropertySymbols){var ua=Object.getOwnPropertySymbols(Ba);la&&(ua=ua.filter(function(na){return Object.getOwnPropertyDescriptor(Ba,na).enumerable}));ka.push.apply(ka,ua)}return ka}function m(Ba){for(var la=
1;la<arguments.length;la++){var ka=null!=arguments[la]?arguments[la]:{};la%2?l(Object(ka),!0).forEach(function(ua){(0,v.Z)(Ba,ua,ka[ua])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Ba,Object.getOwnPropertyDescriptors(ka)):l(Object(ka)).forEach(function(ua){Object.defineProperty(Ba,ua,Object.getOwnPropertyDescriptor(ka,ua))})}return Ba}b.d(h,{DQ:function(){return M},KG:function(){return pa},Pn:function(){return ta},Qk:function(){return O},Sf:function(){return ea},Tu:function(){return va},
Wr:function(){return ia},ZY:function(){return U},_c:function(){return fa},bv:function(){return xa},cT:function(){return Z},g8:function(){return I},gY:function(){return Fa},lV:function(){return W},tW:function(){return X},vZ:function(){return Ka},wf:function(){return aa}});var p=b(1930),D=b(2577),v=b(7169),t=b(8950);g=b(2975);var r=b.n(g),f=b(5605),E=b(7726),B=b(7041),J=b(5734),V=b(8946),H=b(8557),S=b(9547),L=b(7135),T=b(6282),R=b(4038),G=b(7181),F=function(){var Ba=(0,t.Z)(r().mark(function ua(ka){var na;
return r().wrap(function(oa){for(;;)switch(oa.prev=oa.next){case 0:if(ka.type!==B.LO.png){oa.next=18;break}return oa.prev=1,oa.next=4,Promise.resolve().then(b.bind(b,40));case 4:return oa.next=6,oa.sent.decodePngMetadata(ka);case 6:return oa.abrupt("return",oa.sent);case 9:if(oa.prev=9,oa.t0=oa.catch(1),"INVALID"!==oa.t0.message){oa.next=15;break}throw new DOMException((0,H.t)("alerts.imageDoesNotContainScene"),"EncodingError");case 15:throw new DOMException((0,H.t)("alerts.cannotRestoreFromImage"),
"EncodingError");case 16:oa.next=43;break;case 18:if(!("text"in Blob)){oa.next=24;break}return oa.next=21,ka.text();case 21:na=oa.sent;oa.next=27;break;case 24:return oa.next=26,new Promise(function(La){var Oa=new FileReader;Oa.readAsText(ka,"utf8");Oa.onloadend=function(){Oa.readyState===FileReader.DONE&&La(Oa.result)}});case 26:na=oa.sent;case 27:if(ka.type!==B.LO.svg){oa.next=43;break}return oa.prev=28,oa.next=31,Promise.resolve().then(b.bind(b,40));case 31:return oa.next=33,oa.sent.decodeSvgMetadata({svg:na});
case 33:return oa.abrupt("return",oa.sent);case 36:if(oa.prev=36,oa.t1=oa.catch(28),"INVALID"!==oa.t1.message){oa.next=42;break}throw new DOMException((0,H.t)("alerts.imageDoesNotContainScene"),"EncodingError");case 42:throw new DOMException((0,H.t)("alerts.cannotRestoreFromImage"),"EncodingError");case 43:return oa.abrupt("return",na);case 44:case "end":return oa.stop()}},ua,null,[[1,9],[28,36]])}));return function(ka){return Ba.apply(this,arguments)}}(),O=function(Ba){var la;return Ba&&(null===
(la=Ba.name.match(/\.(json|excalidraw|png|svg)$/))||void 0===la?void 0:la[1])||null},M=function(Ba){return"png"===Ba||"svg"===Ba},I=function(Ba){Ba=O(Ba);return"png"===Ba||"svg"===Ba},ia=function(Ba){Ba=(Ba||{}).type;return!!Ba&&Object.values(B.KL).includes(Ba)},U=function(){var Ba=(0,t.Z)(r().mark(function La(ka,ua,na,oa){var Oa,Va;return r().wrap(function(Ma){for(;;)switch(Ma.prev=Ma.next){case 0:return Ma.next=2,F(ka);case 2:if(Oa=Ma.sent,Ma.prev=3,Va=JSON.parse(Oa),!(0,R.dS)(Va)){Ma.next=9;break}return Ma.abrupt("return",
{type:B.LO.excalidraw,data:(0,G.nu)({elements:(0,J._M)(Va.elements||[]),appState:m(m({theme:null==ua?void 0:ua.theme,fileHandle:oa||ka.handle||null},(0,E.s)(Va.appState||{})),ua?(0,S.W)(Va.elements||[],ua):{}),files:Va.files},ua,na,{repairBindings:!0,refreshDimensions:!1})});case 9:if(!(0,R.HT)(Va)){Ma.next=11;break}return Ma.abrupt("return",{type:B.LO.excalidrawlib,data:Va});case 11:throw Error((0,H.t)("alerts.couldNotLoadInvalidFile"));case 14:throw Ma.prev=14,Ma.t0=Ma.catch(3),console.error(Ma.t0.message),
Error((0,H.t)("alerts.couldNotLoadInvalidFile"));case 18:case "end":return Ma.stop()}},La,null,[[3,14]])}));return function(ka,ua,na,oa){return Ba.apply(this,arguments)}}(),Z=function(){var Ba=(0,t.Z)(r().mark(function La(ka,ua,na,oa){var Oa;return r().wrap(function(Va){for(;;)switch(Va.prev=Va.next){case 0:return Va.next=2,U(ka,ua,na,oa);case 2:if((Oa=Va.sent).type===B.LO.excalidraw){Va.next=5;break}throw Error((0,H.t)("alerts.couldNotLoadInvalidFile"));case 5:return Va.abrupt("return",Oa.data);
case 6:case "end":return Va.stop()}},La)}));return function(ka,ua,na,oa){return Ba.apply(this,arguments)}}(),aa=function(Ba){var la=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"unpublished",ka=JSON.parse(Ba);if(!(0,R.HT)(ka))throw Error("Invalid library");return(0,G.wJ)(ka.libraryItems||ka.library,la)},W=function(){var Ba=(0,t.Z)(r().mark(function ua(ka){var na,oa=arguments;return r().wrap(function(La){for(;;)switch(La.prev=La.next){case 0:return na=1<oa.length&&void 0!==oa[1]?oa[1]:"unpublished",
La.t0=aa,La.next=4,F(ka);case 4:return La.t1=La.sent,La.t2=na,La.abrupt("return",(0,La.t0)(La.t1,La.t2));case 7:case "end":return La.stop()}},ua)}));return function(ka){return Ba.apply(this,arguments)}}(),fa=function(){var Ba=(0,t.Z)(r().mark(function ua(ka){return r().wrap(function(na){for(;;)switch(na.prev=na.next){case 0:return na.abrupt("return",new Promise(function(oa,La){try{ka.toBlob(function(Oa){if(!Oa)return La(new V.l((0,H.t)("canvasError.canvasTooBig"),"CANVAS_POSSIBLY_TOO_BIG"));oa(Oa)})}catch(Oa){La(Oa)}}));
case 1:case "end":return na.stop()}},ua)}));return function(ka){return Ba.apply(this,arguments)}}(),X=function(){var Ba=(0,t.Z)(r().mark(function ua(ka){var na;return r().wrap(function(oa){for(;;)switch(oa.prev=oa.next){case 0:return oa.prev=0,oa.t0=window.crypto.subtle,oa.next=4,Ka(ka);case 4:return oa.t1=oa.sent,oa.next=7,oa.t0.digest.call(oa.t0,"SHA-1",oa.t1);case 7:return na=oa.sent,oa.abrupt("return",(0,L.G3)(new Uint8Array(na)));case 11:return oa.prev=11,oa.t2=oa.catch(0),console.error(oa.t2),
oa.abrupt("return",(0,f.x0)(40));case 15:case "end":return oa.stop()}},ua,null,[[0,11]])}));return function(ka){return Ba.apply(this,arguments)}}(),ea=function(){var Ba=(0,t.Z)(r().mark(function ua(ka){return r().wrap(function(na){for(;;)switch(na.prev=na.next){case 0:return na.abrupt("return",new Promise(function(oa,La){var Oa=new FileReader;Oa.onload=function(){oa(Oa.result)};Oa.onerror=function(Va){return La(Va)};Oa.readAsDataURL(ka)}));case 1:case "end":return na.stop()}},ua)}));return function(ka){return Ba.apply(this,
arguments)}}(),pa=function(Ba){var la=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"",ka=Ba.indexOf(","),ua=atob(Ba.slice(ka+1));ka=Ba.slice(0,ka).split(":")[1].split(";")[0];for(var na=new ArrayBuffer(ua.length),oa=new Uint8Array(na),La=0;La<ua.length;La++)oa[La]=ua.charCodeAt(La);return new File([na],la,{type:ka})},va=function(){var Ba=(0,t.Z)(r().mark(function na(ka,ua){var oa,La,Oa,Va,Ma,Ua;return r().wrap(function(ib){for(;;)switch(ib.prev=ib.next){case 0:if(ka.type!==B.LO.svg){ib.next=
2;break}return ib.abrupt("return",ka);case 2:return ib.next=4,Promise.all([b.e(4736).then(b.t.bind(b,4881,23)).then(function(vb){return vb.default}),b.e(4736).then(b.bind(b,100)).then(function(vb){return vb.default})]);case 4:if(oa=ib.sent,La=(0,D.Z)(oa,2),Oa=La[0],Va=La[1],Ma=Va({pica:Oa({features:["js","wasm"]})}),ua.outputType&&(Ua=ua.outputType,Ma._create_blob=function(vb){return this.pica.toBlob(vb.out_canvas,Ua,.8).then(function(yb){return vb.out_blob=yb,vb})}),ia(ka)){ib.next=12;break}throw Error((0,H.t)("errors.unsupportedFileType"));
case 12:return ib.t0=File,ib.next=15,Ma.toBlob(ka,{max:ua.maxWidthOrHeight});case 15:return ib.t1=ib.sent,ib.t2=[ib.t1],ib.t3=ka.name,ib.t4={type:ua.outputType||ka.type},ib.abrupt("return",new ib.t0(ib.t2,ib.t3,ib.t4));case 20:case "end":return ib.stop()}},na)}));return function(ka,ua){return Ba.apply(this,arguments)}}(),ta=function(Ba){var la=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"";return new File([(new TextEncoder).encode(Ba)],la,{type:B.LO.svg})},xa=function(){var Ba=(0,t.Z)(r().mark(function ua(ka){var na,
oa;return r().wrap(function(La){for(;;)switch(La.prev=La.next){case 0:return na=ka.dataTransfer.files.item(0),La.next=3,Ga(ka);case 3:if(oa=La.sent,!na){La.next=10;break}return La.next=7,Fa(na);case 7:La.t0=La.sent;La.next=11;break;case 10:La.t0=null;case 11:return La.t1=La.t0,La.t2=oa,La.abrupt("return",{file:La.t1,fileHandle:La.t2});case 14:case "end":return La.stop()}},ua)}));return function(ka){return Ba.apply(this,arguments)}}(),Ga=function(){var Ba=(0,t.Z)(r().mark(function ua(ka){var na,oa;
return r().wrap(function(La){for(;;)switch(La.prev=La.next){case 0:if(!T.kr){La.next=16;break}return La.prev=1,na=ka.dataTransfer.items[0],La.next=5,na.getAsFileSystemHandle();case 5:if(La.t0=La.sent,La.t0){La.next=8;break}La.t0=null;case 8:return oa=La.t0,La.abrupt("return",oa);case 12:return La.prev=12,La.t1=La.catch(1),console.warn(La.t1.name,La.t1.message),La.abrupt("return",null);case 16:return La.abrupt("return",null);case 17:case "end":return La.stop()}},ua,null,[[1,12]])}));return function(ka){return Ba.apply(this,
arguments)}}(),Ia=function(Ba){var la=null;Ba="".concat((0,p.Z)((new Uint8Array(Ba)).slice(0,8)).join(" ")," ");return"137 80 78 71 13 10 26 10 "===Ba?la=B.LO.png:Ba.startsWith("255 216 255 ")?la=B.LO.jpg:Ba.startsWith("71 73 70 56 57 97 ")&&(la=B.LO.gif),la},Ya=function(Ba,la,ka){return new File([Ba],ka||"",{type:la})},Fa=function(){var Ba=(0,t.Z)(r().mark(function ua(ka){var na,oa,La,Oa,Va,Ma,Ua,ib;return r().wrap(function(vb){for(;;)switch(vb.prev=vb.next){case 0:if(ka.type){vb.next=28;break}if(null===
(na=ka)||void 0===na||null===(oa=na.name)||void 0===oa||!oa.endsWith(".excalidrawlib")){vb.next=11;break}return vb.t0=Ya,vb.next=5,Ka(ka);case 5:vb.t1=vb.sent;vb.t2=B.LO.excalidrawlib;vb.t3=ka.name;ka=(0,vb.t0)(vb.t1,vb.t2,vb.t3);vb.next=26;break;case 11:if(null===(La=ka)||void 0===La||null===(Oa=La.name)||void 0===Oa||!Oa.endsWith(".excalidraw")){vb.next=21;break}return vb.t4=Ya,vb.next=15,Ka(ka);case 15:vb.t5=vb.sent;vb.t6=B.LO.excalidraw;vb.t7=ka.name;ka=(0,vb.t4)(vb.t5,vb.t6,vb.t7);vb.next=26;
break;case 21:return vb.next=23,Ka(ka);case 23:Va=vb.sent,(Ma=Ia(Va))&&(ka=Ya(Va,Ma,ka.name));case 26:vb.next=34;break;case 28:if(!ia(ka)){vb.next=34;break}return vb.next=31,Ka(ka);case 31:Ua=vb.sent,(ib=Ia(Ua))&&ib!==ka.type&&(ka=Ya(Ua,ib,ka.name));case 34:return vb.abrupt("return",ka);case 35:case "end":return vb.stop()}},ua)}));return function(ka){return Ba.apply(this,arguments)}}(),Ka=function(Ba){return"arrayBuffer"in Ba?Ba.arrayBuffer():new Promise(function(la,ka){var ua=new FileReader;ua.onload=
function(na){var oa;if(null===(oa=na.target)||void 0===oa||!oa.result)return ka(Error("Couldn't convert blob to ArrayBuffer"));la(na.target.result)};ua.readAsArrayBuffer(Ba)})}},6282:function(g,h,b){function l(){return l=(0,D.Z)(v.mark(function L(){var T,R=arguments;return v.wrap(function(G){for(;;)switch(G.prev=G.next){case 0:return G.next=2,r;case 2:return G.abrupt("return",(T=G.sent).default.apply(T,R));case 3:case "end":return G.stop()}},L)})),l.apply(this,arguments)}function m(){return m=(0,D.Z)(v.mark(function L(){var T,
R=arguments;return v.wrap(function(G){for(;;)switch(G.prev=G.next){case 0:return G.next=2,f;case 2:return G.abrupt("return",(T=G.sent).default.apply(T,R));case 3:case "end":return G.stop()}},L)})),m.apply(this,arguments)}b.d(h,{I$:function(){return V},NL:function(){return H},kr:function(){return t}});var p=b(1930),D=b(8950),v=b(2975),t=function(){if("undefined"==typeof self)return!1;if("top"in self&&self!==top)try{top}catch(S){}else if("showOpenFilePicker"in self)return"showOpenFilePicker";return!1}(),
r=t?b.e(4736).then(b.bind(b,5914)):b.e(4736).then(b.bind(b,5763));t?b.e(4736).then(b.bind(b,1998)):b.e(4736).then(b.bind(b,4194));var f=t?b.e(4736).then(b.bind(b,1389)):b.e(4736).then(b.bind(b,6689)),E=b(7041),B=b(8946),J=b(7135),V=function(S){var L,T,R,G=null===(L=S.extensions)||void 0===L?void 0:L.reduce(function(F,O){return F.push(E.LO[O]),F},[]);L=null===(T=S.extensions)||void 0===T?void 0:T.reduce(function(F,O){return"jpg"===O?F.concat(".jpg",".jpeg"):F.concat(".".concat(O))},[]);return function(){return l.apply(this,
arguments)}({description:S.description,extensions:L,mimeTypes:G,multiple:null!==(R=S.multiple)&&void 0!==R&&R,legacySetup:function(F,O,M){var I=(0,J.Ds)(O,500),ia=function(){U();document.addEventListener(E.Ks.KEYUP,I);document.addEventListener(E.Ks.POINTER_UP,I);I()},U=function(){var aa;null!==(aa=M.files)&&void 0!==aa&&aa.length&&(aa=S.multiple?(0,p.Z)(M.files):M.files[0],F(aa))};requestAnimationFrame(function(){window.addEventListener(E.Ks.FOCUS,ia)});var Z=window.setInterval(function(){U()},500);
return function(aa){clearInterval(Z);I.cancel();window.removeEventListener(E.Ks.FOCUS,ia);document.removeEventListener(E.Ks.KEYUP,I);document.removeEventListener(E.Ks.POINTER_UP,I);aa&&(console.warn("Opening the file was canceled (legacy-fs)."),aa(new B._))}}})},H=function(S,L){return function(){return m.apply(this,arguments)}(S,{fileName:"".concat(L.name,".").concat(L.extension),description:L.description,extensions:[".".concat(L.extension)]},L.fileHandle)}},40:function(g,h,b){b.r(h);b.d(h,{decodePngMetadata:function(){return G},
decodeSvgMetadata:function(){return O},encodePngMetadata:function(){return R},encodeSvgMetadata:function(){return F},getTEXtChunk:function(){return T}});var l=b(8950);g=b(2975);var m=b.n(g);g=b(2983);var p=b.n(g),D=b(1194);g=b(3434);var v=b.n(g),t=b(2744),r=b(7041),f=b(8165),E=function(M){return new Promise(function(I,ia){var U="string"==typeof M?new Blob([(new TextEncoder).encode(M)]):new Blob([M instanceof Uint8Array?M:new Uint8Array(M)]),Z=new FileReader;Z.onload=function(aa){if(!aa.target||"string"!=
typeof aa.target.result)return ia(Error("couldn't convert to byte string"));I(aa.target.result)};Z.readAsBinaryString(U)})},B=function(M){for(var I=new ArrayBuffer(M.length),ia=new Uint8Array(I),U=0,Z=M.length;U<Z;U++)ia[U]=M.charCodeAt(U);return I},J=function(M){return(new TextDecoder("utf-8")).decode(B(M))},V=function(){var M=(0,l.Z)(m().mark(function U(ia){var Z=arguments;return m().wrap(function(aa){for(;;)switch(aa.prev=aa.next){case 0:if(!(1<Z.length&&void 0!==Z[1]&&Z[1])){aa.next=5;break}aa.t0=
window.btoa(ia);aa.next=10;break;case 5:return aa.t1=window,aa.next=8,E(ia);case 8:aa.t2=aa.sent,aa.t0=aa.t1.btoa.call(aa.t1,aa.t2);case 10:return aa.abrupt("return",aa.t0);case 11:case "end":return aa.stop()}},U)}));return function(ia){return M.apply(this,arguments)}}(),H=function(){var M=(0,l.Z)(m().mark(function U(ia){var Z,aa=arguments;return m().wrap(function(W){for(;;)switch(W.prev=W.next){case 0:return Z=1<aa.length&&void 0!==aa[1]&&aa[1],W.abrupt("return",Z?window.atob(ia):J(window.atob(ia)));
case 2:case "end":return W.stop()}},U)}));return function(ia){return M.apply(this,arguments)}}(),S=function(){var M=(0,l.Z)(m().mark(function U(ia){var Z,aa;return m().wrap(function(W){for(;;)switch(W.prev=W.next){case 0:if(Z=ia.text,!1===ia.compress){W.next=11;break}return W.prev=2,W.next=5,E((0,t.deflate)(Z));case 5:aa=W.sent;W.next=11;break;case 8:W.prev=8,W.t0=W.catch(2),console.error("encode: cannot deflate",W.t0);case 11:if(W.t1=!!aa,W.t2=aa,W.t2){W.next=17;break}return W.next=16,E(Z);case 16:W.t2=
W.sent;case 17:return W.t3=W.t2,W.abrupt("return",{version:"1",encoding:"bstring",compressed:W.t1,encoded:W.t3});case 19:case "end":return W.stop()}},U,null,[[2,8]])}));return function(ia){return M.apply(this,arguments)}}(),L=function(){var M=(0,l.Z)(m().mark(function U(ia){var Z;return m().wrap(function(aa){for(;;)switch(aa.prev=aa.next){case 0:aa.t0=ia.encoding;aa.next="bstring"===aa.t0?3:12;break;case 3:if(!ia.compressed){aa.next=7;break}aa.t1=ia.encoded;aa.next=10;break;case 7:return aa.next=
9,J(ia.encoded);case 9:aa.t1=aa.sent;case 10:return Z=aa.t1,aa.abrupt("break",13);case 12:throw Error('decode: unknown encoding "'.concat(ia.encoding,'"'));case 13:if(!ia.compressed){aa.next=15;break}return aa.abrupt("return",(0,t.inflate)(new Uint8Array(B(Z)),{to:"string"}));case 15:return aa.abrupt("return",Z);case 16:case "end":return aa.stop()}},U)}));return function(ia){return M.apply(this,arguments)}}(),T=function(){var M=(0,l.Z)(m().mark(function U(ia){var Z,aa;return m().wrap(function(W){for(;;)switch(W.prev=
W.next){case 0:return W.t0=p(),W.t1=Uint8Array,W.next=4,(0,f.vZ)(ia);case 4:if(W.t2=W.sent,W.t3=new W.t1(W.t2),Z=(0,W.t0)(W.t3),!(aa=Z.find(function(fa){return"tEXt"===fa.name}))){W.next=10;break}return W.abrupt("return",D.decode(aa.data));case 10:return W.abrupt("return",null);case 11:case "end":return W.stop()}},U)}));return function(ia){return M.apply(this,arguments)}}(),R=function(){var M=(0,l.Z)(m().mark(function U(ia){var Z,aa,W,fa;return m().wrap(function(X){for(;;)switch(X.prev=X.next){case 0:return Z=
ia.blob,aa=ia.metadata,X.t0=p(),X.t1=Uint8Array,X.next=5,(0,f.vZ)(Z);case 5:return X.t2=X.sent,X.t3=new X.t1(X.t2),W=(0,X.t0)(X.t3),X.t4=D,X.t5=r.LO.excalidraw,X.t6=JSON,X.next=13,S({text:aa,compress:!0});case 13:return X.t7=X.sent,X.t8=X.t6.stringify.call(X.t6,X.t7),fa=X.t4.encode.call(X.t4,X.t5,X.t8),W.splice(-1,0,fa),X.abrupt("return",new Blob([v()(W)],{type:r.LO.png}));case 18:case "end":return X.stop()}},U)}));return function(ia){return M.apply(this,arguments)}}(),G=function(){var M=(0,l.Z)(m().mark(function U(ia){var Z,
aa;return m().wrap(function(W){for(;;)switch(W.prev=W.next){case 0:return W.next=2,T(ia);case 2:if((null==(Z=W.sent)?void 0:Z.keyword)!==r.LO.excalidraw){W.next=19;break}if(W.prev=4,"encoded"in(aa=JSON.parse(Z.text))){W.next=10;break}if(!("type"in aa)||aa.type!==r.r8.excalidraw){W.next=9;break}return W.abrupt("return",Z.text);case 9:throw Error("FAILED");case 10:return W.next=12,L(aa);case 12:return W.abrupt("return",W.sent);case 15:throw W.prev=15,W.t0=W.catch(4),console.error(W.t0),Error("FAILED");
case 19:throw Error("INVALID");case 20:case "end":return W.stop()}},U,null,[[4,15]])}));return function(ia){return M.apply(this,arguments)}}(),F=function(){var M=(0,l.Z)(m().mark(function U(ia){var Z,aa,W;return m().wrap(function(fa){for(;;)switch(fa.prev=fa.next){case 0:return Z=ia.text,fa.t0=V,fa.t1=JSON,fa.next=5,S({text:Z});case 5:return fa.t2=fa.sent,fa.t3=fa.t1.stringify.call(fa.t1,fa.t2),fa.next=9,(0,fa.t0)(fa.t3,!0);case 9:return aa=fa.sent,W="",W+="\x3c!-- payload-type:".concat(r.LO.excalidraw,
" --\x3e"),W+="\x3c!-- payload-version:2 --\x3e",W+="\x3c!-- payload-start --\x3e",W+=aa,W+="\x3c!-- payload-end --\x3e",fa.abrupt("return",W);case 17:case "end":return fa.stop()}},U)}));return function(ia){return M.apply(this,arguments)}}(),O=function(){var M=(0,l.Z)(m().mark(function U(ia){var Z,aa,W,fa,X,ea,pa;return m().wrap(function(va){for(;;)switch(va.prev=va.next){case 0:if(!(Z=ia.svg).includes("payload-type:".concat(r.LO.excalidraw))){va.next=26;break}if(aa=Z.match(/\x3c!-- payload-start --\x3e\s*(.+?)\s*\x3c!-- payload-end --\x3e/)){va.next=
5;break}throw Error("INVALID");case 5:return W=Z.match(/\x3c!-- payload-version:(\d+) --\x3e/),fa=(null==W?void 0:W[1])||"1",X="1"!==fa,va.prev=8,va.next=11,H(aa[1],X);case 11:if(ea=va.sent,"encoded"in(pa=JSON.parse(ea))){va.next=17;break}if(!("type"in pa)||pa.type!==r.r8.excalidraw){va.next=16;break}return va.abrupt("return",ea);case 16:throw Error("FAILED");case 17:return va.next=19,L(pa);case 19:return va.abrupt("return",va.sent);case 22:throw va.prev=22,va.t0=va.catch(8),console.error(va.t0),
Error("FAILED");case 26:throw Error("INVALID");case 27:case "end":return va.stop()}},U,null,[[8,22]])}));return function(ia){return M.apply(this,arguments)}}()},2137:function(g,h,b){b.d(h,{Um:function(){return E.Um},cT:function(){return r.cT},n8:function(){return E.n8},p1:function(){return B}});var l=b(8950);g=b(2975);var m=b.n(g),p=b(278),D=b(7041),v=b(8557),t=b(2739),r=b(8165),f=b(6282),E=b(4038),B=function(){var J=(0,l.Z)(m().mark(function G(H,S,L,T,R){var F,O,M,I,ia,U,Z,aa,W,fa,X;return m().wrap(function(ea){for(;;)switch(ea.prev=
ea.next){case 0:if(F=R.exportBackground,O=R.exportPadding,M=void 0===O?D.qy:O,I=R.viewBackgroundColor,ia=R.name,U=R.fileHandle,Z=void 0===U?null:U,0!==S.length){ea.next=3;break}throw Error((0,v.t)("alerts.cannotExportEmptyCanvas"));case 3:if("svg"!==H&&"clipboard-svg"!==H){ea.next=17;break}return ea.next=6,(0,t.$D)(S,{exportBackground:F,exportWithDarkMode:L.exportWithDarkMode,viewBackgroundColor:I,exportPadding:M,exportScale:L.exportScale,exportEmbedScene:L.exportEmbedScene&&"svg"===H},T);case 6:if(aa=
ea.sent,"svg"!==H){ea.next=13;break}return ea.next=10,(0,f.NL)(new Blob([aa.outerHTML],{type:D.LO.svg}),{description:"Export to SVG",name:ia,extension:L.exportEmbedScene?"excalidraw.svg":"svg",fileHandle:Z});case 10:return ea.abrupt("return",ea.sent);case 13:if("clipboard-svg"!==H){ea.next=17;break}return ea.next=16,(0,p.dd)(aa.outerHTML);case 16:return ea.abrupt("return");case 17:return ea.next=19,(0,t.NL)(S,L,T,{exportBackground:F,viewBackgroundColor:I,exportPadding:M});case 19:if((W=ea.sent).style.display=
"none",document.body.appendChild(W),"png"!==H){ea.next=38;break}return ea.next=25,(0,r._c)(W);case 25:if(fa=ea.sent,W.remove(),!L.exportEmbedScene){ea.next=33;break}return ea.next=30,Promise.resolve().then(b.bind(b,40));case 30:return ea.next=32,ea.sent.encodePngMetadata({blob:fa,metadata:(0,E.I_)(S,L,T,"local")});case 32:fa=ea.sent;case 33:return ea.next=35,(0,f.NL)(fa,{description:"Export to PNG",name:ia,extension:"png",fileHandle:Z});case 35:return ea.abrupt("return",ea.sent);case 38:if("clipboard"!==
H){ea.next=60;break}return ea.prev=39,X=(0,r._c)(W),ea.next=43,(0,p.uR)(X);case 43:ea.next=55;break;case 45:if(ea.prev=45,ea.t0=ea.catch(39),console.warn(ea.t0),"CANVAS_POSSIBLY_TOO_BIG"!==ea.t0.name){ea.next=50;break}throw ea.t0;case 50:if(!D.vU||"TypeError"!==ea.t0.name){ea.next=54;break}throw Error("".concat((0,v.t)("alerts.couldNotCopyToClipboard"),"\n\n").concat((0,v.t)("hints.firefox_clipboard_write")));case 54:throw Error((0,v.t)("alerts.couldNotCopyToClipboard"));case 55:return ea.prev=55,
W.remove(),ea.finish(55);case 58:ea.next=62;break;case 60:throw W.remove(),Error("Unsupported export type");case 62:case "end":return ea.stop()}},G,null,[[39,45,55,58]])}));return function(H,S,L,T,R){return J.apply(this,arguments)}}()},4038:function(g,h,b){function l(G,F){var O="undefined"!=typeof Symbol&&G[Symbol.iterator]||G["@@iterator"];if(!O){if(Array.isArray(G)||(O=function(Z,aa){if(Z){if("string"==typeof Z)return m(Z,aa);var W=Object.prototype.toString.call(Z).slice(8,-1);"Object"===W&&Z.constructor&&
(W=Z.constructor.name);if("Map"===W||"Set"===W)return Array.from(Z);if("Arguments"===W||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(W))return m(Z,aa)}}(G))||F&&G&&"number"==typeof G.length){O&&(G=O);var M=0;F=function(){};return{s:F,n:function(){return M>=G.length?{done:!0}:{done:!1,value:G[M++]}},e:function(Z){throw Z;},f:F}}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 I,ia=!0,
U=!1;return{s:function(){O=O.call(G)},n:function(){var Z=O.next();return ia=Z.done,Z},e:function(Z){U=!0;I=Z},f:function(){try{ia||null==O.return||O.return()}finally{if(U)throw I;}}}}function m(G,F){(null==F||F>G.length)&&(F=G.length);for(var O=0,M=Array(F);O<F;O++)M[O]=G[O];return M}b.d(h,{HT:function(){return L},I_:function(){return J},NI:function(){return T},Um:function(){return V},dS:function(){return S},n8:function(){return H},t1:function(){return R}});var p=b(6655),D=b(8950);g=b(2975);var v=
b.n(g),t=b(6282),r=b(7726),f=b(7041),E=b(5734),B=b(8165),J=function(G,F,O,M){var I=f.r8.excalidraw,ia=f.Kr.excalidraw,U=f.pb,Z="local"===M?(0,E._M)(G):(0,E.BQ)(G);F="local"===M?(0,r.s)(F):(0,r.eS)(F);if("local"===M){var aa;M={};G=l(G);try{for(G.s();!(aa=G.n()).done;){var W=aa.value;!W.isDeleted&&"fileId"in W&&W.fileId&&O[W.fileId]&&(M[W.fileId]=O[W.fileId])}}catch(fa){G.e(fa)}finally{G.f()}O=M}else O=void 0;return JSON.stringify({type:I,version:ia,source:U,elements:Z,appState:F,files:O},null,2)},
V=function(){var G=(0,D.Z)(v().mark(function ia(O,M,I){var U,Z,aa;return v().wrap(function(W){for(;;)switch(W.prev=W.next){case 0:return U=J(O,M,I,"local"),Z=new Blob([U],{type:f.LO.excalidraw}),W.next=4,(0,t.NL)(Z,{name:M.name,extension:"excalidraw",description:"Excalidraw file",fileHandle:(0,B.g8)(M.fileHandle)?null:M.fileHandle});case 4:return aa=W.sent,W.abrupt("return",{fileHandle:aa});case 6:case "end":return W.stop()}},ia)}));return function(O,M,I){return G.apply(this,arguments)}}(),H=function(){var G=
(0,D.Z)(v().mark(function I(O,M){var ia;return v().wrap(function(U){for(;;)switch(U.prev=U.next){case 0:return U.next=2,(0,t.I$)({description:"Excalidraw files"});case 2:return ia=U.sent,U.t0=B.cT,U.next=6,(0,B.gY)(ia);case 6:return U.t1=U.sent,U.t2=O,U.t3=M,U.t4=ia.handle,U.abrupt("return",(0,U.t0)(U.t1,U.t2,U.t3,U.t4));case 11:case "end":return U.stop()}},I)}));return function(O,M){return G.apply(this,arguments)}}(),S=function(G){return(null==G?void 0:G.type)===f.r8.excalidraw&&(!G.elements||Array.isArray(G.elements)&&
(!G.appState||"object"===(0,p.Z)(G.appState)))},L=function(G){return"object"===(0,p.Z)(G)&&G&&G.type===f.r8.excalidrawLibrary&&(1===G.version||2===G.version)},T=function(G){return JSON.stringify({type:f.r8.excalidrawLibrary,version:f.Kr.excalidrawLibrary,source:f.pb,libraryItems:G},null,2)},R=function(){var G=(0,D.Z)(v().mark(function M(O){var I;return v().wrap(function(ia){for(;;)switch(ia.prev=ia.next){case 0:return I=T(O),ia.next=3,(0,t.NL)(new Blob([I],{type:f.LO.excalidrawlib}),{name:"library",
extension:"excalidrawlib",description:"Excalidraw library file"});case 3:case "end":return ia.stop()}},M)}));return function(O){return G.apply(this,arguments)}}()},9605:function(g,h,b){function l(W,fa){var X=Object.keys(W);if(Object.getOwnPropertySymbols){var ea=Object.getOwnPropertySymbols(W);fa&&(ea=ea.filter(function(pa){return Object.getOwnPropertyDescriptor(W,pa).enumerable}));X.push.apply(X,ea)}return X}function m(W){for(var fa=1;fa<arguments.length;fa++){var X=null!=arguments[fa]?arguments[fa]:
{};fa%2?l(Object(X),!0).forEach(function(ea){(0,v.Z)(W,ea,X[ea])}):Object.getOwnPropertyDescriptors?Object.defineProperties(W,Object.getOwnPropertyDescriptors(X)):l(Object(X)).forEach(function(ea){Object.defineProperty(W,ea,Object.getOwnPropertyDescriptor(X,ea))})}return W}function p(W,fa){var X="undefined"!=typeof Symbol&&W[Symbol.iterator]||W["@@iterator"];if(!X){if(Array.isArray(W)||(X=function(xa,Ga){if(xa){if("string"==typeof xa)return D(xa,Ga);var Ia=Object.prototype.toString.call(xa).slice(8,
-1);"Object"===Ia&&xa.constructor&&(Ia=xa.constructor.name);if("Map"===Ia||"Set"===Ia)return Array.from(xa);if("Arguments"===Ia||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Ia))return D(xa,Ga)}}(W))||fa&&W&&"number"==typeof W.length){X&&(W=X);var ea=0;fa=function(){};return{s:fa,n:function(){return ea>=W.length?{done:!0}:{done:!1,value:W[ea++]}},e:function(xa){throw xa;},f:fa}}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 pa,va=!0,ta=!1;return{s:function(){X=X.call(W)},n:function(){var xa=X.next();return va=xa.done,xa},e:function(xa){ta=!0;pa=xa},f:function(){try{va||null==X.return||X.return()}finally{if(ta)throw pa;}}}}function D(W,fa){(null==fa||fa>W.length)&&(fa=W.length);for(var X=0,ea=Array(fa);X<fa;X++)ea[X]=W[X];return ea}b.d(h,{Di:function(){return Z},WV:function(){return U},rF:function(){return O},xS:function(){return aa},zh:function(){return ia}});var v=b(7169),t=b(8950);g=b(5169);var r=b(8821),f=b(1930),
E=b(2975),B=b.n(E),J=b(8165),V=b(7181);E=b(3607);var H=b(593),S=b(9995),L=b(8946),T=b(8557),R=b(9787),G=b(7041),F=b(1903),O=(0,E.cn)({status:"loaded",isInitialized:!0,libraryItems:[]}),M=function(W){return JSON.parse(JSON.stringify(W))},I=function(W,fa){return!W.find(function(X){return X.elements.length===fa.elements.length&&X.elements.every(function(ea,pa){return ea.id===fa.elements[pa].id&&ea.versionNonce===fa.elements[pa].versionNonce})})},ia=function(W,fa){var X,ea=[];fa=p(fa);try{for(fa.s();!(X=
fa.n()).done;){var pa=X.value;I(W,pa)&&ea.push(pa)}}catch(va){fa.e(va)}finally{fa.f()}return[].concat(ea,(0,f.Z)(W))};b=(0,g.Z)(function X(fa){var ea=this;(0,r.Z)(this,X);this.lastLibraryItems=[];this.isInitialized=!1;this.updateQueue=[];this.getLastUpdateTask=function(){return ea.updateQueue[ea.updateQueue.length-1]};this.notifyListeners=function(){if(0<ea.updateQueue.length)H.e_.set(O,{status:"loading",libraryItems:ea.lastLibraryItems,isInitialized:ea.isInitialized});else{ea.isInitialized=!0;H.e_.set(O,
{status:"loaded",libraryItems:ea.lastLibraryItems,isInitialized:ea.isInitialized});try{var pa,va;null===(pa=(va=ea.app.props).onLibraryChange)||void 0===pa||pa.call(va,M(ea.lastLibraryItems))}catch(ta){console.error(ta)}}};this.destroy=function(){ea.isInitialized=!1;ea.updateQueue=[];ea.lastLibraryItems=[];H.e_.set(F.YX,new Map)};this.resetLibrary=function(){return ea.setLibrary([])};this.getLatestLibrary=function(){return new Promise(function(){var pa=(0,t.Z)(B().mark(function xa(ta){var Ga;return B().wrap(function(Ia){for(;;)switch(Ia.prev=
Ia.next){case 0:return Ia.prev=0,Ia.next=3,ea.getLastUpdateTask()||ea.lastLibraryItems;case 3:Ga=Ia.sent;0<ea.updateQueue.length?ta(ea.getLatestLibrary()):ta(M(Ga));Ia.next=10;break;case 7:return Ia.prev=7,Ia.t0=Ia.catch(0),Ia.abrupt("return",ta(ea.lastLibraryItems));case 10:case "end":return Ia.stop()}},xa,null,[[0,7]])}));return function(ta){return pa.apply(this,arguments)}}())};this.updateLibrary=function(){var pa=(0,t.Z)(B().mark(function xa(ta){var Ga,Ia,Ya,Fa,Ka,Ba,la,ka,ua;return B().wrap(function(na){for(;;)switch(na.prev=
na.next){case 0:return Ga=ta.libraryItems,Ia=ta.prompt,Ya=void 0!==Ia&&Ia,Fa=ta.merge,Ka=void 0!==Fa&&Fa,Ba=ta.openLibraryMenu,la=void 0!==Ba&&Ba,ka=ta.defaultStatus,ua=void 0===ka?"unpublished":ka,la&&ea.app.setState({openSidebar:{name:G.Cc.name,tab:G.tf}}),na.abrupt("return",ea.setLibrary(function(){return new Promise(function(){var oa=(0,t.Z)(B().mark(function Ma(Oa,Va){var Ua,ib;return B().wrap(function(vb){for(;;)switch(vb.prev=vb.next){case 0:return vb.prev=0,vb.next=3,"function"!=typeof Ga||
Ga instanceof Blob?Ga:Ga(ea.lastLibraryItems);case 3:if(!((Ua=vb.sent)instanceof Blob)){vb.next=10;break}return vb.next=7,(0,J.lV)(Ua,ua);case 7:ib=vb.sent;vb.next=11;break;case 10:ib=(0,V.wJ)(Ua,ua);case 11:!Ya||window.confirm((0,T.t)("alerts.confirmAddLibrary",{numShapes:ib.length}))?(Ya&&ea.app.focusContainer(),Oa(Ka?ia(ea.lastLibraryItems,ib):ib)):Va(new L._);vb.next=17;break;case 14:vb.prev=14,vb.t0=vb.catch(0),Va(vb.t0);case 17:case "end":return vb.stop()}},Ma,null,[[0,14]])}));return function(Oa,
Va){return oa.apply(this,arguments)}}())}));case 3:case "end":return na.stop()}},xa)}));return function(ta){return pa.apply(this,arguments)}}();this.setLibrary=function(pa){var va=(new Promise(function(){var ta=(0,t.Z)(B().mark(function Ya(Ga,Ia){return B().wrap(function(Fa){for(;;)switch(Fa.prev=Fa.next){case 0:return Fa.prev=0,Fa.next=3,ea.getLastUpdateTask();case 3:return"function"==typeof pa&&(pa=pa(ea.lastLibraryItems)),Fa.t0=M,Fa.next=7,pa;case 7:Fa.t1=Fa.sent;ea.lastLibraryItems=(0,Fa.t0)(Fa.t1);
Ga(ea.lastLibraryItems);Fa.next=15;break;case 12:Fa.prev=12,Fa.t2=Fa.catch(0),Ia(Fa.t2);case 15:case "end":return Fa.stop()}},Ya,null,[[0,12]])}));return function(Ga,Ia){return ta.apply(this,arguments)}}())).catch(function(ta){if("AbortError"===ta.name)return console.warn("Library update aborted by user"),ea.lastLibraryItems;throw ta;}).finally(function(){ea.updateQueue=ea.updateQueue.filter(function(ta){return ta!==va});ea.notifyListeners()});return ea.updateQueue.push(va),ea.notifyListeners(),va};
this.app=fa});h.ZP=b;var U=function(fa){var X,ea=Math.ceil(Math.sqrt(fa.length)),pa=[],va=0,ta=0,xa=0,Ga=0,Ia=0,Ya=0,Fa=0,Ka=p(fa);try{var Ba=function(){var la=X.value;Ia&&0==Ia%ea&&(ta+=xa+50,va=0,Ya=0,Fa++);0===Ya&&(xa=function(Oa){return fa.slice(Oa*ea,Oa*ea+ea).reduce(function(Va,Ma){Ma=(0,S.v2)(Ma.elements).height;return Math.max(Va,Ma)},0)}(Fa));Ga=function(Oa){var Va,Ma=0,Ua=0,ib=0,vb=p(fa);try{for(vb.s();!(Va=vb.n()).done;){var yb=Va.value;if(0==Ma%ea&&(Ua=0),Ua===Oa){var Wa=(0,S.v2)(yb.elements).width;
ib=Math.max(ib,Wa)}Ma++;Ua++}}catch(hb){vb.e(hb)}finally{vb.f()}return ib}(Ya);var ka=(0,S.v2)(la.elements),ua=ka.minX,na=ka.minY,oa=(Ga-ka.width)/2,La=(xa-ka.height)/2;pa.push.apply(pa,(0,f.Z)(la.elements.map(function(Oa){return m(m({},Oa),{},{x:Oa.x+va+oa-ua,y:Oa.y+ta+La-na})})));va+=Ga+50;Ia++;Ya++};for(Ka.s();!(X=Ka.n()).done;)Ba()}catch(la){Ka.e(la)}finally{Ka.f()}return pa},Z=function(){var fa=(new URLSearchParams(window.location.hash.slice(1))).get(G.ah.addLibrary)||(new URLSearchParams(window.location.search)).get(G.UO.addLibrary),
X=fa?(new URLSearchParams(window.location.hash.slice(1))).get("token"):null;return fa?{libraryUrl:fa,idToken:X}:null},aa=function(fa){var X=fa.excalidrawAPI,ea=(0,R.useRef)(fa.getInitialLibraryItems);(0,R.useEffect)(function(){if(X){var pa=function(){var xa=(0,t.Z)(B().mark(function Ya(Ia){var Fa,Ka,Ba,la,ka,ua;return B().wrap(function(na){for(;;)switch(na.prev=na.next){case 0:return Fa=Ia.libraryUrl,Ka=Ia.idToken,Ba=new Promise(function(){var oa=(0,t.Z)(B().mark(function Ma(Oa,Va){var Ua,ib;return B().wrap(function(vb){for(;;)switch(vb.prev=
vb.next){case 0:return vb.prev=0,vb.next=3,fetch(decodeURIComponent(Fa));case 3:return Ua=vb.sent,vb.next=6,Ua.blob();case 6:ib=vb.sent;Oa(ib);vb.next=13;break;case 10:vb.prev=10,vb.t0=vb.catch(0),Va(vb.t0);case 13:case "end":return vb.stop()}},Ma,null,[[0,10]])}));return function(Oa,Va){return oa.apply(this,arguments)}}()),la=Ka!==X.id,na.next=5,la&&document.hidden?new Promise(function(oa){window.addEventListener("focus",function(){return oa()},{once:!0})}):null;case 5:return na.prev=5,na.next=8,
X.updateLibrary({libraryItems:Ba,prompt:la,merge:!0,defaultStatus:"published",openLibraryMenu:!0});case 8:na.next=13;break;case 10:throw na.prev=10,na.t0=na.catch(5),na.t0;case 13:return na.prev=13,window.location.hash.includes(G.ah.addLibrary)?((ka=new URLSearchParams(window.location.hash.slice(1))).delete(G.ah.addLibrary),window.history.replaceState({},G.iC,"#".concat(ka.toString()))):window.location.search.includes(G.UO.addLibrary)&&((ua=new URLSearchParams(window.location.search)).delete(G.UO.addLibrary),
window.history.replaceState({},G.iC,"?".concat(ua.toString()))),na.finish(13);case 16:case "end":return na.stop()}},Ya,null,[[5,10,13,16]])}));return function(Ia){return xa.apply(this,arguments)}}(),va=function(xa){xa.preventDefault();var Ga=Z();Ga&&(xa.stopImmediatePropagation(),window.history.replaceState({},"",xa.oldURL),pa(Ga))};ea.current&&X.updateLibrary({libraryItems:ea.current()});var ta=Z();return ta&&pa(ta),window.addEventListener(G.Ks.HASHCHANGE,va),function(){window.removeEventListener(G.Ks.HASHCHANGE,
va)}}},[X])}},7181:function(g,h,b){function l(X,ea){var pa="undefined"!=typeof Symbol&&X[Symbol.iterator]||X["@@iterator"];if(!pa){if(Array.isArray(X)||(pa=function(Ia,Ya){if(Ia){if("string"==typeof Ia)return m(Ia,Ya);var Fa=Object.prototype.toString.call(Ia).slice(8,-1);"Object"===Fa&&Ia.constructor&&(Fa=Ia.constructor.name);if("Map"===Fa||"Set"===Fa)return Array.from(Ia);if("Arguments"===Fa||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Fa))return m(Ia,Ya)}}(X))||ea&&X&&"number"==typeof X.length){pa&&
(X=pa);var va=0;ea=function(){};return{s:ea,n:function(){return va>=X.length?{done:!0}:{done:!1,value:X[va++]}},e:function(Ia){throw Ia;},f:ea}}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 ta,xa=!0,Ga=!1;return{s:function(){pa=pa.call(X)},n:function(){var Ia=pa.next();return xa=Ia.done,Ia},e:function(Ia){Ga=!0;ta=Ia},f:function(){try{xa||null==pa.return||pa.return()}finally{if(Ga)throw ta;
}}}}function m(X,ea){(null==ea||ea>X.length)&&(ea=X.length);for(var pa=0,va=Array(ea);pa<ea;pa++)va[pa]=X[pa];return va}function p(X,ea){var pa=Object.keys(X);if(Object.getOwnPropertySymbols){var va=Object.getOwnPropertySymbols(X);ea&&(va=va.filter(function(ta){return Object.getOwnPropertyDescriptor(X,ta).enumerable}));pa.push.apply(pa,va)}return pa}function D(X){for(var ea=1;ea<arguments.length;ea++){var pa=null!=arguments[ea]?arguments[ea]:{};ea%2?p(Object(pa),!0).forEach(function(va){(0,t.Z)(X,
va,pa[va])}):Object.getOwnPropertyDescriptors?Object.defineProperties(X,Object.getOwnPropertyDescriptors(pa)):p(Object(pa)).forEach(function(va){Object.defineProperty(X,va,Object.getOwnPropertyDescriptor(pa,va))})}return X}b.d(h,{ET:function(){return ia},lY:function(){return Z},nu:function(){return aa},wJ:function(){return fa}});var v=b(2577),t=b(7169),r=b(5734),f=b(9472),E=b(5236),B=b(7041),J=b(7726),V=b(8627),H=b(7729),S=b(7135),L=b(554),T=b(8132),R={selection:!0,text:!0,rectangle:!0,diamond:!0,
ellipse:!0,line:!0,image:!0,arrow:!0,freedraw:!0,eraser:!1,custom:!0,frame:!0,embeddable:!0,hand:!0},G=function(X){return X?D(D({},X),{},{focus:X.focus||0}):null},F=function(X,ea){var pa,va,ta,xa,Ga,Ia,Ya,Fa,Ka,Ba,la,ka,ua,na,oa={type:ea.type||X.type,version:X.version||1,versionNonce:null!==(pa=X.versionNonce)&&void 0!==pa?pa:0,isDeleted:null!==(va=X.isDeleted)&&void 0!==va&&va,id:X.id||(0,E.kb)(),fillStyle:X.fillStyle||B.HN.fillStyle,strokeWidth:X.strokeWidth||B.HN.strokeWidth,strokeStyle:null!==
(ta=X.strokeStyle)&&void 0!==ta?ta:B.HN.strokeStyle,roughness:null!==(xa=X.roughness)&&void 0!==xa?xa:B.HN.roughness,opacity:null==X.opacity?B.HN.opacity:X.opacity,angle:X.angle||0,x:null!==(Ga=null!==(Ia=ea.x)&&void 0!==Ia?Ia:X.x)&&void 0!==Ga?Ga:0,y:null!==(Ya=null!==(Fa=ea.y)&&void 0!==Fa?Fa:X.y)&&void 0!==Ya?Ya:0,strokeColor:X.strokeColor||B.HN.strokeColor,backgroundColor:X.backgroundColor||B.HN.backgroundColor,width:X.width||0,height:X.height||0,seed:null!==(Ka=X.seed)&&void 0!==Ka?Ka:1,groupIds:null!==
(Ba=X.groupIds)&&void 0!==Ba?Ba:[],frameId:null!==(la=X.frameId)&&void 0!==la?la:null,roundness:X.roundness?X.roundness:"round"===X.strokeSharpness?{type:(0,f.QI)(X.type)?B.a6.LEGACY:B.a6.PROPORTIONAL_RADIUS}:null,boundElements:X.boundElementIds?X.boundElementIds.map(function(La){return{type:"arrow",id:La}}):null!==(ka=X.boundElements)&&void 0!==ka?ka:[],updated:null!==(ua=X.updated)&&void 0!==ua?ua:(0,S.C3)(),link:X.link?(0,T.$u)(X.link):null,locked:null!==(na=X.locked)&&void 0!==na&&na};return"customData"in
X&&(oa.customData=X.customData),B.WR in X&&(oa[B.WR]=X[B.WR]),D(D(D({},oa),(0,r.Qp)(oa)),ea)},O=function(X,ea){if(X.boundElements){var pa=X.boundElements.slice(),va=new Set;X.boundElements=pa.reduce(function(ta,xa){var Ga=ea.get(xa.id);if(Ga&&!va.has(xa.id)){if(va.add(xa.id),Ga.isDeleted)return ta;ta.push(xa);(0,f.iB)(Ga)&&!Ga.containerId&&(Ga.containerId=X.id)}return ta},[])}},M=function(X,ea){if(ea=X.containerId?ea.get(X.containerId):null){if(!X.isDeleted&&ea.boundElements&&!ea.boundElements.find(function(va){return va.id===
X.id})){var pa=(ea.boundElements||(ea.boundElements=[])).slice();pa.push({type:"text",id:X.id});ea.boundElements=pa}}else X.containerId=null},I=function(X,ea){X.frameId&&(ea.get(X.frameId)||(X.frameId=null))},ia=function(X,ea,pa){var va=new Set,ta=ea?(0,S.xn)(ea):null;X=(X||[]).reduce(function(Ya,Fa){if("selection"!==Fa.type&&!(0,r.QD)(Fa)){var Ka=function(Ba){var la,ka,ua=1<arguments.length&&void 0!==arguments[1]&&arguments[1];switch(Ba.type){case "text":var na=Ba.fontSize;var oa=Ba.fontFamily;"font"in
Ba&&(na=Ba.font.split(" "),na=(0,v.Z)(na,2),oa=na[1],na=parseFloat(na[0]),oa=Object.keys(B.ut).includes(oa)?B.ut[oa]:B.rk);var La=null!==(la=Ba.text)&&void 0!==la?la:"";la=Ba.lineHeight||(Ba.height?(0,L.$2)(Ba):(0,L.PT)(Ba.fontFamily));var Oa=(0,L.R8)(Ba.text,(0,S.mO)(Ba),la);return Ba=F(Ba,{fontSize:na,fontFamily:oa,text:La,textAlign:Ba.textAlign||B.Hg,verticalAlign:Ba.verticalAlign||B.hs,containerId:null!==(ka=Ba.containerId)&&void 0!==ka?ka:null,originalText:Ba.originalText||La,lineHeight:la,baseline:Oa}),
ua&&(Ba=D(D({},Ba),(0,r.JZ)(Ba))),Ba;case "freedraw":return F(Ba,{points:Ba.points,lastCommittedPoint:null,simulatePressure:Ba.simulatePressure,pressures:Ba.pressures});case "image":return F(Ba,{status:Ba.status||"pending",fileId:Ba.fileId,scale:Ba.scale||[1,1]});case "line":case "draw":case "arrow":ua=Ba;ka=ua.startArrowhead;ka=void 0===ka?null:ka;ua=ua.endArrowhead;ua=void 0===ua?"arrow"===Ba.type?"arrow":null:ua;la=Ba.x;oa=Ba.y;na=!Array.isArray(Ba.points)||2>Ba.points.length?[[0,0],[Ba.width,
Ba.height]]:Ba.points;if(0!==na[0][0]||0!==na[0][1])oa=V._.getNormalizedPoints(Ba),na=oa.points,la=oa.x,oa=oa.y;return F(Ba,{type:"draw"===Ba.type?"line":Ba.type,startBinding:G(Ba.startBinding),endBinding:G(Ba.endBinding),lastCommittedPoint:null,startArrowhead:ka,endArrowhead:ua,points:na,x:la,y:oa});case "ellipse":case "rectangle":case "diamond":return F(Ba,{});case "embeddable":return F(Ba,{validated:null});case "frame":return F(Ba,{name:null!==(na=Ba.name)&&void 0!==na?na:null})}}(Fa,null==pa?
void 0:pa.refreshDimensions);Ka&&((Fa=null==ta?void 0:ta.get(Fa.id))&&Fa.version>Ka.version&&(Ka=(0,H.ZP)(Ka,Fa.version)),va.has(Ka.id)&&(Ka=D(D({},Ka),{},{id:(0,E.kb)()})),va.add(Ka.id),Ya.push(Ka))}return Ya},[]);if(null==pa||!pa.repairBindings)return X;var xa;ea=(0,S.xn)(X);var Ga=l(X);try{for(Ga.s();!(xa=Ga.n()).done;){var Ia=xa.value;Ia.frameId&&I(Ia,ea);(0,f.iB)(Ia)&&Ia.containerId?M(Ia,ea):Ia.boundElements&&O(Ia,ea)}}catch(Ya){Ga.e(Ya)}finally{Ga.f()}return X},U={isSidebarDocked:function(X,
ea){var pa;null!==(pa=X.isSidebarDocked)&&void 0!==pa?ea=pa:(X=X.defaultSidebarDockedPreference,ea=void 0!==X?X:ea.defaultSidebarDockedPreference);return["defaultSidebarDockedPreference",ea]}},Z=function(X,ea){var pa,va,ta,xa;X=X||{};for(var Ga=(0,J.im)(),Ia={},Ya=0,Fa=Object.keys(U);Ya<Fa.length;Ya++){var Ka=Fa[Ya];Ka in X&&(Ka=U[Ka](X,Ga),Ka=(0,v.Z)(Ka,2),Ia[Ka[0]]=Ka[1])}Ya=0;for(Fa=Object.entries(Ga);Ya<Fa.length;Ya++){var Ba=(0,v.Z)(Fa[Ya],2);Ka=Ba[0];Ba=Ba[1];var la=X[Ka],ka=ea?ea[Ka]:void 0;
Ia[Ka]=void 0!==la?la:void 0!==ka?ka:Ba}return D(D({},Ia),{},{cursorButton:(null==ea?void 0:ea.cursorButton)||"up",penDetected:null!==(pa=null==ea?void 0:ea.penDetected)&&void 0!==pa?pa:!!X.penMode&&null!==(va=X.penDetected)&&void 0!==va&&va,activeTool:D(D({},(0,S.Om)(Ga,Ia.activeTool.type&&R[Ia.activeTool.type]?Ia.activeTool:{type:"selection"})),{},{lastActiveTool:null,locked:null!==(ta=Ia.activeTool.locked)&&void 0!==ta&&ta}),zoom:"number"==typeof X.zoom?{value:X.zoom}:null!==(xa=X.zoom)&&void 0!==
xa&&xa.value?X.zoom:Ga.zoom,openSidebar:"string"==typeof X.openSidebar?{name:B.Cc.name}:Ia.openSidebar})},aa=function(X,ea,pa,va){return{elements:ia(null==X?void 0:X.elements,pa,va),appState:Z(null==X?void 0:X.appState,ea||null),files:(null==X?void 0:X.files)||{}}},W=function(X){var ea=ia((0,r.Lm)(X.elements),null);return ea.length?D(D({},X),{},{elements:ea}):null},fa=function(){var X,ea=1<arguments.length?arguments[1]:void 0,pa=[],va=l(0<arguments.length&&void 0!==arguments[0]?arguments[0]:[]);try{for(va.s();!(X=
va.n()).done;){var ta=X.value;if(Array.isArray(ta)){var xa=W({status:ea,elements:ta,id:(0,E.kb)(),created:Date.now()});xa&&pa.push(xa)}else{var Ga=ta,Ia=W(D(D({},Ga),{},{id:Ga.id||(0,E.kb)(),status:Ga.status||ea,created:Ga.created||Date.now()}));Ia&&pa.push(Ia)}}}catch(Ya){va.e(Ya)}finally{va.f()}return pa}},6419:function(g,h,b){function l(R,G){var F="undefined"!=typeof Symbol&&R[Symbol.iterator]||R["@@iterator"];if(!F){if(Array.isArray(R)||(F=function(U,Z){if(U){if("string"==typeof U)return m(U,
Z);var aa=Object.prototype.toString.call(U).slice(8,-1);"Object"===aa&&U.constructor&&(aa=U.constructor.name);if("Map"===aa||"Set"===aa)return Array.from(U);if("Arguments"===aa||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(aa))return m(U,Z)}}(R))||G&&R&&"number"==typeof R.length){F&&(R=F);var O=0;G=function(){};return{s:G,n:function(){return O>=R.length?{done:!0}:{done:!1,value:R[O++]}},e:function(U){throw U;},f:G}}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 M,I=!0,ia=!1;return{s:function(){F=F.call(R)},n:function(){var U=F.next();return I=U.done,U},e:function(U){ia=!0;M=U},f:function(){try{I||null==F.return||F.return()}finally{if(ia)throw M;}}}}function m(R,G){(null==G||G>R.length)&&(G=R.length);for(var F=0,O=Array(G);F<G;F++)O[F]=R[F];return O}function p(R,G){var F=Object.keys(R);if(Object.getOwnPropertySymbols){var O=Object.getOwnPropertySymbols(R);G&&(O=O.filter(function(M){return Object.getOwnPropertyDescriptor(R,M).enumerable}));F.push.apply(F,
O)}return F}function D(R){for(var G=1;G<arguments.length;G++){var F=null!=arguments[G]?arguments[G]:{};G%2?p(Object(F),!0).forEach(function(O){(0,r.Z)(R,O,F[O])}):Object.getOwnPropertyDescriptors?Object.defineProperties(R,Object.getOwnPropertyDescriptors(F)):p(Object(F)).forEach(function(O){Object.defineProperty(R,O,Object.getOwnPropertyDescriptor(F,O))})}return R}b.d(h,{w:function(){return T}});var v=b(2577);g=b(5169);var t=b(8821),r=b(7169),f=b(7041),E=b(5734),B=b(7267),J=b(1829),V=b(554),H=b(7135),
S=function(R,G,F,O){if(Object.assign(R,{startBinding:(null==R?void 0:R.startBinding)||null,endBinding:R.endBinding||null}),G){var M,I,ia,U=null!==(M=null==G?void 0:G.width)&&void 0!==M?M:100;M=null!==(I=null==G?void 0:G.height)&&void 0!==I?I:100;G.id&&((ia=O.getElement(G.id))||console.error("No element for start binding with id ".concat(G.id," found")));I=G.x||R.x-U;var Z=G.y||R.y-M/2,aa=ia?ia.type:G.type;if(aa){if("text"===aa){var W="";ia&&"text"===ia.type?W=ia.text:"text"===G.type&&(W=G.text);W||
console.error("No text found for start binding text element for ".concat(R.id));W=(0,J.VL)(D(D(D({x:I,y:Z,type:"text"},ia),G),{},{text:W}));Object.assign(W,{x:G.x||R.x-W.width,y:G.y||R.y-W.height/2})}else switch(aa){case "rectangle":case "ellipse":case "diamond":W=(0,E.Up)(D(D(D({x:I,y:Z,width:U,height:M},ia),G),{},{type:aa}));break;default:(0,H.vE)(R,'Unhandled element start type "'.concat(G.type,'"'),!0)}(0,B.UZ)(R,W,"start")}}if(F){var fa,X,ea;G=null!==(fa=null==F?void 0:F.height)&&void 0!==fa?
fa:100;fa=null!==(X=null==F?void 0:F.width)&&void 0!==X?X:100;F.id&&((ea=O.getElement(F.id))||console.error("No element for end binding with id ".concat(F.id," found")));O=F.x||R.x+R.width;X=F.y||R.y-G/2;if(ia=ea?ea.type:F.type){if("text"===ia){var pa="";ea&&"text"===ea.type?pa=ea.text:"text"===F.type&&(pa=F.text);pa||console.error("No text found for end binding text element for ".concat(R.id));pa=(0,J.VL)(D(D(D({x:O,y:X,type:"text"},ea),F),{},{text:pa}));Object.assign(pa,{y:F.y||R.y-pa.height/2})}else switch(ia){case "rectangle":case "ellipse":case "diamond":pa=
(0,E.Up)(D(D(D({x:O,y:X,width:fa,height:G},ea),F),{},{type:ia}));break;default:(0,H.vE)(R,'Unhandled element end type "'.concat(ia,'"'),!0)}(0,B.UZ)(R,pa,"end")}}return{linearElement:R,startBoundElement:W,endBoundElement:pa}},L=(0,g.Z)(function G(){var F=this;(0,t.Z)(this,G);this.excalidrawElements=new Map;this.add=function(O){O&&F.excalidrawElements.set(O.id,O)};this.getElements=function(){return Array.from(F.excalidrawElements.values())};this.getElement=function(O){return F.excalidrawElements.get(O)}}),
T=function(G){if(!G)return[];var F,O=new L,M=new Map;G=l(G);try{for(G.s();!(F=G.n()).done;){var I=F.value,ia=void 0;switch(I.type){case "rectangle":case "ellipse":case "diamond":var U,Z,aa=null!=I&&null!==(U=I.label)&&void 0!==U&&U.text&&void 0===I.width?0:(null==I?void 0:I.width)||100,W=null!=I&&null!==(Z=I.label)&&void 0!==Z&&Z.text&&void 0===I.height?0:(null==I?void 0:I.height)||100;ia=(0,E.Up)(D(D({},I),{},{width:aa,height:W}));break;case "line":var fa=I.width||300,X=I.height||0;ia=(0,E.y8)(D({width:fa,
height:X,points:[[0,0],[fa,X]]},I));break;case "arrow":var ea=I.width||300,pa=I.height||0;ia=(0,E.y8)(D({width:ea,height:pa,endArrowhead:"arrow",points:[[0,0],[ea,pa]]},I));break;case "text":var va,ta=(null==I?void 0:I.fontFamily)||f.rk,xa=(null==I?void 0:I.fontSize)||f.n5,Ga=(null==I?void 0:I.lineHeight)||(0,V.PT)(ta),Ia=null!==(va=I.text)&&void 0!==va?va:"",Ya=(0,V.bG)(Ia),Fa=(0,V.X1)(Ya,(0,H.mO)({fontFamily:ta,fontSize:xa}),Ga);ia=(0,J.VL)(D({width:Fa.width,height:Fa.height,fontFamily:ta,fontSize:xa},
I));break;case "image":ia=(0,J.vw)(D({width:(null==I?void 0:I.width)||100,height:(null==I?void 0:I.height)||100},I));break;case "freedraw":case "frame":case "embeddable":ia=I;break;default:ia=I,(0,H.vE)(I,'Unhandled element type "'.concat(I.type,'"'),!0)}O.getElement(ia.id)?console.error("Duplicate id found for ".concat(ia.id)):(O.add(ia),M.set(ia.id,I))}}catch(Qa){G.e(Qa)}finally{G.f()}var Ka;F=l(M);try{for(F.s();!(Ka=F.n()).done;){var Ba=(0,v.Z)(Ka.value,2),la=Ba[1],ka=O.getElement(Ba[0]);switch(la.type){case "rectangle":case "ellipse":case "diamond":case "arrow":var ua;
if(null!==(ua=la.label)&&void 0!==ua&&ua.text){M=ka;var na=null==la?void 0:la.label,oa=(0,J.VL)(D(D({x:0,y:0,textAlign:f.I8.CENTER,verticalAlign:f.oX.MIDDLE},na),{},{containerId:M.id,strokeColor:na.strokeColor||M.strokeColor}));var La=(Object.assign(M,{boundElements:(M.boundElements||[]).concat({type:"text",id:oa.id})}),(0,E.oN)(oa,M),[M,oa]);var Oa=(0,v.Z)(La,2),Va=Oa[0],Ma=Oa[1];if(O.add(Va),O.add(Ma),"arrow"===Va.type){var Ua=S(Va,"arrow"===la.type?null==la?void 0:la.start:void 0,"arrow"===la.type?
null==la?void 0:la.end:void 0,O),ib=Ua.linearElement,vb=Ua.startBoundElement,yb=Ua.endBoundElement;Va=ib;O.add(ib);O.add(vb);O.add(yb)}}else if("arrow"===la.type){var Wa=S(ka,la.start,la.end,O),hb=Wa.startBoundElement,ab=Wa.endBoundElement;O.add(Wa.linearElement);O.add(hb);O.add(ab)}}}}catch(Qa){F.e(Qa)}finally{F.f()}return O.getElements()}},8132:function(g,h,b){b.d(h,{$u:function(){return m},q$:function(){return p},ye:function(){return D}});var l=b(5779),m=function(v){return(v=v.trim())?(0,l.N)(v):
v},p=function(v){return!!(null!=v&&v.includes(location.origin)||null!=v&&v.startsWith("/"))},D=function(v){if((v=m(v)).startsWith("/"))return"".concat(location.origin).concat(v);try{new URL(v)}catch(t){return"about:blank"}return v}},6289:function(g,h,b){function l(Va,Ma){var Ua=Object.keys(Va);if(Object.getOwnPropertySymbols){var ib=Object.getOwnPropertySymbols(Va);Ma&&(ib=ib.filter(function(vb){return Object.getOwnPropertyDescriptor(Va,vb).enumerable}));Ua.push.apply(Ua,ib)}return Ua}function m(Va){for(var Ma=
1;Ma<arguments.length;Ma++){var Ua=null!=arguments[Ma]?arguments[Ma]:{};Ma%2?l(Object(Ua),!0).forEach(function(ib){(0,p.Z)(Va,ib,Ua[ib])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Va,Object.getOwnPropertyDescriptors(Ua)):l(Object(Ua)).forEach(function(ib){Object.defineProperty(Va,ib,Object.getOwnPropertyDescriptor(Ua,ib))})}return Va}b.d(h,{rj:function(){return xa},nW:function(){return Ya},nz:function(){return Ka},sw:function(){return la},lV:function(){return La},Ni:function(){return ua},
wq:function(){return ka},Pp:function(){return oa}});var p=b(7169),D=b(2577),v=b(7135),t=b(5434),r=b(7729);g=b(9610);var f=b(4289),E=b(1119),B=b(8557),J=b(9787),V=b(45),H=b(6331),S=b(6829),L=b(3795),T=b(7041),R=b(3440),G=b(9547),F=b(4238),O=b(5734),M=b(8132);h=b(3379);h=b.n(h);var I=b(7795);I=b.n(I);var ia=b(569);ia=b.n(ia);var U=b(3565);U=b.n(U);var Z=b(9216);Z=b.n(Z);var aa=b(4589);aa=b.n(aa);var W=b(5260),fa={};fa.styleTagTransform=aa();fa.setAttributes=U();fa.insert=ia().bind(null,"head");fa.domAPI=
I();fa.insertStyleElement=Z();h()(W.Z,fa);W.Z&&W.Z.locals&&W.Z.locals;var X=b(5435),ea=b(3470),pa=b(9472),va=b(5475),ta=b(4512),xa=document.createElement("img");xa.src="data:".concat(T.LO.svg,", ").concat(encodeURIComponent('\x3csvg xmlns\x3d"http://www.w3.org/2000/svg" width\x3d"16" height\x3d"16" viewBox\x3d"0 0 24 24" fill\x3d"none" stroke\x3d"#1971c2" stroke-width\x3d"2" stroke-linecap\x3d"round" stroke-linejoin\x3d"round" class\x3d"feather feather-external-link"\x3e\x3cpath d\x3d"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"\x3e\x3c/path\x3e\x3cpolyline points\x3d"15 3 21 3 21 9"\x3e\x3c/polyline\x3e\x3cline x1\x3d"10" y1\x3d"14" x2\x3d"21" y2\x3d"3"\x3e\x3c/line\x3e\x3c/svg\x3e'));
var Ga=!1,Ia=new Map,Ya=function(Va){var Ma=Va.element,Ua=Va.setAppState,ib=Va.onLinkOpen,vb=Va.setToast,yb=(0,ea.gF)(),Wa=(0,ea.hY)();Va=Ma.link||"";var hb=(0,J.useState)(Va),ab=(0,D.Z)(hb,2);hb=ab[0];var Qa=ab[1],bb=(0,J.useRef)(null),Pa="editor"===yb.showHyperlinkPopup,Lb=(0,J.useCallback)(function(){if(bb.current){var pc=(0,M.$u)(bb.current.value)||null;if(!Ma.link&&pc&&(0,X.L)("hyperlink","create"),(0,pa.gs)(Ma)){var Cc;if((null===(Cc=yb.activeEmbeddable)||void 0===Cc?void 0:Cc.element)===Ma&&
Ua({activeEmbeddable:null}),!pc)return void(0,r.DR)(Ma,{validated:!1,link:null});if((0,t.xm)(pc,Wa.validateEmbeddable)){Cc=Ma.width;var bd=Ma.height,dc=(0,t.LM)(pc);null!=dc&&dc.warning&&vb({message:dc.warning,closable:!0});var Nc=dc?dc.aspectRatio.w/dc.aspectRatio.h:1,Qc=Ia.get(Ma.id)!==Ma.link;(0,r.DR)(Ma,m(m({},Qc?{width:"video"===(null==dc?void 0:dc.type)?Cc>bd?Cc:bd*Nc:Cc,height:"video"===(null==dc?void 0:dc.type)&&Cc>bd?Cc/Nc:bd}:{}),{},{validated:!0,link:pc}));va.R.delete(Ma);Ia.has(Ma.id)&&
Ia.delete(Ma.id)}else pc&&vb({message:(0,B.t)("toast.unableToEmbed"),closable:!0}),Ma.link&&Ia.set(Ma.id,Ma.link),(0,r.DR)(Ma,{validated:!1,link:pc}),va.R.delete(Ma)}else(0,r.DR)(Ma,{link:pc})}},[Ma,vb,Wa.validateEmbeddable,yb.activeEmbeddable,Ua]);(0,J.useLayoutEffect)(function(){return function(){Lb()}},[Lb]);(0,J.useEffect)(function(){var pc=null,Cc=function(bd){Pa||(pc&&clearTimeout(pc),Oa(Ma,yb,[bd.clientX,bd.clientY])&&(pc=window.setTimeout(function(){Ua({showHyperlinkPopup:!1})},500)))};return window.addEventListener(T.Ks.POINTER_MOVE,
Cc,!1),function(){window.removeEventListener(T.Ks.POINTER_MOVE,Cc,!1);pc&&clearTimeout(pc)}},[yb,Ma,Pa,Ua]);ab=(0,J.useCallback)(function(){(0,X.L)("hyperlink","delete");(0,r.DR)(Ma,{link:null});Pa&&(bb.current.value="");Ua({showHyperlinkPopup:!1})},[Ua,Ma,Pa]);var xc=Fa(Ma,yb),oc=xc.x;xc=xc.y;return yb.draggingElement||yb.resizingElement||yb.isRotating||yb.openMenu||yb.viewModeEnabled?null:(0,ta.jsxs)("div",{className:"excalidraw-hyperlinkContainer",style:{top:"".concat(xc,"px"),left:"".concat(oc,
"px"),width:320,padding:5},onClick:function(){Ma.link||Pa||Ua({showHyperlinkPopup:"editor"})},children:[Pa?(0,ta.jsx)("input",{className:(0,V.Z)("excalidraw-hyperlinkContainer-input"),placeholder:"Type or paste your link here",ref:bb,value:hb,onChange:function(pc){return Qa(pc.target.value)},autoFocus:!0,onKeyDown:function(pc){pc.stopPropagation();pc[H.tW.CTRL_OR_CMD]&&pc.key===H.tW.K&&pc.preventDefault();pc.key!==H.tW.ENTER&&pc.key!==H.tW.ESCAPE||(Lb(),Ua({showHyperlinkPopup:"info"}))}}):Ma.link?
(0,ta.jsx)("a",{href:(0,M.$u)(Ma.link||""),className:"excalidraw-hyperlinkContainer-link",target:(0,M.q$)(Ma.link)?"_self":"_blank",onClick:function(pc){if(Ma.link&&ib){var Cc=(0,v.ag)(T.Ks.EXCALIDRAW_LINK,pc.nativeEvent);ib(m(m({},Ma),{},{link:(0,M.$u)(Ma.link)}),Cc);Cc.defaultPrevented&&pc.preventDefault()}},rel:"noopener noreferrer",children:Ma.link}):(0,ta.jsx)("div",{className:"excalidraw-hyperlinkContainer-link",children:(0,B.t)("labels.link.empty")}),(0,ta.jsxs)("div",{className:"excalidraw-hyperlinkContainer__buttons",
children:[!Pa&&(0,ta.jsx)(f.V,{type:"button",title:(0,B.t)("buttons.edit"),"aria-label":(0,B.t)("buttons.edit"),label:(0,B.t)("buttons.edit"),onClick:function(){(0,X.L)("hyperlink","edit","popup-ui");Ua({showHyperlinkPopup:"editor"})},className:"excalidraw-hyperlinkContainer--edit",icon:E.Pm}),Va&&!(0,pa.gs)(Ma)&&(0,ta.jsx)(f.V,{type:"button",title:(0,B.t)("buttons.remove"),"aria-label":(0,B.t)("buttons.remove"),label:(0,B.t)("buttons.remove"),onClick:ab,className:"excalidraw-hyperlinkContainer--remove",
icon:E.XH})]})]})},Fa=function(Va,Ma){var Ua=(0,O.qf)(Va);Ua=(0,D.Z)(Ua,2);Va=(0,v._i)({sceneX:Ua[0]+Va.width/2,sceneY:Ua[1]},Ma);return{x:Va.x-Ma.offsetLeft-160,y:Va.y-Ma.offsetTop-85}},Ka=(0,g.z)({name:"hyperlink",perform:function(Va,Ma){return"editor"!==Ma.showHyperlinkPopup&&{elements:Va,appState:m(m({},Ma),{},{showHyperlinkPopup:"editor",openMenu:null}),commitToHistory:!0}},trackEvent:{category:"hyperlink",action:"click"},keyTest:function(Va){return Va[H.tW.CTRL_OR_CMD]&&Va.key===H.tW.K},contextItemLabel:function(Va,
Ma){return Ba(Va,Ma)},predicate:function(Va,Ma){return 1===(0,G.eD)(Va,Ma).length},PanelComponent:function(Va){var Ma=Va.elements,Ua=Va.appState,ib=Va.updateData;Va=(0,G.eD)(Ma,Ua);return(0,ta.jsx)(f.V,{type:"button",icon:E.xP,"aria-label":(0,B.t)(Ba(Ma,Ua)),title:"".concat((0,pa.gs)(Ma[0])?(0,B.t)("labels.link.labelEmbed"):(0,B.t)("labels.link.label")," - ").concat((0,v.uY)("CtrlOrCmd+K")),onClick:function(){return ib(null)},selected:1===Va.length&&!!Va[0].link})}}),Ba=function(Va,Ma){Va=(0,G.eD)(Va,
Ma);return Va[0].link?(0,pa.gs)(Va[0])?"labels.link.editEmbed":"labels.link.edit":(0,pa.gs)(Va[0])?"labels.link.createEmbed":"labels.link.create"},la=function(Va,Ma,Ua){var ib=(0,D.Z)(Va,4),vb=ib[1],yb=ib[2],Wa=S.Dn;Va=Wa/Ua.zoom.value;var hb=Wa/Ua.zoom.value,ab=(Wa-8)/(2*Ua.zoom.value),Qa=4/Ua.zoom.value;Ma=(0,L.U1)(yb+Qa-ab+Va/2,vb-Qa-Wa/Ua.zoom.value+ab+hb/2,(ib[0]+yb)/2,(vb+ib[3])/2,Ma);Ma=(0,D.Z)(Ma,2);return[Ma[0]-Va/2,Ma[1]-hb/2,Va,hb]},ka=function(Va,Ma,Ua){var ib=(0,D.Z)(Ua,2);Ua=ib[0];ib=
ib[1];var vb=4/Ma.zoom.value,yb=(0,O.qf)(Va);yb=(0,D.Z)(yb,4);Va=la([yb[0],yb[1],yb[2],yb[3]],Va.angle,Ma);var Wa=(0,D.Z)(Va,4);Va=Wa[0];Ma=Wa[1];yb=Wa[2];Wa=Wa[3];return Ua>Va-vb&&Ua<Va+vb+yb&&ib>Ma-vb&&ib<Ma+Wa+vb},ua=function(Va,Ma,Ua,ib){var vb=(0,D.Z)(Ua,2);Ua=vb[0];vb=vb[1];if(!Va.link||Ma.selectedElementIds[Va.id])return!1;var yb=4/Ma.zoom.value;return!(ib||!Ma.viewModeEnabled||!(0,F.pX)(Va,[Ua,vb],yb,null))||ka(Va,Ma,[Ua,vb])},na=null,oa=function(Va,Ma){na&&clearTimeout(na);na=window.setTimeout(function(){if(Va.link){var Ua=
(0,R.bK)();Ua.classList.add("excalidraw-tooltip--visible");Ua.style.maxWidth="20rem";Ua.textContent=Va.link;var ib=(0,O.qf)(Va);ib=(0,D.Z)(ib,4);ib=la([ib[0],ib[1],ib[2],ib[3]],Va.angle,Ma);var vb=(0,D.Z)(ib,4);ib=vb[2];var yb=vb[3];vb=(0,v._i)({sceneX:vb[0],sceneY:vb[1]},Ma);(0,R.Js)(Ua,{left:vb.x,top:vb.y,width:ib,height:yb},"top");(0,X.L)("hyperlink","tooltip","link-icon");Ga=!0}},T.sA)},La=function(){na&&clearTimeout(na);Ga&&(Ga=!1,(0,R.bK)().classList.remove("excalidraw-tooltip--visible"))},
Oa=function(Va,Ma,Ua){var ib=(0,D.Z)(Ua,2);Ua=ib[0];ib=ib[1];var vb=(0,v.dE)({clientX:Ua,clientY:ib},Ma),yb=vb.x,Wa=vb.y;vb=15/Ma.zoom.value;if((0,F.pX)(Va,[yb,Wa],vb,null))return!1;var hb=(0,O.qf)(Va);hb=(0,D.Z)(hb,3);var ab=hb[1],Qa=hb[2];if(yb>=hb[0]&&yb<=Qa&&Wa>=ab-85&&Wa<=ab)return!1;Ma=Fa(Va,Ma);Va=Ma.x;Ma=Ma.y;return!(Ua>=Va-vb&&Ua<=Va+320+10+vb&&ib>=Ma-vb&&ib<=Ma+vb+10+42)}},7267:function(g,h,b){function l(la,ka){var ua=Object.keys(la);if(Object.getOwnPropertySymbols){var na=Object.getOwnPropertySymbols(la);
ka&&(na=na.filter(function(oa){return Object.getOwnPropertyDescriptor(la,oa).enumerable}));ua.push.apply(ua,na)}return ua}b.d(h,{$q:function(){return Fa},DK:function(){return ia},H:function(){return U},HG:function(){return T},N1:function(){return S},R:function(){return O},UZ:function(){return M},Ww:function(){return W},Y9:function(){return Z},ZB:function(){return pa},cz:function(){return H},ek:function(){return Ia},el:function(){return G}});var m=b(7169),p=b(2577),D=b(9547),v=b(9472),t=b(4238),r=
b(7729),f=b(3223),E=b(8627),B=b(7135),J=b(6331),V=b(554),H=function(la){return!la[J.tW.CTRL_OR_CMD]},S=function(la){return la.isBindingEnabled},L=function(la,ka){var ua=[];return ka.forEach(function(na){na=la.getNonDeletedElement(na);null!=na&&ua.push(na)}),ua},T=function(la,ka,ua){var na=new Set,oa=new Set;R(la,ka,ua,"start",na,oa);R(la,ua,ka,"end",na,oa);ka=Array.from(oa).filter(function(La){return!na.has(La)});L(f.Z.getScene(la),ka).forEach(function(La){var Oa;(0,r.DR)(La,{boundElements:null===
(Oa=La.boundElements)||void 0===Oa?void 0:Oa.filter(function(Va){return"arrow"!==Va.type||Va.id!==la.id})})})},R=function(la,ka,ua,na,oa,La){"keep"!==ka&&(null!=ka?null!=ua&&("keep"===ua?I(la,ka,na):"start"!==na&&ua.id===ka.id)||(M(la,ka,na),oa.add(ka.id)):(ka="start"===na?"startBinding":"endBinding",ua=la[ka],la=null==ua?null:((0,r.DR)(la,(0,m.Z)({},ka,null)),ua.elementId),null!=la&&La.add(la)))},G=function(la){la.forEach(function(ka){(0,v.Mn)(ka)?T(ka,ta(ka,"start"),ta(ka,"end")):(0,v.f0)(ka)&&
F(ka)})},F=function(la){xa(la).forEach(function(ka){ka=(0,p.Z)(ka,2);var ua=ka[1];return T(ka[0],"end"===ua?"keep":la,"start"===ua?"keep":la)})},O=function(la,ka,ua,na){null!=ka.startBoundElement&&M(la,ka.startBoundElement,"start");ka=Z(na,ua);null==ka||I(la,ka,"end")||M(la,ka,"end")},M=function(la,ka,ua){(0,r.DR)(la,(0,m.Z)({},"start"===ua?"startBinding":"endBinding",function(na){for(var oa=1;oa<arguments.length;oa++){var La=null!=arguments[oa]?arguments[oa]:{};oa%2?l(Object(La),!0).forEach(function(Oa){(0,m.Z)(na,
Oa,La[Oa])}):Object.getOwnPropertyDescriptors?Object.defineProperties(na,Object.getOwnPropertyDescriptors(La)):l(Object(La)).forEach(function(Oa){Object.defineProperty(na,Oa,Object.getOwnPropertyDescriptor(La,Oa))})}return na}({elementId:ka.id},aa(la,ka,ua))));(0,B.xn)(ka.boundElements||[]).has(la.id)||(0,r.DR)(ka,{boundElements:(ka.boundElements||[]).concat({id:la.id,type:"arrow"})})},I=function(la,ka,ua){ua=la["start"===ua?"endBinding":"startBinding"];return ia(la,null==ua?void 0:ua.elementId,ka)},
ia=function(la,ka,ua){return ka===ua.id&&3>la.points.length},U=function(la){la.forEach(function(ka){(0,v.Mn)(ka)&&T(ka,null,null)})},Z=function(la,ka){return(0,D.QG)(ka.getNonDeletedElements(),function(ua){return(0,v.f0)(ua,!1)&&(0,t.uu)(ua,la)})},aa=function(la,ka,ua){var na="start"===ua?-1:1;ua=-1===na?0:la.points.length-1;na=ua-na;ua=E._.getPointAtIndexGlobalCoordinates(la,ua);la=E._.getPointAtIndexGlobalCoordinates(la,na);return{focus:(0,t.T_)(ka,la,ua),gap:Math.max(1,(0,t.oT)(ka,ua))}},W=function(la,
ka){var ua,na=(null!==(ua=la.boundElements)&&void 0!==ua?ua:[]).filter(function(Oa){return"arrow"===Oa.type});if(0!==na.length){ka=null!=ka?ka:{};var oa=ka.newSize,La=fa(ka.simultaneouslyUpdated);L(f.Z.getScene(la),na.map(function(Oa){return Oa.id})).forEach(function(Oa){if((0,v.bt)(Oa)){var Va,Ma;if((null===(Va=Oa.startBinding)||void 0===Va?void 0:Va.elementId)===la.id||(null===(Ma=Oa.endBinding)||void 0===Ma?void 0:Ma.elementId)===la.id)Va=ea(la,Oa.startBinding,oa),Ma=ea(la,Oa.endBinding,oa),La.has(Oa.id)?
(0,r.DR)(Oa,{startBinding:Va,endBinding:Ma}):(X(Oa,"start",Va,la),X(Oa,"end",Ma,la),(0,V.WJ)(Oa)&&(0,V.RB)(Oa,!1))}})}},fa=function(la){return new Set((la||[]).map(function(ka){return ka.id}))},X=function(la,ka,ua,na){if(!(null==ua||ua.elementId!==na.id&&2<la.points.length)){var oa=f.Z.getScene(la).getElement(ua.elementId);if(null!=oa){var La="start"===ka?-1:1;na=-1===La?0:la.points.length-1;var Oa=E._.getPointAtIndexGlobalCoordinates(la,na-La);La=(0,t.j_)(oa,ua.focus,Oa);0===ua.gap?oa=La:(oa=(0,t.MZ)(oa,
Oa,La,ua.gap),oa=0===oa.length?La:oa[0]);E._.movePoints(la,[{index:na,point:E._.pointFromAbsoluteCoords(la,oa)}],(0,m.Z)({},"start"===ka?"startBinding":"endBinding",ua))}}},ea=function(la,ka,ua){if(null==ka||null==ua)return ka;var na=ka.gap,oa=ka.focus,La=ua.width;ua=ua.height;var Oa=la.width,Va=la.height;return{elementId:ka.elementId,gap:Math.max(1,Math.min((0,t.fb)(la,La,ua),na*(La<ua?La/Oa:ua/Va))),focus:oa}},pa=function(la){var ka=new Set(la.map(function(ua){return ua.id}));return la.flatMap(function(ua){return(0,v.Mn)(ua,
!1)?va(ua).filter(function(na){return!ka.has(na.id)}):(0,v.f0)(ua,!1)?xa(ua).filter(function(na){return!ka.has(na[0].id)}):[]})},va=function(la){return[ta(la,"start"),ta(la,"end")].filter(function(ka){return null!=ka})},ta=function(la,ka){return Z((0,B.AK)(E._.getPointAtIndexGlobalCoordinates(la,"start"===ka?0:-1)),f.Z.getScene(la))},xa=function(la){return f.Z.getScene(la).getNonDeletedElements().map(function(ka){if(!(0,v.Mn)(ka,!1))return null;var ua=Ga(ka,"start",la),na=Ga(ka,"end",la);return ua||
na?[ka,ua&&na?"both":ua?"start":"end",la]:null}).filter(function(ka){return null!=ka})},Ga=function(la,ka,ua){return null==la["start"===ka?"startBinding":"endBinding"]&&!I(la,ua,ka)&&(0,t.uu)(ua,(0,B.AK)(E._.getPointAtIndexGlobalCoordinates(la,"start"===ka?0:-1)))},Ia=function(la,ka,ua,na){var oa=new Set,La=new Set,Oa="duplicatesServeAsOld"===na;ka.forEach(function(Va){var Ma=Va.boundElements;if(null!=Ma&&0<Ma.length&&(Ma.forEach(function(Ua){Oa&&!ua.has(Ua.id)&&oa.add(Ua.id)}),La.add(ua.get(Va.id))),
(0,v.Mn)(Va))null!=Va.startBinding&&(Ma=Va.startBinding.elementId,Oa&&!ua.has(Ma)&&La.add(Ma)),null!=Va.endBinding&&(Ma=Va.endBinding.elementId,Oa&&!ua.has(Ma)&&La.add(Ma)),null==Va.startBinding&&null==Va.endBinding||oa.add(ua.get(Va.id))});la.filter(function(Va){return oa.has(Va.id)}).forEach(function(Va){var Ma=Va.endBinding;(0,r.DR)(Va,{startBinding:Ya(Va.startBinding,ua),endBinding:Ya(Ma,ua)})});la.filter(function(Va){return La.has(Va.id)}).forEach(function(Va){var Ma=Va.boundElements;null!=Ma&&
0<Ma.length&&(0,r.DR)(Va,{boundElements:Ma.map(function(Ua){return ua.has(Ua.id)?{id:ua.get(Ua.id),type:Ua.type}:Ua})})})},Ya=function(la,ka){var ua;if(null==la)return null;var na=la.elementId;return{focus:la.focus,gap:la.gap,elementId:null!==(ua=ka.get(na))&&void 0!==ua?ua:na}},Fa=function(la,ka){var ua=new Set(ka.map(function(oa){return oa.id})),na=new Set;ka.forEach(function(oa){var La;(0,v.f0)(oa)?null===(La=oa.boundElements)||void 0===La||La.forEach(function(Oa){ua.has(Oa.id)||na.add(Oa.id)}):
(0,v.Mn)(oa)&&(oa.startBinding&&na.add(oa.startBinding.elementId),oa.endBinding&&na.add(oa.endBinding.elementId))});la.filter(function(oa){return na.has(oa.id)}).forEach(function(oa){(0,v.f0)(oa)?(0,r.DR)(oa,{boundElements:Ba(oa.boundElements,ua)}):(0,v.Mn)(oa)&&(0,r.DR)(oa,{startBinding:Ka(oa.startBinding,ua),endBinding:Ka(oa.endBinding,ua)})})},Ka=function(la,ka){return null==la||ka.has(la.elementId)?null:la},Ba=function(la,ka){return la?la.filter(function(ua){return!ka.has(ua.id)}):null}},9995:function(g,
h,b){function l(ta,xa){var Ga="undefined"!=typeof Symbol&&ta[Symbol.iterator]||ta["@@iterator"];if(!Ga){if(Array.isArray(ta)||(Ga=function(Ba,la){if(Ba){if("string"==typeof Ba)return m(Ba,la);var ka=Object.prototype.toString.call(Ba).slice(8,-1);"Object"===ka&&Ba.constructor&&(ka=Ba.constructor.name);if("Map"===ka||"Set"===ka)return Array.from(Ba);if("Arguments"===ka||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ka))return m(Ba,la)}}(ta))||xa&&ta&&"number"==typeof ta.length){Ga&&(ta=Ga);var Ia=
0;xa=function(){};return{s:xa,n:function(){return Ia>=ta.length?{done:!0}:{done:!1,value:ta[Ia++]}},e:function(Ba){throw Ba;},f:xa}}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 Ya,Fa=!0,Ka=!1;return{s:function(){Ga=Ga.call(ta)},n:function(){var Ba=Ga.next();return Fa=Ba.done,Ba},e:function(Ba){Ka=!0;Ya=Ba},f:function(){try{Fa||null==Ga.return||Ga.return()}finally{if(Ka)throw Ya;}}}}
function m(ta,xa){(null==xa||xa>ta.length)&&(xa=ta.length);for(var Ga=0,Ia=Array(xa);Ga<xa;Ga++)Ia[Ga]=ta[Ga];return Ia}b.d(h,{CM:function(){return O},GJ:function(){return R},IX:function(){return ia},KP:function(){return fa},M$:function(){return G},Pi:function(){return W},UC:function(){return F},Ut:function(){return ea},Y5:function(){return Z},os:function(){return pa},qf:function(){return T},v2:function(){return va},wC:function(){return X}});var p=b(1930),D=b(2577),v=b(8821),t=b(5169),r=b(3795),f=
b(9845),E=b(3683),B=b(9472),J=b(5153),V=b(554),H=b(8627),S=b(5475),L=function(){function ta(){(0,v.Z)(this,ta)}return(0,t.Z)(ta,null,[{key:"getBounds",value:function(xa){var Ga=ta.boundsCache.get(xa);if(null!=Ga&&Ga.version&&Ga.version===xa.version)return Ga.bounds;Ga=ta.calculateBounds(xa);return ta.boundsCache.set(xa,{version:xa.version,bounds:Ga}),Ga}},{key:"calculateBounds",value:function(xa){var Ga=T(xa);var Ia=(0,D.Z)(Ga,6),Ya=Ia[0],Fa=Ia[1];Ga=Ia[2];var Ka=Ia[3],Ba=Ia[4],la=Ia[5];if((0,B.F9)(xa))return Ga=
U(xa.points.map(function(oa){oa=(0,D.Z)(oa,2);return(0,r.U1)(oa[0],oa[1],Ba-xa.x,la-xa.y,xa.angle)})),Ga=(0,D.Z)(Ga,4),[Ga[0]+xa.x,Ga[1]+xa.y,Ga[2]+xa.x,Ga[3]+xa.y];if((0,B.bt)(xa))Ga=aa(xa,Ba,la);else if("diamond"===xa.type){Ia=(0,r.U1)(Ba,Fa,Ba,la,xa.angle);Fa=(0,D.Z)(Ia,2);Ia=Fa[0];Fa=Fa[1];Ka=(0,r.U1)(Ba,Ka,Ba,la,xa.angle);var ka=(0,D.Z)(Ka,2);Ka=ka[0];ka=ka[1];Ya=(0,r.U1)(Ya,la,Ba,la,xa.angle);var ua=(0,D.Z)(Ya,2);Ya=ua[0];ua=ua[1];Ga=(0,r.U1)(Ga,la,Ba,la,xa.angle);var na=(0,D.Z)(Ga,2);Ga=na[0];
na=na[1];Ga=[Math.min(Ia,Ka,Ya,Ga),Math.min(Fa,ka,ua,na),Math.max(Ia,Ka,Ya,Ga),Math.max(Fa,ka,ua,na)]}else"ellipse"===xa.type?(Ga=(Ga-Ya)/2,Fa=(Ka-Fa)/2,Ka=Math.cos(xa.angle),ka=Math.sin(xa.angle),Ia=Math.hypot(Ga*Ka,Fa*ka),Ga=Math.hypot(Fa*Ka,Ga*ka),Ga=[Ba-Ia,la-Ga,Ba+Ia,la+Ga]):(Ia=(0,r.U1)(Ya,Fa,Ba,la,xa.angle),ka=(0,D.Z)(Ia,2),Ia=ka[0],ka=ka[1],Ya=(0,r.U1)(Ya,Ka,Ba,la,xa.angle),ua=(0,D.Z)(Ya,2),Ya=ua[0],ua=ua[1],Ka=(0,r.U1)(Ga,Ka,Ba,la,xa.angle),na=(0,D.Z)(Ka,2),Ka=na[0],na=na[1],Ga=(0,r.U1)(Ga,
Fa,Ba,la,xa.angle),Fa=(0,D.Z)(Ga,2),Ga=Fa[0],Fa=Fa[1],Ga=[Math.min(Ia,Ya,Ka,Ga),Math.min(ka,ua,na,Fa),Math.max(Ia,Ya,Ka,Ga),Math.max(ka,ua,na,Fa)]);return Ga}}]),ta}();L.boundsCache=new WeakMap;var T=function(ta){var xa=1<arguments.length&&void 0!==arguments[1]&&arguments[1];if((0,B.F9)(ta)){xa=U(ta.points);var Ga=(0,D.Z)(xa,4);xa=Ga[0]+ta.x;var Ia=Ga[1]+ta.y,Ya=Ga[2]+ta.x;Ga=Ga[3]+ta.y;return[xa,Ia,Ya,Ga,(xa+Ya)/2,(Ia+Ga)/2]}return(0,B.bt)(ta)?H._.getElementAbsoluteCoords(ta,xa):(0,B.iB)(ta)&&(xa=
(0,V.tl)(ta),(0,B.Yv)(xa))?(xa=H._.getBoundTextElementPosition(xa,ta),[xa.x,xa.y,xa.x+ta.width,xa.y+ta.height,xa.x+ta.width/2,xa.y+ta.height/2]):[ta.x,ta.y,ta.x+ta.width,ta.y+ta.height,ta.x+ta.width/2,ta.y+ta.height/2]},R=function(ta){var xa=T(ta),Ga=(0,D.Z)(xa,6);xa=Ga[0];var Ia=Ga[1],Ya=Ga[2],Fa=Ga[3],Ka=Ga[4];Ga=Ga[5];var Ba=[Ka,Ga];if((0,B.bt)(ta)||(0,B.F9)(ta)){xa=[];for(Ia=0;Ia<ta.points.length-1;)xa.push([(0,r.xj)([ta.points[Ia][0]+ta.x,ta.points[Ia][1]+ta.y],Ba,ta.angle),(0,r.xj)([ta.points[Ia+
1][0]+ta.x,ta.points[Ia+1][1]+ta.y],Ba,ta.angle)]),Ia++;return xa}xa=[[xa,Ia],[Ya,Ia],[xa,Fa],[Ya,Fa],[Ka,Ia],[Ka,Fa],[xa,Ga],[Ya,Ga]].map(function(ua){return(0,r.xj)(ua,Ba,ta.angle)});var la=(0,D.Z)(xa,8);xa=la[0];Ia=la[1];Ya=la[2];Fa=la[3];Ka=la[4];Ga=la[5];var ka=la[6];la=la[7];return"diamond"===ta.type?[[Ka,ka],[Ka,la],[Ga,ka],[Ga,la]]:"ellipse"===ta.type?[[Ka,ka],[Ka,la],[Ga,ka],[Ga,la],[Ka,ka],[Ka,la],[Ga,ka],[Ga,la]]:[[xa,Ia],[Ya,Fa],[xa,Ya],[Ia,Fa],[xa,la],[Ya,la],[Ia,ka],[Fa,ka]]},G=function(ta){return[ta.x,
ta.y,ta.x+ta.width,ta.y+ta.height,ta.x+ta.width/2,ta.y+ta.height/2]},F=function(ta){var xa=Math.floor(ta.width/2)+1,Ga=Math.floor(ta.height/2)+1;return[xa,0,ta.width,Ga,xa,ta.height,0,Ga]},O=function(ta){var xa,Ga=l(ta.sets);try{for(Ga.s();!(xa=Ga.n()).done;){var Ia=xa.value;if("path"===Ia.type)return Ia.ops}}catch(Ya){Ga.e(Ya)}finally{Ga.f()}return ta.sets[0].ops},M=function(ta,xa,Ga,Ia,Ya){var Fa=1-ta;return Math.pow(Fa,3)*xa+3*Math.pow(Fa,2)*ta*Ga+3*Fa*Math.pow(ta,2)*Ia+Math.pow(ta,3)*Ya},I=function(ta,
xa,Ga,Ia){var Ya=xa-ta,Fa=Ga-xa,Ka=3*Ya-6*Fa+3*(Ia-Ga);Fa=6*Fa-6*Ya;Ya*=3;var Ba=Fa*Fa-4*Ka*Ya;if(!(0<=Ba))return!1;var la=null,ka=null,ua=1/0,na=1/0;return 0===Ka?ua=na=-Ya/Fa:(ua=(-Fa+Math.sqrt(Ba))/(2*Ka),na=(-Fa-Math.sqrt(Ba))/(2*Ka)),0<=ua&&1>=ua&&(la=M(ua,ta,xa,Ga,Ia)),0<=na&&1>=na&&(ka=M(na,ta,xa,Ga,Ia)),[la,ka]},ia=function(ta,xa){var Ga=[0,0];ta=ta.reduce(function(Ia,Ya){var Fa=Ya.op;Ya=Ya.data;if("move"===Fa)Ga=Ya;else if("bcurveTo"===Fa){Fa=[Ya[0],Ya[1]];var Ka=[Ya[2],Ya[3]];Ya=[Ya[4],
Ya[5]];Fa=xa?xa.apply(void 0,Fa):Fa;Ka=xa?xa.apply(void 0,Ka):Ka;var Ba=xa?xa.apply(void 0,Ya):Ya,la=xa?xa.apply(void 0,(0,p.Z)(Ga)):Ga;Ga=Ya;Ya=function(ka,ua,na,oa){var La=I(ka[0],ua[0],na[0],oa[0]),Oa=I(ka[1],ua[1],na[1],oa[1]);ua=Math.min(ka[0],oa[0]);na=Math.max(ka[0],oa[0]);La&&(La=La.filter(function(Va){return null!==Va}),ua=Math.min.apply(Math,[ua].concat((0,p.Z)(La))),na=Math.max.apply(Math,[na].concat((0,p.Z)(La))));La=Math.min(ka[1],oa[1]);ka=Math.max(ka[1],oa[1]);Oa&&(oa=Oa.filter(function(Va){return null!==
Va}),La=Math.min.apply(Math,[La].concat((0,p.Z)(oa))),ka=Math.max.apply(Math,[ka].concat((0,p.Z)(oa))));return[ua,La,na,ka]}(la,Fa,Ka,Ba);Ya=(0,D.Z)(Ya,4);Fa=Ya[1];Ka=Ya[2];Ba=Ya[3];Ia.minX=Math.min(Ia.minX,Ya[0]);Ia.minY=Math.min(Ia.minY,Fa);Ia.maxX=Math.max(Ia.maxX,Ka);Ia.maxY=Math.max(Ia.maxY,Ba)}return Ia},{minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0});return[ta.minX,ta.minY,ta.maxX,ta.maxY]},U=function(ta){var xa,Ga=1/0,Ia=1/0,Ya=-1/0,Fa=-1/0;ta=l(ta);try{for(ta.s();!(xa=ta.n()).done;){var Ka=(0,D.Z)(xa.value,
2),Ba=Ka[0],la=Ka[1];Ga=Math.min(Ga,Ba);Ia=Math.min(Ia,la);Ya=Math.max(Ya,Ba);Fa=Math.max(Fa,la)}}catch(ka){ta.e(ka)}finally{ta.f()}return[Ga,Ia,Ya,Fa]},Z=function(ta,xa,Ga,Ia){xa=O(xa[0]);if(1>xa.length)return null;var Ya="start"===Ga?1:xa.length-1,Fa=xa[Ya].data,Ka=[Fa[4],Fa[5]],Ba=[Fa[2],Fa[3]],la=[Fa[0],Fa[1]];xa=xa[Ya-1];var ka=[0,0];"move"===xa.op?ka=xa.data:"bcurveTo"===xa.op&&(ka=[xa.data[4],xa.data[5]]);Ya=function(Ma,Ua){return Math.pow(1-Ma,3)*Ka[Ua]+3*Ma*Math.pow(1-Ma,2)*Ba[Ua]+3*Math.pow(Ma,
2)*(1-Ma)*la[Ua]+ka[Ua]*Math.pow(Ma,3)};xa=(0,D.Z)("start"===Ga?ka:Ka,2);Ga=xa[0];xa=xa[1];Fa=[Ya(.3,0),Ya(.3,1)];Ya=Fa[0];Fa=Fa[1];var ua=Math.hypot(Ga-Ya,xa-Fa);Ya=(Ga-Ya)/ua;Fa=(xa-Fa)/ua;ua={arrow:30,bar:15,dot:15,triangle:15}[Ia];var na=0;if("arrow"===Ia){var oa=(0,D.Z)(ta.points[ta.points.length-1],2);na=oa[0];oa=oa[1];var La=(0,D.Z)(1<ta.points.length?ta.points[ta.points.length-2]:[0,0],2);na=Math.hypot(na-La[0],oa-La[1])}else for(oa=0;oa<ta.points.length;oa++){var Oa=(0,D.Z)(ta.points[oa-
1]||[0,0],2);La=Oa[0];Oa=Oa[1];var Va=(0,D.Z)(ta.points[oa],2);na+=Math.hypot(Va[0]-La,Va[1]-Oa)}ua=Math.min(ua,na/2);Ya=Ga-Ya*ua;Fa=xa-Fa*ua;if("dot"===Ia)return[Ga,xa,Math.hypot(Fa-xa,Ya-Ga)+ta.strokeWidth];Ia={arrow:20,bar:90,triangle:25}[Ia];ta=(0,r.U1)(Ya,Fa,Ga,xa,-Ia*Math.PI/180);ua=(0,D.Z)(ta,2);ta=ua[0];ua=ua[1];Ia=(0,r.U1)(Ya,Fa,Ga,xa,Ia*Math.PI/180);Ia=(0,D.Z)(Ia,2);return[Ga,xa,ta,ua,Ia[0],Ia[1]]},aa=function(ta,xa,Ga){if(2>ta.points.length){var Ia=(0,D.Z)(ta.points[0],2);Ia=(0,r.U1)(ta.x+
Ia[0],ta.y+Ia[1],xa,Ga,ta.angle);var Ya=(0,D.Z)(Ia,2);Ia=Ya[0];Ya=Ya[1];var Fa=[Ia,Ya,Ia,Ya],Ka=(0,V.WJ)(ta);Ka&&(Ia=H._.getMinMaxXYWithBoundText(ta,[Ia,Ya,Ia,Ya],Ka),Fa=[Ia[0],Ia[1],Ia[2],Ia[3]]);return Fa}Ya=null===(Ia=S.R.get(ta))||void 0===Ia?void 0:Ia[0];Ia=null!=Ya?Ya:function(Ba){var la=f.Z.generator(),ka=(0,E.Z)(Ba);return la[Ba.roundness?"curve":ka.fill?"polygon":"linearPath"](Ba.points,ka)}(ta);Ia=O(Ia);Ia=ia(Ia,function(Ba,la){return(0,r.U1)(ta.x+Ba,ta.y+la,xa,Ga,ta.angle)});Ia=[Ia[0],
Ia[1],Ia[2],Ia[3]];if(Ya=(0,V.WJ)(ta))Ia=H._.getMinMaxXYWithBoundText(ta,Ia,Ya),Ia=[Ia[0],Ia[1],Ia[2],Ia[3]];return Ia},W=function(ta){return L.getBounds(ta)},fa=function(ta){if(!ta.length)return[0,0,0,0];var xa=1/0,Ga=-1/0,Ia=1/0,Ya=-1/0;return ta.forEach(function(Fa){Fa=W(Fa);Fa=(0,D.Z)(Fa,4);var Ka=Fa[1],Ba=Fa[2],la=Fa[3];xa=Math.min(xa,Fa[0]);Ia=Math.min(Ia,Ka);Ga=Math.max(Ga,Ba);Ya=Math.max(Ya,la)}),[xa,Ia,Ga,Ya]},X=function(ta,xa,Ga,Ia){if(!(0,B.bt)(ta)&&!(0,B.F9)(ta))return[ta.x,ta.y,ta.x+
xa,ta.y+Ga];xa=(0,J.z)(0,xa,(0,J.z)(1,Ga,ta.points,Ia),Ia);(0,B.F9)(ta)?xa=U(xa):(Ga=f.Z.generator(),xa=ta.roundness?Ga.curve(xa,(0,E.Z)(ta)):Ga.linearPath(xa,(0,E.Z)(ta)),xa=O(xa),xa=ia(xa));xa=(0,D.Z)(xa,4);return[xa[0]+ta.x,xa[1]+ta.y,xa[2]+ta.x,xa[3]+ta.y]},ea=function(ta,xa){var Ga=f.Z.generator();xa=null==ta.roundness?Ga.linearPath(xa,(0,E.Z)(ta)):Ga.curve(xa,(0,E.Z)(ta));xa=O(xa);xa=ia(xa);xa=(0,D.Z)(xa,4);return[xa[0]+ta.x,xa[1]+ta.y,xa[2]+ta.x,xa[3]+ta.y]},pa=function(ta,xa){if(!ta.length)return[0,
0,0,0];var Ga=1/0,Ia=ta[0];return ta.forEach(function(Ya){var Fa=W(Ya);Fa=(0,D.Z)(Fa,4);Fa=(0,r.LW)((Fa[0]+Fa[2])/2,(Fa[1]+Fa[3])/2,xa.x,xa.y);Fa<Ga&&(Ga=Fa,Ia=Ya)}),W(Ia)},va=function(ta){ta=fa(ta);var xa=(0,D.Z)(ta,4);ta=xa[0];var Ga=xa[1],Ia=xa[2];xa=xa[3];return{minX:ta,minY:Ga,maxX:Ia,maxY:xa,width:Ia-ta,height:xa-Ga,midX:(ta+Ia)/2,midY:(Ga+xa)/2}}},4238:function(g,h,b){function l(ab,Qa){var bb="undefined"!=typeof Symbol&&ab[Symbol.iterator]||ab["@@iterator"];if(!bb){if(Array.isArray(ab)||(bb=
function(pc,Cc){if(pc){if("string"==typeof pc)return m(pc,Cc);var bd=Object.prototype.toString.call(pc).slice(8,-1);"Object"===bd&&pc.constructor&&(bd=pc.constructor.name);if("Map"===bd||"Set"===bd)return Array.from(pc);if("Arguments"===bd||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(bd))return m(pc,Cc)}}(ab))||Qa&&ab&&"number"==typeof ab.length){bb&&(ab=bb);var Pa=0;Qa=function(){};return{s:Qa,n:function(){return Pa>=ab.length?{done:!0}:{done:!1,value:ab[Pa++]}},e:function(pc){throw pc;},f:Qa}}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 Lb,xc=!0,oc=!1;return{s:function(){bb=bb.call(ab)},n:function(){var pc=bb.next();return xc=pc.done,pc},e:function(pc){oc=!0;Lb=pc},f:function(){try{xc||null==bb.return||bb.return()}finally{if(oc)throw Lb;}}}}function m(ab,Qa){(null==Qa||Qa>ab.length)&&(Qa=ab.length);for(var bb=0,Pa=Array(Qa);bb<Qa;bb++)Pa[bb]=ab[bb];return Pa}b.d(h,{uu:function(){return xa},T_:function(){return Oa},j_:function(){return Va},oT:function(){return Ya},wX:function(){return ea},MZ:function(){return Ma},wB:function(){return pa},
Qu:function(){return va},pX:function(){return ta},fb:function(){return Ga}});var p=b(2577),D=function(ab,Qa){return[0,0,0,0,Qa,ab,1,0]};g=function(){var ab=0<arguments.length&&void 0!==arguments[0]?arguments[0]:0,Qa=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,bb=[0,0,0,0,0,0,0,0];if(0>Qa||7<Qa)throw Error("Expected `index` between 0 and 7, got `".concat(Qa,"`"));return 0!==ab&&(bb[Qa]=ab),bb};var v=function(ab){return[ab[0],ab[1],ab[2],ab[3],-ab[4],-ab[5],-ab[6],-ab[7]]},t=function(ab,
Qa){return"number"==typeof Qa?[ab[0]-Qa,ab[1],ab[2],ab[3],ab[4],ab[5],ab[6],ab[7]]:[ab[0]-Qa[0],ab[1]-Qa[1],ab[2]-Qa[2],ab[3]-Qa[3],ab[4]-Qa[4],ab[5]-Qa[5],ab[6]-Qa[6],ab[7]-Qa[7]]},r=function(ab,Qa){return"number"==typeof Qa?[ab[0]*Qa,ab[1]*Qa,ab[2]*Qa,ab[3]*Qa,ab[4]*Qa,ab[5]*Qa,ab[6]*Qa,ab[7]*Qa]:[Qa[0]*ab[0]+Qa[2]*ab[2]+Qa[3]*ab[3]-Qa[6]*ab[6],Qa[1]*ab[0]+Qa[0]*ab[1]-Qa[4]*ab[2]+Qa[5]*ab[3]+Qa[2]*ab[4]-Qa[3]*ab[5]-Qa[7]*ab[6]-Qa[6]*ab[7],Qa[2]*ab[0]+Qa[0]*ab[2]-Qa[6]*ab[3]+Qa[3]*ab[6],Qa[3]*ab[0]+
Qa[6]*ab[2]+Qa[0]*ab[3]-Qa[2]*ab[6],Qa[4]*ab[0]+Qa[2]*ab[1]-Qa[1]*ab[2]+Qa[7]*ab[3]+Qa[0]*ab[4]+Qa[6]*ab[5]-Qa[5]*ab[6]+Qa[3]*ab[7],Qa[5]*ab[0]-Qa[3]*ab[1]+Qa[7]*ab[2]+Qa[1]*ab[3]-Qa[6]*ab[4]+Qa[0]*ab[5]+Qa[4]*ab[6]+Qa[2]*ab[7],Qa[6]*ab[0]+Qa[3]*ab[2]-Qa[2]*ab[3]+Qa[0]*ab[6],Qa[7]*ab[0]+Qa[6]*ab[1]+Qa[5]*ab[2]+Qa[4]*ab[3]+Qa[3]*ab[4]+Qa[2]*ab[5]+Qa[1]*ab[6]+Qa[0]*ab[7]]},f=function(ab,Qa){return[E(ab,Qa),ab[1]*Qa[7]+ab[4]*Qa[5]-ab[5]*Qa[4]+ab[7]*Qa[1],ab[2]*Qa[7]-ab[4]*Qa[6]+ab[6]*Qa[4]+ab[7]*Qa[2],
ab[3]*Qa[7]+ab[5]*Qa[6]-ab[6]*Qa[5]+ab[7]*Qa[3],ab[4]*Qa[7]+ab[7]*Qa[4],ab[5]*Qa[7]+ab[7]*Qa[5],ab[6]*Qa[7]+ab[7]*Qa[6],ab[7]*Qa[7]]},E=function(ab,Qa){return ab[0]*Qa[7]+ab[1]*Qa[6]+ab[2]*Qa[5]+ab[3]*Qa[4]+ab[4]*Qa[3]+ab[5]*Qa[2]+ab[6]*Qa[1]+ab[7]*Qa[0]},B=function(ab){return Math.sqrt(Math.abs(ab[0]*ab[0]-ab[2]*ab[2]-ab[3]*ab[3]+ab[6]*ab[6]))},J=function(ab){var Qa=B(ab);return 0===Qa||1===Qa?ab:r(ab,(0>ab[6]?-1:1)/Qa)},V=(g(1,1),g(1,2),g(1,3),g(1,4),g(1,5),g(1,6),g(1,7),function(ab,Qa,bb){return J([0,
bb,ab,Qa,0,0,0,0])}),H=function(ab,Qa){return bb=ab,[(Pa=Qa)[0]*bb[0]+Pa[2]*bb[2]+Pa[3]*bb[3]-Pa[6]*bb[6],Pa[1]*bb[0]+Pa[0]*bb[1]-Pa[4]*bb[2]+Pa[5]*bb[3]+Pa[2]*bb[4]-Pa[3]*bb[5]-Pa[7]*bb[6]-Pa[6]*bb[7],Pa[2]*bb[0]+Pa[0]*bb[2]-Pa[6]*bb[3]+Pa[3]*bb[6],Pa[3]*bb[0]+Pa[6]*bb[2]+Pa[0]*bb[3]-Pa[2]*bb[6],Pa[4]*bb[0]+Pa[7]*bb[3]+Pa[0]*bb[4]+Pa[3]*bb[7],Pa[5]*bb[0]+Pa[7]*bb[2]+Pa[0]*bb[5]+Pa[2]*bb[7],Pa[6]*bb[0]+Pa[0]*bb[6],Pa[7]*bb[0]+Pa[0]*bb[7]];var bb,Pa},S=function(ab){ab=(0,p.Z)(ab,2);return[0,0,0,0,
ab[1],ab[0],1,0]},L=function(ab){return[ab[5],ab[4]]},T=function(ab){return[0,0,0,0,Math.abs(ab[4]),Math.abs(ab[5]),1,0]},R=function(ab,Qa){return E(ab,Qa)},G=function(ab){return[0,0,0,0,ab[4],ab[5],0,0]},F=function(ab,Qa){return bb=r(ab,Math.sin(Qa/2)),Pa=Math.cos(Qa/2),"number"==typeof Pa?[bb[0]+Pa,bb[1],bb[2],bb[3],bb[4],bb[5],bb[6],bb[7]]:[bb[0]+Pa[0],bb[1]+Pa[1],bb[2]+Pa[2],bb[3]+Pa[3],bb[4]+Pa[4],bb[5]+Pa[5],bb[6]+Pa[6],bb[7]+Pa[7]];var bb,Pa},O=function(ab,Qa){return J(r(r(ab,Qa),v(ab)))},
M=b(3795),I=b(1493),ia=b(9995),U=b(9472),Z=b(5734),aa=b(7135),W=b(6519),fa=b(554),X=b(5475),ea=function oc(Qa,bb,Pa,Lb,xc){var pc=10/bb.zoom.value,Cc=[Lb,xc];return bb.selectedElementIds[Qa.id]&&(0,W.oY)([Qa],bb)?ta(Qa,Cc,pc,Pa):(pc=(0,fa.WJ)(Qa))&&oc(pc,bb,Pa,Lb,xc)?!0:va(Qa,bb,Pa,Cc)},pa=function(Qa,bb,Pa,Lb,xc){var oc=10/bb.zoom.value,pc=(0,fa.WJ)(Qa);return(!pc||!ea(pc,bb,Pa,Lb,xc))&&!va(Qa,bb,Pa,[Lb,xc])&&ta(Qa,[Lb,xc],oc,Pa)},va=function(Qa,bb,Pa,Lb){bb=10/bb.zoom.value;if((0,Z.iB)(Qa))var xc=
Fa;else"arrow"===Qa.type?xc=!1:"freedraw"===Qa.type?xc=!0:(xc=!(0,aa.Qm)(Qa.backgroundColor)||(0,U.Xo)(Qa)||(0,U.gs)(Qa),xc="line"===Qa.type?xc&&(0,M.g6)(Qa.points):xc||(0,U.pC)(Qa)),xc=xc?Ka:Ba;return Ia({element:Qa,point:Lb,threshold:bb,check:xc,frameNameBoundsCache:Pa})},ta=function(Qa,bb,Pa,Lb){bb=(0,p.Z)(bb,2);var xc=bb[0],oc=bb[1];if("frame"===Qa.type)return Ia({element:Qa,point:[xc,oc],threshold:Pa,check:Ka,frameNameBoundsCache:Lb});Lb=(0,ia.qf)(Qa);var pc=(0,p.Z)(Lb,4);Lb=pc[0];bb=pc[1];var Cc=
pc[2];pc=pc[3];Qa=(0,M.U1)(xc,oc,(Lb+Cc)/2,(bb+pc)/2,-Qa.angle);xc=(0,p.Z)(Qa,2);Qa=xc[0];xc=xc[1];return Qa>Lb-Pa&&Qa<Cc+Pa&&xc>bb-Pa&&xc<pc+Pa},xa=function(Qa,bb){var Pa=bb.x;bb=bb.y;var Lb=Ga(Qa,Qa.width,Qa.height);return Ia({element:Qa,point:[Pa,bb],threshold:Lb,check:la,frameNameBoundsCache:null})},Ga=function(Qa,bb,Pa){return Math.max(16,Math.min(.25*("diamond"===Qa.type?1/Math.sqrt(2):1)*Math.min(bb,Pa),32))},Ia=function(Qa){switch(Qa.element.type){case "rectangle":case "embeddable":case "image":case "text":case "diamond":case "ellipse":var bb=
Ya(Qa.element,Qa.point);return Qa.check(bb,Qa.threshold);case "freedraw":if(bb=!!Qa.check(ka(Qa.element,Qa.point),Qa.threshold))a:{bb=Qa.element;var Pa=Qa.point;Qa=Qa.threshold;if(0===bb.angle){var Lb=Pa[0]-bb.x;Pa=Pa[1]-bb.y}else{Lb=(0,ia.qf)(bb);Lb=(0,p.Z)(Lb,4);var xc=Lb[0],oc=Lb[1];Pa=(0,M.xj)(Pa,[xc+(Lb[2]-xc)/2,oc+(Lb[3]-oc)/2],-bb.angle);Lb=Pa[0]-bb.x;Pa=Pa[1]-bb.y}oc=(0,p.Z)(bb.points,2);xc=oc[0];oc=oc[1];if((0,M.LW)(xc[0],xc[1],Lb,Pa)<Qa||(0,M.LW)(oc[0],oc[1],Lb,Pa)<Qa)bb=!0;else{for(var pc=
0;pc<bb.points.length;pc++){var Cc=[oc[0]-xc[0],oc[1]-xc[1]];var bd=Math.hypot(Cc[1],Cc[0]);Cc=[Cc[0]/bd,Cc[1]/bd];var dc=[Lb-xc[0],Pa-xc[1]];dc=(dc[0]*Cc[0]+dc[1]*Cc[1])/Math.hypot(Cc[1],Cc[0]);Cc=[xc[0]+Cc[0]*dc,xc[1]+Cc[1]*dc];dc=(0,M.LW)(Cc[0],Cc[1],xc[0],xc[1]);var Nc=(0,M.LW)(Cc[0],Cc[1],oc[0],oc[1]);if(Cc=Nc<dc&&dc>bd?oc:dc<Nc&&Nc>bd?xc:Cc,Math.hypot(Pa-Cc[1],Lb-Cc[0])<Qa){bb=!0;break a}xc=oc;oc=bb.points[pc+1]}bb=X.R.get(bb);bb=!(!bb||!bb.sets.length)&&hb(bb,Lb,Pa,Qa)}}return bb;case "arrow":case "line":return na(Qa);
case "selection":return console.warn("This should not happen, we need to investigate why it does."),!1;case "frame":if(Qa.check(Ya(Qa.element,Qa.point),Qa.threshold))return!0;Lb=null===(bb=Qa.frameNameBoundsCache)||void 0===bb?void 0:bb.get(Qa.element);if(bb=!!Lb)bb=Qa.check,bd=S(Qa.point),Pa=(0,ia.M$)(Lb),pc=(0,p.Z)(Pa,4),Pa=pc[0],xc=pc[1],oc=pc[2],pc=pc[3],Cc=D((Pa+oc)/2,(xc+pc)/2),dc=F(Cc,Lb.angle),bd=O(dc,bd),Cc=t(bd,G(Cc)),Cc=T(Cc),Lb=[t(bd,[0,0,0,0,Lb.y,Lb.x,0,0]),Cc,(oc-Pa)/2,(pc-xc)/2],Lb=
(0,p.Z)(Lb,4),Pa=Lb[1],xc=Lb[2],Lb=Math.max(R(Pa,V(0,1,-Lb[3])),R(Pa,V(1,0,-xc))),bb=bb.call(Qa,Lb,Qa.threshold);return bb}},Ya=function(Qa,bb){switch(Qa.type){case "rectangle":case "image":case "text":case "embeddable":case "frame":return ka(Qa,bb);case "diamond":Qa=oa(Qa,bb);var Pa=(0,p.Z)(Qa,4);Qa=Pa[1];bb=Pa[2];Pa=Pa[3];bb=V(Pa,bb,-Pa*bb);return E(Qa,bb);case "ellipse":return Qa=ua(Qa,bb),Qa=(0,p.Z)(Qa,2),bb=Qa[1],-Math.sign(bb[1])*E(Qa[0],bb)}},Fa=function(Qa,bb){return 0>Qa},Ka=function(Qa,
bb){return Qa<bb},Ba=function(Qa,bb){return Math.abs(Qa)<bb},la=function(Qa,bb){return 0<=Qa&&Qa<bb},ka=function(Qa,bb){Qa=oa(Qa,bb);Qa=(0,p.Z)(Qa,4);bb=Qa[1];var Pa=Qa[2];return Math.max(R(bb,V(0,1,-Qa[3])),R(bb,V(1,0,-Pa)))},ua=function(Qa,bb){Qa=oa(Qa,bb);bb=(0,p.Z)(Qa,4);Qa=bb[1];var Pa=bb[2],Lb=bb[3];bb=L(Qa);bb=(0,p.Z)(bb,2);var xc=bb[0],oc=bb[1],pc=.707,Cc=.707;[0,1,2,3].forEach(function(bd){bd=(Pa*Pa-Lb*Lb)*Math.pow(pc,3)/Pa;var dc=(Lb*Lb-Pa*Pa)*Math.pow(Cc,3)/Lb,Nc=xc-bd,Qc=oc-dc,Ad=Math.hypot(Lb*
Cc-dc,Pa*pc-bd),Xc=Math.hypot(Qc,Nc);pc=Math.min(1,Math.max(0,(Nc*Ad/Xc+bd)/Pa));Cc=Math.min(1,Math.max(0,(Qc*Ad/Xc+dc)/Lb));bd=Math.hypot(Cc,pc);pc/=bd;Cc/=bd});bb=D(Pa*pc,Lb*Cc);return[Qa,H(J(f(bb,Qa)),bb)]},na=function(Qa){var bb=Qa.element,Pa=Qa.threshold;if(!X.R.get(bb))return!1;var Lb=oa(Qa.element,Qa.point),xc=(0,p.Z)(Lb,4);Lb=xc[0];var oc=xc[1],pc=xc[2];xc=V(0,1,-xc[3]);pc=V(1,0,-pc);if(!Ka(E(oc,xc),Pa)||!Ka(E(oc,pc),Pa))return!1;Lb=L(Lb);Lb=(0,p.Z)(Lb,2);var Cc=Lb[0],bd=Lb[1];return(Lb=X.R.get(bb))?
Qa.check===Ka&&Lb.some(function(dc){return Wa(dc,Cc,bd,bb.roundness?"round":"sharp")})?!0:Lb.some(function(dc){return hb(dc,Cc,bd,Pa)}):!1},oa=function(Qa,bb){var Pa=S(bb);bb=(0,ia.qf)(Qa);var Lb=(0,p.Z)(bb,4);bb=Lb[0];var xc=Lb[1],oc=Lb[2];Lb=Lb[3];var pc=D((bb+oc)/2,(xc+Lb)/2),Cc=F(pc,Qa.angle);Pa=O(Cc,Pa);pc=t(Pa,G(pc));pc=T(pc);return[t(Pa,[0,0,0,0,Qa.y,Qa.x,0,0]),pc,(oc-bb)/2,(Lb-xc)/2]},La=function(Qa){var bb=(0,ia.qf)(Qa);bb=(0,p.Z)(bb,4);bb=D((bb[0]+bb[2])/2,(bb[1]+bb[3])/2);Qa=F(bb,Qa.angle);
bb=G(bb);bb=v([1,0,0,0,-.5*bb[5],.5*bb[4],0,0]);return r(bb,Qa)},Oa=function(Qa,bb,Pa){var Lb=La(Qa);bb=O(Lb,S(bb));Pa=O(Lb,S(Pa));var xc=J(f(Pa,bb));Pa=Qa.height/Qa.width;Lb=Qa.width/2;bb=Qa.height/2;var oc=xc[2],pc=xc[3];xc=xc[1];var Cc=Math.abs(pc),bd=Math.abs(oc);switch(Qa.type){case "rectangle":case "image":case "text":case "embeddable":case "frame":var dc=xc/(Lb*(bd+Pa*Cc));break;case "diamond":dc=Cc<bd?xc/(bd*Lb):xc/(Cc*bb);break;case "ellipse":dc=xc/(Lb*Math.sqrt(Math.pow(oc,2)+Math.pow(Pa,
2)*Math.pow(pc,2)))}return dc||0},Va=function(Qa,bb,Pa){if(0===bb){var Lb=(0,ia.qf)(Qa);Lb=(0,p.Z)(Lb,4);Lb=D((Lb[0]+Lb[2])/2,(Lb[1]+Lb[3])/2);return L(Lb)}Lb=La(Qa);Pa=O(Lb,S(Pa));Lb=v(Lb);switch(Qa.type){case "rectangle":case "image":case "text":case "diamond":case "embeddable":case "frame":var xc=yb(Qa,bb,Pa);break;case "ellipse":var oc=Math.abs(bb);xc=Qa.width*oc/2;Qa=Qa.height*oc/2;bb=Math.sign(bb);Pa=L(Pa);oc=(0,p.Z)(Pa,2);Pa=oc[0];oc=oc[1];oc=0===oc?1E-4:oc;var pc=Math.pow(Pa,2)*Math.pow(Qa,
2)+Math.pow(oc,2)*Math.pow(xc,2);bb=(-Pa*Math.pow(Qa,2)+bb*oc*Math.sqrt(Math.max(0,pc-Math.pow(xc,2)*Math.pow(Qa,2))))/pc;Pa=(-bb*Pa-1)/oc;0===Pa&&(Pa=.01*(Object.is(Pa,-0)?-1:1));xc=-Math.pow(xc,2)*bb/(Math.pow(Pa,2)*Math.pow(Qa,2)+Math.pow(bb,2)*Math.pow(xc,2));xc=D(xc,(-bb*xc-1)/Pa)}return L(O(Lb,xc))},Ma=function(Qa,bb,Pa){var Lb=3<arguments.length&&void 0!==arguments[3]?arguments[3]:0,xc=La(Qa),oc=O(xc,S(bb)),pc=O(xc,S(Pa));pc=J(f(pc,oc));var Cc=v(xc);return Ua(Qa,pc,oc,Lb).map(function(bd){return L(O(Cc,
bd))})},Ua=function(Qa,bb,Pa){var Lb=3<arguments.length&&void 0!==arguments[3]?arguments[3]:0;switch(Qa.type){case "rectangle":case "image":case "text":case "diamond":case "embeddable":case "frame":var xc=ib(Qa);var oc=xc.flatMap(function(pc,Cc){Cc=(0,p.Z)([pc,xc[(Cc+1)%4]],2);pc=Cc[0];Cc=Cc[1];var bd=[0,0,0,0,Cc[4]-pc[4],Cc[5]-pc[5],0,0];var dc=Math.sqrt(Math.abs(bd[7]*bd[7]-bd[5]*bd[5]-bd[4]*bd[4]+bd[1]*bd[1]));bd=0===dc||1===dc?bd:r(bd,1/dc);dc=.5*Lb;bd=[1,0,0,0,dc*bd[4],dc*bd[5],0,0];pc=[O(bd,
pc),O(bd,Cc)];Cc=(0,p.Z)(pc,2);pc=Cc[0];Cc=Cc[1];if(0<=E(pc,bb)*E(Cc,bb))var Nc=[];else{a:{Cc=J(f(Cc,pc));pc=J((Nc=bb,[(Qc=Cc)[0]*Nc[0],Qc[1]*Nc[0]+Qc[0]*Nc[1],Qc[2]*Nc[0]+Qc[0]*Nc[2],Qc[3]*Nc[0]+Qc[0]*Nc[3],Qc[4]*Nc[0]+Qc[2]*Nc[1]-Qc[1]*Nc[2]+Qc[0]*Nc[4],Qc[5]*Nc[0]-Qc[3]*Nc[1]+Qc[1]*Nc[3]+Qc[0]*Nc[5],Qc[6]*Nc[0]+Qc[3]*Nc[2]-Qc[2]*Nc[3]+Qc[0]*Nc[6],Qc[7]*Nc[0]+Qc[6]*Nc[1]+Qc[5]*Nc[2]+Qc[4]*Nc[3]+Qc[3]*Nc[4]+Qc[2]*Nc[5]+Qc[1]*Nc[6]]));break a;var Qc}Nc=[pc]}return Nc}).concat(xc.flatMap(function(pc){if(0===
Lb)var Cc=0===E(bb,pc)?[pc]:[];else{Cc=bb[2];var bd=bb[3],dc=bb[1];pc=L(pc);var Nc=(0,p.Z)(pc,2);pc=Nc[0];var Qc=Nc[1];Nc=Cc*Cc+bd*bd;var Ad=Lb*Lb*Nc-Math.pow(Cc*pc+bd*Qc+dc,2);if(0===Nc||0>=Ad)Cc=[];else{Ad=Math.sqrt(Ad);var Xc=pc*bd*bd-Qc*Cc*bd-Cc*dc;dc=Qc*Cc*Cc-pc*Cc*bd-bd*dc;Cc=[D((Xc+bd*Ad)/Nc,(dc-Cc*Ad)/Nc),D((Xc-bd*Ad)/Nc,(dc+Cc*Ad)/Nc)]}}return Cc}));break;case "ellipse":oc=vb(Qa,Lb,bb)}if(2>oc.length)return[];oc=oc.sort(function(pc,Cc){return B(f(pc,Pa))-B(f(Cc,Pa))});return[oc[0],oc[oc.length-
1]]},ib=function(Qa){var bb=1<arguments.length&&void 0!==arguments[1]?arguments[1]:1,Pa=bb*Qa.width/2;bb=bb*Qa.height/2;switch(Qa.type){case "rectangle":case "image":case "text":case "embeddable":case "frame":return[D(Pa,bb),D(Pa,-bb),D(-Pa,-bb),D(-Pa,bb)];case "diamond":return[D(0,bb),D(Pa,0),D(0,-bb),D(-Pa,0)]}},vb=function(Qa,bb,Pa){var Lb=Qa.width/2+bb;Qa=Qa.height/2+bb;bb=Pa[2];var xc=Pa[3],oc=Pa[1];Pa=Lb*Lb*bb*bb+Qa*Qa*xc*xc;var pc=Pa-oc*oc;if(0===Pa||0>=pc)return[];pc=Math.sqrt(pc);var Cc=
-Lb*Lb*bb*oc;oc*=-Qa*Qa*xc;return[D((Cc+Lb*Qa*xc*pc)/Pa,(oc-Lb*Qa*bb*pc)/Pa),D((Cc-Lb*Qa*xc*pc)/Pa,(oc+Lb*Qa*bb*pc)/Pa)]},yb=function(Qa,bb,Pa){var Lb=Math.sign(bb),xc=0,oc=null;return ib(Qa,Math.abs(bb)).forEach(function(pc){var Cc=Lb*J(f(pc,Pa))[1];Cc>xc&&(xc=Cc,oc=pc)}),oc},Wa=function(Qa,bb,Pa,Lb){var xc,oc=[],pc=!1;Qa=l((0,ia.CM)(Qa));try{for(Qa.s();!(xc=Qa.n()).done;){var Cc=xc.value;"move"===Cc.op?(pc=!pc)&&oc.push([Cc.data[0],Cc.data[1]]):"bcurveTo"===Cc.op?pc&&(oc.push([Cc.data[0],Cc.data[1]]),
oc.push([Cc.data[2],Cc.data[3]]),oc.push([Cc.data[4],Cc.data[5]])):"lineTo"===Cc.op&&pc&&oc.push([Cc.data[0],Cc.data[1]])}}catch(bd){Qa.e(bd)}finally{Qa.f()}if(4<=oc.length){if("sharp"===Lb)return(0,M.c9)(oc,bb,Pa);Lb=(0,I.s)(oc,10,5);return(0,M.c9)(Lb,bb,Pa)}return!1},hb=function(Qa,bb,Pa,Lb){var xc=[0,0];return(0,ia.CM)(Qa).some(function(oc,pc){pc=oc.op;var Cc=oc.data;if("move"===pc)xc=Cc;else{if("bcurveTo"===pc){oc=[Cc[0],Cc[1]];pc=[Cc[2],Cc[3]];Cc=[Cc[4],Cc[5]];var bd=xc;xc=Cc;return function(dc,
Nc,Qc,Ad,Xc,sc){var Sc=(0,p.Z)(Xc,2);Xc=Sc[0];Sc=Sc[1];for(var Ib=function(db,rb){return Math.pow(1-db,3)*Ad[rb]+3*db*Math.pow(1-db,2)*Qc[rb]+3*Math.pow(db,2)*(1-db)*Nc[rb]+dc[rb]*Math.pow(db,3)},lb=0;1>=lb;){var Db=Ib(lb,0),Gb=Ib(lb,1);if(Math.sqrt(Math.pow(Db-Xc,2)+Math.pow(Gb-Sc,2))<sc)return!0;lb+=.01}return!1}(bd,oc,pc,Cc,[bb,Pa],Lb)}if("lineTo"===pc)return Wa(Qa,bb,Pa,"sharp");"qcurveTo"===pc&&console.warn("qcurveTo is not implemented yet")}return!1})}},5434:function(g,h,b){function l(ea,pa){var va=
"undefined"!=typeof Symbol&&ea[Symbol.iterator]||ea["@@iterator"];if(!va){if(Array.isArray(ea)||(va=function(Ya,Fa){if(Ya){if("string"==typeof Ya)return m(Ya,Fa);var Ka=Object.prototype.toString.call(Ya).slice(8,-1);"Object"===Ka&&Ya.constructor&&(Ka=Ya.constructor.name);if("Map"===Ka||"Set"===Ka)return Array.from(Ya);if("Arguments"===Ka||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Ka))return m(Ya,Fa)}}(ea))||pa&&ea&&"number"==typeof ea.length){va&&(ea=va);var ta=0;pa=function(){};return{s:pa,
n:function(){return ta>=ea.length?{done:!0}:{done:!1,value:ea[ta++]}},e:function(Ya){throw Ya;},f:pa}}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 xa,Ga=!0,Ia=!1;return{s:function(){va=va.call(ea)},n:function(){var Ya=va.next();return Ga=Ya.done,Ya},e:function(Ya){Ia=!0;xa=Ya},f:function(){try{Ga||null==va.return||va.return()}finally{if(Ia)throw xa;}}}}function m(ea,pa){(null==pa||
pa>ea.length)&&(pa=ea.length);for(var va=0,ta=Array(pa);va<pa;va++)ta[va]=ea[va];return ta}function p(ea,pa){var va=Object.keys(ea);if(Object.getOwnPropertySymbols){var ta=Object.getOwnPropertySymbols(ea);pa&&(ta=ta.filter(function(xa){return Object.getOwnPropertyDescriptor(ea,xa).enumerable}));va.push.apply(va,ta)}return va}function D(ea){for(var pa=1;pa<arguments.length;pa++){var va=null!=arguments[pa]?arguments[pa]:{};pa%2?p(Object(va),!0).forEach(function(ta){(0,v.Z)(ea,ta,va[ta])}):Object.getOwnPropertyDescriptors?
Object.defineProperties(ea,Object.getOwnPropertyDescriptors(va)):p(Object(va)).forEach(function(ta){Object.defineProperty(ea,ta,Object.getOwnPropertyDescriptor(va,ta))})}return ea}b.d(h,{JX:function(){return Z},LM:function(){return U},eX:function(){return fa},g0:function(){return aa},xm:function(){return X}});var v=b(7169);g=b(9610);var t=b(7041),r=b(8557),f=b(7135),E=b(1829),B=b(554),J=b(9472),V=new Map,H=/^(?:http(?:s)?:\/\/)?(?:www\.)?youtu(?:be\.com|\.be)\/(embed\/|watch\?v=|shorts\/|playlist\?list=|embed\/videoseries\?list=)?([a-zA-Z0-9_-]+)(?:\?t=|&t=|\?start=|&start=)?([a-zA-Z0-9_-]+)?[^\s]*$/,
S=/^(?:http(?:s)?:\/\/)?(?:(?:w){3}.)?(?:player\.)?vimeo\.com\/(?:video\/)?([^?\s]+)(?:\?.*)?$/,L=/^https:\/\/(?:www\.)?figma\.com/,T=/^https:\/\/gist\.github\.com/,R=/^<script[\s\S]*?\ssrc=["'](https:\/\/gist.github.com\/.*?)\.js["']/i,G=/(?:http(?:s)?:\/\/)?(?:(?:w){3}.)?twitter.com/,F=/^<blockquote[\s\S]*?\shref=["'](https:\/\/twitter.com\/[^"']*)/i,O=/^https:\/\/(?:www\.)?val.town\/(v|embed)\/[a-zA-Z_$][0-9a-zA-Z_$]+\.[a-zA-Z_$][0-9a-zA-Z_$]+/,M=/^<(?:iframe|blockquote)[\s\S]*?\s(?:src|href)=["']([^"']*)["'][\s\S]*?>$/i,
I=new Set("youtube.com youtu.be vimeo.com player.vimeo.com figma.com link.excalidraw.com gist.github.com twitter.com *.simplepdf.eu stackblitz.com val.town".split(" ")),ia=function(ea){return"\x3chtml\x3e\x3cbody\x3e".concat(ea,"\x3c/body\x3e\x3c/html\x3e")},U=function(ea){if(!ea)return null;if(V.has(ea))return V.get(ea);var pa=ea,va="generic",ta={w:560,h:840},xa=ea.match(H);if(null!=xa&&xa[2]){var Ga=xa[3]?"\x26start\x3d".concat(xa[3]):"",Ia=ea.includes("shorts");switch(va="video",xa[1]){default:ea=
"https://www.youtube.com/embed/".concat(xa[2],"?enablejsapi\x3d1").concat(Ga);break;case "playlist?list\x3d":case "embed/videoseries?list\x3d":ea="https://www.youtube.com/embed/videoseries?list\x3d".concat(xa[2],"\x26enablejsapi\x3d1").concat(Ga)}return ta=Ia?{w:315,h:560}:{w:560,h:315},V.set(pa,{link:ea,aspectRatio:ta,type:va}),{link:ea,aspectRatio:ta,type:va}}xa=ea.match(S);if(null!=xa&&xa[1])return xa=null==xa?void 0:xa[1],Ga=/^\d+$/.test(xa)?void 0:(0,r.t)("toast.unrecognizedLinkFormat"),va="video",
ea="https://player.vimeo.com/video/".concat(xa,"?api\x3d1"),ta={w:560,h:315},V.set(pa,{link:ea,aspectRatio:ta,type:va}),{link:ea,aspectRatio:ta,type:va,warning:Ga};if(ea.match(L))return va="generic",ea="https://www.figma.com/embed?embed_host\x3dshare\x26url\x3d".concat(encodeURIComponent(ea)),ta={w:550,h:550},V.set(pa,{link:ea,aspectRatio:ta,type:va}),{link:ea,aspectRatio:ta,type:va};if(xa=ea.match(O))return ea="embed"===xa[1]?xa[0]:xa[0].replace("/v","/embed"),V.set(pa,{link:ea,aspectRatio:ta,type:va}),
{link:ea,aspectRatio:ta,type:va};if(G.test(ea)){if(/<blockquote/.test(ea)){var Ya=ia(ea);va={type:"document",srcdoc:function(){return Ya},aspectRatio:{w:480,h:480}}}else va={type:"document",srcdoc:function(Ka){return ia('\x3cblockquote class\x3d"twitter-tweet" data-dnt\x3d"true" data-theme\x3d"'.concat(Ka,'"\x3e\x3ca href\x3d"').concat(ea,'"\x3e\x3c/a\x3e\x3c/blockquote\x3e \x3cscript async src\x3d"https://platform.twitter.com/widgets.js" charset\x3d"utf-8"\x3e\x3c/script\x3e'))},aspectRatio:{w:480,
h:480}};return V.set(pa,va),va}if(T.test(ea)){if(/<script>/.test(ea)){var Fa=ia(ea);pa={type:"document",srcdoc:function(){return Fa},aspectRatio:{w:550,h:720}}}else pa={type:"document",srcdoc:function(){return ia('\n \x3cscript src\x3d"'.concat(ea,'.js"\x3e\x3c/script\x3e\n \x3cstyle type\x3d"text/css"\x3e\n * { margin: 0px; }\n table, .gist { height: 100%; }\n .gist .gist-file { height: calc(100vh - 2px); padding: 0px; display: grid; grid-template-rows: 1fr auto; }\n \x3c/style\x3e\n '))},
aspectRatio:{w:550,h:720}};return V.set(ea,pa),pa}return V.set(ea,{link:ea,aspectRatio:ta,type:va}),{link:ea,aspectRatio:ta,type:va}},Z=function(ea){return(0,J.gs)(ea)||"text"===ea.type&&(ea=(0,B.tl)(ea))&&(0,J.gs)(ea)?!0:!1},aa=function(ea){var pa,va=ea.link&&""!==(null==ea?void 0:ea.link)?ea.link:"Empty Web-Embed",ta=Math.max(Math.min(ea.width/2,ea.width/va.length),ea.width/30),xa=t.ut.Helvetica,Ga=(0,f.mO)({fontSize:ta,fontFamily:xa});return(0,E.VL)({x:ea.x+ea.width/2,y:ea.y+ea.height/2,strokeColor:"transparent"!==
ea.strokeColor?ea.strokeColor:"black",backgroundColor:"transparent",fontFamily:xa,fontSize:ta,text:(0,B.lD)(va,Ga,ea.width-20),textAlign:"center",verticalAlign:t.oX.MIDDLE,angle:null!==(pa=ea.angle)&&void 0!==pa?pa:0})},W=((0,g.z)({name:"setEmbeddableAsActiveTool",trackEvent:{category:"toolbar"},perform:function(ea,pa,va,ta){va=(0,f.Om)(pa,{type:"embeddable"});return(0,f.Uk)(ta.canvas,D(D({},pa),{},{activeTool:va})),{elements:ea,appState:D(D({},pa),{},{activeTool:(0,f.Om)(pa,{type:"embeddable"})}),
commitToHistory:!1}}}),function(ea,pa){try{var va=(new URL(ea)).hostname.replace(/^www\./,""),ta=va.replace(/^([^.]+)/,"*");if(pa instanceof Set)return I.has(va)||I.has(ta);if(va===pa.replace(/^www\./,""))return!0}catch(xa){}return!1}),fa=function(ea){var pa=ea.match(F);return pa&&2===pa.length||(pa=ea.match(R))&&2===pa.length?pa[1]:(pa=ea.match(M))&&2===pa.length?pa[1]:ea},X=function(ea,pa){if(!ea)return!1;if(null!=pa)if("function"==typeof pa){var va=pa(ea);if("boolean"==typeof va)return va}else{if("boolean"==
typeof pa)return pa;if(pa instanceof RegExp)return pa.test(ea);if(Array.isArray(pa)){pa=l(pa);try{for(pa.s();!(va=pa.n()).done;){var ta=va.value;if(ta instanceof RegExp){if(ea.match(ta))return!0}else if(W(ea,ta))return!0}}catch(xa){pa.e(xa)}finally{pa.f()}return!1}}return W(ea,I)}},6897:function(g,h,b){function l(S,L){var T=Object.keys(S);if(Object.getOwnPropertySymbols){var R=Object.getOwnPropertySymbols(S);L&&(R=R.filter(function(G){return Object.getOwnPropertyDescriptor(S,G).enumerable}));T.push.apply(T,
R)}return T}function m(S){for(var L=1;L<arguments.length;L++){var T=null!=arguments[L]?arguments[L]:{};L%2?l(Object(T),!0).forEach(function(R){(0,D.Z)(S,R,T[R])}):Object.getOwnPropertyDescriptors?Object.defineProperties(S,Object.getOwnPropertyDescriptors(T)):l(Object(T)).forEach(function(R){Object.defineProperty(S,R,Object.getOwnPropertyDescriptor(T,R))})}return S}b.d(h,{PK:function(){return B},Xx:function(){return J},bp:function(){return H},oA:function(){return V}});var p=b(2577),D=b(7169),v=b(8950);
g=b(2975);var t=b.n(g),r=b(7041),f=b(8557),E=b(9472),B=function(S){return new Promise(function(L,T){var R=new Image;R.onload=function(){L(R)};R.onerror=function(G){T(G)};R.src=S})},J=function(){var S=(0,v.Z)(t().mark(function R(T){var G,F,O,M,I;return t().wrap(function(ia){for(;;)switch(ia.prev=ia.next){case 0:return G=T.fileIds,F=T.files,O=T.imageCache,M=new Map,I=new Map,ia.next=5,Promise.all(G.reduce(function(U,Z){var aa=F[Z];return aa&&!M.has(Z)?(M.set(Z,!0),U.concat((0,v.Z)(t().mark(function fa(){var X,
ea,pa;return t().wrap(function(va){for(;;)switch(va.prev=va.next){case 0:if(va.prev=0,aa.mimeType!==r.LO.binary){va.next=3;break}throw Error("Only images can be added to ImageCache");case 3:return X=B(aa.dataURL),ea={image:X,mimeType:aa.mimeType},O.set(Z,ea),va.next=8,X;case 8:pa=va.sent;O.set(Z,m(m({},ea),{},{image:pa}));va.next=15;break;case 12:va.prev=12,va.t0=va.catch(0),I.set(Z,!0);case 15:case "end":return va.stop()}},fa,null,[[0,12]])}))())):U},[]));case 5:return ia.abrupt("return",{imageCache:O,
updatedFiles:M,erroredFiles:I});case 6:case "end":return ia.stop()}},R)}));return function(T){return S.apply(this,arguments)}}(),V=function(S){return S.filter(function(L){return(0,E.wi)(L)})},H=function(){var S=(0,v.Z)(t().mark(function R(T){var G,F,O,M,I,ia,U;return t().wrap(function(Z){for(;;)switch(Z.prev=Z.next){case 0:if(G=(new DOMParser).parseFromString(T,r.LO.svg),F=G.querySelector("svg"),!G.querySelector("parsererror")&&"svg"===(null==(aa=F)?void 0:aa.nodeName.toLowerCase())){Z.next=7;break}throw Error((0,f.t)("errors.invalidSVGString"));
case 7:return F.hasAttribute("xmlns")||F.setAttribute("xmlns",r.hR),F.hasAttribute("width")&&F.hasAttribute("height")||(O=F.getAttribute("viewBox"),M=F.getAttribute("width")||"50",I=F.getAttribute("height")||"50",O&&(ia=O.match(/\d+ +\d+ +(\d+) +(\d+)/))&&(U=(0,p.Z)(ia,3),M=U[1],I=U[2]),F.setAttribute("width",M),F.setAttribute("height",I)),Z.abrupt("return",F.outerHTML);case 10:case "end":return Z.stop()}var aa},R)}));return function(T){return S.apply(this,arguments)}}()},5734:function(g,h,b){function l(Fa,
Ka){var Ba=Object.keys(Fa);if(Object.getOwnPropertySymbols){var la=Object.getOwnPropertySymbols(Fa);Ka&&(la=la.filter(function(ka){return Object.getOwnPropertyDescriptor(Fa,ka).enumerable}));Ba.push.apply(Ba,la)}return Ba}function m(Fa){for(var Ka=1;Ka<arguments.length;Ka++){var Ba=null!=arguments[Ka]?arguments[Ka]:{};Ka%2?l(Object(Ba),!0).forEach(function(la){(0,p.Z)(Fa,la,Ba[la])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Fa,Object.getOwnPropertyDescriptors(Ba)):l(Object(Ba)).forEach(function(la){Object.defineProperty(Fa,
la,Object.getOwnPropertyDescriptor(Ba,la))})}return Fa}b.d(h,{ox:function(){return f.ox},BQ:function(){return Ia},_M:function(){return Ya},EJ:function(){return aa},o8:function(){return ia},Sy:function(){return t.Sy},Y5:function(){return r.Y5},os:function(){return r.os},KP:function(){return r.KP},Un:function(){return R},UC:function(){return r.UC},$V:function(){return Z},qf:function(){return r.qf},Pi:function(){return r.Pi},jt:function(){return S},o4:function(){return D.o4},Lm:function(){return va},
Xf:function(){return ta},Qp:function(){return D.Qp},T:function(){return G.T},xx:function(){return G.xx},Uo:function(){return ea},n2:function(){return L},PC:function(){return f.PC},kK:function(){return f.kK},n_:function(){return pa},wX:function(){return E.wX},r2:function(){return v.r2},He:function(){return v.He},wB:function(){return E.wB},QD:function(){return D.QD},qP:function(){return xa},iB:function(){return v.iB},Up:function(){return t.Up},vw:function(){return t.vw},y8:function(){return t.y8},VL:function(){return t.VL},
oN:function(){return M.oN},JZ:function(){return t.JZ},RT:function(){return X},b_:function(){return W.b_},vY:function(){return G.vY},N_:function(){return t.N_}});var p=b(7169),D=b(9799),v=b(9472),t=b(1829),r=b(9995),f=b(6519),E=b(4238),B=b(2577),J=b(2726),V=["rotation"],H=function(Fa,Ka,Ba){return Ka>=Fa[0]&&Ka<=Fa[0]+Fa[2]&&Ba>=Fa[1]&&Ba<=Fa[1]+Fa[3]},S=function(Fa,Ka,Ba,la,ka,ua){return Fa.reduce(function(na,oa){return na?na:(na=function(La,Oa,Va,Ma,Ua,ib){if(!Oa.selectedElementIds[La.id])return!1;
La=(0,f.PC)(La,Ua,ib);Oa=La.rotation;var vb=(0,J.Z)(La,V);if(Oa&&H(Oa,Va,Ma))return"rotation";La=Object.keys(vb).filter(function(yb){yb=vb[yb];return!!yb&&H(yb,Va,Ma)});return 0<La.length&&La[0]}(oa,Ka,Ba,la,ka,ua))?{element:oa,transformHandleType:na}:null},null)},L=function(Fa,Ka,Ba,la,ka){var ua=(0,B.Z)(Fa,4);Fa=ua[0];var na=ua[1],oa=ua[2];ua=ua[3];var La=(0,f.kK)([Fa,na,oa,ua,(Fa+oa)/2,(na+ua)/2],0,la,ka,f.ox);return Object.keys(La).find(function(Oa){return(Oa=La[Oa])&&H(Oa,Ka,Ba)})||!1},T=["ns",
"nesw","ew","nwse"],R=function(Fa){var Ka=Fa.element,Ba=Ka&&-1==Math.sign(Ka.height)*Math.sign(Ka.width),la=null;switch(Fa.transformHandleType){case "n":case "s":la="ns";break;case "w":case "e":la="ew";break;case "nw":case "se":la=Ba?"nesw":"nwse";break;case "ne":case "sw":la=Ba?"nwse":"nesw";break;case "rotation":return"grab"}la&&Ka&&(Fa=la,Ka=Ka.angle,Ba=T.indexOf(Fa),0<=Ba&&(Fa=T[(Ba+Math.round(Ka/(Math.PI/4)))%T.length]),la=Fa);return la?"".concat(la,"-resize"):""},G=b(9798),F=b(7267),O=b(7729),
M=b(554),I=b(502),ia=function(Fa,Ka,Ba,la){var ka=4<arguments.length&&void 0!==arguments[4]&&arguments[4],ua=5<arguments.length&&void 0!==arguments[5]?arguments[5]:0,na=6<arguments.length&&void 0!==arguments[6]?arguments[6]:0,oa=7<arguments.length?arguments[7]:void 0,La=8<arguments.length?arguments[8]:void 0,Oa=(0,r.KP)(Ka);Oa=(0,B.Z)(Oa,2);var Va={x:Ba-Oa[0],y:la-Oa[1]},Ma=new Set(Ka),Ua=Ka.filter(function(ib){return(0,v.He)(ib)}).map(function(ib){return ib.id});0<Ua.length&&La.getNonDeletedElements().filter(function(ib){return null!==
ib.frameId}).filter(function(ib){return Ua.includes(ib.frameId)}).forEach(function(ib){return Ma.add(ib)});Ma.forEach(function(ib){if(U(ka,ua,na,Fa,ib,Va),!ib.groupIds.length||oa.editingGroupId&&!(0,I.zq)(oa,ib)){var vb=(0,M.WJ)(ib);!vb||vb.frameId&&Ua.includes(vb.frameId)||U(ka,ua,na,Fa,vb,Va)}(0,F.Ww)(ib,{simultaneouslyUpdated:Array.from(Ma)})})},U=function(Fa,Ka,Ba,la,ka,ua){if(Fa){var na=Fa&&Ka<Ba;Fa=Fa&&Ka>Ba;la=la.originalElements.get(ka.id);na=na&&la?la.x:ka.x+ua.x;ua=Fa&&la?la.y:ka.y+ua.y}else na=
ka.x+ua.x,ua=ka.y+ua.y;(0,O.DR)(ka,{x:na,y:ua})},Z=function(Fa,Ka,Ba){Fa=(0,r.KP)(Fa);Fa=(0,B.Z)(Fa,2);return[Ka-Fa[0],Ba-Fa[1]]},aa=function(Fa,Ka,Ba,la,ka,ua,na,oa,La,Oa,Va){La&&"selection"!==Fa.type&&(Va?oa=na/Va:(Math.abs(ua-la)>Math.abs(ka-Ba)?(oa=(0,D.uK)(Ka,oa,ka<Ba?-na:na),na=oa.width,oa=oa.height):(oa=(0,D.uK)(Ka,na,ua<la?-oa:oa),na=oa.width,oa=oa.height),0>oa&&(oa=-oa)));ka=ka<Ba?Ba-na:Ba;ua=ua<la?la-oa:la;Oa&&(ka=Ba-(na+=na)/2,ua=la-(oa+=oa)/2);0!==na&&0!==oa&&(0,O.DR)(Fa,{x:ka,y:ua,width:na,
height:oa})},W=b(3716),fa=b(9547),X=function(Fa,Ka){return!(Fa.viewModeEnabled||!("custom"!==Fa.activeTool.type&&(Fa.editingElement||"selection"!==Fa.activeTool.type&&"eraser"!==Fa.activeTool.type&&"hand"!==Fa.activeTool.type)||(0,fa.eD)(Ka,Fa).length))},ea=function(Fa){return Fa.reduce(function(Ka,Ba){return Ka+Ba.version},0)},pa=function(Fa){return Fa.filter(function(Ka){return!Ka.isDeleted&&!(0,D.QD)(Ka)})},va=function(Fa){return Fa.filter(function(Ka){return!Ka.isDeleted})},ta=function(Fa){return Fa.filter(function(Ka){return!Ka.isDeleted})},
xa=function(Fa){return!Fa.isDeleted},Ga=function(Fa){return va(Fa).map(function(Ka){return(0,v.dt)(Ka.type)?m(m({},Ka),{},{lastCommittedPoint:null}):Ka})},Ia=function(Fa){return Ga(Fa)},Ya=function(Fa){return Ga(Fa)}},8627:function(g,h,b){function l(W,fa){var X="undefined"!=typeof Symbol&&W[Symbol.iterator]||W["@@iterator"];if(!X){if(Array.isArray(W)||(X=function(xa,Ga){if(xa){if("string"==typeof xa)return m(xa,Ga);var Ia=Object.prototype.toString.call(xa).slice(8,-1);"Object"===Ia&&xa.constructor&&
(Ia=xa.constructor.name);if("Map"===Ia||"Set"===Ia)return Array.from(xa);if("Arguments"===Ia||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Ia))return m(xa,Ga)}}(W))||fa&&W&&"number"==typeof W.length){X&&(W=X);var ea=0;fa=function(){};return{s:fa,n:function(){return ea>=W.length?{done:!0}:{done:!1,value:W[ea++]}},e:function(xa){throw xa;},f:fa}}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 pa,va=!0,ta=!1;return{s:function(){X=X.call(W)},n:function(){var xa=X.next();return va=xa.done,xa},e:function(xa){ta=!0;pa=xa},f:function(){try{va||null==X.return||X.return()}finally{if(ta)throw pa;}}}}function m(W,fa){(null==fa||fa>W.length)&&(fa=W.length);for(var X=0,ea=Array(fa);X<fa;X++)ea[X]=W[X];return ea}function p(W,fa){var X=Object.keys(W);if(Object.getOwnPropertySymbols){var ea=Object.getOwnPropertySymbols(W);fa&&(ea=ea.filter(function(pa){return Object.getOwnPropertyDescriptor(W,pa).enumerable}));
X.push.apply(X,ea)}return X}function D(W){for(var fa=1;fa<arguments.length;fa++){var X=null!=arguments[fa]?arguments[fa]:{};fa%2?p(Object(X),!0).forEach(function(ea){(0,t.Z)(W,ea,X[ea])}):Object.getOwnPropertyDescriptors?Object.defineProperties(W,Object.getOwnPropertyDescriptors(X)):p(Object(X)).forEach(function(ea){Object.defineProperty(W,ea,Object.getOwnPropertyDescriptor(X,ea))})}return W}b.d(h,{_:function(){return Z}});var v=b(1930),t=b(7169),r=b(2577),f=b(8821),E=b(5169),B=b(3795),J=b(5734),
V=b(9995),H=b(7729),S=b(3223),L=b(7267),T=b(7135),R=b(9472),G=b(6331),F=b(554),O=b(7041),M=b(5475),I=null,ia=[],U=null,Z=function(){function W(fa,X){(0,f.Z)(this,W);this.elementId=fa.id;S.Z.mapElementToScene(this.elementId,X);W.normalizePoints(fa);this.lastUncommittedPoint=this.selectedPointsIndices=null;this.isDragging=!1;this.pointerOffset={x:0,y:0};this.endBindingElement=this.startBindingElement="keep";this.pointerDownState={prevSelectedPointsIndices:null,lastClickedPoint:-1,origin:null,segmentMidpoint:{value:null,
index:null,added:!1}};this.hoverPointIndex=-1;this.segmentMidPointHoveredCoords=null}return(0,E.Z)(W,null,[{key:"getElement",value:function(fa){var X;return(null===(X=S.Z.getScene(fa))||void 0===X?void 0:X.getNonDeletedElement(fa))||null}},{key:"handleBoxSelection",value:function(fa,X,ea){var pa;if(!X.editingLinearElement||"selection"!==(null===(pa=X.draggingElement)||void 0===pa?void 0:pa.type))return!1;pa=X.editingLinearElement;var va=pa.selectedPointsIndices,ta=W.getElement(pa.elementId);if(!ta)return!1;
X=(0,J.qf)(X.draggingElement);X=(0,r.Z)(X,4);var xa=X[0],Ga=X[1],Ia=X[2],Ya=X[3];ta=W.getPointsGlobalCoordinates(ta).reduce(function(Fa,Ka,Ba){return(Ka[0]>=xa&&Ka[0]<=Ia&&Ka[1]>=Ga&&Ka[1]<=Ya||fa.shiftKey&&null!=va&&va.includes(Ba))&&Fa.push(Ba),Fa},[]);ea({editingLinearElement:D(D({},pa),{},{selectedPointsIndices:ta.length?ta:null})})}},{key:"handlePointDragging",value:function(fa,X,ea,pa,va,ta){if(!ta)return!1;var xa=ta.selectedPointsIndices,Ga=W.getElement(ta.elementId);if(!Ga)return!1;var Ia=
Ga.points[ta.pointerDownState.lastClickedPoint];if(xa&&Ia){if((0,G.Ge)(fa)&&1===xa.length&&1<Ga.points.length){Ia=xa[0];var Ya=Ga.points[0===Ia?1:Ia-1],Fa=W._getShiftLockedDelta(Ga,Ya,[ea,pa],fa[G.tW.CTRL_OR_CMD]?null:X.gridSize);Fa=(0,r.Z)(Fa,2);W.movePoints(Ga,[{index:Ia,point:[Fa[0]+Ya[0],Fa[1]+Ya[1]],isDragging:Ia===ta.pointerDownState.lastClickedPoint}])}else{Ya=W.createPointAt(Ga,ea-ta.pointerOffset.x,pa-ta.pointerOffset.y,fa[G.tW.CTRL_OR_CMD]?null:X.gridSize);var Ka=Ya[0]-Ia[0],Ba=Ya[1]-Ia[1];
W.movePoints(Ga,xa.map(function(la){return{index:la,point:la===ta.pointerDownState.lastClickedPoint?W.createPointAt(Ga,ea-ta.pointerOffset.x,pa-ta.pointerOffset.y,fa[G.tW.CTRL_OR_CMD]?null:X.gridSize):[Ga.points[la][0]+Ka,Ga.points[la][1]+Ba],isDragging:la===ta.pointerDownState.lastClickedPoint}}))}if((0,F.WJ)(Ga)&&(0,F.RB)(Ga,!1),(0,R.Mn)(Ga,!1))Ia=[],0===xa[0]&&Ia.push((0,T.AK)(W.getPointGlobalCoordinates(Ga,Ga.points[0]))),xa=xa[xa.length-1],xa===Ga.points.length-1&&Ia.push((0,T.AK)(W.getPointGlobalCoordinates(Ga,
Ga.points[xa]))),Ia.length&&va(Ga,Ia);return!0}return!1}},{key:"handlePointerUp",value:function(fa,X,ea){var pa,va=X.selectedPointsIndices,ta=X.isDragging,xa=X.pointerDownState,Ga=W.getElement(X.elementId);if(!Ga)return X;var Ia={};if(ta&&va){var Ya,Fa=l(va);try{for(Fa.s();!(Ya=Fa.n()).done;){var Ka=Ya.value;if(0===Ka||Ka===Ga.points.length-1){(0,B.g6)(Ga.points,ea.zoom.value)&&W.movePoints(Ga,[{index:Ka,point:0===Ka?Ga.points[Ga.points.length-1]:Ga.points[0]}]);var Ba=(0,L.N1)(ea)?(0,L.Y9)((0,T.AK)(W.getPointAtIndexGlobalCoordinates(Ga,
Ka)),S.Z.getScene(Ga)):null;Ia[0===Ka?"startBindingElement":"endBindingElement"]=Ba}}}catch(la){Fa.e(la)}finally{Fa.f()}}return D(D(D({},X),Ia),{},{selectedPointsIndices:ta||fa.shiftKey?!ta&&fa.shiftKey&&null!==(pa=xa.prevSelectedPointsIndices)&&void 0!==pa&&pa.includes(xa.lastClickedPoint)?va&&va.filter(function(la){return la!==xa.lastClickedPoint}):va:null!=va&&va.includes(xa.lastClickedPoint)?[xa.lastClickedPoint]:va,isDragging:!1,pointerOffset:{x:0,y:0}})}},{key:"isSegmentTooShort",value:function(fa,
X,ea,pa){X=(0,B.LW)(X[0],X[1],ea[0],ea[1]);return 2<fa.points.length&&fa.roundness&&(X=(0,B.eH)(fa,ea)),X*pa.value<4*W.POINT_HANDLE_SIZE}},{key:"getSegmentMidPoint",value:function(fa,X,ea,pa){ea=(0,B.H5)(X,ea);2<fa.points.length&&fa.roundness&&(X=(0,B.yB)(fa,fa.points[pa]))&&(pa=(0,B.lk)(fa,fa.points[pa],.5),pa=(0,B.N_)(X[0],X[1],X[2],X[3],pa),pa=(0,r.Z)(pa,2),ea=W.getPointGlobalCoordinates(fa,[pa[0],pa[1]]));return ea}},{key:"getSegmentMidPointIndex",value:function(fa,X,ea){fa=W.getElement(fa.elementId);
if(!fa)return-1;X=W.getEditorMidPoints(fa,X);for(fa=0;fa<X.length;){if(W.arePointsEqual(ea,X[fa]))return fa+1;fa++}return-1}},{key:"handlePointerDown",value:function(fa,X,ea,pa,va){var ta,xa={didAddPoint:!1,hitElement:null,linearElementEditor:null};if(!va)return xa;var Ga=W.getElement(va.elementId);if(!Ga)return xa;var Ia=W.getSegmentMidpointHitCoords(va,pa,X),Ya=null;if(Ia&&(Ya=W.getSegmentMidPointIndex(va,X,Ia)),fa.altKey&&X.editingLinearElement)return null==va.lastUncommittedPoint&&((0,H.DR)(Ga,
{points:[].concat((0,v.Z)(Ga.points),[W.createPointAt(Ga,pa.x,pa.y,fa[G.tW.CTRL_OR_CMD]?null:X.gridSize)])}),xa.didAddPoint=!0),ea.resumeRecording(),xa.linearElementEditor=D(D({},va),{},{pointerDownState:{prevSelectedPointsIndices:va.selectedPointsIndices,lastClickedPoint:-1,origin:{x:pa.x,y:pa.y},segmentMidpoint:{value:Ia,index:Ya,added:!1}},selectedPointsIndices:[Ga.points.length-1],lastUncommittedPoint:null,endBindingElement:(0,L.Y9)(pa,S.Z.getScene(Ga))}),xa.didAddPoint=!0,xa;ea=W.getPointIndexUnderCursor(Ga,
X.zoom,pa.x,pa.y);if(0<=ea||Ia)xa.hitElement=Ga;else{var Fa=va.startBindingElement,Ka=va.endBindingElement;(0,L.N1)(X)&&(0,R.Mn)(Ga)&&(0,L.HG)(Ga,Fa,Ka)}X=(0,J.qf)(Ga);Fa=(0,r.Z)(X,4);X=(Fa[0]+Fa[2])/2;Fa=(Fa[1]+Fa[3])/2;Ga=-1<ea&&(0,B.U1)(Ga.x+Ga.points[ea][0],Ga.y+Ga.points[ea][1],X,Fa,Ga.angle);fa=-1<ea||fa.shiftKey?fa.shiftKey||null!==(ta=va.selectedPointsIndices)&&void 0!==ta&&ta.includes(ea)?aa([].concat((0,v.Z)(va.selectedPointsIndices||[]),[ea])):[ea]:null;return xa.linearElementEditor=D(D({},
va),{},{pointerDownState:{prevSelectedPointsIndices:va.selectedPointsIndices,lastClickedPoint:ea,origin:{x:pa.x,y:pa.y},segmentMidpoint:{value:Ia,index:Ya,added:!1}},selectedPointsIndices:fa,pointerOffset:Ga?{x:pa.x-Ga[0],y:pa.y-Ga[1]}:{x:0,y:0}}),xa}},{key:"arePointsEqual",value:function(fa,X){return!fa&&!X||!(!fa||!X)&&(0,B.Jj)(fa,X)}},{key:"handlePointerMove",value:function(fa,X,ea,pa){if(!pa.editingLinearElement)return null;var va=pa.editingLinearElement,ta=va.lastUncommittedPoint;va=W.getElement(va.elementId);
if(!va)return pa.editingLinearElement;var xa=va.points,Ga=xa[xa.length-1];if(!fa.altKey)return Ga===ta&&W.deletePoints(va,[xa.length-1]),D(D({},pa.editingLinearElement),{},{lastUncommittedPoint:null});(0,G.Ge)(fa)&&2<=xa.length?(xa=xa[xa.length-2],fa=W._getShiftLockedDelta(va,xa,[X,ea],fa[G.tW.CTRL_OR_CMD]?null:pa.gridSize),fa=(0,r.Z)(fa,2),fa=[fa[0]+xa[0],fa[1]+xa[1]]):fa=W.createPointAt(va,X-pa.editingLinearElement.pointerOffset.x,ea-pa.editingLinearElement.pointerOffset.y,fa[G.tW.CTRL_OR_CMD]?
null:pa.gridSize);return Ga===ta?W.movePoints(va,[{index:va.points.length-1,point:fa}]):W.addPoints(va,pa,[{point:fa}]),D(D({},pa.editingLinearElement),{},{lastUncommittedPoint:va.points[va.points.length-1]})}},{key:"getPointGlobalCoordinates",value:function(fa,X){var ea=(0,J.qf)(fa);ea=(0,r.Z)(ea,4);fa=(0,B.U1)(fa.x+X[0],fa.y+X[1],(ea[0]+ea[2])/2,(ea[1]+ea[3])/2,fa.angle);fa=(0,r.Z)(fa,2);return[fa[0],fa[1]]}},{key:"getPointsGlobalCoordinates",value:function(fa){var X=(0,J.qf)(fa);X=(0,r.Z)(X,4);
var ea=(X[0]+X[2])/2,pa=(X[1]+X[3])/2;return fa.points.map(function(va){va=(0,B.U1)(fa.x+va[0],fa.y+va[1],ea,pa,fa.angle);va=(0,r.Z)(va,2);return[va[0],va[1]]})}},{key:"getPointAtIndexGlobalCoordinates",value:function(fa,X){var ea=0>X?fa.points.length+X:X;X=(0,J.qf)(fa);var pa=(0,r.Z)(X,4);X=(pa[0]+pa[2])/2;pa=(pa[1]+pa[3])/2;ea=fa.points[ea];var va=fa.x,ta=fa.y;return ea?(0,B.U1)(va+ea[0],ta+ea[1],X,pa,fa.angle):(0,B.U1)(va,ta,X,pa,fa.angle)}},{key:"pointFromAbsoluteCoords",value:function(fa,X){var ea=
(0,J.qf)(fa);ea=(0,r.Z)(ea,4);X=(0,B.U1)(X[0],X[1],(ea[0]+ea[2])/2,(ea[1]+ea[3])/2,-fa.angle);X=(0,r.Z)(X,2);return[X[0]-fa.x,X[1]-fa.y]}},{key:"getPointIndexUnderCursor",value:function(fa,X,ea,pa){fa=W.getPointsGlobalCoordinates(fa);for(var va=fa.length;-1<--va;){var ta=fa[va];if((0,B.LW)(ea,pa,ta[0],ta[1])*X.value<W.POINT_HANDLE_SIZE+1)return va}return-1}},{key:"createPointAt",value:function(fa,X,ea,pa){X=(0,B.wC)(X,ea,pa);ea=(0,J.qf)(fa);ea=(0,r.Z)(ea,4);X=(0,B.U1)(X[0],X[1],(ea[0]+ea[2])/2,(ea[1]+
ea[3])/2,-fa.angle);X=(0,r.Z)(X,2);return[X[0]-fa.x,X[1]-fa.y]}},{key:"getNormalizedPoints",value:function(fa){var X=fa.points,ea=X[0][0],pa=X[0][1];return{points:X.map(function(va,ta){return[va[0]-ea,va[1]-pa]}),x:fa.x+ea,y:fa.y+pa}}},{key:"normalizePoints",value:function(fa){(0,H.DR)(fa,W.getNormalizedPoints(fa))}},{key:"duplicateSelectedPoints",value:function(fa){if(!fa.editingLinearElement)return!1;var X=fa.editingLinearElement,ea=X.selectedPointsIndices;X=W.getElement(X.elementId);if(!X||null===
ea)return!1;var pa=X.points,va=[],ta=!1,xa=-1,Ga=pa.reduce(function(Ia,Ya,Fa){if(++xa,Ia.push(Ya),ea.includes(Fa))(Fa=pa[Fa+1])||(ta=!0),Ia.push(Fa?[(Ya[0]+Fa[0])/2,(Ya[1]+Fa[1])/2]:[Ya[0],Ya[1]]),va.push(xa+1),++xa;return Ia},[]);if((0,H.DR)(X,{points:Ga}),ta)Ga=X.points[X.points.length-1],W.movePoints(X,[{index:X.points.length-1,point:[Ga[0]+30,Ga[1]+30]}]);return{appState:D(D({},fa),{},{editingLinearElement:D(D({},fa.editingLinearElement),{},{selectedPointsIndices:va})})}}},{key:"deletePoints",
value:function(fa,X){var ea=0,pa=0;if(X.includes(0)){var va=fa.points.find(function(ta,xa){return!X.includes(xa)});va&&(ea=va[0],pa=va[1])}va=fa.points.reduce(function(ta,xa,Ga){return X.includes(Ga)||ta.push(ta.length?[xa[0]-ea,xa[1]-pa]:[0,0]),ta},[]);W._updatePoints(fa,va,ea,pa)}},{key:"addPoints",value:function(fa,X,ea){X=[].concat((0,v.Z)(fa.points),(0,v.Z)(ea.map(function(pa){return pa.point})));W._updatePoints(fa,X,0,0)}},{key:"movePoints",value:function(fa,X,ea){var pa=fa.points,va=0,ta=0,
xa=X.find(function(Ia){return 0===Ia.index});xa&&(va=xa.point[0]+pa[xa.index][0],ta=xa.point[1]+pa[xa.index][1]);var Ga=pa.map(function(Ia,Ya){var Fa=X.find(function(Ka){return Ka.index===Ya});return Fa?xa?Ia:[Ia[0]+(Fa.point[0]-pa[Fa.index][0]),Ia[1]+(Fa.point[1]-pa[Fa.index][1])]:va||ta?[Ia[0]-va,Ia[1]-ta]:Ia});W._updatePoints(fa,Ga,va,ta,ea)}},{key:"shouldAddMidpoint",value:function(fa,X,ea){if(!W.getElement(fa.elementId))return!1;var pa=fa.pointerDownState.segmentMidpoint;if(pa.added||null===
pa.value||null===pa.index||null===fa.pointerDownState.origin)return!1;fa=fa.pointerDownState.origin;X=(0,B.LW)(fa.x,fa.y,X.x,X.y);return!(!ea.editingLinearElement&&X<O.f/ea.zoom.value)}},{key:"addMidpoint",value:function(fa,X,ea,pa){var va=W.getElement(fa.elementId);if(va){var ta=fa.pointerDownState.segmentMidpoint,xa={pointerDownState:fa.pointerDownState,selectedPointsIndices:fa.selectedPointsIndices};X=W.createPointAt(va,X.x,X.y,pa?ea.gridSize:null);X=[].concat((0,v.Z)(va.points.slice(0,ta.index)),
[X],(0,v.Z)(va.points.slice(ta.index)));return(0,H.DR)(va,{points:X}),xa.pointerDownState=D(D({},fa.pointerDownState),{},{segmentMidpoint:D(D({},fa.pointerDownState.segmentMidpoint),{},{added:!0}),lastClickedPoint:ta.index}),xa.selectedPointsIndices=[ta.index],xa}}},{key:"_updatePoints",value:function(fa,X,ea,pa,va){var ta=(0,V.Ut)(fa,X),xa=(0,V.Ut)(fa,fa.points);ea=(0,B.U1)(ea,pa,(xa[0]+xa[2])/2-(ta[0]+ta[2])/2,(xa[1]+xa[3])/2-(ta[1]+ta[3])/2,fa.angle);(0,H.DR)(fa,D(D({},va),{},{points:X,x:fa.x+
ea[0],y:fa.y+ea[1]}))}},{key:"_getShiftLockedDelta",value:function(fa,X,ea,pa){X=W.getPointGlobalCoordinates(fa,X);ea=(0,B.wC)(ea[0],ea[1],pa);ea=(0,r.Z)(ea,2);X=(0,J.o4)(X[0],X[1],ea[0],ea[1]);return(0,B.xj)([X.width,X.height],[0,0],-fa.angle)}}]),W}();Z.POINT_HANDLE_SIZE=10;Z.getEditorMidPoints=function(W,fa){var X=(0,F.WJ)(W);return!fa.editingLinearElement&&2<W.points.length&&!X?[]:(I===W.version&&U===fa.zoom.value||Z.updateEditorMidPointsCache(W,fa),ia)};Z.updateEditorMidPointsCache=function(W,
fa){for(var X=Z.getPointsGlobalCoordinates(W),ea=0,pa=[];ea<X.length-1;){if(Z.isSegmentTooShort(W,W.points[ea],W.points[ea+1],fa.zoom))pa.push(null);else{var va=Z.getSegmentMidPoint(W,X[ea],X[ea+1],ea+1);pa.push(va)}ea++}ia=pa;I=W.version;U=fa.zoom.value};Z.getSegmentMidpointHitCoords=function(W,fa,X){var ea=Z.getElement(W.elementId);if(!ea||0<=Z.getPointIndexUnderCursor(ea,X.zoom,fa.x,fa.y)||3<=Z.getPointsGlobalCoordinates(ea).length&&!X.editingLinearElement)return null;var pa=Z.POINT_HANDLE_SIZE/
X.zoom.value;if((W=W.segmentMidPointHoveredCoords)&&(0,B.LW)(W[0],W[1],fa.x,fa.y)<=pa)return W;W=0;for(X=Z.getEditorMidPoints(ea,X);W<X.length;){if(null!==X[W]&&(0,B.LW)(X[W][0],X[W][1],fa.x,fa.y)<=pa)return X[W];W++}return null};Z.getBoundTextElementPosition=function(W,fa){var X=Z.getPointsGlobalCoordinates(W);2>X.length&&(0,H.DR)(fa,{isDeleted:!0});if(1==W.points.length%2){var ea=Z.getPointGlobalCoordinates(W,W.points[Math.floor(W.points.length/2)]);W=ea[0]-fa.width/2;fa=ea[1]-fa.height/2}else{var pa=
W.points.length/2-1;ea=ia[pa];2===W.points.length&&(ea=(0,B.H5)(X[0],X[1]));ea&&I===W.version||(ea=Z.getSegmentMidPoint(W,X[pa],X[pa+1],pa+1));W=ea[0]-fa.width/2;fa=ea[1]-fa.height/2}return{x:W,y:fa}};Z.getMinMaxXYWithBoundText=function(W,fa,X){var ea=(0,r.Z)(fa,4);fa=ea[0];var pa=ea[1],va=ea[2];ea=ea[3];var ta=(fa+va)/2,xa=(pa+ea)/2,Ga=Z.getBoundTextElementPosition(W,X),Ia=Ga.x,Ya=Ga.y;Ga=Ia+X.width;var Fa=Ya+X.height;X=(0,B.xj)([fa,pa],[ta,xa],W.angle);var Ka=(0,B.xj)([va,pa],[ta,xa],W.angle),Ba=
(0,B.xj)([Ia,Ya],[ta,xa],-W.angle);Ya=(0,B.xj)([Ga,Ya],[ta,xa],-W.angle);Ia=(0,B.xj)([Ia,Fa],[ta,xa],-W.angle);W=(0,B.xj)([Ga,Fa],[ta,xa],-W.angle);return X[0]<Ka[0]&&X[1]>=Ka[1]?(fa=Math.min(fa,Ia[0]),va=Math.max(va,Math.max(Ya[0],W[0])),pa=Math.min(pa,Ba[1]),ea=Math.max(ea,W[1])):X[0]>=Ka[0]&&X[1]>Ka[1]?(fa=Math.min(fa,W[0]),va=Math.max(va,Math.max(Ba[0],Ya[0])),pa=Math.min(pa,Ia[1]),ea=Math.max(ea,Ya[1])):X[0]>=Ka[0]?(fa=Math.min(fa,Ya[0]),va=Math.max(va,Ia[0]),pa=Math.min(pa,W[1]),ea=Math.max(ea,
Ba[1])):X[1]<=Ka[1]&&(fa=Math.min(fa,Math.min(Ya[0],Ba[0])),va=Math.max(va,W[0]),pa=Math.min(pa,Ya[1]),ea=Math.max(ea,Ia[1])),[fa,pa,va,ea,ta,xa]};Z.getElementAbsoluteCoords=function(W){var fa=1<arguments.length&&void 0!==arguments[1]&&arguments[1];if(2>W.points.length||!M.R.get(W)){var X=W.points.reduce(function(xa,Ga){var Ia=(0,r.Z)(Ga,2);Ga=Ia[0];Ia=Ia[1];return xa.minY=Math.min(xa.minY,Ia),xa.minX=Math.min(xa.minX,Ga),xa.maxX=Math.max(xa.maxX,Ga),xa.maxY=Math.max(xa.maxY,Ia),xa},{minX:1/0,minY:1/
0,maxX:-1/0,maxY:-1/0});var ea=X.minY;var pa=X.maxX;var va=X.maxY;X=X.minX+W.x;ea+=W.y;pa+=W.x;var ta=va+W.y}else X=M.R.generateElementShape(W),X=(0,V.CM)(X[0]),X=(0,V.IX)(X),X=(0,r.Z)(X,4),ea=X[1],pa=X[2],va=X[3],X=X[0]+W.x,ea+=W.y,pa+=W.x,ta=va+W.y;if(va=[X,ea,pa,ta,(X+pa)/2,(ea+ta)/2],!fa)return va;fa=(0,F.WJ)(W);return fa&&(va=Z.getMinMaxXYWithBoundText(W,[X,ea,pa,ta],fa)),va};var aa=function(W){W=(0,v.Z)(new Set(W.filter(function(fa){return null!==fa&&-1!==fa})));return(W=W.sort(function(fa,
X){return fa-X})).length?W:null}},7729:function(g,h,b){function l(H,S){var L=Object.keys(H);if(Object.getOwnPropertySymbols){var T=Object.getOwnPropertySymbols(H);S&&(T=T.filter(function(R){return Object.getOwnPropertyDescriptor(H,R).enumerable}));L.push.apply(L,T)}return L}function m(H){for(var S=1;S<arguments.length;S++){var L=null!=arguments[S]?arguments[S]:{};S%2?l(Object(L),!0).forEach(function(T){(0,D.Z)(H,T,L[T])}):Object.getOwnPropertyDescriptors?Object.defineProperties(H,Object.getOwnPropertyDescriptors(L)):
l(Object(L)).forEach(function(T){Object.defineProperty(H,T,Object.getOwnPropertyDescriptor(L,T))})}return H}b.d(h,{BE:function(){return J},DR:function(){return B},ZP:function(){return V}});var p=b(6655),D=b(7169),v=b(3223),t=b(5153),r=b(5236),f=b(7135),E=b(5475),B=function(H,S){var L,T=!(2<arguments.length&&void 0!==arguments[2])||arguments[2],R=!1,G=S,F=G.points;G=G.fileId;for(var O in void 0!==F&&(S=m(m({},(0,t.k)(F)),S)),S){var M=S[O];if(void 0!==M&&(H[O]!==M||"object"===(0,p.Z)(M)&&null!==M&&
"groupIds"!==O&&"scale"!==O)){if("scale"===O){var I=H[O],ia=M;if(I[0]===ia[0]&&I[1]===ia[1])continue}else if("points"===O&&(I=H[O],ia=M,I.length===ia.length)){for(var U=!1,Z=I.length;--Z;){var aa=I[Z],W=ia[Z];if(aa[0]!==W[0]||aa[1]!==W[1]){U=!0;break}}if(!U)continue}H[O]=M;R=!0}}if(!R)return H;(void 0===S.height&&void 0===S.width&&void 0===G&&void 0===F||E.R.delete(H),H.version++,H.versionNonce=(0,r.LU)(),H.updated=(0,f.C3)(),T)&&(null===(L=v.Z.getScene(H))||void 0===L||L.informMutation());return H},
J=function(H,S){var L=!1,T;for(T in S){var R=S[T];void 0!==R&&(H[T]!==R||"object"===(0,p.Z)(R)&&null!==R)&&(L=!0)}return L?m(m(m({},H),S),{},{updated:(0,f.C3)(),version:H.version+1,versionNonce:(0,r.LU)()}):H},V=function(H,S){return H.version=(null!=S?S:H.version)+1,H.versionNonce=(0,r.LU)(),H.updated=(0,f.C3)(),H}},1829:function(g,h,b){function l(Ga,Ia){var Ya="undefined"!=typeof Symbol&&Ga[Symbol.iterator]||Ga["@@iterator"];if(!Ya){if(Array.isArray(Ga)||(Ya=function(ka,ua){if(ka){if("string"==typeof ka)return m(ka,
ua);var na=Object.prototype.toString.call(ka).slice(8,-1);"Object"===na&&ka.constructor&&(na=ka.constructor.name);if("Map"===na||"Set"===na)return Array.from(ka);if("Arguments"===na||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(na))return m(ka,ua)}}(Ga))||Ia&&Ga&&"number"==typeof Ga.length){Ya&&(Ga=Ya);var Fa=0;Ia=function(){};return{s:Ia,n:function(){return Fa>=Ga.length?{done:!0}:{done:!1,value:Ga[Fa++]}},e:function(ka){throw ka;},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 Ka,Ba=!0,la=!1;return{s:function(){Ya=Ya.call(Ga)},n:function(){var ka=Ya.next();return Ba=ka.done,ka},e:function(ka){la=!0;Ka=ka},f:function(){try{Ba||null==Ya.return||Ya.return()}finally{if(la)throw Ka;}}}}function m(Ga,Ia){(null==Ia||Ia>Ga.length)&&(Ia=Ga.length);for(var Ya=0,Fa=Array(Ia);Ya<Ia;Ya++)Fa[Ya]=Ga[Ya];return Fa}function p(Ga,Ia){var Ya=Object.keys(Ga);if(Object.getOwnPropertySymbols){var Fa=Object.getOwnPropertySymbols(Ga);Ia&&(Fa=Fa.filter(function(Ka){return Object.getOwnPropertyDescriptor(Ga,
Ka).enumerable}));Ya.push.apply(Ya,Fa)}return Ya}function D(Ga){for(var Ia=1;Ia<arguments.length;Ia++){var Ya=null!=arguments[Ia]?arguments[Ia]:{};Ia%2?p(Object(Ya),!0).forEach(function(Fa){(0,r.Z)(Ga,Fa,Ya[Fa])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Ga,Object.getOwnPropertyDescriptors(Ya)):p(Object(Ya)).forEach(function(Fa){Object.defineProperty(Ga,Fa,Object.getOwnPropertyDescriptor(Ya,Fa))})}return Ga}b.d(h,{JZ:function(){return Z},KE:function(){return W},M:function(){return M},
M3:function(){return I},N_:function(){return aa},OL:function(){return pa},Sy:function(){return ta},Up:function(){return O},VL:function(){return U},_N:function(){return xa},vw:function(){return X},y8:function(){return fa}});var v=b(6655),t=b(2577),r=b(7169),f=b(2726),E=b(7135),B=b(5236),J=b(7729),V=b(502),H=b(5734),S=b(3795),L=b(9995),T=b(554),R=b(7041),G="x y strokeColor backgroundColor fillStyle strokeWidth strokeStyle roughness opacity width height angle groupIds frameId roundness boundElements link locked".split(" "),
F=function(Ga,Ia){var Ya,Fa,Ka=Ia.x,Ba=Ia.y,la=Ia.strokeColor;la=void 0===la?R.HN.strokeColor:la;var ka=Ia.backgroundColor;ka=void 0===ka?R.HN.backgroundColor:ka;var ua=Ia.fillStyle;ua=void 0===ua?R.HN.fillStyle:ua;var na=Ia.strokeWidth;na=void 0===na?R.HN.strokeWidth:na;var oa=Ia.strokeStyle;oa=void 0===oa?R.HN.strokeStyle:oa;var La=Ia.roughness;La=void 0===La?R.HN.roughness:La;var Oa=Ia.opacity;Oa=void 0===Oa?R.HN.opacity:Oa;var Va=Ia.width;Va=void 0===Va?0:Va;var Ma=Ia.height;Ma=void 0===Ma?0:
Ma;var Ua=Ia.angle;Ua=void 0===Ua?0:Ua;var ib=Ia.groupIds;ib=void 0===ib?[]:ib;var vb=Ia.frameId;vb=void 0===vb?null:vb;var yb=Ia.roundness;yb=void 0===yb?null:yb;var Wa=Ia.boundElements;Wa=void 0===Wa?null:Wa;var hb=Ia.link;hb=void 0===hb?null:hb;var ab=Ia.locked;ab=void 0===ab?R.HN.locked:ab;Ia=(0,f.Z)(Ia,G);return{id:Ia.id||(0,B.kb)(),type:Ga,x:Ka,y:Ba,width:Va,height:Ma,angle:Ua,strokeColor:la,backgroundColor:ka,fillStyle:ua,strokeWidth:na,strokeStyle:oa,roughness:La,opacity:Oa,groupIds:ib,frameId:vb,
roundness:yb,seed:null!==(Ya=Ia.seed)&&void 0!==Ya?Ya:(0,B.LU)(),version:Ia.version||1,versionNonce:null!==(Fa=Ia.versionNonce)&&void 0!==Fa?Fa:0,isDeleted:!1,boundElements:Wa,updated:(0,E.C3)(),link:hb,locked:ab}},O=function(Ga){return F(Ga.type,Ga)},M=function(Ga){return D(D({},F("embeddable",Ga)),{},{validated:Ga.validated})},I=function(Ga){return(0,J.BE)(D(D({},F("frame",Ga)),{},{type:"frame",name:null}),{})},ia=function(Ga,Ia){return{x:"center"===Ga.textAlign?Ia.width/2:"right"===Ga.textAlign?
Ia.width:0,y:"middle"===Ga.verticalAlign?Ia.height/2:0}},U=function(Ga){var Ia=Ga.fontFamily||R.rk,Ya=Ga.fontSize||R.n5,Fa=Ga.lineHeight||(0,T.PT)(Ia),Ka=(0,T.bG)(Ga.text),Ba=(0,T.X1)(Ka,(0,E.mO)({fontFamily:Ia,fontSize:Ya}),Fa),la=Ga.textAlign||R.Hg,ka=Ga.verticalAlign||R.hs,ua=ia({textAlign:la,verticalAlign:ka},Ba);return(0,J.BE)(D(D({},F("text",Ga)),{},{text:Ka,fontSize:Ya,fontFamily:Ia,textAlign:la,verticalAlign:ka,x:Ga.x-ua.x,y:Ga.y-ua.y,width:Ba.width,height:Ba.height,baseline:Ba.baseline,containerId:Ga.containerId||
null,originalText:Ka,lineHeight:Fa}),{})},Z=function(Ga){var Ia=1<arguments.length&&void 0!==arguments[1]?arguments[1]:Ga.text;if(!Ga.isDeleted){var Ya=(0,T.tl)(Ga);Ya&&(Ia=(0,T.lD)(Ia,(0,E.mO)(Ga),(0,T.iZ)(Ya)));var Fa=(0,T.X1)(Ia,(0,E.mO)(Ga),Ga.lineHeight);Ya=Fa.width;var Ka=Fa.height;Fa=Fa.baseline;var Ba=Ga.textAlign;var la=Ga.verticalAlign;if("center"!==Ba||la!==R.oX.MIDDLE||Ga.containerId){la=(0,H.qf)(Ga);var ka=(0,t.Z)(la,4);la=ka[0];var ua=ka[1],na=ka[2];ka=ka[3];var oa=(0,L.wC)(Ga,Ya,Ka,
!1);oa=(0,t.Z)(oa,4);Ba=(0,S.yq)({s:!0,e:"center"===Ba||"left"===Ba,w:"center"===Ba||"right"===Ba},Ga.x,Ga.y,Ga.angle,(la-oa[0])/2,(ua-oa[1])/2,(na-oa[2])/2,(ka-oa[3])/2);la=(0,t.Z)(Ba,2);Ba=la[0];la=la[1]}else Ba=(0,T.X1)(Ga.text,(0,E.mO)(Ga),Ga.lineHeight),la=ia(Ga,{width:Ya-Ba.width,height:Ka-Ba.height}),Ba=Ga.x-la.x,la=Ga.y-la.y;Ya={width:Ya,height:Ka,baseline:Fa,x:Number.isFinite(Ba)?Ba:Ga.x,y:Number.isFinite(la)?la:Ga.y};return D({text:Ia},Ya)}},aa=function(Ga,Ia){Ia.text;var Ya=Ia.isDeleted;
Ia=Ia.originalText;return(0,J.BE)(Ga,D({originalText:Ia,isDeleted:null!=Ya?Ya:Ga.isDeleted},Z(Ga,Ia)))},W=function(Ga){return D(D({},F(Ga.type,Ga)),{},{points:Ga.points||[],pressures:[],simulatePressure:Ga.simulatePressure,lastCommittedPoint:null})},fa=function(Ga){return D(D({},F(Ga.type,Ga)),{},{points:Ga.points||[],lastCommittedPoint:null,startBinding:null,endBinding:null,startArrowhead:Ga.startArrowhead||null,endArrowhead:Ga.endArrowhead||null})},X=function(Ga){var Ia,Ya,Fa;return D(D({},F("image",
Ga)),{},{strokeColor:"transparent",status:null!==(Ia=Ga.status)&&void 0!==Ia?Ia:"pending",fileId:null!==(Ya=Ga.fileId)&&void 0!==Ya?Ya:null,scale:null!==(Fa=Ga.scale)&&void 0!==Fa?Fa:[1,1]})},ea=function Ya(Ia){var Fa=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0;if(null==Ia||"object"!==(0,v.Z)(Ia))return Ia;if("[object Object]"===Object.prototype.toString.call(Ia)){var Ka="function"==typeof Ia.constructor?Object.create(Object.getPrototypeOf(Ia)):{},Ba;for(Ba in Ia)Ia.hasOwnProperty(Ba)&&
(0!==Fa||"shape"!==Ba&&"canvas"!==Ba)&&(Ka[Ba]=Ya(Ia[Ba],Fa+1));return Ka}if(Array.isArray(Ia)){Ka=Ia.length;for(Ba=Array(Ka);Ka--;)Ba[Ka]=Ya(Ia[Ka],Fa+1);return Ba}return Ia},pa=function(Ia){return ea(Ia)},va=function(Ia){if((0,E.h2)()&&Ia){var Ya,Fa,Ka="".concat(Ia,"_copy");return null!==(Ya=window.h)&&void 0!==Ya&&null!==(Fa=Ya.app)&&void 0!==Fa&&Fa.getSceneElementsIncludingDeleted().find(function(Ba){return Ba.id===Ka})&&(Ka+="_copy"),Ka}return(0,B.kb)()},ta=function(Ia,Ya,Fa,Ka){Fa=ea(Fa);return Fa.id=
va(Fa.id),Fa.boundElements=null,Fa.updated=(0,E.C3)(),Fa.seed=(0,B.LU)(),Fa.groupIds=(0,V.Qy)(Fa.groupIds,Ia,function(Ba){return Ya.has(Ba)||Ya.set(Ba,va(Ba)),Ya.get(Ba)}),Ka&&(Fa=Object.assign(Fa,Ka)),Fa},xa=function(Ia,Ya){var Fa,Ka=[],Ba=(0,E.xn)(Ia),la=new Map,ka=function(Ma){if(la.has(Ma))return la.get(Ma);if(Ba.has(Ma)){var Ua=va(Ma);return la.set(Ma,Ua),Ua}return null},ua=new Map;Ia=l(Ia);try{for(Ia.s();!(Fa=Ia.n()).done;){var na=Fa.value,oa=ea(na);if(oa.id=ka(na.id),null!=Ya&&Ya.randomizeSeed&&
(oa.seed=(0,B.LU)(),(0,J.ZP)(oa)),oa.groupIds&&(oa.groupIds=oa.groupIds.map(function(Ma){return ua.has(Ma)||ua.set(Ma,va(Ma)),ua.get(Ma)})),"containerId"in oa&&oa.containerId){var La=ka(oa.containerId);oa.containerId=La}if("boundElements"in oa&&oa.boundElements&&(oa.boundElements=oa.boundElements.reduce(function(Ma,Ua){var ib=ka(Ua.id);return ib&&Ma.push(D(D({},Ua),{},{id:ib})),Ma},[])),"endBinding"in oa&&oa.endBinding){var Oa=ka(oa.endBinding.elementId);oa.endBinding=Oa?D(D({},oa.endBinding),{},
{elementId:Oa}):null}if("startBinding"in oa&&oa.startBinding){var Va=ka(oa.startBinding.elementId);oa.startBinding=Va?D(D({},oa.startBinding),{},{elementId:Va}):null}oa.frameId&&(oa.frameId=ka(oa.frameId));Ka.push(oa)}}catch(Ma){Ia.e(Ma)}finally{Ia.f()}return Ka}},9798:function(g,h,b){function l(X,ea){var pa="undefined"!=typeof Symbol&&X[Symbol.iterator]||X["@@iterator"];if(!pa){if(Array.isArray(X)||(pa=function(Ia,Ya){if(Ia){if("string"==typeof Ia)return m(Ia,Ya);var Fa=Object.prototype.toString.call(Ia).slice(8,
-1);"Object"===Fa&&Ia.constructor&&(Fa=Ia.constructor.name);if("Map"===Fa||"Set"===Fa)return Array.from(Ia);if("Arguments"===Fa||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Fa))return m(Ia,Ya)}}(X))||ea&&X&&"number"==typeof X.length){pa&&(X=pa);var va=0;ea=function(){};return{s:ea,n:function(){return va>=X.length?{done:!0}:{done:!1,value:X[va++]}},e:function(Ia){throw Ia;},f:ea}}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 ta,xa=!0,Ga=!1;return{s:function(){pa=pa.call(X)},n:function(){var Ia=pa.next();return xa=Ia.done,Ia},e:function(Ia){Ga=!0;ta=Ia},f:function(){try{xa||null==pa.return||pa.return()}finally{if(Ga)throw ta;}}}}function m(X,ea){(null==ea||ea>X.length)&&(ea=X.length);for(var pa=0,va=Array(ea);pa<ea;pa++)va[pa]=X[pa];return va}function p(X,ea){var pa=Object.keys(X);if(Object.getOwnPropertySymbols){var va=Object.getOwnPropertySymbols(X);ea&&(va=va.filter(function(ta){return Object.getOwnPropertyDescriptor(X,
ta).enumerable}));pa.push.apply(pa,va)}return pa}function D(X){for(var ea=1;ea<arguments.length;ea++){var pa=null!=arguments[ea]?arguments[ea]:{};ea%2?p(Object(pa),!0).forEach(function(va){(0,r.Z)(X,va,pa[va])}):Object.getOwnPropertyDescriptors?Object.defineProperties(X,Object.getOwnPropertyDescriptors(pa)):p(Object(pa)).forEach(function(va){Object.defineProperty(X,va,Object.getOwnPropertyDescriptor(pa,va))})}return X}b.d(h,{LM:function(){return Z},T:function(){return fa},vY:function(){return I},
xx:function(){return W}});var v=b(2726),t=b(1930),r=b(7169),f=b(2577),E=b(7041),B=b(5153),J=b(3795),V=b(9995),H=b(9472),S=b(7729),L=b(7135),T=b(7267),R=b(3223),G=b(554),F=b(8627),O=["boundTextFontSize"],M=function(X){return 0>X?X+2*Math.PI:X>=2*Math.PI?X-2*Math.PI:X},I=function(X,ea,pa,va,ta,xa,Ga,Ia,Ya,Fa,Ka){if(1===pa.length){pa=(0,f.Z)(pa,1)[0];if("rotation"===ea){var Ba;ea=(0,V.qf)(pa);xa=(0,f.Z)(ea,4);ea=(xa[0]+xa[2])/2;xa=(xa[1]+xa[3])/2;(0,H.He)(pa)?Ba=0:(Ba=5*Math.PI/2+Math.atan2(Ya-xa,Ia-
ea),ta&&(Ba+=E.ay/2,Ba-=Ba%E.ay),Ba=M(Ba));ea=(0,G.xB)(pa);if((0,S.DR)(pa,{angle:Ba}),ea){var la;(xa=null===(la=R.Z.getScene(pa))||void 0===la?void 0:la.getElement(ea))&&!(0,H.Yv)(pa)&&(0,S.DR)(xa,{angle:Ba})}(0,T.Ww)(pa)}else if(!(0,H.iB)(pa)||"nw"!==ea&&"ne"!==ea&&"sw"!==ea&&"se"!==ea){if(ea)a:{Fa=X.originalElements;var ka=Fa.get(pa.id);Ba=(0,V.wC)(ka,ka.width,ka.height,!0);Ba=(0,f.Z)(Ba,4);la=[Ba[0],Ba[1]];ta=[Ba[2],Ba[3]];Ba=(0,J.H5)(la,ta);X=(0,J.xj)([Ia,Ya],Ba,-ka.angle);Ia=(0,V.wC)(pa,pa.width,
pa.height,!0);Ia=(0,f.Z)(Ia,4);Ka=Ia[2]-Ia[0];var ua=Ia[3]-Ia[1],na=(ta[0]-la[0])/Ka;va=(ta[1]-la[1])/ua;Ya={};Ia=(0,G.WJ)(pa);ea.includes("e")&&(na=(X[0]-la[0])/Ka);ea.includes("s")&&(va=(X[1]-la[1])/ua);ea.includes("w")&&(na=(ta[0]-X[0])/Ka);ea.includes("n")&&(va=(ta[1]-X[1])/ua);Ka=ka.width;ua=ka.height;X=pa.width*na;va*=pa.height;if(xa&&(X=2*X-Ka,va=2*va-ua),Ga){na=Math.abs(X)/Ka;var oa=Math.abs(va)/ua;if(1===ea.length&&(va*=na,X*=oa),2===ea.length)na=Math.max(na,oa),X=Ka*na*Math.sign(X),va=ua*
na*Math.sign(va)}if(Ia)if(Fa=Fa.get(Ia.id),Fa&&(Ya={fontSize:Fa.fontSize,baseline:Fa.baseline}),Ga){Ya=D(D({},pa),{},{width:X,height:va});Ya=U(Ia,(0,G.iZ)(Ya),(0,G.D9)(Ya,Ia));if(null===Ya)break a;Ya={fontSize:Ya.size,baseline:Ya.baseline}}else Fa=(0,G.AT)((0,L.mO)(Ia),Ia.lineHeight),Ka=(0,G.w_)(Ia.fontSize,Ia.lineHeight),X=Math.ceil(Math.max(X,Fa)),va=Math.ceil(Math.max(va,Ka));Fa=(0,V.wC)(ka,X,va,!0);na=(0,f.Z)(Fa,4);Ka=na[0];ua=na[1];Fa=na[2];na=na[3];oa=Fa-Ka;var La=na-ua,Oa=[].concat(la);if(["n",
"w","nw"].includes(ea)&&(Oa=[ta[0]-Math.abs(oa),ta[1]-Math.abs(La)]),"ne"===ea)Oa=[la[0],ta[1]],Oa=[Oa[0],Oa[1]-Math.abs(La)];"sw"===ea&&(la=[ta[0],la[1]],Oa=[la[0]-Math.abs(oa),la[1]]);Ga&&(["s","n"].includes(ea)&&(Oa[0]=Ba[0]-oa/2),["e","w"].includes(ea)&&(Oa[1]=Ba[1]-La/2));0>X&&(ea.includes("e")&&(Oa[0]-=Math.abs(oa)),ea.includes("w")&&(Oa[0]+=Math.abs(oa)));0>va&&(ea.includes("s")&&(Oa[1]-=Math.abs(La)),ea.includes("n")&&(Oa[1]+=Math.abs(La)));xa&&(Oa[0]=Ba[0]-Math.abs(oa)/2,Oa[1]=Ba[1]-Math.abs(La)/
2);var Va,Ma;xa=ka.angle;la=(0,J.xj)(Oa,Ba,xa);Ba=(0,J.xj)([Oa[0]+Math.abs(oa)/2,Oa[1]+Math.abs(La)/2],Ba,xa);Oa=(0,J.xj)(la,Ba,-xa);((0,H.bt)(pa)||(0,H.F9)(pa))&&(Va=(0,B.z)(1,va,ka.points,!0),Ma=(0,B.z)(0,X,Va,!0));xa=(0,t.Z)(Oa);xa[0]+=ka.x-Ka;xa[1]+=ka.y-ua;xa={width:Math.abs(X),height:Math.abs(va),x:xa[0],y:xa[1],points:Ma};if("scale"in pa&&"scale"in ka&&(0,S.DR)(pa,{scale:[(Math.sign(Fa-ka.x)||ka.scale[0])*ka.scale[0],(Math.sign(na-ka.y)||ka.scale[1])*ka.scale[1]]}),(0,H.Yv)(pa)&&Ia&&Ga){Ma=
xa.width/pa.width*Ia.fontSize;if(Ma<E.CP)break a;Ya.fontSize=Ma}0!==xa.width&&0!==xa.height&&Number.isFinite(xa.x)&&Number.isFinite(xa.y)&&((0,S.DR)(pa,xa),(0,T.Ww)(pa,{newSize:{width:xa.width,height:xa.height}}),Ia&&null!=Ya&&(0,S.DR)(Ia,{fontSize:Ya.fontSize,baseline:Ya.baseline}),(0,G.RB)(pa,ea,Ga))}}else{Ga=(0,V.qf)(pa);Ma=(0,f.Z)(Ga,4);la=Ma[0];Va=Ma[1];Ga=Ma[2];Ma=Ma[3];Ba=(0,J.U1)(Ia,Ya,(la+Ga)/2,(Va+Ma)/2,-pa.angle);Ia=(0,f.Z)(Ba,2);Ba=Ia[0];Ia=Ia[1];switch(ea){case "se":ka=Math.max((Ba-la)/
(Ga-la),(Ia-Va)/(Ma-Va));break;case "nw":ka=Math.max((Ga-Ba)/(Ga-la),(Ma-Ia)/(Ma-Va));break;case "ne":ka=Math.max((Ba-la)/(Ga-la),(Ma-Ia)/(Ma-Va));break;case "sw":ka=Math.max((Ga-Ba)/(Ga-la),(Ia-Va)/(Ma-Va))}0<ka&&(Ba=pa.width*ka,ka*=pa.height,Ia=U(pa,Ba,ka),null!==Ia&&(Ya=(0,V.wC)(pa,Ba,ka,!1),Ya=(0,f.Z)(Ya,4),la=(la-Ya[0])/2,Va=(Va-Ya[1])/2,Ga=(Ga-Ya[2])/2,Ma=(Ma-Ya[3])/2,Ya=J.yq,ea={n:/^(n|ne|nw)$/.test(ea)||xa&&/^(s|se|sw)$/.test(ea),s:/^(s|se|sw)$/.test(ea)||xa&&/^(n|ne|nw)$/.test(ea),w:/^(w|nw|sw)$/.test(ea)||
xa&&/^(e|ne|se)$/.test(ea),e:/^(e|ne|se)$/.test(ea)||xa&&/^(w|nw|sw)$/.test(ea)},ea=Ya.call(J,ea,pa.x,pa.y,pa.angle,la,Va,Ga,Ma),ea=(0,f.Z)(ea,2),(0,S.DR)(pa,{fontSize:Ia.size,width:Ba,height:ka,baseline:Ia.baseline,x:ea[0],y:ea[1]})));(0,T.Ww)(pa)}return!0}if(1<pa.length){if("rotation"===ea)return aa(X,pa,Ia,Ya,ta,Fa,Ka),!0;if("nw"===ea||"ne"===ea||"sw"===ea||"se"===ea)return Z(X,pa,ea,xa,Ia,Ya),!0}return!1},ia=function(X,ea,pa,va){return(0,H.bt)(X)||(0,H.F9)(X)?{points:(0,B.z)(0,ea,(0,B.z)(1,pa,
X.points,va),va)}:{}},U=function(X,ea,pa){var va=X.width;if((0,H.Xh)(X)){var ta=(0,G.tl)(X);ta&&(va=(0,G.iZ)(ta))}ea=ea/va*X.fontSize;if(ea<E.CP)return null;X=(0,G.X1)(X.text,(0,L.mO)({fontSize:ea,fontFamily:X.fontFamily}),X.lineHeight);return{size:ea,baseline:X.baseline+(pa-X.height)}},Z=function(X,ea,pa,va,ta,xa){var Ga;ea=ea.reduce(function(xc,oc){var pc=X.originalElements.get(oc.id);return pc&&xc.push({orig:pc,latest:oc}),xc},[]);var Ia=ea.reduce(function(xc,oc){var pc;oc=oc.orig;if(!(0,H.bt)(oc))return xc;
var Cc=(0,G.xB)(oc);if(!Cc)return xc;Cc=null!==(pc=X.originalElements.get(Cc))&&void 0!==pc?pc:null;if(!(0,H.Xh)(Cc))return xc;pc=F._.getBoundTextElementPosition(oc,Cc);return[].concat((0,t.Z)(xc),[D(D({},Cc),pc)])},[]),Ya=(0,V.v2)(ea.map(function(xc){return xc.orig}).concat(Ia)),Fa=Ya.minX,Ka=Ya.minY,Ba=Ya.maxX,la=Ya.maxY;Ia=Ya.midX;Ya=Ya.midY;Ya=(0,f.Z)(va?[Ia,Ya]:{ne:[Fa,la],se:[Fa,Ka],sw:[Ba,Ka],nw:[Ba,la]}[pa],2);Ia=Ya[0];Ya=Ya[1];var ka=Math.max(Math.abs(ta-Ia)/(Ba-Fa)||0,Math.abs(xa-Ya)/(la-
Ka)||0)*(va?2:1);if(0!==ka){var ua;va={ne:[ta>=Ia,xa<=Ya],se:[ta>=Ia,xa>=Ya],sw:[ta<=Ia,xa>=Ya],nw:[ta<=Ia,xa<=Ya]}[pa].map(function(xc){return xc?1:-1});va=(0,f.Z)(va,2);ta=va[0];xa=va[1];var na=0>ta,oa=0>xa;va=[];Fa=l(ea);try{for(Fa.s();!(ua=Fa.n()).done;){var La,Oa=ua.value,Va=Oa.orig,Ma=Oa.latest;if(!(0,H.iB)(Va)||!(0,H.Xh)(Va)){var Ua=Va.width*ka,ib=Va.height*ka,vb=M(Va.angle*ta*xa),yb=(0,H.bt)(Va)||(0,H.F9)(Va),Wa=Ia+ta*((Va.x-Ia)*ka+(na&&!yb?Ua:0)),hb=Ya+xa*((Va.y-Ya)*ka+(oa&&!yb?ib:0)),ab=
ia(Va,Ua*ta,ib*xa,!1),Qa=D({x:Wa,y:hb,width:Ua,height:ib,angle:vb},ab);if((0,H.pC)(Va)&&1===ea.length&&(Qa.scale=[Va.scale[0]*ta,Va.scale[1]*xa]),(0,H.bt)(Va)&&(na||oa)&&function(){var xc=(0,V.Ut)(Va,Va.points),oc=(0,V.Ut)(D(D({},Va),{},{x:Wa,y:hb}),ab.points),pc=[Va.x,Va.y],Cc=[Wa,hb],bd=function(dc){dc="x"===dc?0:1;return(oc[dc+2]-Cc[dc]-(pc[dc]-xc[dc])*ka+(xc[dc+2]-pc[dc])*ka-(Cc[dc]-oc[dc]))/2};na&&(Qa.x-=bd("x"));oa&&(Qa.y-=bd("y"))}(),(0,H.iB)(Va)){var bb=U(Va,Ua,ib);if(!bb)return;Qa.fontSize=
bb.size;Qa.baseline=bb.baseline}var Pa=X.originalElements.get(null!==(La=(0,G.xB)(Va))&&void 0!==La?La:"");if(Pa){var Lb=Pa.fontSize*ka;if(Lb<E.CP)return;Qa.boundTextFontSize=Lb}va.push({element:Ma,update:Qa})}}}catch(xc){Fa.e(xc)}finally{Fa.f()}ua=va.map(function(xc){return xc.element});for(La=0;La<va.length;La++)Ma=va[La],Oa=Ma.element,Ua=Ma.update,Ma=Ua.boundTextFontSize,ib=(0,v.Z)(Ua,O),vb=ib.width,yb=ib.height,Ua=ib.angle,(0,S.DR)(Oa,ib,!1),(0,T.Ww)(Oa,{simultaneouslyUpdated:ua,newSize:{width:vb,
height:yb}}),(ib=(0,G.WJ)(Oa))&&Ma&&((0,S.DR)(ib,{fontSize:Ma,angle:(0,H.bt)(Oa)?void 0:Ua},!1),(0,G.RB)(Oa,pa,!0));null===(Ga=R.Z.getScene(va[0].element))||void 0===Ga||Ga.informMutation()}},aa=function(X,ea,pa,va,ta,xa,Ga){var Ia,Ya=5*Math.PI/2+Math.atan2(va-Ga,pa-xa);ta&&(Ya+=E.ay/2,Ya-=Ya%E.ay);ea.filter(function(Fa){return"frame"!==Fa.type}).forEach(function(Fa){var Ka,Ba,la=(0,V.qf)(Fa),ka=(0,f.Z)(la,4);la=(ka[0]+ka[2])/2;ka=(ka[1]+ka[3])/2;var ua=null!==(Ka=null===(Ba=X.originalElements.get(Fa.id))||
void 0===Ba?void 0:Ba.angle)&&void 0!==Ka?Ka:Fa.angle;Ka=(0,J.U1)(la,ka,xa,Ga,Ya+ua-Fa.angle);Ba=(0,f.Z)(Ka,2);Ka=Ba[0];Ba=Ba[1];(0,S.DR)(Fa,{x:Fa.x+(Ka-la),y:Fa.y+(Ba-ka),angle:M(Ya+ua)},!1);(0,T.Ww)(Fa,{simultaneouslyUpdated:ea});var na=(0,G.WJ)(Fa);na&&!(0,H.Yv)(Fa)&&(0,S.DR)(na,{x:na.x+(Ka-la),y:na.y+(Ba-ka),angle:M(Ya+ua)},!1)});null===(Ia=R.Z.getScene(ea[0]))||void 0===Ia||Ia.informMutation()},W=function(X,ea,pa,va){var ta=1===ea.length?(0,V.qf)(ea[0]):(0,V.KP)(ea),xa=(0,f.Z)(ta,4);ta=xa[0];
var Ga=xa[1],Ia=xa[2];xa=xa[3];ea=1===ea.length?ea[0].angle:0;pa=(0,J.U1)(pa,va,(ta+Ia)/2,(Ga+xa)/2,-ea);var Ya=(0,f.Z)(pa,2);switch(pa=Ya[0],va=Ya[1],X){case "n":return(0,J.U1)(pa-(ta+Ia)/2,va-Ga,0,0,ea);case "s":return(0,J.U1)(pa-(ta+Ia)/2,va-xa,0,0,ea);case "w":return(0,J.U1)(pa-ta,va-(Ga+xa)/2,0,0,ea);case "e":return(0,J.U1)(pa-Ia,va-(Ga+xa)/2,0,0,ea);case "nw":return(0,J.U1)(pa-ta,va-Ga,0,0,ea);case "ne":return(0,J.U1)(pa-Ia,va-Ga,0,0,ea);case "sw":return(0,J.U1)(pa-ta,va-xa,0,0,ea);case "se":return(0,J.U1)(pa-
Ia,va-xa,0,0,ea);default:return[0,0]}},fa=function(X,ea){ea=(0,f.Z)(ea.points,2);var pa=(0,f.Z)(ea[1],2);ea=pa[0];pa=pa[1];return"nw"===X&&(0>ea||0>pa)||"ne"===X&&0<=ea||"sw"===X&&0>=ea||"se"===X&&(0<ea||0<pa)?"end":"origin"}},9799:function(g,h,b){b.d(h,{PZ:function(){return r},QD:function(){return t},Qp:function(){return B},o4:function(){return E},uK:function(){return f}});var l=b(2577),m=(b(7729),b(9472)),p=b(7041),D=b(9995),v=b(7135),t=function(J){return(0,m.bt)(J)||(0,m.F9)(J)?2>J.points.length:
0===J.width&&0===J.height},r=function(J,V,H,S){J=(0,D.Pi)(J);var L=(0,l.Z)(J,4);J=L[0];var T=L[1],R=L[2];L=L[3];var G=(0,v.dE)({clientX:S.offsetLeft,clientY:S.offsetTop},S);V=(0,v.dE)({clientX:S.offsetLeft+V,clientY:S.offsetTop+H},S);return G.x<=R&&G.y<=L&&V.x>=J&&V.y>=T},f=function(J,V,H){var S=Math.abs(V),L=Math.abs(H);"line"===J||"arrow"===J||"freedraw"===J?(J=Math.round(Math.atan(L/S)/p.ay)*p.ay,0===J?H=0:J===Math.PI/2?V=0:H=S*Math.tan(J)*Math.sign(H)||H):"selection"!==J&&(H=S*Math.sign(H));return{width:V,
height:H}},E=function(J,V,H,S){var L=H-J,T=S-V,R=Math.round(Math.atan(T/L)/p.ay)*p.ay;if(0===R)T=0;else if(R===Math.PI/2)L=0;else{T=Math.tan(R);R=V-T*J;var G=-1/T;H=S-G*H;L=(-1*H- -1*R)/(-1*T- -1*G)-J;T=(R*G-H*T)/(-1*T- -1*G)-V}return{width:L,height:T}},B=function(J){var V={width:J.width,height:J.height,x:J.x,y:J.y};if(0>J.width){var H=Math.abs(J.width);V.width=H;V.x=J.x-H}0>J.height&&(H=Math.abs(J.height),V.height=H,V.y=J.y-H);return V}},554:function(g,h,b){function l(Wa,hb){var ab=Object.keys(Wa);
if(Object.getOwnPropertySymbols){var Qa=Object.getOwnPropertySymbols(Wa);hb&&(Qa=Qa.filter(function(bb){return Object.getOwnPropertyDescriptor(Wa,bb).enumerable}));ab.push.apply(ab,Qa)}return ab}function m(Wa){for(var hb=1;hb<arguments.length;hb++){var ab=null!=arguments[hb]?arguments[hb]:{};hb%2?l(Object(ab),!0).forEach(function(Qa){(0,t.Z)(Wa,Qa,ab[Qa])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Wa,Object.getOwnPropertyDescriptors(ab)):l(Object(ab)).forEach(function(Qa){Object.defineProperty(Wa,
Qa,Object.getOwnPropertyDescriptor(ab,Qa))})}return Wa}b.d(h,{$2:function(){return aa},AT:function(){return Ga},D9:function(){return Ua},FE:function(){return ia},H_:function(){return ka},NS:function(){return Va},OW:function(){return oa},P7:function(){return M},PT:function(){return yb},R8:function(){return Z},RB:function(){return I},Rg:function(){return W},TP:function(){return Ba},WJ:function(){return Fa},X1:function(){return U},Zr:function(){return Oa},aV:function(){return na},bG:function(){return F},
cn:function(){return ua},cw:function(){return la},eB:function(){return ib},iZ:function(){return Ma},lD:function(){return va},mY:function(){return ea},oN:function(){return O},tl:function(){return Ka},w_:function(){return fa},xB:function(){return Ya}});var p,D=b(2577),v=b(1930),t=b(7169),r=b(7135),f=b(7729),E=b(7041),B=b(3223),J=b(5734),V=b(9472),H=b(8627),S=b(9547),L=b(4238),T=b(3716),R,G,F=function(Wa){return Wa.replace(/\t/g," ").replace(/\r?\n|\r/g,"\n")},O=function(Wa,hb){var ab=void 0,
Qa={x:Wa.x,y:Wa.y,text:Wa.text,width:Wa.width,height:Wa.height,baseline:Wa.baseline};Qa.text=Wa.text;hb&&(ab=Ma(hb,Wa),Qa.text=va(Wa.originalText,(0,r.mO)(Wa),ab));ab=U(Qa.text,(0,r.mO)(Wa),Wa.lineHeight);if(Qa.width=ab.width,Qa.height=ab.height,Qa.baseline=ab.baseline,hb){var bb=Ua(hb,Wa),Pa=Ma(hb);ab.height>bb&&(bb=Va(ab.height,hb.type),(0,f.DR)(hb,{height:bb}),(0,T.h_)(hb.id,bb));ab.width>Pa&&(ab=Va(ab.width,hb.type),(0,f.DR)(hb,{width:ab}));ab=m(m({},Wa),Qa);hb=ia(hb,ab);ab=hb.y;Qa.x=hb.x;Qa.y=
ab}(0,f.DR)(Wa,Qa)},M=function(Wa,hb,ab){var Qa=(0,r.xn)(Wa);hb.forEach(function(bb){var Pa=ab.get(bb.id),Lb=Ya(bb);if(Lb){var xc=ab.get(Lb);if(xc){var oc=Qa.get(Pa);oc&&(0,f.DR)(oc,{boundElements:(bb.boundElements||[]).filter(function(pc){return pc.id!==xc&&pc.id!==Lb}).concat({type:"text",id:xc})});(bb=Qa.get(xc))&&(0,J.iB)(bb)&&(0,f.DR)(bb,{containerId:oc?Pa:null})}}})},I=function(Wa,hb){var ab=2<arguments.length&&void 0!==arguments[2]&&arguments[2],Qa=Ya(Wa);if(Qa){(0,T.kT)(Wa.id);var bb=B.Z.getScene(Wa).getElement(Qa);
if(bb&&bb.text&&Wa){Qa=(bb=B.Z.getScene(Wa).getElement(Qa)).text;var Pa=bb.height,Lb=bb.width,xc=Ma(Wa),oc=Ua(Wa,bb),pc=bb.baseline;if(ab||"n"!==hb&&"s"!==hb)Qa&&=va(bb.originalText,(0,r.mO)(bb),xc),pc=U(Qa,(0,r.mO)(bb),bb.lineHeight),Pa=pc.height,Lb=pc.width,pc=pc.baseline;Pa>oc&&(oc=(ab=Va(Pa,Wa.type))-Wa.height,oc=(0,V.Yv)(Wa)||"ne"!==hb&&"nw"!==hb&&"n"!==hb?Wa.y:Wa.y-oc,(0,f.DR)(Wa,{height:ab,y:oc}));(0,f.DR)(bb,{text:Qa,width:Lb,height:Pa,baseline:pc});(0,V.Yv)(Wa)||(0,f.DR)(bb,ia(Wa,bb))}}},
ia=function(Wa,hb){if((0,V.Yv)(Wa))return H._.getBoundTextElementPosition(Wa,hb);var ab,Qa=la(Wa),bb=Ua(Wa,hb);Wa=Ma(Wa);return ab=hb.verticalAlign===E.oX.TOP?Qa.y:hb.verticalAlign===E.oX.BOTTOM?Qa.y+(bb-hb.height):Qa.y+(bb/2-hb.height/2),{x:hb.textAlign===E.I8.LEFT?Qa.x:hb.textAlign===E.I8.RIGHT?Qa.x+(Wa-hb.width):Qa.x+(Wa/2-hb.width/2),y:ab}},U=function(Wa,hb,ab){Wa=Wa.split("\n").map(function(bb){return bb||" "}).join("\n");var Qa=parseFloat(hb);Qa=pa(Wa,Qa,ab);return{width:ea(Wa,hb),height:Qa,
baseline:Z(Wa,hb,ab)}},Z=function(Wa,hb,ab,Qa){var bb=document.createElement("div");bb.style.position="absolute";bb.style.whiteSpace="pre";bb.style.font=hb;bb.style.minHeight="1em";Qa&&(bb.style.overflow="hidden",bb.style.wordBreak="break-word",bb.style.whiteSpace="pre-wrap");bb.style.lineHeight=String(ab);bb.innerText=Wa;document.body.appendChild(bb);Qa=document.createElement("span");Qa.style.display="inline-block";Qa.style.overflow="hidden";Qa.style.width="1px";Qa.style.height="1px";bb.appendChild(Qa);
Qa=Qa.offsetTop+Qa.offsetHeight;var Pa=bb.offsetHeight;if(E.G6){var Lb=pa(Wa,parseFloat(hb),ab);hb=parseFloat(hb);Wa=pa(Wa,Math.round(hb),ab);Lb>Pa&&(Qa+=Lb-Wa);Pa>Lb&&(Qa-=Wa-Lb)}return document.body.removeChild(bb),Qa},aa=function(Wa){var hb=F(Wa.text).split("\n").length;return Wa.height/hb/Wa.fontSize},W=function(Wa,hb){return Wa*hb},fa=function(Wa,hb){return Wa*hb+2*E.gK},X=function(Wa,hb){R||=document.createElement("canvas");var ab=R.getContext("2d");ab.font=hb;Wa=ab.measureText(Wa).width;return(0,r.h2)()?
10*Wa:Wa},ea=function(Wa,hb){var ab=0;return F(Wa).split("\n").forEach(function(Qa){ab=Math.max(ab,X(Qa,hb))}),ab},pa=function(Wa,hb,ab){Wa=F(Wa).split("\n").length;return hb*ab*Wa},va=function(Wa,hb,ab){if(!Number.isFinite(ab)||0>ab)return Wa;var Qa=[];Wa=Wa.split("\n");var bb=X(" ",hb),Pa="",Lb=0,xc=function(pc){pc.trim()&&Qa.push(pc)},oc=function(){Pa="";Lb=0};return Wa.forEach(function(pc){if(ea(pc,hb)<=ab)Qa.push(pc);else{pc=function(Nc){var Qc=Nc.split("-");return 1<Qc.length&&Qc.forEach(function(Ad,
Xc){Xc!==Qc.length-1&&(Qc[Xc]=Ad+"-")}),Qc.join(" ").split(" ")}(pc);oc();for(var Cc=0;Cc<pc.length;){var bd=X(pc[Cc],hb);if(bd===ab)xc(pc[Cc]),Cc++;else if(bd>ab){xc(Pa);for(oc();0<pc[Cc].length;){bd=String.fromCodePoint(pc[Cc].codePointAt(0));var dc=ta.calculate(bd,hb);Lb+=dc;pc[Cc]=pc[Cc].slice(bd.length);Lb>=ab?(xc(Pa),Pa=bd,Lb=dc):Pa+=bd}Lb+bb>=ab?(xc(Pa),oc()):Pa.endsWith("-")||(Pa+=" ",Lb+=bb);Cc++}else for(;Lb<ab&&Cc<pc.length;){bd=pc[Cc];if((Lb=X(Pa+bd,hb))>ab){xc(Pa);oc();break}Cc++;dc=
!bd.endsWith("-");if(Pa+=bd,dc&&(Pa+=" "),Lb+bb>=ab){dc?Qa.push(Pa.slice(0,-1)):Qa.push(Pa);oc();break}}}" "===Pa.slice(-1)&&(Pa=Pa.slice(0,-1),xc(Pa))}}),Qa.join("\n")},ta=(G={},{calculate:function(Wa,hb){var ab=Wa.charCodeAt(0);(G[hb]||(G[hb]=[]),G[hb][ab])||(Wa=X(Wa,hb),G[hb][ab]=Wa);return G[hb][ab]},getCache:function(Wa){return G[Wa]}}),xa="ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789".toLocaleUpperCase(),Ga=function(Wa,hb){var ab=Ia(Wa);return 0===ab?U(xa.split("").join("\n"),Wa,hb).width+2*E.gK:ab+
2*E.gK},Ia=function(Wa){Wa=ta.getCache(Wa);if(!Wa)return 0;Wa=Wa.filter(function(hb){return void 0!==hb});return Math.max.apply(Math,(0,v.Z)(Wa))},Ya=function(Wa){var hb,ab,Qa;return null!=Wa&&null!==(hb=Wa.boundElements)&&void 0!==hb&&hb.length&&(null==Wa||null===(ab=Wa.boundElements)||void 0===ab||null===(Qa=ab.filter(function(bb){return"text"===bb.type})[0])||void 0===Qa?void 0:Qa.id)||null},Fa=function(Wa){if(!Wa)return null;var hb,ab=Ya(Wa);return ab&&(null===(hb=B.Z.getScene(Wa))||void 0===
hb?void 0:hb.getElement(ab))||null},Ka=function(Wa){return Wa&&Wa.containerId&&(null===(hb=B.Z.getScene(Wa))||void 0===hb?void 0:hb.getElement(Wa.containerId))||null;var hb},Ba=function(Wa,hb){if(!(0,V.Yv)(Wa))return{x:Wa.x+Wa.width/2,y:Wa.y+Wa.height/2};var ab=H._.getPointsGlobalCoordinates(Wa);if(1==ab.length%2)return Wa=H._.getPointGlobalCoordinates(Wa,Wa.points[Math.floor(Wa.points.length/2)]),{x:Wa[0],y:Wa[1]};var Qa=Wa.points.length/2-1;hb=H._.getEditorMidPoints(Wa,hb)[Qa];return hb||=H._.getSegmentMidPoint(Wa,
ab[Qa],ab[Qa+1],Qa+1),{x:hb[0],y:hb[1]}},la=function(Wa){var hb=E.gK,ab=E.gK;return"ellipse"===Wa.type&&(hb+=Wa.width/2*(1-Math.sqrt(2)/2),ab+=Wa.height/2*(1-Math.sqrt(2)/2)),"diamond"===Wa.type&&(hb+=Wa.width/4,ab+=Wa.height/4),{x:Wa.x+hb,y:Wa.y+ab}},ka=function(Wa){var hb=Ka(Wa);return!hb||(0,V.Yv)(hb)?Wa.angle:hb.angle},ua=function(Wa){return Wa.some(function(hb){if((0,V.Xh)(hb)){var ab=Ka(hb);return!(0,J.iB)(hb)||!(0,V.Yv)(ab)}return!1})},na=function(Wa){return Wa.some(function(hb){if((0,V.Xh)(hb)){var ab=
Ka(hb);return!(0,J.iB)(hb)||!(0,V.Yv)(ab)}return(0,J.iB)(hb)})},oa=function(Wa,hb,ab,Qa){var bb=(0,S.eD)(Wa,hb);if(1===bb.length)return(0,V.mG)(bb[0],!1)?bb[0]:null;bb=null;for(var Pa=Wa.length-1;0<=Pa;--Pa)if(!Wa[Pa].isDeleted){var Lb=(0,J.qf)(Wa[Pa]),xc=(0,D.Z)(Lb,4);Lb=xc[0];var oc=xc[1],pc=xc[2];xc=xc[3];if((0,V.Yv)(Wa[Pa])&&(0,L.Qu)(Wa[Pa],hb,null,[ab,Qa])){bb=Wa[Pa];break}if(Lb<ab&&ab<pc&&oc<Qa&&Qa<xc){bb=Wa[Pa];break}}return(0,V.mG)(bb,!1)?bb:null},La=new Set(["rectangle","ellipse","diamond",
"arrow"]),Oa=function(Wa){return La.has(Wa.type)},Va=function(Wa,hb){Wa=Math.ceil(Wa);var ab=2*E.gK;return"ellipse"===hb?Math.round((Wa+ab)/Math.sqrt(2)*2):"arrow"===hb?Wa+8*ab:"diamond"===hb?2*(Wa+ab):Wa+ab},Ma=function(Wa){var hb=1<arguments.length&&void 0!==arguments[1]?arguments[1]:Fa(Wa),ab=Wa.width;if((0,V.Yv)(Wa)){var Qa;hb=(null!==(Qa=null==hb?void 0:hb.fontSize)&&void 0!==Qa?Qa:E.n5)*E.vL;return Math.max(E.bY*ab,hb)}return"ellipse"===Wa.type?Math.round(ab/2*Math.sqrt(2))-2*E.gK:"diamond"===
Wa.type?Math.round(ab/2)-2*E.gK:ab-2*E.gK},Ua=function(Wa,hb){var ab=Wa.height;return(0,V.Yv)(Wa)?0>=ab-16*E.gK?hb.height:ab:"ellipse"===Wa.type?Math.round(ab/2*Math.sqrt(2))-2*E.gK:"diamond"===Wa.type?Math.round(ab/2)-2*E.gK:ab-2*E.gK},ib=function(){return 0<ea(xa,(0,r.mO)({fontSize:E.n5,fontFamily:E.rk}))},vb=(p={},(0,t.Z)(p,E.ut.Virgil,1.25),(0,t.Z)(p,E.ut.Helvetica,1.15),(0,t.Z)(p,E.ut.Cascadia,1.2),p),yb=function(Wa){return Wa in vb?vb[Wa]:vb[E.rk]}},3716:function(g,h,b){function l(ia,U){var Z=
Object.keys(ia);if(Object.getOwnPropertySymbols){var aa=Object.getOwnPropertySymbols(ia);U&&(aa=aa.filter(function(W){return Object.getOwnPropertyDescriptor(ia,W).enumerable}));Z.push.apply(Z,aa)}return Z}function m(ia){for(var U=1;U<arguments.length;U++){var Z=null!=arguments[U]?arguments[U]:{};U%2?l(Object(Z),!0).forEach(function(aa){(0,D.Z)(ia,aa,Z[aa])}):Object.getOwnPropertyDescriptors?Object.defineProperties(ia,Object.getOwnPropertyDescriptors(Z)):l(Object(Z)).forEach(function(aa){Object.defineProperty(ia,
aa,Object.getOwnPropertyDescriptor(Z,aa))})}return ia}b.d(h,{b_:function(){return I},eR:function(){return M},h_:function(){return F},kT:function(){return O}});var p=b(8950),D=b(7169),v=b(2577);g=b(2975);var t=b.n(g),r=b(6331),f=b(7135),E=b(3223),B=b(9472),J=b(7041),V=b(7729),H=b(554),S=b(650),L=b(8260),T=b(8627),R=b(278),G={},F=function(ia,U){ia=G[ia]||(G[ia]={height:U});return ia.height=U,ia},O=function(ia){G[ia]&&delete G[ia]},M=function(ia){var U,Z;return null!==(U=null===(Z=G[ia])||void 0===Z?
void 0:Z.height)&&void 0!==U?U:null},I=function(ia){var U=ia.id,Z=ia.onChange,aa=ia.onSubmit,W=ia.getViewportCoords,fa=ia.element,X=ia.canvas,ea=ia.excalidrawContainer,pa=ia.app,va=function(){var Va,Ma=pa.state,Ua=null===(Va=E.Z.getScene(fa))||void 0===Va?void 0:Va.getElement(U);if(Ua){Va=Ua.textAlign;var ib=Ua.verticalAlign;if(Ua&&(0,B.iB)(Ua)){var vb=Ua.x,yb=Ua.y,Wa=(0,H.tl)(Ua),hb=Ua.width,ab=Ua.height,Qa=Ua.width,bb=Ua.height;if(Wa&&Ua.containerId){(0,B.Yv)(Wa)&&(yb=T._.getBoundTextElementPosition(Wa,
Ua),vb=yb.x,yb=yb.y);var Pa;hb=ta;if(hb.style.fontFamily&&hb.style.fontSize){var Lb=hb.style.fontFamily.replace(/"/g,"");hb=(0,f.$g)({fontFamily:Ua.fontFamily})!==Lb||"".concat(Ua.fontSize,"px")!==hb.style.fontSize}else hb=!1;if(hb?Pa=F(Wa.id,Wa.height):(Pa=G[Wa.id])||(Pa=F(Wa.id,Wa.height)),hb=(0,H.iZ)(Wa),ab=(0,H.D9)(Wa,Ua),!(0,B.Yv)(Wa)&&bb>ab)return Ua=(0,H.NS)(bb,Wa.type),void(0,V.DR)(Wa,{height:Ua});!(0,B.Yv)(Wa)&&Wa.height>Pa.height&&bb<ab?(Pa=(0,H.NS)(bb,Wa.type),(0,V.DR)(Wa,{height:Pa})):
yb=(0,H.FE)(Wa,Ua).y}Pa=W(vb,yb);Pa=(0,v.Z)(Pa,2);var xc=Pa[0],oc=Pa[1];Pa=ta.selectionEnd;ab=ta.value.length;ta.selectionStart===Pa&&Pa!==ab&&(Pa=ab-Pa,ta.selectionStart=ta.value.length-Pa,ta.selectionEnd=ta.value.length-Pa);Wa?Qa+=.5:(hb=(Ma.width-8-xc)/Ma.zoom.value,Qa=Math.min(Qa,hb));var pc=Ua.lineHeight;J.G6&&(pc=(0,H.$2)(m(m({},Ua),{},{fontSize:Math.round(Ua.fontSize)})));Wa=(Ma.height-oc)/Ma.zoom.value;Pa=Object;ab=Pa.assign;Lb=ta.style;var Cc=(0,f.mO)(Ua),bd="".concat(Qa,"px"),dc="".concat(bb,
"px");xc="".concat(xc,"px");oc="".concat(oc,"px");var Nc=(0,H.H_)(Ua);Ma=Ma.zoom;Nc=180*Nc/Math.PI;var Qc=Qa*(Ma.value-1)/2,Ad=bb*(Ma.value-1)/2;Qa=(Qa>hb&&1!==Ma.value&&(Qc=hb*(Ma.value-1)/2),bb>Wa&&1!==Ma.value&&(Ad=Wa*(Ma.value-1)/2),"translate(".concat(Qc,"px, ").concat(Ad,"px) scale(").concat(Ma.value,") rotate(").concat(Nc,"deg)"));ab.call(Pa,Lb,{font:Cc,lineHeight:pc,width:bd,height:dc,left:xc,top:oc,transform:Qa,textAlign:Va,verticalAlign:ib,color:Ua.strokeColor,opacity:Ua.opacity/100,filter:"var(--theme-filter)",
maxHeight:"".concat(Wa,"px")});ta.scrollTop=0;(0,f.h2)()&&(ta.style.fontFamily=(0,f.$g)(Ua));(0,V.DR)(Ua,{x:vb,y:yb})}}},ta=document.createElement("textarea");ta.dir="auto";ta.tabIndex=0;ta.dataset.type="wysiwyg";ta.wrap="off";ta.classList.add("excalidraw-wysiwyg");ia="pre";var xa="normal";(0,B.Xh)(fa)&&(ia="pre-wrap",xa="break-word");Object.assign(ta.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:xa,whiteSpace:ia,overflowWrap:"break-word",boxSizing:"content-box"});ta.value=fa.originalText;va();Z&&(ta.onpaste=function(){var Va=(0,p.Z)(t().mark(function ib(Ua){var vb,yb,Wa,hb,ab,Qa;return t().wrap(function(bb){for(;;)switch(bb.prev=bb.next){case 0:return bb.next=2,(0,R.mQ)(Ua,!0);case 2:if((vb=bb.sent).text){bb.next=5;break}return bb.abrupt("return");case 5:if(yb=(0,H.bG)(vb.text)){bb.next=8;break}return bb.abrupt("return");case 8:Wa=
(0,H.tl)(fa),hb=(0,f.mO)({fontSize:pa.state.currentItemFontSize,fontFamily:pa.state.currentItemFontFamily}),Wa&&(ab=(0,H.lD)("".concat(ta.value).concat(yb),hb,(0,H.iZ)(Wa)),Qa=(0,H.mY)(ab,hb),ta.style.width="".concat(Qa,"px"));case 11:case "end":return bb.stop()}},ib)}));return function(Ua){return Va.apply(this,arguments)}}(),ta.oninput=function(){Z((0,H.bG)(ta.value))});ta.onkeydown=function(Va){!Va.shiftKey&&L.Lo.keyTest(Va)?(Va.preventDefault(),pa.actionManager.executeAction(L.Lo),va()):!Va.shiftKey&&
L.CZ.keyTest(Va)?(Va.preventDefault(),pa.actionManager.executeAction(L.CZ),va()):S.Tu.keyTest(Va)?pa.actionManager.executeAction(S.Tu):S.Zq.keyTest(Va)?pa.actionManager.executeAction(S.Zq):Va.key===r.tW.ESCAPE?(Va.preventDefault(),la=!0,ka()):Va.key===r.tW.ENTER&&Va[r.tW.CTRL_OR_CMD]?(Va.preventDefault(),Va.isComposing||229===Va.keyCode)||(la=!0,ka()):Va.key!==r.tW.TAB&&(!Va[r.tW.CTRL_OR_CMD]||Va.code!==r.aU.BRACKET_LEFT&&Va.code!==r.aU.BRACKET_RIGHT)||(Va.preventDefault(),Va.isComposing)||(Va.shiftKey||
Va.code===r.aU.BRACKET_LEFT?Fa():Ya(),ta.dispatchEvent(new Event("input")))};var Ga=" ".repeat(4),Ia=new RegExp("^ {1,".concat(4,"}")),Ya=function(){var Va=ta.selectionStart,Ma=ta.selectionEnd,Ua=Ka(),ib=ta.value;Ua.forEach(function(vb){var yb=ib.slice(0,vb);vb=ib.slice(vb);ib="".concat(yb).concat(Ga).concat(vb)});ta.value=ib;ta.selectionStart=Va+4;ta.selectionEnd=Ma+4*Ua.length},Fa=function(){var Va=ta.selectionStart,Ma=ta.selectionEnd,Ua=Ka(),ib=[],vb=ta.value;Ua.forEach(function(yb){var Wa=vb.slice(yb,
yb+4).match(Ia);if(Wa){var hb=vb.slice(0,yb);Wa=vb.slice(yb+Wa[0].length);vb="".concat(hb).concat(Wa);ib.push(yb)}});ta.value=vb;ib.length&&(Va>ib[ib.length-1]?ta.selectionStart=Math.max(Va-4,ib[ib.length-1]):ta.selectionStart=Va,ta.selectionEnd=Math.max(ta.selectionStart,Ma-4*ib.length))},Ka=function(){var Va=ta.selectionStart,Ma=ta.selectionEnd,Ua=ta.value,ib=Ua.slice(0,Va).match(/[^\n]*$/)[0].length;return Va-=ib,Ua.slice(Va,Ma).split("\n").reduce(function(vb,yb,Wa,hb){return vb.concat(Wa?vb[Wa-
1]+hb[Wa-1].length+1:Va)},[]).reverse()},Ba=function(Va){Va.preventDefault();Va.stopPropagation()},la=!1,ka=function(){var Va;La||(La=!0,ta.onblur=null,ta.oninput=null,ta.onkeydown=null,Oa&&Oa.disconnect(),window.removeEventListener("resize",va),window.removeEventListener("wheel",Ba,!0),window.removeEventListener("pointerdown",na),window.removeEventListener("pointerup",ua),window.removeEventListener("blur",ka),oa(),ta.remove());var Ma=null===(Va=E.Z.getScene(fa))||void 0===Va?void 0:Va.getElement(fa.id);
if(Ma){Va=ta.value;var Ua=(0,H.tl)(Ma);if(Ua){if(Va=Ma.text,ta.value.trim()){var ib=(0,H.xB)(Ua);ib&&ib===fa.id?(0,B.Yv)(Ua)&&(0,V.ZP)(Ua):(0,V.DR)(Ua,{boundElements:(Ua.boundElements||[]).concat({type:"text",id:fa.id})})}else(0,V.DR)(Ua,{boundElements:null===(ib=Ua.boundElements)||void 0===ib?void 0:ib.filter(function(vb){return!(0,B.iB)(vb)})});(0,H.oN)(Ma,Ua)}aa({text:Va,viaKeyboard:la,originalText:ta.value})}},ua=function Ua(Ma){window.removeEventListener("pointerup",Ua);Ma=null==Ma?void 0:Ma.target;
var ib=Ma instanceof HTMLElement&&Ma.classList.contains("active-color");setTimeout(function(){(ta.onblur=ka,ib)&&(new MutationObserver(function(vb,yb){vb.find(function(Wa){var hb;return 0<Wa.removedNodes.length&&void 0!==(null===(hb=Wa.removedNodes[0].dataset)||void 0===hb?void 0:hb.radixPopperContentWrapper)})&&(setTimeout(function(){ta.focus()}),yb.disconnect())})).observe(document.querySelector(".excalidraw-container"),{childList:!0});ib||ta.focus()})},na=function(Ma){var Ua=Ma.target instanceof
HTMLElement&&Ma.target.classList.contains("active-color");((Ma.target instanceof HTMLElement||Ma.target instanceof SVGElement)&&Ma.target.closest(".".concat(J.$C.SHAPE_ACTIONS_MENU))&&!(0,f.s)(Ma.target)||Ua)&&(ta.onblur=null,window.addEventListener("pointerup",ua),window.addEventListener("blur",ka))},oa=E.Z.getScene(fa).addCallback(function(){var Ma;va();null!==(Ma=document.activeElement)&&void 0!==Ma&&Ma.closest(".color-picker-content")||ta.focus()}),La=!1;ta.select();ua();var Oa=null;X&&"ResizeObserver"in
window?(Oa=new window.ResizeObserver(function(){va()})).observe(X):window.addEventListener("resize",va);window.addEventListener("pointerdown",na);window.addEventListener("wheel",Ba,{passive:!1,capture:!0});null==ea||ea.querySelector(".excalidraw-textEditorContainer").appendChild(ta)}},6519:function(g,h,b){b.d(h,{Fn:function(){return E},PC:function(){return L},kK:function(){return S},oY:function(){return T},ox:function(){return f}});var l=b(2577),m=b(9995),p=b(3795),D=b(5734),v=b(9472),t=b(5743),r=
{mouse:8,pen:16,touch:28},f={e:!0,s:!0,n:!0,w:!0},E={e:!0,s:!0,n:!0,w:!0,rotation:!0},B={e:!0,s:!0,n:!0,w:!0},J={e:!0,s:!0,n:!0,w:!0,nw:!0,se:!0},V={e:!0,s:!0,n:!0,w:!0},H=function(R,G,F,O,M,I,ia){R=(0,p.U1)(R+F/2,G+O/2,M,I,ia);R=(0,l.Z)(R,2);return[R[0]-F/2,R[1]-O/2,F,O]},S=function(R,G,F,O){var M=(0,l.Z)(R,6),I=M[0],ia=M[1],U=M[2],Z=M[3],aa=M[4];M=M[5];var W=4<arguments.length&&void 0!==arguments[4]?arguments[4]:{},fa=r[O],X=fa/F.value,ea=fa/F.value,pa=fa/F.value,va=fa/F.value,ta=U-I,xa=Z-ia,Ga=
(5<arguments.length&&void 0!==arguments[5]?arguments[5]:4)/F.value;fa=(fa-2*t.Lu)/(2*F.value);var Ia={nw:W.nw?void 0:H(I-Ga-pa+fa,ia-Ga-va+fa,X,ea,aa,M,G),ne:W.ne?void 0:H(U+Ga-fa,ia-Ga-va+fa,X,ea,aa,M,G),sw:W.sw?void 0:H(I-Ga-pa+fa,Z+Ga-fa,X,ea,aa,M,G),se:W.se?void 0:H(U+Ga-fa,Z+Ga-fa,X,ea,aa,M,G),rotation:W.rotation?void 0:H(I+ta/2-X/2,ia-Ga-va+fa-16/F.value,X,ea,aa,M,G)},Ya=5*r.mouse/F.value;return Math.abs(ta)>Ya&&(W.n||(Ia.n=H(I+ta/2-X/2,ia-Ga-va+fa,X,ea,aa,M,G)),W.s||(Ia.s=H(I+ta/2-X/2,Z+Ga-
fa,X,ea,aa,M,G))),Math.abs(xa)>Ya&&(W.w||(Ia.w=H(I-Ga-pa+fa,ia+xa/2-ea/2,X,ea,aa,M,G)),W.e||(Ia.e=H(U+Ga-fa,ia+xa/2-ea/2,X,ea,aa,M,G))),Ia},L=function(R,G){var F=2<arguments.length&&void 0!==arguments[2]?arguments[2]:"mouse";if(R.locked)return{};var O={};if("freedraw"===R.type||(0,v.bt)(R)){if(2===R.points.length){var M=(0,l.Z)(R.points,2)[1];0===M[0]||0===M[1]?O=V:0<M[0]&&0>M[1]?O=J:0<M[0]&&0<M[1]?O=V:0>M[0]&&0<M[1]?O=J:0>M[0]&&0>M[1]&&(O=V)}}else(0,D.iB)(R)?O=B:(0,v.He)(R)&&(O={rotation:!0});M=
(0,v.bt)(R)?t.Lu+8:t.Lu;return S((0,m.qf)(R,!0),R.angle,G,F,O,M)},T=function(R,G){if(G.editingLinearElement)return!1;if(1<R.length)return!0;R=R[0];return!(0,v.bt)(R)||2<R.points.length}},9472:function(g,h,b){b.d(h,{F9:function(){return r},He:function(){return t},Lx:function(){return V},Mn:function(){return J},QI:function(){return G},UQ:function(){return M},Xh:function(){return R},Xo:function(){return T},Yv:function(){return E},bt:function(){return f},dt:function(){return B},eK:function(){return O},
f0:function(){return H},gs:function(){return D},iB:function(){return v},mG:function(){return S},pC:function(){return p},r2:function(){return L},wi:function(){return m}});var l=b(7041),m=function(I){return!!I&&"image"===I.type&&!!I.fileId},p=function(I){return!!I&&"image"===I.type},D=function(I){return!!I&&"embeddable"===I.type},v=function(I){return null!=I&&"text"===I.type},t=function(I){return null!=I&&"frame"===I.type},r=function(I){return null!=I&&"freedraw"===I.type},f=function(I){return null!=
I&&B(I.type)},E=function(I){return null!=I&&"arrow"===I.type},B=function(I){return"arrow"===I||"line"===I},J=function(I){var ia=!(1<arguments.length&&void 0!==arguments[1])||arguments[1];return null!=I&&(!I.locked||!0===ia)&&V(I.type)},V=function(I){return"arrow"===I},H=function(I){var ia=!(1<arguments.length&&void 0!==arguments[1])||arguments[1];return!(null==I||I.locked&&!0!==ia||"rectangle"!==I.type&&"diamond"!==I.type&&"ellipse"!==I.type&&"image"!==I.type&&"embeddable"!==I.type&&"frame"!==I.type&&
("text"!==I.type||I.containerId))},S=function(I){var ia=!(1<arguments.length&&void 0!==arguments[1])||arguments[1];return null!=I&&(!I.locked||!0===ia)&&("rectangle"===I.type||"diamond"===I.type||"ellipse"===I.type||E(I))},L=function(I){return"text"===(null==I?void 0:I.type)||"diamond"===(null==I?void 0:I.type)||"rectangle"===(null==I?void 0:I.type)||"embeddable"===(null==I?void 0:I.type)||"ellipse"===(null==I?void 0:I.type)||"arrow"===(null==I?void 0:I.type)||"freedraw"===(null==I?void 0:I.type)||
"line"===(null==I?void 0:I.type)},T=function(I){var ia;return S(I)&&!(null===(ia=I.boundElements)||void 0===ia||!ia.some(function(U){return"text"===U.type}))},R=function(I){return null!==I&&"containerId"in I&&null!==I.containerId&&v(I)},G=function(I){return"rectangle"===I||"embeddable"===I},F=function(I){return"line"===I||"arrow"===I||"diamond"===I},O=function(I,ia){return!(I!==l.a6.ADAPTIVE_RADIUS&&I!==l.a6.LEGACY||!G(ia.type))||!(I!==l.a6.PROPORTIONAL_RADIUS||!F(ia.type))},M=function(I){return F(I.type)?
{type:l.a6.PROPORTIONAL_RADIUS}:G(I.type)?{type:l.a6.ADAPTIVE_RADIUS}:null}},8946:function(g,h,b){function l(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(H){return!1}}function m(H,S,L){return m=l()?Reflect.construct.bind():function(T,R,G){var F=[null];F.push.apply(F,R);T=new (Function.bind.apply(T,F));return G&&(0,B.Z)(T,G.prototype),
T},m.apply(null,arguments)}function p(H){var S="function"==typeof Map?new Map:void 0;return p=function(L){function T(){return m(L,arguments,(0,E.Z)(this).constructor)}if(null===L||(R=L,-1===Function.toString.call(R).indexOf("[native code]")))return L;var R;if("function"!=typeof L)throw new TypeError("Super expression must either be null or a function");if(void 0!==S){if(S.has(L))return S.get(L);S.set(L,T)}return T.prototype=Object.create(L.prototype,{constructor:{value:T,enumerable:!1,writable:!0,
configurable:!0}}),(0,B.Z)(T,L)},p(H)}function D(H){var S=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(L){return!1}}();return function(){var L=(0,E.Z)(H);if(S){var T=(0,E.Z)(this).constructor;L=Reflect.construct(L,arguments,T)}else L=L.apply(this,arguments);return(0,f.Z)(this,L)}}b.d(h,{_:function(){return V},l:function(){return J}});
var v=b(5169),t=b(8821),r=b(2248),f=b(7245),E=b(2312),B=b(5901),J=function(H){function S(){var T,R=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"Couldn't export canvas.",G=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"CANVAS_ERROR";return(0,t.Z)(this,S),(T=L.call(this)).name=G,T.message=R,T}(0,r.Z)(S,H);var L=D(S);return(0,v.Z)(S)}(p(Error)),V=function(H){function S(){var T=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"Request Aborted";return(0,t.Z)(this,S),L.call(this,
T,"AbortError")}(0,r.Z)(S,H);var L=D(S);return(0,v.Z)(S)}(p(DOMException))},3473:function(g,h,b){function l(Ka,Ba){var la="undefined"!=typeof Symbol&&Ka[Symbol.iterator]||Ka["@@iterator"];if(!la){if(Array.isArray(Ka)||(la=function(La,Oa){if(La){if("string"==typeof La)return m(La,Oa);var Va=Object.prototype.toString.call(La).slice(8,-1);"Object"===Va&&La.constructor&&(Va=La.constructor.name);if("Map"===Va||"Set"===Va)return Array.from(La);if("Arguments"===Va||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Va))return m(La,
Oa)}}(Ka))||Ba&&Ka&&"number"==typeof Ka.length){la&&(Ka=la);var ka=0;Ba=function(){};return{s:Ba,n:function(){return ka>=Ka.length?{done:!0}:{done:!1,value:Ka[ka++]}},e:function(La){throw La;},f:Ba}}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,na=!0,oa=!1;return{s:function(){la=la.call(Ka)},n:function(){var La=la.next();return na=La.done,La},e:function(La){oa=!0;ua=La},f:function(){try{na||
null==la.return||la.return()}finally{if(oa)throw ua;}}}}function m(Ka,Ba){(null==Ba||Ba>Ka.length)&&(Ba=Ka.length);for(var la=0,ka=Array(Ba);la<Ba;la++)ka[la]=Ka[la];return ka}b.d(h,{$Z:function(){return ea},A_:function(){return pa},Dn:function(){return Z},Qs:function(){return Fa},SH:function(){return aa},Tq:function(){return Ga},cH:function(){return Ya},cO:function(){return U},fj:function(){return X},lz:function(){return va},ni:function(){return fa},pr:function(){return xa},wO:function(){return W},
xr:function(){return R},yZ:function(){return ta}});var p=b(1930),D=b(2577),v=b(5169),t=b(8821),r=b(5734),f=b(3795),E=b(554),B=b(7135),J=b(7729),V=b(9547),H=b(897),S=b(502),L=b(3223),T=b(9995),R=function(Ka,Ba,la){var ka;Ka=(0,B.xn)(Ka);Ba=l(Ba);try{for(Ba.s();!(ka=Ba.n()).done;){var ua=ka.value;if(ua.frameId){var na=la.get(ua.id),oa=la.get(ua.frameId);if(na){var La=Ka.get(na);La&&(0,J.DR)(La,{frameId:null!=oa?oa:ua.frameId},!1)}}}}catch(Oa){Ba.e(Oa)}finally{Ba.f()}},G=(0,v.Z)(function ka(Ba,la){(0,t.Z)(this,
ka);this.x=Ba;this.y=la}),F=function(){function Ba(la,ka){(0,t.Z)(this,Ba);this.first=la;this.second=ka}return(0,v.Z)(Ba,[{key:"getBoundingBox",value:function(){return[new G(Math.min(this.first.x,this.second.x),Math.min(this.first.y,this.second.y)),new G(Math.max(this.first.x,this.second.x),Math.max(this.first.y,this.second.y))]}}]),Ba}(),O=function(){function Ba(){(0,t.Z)(this,Ba)}return(0,v.Z)(Ba,null,[{key:"crossProduct",value:function(la,ka){return la.x*ka.y-ka.x*la.y}},{key:"doBoundingBoxesIntersect",
value:function(la,ka){return la[0].x<=ka[1].x&&la[1].x>=ka[0].x&&la[0].y<=ka[1].y&&la[1].y>=ka[0].y}},{key:"isPointOnLine",value:function(la,ka){var ua=new F(new G(0,0),new G(la.second.x-la.first.x,la.second.y-la.first.y));la=new G(ka.x-la.first.x,ka.y-la.first.y);ua=this.crossProduct(ua.second,la);return Math.abs(ua)<this.EPSILON}},{key:"isPointRightOfLine",value:function(la,ka){var ua=new F(new G(0,0),new G(la.second.x-la.first.x,la.second.y-la.first.y));la=new G(ka.x-la.first.x,ka.y-la.first.y);
return 0>this.crossProduct(ua.second,la)}},{key:"lineSegmentTouchesOrCrossesLine",value:function(la,ka){return this.isPointOnLine(la,ka.first)||this.isPointOnLine(la,ka.second)||(this.isPointRightOfLine(la,ka.first)?!this.isPointRightOfLine(la,ka.second):this.isPointRightOfLine(la,ka.second))}},{key:"doLineSegmentsIntersect",value:function(la,ka){la=new F(new G(la[0][0],la[0][1]),new G(la[1][0],la[1][1]));ka=new F(new G(ka[0][0],ka[0][1]),new G(ka[1][0],ka[1][1]));var ua=la.getBoundingBox(),na=ka.getBoundingBox();
return this.doBoundingBoxesIntersect(ua,na)&&this.lineSegmentTouchesOrCrossesLine(la,ka)&&this.lineSegmentTouchesOrCrossesLine(ka,la)}},{key:"isElementIntersectingFrame",value:function(la,ka){var ua=this;ka=(0,T.GJ)(ka);var na=(0,T.GJ)(la);return ka.some(function(oa){return na.some(function(La){return ua.doLineSegmentsIntersect(oa,La)})})}}]),Ba}();O.EPSILON=1E-6;var M=function(Ba,la){return Ia((0,V.Yp)(Ba,la,!1)).filter(function(ka){return"frame"!==ka.type&&!ka.frameId||ka.frameId===la.id})},I=function(Ba,
la,ka){return(0,V.Yp)(Ba,la).some(function(ua){return ua.id===ka.id})},ia=function(Ba,la){la=(0,r.qf)(la);var ka=(0,D.Z)(la,4);la=ka[0];var ua=ka[1],na=ka[2];ka=ka[3];Ba=(0,r.KP)(Ba);Ba=(0,D.Z)(Ba,4);var oa=Ba[1],La=Ba[2],Oa=Ba[3];return la<=Ba[0]&&ua<=oa&&na>=La&&ka>=Oa},U=function(Ba,la){return ia([Ba],la)||O.isElementIntersectingFrame(Ba,la)||I([la],Ba,la)},Z=function(Ba,la){la=(0,r.qf)(la);la=(0,D.Z)(la,4);return(0,f.Ni)([la[0],la[1]],[Ba.x,Ba.y],[la[2],la[3]])},aa=function(Ba){var la,ka=new Map,
ua=l(Ba);try{for(ua.s();!(la=ua.n()).done;){var na=la.value,oa=(0,r.He)(na)?na.id:na.frameId;oa&&!ka.has(oa)&&ka.set(oa,W(Ba,oa))}}catch(La){ua.e(La)}finally{ua.f()}return ka},W=function(Ba,la){return Ba.filter(function(ka){return ka.frameId===la})},fa=function(Ba,la,ka){var ua,na=W(Ba,la.id),oa=new Set(na),La=new Set([].concat((0,p.Z)(M(Ba,la)),(0,p.Z)(na.filter(function(bb){return I(Ba,bb,la)})))),Oa=na.filter(function(bb){return!La.has(bb)});na=new Set(Array.from(La).flatMap(function(bb){return bb.groupIds}));
var Va=l(Oa);try{for(Va.s();!(ua=Va.n()).done;){var Ma=ua.value;if(O.isElementIntersectingFrame(Ma,la)){if(0<Ma.groupIds.length){var Ua,ib=l(Ma.groupIds);try{for(ib.s();!(Ua=ib.n()).done;)na.add(Ua.value)}catch(bb){ib.e(bb)}finally{ib.f()}}}else 0===Ma.groupIds.length&&oa.delete(Ma)}}catch(bb){Va.e(bb)}finally{Va.f()}var vb;ua=l(Oa);try{for(ua.s();!(vb=ua.n()).done;){var yb=vb.value;if(0<yb.groupIds.length){var Wa;Ma=!0;var hb=l(yb.groupIds);try{for(hb.s();!(Wa=hb.n()).done;)na.has(Wa.value)&&(Ma=
!1)}catch(bb){hb.e(bb)}finally{hb.f()}Ma&&oa.delete(yb)}}}catch(bb){ua.e(bb)}finally{ua.f()}var ab;vb=Array.from(La).filter(function(bb){return 0===bb.groupIds.length});vb=l(vb);try{for(vb.s();!(ab=vb.n()).done;)oa.add(ab.value)}catch(bb){vb.e(bb)}finally{vb.f()}ab=Array.from(La).filter(function(bb){return 0<bb.groupIds.length});ab=(0,S.yR)(ab,ka);ka=0;for(ab=Object.entries(ab);ka<ab.length;ka++)if(vb=(0,D.Z)(ab[ka],2),yb=vb[0],vb[1]&&(vb=(0,S.Fb)(Ba,yb),ia(vb,la))){var Qa;vb=l(vb);try{for(vb.s();!(Qa=
vb.n()).done;)oa.add(Qa.value)}catch(bb){vb.e(bb)}finally{vb.f()}}return(0,p.Z)(oa).filter(function(bb){return!((0,r.iB)(bb)&&bb.containerId)})},X=function(Ba,la){return Ia(Ba,M(Ba,la))},ea=function(Ba,la){var ka;return Ba.frameId?la?la.get(Ba.frameId)||null:(null===(ka=L.Z.getScene(Ba))||void 0===ka?void 0:ka.getElement(Ba.frameId))||null:null},pa=function(Ba,la,ka){var ua,na=[];la=l(la);try{for(la.s();!(ua=la.n()).done;){var oa=ua.value;na.push(oa);var La=(0,E.WJ)(oa);La&&na.push(La)}}catch(vb){la.e(vb)}finally{la.f()}var Oa,
Va=Ba.reduce(function(vb,yb,Wa){return vb[yb.id]=Wa,vb},{});ua=Va[ka.id];oa=(0,B.cx)(Ba,function(vb){return vb.frameId===ka.id});La=Ba.filter(function(vb){return vb.frameId===ka.id});la=[];var Ma=[];na=l(Ia(Ba,na));try{for(na.s();!(Oa=na.n()).done;){var Ua=Oa.value;Ua.frameId===ka.id||(0,r.He)(Ua)||(Va[Ua.id]>ua?Ma.push(Ua):la.push(Ua),(0,J.DR)(Ua,{frameId:ka.id},!1))}}catch(vb){na.e(vb)}finally{na.f()}Oa=Ba[ua];Ua=la.concat(La).concat(Ma);var ib=Ua.reduce(function(vb,yb){return vb[yb.id]=!0,vb},
{});na=Ba.slice(0,0<=oa?oa:ua).filter(function(vb){return!ib[vb.id]});Ba=Ba.slice(ua+1).filter(function(vb){return!ib[vb.id]});return na.concat(Ua).concat([Oa]).concat(Ba)},va=function(Ba,la,ka){var ua,na=[];la=l(la);try{for(la.s();!(ua=la.n()).done;){var oa=ua.value;if(oa.frameId){na.push(oa);var La=(0,E.WJ)(oa);La&&na.push(La)}}}catch(Oa){la.e(Oa)}finally{la.f()}for(ua=0;ua<na.length;ua++)(0,J.DR)(na[ua],{frameId:null},!1);return(0,H.jY)(Ba,ka,Array.from(na))},ta=function(Ba,la,ka){la=W(Ba,la.id);
return va(Ba,la,ka)},xa=function(Ba,la,ka,ua){return pa(ta(Ba,ka,ua),la,ka)},Ga=function(Ba,la,ka){ka=ka.scene.getSelectedElements({selectedElementIds:la.selectedElementIds,elements:Ba});var ua=new Set(ka);if(la.editingGroupId){var na;ka=l(ka);try{for(ka.s();!(na=ka.n()).done;){var oa=na.value;0===oa.groupIds.length?ua.add(oa):oa.groupIds.flatMap(function(Oa){return(0,S.Fb)(Ba,Oa)}).forEach(function(Oa){return ua.add(Oa)})}}catch(Oa){ka.e(Oa)}finally{ka.f()}}var La=new Set;return ua.forEach(function(Oa){!Oa.frameId||
(0,r.He)(Oa)||Fa(Oa,Ba,la)||La.add(Oa)}),0<La.size?va(Ba,(0,p.Z)(La),la):Ba},Ia=function(Ba,la){var ka,ua=new Set,na=l(la||Ba);try{for(na.s();!(ka=na.n()).done;){var oa=ka.value,La=oa.groupIds[oa.groupIds.length-1];La&&ua.add(La)}}catch(Ua){na.e(Ua)}finally{na.f()}var Oa,Va=new Set;ka=l(ua);try{for(ka.s();!(Oa=ka.n()).done;){var Ma=Oa.value;(0,S.Fb)(Ba,Ma).some(function(Ua){return(0,r.He)(Ua)})&&Va.add(Ma)}}catch(Ua){ka.e(Ua)}finally{ka.f()}return(la||Ba).filter(function(Ua){return!Va.has(Ua.groupIds[Ua.groupIds.length-
1])})},Ya=function(Ba,la){Ba=(0,r.iB)(Ba)&&(0,E.tl)(Ba)||Ba;return la.selectedElementIds[Ba.id]&&la.selectedElementsAreBeingDragged?la.frameToHighlight:ea(Ba)},Fa=function(Ba,la,ka){var ua=Ya(Ba,ka);Ba=(0,r.iB)(Ba)&&(0,E.tl)(Ba)||Ba;if(ua){if(0===Ba.groupIds.length)return U(Ba,ua);var na=new Set(Ba.groupIds.flatMap(function(Oa){return(0,S.Fb)(la,Oa)}));if(ka.editingGroupId&&ka.selectedElementsAreBeingDragged){Ba=new Set((0,V.eD)(la,ka));if(null!==ka.frameToHighlight)return!0;Ba.forEach(function(Oa){na.delete(Oa)})}var oa;
ka=l(na);try{for(ka.s();!(oa=ka.n()).done;)if((0,r.He)(oa.value))return!1}catch(Oa){ka.e(Oa)}finally{ka.f()}var La;oa=l(na);try{for(oa.s();!(La=oa.n()).done;)if(U(La.value,ua))return!0}catch(Oa){oa.e(Oa)}finally{oa.f()}}return!1}},502:function(g,h,b){function l(Z,aa){var W="undefined"!=typeof Symbol&&Z[Symbol.iterator]||Z["@@iterator"];if(!W){if(Array.isArray(Z)||(W=function(va,ta){if(va){if("string"==typeof va)return m(va,ta);var xa=Object.prototype.toString.call(va).slice(8,-1);"Object"===xa&&va.constructor&&
(xa=va.constructor.name);if("Map"===xa||"Set"===xa)return Array.from(va);if("Arguments"===xa||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(xa))return m(va,ta)}}(Z))||aa&&Z&&"number"==typeof Z.length){W&&(Z=W);var fa=0;aa=function(){};return{s:aa,n:function(){return fa>=Z.length?{done:!0}:{done:!1,value:Z[fa++]}},e:function(va){throw va;},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 X,ea=!0,pa=!1;return{s:function(){W=W.call(Z)},n:function(){var va=W.next();return ea=va.done,va},e:function(va){pa=!0;X=va},f:function(){try{ea||null==W.return||W.return()}finally{if(pa)throw X;}}}}function m(Z,aa){(null==aa||aa>Z.length)&&(aa=Z.length);for(var W=0,fa=Array(aa);W<aa;W++)fa[W]=Z[W];return fa}function p(Z,aa){var W=Object.keys(Z);if(Object.getOwnPropertySymbols){var fa=Object.getOwnPropertySymbols(Z);aa&&(fa=fa.filter(function(X){return Object.getOwnPropertyDescriptor(Z,X).enumerable}));
W.push.apply(W,fa)}return W}function D(Z){for(var aa=1;aa<arguments.length;aa++){var W=null!=arguments[aa]?arguments[aa]:{};aa%2?p(Object(W),!0).forEach(function(fa){(0,r.Z)(Z,fa,W[fa])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Z,Object.getOwnPropertyDescriptors(W)):p(Object(W)).forEach(function(fa){Object.defineProperty(Z,fa,Object.getOwnPropertyDescriptor(W,fa))})}return Z}b.d(h,{AI:function(){return U},F$:function(){return J},Fb:function(){return F},Nd:function(){return G},Qy:function(){return M},
S_:function(){return I},YS:function(){return O},bO:function(){return V},h6:function(){return ia},iE:function(){return R},iJ:function(){return L},yO:function(){return S},yR:function(){return T},zq:function(){return H}});var v=b(1930),t=b(2577),r=b(7169),f=b(9547),E=b(554),B=b(4485),J=function(Z,aa,W){W=W.reduce(function(fa,X){return X.groupIds.includes(Z)&&(fa[X.id]=!0),fa},{});return 2>Object.keys(W).length?aa.selectedGroupIds[Z]||aa.editingGroupId===Z?{selectedElementIds:aa.selectedElementIds,selectedGroupIds:D(D({},
aa.selectedGroupIds),{},(0,r.Z)({},Z,!1)),editingGroupId:null}:aa:{editingGroupId:aa.editingGroupId,selectedGroupIds:D(D({},aa.selectedGroupIds),{},(0,r.Z)({},Z,!0)),selectedElementIds:D(D({},aa.selectedElementIds),W)}},V=function(){var Z=null,aa=null,W=null,fa=function(X,ea,pa,va){va=va?va.scene.getSelectedElements({selectedElementIds:X.selectedElementIds,elements:ea}):(0,f.eD)(ea,X);return va.length?function(ta,xa,Ga,Ia){var Ya;if(void 0!==W&&xa===aa&&ta===Z&&Ga.editingGroupId===(null===(Ya=W)||
void 0===Ya?void 0:Ya.editingGroupId))return W;var Fa,Ka={};Ya=l(ta);try{for(Ya.s();!(Fa=Ya.n()).done;){var Ba=Fa.value.groupIds;if(Ga.editingGroupId){var la=Ba.indexOf(Ga.editingGroupId);-1<la&&(Ba=Ba.slice(0,la))}0<Ba.length&&(Ka[Ba[Ba.length-1]]=!0)}}catch(ua){Ya.e(ua)}finally{Ya.f()}var ka={};Fa=xa.reduce(function(ua,na){var oa=na.groupIds.find(function(La){return Ka[La]});return oa&&(ua[na.id]=!0,Array.isArray(ka[oa])?ka[oa].push(na.id):ka[oa]=[na.id]),ua},{});Ba=0;for(la=Object.keys(ka);Ba<
la.length;Ba++)Ya=la[Ba],2>ka[Ya].length&&Ka[Ya]&&(Ka[Ya]=!1);return aa=xa,Z=ta,W={editingGroupId:Ga.editingGroupId,selectedGroupIds:Ka,selectedElementIds:(0,B.Oh)(D(D({},Ga.selectedElementIds),Fa),Ia)}}(va,ea,X,pa):{selectedGroupIds:{},editingGroupId:null,selectedElementIds:(0,B.Oh)(X.selectedElementIds,pa)}};return fa.clearCache=function(){W=Z=aa=null},fa}(),H=function(Z,aa){return null!=S(Z,aa)},S=function(Z,aa){return aa.groupIds.filter(function(W){return W!==Z.editingGroupId}).find(function(W){return Z.selectedGroupIds[W]})},
L=function(Z){return Object.entries(Z.selectedGroupIds).filter(function(aa){aa=(0,t.Z)(aa,2);aa[0];return aa[1]}).map(function(aa){aa=(0,t.Z)(aa,2);var W=aa[0];aa[1];return W})},T=function(Z,aa){var W,fa=D(D({},aa),{},{selectedGroupIds:{}}),X=l(Z);try{for(X.s();!(W=X.n()).done;){var ea=W.value.groupIds;if(aa.editingGroupId){var pa=ea.indexOf(aa.editingGroupId);-1<pa&&(ea=ea.slice(0,pa))}if(0<ea.length){var va=ea[ea.length-1];fa=D(D({},fa),J(va,fa,Z))}}}catch(ta){X.e(ta)}finally{X.f()}return fa.selectedGroupIds},
R=function(Z,aa){return D(D({},Z),{},{editingGroupId:aa.groupIds.length?aa.groupIds[0]:null,selectedGroupIds:{},selectedElementIds:(0,r.Z)({},aa.id,!0)})},G=function(Z,aa){return Z.groupIds.includes(aa)},F=function(Z,aa){return Z.filter(function(W){return G(W,aa)})},O=function(Z,aa){return Z.groupIds.find(function(W){return aa[W]})},M=function(Z,aa,W){var fa=(0,v.Z)(Z);aa=aa?Z.indexOf(aa):-1;Z=-1<aa?aa:Z.length;for(aa=0;aa<Z;aa++)fa[aa]=W(fa[aa]);return fa},I=function(Z,aa,W){Z=(0,v.Z)(Z);W=W?Z.indexOf(W):
-1;return Z.splice(-1<W?W:Z.length,0,aa),Z},ia=function(Z,aa){return Z.filter(function(W){return!aa[W]})},U=function(Z){var aa=new Map;return Z.forEach(function(W){var fa=0===W.groupIds.length?W.id:W.groupIds[W.groupIds.length-1],X=aa.get(fa)||[],ea=(0,E.WJ)(W);ea&&X.push(ea);aa.set(fa,[].concat((0,v.Z)(X),[W]))}),Array.from(aa.values())}},7124:function(g,h,b){b.d(h,{F:function(){return t}});var l=b(1930),m=b(2577),p=b(9787),D=b(3470),v=b(5990),t=function(r){var f=(0,p.useState)(null);f=(0,m.Z)(f,
2);var E=f[0],B=f[1],J=(0,D.Fy)(),V=(0,v.I)().theme,H=(0,p.useRef)(J.isMobile);H.current=J.isMobile;var S=(0,D.J0)().container;return(0,p.useLayoutEffect)(function(){E&&E.classList.toggle("excalidraw--mobile",J.isMobile)},[E,J.isMobile]),(0,p.useLayoutEffect)(function(){var L,T,R=null!=r&&r.parentSelector?null==S?void 0:S.querySelector(r.parentSelector):document.body;if(R){var G=document.createElement("div");return(L=G.classList).add.apply(L,["excalidraw"].concat((0,l.Z)((null==r||null===(T=r.className)||
void 0===T?void 0:T.split(/\s+/))||[]))),G.classList.toggle("excalidraw--mobile",H.current),G.classList.toggle("theme--dark","dark"===V),R.appendChild(G),B(G),function(){R.removeChild(G)}}},[S,V,null==r?void 0:r.className,null==r?void 0:r.parentSelector]),E}},1903:function(g,h,b){b.d(h,{YX:function(){return E},mF:function(){return J},yT:function(){return V}});var l=b(2577),m=b(8950);g=b(2975);var p=b.n(g),D=b(3607),v=b(9787),t=b(8127),r=b(593),f=b(3529),E=(0,D.cn)(new Map),B=function(){var H=(0,m.Z)(p().mark(function T(L){return p().wrap(function(R){for(;;)switch(R.prev=
R.next){case 0:return R.next=2,(0,f.$D)({elements:L,appState:{exportBackground:!1,viewBackgroundColor:t.HO.white},files:null,renderEmbeddables:!1});case 2:return R.abrupt("return",R.sent);case 3:case "end":return R.stop()}},T)}));return function(L){return H.apply(this,arguments)}}(),J=function(H,S,L){var T=(0,v.useState)();T=(0,l.Z)(T,2);var R=T[0],G=T[1];return(0,v.useEffect)(function(){if(S)if(H){var F=L.get(H);F?G(F):(0,m.Z)(p().mark(function M(){var I,ia;return p().wrap(function(U){for(;;)switch(U.prev=
U.next){case 0:return U.next=2,B(S);case 2:ia=U.sent,null===(I=ia.querySelector(".style-fonts"))||void 0===I||I.remove(),ia&&(L.set(H,ia),G(ia));case 5:case "end":return U.stop()}},M)}))()}else(0,m.Z)(p().mark(function M(){var I;return p().wrap(function(ia){for(;;)switch(ia.prev=ia.next){case 0:return ia.next=2,B(S);case 2:I=ia.sent,G(I);case 4:case "end":return ia.stop()}},M)}))()},[H,S,L,G]),R},V=function(){var H=(0,D.KO)(E,r.yE),S=(0,l.Z)(H,1)[0];return{clearLibraryCache:function(){return S.clear()},
deleteItemsFromLibraryCache:function(L){L.forEach(function(T){return S.delete(T)})},svgCache:S}}},4358:function(g,h,b){function l(D,v,t){(0,m.useEffect)(function(){function r(f){if(D.current){var E=null==t?void 0:t(f,D.current);if(!0!==E){if(!1===E)return v(f);!D.current.contains(f.target)&&document.documentElement.contains(f.target)&&(f.target.closest("[data-radix-portal]")||f.target===document.documentElement&&"none"===document.body.style.pointerEvents||f.target.closest("[data-prevent-outside-click]")||
v(f))}}}return document.addEventListener(p.Ks.POINTER_DOWN,r),document.addEventListener(p.Ks.TOUCH_START,r),function(){document.removeEventListener(p.Ks.POINTER_DOWN,r);document.removeEventListener(p.Ks.TOUCH_START,r)}},[D,v,t])}b.d(h,{O:function(){return l}});var m=b(9787),p=b(7041)},8557:function(g,h,b){b.d(h,{Fp:function(){return r},G3:function(){return V},Mj:function(){return f},QT:function(){return T},m0:function(){return J},t:function(){return S}});var l=b(8950);g=b(1930);h=b(2975);var m=b.n(h),
p=b(1463),D=b(4451),v=b(593),t=b(3607),r={code:"en",label:"English"},f=[r].concat((0,g.Z)([{code:"ar-SA",label:"العربية",rtl:!0},{code:"bg-BG",label:"Български"},{code:"ca-ES",label:"Català"},{code:"cs-CZ",label:"Česky"},{code:"de-DE",label:"Deutsch"},{code:"el-GR",label:"Ελληνικά"},{code:"es-ES",label:"Español"},{code:"eu-ES",label:"Euskara"},{code:"fa-IR",label:"فارسی",rtl:!0},{code:"fi-FI",label:"Suomi"},{code:"fr-FR",label:"Français"},{code:"gl-ES",label:"Galego"},{code:"he-IL",label:"עברית",
rtl:!0},{code:"hi-IN",label:"हिन्दी"},{code:"hu-HU",label:"Magyar"},{code:"id-ID",label:"Bahasa Indonesia"},{code:"it-IT",label:"Italiano"},{code:"ja-JP",label:"日本語"},{code:"kab-KAB",label:"Taqbaylit"},{code:"kk-KZ",label:"Қазақ тілі"},{code:"ko-KR",label:"한국어"},{code:"ku-TR",label:"Kurdî"},{code:"lt-LT",label:"Lietuvių"},{code:"lv-LV",label:"Latviešu"},{code:"my-MM",label:"Burmese"},{code:"nb-NO",label:"Norsk bokmål"},{code:"nl-NL",label:"Nederlands"},{code:"nn-NO",label:"Norsk nynorsk"},{code:"oc-FR",
label:"Occitan"},{code:"pa-IN",label:"ਪੰਜਾਬੀ"},{code:"pl-PL",label:"Polski"},{code:"pt-BR",label:"Português Brasileiro"},{code:"pt-PT",label:"Português"},{code:"ro-RO",label:"Română"},{code:"ru-RU",label:"Русский"},{code:"sk-SK",label:"Slovenčina"},{code:"sv-SE",label:"Svenska"},{code:"sl-SI",label:"Slovenščina"},{code:"tr-TR",label:"Türkçe"},{code:"uk-UA",label:"Українська"},{code:"zh-CN",label:"简体中文"},{code:"zh-TW",label:"繁體中文"},{code:"vi-VN",label:"Tiếng Việt"},{code:"mr-IN",label:"मराठी"}].filter(function(R){return 85<=
D[R.code]}).sort(function(R,G){return R.label>G.label?1:-1}))),E=r,B={},J=function(){var R=(0,l.Z)(m().mark(function O(F){return m().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:if(E=F,document.documentElement.dir=E.rtl?"rtl":"ltr",document.documentElement.lang=E.code,!F.code.startsWith("__test__")){M.next=7;break}B={};M.next=17;break;case 7:return M.prev=7,M.next=10,b(940)("./".concat(E.code,".json"));case 10:B=M.sent;M.next=17;break;case 13:M.prev=13,M.t0=M.catch(7),console.error("Failed to load language ".concat(F.code,
":"),M.t0.message),B=p;case 17:v.e_.set(L,F.code);case 18:case "end":return M.stop()}},O,null,[[7,13]])}));return function(F){return R.apply(this,arguments)}}(),V=function(){return E},H=function(R,G){for(var F=0;F<G.length;++F){var O=G[F];if(void 0===R[O])return;R=R[O]}if("string"==typeof R)return R},S=function(R,G,F){if(E.code.startsWith("__test__"))return R=G?"".concat(R,"(").concat(JSON.stringify(G).slice(1,-1),")"):R,"[[".concat(R,"]]");var O=R.split(".");F=H(B,O)||H(p,O)||F;if(void 0===F)return R=
"Can't find translation for ".concat(R),console.warn(R),"";if(G)for(var M in G)F=F.replace("{{".concat(M,"}}"),String(G[M]));return F},L=(0,t.cn)(r.code),T=function(){var R=(0,t.Dv)(L,v.yE);return{t:S,langCode:R}}},593:function(g,h,b){b.d(h,{e_:function(){return m},yE:function(){return l}});g=b(3607);var l=(b(9787),Symbol()),m=(0,g.Vv)()},6331:function(g,h,b){b.d(h,{E0:function(){return v},Ge:function(){return t},OA:function(){return D},Wl:function(){return p},aU:function(){return l},tW:function(){return m}});
var l={EQUAL:"Equal",MINUS:"Minus",NUM_ADD:"NumpadAdd",NUM_SUBTRACT:"NumpadSubtract",NUM_ZERO:"Numpad0",BRACKET_RIGHT:"BracketRight",BRACKET_LEFT:"BracketLeft",ONE:"Digit1",TWO:"Digit2",THREE:"Digit3",NINE:"Digit9",QUOTE:"Quote",ZERO:"Digit0",SLASH:"Slash",C:"KeyC",D:"KeyD",H:"KeyH",V:"KeyV",Z:"KeyZ",R:"KeyR"},m={ARROW_DOWN:"ArrowDown",ARROW_LEFT:"ArrowLeft",ARROW_RIGHT:"ArrowRight",ARROW_UP:"ArrowUp",PAGE_UP:"PageUp",PAGE_DOWN:"PageDown",BACKSPACE:"Backspace",ALT:"Alt",CTRL_OR_CMD:b(7041).Um?"metaKey":
"ctrlKey",DELETE:"Delete",ENTER:"Enter",ESCAPE:"Escape",QUESTION_MARK:"?",SPACE:" ",TAB:"Tab",CHEVRON_LEFT:"\x3c",CHEVRON_RIGHT:"\x3e",PERIOD:".",COMMA:",",SUBTRACT:"-",A:"a",C:"c",D:"d",E:"e",F:"f",G:"g",H:"h",I:"i",L:"l",O:"o",P:"p",Q:"q",R:"r",S:"s",T:"t",V:"v",X:"x",Y:"y",Z:"z",K:"k",W:"w",0:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9"},p=function(r){return r===m.ARROW_LEFT||r===m.ARROW_RIGHT||r===m.ARROW_DOWN||r===m.ARROW_UP},D=function(r){return r.altKey},v=function(r){return r.shiftKey},
t=function(r){return r.shiftKey}},3795:function(g,h,b){b.d(h,{EK:function(){return M},H5:function(){return f},Jj:function(){return O},LW:function(){return r},N_:function(){return T},Ni:function(){return J},U1:function(){return D},c9:function(){return B},eH:function(){return G},g6:function(){return E},lk:function(){return F},wC:function(){return H},xj:function(){return v},yB:function(){return L},yW:function(){return S},yq:function(){return t}});var l=b(7041),m=b(9995),p=b(5475),D=function(I,ia,U,Z,
aa){return[(I-U)*Math.cos(aa)-(ia-Z)*Math.sin(aa)+U,(I-U)*Math.sin(aa)+(ia-Z)*Math.cos(aa)+Z]},v=function(I,ia,U){return D(I[0],I[1],ia[0],ia[1],U)},t=function(I,ia,U,Z,aa,W,fa,X){var ea=Math.cos(Z);Z=Math.sin(Z);return I.e&&I.w?ia+=aa+fa:I.e?(ia+=aa*(1+ea),U+=aa*Z,ia+=fa*(1-ea),U+=fa*-Z):I.w&&(ia+=aa*(1-ea),U+=aa*-Z,ia+=fa*(1+ea),U+=fa*Z),I.n&&I.s?U+=W+X:I.n?(ia+=W*Z,U+=W*(1-ea),ia+=X*-Z,U+=X*(1+ea)):I.s&&(ia+=W*-Z,U+=W*(1+ea),ia+=X*Z,U+=X*(1-ea)),[ia,U]},r=function(I,ia,U,Z){return Math.hypot(U-
I,Z-ia)},f=function(I,ia){return[(I[0]+ia[0])/2,(I[1]+ia[1])/2]},E=function(I){var ia=1<arguments.length&&void 0!==arguments[1]?arguments[1]:1;if(3<=I.length){var U=[I[0],I[I.length-1]],Z=U[0];U=U[1];return r(Z[0],Z[1],U[0],U[1])<=l.qx/ia}return!1},B=function(I,ia,U){var Z=I.length;if(3>Z)return!1;var aa=[Number.MAX_SAFE_INTEGER,U];ia=[ia,U];for(var W=U=0;W<Z;W++){var fa=I[W],X=I[(W+1)%Z],ea=fa,pa=X,va=ia,ta=aa,xa=V(ea,pa,va),Ga=V(ea,pa,ta),Ia=V(va,ta,ea),Ya=V(va,ta,pa);if(xa!==Ga&&Ia!==Ya||0===xa&&
J(ea,va,pa)||0===Ga&&J(ea,ta,pa)||0===Ia&&J(va,ea,ta)||0===Ya&&J(va,pa,ta)){if(0===V(fa,ia,X))return J(fa,ia,X);U++}}return 1==U%2},J=function(I,ia,U){return ia[0]<=Math.max(I[0],U[0])&&ia[0]>=Math.min(I[0],U[0])&&ia[1]<=Math.max(I[1],U[1])&&ia[1]>=Math.min(I[1],U[1])},V=function(I,ia,U){I=(ia[1]-I[1])*(U[0]-ia[0])-(ia[0]-I[0])*(U[1]-ia[1]);return 0===I?0:0<I?1:2},H=function(I,ia,U){return U?[Math.round(I/U)*U,Math.round(ia/U)*U]:[I,ia]},S=function(I,ia){var U,Z,aa;if((null===(U=ia.roundness)||void 0===
U?void 0:U.type)===l.a6.PROPORTIONAL_RADIUS||(null===(Z=ia.roundness)||void 0===Z?void 0:Z.type)===l.a6.LEGACY)return I*l.Rx;if((null===(aa=ia.roundness)||void 0===aa?void 0:aa.type)===l.a6.ADAPTIVE_RADIUS){var W,fa;ia=null!==(W=null===(fa=ia.roundness)||void 0===fa?void 0:fa.value)&&void 0!==W?W:l._9;return I<=ia/l.Rx?I*l.Rx:ia}return 0},L=function(I,ia){I=p.R.generateElementShape(I);if(!I)return null;I=(0,m.CM)(I[0]);for(var U=[0,0],Z=0,aa=1/0,W=null;Z<I.length;){var fa=I[Z],X=fa.op;fa=fa.data;
if("move"===X&&(U=fa),"bcurveTo"===X){X=[fa[0],fa[1]];var ea=[fa[2],fa[3]];fa=[fa[4],fa[5]];var pa=r(fa[0],fa[1],ia[0],ia[1]);pa<aa&&(aa=pa,W=[U,X,ea,fa]);U=fa}Z++}return W},T=function(I,ia,U,Z,aa){var W=function(fa,X){return Math.pow(1-fa,3)*Z[X]+3*fa*Math.pow(1-fa,2)*U[X]+3*Math.pow(fa,2)*(1-fa)*ia[X]+I[X]*Math.pow(fa,3)};return[W(aa,0),W(aa,1)]},R=function(I,ia){var U=[0];if(I=L(I,ia)){for(var Z=[],aa=1;0<aa;){var W=T(I[0],I[1],I[2],I[3],aa);Z.push([W[0],W[1]]);aa-=.05}ia=(Z.length&&O(Z.at(-1),
ia)&&Z.push([ia[0],ia[1]]),Z)}else ia=[];for(Z=I=0;I<ia.length-1;)Z+=r(ia[I][0],ia[I][1],ia[I+1][0],ia[I+1][1]),U.push(Z),I++;return U},G=function(I,ia){return R(I,ia).at(-1)},F=function(I,ia,U){I=R(I,ia);ia=I.length-1;U*=I.at(-1);for(var Z=0,aa=ia,W=0;Z<aa;)I[W=Math.floor(Z+(aa-Z)/2)]<U?Z=W+1:aa=W;return I[W]>U&&W--,I[W]===U?W/ia:1-(W+(U-I[W])/(I[W+1]-I[W]))/ia},O=function(I,ia){return I[0]===ia[0]&&I[1]===ia[1]},M=function(I){return 0==Math.round(I/Math.PI*1E4)%5E3}},3529:function(g,h,b){function l(ia,
U){var Z=Object.keys(ia);if(Object.getOwnPropertySymbols){var aa=Object.getOwnPropertySymbols(ia);U&&(aa=aa.filter(function(W){return Object.getOwnPropertyDescriptor(ia,W).enumerable}));Z.push.apply(Z,aa)}return Z}function m(ia){for(var U=1;U<arguments.length;U++){var Z=null!=arguments[U]?arguments[U]:{};U%2?l(Object(Z),!0).forEach(function(aa){(0,D.Z)(ia,aa,Z[aa])}):Object.getOwnPropertyDescriptors?Object.defineProperties(ia,Object.getOwnPropertyDescriptors(Z)):l(Object(Z)).forEach(function(aa){Object.defineProperty(ia,
aa,Object.getOwnPropertyDescriptor(Z,aa))})}return ia}b.d(h,{$D:function(){return M},Fl:function(){return O},I_:function(){return J.I_},N7:function(){return T.N7},NI:function(){return J.NI},NL:function(){return F},ZY:function(){return L.ZY},cT:function(){return L.cT},i1:function(){return I},lV:function(){return L.lV},zh:function(){return R.zh}});var p=b(8950),D=b(7169);g=b(2975);var v=b.n(g),t=b(2739),r=b(7726),f=b(7181),E=b(7041),B=b(40),J=b(4038),V=b(278),H=b(3223),S=b(1829),L=b(8165),T=b(6829),
R=b(9605),G=function(ia){var U=new H.Z;return U.replaceAllElements((0,S._N)(ia)),U.getNonDeletedElements()},F=function(ia){var U=ia.appState,Z=ia.files,aa=ia.maxWidthOrHeight,W=ia.getDimensions,fa=ia.exportPadding;ia=(0,f.nu)({elements:ia.elements,appState:U},null,null);var X=ia.appState,ea=X.exportBackground,pa=X.viewBackgroundColor;return(0,t.NL)(G(ia.elements),m(m({},X),{},{offsetTop:0,offsetLeft:0,width:0,height:0}),Z||{},{exportBackground:ea,exportPadding:fa,viewBackgroundColor:pa},function(va,
ta){var xa=document.createElement("canvas");if(aa){var Ga;"function"==typeof W&&console.warn("`getDimensions()` is ignored when `maxWidthOrHeight` is supplied.");var Ia=Math.max(va,ta);Ia=aa<Ia?aa/Ia:null!==(Ga=null==U?void 0:U.exportScale)&&void 0!==Ga?Ga:1;return xa.width=va*Ia,xa.height=ta*Ia,{canvas:xa,scale:Ia}}va=(null==W?void 0:W(va,ta))||{width:va,height:ta};return xa.width=va.width,xa.height=va.height,{canvas:xa,scale:null!==(Ia=va.scale)&&void 0!==Ia?Ia:1}})},O=function(){var ia=(0,p.Z)(v().mark(function aa(Z){var W,
fa,X,ea,pa,va;return v().wrap(function(ta){for(;;)switch(ta.prev=ta.next){case 0:return X=(fa=Z).mimeType,ea=void 0===X?E.LO.png:X,pa=fa.quality,ea===E.LO.png&&"number"==typeof pa&&console.warn('"quality" will be ignored for "'.concat(E.LO.png,'" mimeType')),"image/jpg"===ea&&(ea=E.LO.jpg),ea!==E.LO.jpg||null!==(W=Z.appState)&&void 0!==W&&W.exportBackground||(console.warn('Defaulting "exportBackground" to "true" for "'.concat(E.LO.jpg,'" mimeType')),Z=m(m({},Z),{},{appState:m(m({},Z.appState),{},
{exportBackground:!0})})),ta.next=6,F(m(m({},Z),{},{elements:G(Z.elements)}));case 6:return va=ta.sent,pa=pa||(/image\/jpe?g/.test(ea)?.92:.8),ta.abrupt("return",new Promise(function(xa,Ga){va.toBlob(function(){var Ia=(0,p.Z)(v().mark(function Ka(Fa){var Ba;return v().wrap(function(la){for(;;)switch(la.prev=la.next){case 0:if(Fa){la.next=2;break}return la.abrupt("return",Ga(Error("couldn't export to blob")));case 2:if(!Fa||ea!==E.LO.png||null===(Ba=Z.appState)||void 0===Ba||!Ba.exportEmbedScene){la.next=
6;break}return la.next=5,(0,B.encodePngMetadata)({blob:Fa,metadata:(0,J.I_)(Z.elements,Z.appState,Z.files||{},"local")});case 5:Fa=la.sent;case 6:xa(Fa);case 7:case "end":return la.stop()}},Ka)}));return function(Fa){return Ia.apply(this,arguments)}}(),ea,pa)}));case 9:case "end":return ta.stop()}},aa)}));return function(Z){return ia.apply(this,arguments)}}(),M=function(){var ia=(0,p.Z)(v().mark(function aa(Z){var W,fa,X,ea,pa,va,ta,xa,Ga,Ia,Ya;return v().wrap(function(Fa){for(;;)switch(Fa.prev=Fa.next){case 0:return W=
Z.elements,fa=Z.appState,X=void 0===fa?(0,r.im)():fa,ea=Z.files,pa=void 0===ea?{}:ea,va=Z.exportPadding,ta=Z.renderEmbeddables,xa=(0,f.nu)({elements:W,appState:X},null,null),Ga=xa.elements,Ia=xa.appState,Ya=m(m({},Ia),{},{exportPadding:va}),Fa.abrupt("return",(0,t.$D)(G(Ga),Ya,pa,{renderEmbeddables:ta,serializeAsJSON:function(){return(0,J.I_)(Ga,Ya,pa||{},"local")}}));case 4:case "end":return Fa.stop()}},aa)}));return function(Z){return ia.apply(this,arguments)}}(),I=function(){var ia=(0,p.Z)(v().mark(function aa(Z){var W;
return v().wrap(function(fa){for(;;)switch(fa.prev=fa.next){case 0:if("svg"!==Z.type){fa.next=8;break}return fa.next=3,M(Z);case 3:return W=fa.sent,fa.next=6,(0,V.dd)(W.outerHTML);case 6:case 11:case 16:fa.next=19;break;case 8:if("png"!==Z.type){fa.next=13;break}return fa.next=11,(0,V.uR)(O(Z));case 13:if("json"!==Z.type){fa.next=18;break}return fa.next=16,(0,V.vQ)(Z.elements,Z.files);case 18:throw Error("Invalid export type");case 19:case "end":return fa.stop()}},aa)}));return function(Z){return ia.apply(this,
arguments)}}()},5153:function(g,h,b){b.d(h,{k:function(){return m},z:function(){return p}});var l=b(1930),m=function(D){var v=D.map(function(t){return t[0]});D=D.map(function(t){return t[1]});return{width:Math.max.apply(Math,(0,l.Z)(v))-Math.min.apply(Math,(0,l.Z)(v)),height:Math.max.apply(Math,(0,l.Z)(D))-Math.min.apply(Math,(0,l.Z)(D))}},p=function(D,v,t,r){var f=t.map(function(H){return H[D]}),E=Math.max.apply(Math,(0,l.Z)(f));f=Math.min.apply(Math,(0,l.Z)(f));E-=f;var B=0===E?1:v/E,J=1/0;v=t.map(function(H){var S=
H[D]*B;H=(0,l.Z)(H);return H[D]=S,S<J&&(J=S),H});if(!r||2===v.length)return v;var V=f-J;return v.map(function(H){return H.map(function(S,L){return L===D?S+V:S})})}},5236:function(g,h,b){b.d(h,{LU:function(){return v},kb:function(){return t}});g=b(8152);var l=b(5605),m=b(7135),p=new g.k(Date.now()),D=0,v=function(){return Math.floor(p.next()*Math.pow(2,31))},t=function(){return(0,m.h2)()?"id".concat(D++):(0,l.x0)()}},6829:function(g,h,b){function l(Wa,hb,ab,Qa=bb=>bb){return Wa*Qa(.5-hb*(.5-ab))}function m(Wa,
hb){return[Wa[0]+hb[0],Wa[1]+hb[1]]}function p(Wa,hb){return[Wa[0]-hb[0],Wa[1]-hb[1]]}function D(Wa,hb){return[Wa[0]*hb,Wa[1]*hb]}function v(Wa){return[Wa[1],-Wa[0]]}function t(Wa,hb){return Wa[0]===hb[0]&&Wa[1]===hb[1]}function r(Wa,hb){Wa=p(Wa,hb);return Wa[0]*Wa[0]+Wa[1]*Wa[1]}function f(Wa){var hb=Math.hypot(Wa[0],Wa[1]);return[Wa[0]/hb,Wa[1]/hb]}function E(Wa,hb){return Math.hypot(Wa[1]-hb[1],Wa[0]-hb[0])}function B(Wa,hb,ab){let Qa=Math.sin(ab);ab=Math.cos(ab);let bb=Wa[0]-hb[0];Wa=Wa[1]-hb[1];
return[bb*ab-Wa*Qa+hb[0],bb*Qa+Wa*ab+hb[1]]}function J(Wa,hb,ab){return m(Wa,D(p(hb,Wa),ab))}function V(Wa,hb,ab){return m(Wa,D(hb,ab))}function H(Wa,hb={}){return function(ab,Qa={}){let {size:bb=16,smoothing:Pa=.5,thinning:Lb=.5,simulatePressure:xc=!0,easing:oc=Ic=>Ic,start:pc={},end:Cc={},last:bd=!1}=Qa,{cap:dc=!0,easing:Nc=Ic=>Ic*(2-Ic)}=pc,{cap:Qc=!0,easing:Ad=Ic=>--Ic*Ic*Ic+1}=Cc;if(0===ab.length||0>=bb)return[];var Xc,sc=ab[ab.length-1].runningLength;let Sc=!1===pc.taper?0:!0===pc.taper?Math.max(bb,
sc):pc.taper,Ib=!1===Cc.taper?0:!0===Cc.taper?Math.max(bb,sc):Cc.taper;var lb=Math.pow(bb*Pa,2);Qa=[];let Db=[];var Gb=ab.slice(0,10).reduce((Ic,wc)=>{var je=wc.pressure;xc&&(wc=W(1,wc.distance/bb),je=W(1,1-wc),je=W(1,Ic+.275*wc*(je-Ic)));return(Ic+je)/2},ab[0].pressure),db=l(bb,Lb,ab[ab.length-1].pressure,oc);let rb=ab[0].vector;var Nb=ab[0].point;let fc=Nb;var Bc=Nb;let Jc=fc;var ic=!1;for(var Oc=0;Oc<ab.length;Oc++){var {pressure:Rc}=ab[Oc];let {point:Ic,vector:wc,distance:je,runningLength:pf}=
ab[Oc];if(Oc<ab.length-1&&3>sc-pf)continue;Lb?(xc&&(db=W(1,je/bb),Rc=W(1,1-db),Rc=W(1,Gb+.275*db*(Rc-Gb))),db=l(bb,Lb,Rc,oc)):db=bb/2;void 0===Xc&&(Xc=db);var fd=pf<Sc?Nc(pf/Sc):1,pd=sc-pf<Ib?Ad((sc-pf)/Ib):1;db=Math.max(.01,db*Math.min(fd,pd));pd=(Oc<ab.length-1?ab[Oc+1]:ab[Oc]).vector;let qe=Oc<ab.length-1?wc[0]*pd[0]+wc[1]*pd[1]:1;fd=null!==qe&&0>qe;if(0>wc[0]*rb[0]+wc[1]*rb[1]&&!ic||fd){Nb=D(v(rb),db);for(let ue=1/13,kd=0;1>=kd;kd+=ue)Bc=B(p(Ic,Nb),Ic,X*kd),Qa.push(Bc),Jc=B(m(Ic,Nb),Ic,X*-kd),
Db.push(Jc);Nb=Bc;fc=Jc;fd&&(ic=!0)}else(ic=!1,Oc===ab.length-1)?(Rc=D(v(wc),db),Qa.push(p(Ic,Rc)),Db.push(m(Ic,Rc))):(Gb=D(v(J(pd,wc,qe)),db),Bc=p(Ic,Gb),(1>=Oc||r(Nb,Bc)>lb)&&(Qa.push(Bc),Nb=Bc),Jc=m(Ic,Gb),(1>=Oc||r(fc,Jc)>lb)&&(Db.push(Jc),fc=Jc),Gb=Rc,rb=wc)}sc=ab[0].point.slice(0,2);lb=1<ab.length?ab[ab.length-1].point.slice(0,2):m(ab[0].point,[1,1]);Bc=[];ic=[];if(1===ab.length){if(!Sc&&!Ib||bd){ab=V(sc,f(v(p(sc,lb))),-(Xc||db));Qa=[];for(let Ic=1/13,wc=Ic;1>=wc;wc+=Ic)Qa.push(B(ab,sc,2*X*
wc));return Qa}}else{if(!(Sc||Ib&&1===ab.length))if(dc)for(let Ic=1/13,wc=Ic;1>=wc;wc+=Ic)Xc=B(Db[0],sc,X*wc),Bc.push(Xc);else Oc=p(Qa[0],Db[0]),Xc=D(Oc,.5),Oc=D(Oc,.51),Bc.push(p(sc,Xc),p(sc,Oc),m(sc,Oc),m(sc,Xc));Xc=v(function(Ic){return[-Ic[0],-Ic[1]]}(ab[ab.length-1].vector));if(Ib||Sc&&1===ab.length)ic.push(lb);else if(Qc){ab=V(lb,Xc,db);for(let Ic=1/29,wc=Ic;1>wc;wc+=Ic)ic.push(B(ab,lb,3*X*wc))}else ic.push(m(lb,D(Xc,db)),m(lb,D(Xc,.99*db)),p(lb,D(Xc,.99*db)),p(lb,D(Xc,db)))}return Qa.concat(ic,
Db.reverse(),Bc)}(function(ab,Qa={}){var bb;let {streamline:Pa=.5,size:Lb=16,last:xc=!1}=Qa;if(0===ab.length)return[];Qa=.15+.85*(1-Pa);ab=Array.isArray(ab[0])?ab:ab.map(({x:Nc,y:Qc,pressure:Ad=.5})=>[Nc,Qc,Ad]);if(2===ab.length){var oc=ab[1];ab=ab.slice(0,-1);for(var pc=1;5>pc;pc++)ab.push(J(ab[0],oc,pc/4))}1===ab.length&&(ab=[...ab,[...m(ab[0],[1,1]),...ab[0].slice(2)]]);oc=[{point:[ab[0][0],ab[0][1]],pressure:0<=ab[0][2]?ab[0][2]:.25,vector:[1,1],distance:0,runningLength:0}];pc=!1;let Cc=0,bd=
oc[0],dc=ab.length-1;for(let Nc=1;Nc<ab.length;Nc++){let Qc=xc&&Nc===dc?ab[Nc].slice(0,2):J(bd.point,ab[Nc],Qa);if(t(bd.point,Qc))continue;let Ad=E(Qc,bd.point);if(Cc+=Ad,Nc<dc&&!pc){if(Cc<Lb)continue;pc=!0}bd={point:Qc,pressure:0<=ab[Nc][2]?ab[Nc][2]:.5,vector:f(p(bd.point,Qc)),distance:Ad,runningLength:Cc};oc.push(bd)}return oc[0].vector=(null==(bb=oc[1])?void 0:bb.vector)||[0,0],oc}(Wa,hb),hb)}function S(Wa,hb){var ab=Object.keys(Wa);if(Object.getOwnPropertySymbols){var Qa=Object.getOwnPropertySymbols(Wa);
hb&&(Qa=Qa.filter(function(bb){return Object.getOwnPropertyDescriptor(Wa,bb).enumerable}));ab.push.apply(ab,Qa)}return ab}function L(Wa){for(var hb=1;hb<arguments.length;hb++){var ab=null!=arguments[hb]?arguments[hb]:{};hb%2?S(Object(ab),!0).forEach(function(Qa){(0,F.Z)(Wa,Qa,ab[Qa])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Wa,Object.getOwnPropertyDescriptors(ab)):S(Object(ab)).forEach(function(Qa){Object.defineProperty(Wa,Qa,Object.getOwnPropertyDescriptor(ab,Qa))})}return Wa}function T(Wa){var hb=
R(Wa);hb=new Path2D(hb);return vb.set(Wa,hb),hb}function R(Wa){return function(hb){if(!hb.length)return"";var ab=hb.length-1;return hb.reduce(function(Qa,bb,Pa,Lb){return Pa===ab?Qa.push(bb,G(bb,Lb[0]),"L",Lb[0],"Z"):Qa.push(bb,G(bb,Lb[Pa+1])),Qa},["M",hb[0],"Q"]).join(" ").replace(yb,"$1")}(H(Wa.simulatePressure?Wa.points:Wa.points.length?Wa.points.map(function(hb,ab){hb=(0,O.Z)(hb,2);return[hb[0],hb[1],Wa.pressures[ab]]}):[[0,0,.5]],{simulatePressure:Wa.simulatePressure,size:4.25*Wa.strokeWidth,
thinning:.6,smoothing:.5,streamline:.5,easing:function(hb){return Math.sin(hb*Math.PI/2)},last:!!Wa.lastCommittedPoint}))}function G(Wa,hb){return[(Wa[0]+hb[0])/2,(Wa[1]+hb[1])/2]}b.d(h,{Dn:function(){return Ba},Xx:function(){return na},Lc:function(){return T},N7:function(){return R},lw:function(){return Va},Rg:function(){return ib},uI:function(){return Oa}});var F=b(7169),O=b(2577),M=b(9472),I=b(9995),ia=b(7135),U=b(3795),Z=b(9845);g=b(7726);var aa=b(7041),{min:W,PI:fa}=Math,X=fa+1E-4,ea=b(554),
pa=b(8627),va=b(5434),ta=b(3473),xa=b(8132),Ga=b(5475),Ia=(0,g.im)(),Ya=function(Wa,hb){return(0,M.wi)(Wa)&&!hb.imageCache.has(Wa.fileId)},Fa=function(Wa,hb,ab){var Qa;return"dark"===ab.theme&&(0,M.wi)(Wa)&&!Ya(Wa,hb)&&(null===(Qa=hb.imageCache.get(Wa.fileId))||void 0===Qa?void 0:Qa.mimeType)!==aa.LO.svg},Ka=function(Wa){return"freedraw"===Wa.type?12*Wa.strokeWidth:20},Ba=14,la=document.createElement("img");la.src="data:".concat(aa.LO.svg,",").concat(encodeURIComponent('\x3csvg aria-hidden\x3d"true" focusable\x3d"false" data-prefix\x3d"fas" data-icon\x3d"image" class\x3d"svg-inline--fa fa-image fa-w-16" role\x3d"img" xmlns\x3d"http://www.w3.org/2000/svg" viewBox\x3d"0 0 512 512"\x3e\x3cpath fill\x3d"#888" d\x3d"M464 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h416c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM112 120c-30.928 0-56 25.072-56 56s25.072 56 56 56 56-25.072 56-56-25.072-56-56-56zM64 384h384V272l-87.515-87.515c-4.686-4.686-12.284-4.686-16.971 0L208 320l-55.515-55.515c-4.686-4.686-12.284-4.686-16.971 0L64 336v48z"\x3e\x3c/path\x3e\x3c/svg\x3e'));
var ka=document.createElement("img");ka.src="data:".concat(aa.LO.svg,",").concat(encodeURIComponent('\x3csvg viewBox\x3d"0 0 668 668" xmlns\x3d"http://www.w3.org/2000/svg" xml:space\x3d"preserve" style\x3d"fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2"\x3e\x3cpath d\x3d"M464 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h416c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48ZM112 120c-30.928 0-56 25.072-56 56s25.072 56 56 56 56-25.072 56-56-25.072-56-56-56ZM64 384h384V272l-87.515-87.515c-4.686-4.686-12.284-4.686-16.971 0L208 320l-55.515-55.515c-4.686-4.686-12.284-4.686-16.971 0L64 336v48Z" style\x3d"fill:#888;fill-rule:nonzero" transform\x3d"matrix(.81709 0 0 .81709 124.825 145.825)"/\x3e\x3cpath d\x3d"M256 8C119.034 8 8 119.033 8 256c0 136.967 111.034 248 248 248s248-111.034 248-248S392.967 8 256 8Zm130.108 117.892c65.448 65.448 70 165.481 20.677 235.637L150.47 105.216c70.204-49.356 170.226-44.735 235.638 20.676ZM125.892 386.108c-65.448-65.448-70-165.481-20.677-235.637L361.53 406.784c-70.203 49.356-170.226 44.736-235.638-20.676Z" style\x3d"fill:#888;fill-rule:nonzero" transform\x3d"matrix(.30366 0 0 .30366 506.822 60.065)"/\x3e\x3c/svg\x3e'));
var ua=function(Wa,hb,ab,Qa,bb){var Pa,Lb;switch(ab.globalAlpha=(null!==(Pa=null===(Lb=(0,ta.$Z)(Wa))||void 0===Lb?void 0:Lb.opacity)&&void 0!==Pa?Pa:100)*Wa.opacity/1E4,Wa.type){case "rectangle":case "embeddable":case "diamond":case "ellipse":ab.lineJoin="round";ab.lineCap="round";hb.draw(Ga.R.get(Wa));break;case "arrow":case "line":ab.lineJoin="round";ab.lineCap="round";Ga.R.get(Wa).forEach(function(oc){hb.draw(oc)});break;case "freedraw":ab.save();ab.fillStyle=Wa.strokeColor;bb=vb.get(Wa);var xc=
Ga.R.get(Wa);xc&&hb.draw(xc);ab.fillStyle=Wa.strokeColor;ab.fill(bb);ab.restore();break;case "image":Qa=(0,M.wi)(Wa)?null===(xc=Qa.imageCache.get(Wa.fileId))||void 0===xc?void 0:xc.image:void 0;null==Qa||Qa instanceof Promise?function(oc,pc,Cc){pc.fillStyle="#E7E7E7";pc.fillRect(0,0,oc.width,oc.height);Cc=Math.min(oc.width,oc.height);Cc=Math.min(Cc,Math.min(.4*Cc,100));pc.drawImage("error"===oc.status?ka:la,oc.width/2-Cc/2,oc.height/2-Cc/2,Cc,Cc)}(Wa,ab,bb.zoom.value):ab.drawImage(Qa,0,0,Wa.width,
Wa.height);break;default:if(!(0,M.iB)(Wa))throw Error("Unimplemented type ".concat(Wa.type));(bb=(xc=(0,ia.dZ)(Wa.text))&&!ab.canvas.isConnected)&&document.body.appendChild(ab.canvas);ab.canvas.setAttribute("dir",xc?"rtl":"ltr");ab.save();ab.font=(0,ia.mO)(Wa);ab.fillStyle=Wa.strokeColor;ab.textAlign=Wa.textAlign;xc=Wa.text.replace(/\r\n?/g,"\n").split("\n");Qa="center"===Wa.textAlign?Wa.width/2:"right"===Wa.textAlign?Wa.width:0;Pa=(0,ea.Rg)(Wa.fontSize,Wa.lineHeight);Wa=Wa.height-Wa.baseline;for(Lb=
0;Lb<xc.length;Lb++)ab.fillText(xc[Lb],Qa,(Lb+1)*Pa-Wa);ab.restore();bb&&ab.canvas.remove()}ab.globalAlpha=1},na=new WeakMap,oa=function(Wa,hb,ab){var Qa,bb,Pa=hb?ab.zoom:Ia.zoom,Lb=na.get(Wa),xc=Lb&&Lb.zoomValue!==Pa.value&&!(null!=ab&&ab.shouldCacheIgnoreZoom),oc=(null===(Qa=(0,ea.WJ)(Wa))||void 0===Qa?void 0:Qa.version)||null;Qa=(null===(bb=(0,ta.$Z)(Wa))||void 0===bb?void 0:bb.opacity)||100;if(!Lb||xc||Lb.theme!==ab.theme||Lb.boundTextElementVersion!==oc||Lb.containingFrameOpacity!==Qa){var pc,
Cc;bb=document.createElement("canvas");Lb=bb.getContext("2d");xc=Ka(Wa);oc=Ka(Wa);Qa=(0,I.qf)(Wa);var bd=(0,O.Z)(Qa,4),dc=bd[0];Qa=bd[1];var Nc=bd[2];bd=bd[3];dc=(0,M.bt)(Wa)||(0,M.F9)(Wa)?(0,ia.TE)(dc,Nc):Wa.width;Qa=(0,M.bt)(Wa)||(0,M.F9)(Wa)?(0,ia.TE)(Qa,bd):Wa.height;dc=dc*window.devicePixelRatio+2*oc;oc=Qa*window.devicePixelRatio+2*oc;Nc=Pa.value;Qa=((32767<dc*Nc||32767<oc*Nc)&&(Nc=Math.min(32767/dc,32767/oc)),16777216<dc*oc*Nc*Nc&&(Nc=Math.sqrt(16777216/(dc*oc))),{width:Math.floor(dc*Nc),height:Math.floor(oc*
Nc),scale:Nc});dc=Qa.height;oc=Qa.scale;bb.width=Qa.width;bb.height=dc;dc=Qa=0;if((0,M.bt)(Wa)||(0,M.F9)(Wa))Qa=(0,I.qf)(Wa),dc=(0,O.Z)(Qa,2),Qa=dc[0],dc=dc[1],Qa=Wa.x>Qa?(0,ia.TE)(Wa.x,Qa)*window.devicePixelRatio*oc:0,dc=Wa.y>dc?(0,ia.TE)(Wa.y,dc)*window.devicePixelRatio*oc:0,Lb.translate(Qa,dc);Lb.save();Lb.translate(xc*oc,xc*oc);Lb.scale(window.devicePixelRatio*oc,window.devicePixelRatio*oc);xc=Z.Z.canvas(bb);hb=(Fa(Wa,hb,ab)&&(Lb.filter="invert(100%) hue-rotate(180deg) saturate(1.25)"),ua(Wa,
xc,Lb,hb,ab),Lb.restore(),{element:Wa,canvas:bb,theme:ab.theme,scale:oc,zoomValue:Pa.value,canvasOffsetX:Qa,canvasOffsetY:dc,boundTextElementVersion:(null===(pc=(0,ea.WJ)(Wa))||void 0===pc?void 0:pc.version)||null,containingFrameOpacity:(null===(Cc=(0,ta.$Z)(Wa))||void 0===Cc?void 0:Cc.opacity)||100});return na.set(Wa,hb),hb}return Lb},La=function(Wa,hb,ab,Qa){var bb=Wa.element,Pa=Ka(bb),Lb=Wa.scale,xc=(0,I.qf)(bb),oc=(0,O.Z)(xc,4);xc=oc[0];var pc=oc[1],Cc=oc[2];oc=oc[3];(0,M.F9)(bb)&&(xc=Math.floor(xc),
Cc=Math.ceil(Cc),pc=Math.floor(pc),oc=Math.ceil(oc));var bd=((xc+Cc)/2+Qa.scrollX)*window.devicePixelRatio,dc=((pc+oc)/2+Qa.scrollY)*window.devicePixelRatio;hb.save();hb.scale(1/window.devicePixelRatio,1/window.devicePixelRatio);var Nc=(0,ea.WJ)(bb);if((0,M.Yv)(bb)&&Nc){Qa=document.createElement("canvas");ab=Qa.getContext("2d");var Qc=Math.max((0,ia.TE)(xc,Cc),(0,ia.TE)(pc,oc));Qa.width=Qc*window.devicePixelRatio*Lb+Pa*Wa.scale*10;Qa.height=Qc*window.devicePixelRatio*Lb+Pa*Wa.scale*10;Qc=(Qa.width-
Wa.canvas.width)/2;var Ad=(Qa.height-Wa.canvas.height)/2;ab.translate(Qa.width/2,Qa.height/2);ab.rotate(bb.angle);ab.drawImage(Wa.canvas,-Wa.canvas.width/2,-Wa.canvas.height/2,Wa.canvas.width,Wa.canvas.height);Wa=(0,I.qf)(Nc);var Xc=(0,O.Z)(Wa,6);Wa=Xc[4];Xc=Xc[5];ab.rotate(-bb.angle);ab.translate(-(Qa.width/2-(Wa-xc)*window.devicePixelRatio*Lb-Qc-Pa*Lb),-(Qa.height/2-(Xc-pc)*window.devicePixelRatio*Lb-Ad-Pa*Lb));ab.clearRect(-(Nc.width/2+aa.gK)*window.devicePixelRatio*Lb,-(Nc.height/2+aa.gK)*window.devicePixelRatio*
Lb,(Nc.width+2*aa.gK)*window.devicePixelRatio*Lb,(Nc.height+2*aa.gK)*window.devicePixelRatio*Lb);hb.translate(bd,dc);hb.drawImage(Qa,-(Cc-xc)/2*window.devicePixelRatio-Qc/Lb-Pa,-(oc-pc)/2*window.devicePixelRatio-Ad/Lb-Pa,Qa.width/Lb,Qa.height/Lb)}else if(hb.translate(bd,dc),hb.rotate(bb.angle),"scale"in Wa.element&&!Ya(bb,ab)&&hb.scale(Wa.element.scale[0],Wa.element.scale[1]),hb.translate(-bd,-dc),hb.drawImage(Wa.canvas,(xc+Qa.scrollX)*window.devicePixelRatio-Pa*Wa.scale/Wa.scale,(pc+Qa.scrollY)*
window.devicePixelRatio-Pa*Wa.scale/Wa.scale,Wa.canvas.width/Wa.scale,Wa.canvas.height/Wa.scale),"true"==={VITE_APP_BACKEND_V2_GET_URL:"https://json.excalidraw.com/api/v2/",VITE_APP_BACKEND_V2_POST_URL:"https://json.excalidraw.com/api/v2/post/",VITE_APP_LIBRARY_URL:"https://libraries.excalidraw.com",VITE_APP_LIBRARY_BACKEND:"https://us-central1-excalidraw-room-persistence.cloudfunctions.net/libraries",VITE_APP_PORTAL_URL:"https://portal.excalidraw.com",VITE_APP_PLUS_LP:"https://plus.excalidraw.com",
VITE_APP_PLUS_APP:"https://app.excalidraw.com",VITE_APP_WS_SERVER_URL:"",VITE_APP_FIREBASE_CONFIG:'{"apiKey":"AIzaSyAd15pYlMci_xIp9ko6wkEsDzAAA0Dn0RU","authDomain":"excalidraw-room-persistence.firebaseapp.com","databaseURL":"https://excalidraw-room-persistence.firebaseio.com","projectId":"excalidraw-room-persistence","storageBucket":"excalidraw-room-persistence.appspot.com","messagingSenderId":"654800341332","appId":"1:654800341332:web:4a692de832b55bd57ce0c1"}',VITE_APP_DISABLE_TRACKING:"",VITE_PKG_NAME:"@excalidraw/excalidraw",
VITE_PKG_VERSION:"0.16.1",VITE_IS_EXCALIDRAW_NPM_PACKAGE:!0}.VITE_APP_DEBUG_ENABLE_TEXT_CONTAINER_BOUNDING_BOX&&(0,M.Xo)(bb))Pa=(0,ea.WJ)(bb),Lb=(0,ea.cw)(bb),hb.strokeStyle="#c92a2a",hb.lineWidth=3,hb.strokeRect((Lb.x+Qa.scrollX)*window.devicePixelRatio,(Lb.y+Qa.scrollY)*window.devicePixelRatio,(0,ea.iZ)(bb)*window.devicePixelRatio,(0,ea.D9)(bb,Pa)*window.devicePixelRatio);hb.restore()},Oa=function(Wa,hb,ab){hb.save();hb.translate(Wa.x+ab.scrollX,Wa.y+ab.scrollY);hb.fillStyle="rgba(0, 0, 200, 0.04)";
var Qa=.5/ab.zoom.value;hb.fillRect(Qa,Qa,Wa.width,Wa.height);hb.lineWidth=1/ab.zoom.value;hb.strokeStyle=" rgb(105, 101, 219)";hb.strokeRect(Qa,Qa,Wa.width,Wa.height);hb.restore()},Va=function(Wa,hb,ab,Qa,bb){switch(Wa.type){case "frame":!Qa.isExporting&&bb.frameRendering.enabled&&bb.frameRendering.outline&&(ab.save(),ab.translate(Wa.x+bb.scrollX,Wa.y+bb.scrollY),ab.fillStyle="rgba(0, 0, 200, 0.04)",ab.lineWidth=2/bb.zoom.value,ab.strokeStyle=aa.iG.strokeColor,aa.iG.radius&&ab.roundRect?(ab.beginPath(),
ab.roundRect(0,0,Wa.width,Wa.height,aa.iG.radius/bb.zoom.value),ab.stroke(),ab.closePath()):ab.strokeRect(0,0,Wa.width,Wa.height),ab.restore());break;case "freedraw":if(Ga.R.generateElementShape(Wa),Qa.isExporting){var Pa=(0,I.qf)(Wa),Lb=(0,O.Z)(Pa,4),xc=Lb[0];Pa=Lb[1];var oc=Lb[2],pc=Lb[3];Lb=(xc+oc)/2+bb.scrollX;var Cc=(Pa+pc)/2+bb.scrollY;xc=(oc-xc)/2-(Wa.x-xc);Pa=(pc-Pa)/2-(Wa.y-Pa);ab.save();ab.translate(Lb,Cc);ab.rotate(Wa.angle);ab.translate(-xc,-Pa);ua(Wa,hb,ab,Qa,bb);ab.restore()}else Wa=
oa(Wa,Qa,bb),La(Wa,ab,Qa,bb);break;case "rectangle":case "diamond":case "ellipse":case "line":case "arrow":case "image":case "text":case "embeddable":if(Ga.R.generateElementShape(Wa,Qa.isExporting),Qa.isExporting){Pa=(0,I.qf)(Wa);xc=(0,O.Z)(Pa,4);Pa=xc[0];Lb=xc[1];Cc=xc[2];xc=xc[3];pc=(Pa+Cc)/2+bb.scrollX;var bd=(Lb+xc)/2+bb.scrollY;oc=(Cc-Pa)/2-(Wa.x-Pa);var dc=(xc-Lb)/2-(Wa.y-Lb);if((0,M.iB)(Wa)){var Nc=(0,ea.tl)(Wa);(0,M.Yv)(Nc)&&(dc=pa._.getBoundTextElementPosition(Nc,Wa),oc=(Cc-Pa)/2-(dc.x-Pa),
dc=(xc-Lb)/2-(dc.y-Lb))}ab.save();ab.translate(pc,bd);Fa(Wa,Qa,bb)&&(ab.filter="none");pc=(0,ea.WJ)(Wa);(0,M.Yv)(Wa)&&pc?(hb=document.createElement("canvas"),bd=hb.getContext("2d"),oc=Math.max((0,ia.TE)(Pa,Cc),(0,ia.TE)(Lb,xc)),dc=Ka(Wa),hb.width=oc*bb.exportScale+10*dc*bb.exportScale,hb.height=oc*bb.exportScale+10*dc*bb.exportScale,bd.translate(hb.width/2,hb.height/2),bd.scale(bb.exportScale,bb.exportScale),oc=Wa.width/2-(Wa.x-Pa),dc=Wa.height/2-(Wa.y-Lb),bd.rotate(Wa.angle),Nc=Z.Z.canvas(hb),bd.translate(-oc,
-dc),ua(Wa,Nc,bd,Qa,bb),bd.translate(oc,dc),bd.rotate(-Wa.angle),Qa=(0,I.qf)(pc),Qa=(0,O.Z)(Qa,6),bd.translate(-((Pa+Cc)/2-Qa[4]),-((Lb+xc)/2-Qa[5])),bd.clearRect(-pc.width/2,-pc.height/2,pc.width,pc.height),ab.scale(1/bb.exportScale,1/bb.exportScale),ab.drawImage(hb,-hb.width/2,-hb.height/2,hb.width,hb.height)):(ab.rotate(Wa.angle),"image"===Wa.type&&ab.scale(Wa.scale[0],Wa.scale[1]),ab.translate(-oc,-dc),ua(Wa,hb,ab,Qa,bb));ab.restore()}else hb=oa(Wa,Qa,bb),Pa=ab.imageSmoothingEnabled,null!=bb&&
bb.shouldCacheIgnoreZoom||Wa.angle&&!(0,U.EK)(Wa.angle)||(ab.imageSmoothingEnabled=!1),La(hb,ab,Qa,bb),ab.imageSmoothingEnabled=Pa;break;default:throw Error("Unimplemented type ".concat(Wa.type));}},Ma=function(Wa,hb,ab){if(void 0===ab)return Wa.draw(hb);hb={sets:hb.sets,shape:hb.shape,options:L(L({},hb.options),{},{fixedDecimalPlaceDigits:ab})};return Wa.draw(hb)},Ua=function(Wa,hb,ab,Qa){if((Wa=(0,ta.$Z)(Wa))&&Wa.id===Qa){var bb=hb.ownerDocument.createElementNS(aa.hR,"g");return bb.setAttributeNS(aa.hR,
"clip-path","url(#".concat(Wa.id,")")),ab.forEach(function(Pa){return bb.appendChild(Pa)}),bb}return null},ib=function Cc(hb,ab,Qa,bb,Pa,Lb,xc,oc,pc){var bd,dc,Nc=Pa,Qc=Lb,Ad=(0,I.qf)(hb);Ad=(0,O.Z)(Ad,4);var Xc=Ad[0],sc=Ad[1],Sc=(Ad[2]-Xc)/2-(hb.x-Xc),Ib=(Ad[3]-sc)/2-(hb.y-sc);if((0,M.iB)(hb)&&(Ad=(0,ea.tl)(hb),(0,M.Yv)(Ad))){Xc=(0,I.qf)(Ad);var lb=(0,O.Z)(Xc,4);Xc=lb[0];sc=lb[1];var Db=lb[2];lb=lb[3];Ad=pa._.getBoundTextElementPosition(Ad,hb);Sc=(Db-Xc)/2-(Ad.x-Xc);Ib=(lb-sc)/2-(Ad.y-sc);Pa=Pa+
Ad.x-hb.x;Lb=Lb+Ad.y-hb.y}var Gb=180*hb.angle/Math.PI;Ad=Qa;hb.link&&(Xc=Qa.ownerDocument.createElementNS(aa.hR,"a"),Xc.setAttribute("href",(0,xa.$u)(hb.link)),Ad.appendChild(Xc),Ad=Xc);var db=(null!==(bd=null===(dc=(0,ta.$Z)(hb))||void 0===dc?void 0:dc.opacity)&&void 0!==bd?bd:100)*hb.opacity/1E4;switch(hb.type){case "selection":throw Error("Selection rendering is not supported for SVG");case "rectangle":case "diamond":case "ellipse":Qa=Ga.R.generateElementShape(hb);Qa=Ma(ab,Qa,aa.zK);1!==db&&(Qa.setAttribute("stroke-opacity",
"".concat(db)),Qa.setAttribute("fill-opacity","".concat(db)));Qa.setAttribute("stroke-linecap","round");Qa.setAttribute("transform","translate(".concat(Pa||0," ").concat(Lb||0,") rotate(").concat(Gb," ").concat(Sc," ").concat(Ib,")"));(oc=Ua(hb,Ad,[Qa],oc))?Ad.appendChild(oc):Ad.appendChild(Qa);break;case "embeddable":bd=Ga.R.generateElementShape(hb,!0);dc=Ma(ab,bd,aa.zK);Xc=hb.opacity/100;1!==Xc&&(dc.setAttribute("stroke-opacity","".concat(Xc)),dc.setAttribute("fill-opacity","".concat(Xc)));dc.setAttribute("stroke-linecap",
"round");dc.setAttribute("transform","translate(".concat(Pa||0," ").concat(Lb||0,") rotate(").concat(Gb," ").concat(Sc," ").concat(Ib,")"));Ad.appendChild(dc);dc=(0,va.g0)(hb);Cc(dc,ab,Ad,bb,dc.x+Nc-hb.x,dc.y+Qc-hb.y,xc,oc,pc);oc=Ma(ab,bd,aa.zK);oc.setAttribute("stroke-linecap","round");for(oc.setAttribute("transform","translate(".concat(Pa||0," ").concat(Lb||0,") rotate(").concat(Gb," ").concat(Sc," ").concat(Ib,")"));oc.firstChild;)oc.removeChild(oc.firstChild);xc=(0,U.yW)(Math.min(hb.width,hb.height),
hb);bb=(0,va.LM)((0,xa.ye)(hb.link||""));if(!1===pc||"document"===(null==bb?void 0:bb.type))Qa=Qa.ownerDocument.createElementNS(aa.hR,"a"),Qa.setAttribute("href",(0,xa.$u)(hb.link||"")),Qa.setAttribute("target","_blank"),Qa.setAttribute("rel","noopener noreferrer"),Qa.style.borderRadius="".concat(xc,"px"),oc.appendChild(Qa);else{var rb;Qa=Qa.ownerDocument.createElementNS(aa.hR,"foreignObject");Qa.style.width="".concat(hb.width,"px");Qa.style.height="".concat(hb.height,"px");Qa.style.border="none";
pc=Qa.ownerDocument.createElementNS(aa.hR,"div");pc.setAttribute("xmlns","http://www.w3.org/1999/xhtml");pc.style.width="100%";pc.style.height="100%";Nc=pc.ownerDocument.createElement("iframe");Nc.src=null!==(rb=null==bb?void 0:bb.link)&&void 0!==rb?rb:"";Nc.style.width="100%";Nc.style.height="100%";Nc.style.border="none";Nc.style.borderRadius="".concat(xc,"px");Nc.style.top="0";Nc.style.left="0";Nc.allowFullscreen=!0;pc.appendChild(Nc);Qa.appendChild(pc);oc.appendChild(Qa)}Ad.appendChild(oc);break;
case "line":case "arrow":rb=(0,ea.WJ)(hb);xc=Qa.ownerDocument.createElementNS(aa.hR,"mask");rb&&(xc.setAttribute("id","mask-".concat(hb.id)),pc=Qa.ownerDocument.createElementNS(aa.hR,"rect"),Pa=Pa||0,Lb=Lb||0,pc.setAttribute("x","0"),pc.setAttribute("y","0"),pc.setAttribute("fill","#fff"),pc.setAttribute("width","".concat(hb.width+100+Pa)),pc.setAttribute("height","".concat(hb.height+100+Lb)),xc.appendChild(pc),pc=Qa.ownerDocument.createElementNS(aa.hR,"rect"),bb=pa._.getBoundTextElementPosition(hb,
rb),Nc=Lb+bb.y-hb.y,pc.setAttribute("x",(Pa+bb.x-hb.x).toString()),pc.setAttribute("y",Nc.toString()),pc.setAttribute("fill","#000"),pc.setAttribute("width","".concat(rb.width)),pc.setAttribute("height","".concat(rb.height)),pc.setAttribute("opacity","1"),xc.appendChild(pc));var Nb=Qa.ownerDocument.createElementNS(aa.hR,"g");rb&&Nb.setAttribute("mask","url(#mask-".concat(hb.id,")"));Nb.setAttribute("stroke-linecap","round");Ga.R.generateElementShape(hb).forEach(function(fc){fc=Ma(ab,fc,aa.zK);1!==
db&&(fc.setAttribute("stroke-opacity","".concat(db)),fc.setAttribute("fill-opacity","".concat(db)));fc.setAttribute("transform","translate(".concat(Pa||0," ").concat(Lb||0,") rotate(").concat(Gb," ").concat(Sc," ").concat(Ib,")"));"line"===hb.type&&(0,U.g6)(hb.points)&&"transparent"!==hb.backgroundColor&&fc.setAttribute("fill-rule","evenodd");Nb.appendChild(fc)});(oc=Ua(hb,Ad,[Nb,xc],oc))?Ad.appendChild(oc):(Ad.appendChild(Nb),Ad.append(xc));break;case "freedraw":xc=(xc=Ga.R.generateElementShape(hb))?
Ma(ab,xc,aa.zK):Qa.ownerDocument.createElementNS(aa.hR,"g");1!==db&&(xc.setAttribute("stroke-opacity","".concat(db)),xc.setAttribute("fill-opacity","".concat(db)));xc.setAttribute("transform","translate(".concat(Pa||0," ").concat(Lb||0,") rotate(").concat(Gb," ").concat(Sc," ").concat(Ib,")"));xc.setAttribute("stroke","none");Qa=Qa.ownerDocument.createElementNS(aa.hR,"path");Qa.setAttribute("fill",hb.strokeColor);Qa.setAttribute("d",R(hb));xc.appendChild(Qa);(oc=Ua(hb,Ad,[xc],oc))?Ad.appendChild(oc):
Ad.appendChild(xc);break;case "image":pc=Math.round(hb.width);rb=Math.round(hb.height);if(Nc=(0,M.wi)(hb)&&bb[hb.fileId]){Qc="image-".concat(Nc.id);bb=Qa.querySelector("#".concat(Qc));bb||((bb=Qa.ownerDocument.createElementNS(aa.hR,"symbol")).id=Qc,bd=Qa.ownerDocument.createElementNS(aa.hR,"image"),bd.setAttribute("width","100%"),bd.setAttribute("height","100%"),bd.setAttribute("href",Nc.dataURL),bb.appendChild(bd),Ad.prepend(bb));bb=Qa.ownerDocument.createElementNS(aa.hR,"use");if(bb.setAttribute("href",
"#".concat(Qc)),xc&&Nc.mimeType!==aa.LO.svg&&bb.setAttribute("filter","invert(100%) hue-rotate(180deg) saturate(1.25)"),bb.setAttribute("width","".concat(pc)),bb.setAttribute("height","".concat(rb)),bb.setAttribute("opacity","".concat(db)),1!==hb.scale[0]||1!==hb.scale[1])xc=1!==hb.scale[0]?-pc:0,rb=1!==hb.scale[1]?-rb:0,bb.setAttribute("transform","scale(".concat(hb.scale[0],", ").concat(hb.scale[1],") translate(").concat(xc," ").concat(rb,")"));Qa=Qa.ownerDocument.createElementNS(aa.hR,"g");Qa.appendChild(bb);
Qa.setAttribute("transform","translate(".concat(Pa||0," ").concat(Lb||0,") rotate(").concat(Gb," ").concat(Sc," ").concat(Ib,")"));(oc=Ua(hb,Ad,[Qa],oc))?Ad.appendChild(oc):Ad.appendChild(Qa)}break;case "frame":break;default:if(!(0,M.iB)(hb))throw Error("Unimplemented type ".concat(hb.type));xc=Qa.ownerDocument.createElementNS(aa.hR,"g");1!==db&&(xc.setAttribute("stroke-opacity","".concat(db)),xc.setAttribute("fill-opacity","".concat(db)));xc.setAttribute("transform","translate(".concat(Pa||0," ").concat(Lb||
0,") rotate(").concat(Gb," ").concat(Sc," ").concat(Ib,")"));rb=hb.text.replace(/\r\n?/g,"\n").split("\n");pc=(0,ea.Rg)(hb.fontSize,hb.lineHeight);bb="center"===hb.textAlign?hb.width/2:"right"===hb.textAlign?hb.width:0;Nc=(0,ia.dZ)(hb.text)?"rtl":"ltr";Qc="center"===hb.textAlign?"middle":"right"===hb.textAlign||"rtl"===Nc?"end":"start";for(bd=0;bd<rb.length;bd++)dc=Qa.ownerDocument.createElementNS(aa.hR,"text"),dc.textContent=rb[bd],dc.setAttribute("x","".concat(bb)),dc.setAttribute("y","".concat(bd*
pc)),dc.setAttribute("font-family",(0,ia.$g)(hb)),dc.setAttribute("font-size","".concat(hb.fontSize,"px")),dc.setAttribute("fill",hb.strokeColor),dc.setAttribute("text-anchor",Qc),dc.setAttribute("style","white-space: pre;"),dc.setAttribute("direction",Nc),dc.setAttribute("dominant-baseline","text-before-edge"),xc.appendChild(dc);(oc=Ua(hb,Ad,[xc],oc))?Ad.appendChild(oc):Ad.appendChild(xc)}},vb=new WeakMap([]),yb=/(\s?[A-Z]?,?-?[0-9]*\.[0-9]{0,2})(([0-9]|e|-)*)/g},5743:function(g,h,b){function l(Ma,
Ua){var ib="undefined"!=typeof Symbol&&Ma[Symbol.iterator]||Ma["@@iterator"];if(!ib){if(Array.isArray(Ma)||(ib=function(ab,Qa){if(ab){if("string"==typeof ab)return m(ab,Qa);var bb=Object.prototype.toString.call(ab).slice(8,-1);"Object"===bb&&ab.constructor&&(bb=ab.constructor.name);if("Map"===bb||"Set"===bb)return Array.from(ab);if("Arguments"===bb||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(bb))return m(ab,Qa)}}(Ma))||Ua&&Ma&&"number"==typeof Ma.length){ib&&(Ma=ib);var vb=0;Ua=function(){};
return{s:Ua,n:function(){return vb>=Ma.length?{done:!0}:{done:!1,value:Ma[vb++]}},e:function(ab){throw ab;},f:Ua}}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 yb,Wa=!0,hb=!1;return{s:function(){ib=ib.call(Ma)},n:function(){var ab=ib.next();return Wa=ab.done,ab},e:function(ab){hb=!0;yb=ab},f:function(){try{Wa||null==ib.return||ib.return()}finally{if(hb)throw yb;}}}}function m(Ma,Ua){(null==
Ua||Ua>Ma.length)&&(Ua=Ma.length);for(var ib=0,vb=Array(Ua);ib<Ua;ib++)vb[ib]=Ma[ib];return vb}function p(Ma,Ua){var ib="undefined"!=typeof Symbol&&Ma[Symbol.iterator]||Ma["@@iterator"];if(!ib){if(Array.isArray(Ma)||(ib=function(ab,Qa){if(ab){if("string"==typeof ab)return D(ab,Qa);var bb=Object.prototype.toString.call(ab).slice(8,-1);"Object"===bb&&ab.constructor&&(bb=ab.constructor.name);if("Map"===bb||"Set"===bb)return Array.from(ab);if("Arguments"===bb||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(bb))return D(ab,
Qa)}}(Ma))||Ua&&Ma&&"number"==typeof Ma.length){ib&&(Ma=ib);var vb=0;Ua=function(){};return{s:Ua,n:function(){return vb>=Ma.length?{done:!0}:{done:!1,value:Ma[vb++]}},e:function(ab){throw ab;},f:Ua}}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 yb,Wa=!0,hb=!1;return{s:function(){ib=ib.call(Ma)},n:function(){var ab=ib.next();return Wa=ab.done,ab},e:function(ab){hb=!0;yb=ab},f:function(){try{Wa||
null==ib.return||ib.return()}finally{if(hb)throw yb;}}}}function D(Ma,Ua){(null==Ua||Ua>Ma.length)&&(Ua=Ma.length);for(var ib=0,vb=Array(Ua);ib<Ua;ib++)vb[ib]=Ma[ib];return vb}b.d(h,{Lu:function(){return aa},n_:function(){return Ba},tp:function(){return Ya},M_:function(){return Va},AW:function(){return Ka}});var v,t=b(1930),r=b(2577),f=b(5284),E=b(5734),B=function(Ma,Ua,ib,vb,yb,Wa,hb){Ma.beginPath();Ma.moveTo(Ua+Wa,ib);Ma.lineTo(Ua+vb-Wa,ib);Ma.quadraticCurveTo(Ua+vb,ib,Ua+vb,ib+Wa);Ma.lineTo(Ua+
vb,ib+yb-Wa);Ma.quadraticCurveTo(Ua+vb,ib+yb,Ua+vb-Wa,ib+yb);Ma.lineTo(Ua+Wa,ib+yb);Ma.quadraticCurveTo(Ua,ib+yb,Ua,ib+yb-Wa);Ma.lineTo(Ua,ib+Wa);Ma.quadraticCurveTo(Ua,ib,Ua+Wa,ib);Ma.closePath();Ma.fill();hb&&(Ma.strokeStyle=hb);Ma.stroke()},J=b(1347),V=b(6829),H=b(2460),S=b(8627),L=b(502),T=b(4238),R=b(6519),G=b(7135);!function(Ma){Ma.ACTIVE="active";Ma.AWAY="away";Ma.IDLE="idle"}(v||={});var F=b(7041),O=b(6289),M=b(9472),I=b(5434),ia=b(3473),U=b(6655);!function(){function Ma(Qa,bb,Pa,Lb,xc){function oc(Qc){var Ad,
Xc,sc=+Qc;return Number.isFinite(sc)?{x:sc,y:sc}:Object(Qc)===Qc?{x:+(null!==(Ad=Qc.x)&&void 0!==Ad?Ad:0),y:+(null!==(Xc=Qc.y)&&void 0!==Xc?Xc:0)}:{x:NaN,y:NaN}}if([Qa,bb,Pa,Lb].every(function(Qc){return Number.isFinite(Qc)})){if(4===(xc=function(Qc){var Ad=(0,U.Z)(Qc);return"undefined"===Ad||null===Qc?[0]:"function"===Ad?[NaN]:"object"===Ad?"function"==typeof Qc[Symbol.iterator]?(0,t.Z)(Qc).map(function(Xc){var sc=(0,U.Z)(Xc);return"undefined"===sc||null===Xc?0:"function"===sc?NaN:"object"===sc?
{x:Xc.x,y:Xc.y,z:Xc.z,w:Xc.w}:+Xc}):[{x:Qc.x,y:Qc.y,z:Qc.z,w:Qc.w}]:[+Qc]}(xc)).length){var pc=oc(xc[0]);var Cc=oc(xc[1]);var bd=oc(xc[2]);var dc=oc(xc[3])}else if(3===xc.length)pc=oc(xc[0]),Cc=oc(xc[1]),dc=oc(xc[1]),bd=oc(xc[2]);else if(2===xc.length)pc=oc(xc[0]),bd=oc(xc[0]),Cc=oc(xc[1]),dc=oc(xc[1]);else{if(1!==xc.length)throw new RangeError("".concat(Ua(this)," ").concat(xc.length," is not a valid size for radii sequence."));pc=oc(xc[0]);Cc=oc(xc[0]);bd=oc(xc[0]);dc=oc(xc[0])}xc=[pc,Cc,bd,dc];
var Nc=xc.find(function(Qc){var Ad=Qc.y;return 0>Qc.x||0>Ad});0>(null==Nc?void 0:Nc.x)?Nc.x:null==Nc||Nc.y;if(!xc.some(function(Qc){var Ad=Qc.y;return!Number.isFinite(Qc.x)||!Number.isFinite(Ad)})){if(Nc)throw new RangeError("".concat(Ua(this)," Radius value ").concat(Nc," is negative."));!function(Qc){var Ad=(0,r.Z)(Qc,4),Xc=Ad[0],sc=Ad[1],Sc=Ad[2];Ad=Ad[3];Xc=Math.min.apply(Math,[Math.abs(Pa)/(Xc.x+sc.x),Math.abs(Lb)/(sc.y+Sc.y),Math.abs(Pa)/(Sc.x+Ad.x),Math.abs(Lb)/(Xc.y+Ad.y)]);if(1>=Xc){var Ib;
Qc=l(Qc);try{for(Qc.s();!(Ib=Qc.n()).done;){var lb=Ib.value;lb.x*=Xc;lb.y*=Xc}}catch(Db){Qc.e(Db)}finally{Qc.f()}}}(xc);0>Pa&&0>Lb?(this.moveTo(Qa-pc.x,bb),this.ellipse(Qa+Pa+Cc.x,bb-Cc.y,Cc.x,Cc.y,0,1.5*-Math.PI,-Math.PI),this.ellipse(Qa+Pa+bd.x,bb+Lb+bd.y,bd.x,bd.y,0,-Math.PI,-Math.PI/2),this.ellipse(Qa-dc.x,bb+Lb+dc.y,dc.x,dc.y,0,-Math.PI/2,0),this.ellipse(Qa-pc.x,bb-pc.y,pc.x,pc.y,0,0,-Math.PI/2)):0>Pa?(this.moveTo(Qa-pc.x,bb),this.ellipse(Qa+Pa+Cc.x,bb+Cc.y,Cc.x,Cc.y,0,-Math.PI/2,-Math.PI,1),
this.ellipse(Qa+Pa+bd.x,bb+Lb-bd.y,bd.x,bd.y,0,-Math.PI,1.5*-Math.PI,1),this.ellipse(Qa-dc.x,bb+Lb-dc.y,dc.x,dc.y,0,Math.PI/2,0,1),this.ellipse(Qa-pc.x,bb+pc.y,pc.x,pc.y,0,0,-Math.PI/2,1)):0>Lb?(this.moveTo(Qa+pc.x,bb),this.ellipse(Qa+Pa-Cc.x,bb-Cc.y,Cc.x,Cc.y,0,Math.PI/2,0,1),this.ellipse(Qa+Pa-bd.x,bb+Lb+bd.y,bd.x,bd.y,0,0,-Math.PI/2,1),this.ellipse(Qa+dc.x,bb+Lb+dc.y,dc.x,dc.y,0,-Math.PI/2,-Math.PI,1),this.ellipse(Qa+pc.x,bb-pc.y,pc.x,pc.y,0,-Math.PI,1.5*-Math.PI,1)):(this.moveTo(Qa+pc.x,bb),this.ellipse(Qa+
Pa-Cc.x,bb+Cc.y,Cc.x,Cc.y,0,-Math.PI/2,0),this.ellipse(Qa+Pa-bd.x,bb+Lb-bd.y,bd.x,bd.y,0,0,Math.PI/2),this.ellipse(Qa+dc.x,bb+Lb-dc.y,dc.x,dc.y,0,Math.PI/2,Math.PI),this.ellipse(Qa+pc.x,bb+pc.y,pc.x,pc.y,0,Math.PI,1.5*Math.PI));this.closePath();this.moveTo(Qa,bb)}}}function Ua(Qa){return"Failed to execute 'roundRect' on '".concat(Object(Qa)===Qa&&Qa instanceof Path2D?"Path2D":Qa instanceof(null===globalThis||void 0===globalThis?void 0:globalThis.CanvasRenderingContext2D)?"CanvasRenderingContext2D":
Qa instanceof(null===globalThis||void 0===globalThis?void 0:globalThis.OffscreenCanvasRenderingContext2D)?"OffscreenCanvasRenderingContext2D":(null==Qa?void 0:Qa.constructor.name)||Qa,"':")}var ib,vb,yb,Wa,hb,ab;(null!==(vb=(ib=Path2D.prototype).roundRect)&&void 0!==vb||(ib.roundRect=Ma),globalThis.CanvasRenderingContext2D)&&(null!==(Wa=(yb=globalThis.CanvasRenderingContext2D.prototype).roundRect)&&void 0!==Wa||(yb.roundRect=Ma));globalThis.OffscreenCanvasRenderingContext2D&&(null!==(ab=(hb=globalThis.OffscreenCanvasRenderingContext2D.prototype).roundRect)&&
void 0!==ab||(hb.roundRect=Ma))}();var Z,aa=2,W=function(Ma,Ua,ib,vb,yb,Wa,hb,ab){var Qa=8<arguments.length&&void 0!==arguments[8]&&arguments[8],bb=9<arguments.length&&void 0!==arguments[9]?arguments[9]:0;Ma.save();Ma.translate(Wa,hb);Ma.rotate(ab);Qa&&Ma.fillRect(Ua-Wa,ib-hb,vb,yb);bb&&Ma.roundRect?(Ma.beginPath(),Ma.roundRect(Ua-Wa,ib-hb,vb,yb,bb),Ma.stroke(),Ma.closePath()):Ma.strokeRect(Ua-Wa,ib-hb,vb,yb);Ma.restore()},fa=function(Ma,Ua,ib,vb){var yb=!(4<arguments.length&&void 0!==arguments[4])||
arguments[4];Ma.beginPath();Ma.arc(Ua,ib,vb,0,2*Math.PI);Ma.fill();yb&&Ma.stroke()},X=function(Ma,Ua,ib,vb,yb){var Wa=5<arguments.length&&void 0!==arguments[5]&&arguments[5];Ma.strokeStyle="#5e5ad8";Ma.setLineDash([]);Ma.fillStyle="rgba(255, 255, 255, 0.9)";yb?Ma.fillStyle="rgba(134, 131, 226, 0.9)":Wa&&(Ma.fillStyle="rgba(177, 151, 252, 0.7)");fa(Ma,ib[0],ib[1],vb/Ua.zoom.value,!Wa)},ea=function(Ma,Ua,ib){if(Ua.selectedLinearElement){Ma.save();Ma.translate(Ua.scrollX,Ua.scrollY);Ma.lineWidth=1/Ua.zoom.value;
var vb=S._.getPointsGlobalCoordinates(ib),yb=S._.POINT_HANDLE_SIZE,Wa=Ua.editingLinearElement?yb:yb/2;vb.forEach(function(hb,ab){var Qa,bb,Pa=!(null===(Qa=Ua.editingLinearElement)||void 0===Qa||null===(bb=Qa.selectedPointsIndices)||void 0===bb||!bb.includes(ab));X(Ma,Ua,hb,Wa,Pa)});S._.getEditorMidPoints(ib,Ua).filter(function(hb){return null!==hb}).forEach(function(hb){var ab;null!=Ua&&null!==(ab=Ua.selectedLinearElement)&&void 0!==ab&&ab.segmentMidPointHoveredCoords&&S._.arePointsEqual(hb,Ua.selectedLinearElement.segmentMidPointHoveredCoords)?
Ua.editingLinearElement?(X(Ma,Ua,hb,Wa,!1),pa(hb,Ma,Ua)):(pa(hb,Ma,Ua),X(Ma,Ua,hb,Wa,!1)):(Ua.editingLinearElement||2===vb.length)&&X(Ma,Ua,hb,yb/2,!1,!0)});Ma.restore()}},pa=function(Ma,Ua,ib){Ua.fillStyle="rgba(105, 101, 219, 0.4)";fa(Ua,Ma[0],Ma[1],S._.POINT_HANDLE_SIZE/ib.zoom.value,!1)},va=function(Ma,Ua,ib,vb){Ua.translate(Ma.x+vb.scrollX,Ma.y+vb.scrollY);Ua.beginPath();Ua.roundRect&&!ib.isExporting?Ua.roundRect(0,0,Ma.width,Ma.height,F.iG.radius/vb.zoom.value):Ua.rect(0,0,Ma.width,Ma.height);
Ua.clip();Ua.translate(-(Ma.x+vb.scrollX),-(Ma.y+vb.scrollY))},ta=function(Ma){var Ua=Ma.scale,ib=Ma.normalizedWidth,vb=Ma.normalizedHeight,yb=Ma.theme,Wa=Ma.isExporting,hb=Ma.viewBackgroundColor;Ma=Ma.canvas.getContext("2d");(Ma.setTransform(1,0,0,1,0,0),Ma.scale(Ua,Ua),Wa&&"dark"===yb&&(Ma.filter=F.ZF),"string"==typeof hb)?(("transparent"===hb||5===hb.length||9===hb.length||/(hsla|rgba)\(/.test(hb))&&Ma.clearRect(0,0,ib,vb),Ma.save(),Ma.fillStyle=hb,Ma.fillRect(0,0,ib,vb),Ma.restore()):Ma.clearRect(0,
0,ib,vb);return Ma},xa=function(Ma){var Ua,ib=Ma.canvas,vb=Ma.elements,yb=Ma.visibleElements,Wa=Ma.selectedElements,hb=Ma.scale,ab=Ma.appState,Qa=Ma.renderConfig;if(null===ib)return{atLeastOneVisibleElement:!1,elements:vb};var bb=(0,r.Z)([ib.width/hb,ib.height/hb],2);Ma=bb[0];bb=bb[1];var Pa=ta({canvas:ib,scale:hb,normalizedWidth:Ma,normalizedHeight:bb});Pa.save();Pa.scale(ab.zoom.value,ab.zoom.value);var Lb=void 0;if(yb.forEach(function(Ib){var lb;(null===(lb=ab.editingLinearElement)||void 0===lb?
void 0:lb.elementId)===Ib.id&&Ib&&(Lb=Ib)}),Lb&&ea(Pa,ab,Lb),ab.selectionElement)try{(0,V.uI)(ab.selectionElement,Pa,ab)}catch(Ib){console.error(Ib)}ab.isBindingEnabled&&ab.suggestedBindings.filter(function(Ib){return null!=Ib}).forEach(function(Ib){var lb=Array.isArray(Ib)?La:ua;Pa.save();Pa.translate(ab.scrollX,ab.scrollY);lb(Pa,Ib);Pa.restore()});ab.frameToHighlight&&na(Pa,ab,ab.frameToHighlight);ab.elementsToHighlight&&oa(Pa,ab,ab.elementsToHighlight);var xc;ib=Wa.some(function(Ib){return(0,M.He)(Ib)});
if(1===Wa.length&&(null===(Ua=ab.editingLinearElement)||void 0===Ua?void 0:Ua.elementId)===Wa[0].id&&ea(Pa,ab,Wa[0]),ab.selectedLinearElement&&0<=ab.selectedLinearElement.hoverPointIndex&&function(Ib,lb){var Db,Gb,db=lb.selectedLinearElement,rb=db.elementId;db=db.hoverPointIndex;if(null===(Db=lb.editingLinearElement)||void 0===Db||null===(Gb=Db.selectedPointsIndices)||void 0===Gb||!Gb.includes(db))if(Db=S._.getElement(rb))Db=S._.getPointAtIndexGlobalCoordinates(Db,db),Ib.save(),Ib.translate(lb.scrollX,
lb.scrollY),pa(Db,Ib,lb),Ib.restore()}(Pa,ab),!ab.multiElement&&!ab.editingLinearElement){var oc;Ua=(0,R.oY)(Wa,ab);1===Wa.length&&(0,M.bt)(Wa[0])&&(null===(oc=ab.selectedLinearElement)||void 0===oc?void 0:oc.elementId)===Wa[0].id&&!Wa[0].locked&&ea(Pa,ab,Wa[0]);var pc=Qa.selectionColor||f.black;if(Ua){var Cc,bd=Wa.reduce(function(Ib,lb){return Ib[lb.id]=!0,Ib},{}),dc=vb.reduce(function(Ib,lb){var Db=[];if(bd[lb.id]&&!(0,L.zq)(ab,lb)&&Db.push(pc),Qa.remoteSelectedElementIds[lb.id]&&Db.push.apply(Db,
(0,t.Z)(Qa.remoteSelectedElementIds[lb.id].map(function(rb){return(0,H.G)(rb)}))),Db.length){var Gb,db=(0,E.qf)(lb,!0);db=(0,r.Z)(db,6);Ib.push({angle:lb.angle,elementX1:db[0],elementY1:db[1],elementX2:db[2],elementY2:db[3],selectionColors:Db,dashed:!!Qa.remoteSelectedElementIds[lb.id],cx:db[4],cy:db[5],activeEmbeddable:(null===(Gb=ab.activeEmbeddable)||void 0===Gb?void 0:Gb.element)===lb&&"active"===ab.activeEmbeddable.state})}return Ib},[]);oc=function(Ib){Ib=(0,L.Fb)(vb,Ib);Ib=(0,E.KP)(Ib);var lb=
(0,r.Z)(Ib,4);Ib=lb[0];var Db=lb[1],Gb=lb[2];lb=lb[3];dc.push({angle:0,elementX1:Ib,elementX2:Gb,elementY1:Db,elementY2:lb,selectionColors:[f.black],dashed:!0,cx:Ib+(Gb-Ib)/2,cy:Db+(lb-Db)/2,activeEmbeddable:!1})};hb=p((0,L.iJ)(ab));try{for(hb.s();!(Cc=hb.n()).done;)oc(Cc.value)}catch(Ib){hb.e(Ib)}finally{hb.f()}ab.editingGroupId&&oc(ab.editingGroupId);dc.forEach(function(Ib){return ka(Pa,ab,Ib)})}if(Pa.save(),Pa.translate(ab.scrollX,ab.scrollY),1===Wa.length)Pa.fillStyle=f.white,ib=(0,E.PC)(Wa[0],
ab.zoom,"mouse"),!ab.viewModeEnabled&&Ua&&la(Pa,Qa,ab,ib,Wa[0].angle);else if(1<Wa.length&&!ab.isRotating){Cc=2*aa/ab.zoom.value;Pa.fillStyle=f.white;oc=(0,E.KP)(Wa);var Nc=(0,r.Z)(oc,4);oc=Nc[0];Ua=Nc[1];hb=Nc[2];Nc=Nc[3];var Qc=Pa.getLineDash();Pa.setLineDash([2/ab.zoom.value]);var Ad=Pa.lineWidth;Pa.lineWidth=1/ab.zoom.value;Pa.strokeStyle=pc;W(Pa,oc-Cc,Ua-Cc,hb-oc+2*Cc,Nc-Ua+2*Cc,(oc+hb)/2,(Ua+Nc)/2,0);Pa.lineWidth=Ad;Pa.setLineDash(Qc);ib=(0,E.kK)([oc,Ua,hb,Nc,(oc+hb)/2,(Ua+Nc)/2],0,ab.zoom,
"mouse",ib?R.Fn:E.ox);Wa.some(function(Ib){return!Ib.locked})&&la(Pa,Qa,ab,ib,0)}Pa.restore()}for(var Xc in Pa.restore(),Qa.remotePointerViewportCoords){Wa=Qa.remotePointerViewportCoords[Xc];Cc=Wa.x;oc=Wa.y;Cc-=ab.offsetLeft;oc-=ab.offsetTop;Ua=0>Cc||Cc>Ma-11||0>oc||oc>bb-14;Cc=Math.max(Cc,0);Cc=Math.min(Cc,Ma-11);oc=Math.max(oc,0);oc=Math.min(oc,bb-14);Wa=(0,H.G)(Xc);Pa.save();Pa.strokeStyle=Wa;Pa.fillStyle=Wa;ib=Qa.remotePointerUserStates[Xc];(ib=Ua||ib===v.IDLE||ib===v.AWAY)&&(Pa.globalAlpha=.3);
Qa.remotePointerButton&&"down"===Qa.remotePointerButton[Xc]&&(Pa.beginPath(),Pa.arc(Cc,oc,15,0,2*Math.PI,!1),Pa.lineWidth=3,Pa.strokeStyle="#ffffff88",Pa.stroke(),Pa.closePath(),Pa.beginPath(),Pa.arc(Cc,oc,15,0,2*Math.PI,!1),Pa.lineWidth=1,Pa.strokeStyle=Wa,Pa.stroke(),Pa.closePath());Pa.fillStyle=f.white;Pa.strokeStyle=f.white;Pa.lineWidth=6;Pa.lineJoin="round";Pa.beginPath();Pa.moveTo(Cc,oc);Pa.lineTo(Cc+0,oc+14);Pa.lineTo(Cc+4,oc+9);Pa.lineTo(Cc+11,oc+8);Pa.closePath();Pa.stroke();Pa.fill();Pa.fillStyle=
Wa;Pa.strokeStyle=Wa;Pa.lineWidth=2;Pa.lineJoin="round";Pa.beginPath();ib?(Pa.moveTo(Cc-1,oc-1),Pa.lineTo(Cc-1,oc+15),Pa.lineTo(Cc+5,oc+10),Pa.lineTo(Cc+12,oc+9),Pa.closePath(),Pa.fill()):(Pa.moveTo(Cc,oc),Pa.lineTo(Cc+0,oc+14),Pa.lineTo(Cc+4,oc+9),Pa.lineTo(Cc+11,oc+8),Pa.closePath(),Pa.fill(),Pa.stroke());ib=Qa.remotePointerUsernames[Xc]||"";if(!Ua&&ib){Pa.font="600 12px sans-serif";Cc+=5.5;oc=oc+14+2;Ua=Pa.measureText(ib);hb=Ua.actualBoundingBoxDescent+Ua.actualBoundingBoxAscent;Nc=Math.max(hb,
12);Qc=Cc-1;Ad=oc-1;var sc=Ua.width+2+10+2,Sc=Nc+2+6+2;Pa.roundRect?(Pa.beginPath(),Pa.roundRect(Qc,Ad,sc,Sc,8),Pa.fillStyle=Wa,Pa.fill(),Pa.strokeStyle=f.white,Pa.stroke()):B(Pa,Qc,Ad,sc,Sc,8,f.white);Pa.fillStyle=f.black;Pa.fillText(ib,Cc+5+1,oc+3+Ua.actualBoundingBoxAscent+Math.floor((Nc-hb)/2)+2)}Pa.restore();Pa.closePath()}return Qa.renderScrollbars&&(xc=(0,J.tJ)(vb,Ma,bb,ab),Pa.save(),Pa.fillStyle=J.w1,Pa.strokeStyle="rgba(255,255,255,0.8)",[xc.horizontal,xc.vertical].forEach(function(Ib){Ib&&
B(Pa,Ib.x,Ib.y,Ib.width,Ib.height,J.nn/2)}),Pa.restore()),{scrollBars:xc,atLeastOneVisibleElement:0<yb.length,elements:vb}},Ga=function(Ma){var Ua=Ma.canvas,ib=Ma.rc,vb=Ma.elements,yb=Ma.visibleElements,Wa=Ma.scale,hb=Ma.appState,ab=Ma.renderConfig;if(null!==Ua){Ma=ab.renderGrid;Ma=void 0===Ma||Ma;var Qa=ab.isExporting,bb=(0,r.Z)([Ua.width/Wa,Ua.height/Wa],2),Pa=bb[0];bb=bb[1];var Lb=ta({canvas:Ua,scale:Wa,normalizedWidth:Pa,normalizedHeight:bb,theme:hb.theme,isExporting:Qa,viewBackgroundColor:hb.viewBackgroundColor});
Lb.scale(hb.zoom.value,hb.zoom.value);Ma&&hb.gridSize&&function(oc,pc,Cc,bd,dc,Nc,Qc){var Ad,Xc=Ad||={};Xc.Bold="#cccccc";Xc.Regular="#e5e5e5";!0;Xc=-Math.round(dc.value/pc)*pc+Cc%pc;var sc=-Math.round(dc.value/pc)*pc+bd%pc,Sc=Math.min(1/dc.value,1);dc=1/dc.value;dc=[3*Sc,dc+(Sc+dc)];oc.save();oc.lineWidth=Sc;for(Sc=Xc;Sc<Xc+Nc+2*pc;Sc+=pc){var Ib=0==Math.round(Sc-Cc)%(5*pc);oc.beginPath();oc.setLineDash(Ib?[]:dc);oc.strokeStyle=Ib?Ad.Bold:Ad.Regular;oc.moveTo(Sc,sc-pc);oc.lineTo(Sc,sc+Qc+2*pc);oc.stroke()}for(Cc=
sc;Cc<sc+Qc+2*pc;Cc+=pc)Sc=0==Math.round(Cc-bd)%(5*pc),oc.beginPath(),oc.setLineDash(Sc?[]:dc),oc.strokeStyle=Sc?Ad.Bold:Ad.Regular,oc.moveTo(Xc-pc,Cc),oc.lineTo(Xc+Nc+2*pc,Cc),oc.stroke();oc.restore()}(Lb,hb.gridSize,hb.scrollX,hb.scrollY,hb.zoom,Pa/hb.zoom.value,bb/hb.zoom.value);var xc=new Set;yb.forEach(function(oc){0<oc.groupIds.length&&hb.frameToHighlight&&hb.selectedElementIds[oc.id]&&((0,ia.cO)(oc,hb.frameToHighlight)||oc.groupIds.find(function(pc){return xc.has(pc)}))&&oc.groupIds.forEach(function(pc){return xc.add(pc)})});
yb.filter(function(oc){return!(0,I.JX)(oc)}).forEach(function(oc){try{var pc;if((oc.frameId||(null===(pc=hb.frameToHighlight)||void 0===pc?0:pc.id))&&(ab.isExporting&&(0,G.FQ)(vb)||!ab.isExporting&&hb.frameRendering.enabled&&hb.frameRendering.clip)){Lb.save();var Cc=(0,ia.cH)(oc,hb);Cc&&(0,ia.Qs)(oc,vb,hb)&&va(Cc,Lb,ab,hb);(0,V.lw)(oc,ib,Lb,ab,hb);Lb.restore()}else(0,V.lw)(oc,ib,Lb,ab,hb);Qa||Oa(oc,Lb,hb)}catch(bd){console.error(bd)}});yb.filter(function(oc){return(0,I.JX)(oc)}).forEach(function(oc){try{var pc,
Cc=function(){if((0,V.lw)(oc,ib,Lb,ab,hb),(0,M.gs)(oc)&&(Qa||!oc.validated)&&oc.width&&oc.height){var dc=(0,I.g0)(oc);(0,V.lw)(dc,ib,Lb,ab,hb)}Qa||Oa(oc,Lb,hb)};if((oc.frameId||(null===(pc=hb.frameToHighlight)||void 0===pc?0:pc.id))&&(ab.isExporting&&(0,G.FQ)(vb)||!ab.isExporting&&hb.frameRendering.enabled&&hb.frameRendering.clip)){Lb.save();var bd=(0,ia.cH)(oc,hb);bd&&(0,ia.Qs)(oc,vb,hb)&&va(bd,Lb,ab,hb);Cc();Lb.restore()}else Cc()}catch(dc){console.error(dc)}})}},Ia=(0,G.hR)(function(Ma){var Ua,
ib=xa(Ma);null===(Ua=Ma.callback)||void 0===Ua||Ua.call(Ma,ib)},{trailing:!0}),Ya=function(Ma,Ua){if(!Ua)return Ua=xa(Ma),Ma.callback(Ua),Ua;Ia(Ma)},Fa=(0,G.hR)(function(Ma){Ga(Ma)},{trailing:!0}),Ka=function(Ma,Ua){Ua?Fa(Ma):Ga(Ma)},Ba=function(){Ia.cancel();Fa.cancel()},la=function(Ma,Ua,ib,vb,yb){Object.keys(vb).forEach(function(Wa){var hb=vb[Wa];if(void 0!==hb){var ab=(0,r.Z)(hb,4);hb=ab[0];var Qa=ab[1],bb=ab[2];ab=ab[3];Ma.save();Ma.lineWidth=1/ib.zoom.value;Ua.selectionColor&&(Ma.strokeStyle=
Ua.selectionColor);"rotation"===Wa?fa(Ma,hb+bb/2,Qa+ab/2,bb/2):Ma.roundRect?(Ma.beginPath(),Ma.roundRect(hb,Qa,bb,ab,2/ib.zoom.value),Ma.fill(),Ma.stroke()):W(Ma,hb,Qa,bb,ab,hb+bb/2,Qa+ab/2,yb,!0);Ma.restore()}})},ka=function(Ma,Ua,ib){var vb=ib.angle,yb=ib.elementX1,Wa=ib.elementY1,hb=ib.selectionColors,ab=ib.cx,Qa=ib.cy,bb=ib.dashed,Pa=ib.activeEmbeddable,Lb=ib.elementX2-yb,xc=ib.elementY2-Wa,oc=(3<arguments.length&&void 0!==arguments[3]?arguments[3]:2*aa)/Ua.zoom.value,pc=8/Ua.zoom.value,Cc=4/
Ua.zoom.value;Ma.save();Ma.translate(Ua.scrollX,Ua.scrollY);Ma.lineWidth=(Pa?4:1)/Ua.zoom.value;Pa=hb.length;for(var bd=0;bd<Pa;++bd)Ma.strokeStyle=hb[bd],bb&&Ma.setLineDash([pc,Cc+(pc+Cc)*(Pa-1)]),Ma.lineDashOffset=(pc+Cc)*bd,W(Ma,yb-oc,Wa-oc,Lb+2*oc,xc+2*oc,ab,Qa,vb);Ma.restore()},ua=function(Ma,Ua){var ib=(0,E.qf)(Ua),vb=(0,r.Z)(ib,4);ib=vb[0];var yb=vb[1],Wa=vb[2]-ib;vb=vb[3]-yb;var hb=(0,T.fb)(Ua,Wa,vb);Ma.strokeStyle="rgba(0,0,0,.05)";Ma.lineWidth=hb-4;hb=2+hb/2;switch(Ua.type){case "rectangle":case "text":case "image":case "embeddable":case "frame":W(Ma,
ib-hb,yb-hb,Wa+2*hb,vb+2*hb,ib+Wa/2,yb+vb/2,Ua.angle);break;case "diamond":var ab=Math.hypot(Wa,vb);!function(Qa,bb,Pa,Lb,xc,oc){Qa.save();Qa.translate(Lb,xc);Qa.rotate(oc);Qa.beginPath();Qa.moveTo(0,Pa/2);Qa.lineTo(bb/2,0);Qa.lineTo(0,-Pa/2);Qa.lineTo(-bb/2,0);Qa.closePath();Qa.stroke();Qa.restore()}(Ma,Wa+hb*ab/vb*2,vb+hb*ab/Wa*2,ib+Wa/2,yb+vb/2,Ua.angle);break;case "ellipse":!function(Qa,bb,Pa,Lb,xc,oc){Qa.beginPath();Qa.ellipse(Lb,xc,bb/2,Pa/2,oc,0,2*Math.PI);Qa.stroke()}(Ma,Wa+2*hb,vb+2*hb,ib+
Wa/2,yb+vb/2,Ua.angle)}},na=function(Ma,Ua,ib){var vb=(0,E.qf)(ib),yb=(0,r.Z)(vb,4);vb=yb[0];var Wa=yb[1],hb=yb[2]-vb;yb=yb[3]-Wa;Ma.strokeStyle="rgb(0,118,255)";Ma.lineWidth=2*F.iG.strokeWidth/Ua.zoom.value;Ma.save();Ma.translate(Ua.scrollX,Ua.scrollY);W(Ma,vb,Wa,hb,yb,vb+hb/2,Wa+yb/2,ib.angle,!1,F.iG.radius/Ua.zoom.value);Ma.restore()},oa=function(Ma,Ua,ib){var vb=ib.filter(function(hb){return 0===hb.groupIds.length}),yb=ib.filter(function(hb){return 0<hb.groupIds.length}),Wa=function(hb){hb=(0,E.KP)(hb);
var ab=(0,r.Z)(hb,4);hb=ab[0];var Qa=ab[1],bb=ab[2];ab=ab[3];return{angle:0,elementX1:hb,elementX2:bb,elementY1:Qa,elementY2:ab,selectionColors:["rgb(0,118,255)"],dashed:!1,cx:hb+(bb-hb)/2,cy:Qa+(ab-Qa)/2,activeEmbeddable:!1}};Object.entries((0,L.yR)(yb,Ua)).filter(function(hb){hb=(0,r.Z)(hb,2);hb[0];return hb[1]}).map(function(hb){hb=(0,r.Z)(hb,2);var ab=hb[0];hb[1];return ab}).map(function(hb){hb=(0,L.Fb)(ib,hb);return Wa(hb)}).concat(vb.map(function(hb){return Wa([hb])})).forEach(function(hb){return ka(Ma,
Ua,hb)})},La=function(Ma,Ua){var ib=(0,r.Z)(Ua,3),vb=ib[0];Ua=ib[1];ib=ib[2];var yb=(0,T.fb)(ib,ib.width,ib.height);Ma.strokeStyle="rgba(0,0,0,0)";Ma.fillStyle="rgba(0,0,0,.05)";("both"===Ua?[0,-1]:"start"===Ua?[0]:[-1]).forEach(function(Wa){Wa=S._.getPointAtIndexGlobalCoordinates(vb,Wa);Wa=(0,r.Z)(Wa,2);fa(Ma,Wa[0],Wa[1],yb)})},Oa=function(Ma,Ua,ib){if(Ma.link&&!ib.selectedElementIds[Ma.id]){var vb=(0,E.qf)(Ma);vb=(0,r.Z)(vb,4);vb=(0,O.sw)([vb[0],vb[1],vb[2],vb[3]],Ma.angle,ib);var yb=(0,r.Z)(vb,
4);vb=yb[0];var Wa=yb[1],hb=yb[2];yb=yb[3];var ab=vb+hb/2,Qa=Wa+yb/2;(Ua.save(),Ua.translate(ib.scrollX+ab,ib.scrollY+Qa),Ua.rotate(Ma.angle),Z&&Z.zoom===ib.zoom.value)||((Z=document.createElement("canvas")).zoom=ib.zoom.value,Z.width=hb*window.devicePixelRatio*ib.zoom.value,Z.height=yb*window.devicePixelRatio*ib.zoom.value,Ma=Z.getContext("2d"),Ma.scale(window.devicePixelRatio*ib.zoom.value,window.devicePixelRatio*ib.zoom.value),Ma.fillStyle="#fff",Ma.fillRect(0,0,hb,yb),Ma.drawImage(O.rj,0,0,hb,
yb),Ma.restore());Ua.drawImage(Z,vb-ab,Wa-Qa,hb,yb);Ua.restore()}},Va=function(Ma,Ua,ib,vb){var yb=4<arguments.length&&void 0!==arguments[4]?arguments[4]:{},Wa=yb.offsetX,hb=void 0===Wa?0:Wa;Wa=yb.offsetY;var ab=void 0===Wa?0:Wa;Wa=yb.exportWithDarkMode;var Qa=void 0!==Wa&&Wa;Wa=yb.exportingFrameId;var bb=void 0===Wa?null:Wa,Pa=yb.renderEmbeddables;ib&&(Ma.filter(function(Lb){return!(0,I.JX)(Lb)}).forEach(function(Lb){if(!Lb.isDeleted)try{(0,V.Rg)(Lb,Ua,ib,vb,Lb.x+hb,Lb.y+ab,Qa,bb,Pa)}catch(xc){console.error(xc)}}),
Ma.filter(function(Lb){return(0,M.gs)(Lb)}).forEach(function(Lb){if(!Lb.isDeleted)try{(0,V.Rg)(Lb,Ua,ib,vb,Lb.x+hb,Lb.y+ab,Qa,bb,Pa)}catch(xc){console.error(xc)}}))}},3223:function(g,h,b){var l=b(1930),m=b(8821),p=b(5169),D=b(5734),v=b(9472),t=b(4485),r=b(5236);g=function(){function f(){var E=this;(0,m.Z)(this,f);this.callbacks=new Set;this.nonDeletedElements=[];this.elements=[];this.nonDeletedFrames=[];this.frames=[];this.elementsMap=new Map;this.selectedElementsCache={selectedElementIds:null,elements:null,
cache:new Map};this.addNewElement=function(B){B.frameId?E.insertElementAtIndex(B,E.getElementIndex(B.frameId)):E.replaceAllElements([].concat((0,l.Z)(E.elements),[B]))}}return(0,p.Z)(f,[{key:"getElementsIncludingDeleted",value:function(){return this.elements}},{key:"getNonDeletedElements",value:function(){return this.nonDeletedElements}},{key:"getFramesIncludingDeleted",value:function(){return this.frames}},{key:"getSelectedElements",value:function(E){var B="";for(var J=0,V=["includeBoundTextElement",
"includeElementsInFrames"];J<V.length;J++){var H=V[J];B+="".concat(H,":").concat(E[H]?"1":"0")}J=(null==E?void 0:E.elements)||this.nonDeletedElements;if(this.selectedElementsCache.elements===J&&this.selectedElementsCache.selectedElementIds===E.selectedElementIds){if(V=this.selectedElementsCache.cache.get(B))return V}else null==(null==E?void 0:E.elements)&&this.selectedElementsCache.cache.clear();J=(0,t.eD)(J,{selectedElementIds:E.selectedElementIds},E);return null==(null==E?void 0:E.elements)&&(this.selectedElementsCache.selectedElementIds=
E.selectedElementIds,this.selectedElementsCache.elements=this.nonDeletedElements,this.selectedElementsCache.cache.set(B,J)),J}},{key:"getNonDeletedFrames",value:function(){return this.nonDeletedFrames}},{key:"getElement",value:function(E){return this.elementsMap.get(E)||null}},{key:"getVersionNonce",value:function(){return this.versionNonce}},{key:"getNonDeletedElement",value:function(E){return(E=this.getElement(E))&&(0,D.qP)(E)?E:null}},{key:"mapElements",value:function(E){var B=!1,J=this.elements.map(function(V){var H=
E(V);return H!==V&&(B=!0),H});return B&&this.replaceAllElements(J),B}},{key:"replaceAllElements",value:function(E){var B=this;this.elements=E;var J=[];this.elementsMap.clear();E.forEach(function(V){(0,v.He)(V)&&J.push(V);B.elementsMap.set(V.id,V);f.mapElementToScene(V,B)});this.nonDeletedElements=(0,D.Lm)(this.elements);this.frames=J;this.nonDeletedFrames=(0,D.Xf)(this.frames);this.informMutation()}},{key:"informMutation",value:function(){this.versionNonce=(0,r.LU)();for(var E=0,B=Array.from(this.callbacks);E<
B.length;E++)(0,B[E])()}},{key:"addCallback",value:function(E){var B=this;if(this.callbacks.has(E))throw Error();return this.callbacks.add(E),function(){if(!B.callbacks.has(E))throw Error();B.callbacks.delete(E)}}},{key:"destroy",value:function(){var E=this;this.nonDeletedElements=[];this.elements=[];this.nonDeletedFrames=[];this.frames=[];this.elementsMap.clear();this.selectedElementsCache.selectedElementIds=null;this.selectedElementsCache.elements=null;this.selectedElementsCache.cache.clear();f.sceneMapById.forEach(function(B,
J){B===E&&f.sceneMapById.delete(J)});this.callbacks.clear()}},{key:"insertElementAtIndex",value:function(E,B){if(!Number.isFinite(B)||0>B)throw Error("insertElementAtIndex can only be called with index \x3e\x3d 0");E=[].concat((0,l.Z)(this.elements.slice(0,B)),[E],(0,l.Z)(this.elements.slice(B)));this.replaceAllElements(E)}},{key:"insertElementsAtIndex",value:function(E,B){if(!Number.isFinite(B)||0>B)throw Error("insertElementAtIndex can only be called with index \x3e\x3d 0");E=[].concat((0,l.Z)(this.elements.slice(0,
B)),(0,l.Z)(E),(0,l.Z)(this.elements.slice(B)));this.replaceAllElements(E)}},{key:"getElementIndex",value:function(E){return this.elements.findIndex(function(B){return B.id===E})}}],[{key:"mapElementToScene",value:function(E,B){"string"==typeof E?this.sceneMapById.set(E,B):(this.sceneMapByElement.set(E,B),this.sceneMapById.set(E.id,B))}},{key:"getScene",value:function(E){return"string"==typeof E?this.sceneMapById.get(E)||null:this.sceneMapByElement.get(E)||null}}]),f}();g.sceneMapByElement=new WeakMap;
g.sceneMapById=new Map;h.Z=g},3683:function(g,h,b){function l(H,S){var L=Object.keys(H);if(Object.getOwnPropertySymbols){var T=Object.getOwnPropertySymbols(H);S&&(T=T.filter(function(R){return Object.getOwnPropertyDescriptor(H,R).enumerable}));L.push.apply(L,T)}return L}function m(H){for(var S=1;S<arguments.length;S++){var L=null!=arguments[S]?arguments[S]:{};S%2?l(Object(L),!0).forEach(function(T){(0,v.Z)(H,T,L[T])}):Object.getOwnPropertyDescriptors?Object.defineProperties(H,Object.getOwnPropertyDescriptors(L)):
l(Object(L)).forEach(function(T){Object.defineProperty(H,T,Object.getOwnPropertyDescriptor(L,T))})}return H}b.d(h,{Z:function(){return B},i:function(){return V}});var p=b(1930),D=b(2577),v=b(7169),t=b(5734),r=b(3795),f=b(6829),E=b(7135),B=function(H){var S={seed:H.seed,strokeLineDash:"dashed"===H.strokeStyle?[8,8+H.strokeWidth]:"dotted"===H.strokeStyle?[1.5,6+H.strokeWidth]:void 0,disableMultiStroke:"solid"!==H.strokeStyle,strokeWidth:"solid"!==H.strokeStyle?H.strokeWidth+.5:H.strokeWidth,fillWeight:H.strokeWidth/
2,hachureGap:4*H.strokeWidth,roughness:H.roughness,stroke:H.strokeColor,preserveVertices:1<arguments.length&&void 0!==arguments[1]&&arguments[1]};switch(H.type){case "rectangle":case "embeddable":case "diamond":case "ellipse":return S.fillStyle=H.fillStyle,S.fill=(0,E.Qm)(H.backgroundColor)?void 0:H.backgroundColor,"ellipse"===H.type&&(S.curveFitting=1),S;case "line":case "freedraw":return(0,r.g6)(H.points)&&(S.fillStyle=H.fillStyle,S.fill="transparent"===H.backgroundColor?void 0:H.backgroundColor),
S;case "arrow":return S;default:throw Error("Unimplemented type ".concat(H.type));}},J=function(H,S){return"embeddable"===H.type&&(S||!H.validated)&&(0,E.Qm)(H.backgroundColor)&&(0,E.Qm)(H.strokeColor)?m(m({},H),{},{roughness:0,backgroundColor:"#d3d3d3",fillStyle:"solid"}):H},V=function(H,S){var L=2<arguments.length&&void 0!==arguments[2]&&arguments[2];switch(H.type){case "rectangle":case "embeddable":if(H.roundness){var T=H.width,R=H.height,G=(0,r.yW)(Math.min(T,R),H);L=S.path("M ".concat(G," 0 L ").concat(T-
G," 0 Q ").concat(T," 0, ").concat(T," ").concat(G," L ").concat(T," ").concat(R-G," Q ").concat(T," ").concat(R,", ").concat(T-G," ").concat(R," L ").concat(G," ").concat(R," Q 0 ").concat(R,", 0 ").concat(R-G," L 0 ").concat(G," Q 0 0, ").concat(G," 0"),B(J(H,L),!0))}else L=S.rectangle(0,0,H.width,H.height,B(J(H,L),!1));return L;case "diamond":L=(0,t.UC)(H);var F=(0,D.Z)(L,8);L=F[0];T=F[1];R=F[2];G=F[3];var O=F[4],M=F[5],I=F[6];F=F[7];if(H.roundness){var ia=(0,r.yW)(Math.abs(L-I),H),U=(0,r.yW)(Math.abs(G-
T),H);L=S.path("M ".concat(L+ia," ").concat(T+U," L ").concat(R-ia," ").concat(G-U,"\n C ").concat(R," ").concat(G,", ").concat(R," ").concat(G,", ").concat(R-ia," ").concat(G+U,"\n L ").concat(O+ia," ").concat(M-U,"\n C ").concat(O," ").concat(M,", ").concat(O," ").concat(M,", ").concat(O-ia," ").concat(M-U,"\n L ").concat(I+ia," ").concat(F+U,"\n C ").concat(I," ").concat(F,", ").concat(I," ").concat(F,", ").concat(I+ia," ").concat(F-U,"\n L ").concat(L-
ia," ").concat(T+U,"\n C ").concat(L," ").concat(T,", ").concat(L," ").concat(T,", ").concat(L+ia," ").concat(T+U),B(H,!0))}else L=S.polygon([[L,T],[R,G],[O,M],[I,F]],B(H));return L;case "ellipse":return S.ellipse(H.width/2,H.height/2,H.width,H.height,B(H));case "line":case "arrow":var Z=B(H);L=H.points.length?H.points:[[0,0]];if(L=H.roundness?[S.curve(L,Z)]:Z.fill?[S.polygon(L,Z)]:[S.linearPath(L,Z)],"arrow"===H.type)T=H.startArrowhead,T=void 0===T?null:T,R=H.endArrowhead,R=void 0===R?
"arrow":R,G=function(aa,W,fa,X){W=(0,t.Y5)(aa,W,fa,X);if(null===W)return[];if("dot"===X)return X=(0,D.Z)(W,3),[S.circle(X[0],X[1],X[2],m(m({},Z),{},{fill:aa.strokeColor,fillStyle:"solid",stroke:"none"}))];if("triangle"===X){var ea=(0,D.Z)(W,6);X=ea[0];W=ea[1];fa=ea[2];var pa=ea[3],va=ea[4];ea=ea[5];return delete Z.strokeLineDash,[S.polygon([[X,W],[fa,pa],[va,ea],[X,W]],m(m({},Z),{},{fill:aa.strokeColor,fillStyle:"solid"}))]}ea=(0,D.Z)(W,6);X=ea[0];W=ea[1];fa=ea[2];pa=ea[3];va=ea[4];ea=ea[5];"dotted"===
aa.strokeStyle?(aa=[1.5,6+(aa.strokeWidth-1)],Z.strokeLineDash=[aa[0],aa[1]-1]):delete Z.strokeLineDash;return[S.line(fa,pa,X,W,Z),S.line(va,ea,X,W,Z)]},null!==T&&(T=G(H,L,"start",T),L.push.apply(L,(0,p.Z)(T))),null!==R&&(T=G(H,L,"end",R),L.push.apply(L,(0,p.Z)(T)));return L;case "freedraw":return(0,f.Lc)(H),(0,r.g6)(H.points)?S.polygon(H.points,m(m({},B(H)),{},{stroke:"none"})):null;case "frame":case "text":case "image":return null;default:return(0,E.vE)(H,"generateElementShape(): Unimplemented type ".concat(null==
H?void 0:H.type)),null}}},5475:function(g,h,b){b.d(h,{R:function(){return D}});g=b(5169);var l=b(8821);h=b(6096);var m=b(6829),p=b(3683),D=(0,g.Z)(function t(){(0,l.Z)(this,t)});D.rg=new h.V;D.cache=new WeakMap;D.get=function(t){return D.cache.get(t)};D.set=function(t,r){return D.cache.set(t,r)};D.delete=function(t){return D.cache.delete(t)};D.destroy=function(){D.cache=new WeakMap};D.generateElementShape=function(t){var r=1<arguments.length&&void 0!==arguments[1]&&arguments[1],f=r?void 0:D.get(t);
if(void 0!==f)return f;m.Xx.delete(t);r=(0,p.i)(t,D.rg,r);return D.cache.set(t,r),r}},7786:function(g,h,b){b.d(h,{$b:function(){return m},CJ:function(){return B},M9:function(){return v},PD:function(){return p},QG:function(){return E},Un:function(){return f},Zd:function(){return D},bZ:function(){return r},sh:function(){return t}});var l=b(9472),m=function(J){return"rectangle"===J||"embeddable"===J||"ellipse"===J||"diamond"===J||"line"===J||"freedraw"===J},p=function(J){return"image"!==J&&"frame"!==
J},D=function(J){return"rectangle"===J||"embeddable"===J||"ellipse"===J||"diamond"===J||"freedraw"===J||"arrow"===J||"line"===J},v=function(J){return"rectangle"===J||"embeddable"===J||"ellipse"===J||"diamond"===J||"arrow"===J||"line"===J},t=function(J){return"rectangle"===J||"embeddable"===J||"arrow"===J||"line"===J||"diamond"===J},r=function(J){return"text"===J},f=function(J){return"arrow"===J},E=function(J,V){for(var H=null,S=J.length-1;0<=S;--S){var L=J[S];if(!L.isDeleted&&V(L)){H=L;break}}return H},
B=function(J,V){var H=[];return J.filter(function(S){return!(S.isDeleted||!V(S))&&(!(0,l.gs)(S)||(H.push(S),!1))}).concat(H)}},2739:function(g,h,b){function l(M,I){var ia=Object.keys(M);if(Object.getOwnPropertySymbols){var U=Object.getOwnPropertySymbols(M);I&&(U=U.filter(function(Z){return Object.getOwnPropertyDescriptor(M,Z).enumerable}));ia.push.apply(ia,U)}return ia}function m(M){for(var I=1;I<arguments.length;I++){var ia=null!=arguments[I]?arguments[I]:{};I%2?l(Object(ia),!0).forEach(function(U){(0,p.Z)(M,
U,ia[U])}):Object.getOwnPropertyDescriptors?Object.defineProperties(M,Object.getOwnPropertyDescriptors(ia)):l(Object(ia)).forEach(function(U){Object.defineProperty(M,U,Object.getOwnPropertyDescriptor(ia,U))})}return M}b.d(h,{$D:function(){return G},Cg:function(){return O},NL:function(){return R},oj:function(){return T}});var p=b(7169),D=b(2577),v=b(8950);g=b(2975);var t=b.n(g),r=b(9845),f=b(9995),E=b(5743),B=b(7135),J=b(7041),V=b(7726),H=b(4038),S=b(6897),L=b(3223),T="\x3c!-- svg-source:excalidraw --\x3e",
R=function(){var M=(0,v.Z)(t().mark(function W(ia,U,Z,aa){var fa,X,ea,pa,va,ta,xa,Ga,Ia,Ya,Fa,Ka,Ba,la,ka,ua,na,oa,La,Oa=arguments;return t().wrap(function(Va){for(;;)switch(Va.prev=Va.next){case 0:return fa=aa.exportBackground,X=aa.exportPadding,ea=void 0===X?J.qy:X,pa=aa.viewBackgroundColor,va=4<Oa.length&&void 0!==Oa[4]?Oa[4]:function(Ma,Ua){var ib=document.createElement("canvas");return ib.width=Ma*U.exportScale,ib.height=Ua*U.exportScale,{canvas:ib,scale:U.exportScale}},ta=F(ia,ea),xa=(0,D.Z)(ta,
4),Ga=xa[0],Ia=xa[1],Ya=xa[2],Fa=xa[3],Ka=va(Ya,Fa),Ba=Ka.canvas,la=Ka.scale,ka=void 0===la?1:la,ua=(0,V.im)(),Va.next=7,(0,S.Xx)({imageCache:new Map,fileIds:(0,S.oA)(ia).map(function(Ma){return Ma.fileId}),files:Z});case 7:return na=Va.sent,oa=na.imageCache,La=(0,B.FQ)(ia),(0,E.AW)({canvas:Ba,rc:r.Z.canvas(Ba),elements:ia,visibleElements:ia,scale:ka,appState:m(m({},U),{},{viewBackgroundColor:fa?pa:null,scrollX:-Ga+(La?0:ea),scrollY:-Ia+(La?0:ea),zoom:ua.zoom,shouldCacheIgnoreZoom:!1,theme:U.exportWithDarkMode?
"dark":"light"}),renderConfig:{imageCache:oa,renderGrid:!1,isExporting:!0}}),Va.abrupt("return",Ba);case 12:case "end":return Va.stop()}},W)}));return function(ia,U,Z,aa){return M.apply(this,arguments)}}(),G=function(){var M=(0,v.Z)(t().mark(function W(ia,U,Z,aa){var fa,X,ea,pa,va,ta,xa,Ga,Ia,Ya,Fa,Ka,Ba,la,ka,ua,na,oa,La,Oa,Va,Ma,Ua,ib,vb,yb,Wa,hb,ab,Qa,bb,Pa,Lb,xc,oc;return t().wrap(function(pc){for(;;)switch(pc.prev=pc.next){case 0:if(ea=U.exportPadding,pa=void 0===ea?J.qy:ea,va=U.viewBackgroundColor,
ta=U.exportScale,xa=void 0===ta?1:ta,Ga=U.exportEmbedScene,Ia="",!Ga){pc.next=14;break}return pc.prev=3,pc.next=6,Promise.resolve().then(b.bind(b,40));case 6:return pc.next=8,pc.sent.encodeSvgMetadata({text:null!=aa&&aa.serializeAsJSON?null==aa||null===(Ya=aa.serializeAsJSON)||void 0===Ya?void 0:Ya.call(aa):(0,H.I_)(ia,U,Z||{},"local")});case 8:Ia=pc.sent;pc.next=14;break;case 11:pc.prev=11,pc.t0=pc.catch(3),console.error(pc.t0);case 14:return Fa=F(ia,pa),Ka=(0,D.Z)(Fa,4),Ba=Ka[0],la=Ka[1],ka=Ka[2],
ua=Ka[3],(na=document.createElementNS(J.hR,"svg")).setAttribute("version","1.1"),na.setAttribute("xmlns",J.hR),na.setAttribute("viewBox","0 0 ".concat(ka," ").concat(ua)),na.setAttribute("width","".concat(ka*xa)),na.setAttribute("height","".concat(ua*xa)),U.exportWithDarkMode&&na.setAttribute("filter",J.ZF),oa="https://excalidraw.com/",oa=window.EXCALIDRAW_ASSET_PATH||"https://unpkg.com/".concat("@excalidraw/excalidraw","@").concat({VITE_APP_BACKEND_V2_GET_URL:"https://json.excalidraw.com/api/v2/",
VITE_APP_BACKEND_V2_POST_URL:"https://json.excalidraw.com/api/v2/post/",VITE_APP_LIBRARY_URL:"https://libraries.excalidraw.com",VITE_APP_LIBRARY_BACKEND:"https://us-central1-excalidraw-room-persistence.cloudfunctions.net/libraries",VITE_APP_PORTAL_URL:"https://portal.excalidraw.com",VITE_APP_PLUS_LP:"https://plus.excalidraw.com",VITE_APP_PLUS_APP:"https://app.excalidraw.com",VITE_APP_WS_SERVER_URL:"",VITE_APP_FIREBASE_CONFIG:'{"apiKey":"AIzaSyAd15pYlMci_xIp9ko6wkEsDzAAA0Dn0RU","authDomain":"excalidraw-room-persistence.firebaseapp.com","databaseURL":"https://excalidraw-room-persistence.firebaseio.com","projectId":"excalidraw-room-persistence","storageBucket":"excalidraw-room-persistence.appspot.com","messagingSenderId":"654800341332","appId":"1:654800341332:web:4a692de832b55bd57ce0c1"}',
VITE_APP_DISABLE_TRACKING:"",VITE_PKG_NAME:"@excalidraw/excalidraw",VITE_PKG_VERSION:"0.16.1",VITE_IS_EXCALIDRAW_NPM_PACKAGE:!0}.PKG_VERSION),null!==(La=oa)&&void 0!==La&&La.startsWith("/")&&(oa=oa.replace("/","".concat(window.location.origin,"/"))),oa="".concat(oa,"/dist/excalidraw-assets/"),Oa=(null===(fa=L.Z.getScene(ia[0]))||void 0===fa||null===(X=fa.getNonDeletedElements())||void 0===X?void 0:X.length)===ia.length,Va=(0,B.FQ)(ia),Ma=-Ba+(Va?0:pa),Ua=-la+(Va?0:pa),ib=Oa||!Va?void 0:ia.find(function(Cc){return"frame"===
Cc.type}),vb="",ib&&(yb=(0,f.qf)(ib),Wa=(0,D.Z)(yb,4),hb=Wa[0],ab=Wa[1],Qa=Wa[2],bb=Wa[3],Pa=(Qa-hb)/2-(ib.x-hb),Lb=(bb-ab)/2-(ib.y-ab),vb="\x3cclipPath id\x3d".concat(ib.id,'\x3e\n \x3crect transform\x3d"translate(').concat(ib.x+Ma," ").concat(ib.y+Ua,") rotate(").concat(ib.angle," ").concat(Pa," ").concat(Lb,')"\n width\x3d"').concat(ib.width,'"\n height\x3d"').concat(ib.height,'"\n \x3e\n \x3c/rect\x3e\n \x3c/clipPath\x3e')),na.innerHTML="\n ".concat(T,
"\n ").concat(Ia,'\n \x3cdefs\x3e\n \x3cstyle class\x3d"style-fonts"\x3e\n @font-face {\n font-family: "Virgil";\n src: url("').concat(oa,'Virgil.woff2");\n }\n @font-face {\n font-family: "Cascadia";\n src: url("').concat(oa,'Cascadia.woff2");\n }\n \x3c/style\x3e\n ').concat(vb,"\n \x3c/defs\x3e\n "),U.exportBackground&&va&&((xc=na.ownerDocument.createElementNS(J.hR,"rect")).setAttribute("x","0"),xc.setAttribute("y","0"),xc.setAttribute("width",
"".concat(ka)),xc.setAttribute("height","".concat(ua)),xc.setAttribute("fill",va),na.appendChild(xc)),oc=r.Z.svg(na),(0,E.M_)(ia,oc,na,Z||{},{offsetX:Ma,offsetY:Ua,exportWithDarkMode:U.exportWithDarkMode,exportingFrameId:(null==ib?void 0:ib.id)||null,renderEmbeddables:null==aa?void 0:aa.renderEmbeddables}),pc.abrupt("return",na);case 36:case "end":return pc.stop()}},W,null,[[3,11]])}));return function(ia,U,Z,aa){return M.apply(this,arguments)}}(),F=function(M,I){var ia,U,Z=(null===(ia=L.Z.getScene(M[0]))||
void 0===ia||null===(U=ia.getNonDeletedElements())||void 0===U?void 0:U.length)===M.length;ia=(0,B.FQ)(M);if(!Z||ia){var aa=M.filter(function(fa){return"frame"===fa.type}).reduce(function(fa,X){return fa[X.id]=!0,fa},{});M=M.filter(function(fa){var X;return!aa[null!==(X=fa.frameId)&&void 0!==X?X:""]})}M=(0,f.KP)(M);M=(0,D.Z)(M,4);Z=M[0];U=M[1];var W=M[3];return[Z,U,(0,B.TE)(Z,M[2])+(ia?0:2*I),(0,B.TE)(U,W)+(ia?0:2*I)]},O=function(M,I,ia){M=F(M,I).map(function(U){return Math.trunc(U*ia)});M=(0,D.Z)(M,
4);return[M[2],M[3]]}},9547:function(g,h,b){b.d(h,{$b:function(){return D.$b},CJ:function(){return D.CJ},M9:function(){return D.M9},N:function(){return m.N},PR:function(){return m.PR},QG:function(){return D.QG},Un:function(){return D.Un},W:function(){return p.W},Yp:function(){return m.Yp},Zd:function(){return D.Zd},Zs:function(){return m.Zs},_4:function(){return l._4},bZ:function(){return D.bZ},eD:function(){return m.eD},j:function(){return v.j},sh:function(){return D.sh}});var l=b(1347),m=b(4485),
p=b(6778),D=b(7786),v=b(3765)},6778:function(g,h,b){b.d(h,{W:function(){return v},s:function(){return D}});var l=b(2577),m=b(5734),p=b(7135),D=function(t){var r=t.scenePoint,f=t.viewportDimensions;t=t.zoom;return{scrollX:f.width/2/t.value-r.x,scrollY:f.height/2/t.value-r.y}},v=function(t,r){if(!(t=(0,m.n_)(t)).length)return{scrollX:0,scrollY:0};var f=(0,m.KP)(t),E=(0,l.Z)(f,4);f=E[0];var B=E[1],J=E[2];E=E[3];var V=(0,l.Z)([f,B,J,E],4),H=V[2],S=V[3],L=(0,p._i)({sceneX:V[0],sceneY:V[1]},r);V=L.x;L=
L.y;H=(0,p._i)({sceneX:H,sceneY:S},r);S=H.y;if(H.x-V>r.width||S-L>r.height)t=(0,m.os)(t,(0,p.dE)({clientX:r.scrollX,clientY:r.scrollY},r)),t=(0,l.Z)(t,4),f=t[0],B=t[1],J=t[2],E=t[3];return D({scenePoint:{x:(f+J)/2,y:(B+E)/2},viewportDimensions:{width:r.width,height:r.height},zoom:r.zoom})}},1347:function(g,h,b){b.d(h,{WM:function(){return v},_4:function(){return E},nn:function(){return t},tJ:function(){return f},w1:function(){return r}});var l=b(2577),m=b(5734),p=b(7135),D=b(8557),v=4,t=6,r="rgba(0,0,0,0.3)",
f=function(B,J,V,H){if(0===B.length)return{horizontal:null,vertical:null};B=(0,m.KP)(B);B=(0,l.Z)(B,4);var S=B[0],L=B[1],T=B[2],R=B[3],G=J/H.zoom.value,F=V/H.zoom.value,O=J-G,M=V-F;B=parseInt((0,p.IH)("sat"))||0;var I=parseInt((0,p.IH)("sab"))||0,ia=parseInt((0,p.IH)("sal"))||0,U=parseInt((0,p.IH)("sar"))||0,Z=(0,D.G3)().rtl;O=-H.scrollX+O/2+ia;H=-H.scrollY+M/2+B;G=O+G-U;F=H+F-I;S=Math.min(S,O);L=Math.min(L,H);T=Math.max(T,G);R=Math.max(R,F);return{horizontal:O===S&&G===T?null:{x:Math.max(ia,v)+(O-
S)/(T-S)*J,y:V-t-Math.max(v,I),width:(G-O)/(T-S)*J-Math.max(2*v,ia+U),height:t},vertical:H===L&&F===R?null:{x:Z?Math.max(ia,v):J-t-Math.max(U,v),y:(H-L)/(R-L)*V+Math.max(B,v),width:t,height:(F-H)/(R-L)*V-Math.max(2*v,B+I)}}},E=function(B,J,V){B=[B.horizontal,B.vertical].map(function(S){return null!=S&&S.x<=J&&J<=S.x+S.width&&S.y<=V&&V<=S.y+S.height});var H=(0,l.Z)(B,2);B=H[0];H=H[1];return{isOverEither:B||H,isOverHorizontal:B,isOverVertical:H}}},4485:function(g,h,b){b.d(h,{N:function(){return V},
Oh:function(){return T},PR:function(){return H},Yp:function(){return J},Zs:function(){return L},aI:function(){return B},eD:function(){return S}});var l,m,p,D,v=b(2577),t=b(5734),r=b(9472),f=b(3473),E=b(7135),B=function(R){var G=new Set;return R.forEach(function(F){"frame"===F.type&&G.add(F.id)}),R.filter(function(F){return!F.frameId||!G.has(F.frameId)})},J=function(R,G){var F=!(2<arguments.length&&void 0!==arguments[2])||arguments[2],O=(0,t.qf)(G);O=(0,v.Z)(O,4);var M=O[0],I=O[1],ia=O[2],U=O[3];O=
R.filter(function(Z){var aa=(0,t.Pi)(Z),W=(0,v.Z)(aa,4);aa=W[0];var fa=W[1],X=W[2];W=W[3];var ea=(0,f.$Z)(Z);if(ea){ea=(0,t.Pi)(ea);ea=(0,v.Z)(ea,4);var pa=ea[1],va=ea[2],ta=ea[3];aa=Math.max(ea[0],aa);fa=Math.max(pa,fa);X=Math.min(va,X);W=Math.min(ta,W)}return!1===Z.locked&&"selection"!==Z.type&&!(0,r.Xh)(Z)&&M<=aa&&I<=fa&&ia>=X&&U>=W});return O=(O=F?B(O):O).filter(function(Z){var aa=(0,f.$Z)(Z);return!aa||(0,f.cO)(Z,aa)})},V=(l=null,m=null,p=null,(D=function(R,G){return null!=p&&R===l&&G.selectedElementIds===
m||(p=R.some(function(F){return G.selectedElementIds[F.id]}),l=R,m=G.selectedElementIds),p}).clearCache=function(){p=m=l=null},D),H=function(R,G,F){R=Array.from(new Set(S(R,G).map(function(O){return F(O)})));return 1===R.length?R[0]:null},S=function(R,G,F){var O=R.filter(function(I){return G.selectedElementIds[I.id]||null!=F&&F.includeBoundTextElement&&(0,r.Xh)(I)&&G.selectedElementIds[null==I?void 0:I.containerId]?I:null});if(null!=F&&F.includeElementsInFrames){var M=[];return O.forEach(function(I){"frame"===
I.type&&(0,f.wO)(R,I.id).forEach(function(ia){return M.push(ia)});M.push(I)}),M}return O},L=function(R,G){return G.editingElement?[G.editingElement]:S(R,G,{includeBoundTextElement:!0})},T=function(R,G){return(0,E.w8)(G.selectedElementIds,R)?G.selectedElementIds:R}},3765:function(g,h,b){b.d(h,{E:function(){return p},j:function(){return m}});var l=b(7041),m=function(D){return Math.max(l.Zj,Math.min(D,30))},p=function(D,v){var t=D.nextZoom,r=D.viewportX-v.offsetLeft;D=D.viewportY-v.offsetTop;var f=v.zoom.value;
return{scrollX:v.scrollX+(r-r/f)+-(r-r/t),scrollY:v.scrollY+(D-D/f)+-(D-D/t),zoom:{value:t}}}},7135:function(g,h,b){function l(sc,Sc){var Ib="undefined"!=typeof Symbol&&sc[Symbol.iterator]||sc["@@iterator"];if(!Ib){if(Array.isArray(sc)||(Ib=function(rb,Nb){if(rb){if("string"==typeof rb)return m(rb,Nb);var fc=Object.prototype.toString.call(rb).slice(8,-1);"Object"===fc&&rb.constructor&&(fc=rb.constructor.name);if("Map"===fc||"Set"===fc)return Array.from(rb);if("Arguments"===fc||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(fc))return m(rb,
Nb)}}(sc))||Sc&&sc&&"number"==typeof sc.length){Ib&&(sc=Ib);var lb=0;Sc=function(){};return{s:Sc,n:function(){return lb>=sc.length?{done:!0}:{done:!1,value:sc[lb++]}},e:function(rb){throw rb;},f:Sc}}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 Db,Gb=!0,db=!1;return{s:function(){Ib=Ib.call(sc)},n:function(){var rb=Ib.next();return Gb=rb.done,rb},e:function(rb){db=!0;Db=rb},f:function(){try{Gb||
null==Ib.return||Ib.return()}finally{if(db)throw Db;}}}}function m(sc,Sc){(null==Sc||Sc>sc.length)&&(Sc=sc.length);for(var Ib=0,lb=Array(Sc);Ib<Sc;Ib++)lb[Ib]=sc[Ib];return lb}function p(sc,Sc){var Ib=Object.keys(sc);if(Object.getOwnPropertySymbols){var lb=Object.getOwnPropertySymbols(sc);Sc&&(lb=lb.filter(function(Db){return Object.getOwnPropertyDescriptor(sc,Db).enumerable}));Ib.push.apply(Ib,lb)}return Ib}function D(sc){for(var Sc=1;Sc<arguments.length;Sc++){var Ib=null!=arguments[Sc]?arguments[Sc]:
{};Sc%2?p(Object(Ib),!0).forEach(function(lb){(0,t.Z)(sc,lb,Ib[lb])}):Object.getOwnPropertyDescriptors?Object.defineProperties(sc,Object.getOwnPropertyDescriptors(Ib)):p(Object(Ib)).forEach(function(lb){Object.defineProperty(sc,lb,Object.getOwnPropertyDescriptor(Ib,lb))})}return sc}b.d(h,{$9:function(){return vb},$g:function(){return ia},$h:function(){return oc},AK:function(){return oa},B4:function(){return fa},C3:function(){return ab},Ds:function(){return Z},FG:function(){return La},FQ:function(){return Nc},
Fc:function(){return R},G3:function(){return hb},G9:function(){return Xc},HP:function(){return Ad},I4:function(){return bb},IH:function(){return ka},Ip:function(){return yb},KJ:function(){return ta},Mj:function(){return dc},OF:function(){return xa},Om:function(){return pa},Oo:function(){return G},PI:function(){return Ua},Pr:function(){return Fa},Qm:function(){return Ma},TE:function(){return ea},Uk:function(){return Ga},Vv:function(){return W},_Z:function(){return O},_i:function(){return la},ag:function(){return Lb},
cx:function(){return Oa},dE:function(){return Ba},dZ:function(){return na},h2:function(){return Pa},hR:function(){return aa},mO:function(){return U},qr:function(){return Va},qz:function(){return Wa},rB:function(){return Ia},s:function(){return I},tH:function(){return ib},uY:function(){return Ka},v4:function(){return xc},vE:function(){return Qc},w8:function(){return bd},wO:function(){return F},wo:function(){return Ya},xn:function(){return Qa},xp:function(){return Cc},y1:function(){return M},y8:function(){return pc},
yo:function(){return X},z8:function(){return va}});var v=b(6655),t=b(7169),r=b(1930),f=b(2577),E=b(5284),B=b(8127),J=b(7041),V=b(5156),H=b(7726);g=b(9787);var S=b.n(g),L,T,R=function(){var sc=new Date,Sc=sc.getFullYear(),Ib="".concat(sc.getMonth()+1).padStart(2,"0"),lb="".concat(sc.getDate()).padStart(2,"0"),Db="".concat(sc.getHours()).padStart(2,"0");sc="".concat(sc.getMinutes()).padStart(2,"0");return"".concat(Sc,"-").concat(Ib,"-").concat(lb,"-").concat(Db).concat(sc)},G=function(sc){return sc.charAt(0).toUpperCase()+
sc.slice(1)},F=function(sc){return sc instanceof HTMLElement&&sc.className.includes("ToolIcon")},O=function(sc){return sc instanceof HTMLElement&&"wysiwyg"===sc.dataset.type||sc instanceof HTMLBRElement||sc instanceof HTMLInputElement||sc instanceof HTMLTextAreaElement||sc instanceof HTMLSelectElement},M=function(sc){return O(sc)||sc instanceof Element&&!!sc.closest("label, button")},I=function(sc){return sc instanceof HTMLElement&&"wysiwyg"===sc.dataset.type||sc instanceof HTMLBRElement||sc instanceof
HTMLTextAreaElement||sc instanceof HTMLInputElement&&("text"===sc.type||"number"===sc.type)},ia=function(sc){sc=sc.fontFamily;for(var Sc=0,Ib=Object.entries(J.ut);Sc<Ib.length;Sc++){var lb=(0,f.Z)(Ib[Sc],2),Db=lb[0];if(lb[1]===sc)return"".concat(Db,", ").concat(J._D)}return J._D},U=function(sc){var Sc=sc.fontFamily;return"".concat(sc.fontSize,"px ").concat(ia({fontFamily:Sc}))},Z=function(sc,Sc){var Ib=0,lb=null,Db=function(){for(var Gb=arguments.length,db=Array(Gb),rb=0;rb<Gb;rb++)db[rb]=arguments[rb];
lb=db;clearTimeout(Ib);Ib=window.setTimeout(function(){lb=null;sc.apply(void 0,db)},Sc)};return Db.flush=function(){if(clearTimeout(Ib),lb){var Gb=lb;lb=null;sc.apply(void 0,(0,r.Z)(Gb))}},Db.cancel=function(){lb=null;clearTimeout(Ib)},Db},aa=function(sc,Sc){var Ib=null,lb=null,Db=null,Gb=function fc(Nb){Ib=window.requestAnimationFrame(function(){Ib=null;sc.apply(void 0,(0,r.Z)(Nb));lb=null;Db&&(lb=Db,Db=null,fc(lb))})},db=function(){for(var Nb=arguments.length,fc=Array(Nb),Bc=0;Bc<Nb;Bc++)fc[Bc]=
arguments[Bc];lb=fc;null===Ib?Gb(lb):null!=Sc&&Sc.trailing&&(Db=fc)};return db.flush=function(){null!==Ib&&(cancelAnimationFrame(Ib),Ib=null);lb&&(sc.apply(void 0,(0,r.Z)(Db||lb)),lb=Db=null)},db.cancel=function(){lb=Db=null;null!==Ib&&(cancelAnimationFrame(Ib),Ib=null)},db},W=function(sc){return 1-Math.pow(1-sc,4)},fa=function(sc){var Sc,Ib=sc.fromValues,lb=sc.toValues,Db=sc.onStep,Gb=sc.duration,db=void 0===Gb?250:Gb,rb=sc.interpolateValue,Nb=sc.onStart,fc=sc.onEnd,Bc=sc.onCancel,Jc=!1,ic=0;return ic=
window.requestAnimationFrame(function fd(Rc){if(!Jc){void 0===Sc&&(Sc=Rc,null==Nb||Nb());Rc=Math.min(Rc-Sc,db);var pd=W(Rc/db),Ic={};if(Object.keys(Ib).forEach(function(pf){Ic[pf]=(lb[pf]-Ib[pf])*pd+Ib[pf]}),Db(Ic),Rc<db){var wc=Rc/db,je={};Object.keys(Ib).forEach(function(pf){var qe,ue=Ib[pf],kd=lb[pf];null==(qe=rb?rb(ue,kd,wc,pf):(kd-ue)*W(wc)+ue)&&(qe=(kd-ue)*W(wc)+ue);je[pf]=qe});Db(je);ic=window.requestAnimationFrame(fd)}else Db(lb),null==fc||fc()}}),function(){null==Bc||Bc();Jc=!0;window.cancelAnimationFrame(ic)}},
X=function(sc,Sc){if(!sc.length||1>Sc)return[];for(var Ib=0,lb=0,Db=Array(Math.ceil(sc.length/Sc));Ib<sc.length;)Db[lb++]=sc.slice(Ib,Ib+=Sc);return Db},ea=function(sc,Sc){return Math.abs(sc-Sc)},pa=function(sc,Sc){return"custom"===Sc.type?D(D({},sc.activeTool),{},{type:"custom",customType:Sc.customType}):D(D({},sc.activeTool),{},{lastActiveTool:void 0===Sc.lastActiveToolBeforeEraser?sc.activeTool.lastActiveTool:Sc.lastActiveToolBeforeEraser,type:Sc.type,customType:null})},va=function(sc){sc&&(sc.style.cursor=
"")},ta=function(sc,Sc){sc&&(sc.style.cursor=Sc)},xa=function(sc,Sc){if(!L||L.theme!==Sc){var Ib=Sc===J.C6.DARK;(L=document.createElement("canvas")).theme=Sc;L.height=20;L.width=20;Sc=L.getContext("2d");Sc.lineWidth=1;Sc.beginPath();Sc.arc(L.width/2,L.height/2,5,0,2*Math.PI);Sc.fillStyle=Ib?E.black:E.white;Sc.fill();Sc.strokeStyle=Ib?E.white:E.black;Sc.stroke();T=L.toDataURL(J.LO.svg)}ta(sc,"url(".concat(T,") ").concat(10," ").concat(10,", auto"))},Ga=function(sc,Sc){sc&&("selection"===Sc.activeTool.type?
va(sc):(0,H.l$)(Sc)?sc.style.cursor=J.oc.GRAB:(0,H.EN)(Sc)?xa(sc,Sc.theme):["image","custom"].includes(Sc.activeTool.type)||(sc.style.cursor=J.oc.CROSSHAIR))},Ia=function(){var sc;return"HTML"===(null===(sc=document.fullscreenElement)||void 0===sc?void 0:sc.nodeName)},Ya=function(){return document.documentElement.requestFullscreen()},Fa=function(){return document.exitFullscreen()},Ka=function(sc){return sc=sc.replace(/\bAlt\b/i,"Alt").replace(/\bShift\b/i,"Shift").replace(/\b(Enter|Return)\b/i,"Enter"),
J.Um?sc.replace(/\bCtrlOrCmd\b/gi,"Cmd").replace(/\bAlt\b/i,"Option"):sc.replace(/\bCtrlOrCmd\b/gi,"Ctrl")},Ba=function(sc,Sc){var Ib=Sc.zoom;return{x:(sc.clientX-Sc.offsetLeft)/Ib.value-Sc.scrollX,y:(sc.clientY-Sc.offsetTop)/Ib.value-Sc.scrollY}},la=function(sc,Sc){var Ib=Sc.zoom;return{x:(sc.sceneX+Sc.scrollX)*Ib.value+Sc.offsetLeft,y:(sc.sceneY+Sc.scrollY)*Ib.value+Sc.offsetTop}},ka=function(sc){return getComputedStyle(document.documentElement).getPropertyValue("--".concat(sc))},ua=new RegExp("^[^".concat("A-Za-zÀ-ÖØ-öø-ʸ̀-֐ࠀ-῿Ⰰ-﬜﷾-﹯﻽-￿",
"]*[").concat("֑-߿יִ-﷽ﹰ-ﻼ","]")),na=function(sc){return ua.test(sc)},oa=function(sc){sc=(0,f.Z)(sc,2);return{x:sc[0],y:sc[1]}},La=function(sc){if("AbortError"!==(null==sc?void 0:sc.name))throw sc;console.warn(sc)},Oa=function(sc,Sc){var Ib=2<arguments.length&&void 0!==arguments[2]?arguments[2]:0;0>Ib&&(Ib=sc.length+Ib);for(Ib=Math.min(sc.length,Math.max(Ib,0))-1;++Ib<sc.length;)if(Sc(sc[Ib],Ib,sc))return Ib;return-1},Va=function(sc,Sc){var Ib=2<arguments.length&&void 0!==arguments[2]?arguments[2]:
sc.length-1;0>Ib&&(Ib=sc.length+Ib);for(Ib=Math.min(sc.length-1,Math.max(Ib,0))+1;-1<--Ib;)if(Sc(sc[Ib],Ib,sc))return Ib;return-1},Ma=function(sc){var Sc=5===sc.length&&"0"===sc.substr(4,1),Ib=9===sc.length&&"00"===sc.substr(7,2);return Sc||Ib||sc===B.HO.transparent},Ua=function(){var sc,Sc,Ib=new Promise(function(lb,Db){sc=lb;Sc=Db});return Ib.resolve=sc,Ib.reject=Sc,Ib},ib=function(sc){return function(Sc){(0,V.unstable_batchedUpdates)(sc,Sc)}},vb=function(sc){return aa(function(Sc){(0,V.unstable_batchedUpdates)(sc,
Sc)})},yb=function(sc){for(sc=sc.parentElement;sc&&sc!==document.body;){var Sc=window.getComputedStyle(sc).overflowY;if(sc.scrollHeight>sc.clientHeight&&("auto"===Sc||"scroll"===Sc||"overlay"===Sc))return sc;sc=sc.parentElement}return document},Wa=function(sc){for(sc=sc.parentElement;sc;){if(-1<sc.tabIndex)return void sc.focus();sc=sc.parentElement}},hb=function(sc){return Array.from(sc).map(function(Sc){return"0".concat(Sc.toString(16)).slice(-2)}).join("")},ab=function(){return Date.now()},Qa=function(sc){return sc.reduce(function(Sc,
Ib){return Sc.set("string"==typeof Ib?Ib:Ib.id,Ib),Sc},new Map)},bb=function(sc){return sc.reduce(function(Sc,Ib,lb){return Sc.set(Ib.id,[Ib,lb]),Sc},new Map)},Pa=function(){return!1},Lb=function(sc,Sc){return new CustomEvent(sc,{detail:{nativeEvent:Sc},cancelable:!0})},xc=function(sc,Sc){var Ib=!1,lb;for(lb in Sc){var Db=Sc[lb];void 0!==Db&&(sc[lb]!==Db||"object"===(0,v.Z)(Db)&&null!==Db)&&(Ib=!0)}return Ib?D(D({},sc),Sc):sc},oc=function(){try{return window.self===window.top?"top":"iframe"}catch(sc){return"iframe"}},
pc=function(sc){return!!sc&&"object"===(0,v.Z)(sc)&&"then"in sc&&"catch"in sc&&"finally"in sc},Cc=function(sc){return(sc=null==sc?void 0:sc.querySelectorAll("button, a, input, select, textarea, div[tabindex], label[tabindex]"))?Array.from(sc).filter(function(Sc){return-1<Sc.tabIndex&&!Sc.disabled}):[]},bd=function(sc,Sc,Ib){var lb=3<arguments.length&&void 0!==arguments[3]&&arguments[3],Db=Object.keys(sc),Gb=Object.keys(Sc);return Db.length===Gb.length&&Db.every(function(db){var rb=null==Ib?void 0:
Ib[db];rb=rb?rb(sc[db],Sc[db]):sc[db]===Sc[db];return!rb&&lb&&console.info("%cisShallowEqual: ".concat(db," not equal -\x3e"),"color: #8B4000",sc[db],Sc[db]),rb})},dc=function(sc,Sc){var Ib=(2<arguments.length&&void 0!==arguments[2]?arguments[2]:{}).checkForDefaultPrevented,lb=void 0===Ib||Ib;return function(Db){if(null==sc||sc(Db),!lb||!Db.defaultPrevented)return null==Sc?void 0:Sc(Db)}},Nc=function(sc){var Sc=sc.filter(function(Ib){return"frame"===Ib.type});return 1===Sc.length&&sc.every(function(Ib){return"frame"===
Ib.type||Ib.frameId===Sc[0].id})},Qc=function(sc,Sc,Ib){if(Ib)return console.error(Sc),sc;throw Error(Sc);},Ad=function(sc){var Sc,Ib,lb=function(Db){var Gb=Object.entries(Db);if(Sc){var db,rb=!0,Nb=l(Gb);try{for(Nb.s();!(db=Nb.n()).done;){var fc=(0,f.Z)(db.value,2),Bc=fc[1];if(Sc.get(fc[0])!==Bc){rb=!1;break}}}catch(Jc){Nb.e(Jc)}finally{Nb.f()}if(rb)return Ib}Db=sc(Db);return Sc=new Map(Gb),Ib=Db,Db};return lb.clear=function(){Ib=Sc=void 0},lb},Xc=function(){try{var sc=S().version.split(".");var Sc=
17<Number(sc[0])}catch(lb){Sc=!1}var Ib=!1;return function(){return!0===window.EXCALIDRAW_THROTTLE_RENDER&&(!!Sc||(Ib||(Ib=!0,console.warn("Excalidraw: render throttling is disabled on React versions \x3c 18.")),!1))}}()},897:function(g,h,b){function l(M,I){var ia="undefined"!=typeof Symbol&&M[Symbol.iterator]||M["@@iterator"];if(!ia){if(Array.isArray(M)||(ia=function(fa,X){if(fa){if("string"==typeof fa)return m(fa,X);var ea=Object.prototype.toString.call(fa).slice(8,-1);"Object"===ea&&fa.constructor&&
(ea=fa.constructor.name);if("Map"===ea||"Set"===ea)return Array.from(fa);if("Arguments"===ea||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ea))return m(fa,X)}}(M))||I&&M&&"number"==typeof M.length){ia&&(M=ia);var U=0;I=function(){};return{s:I,n:function(){return U>=M.length?{done:!0}:{done:!1,value:M[U++]}},e:function(fa){throw fa;},f:I}}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 Z,
aa=!0,W=!1;return{s:function(){ia=ia.call(M)},n:function(){var fa=ia.next();return aa=fa.done,fa},e:function(fa){W=!0;Z=fa},f:function(){try{aa||null==ia.return||ia.return()}finally{if(W)throw Z;}}}}function m(M,I){(null==I||I>M.length)&&(I=M.length);for(var ia=0,U=Array(I);ia<I;ia++)U[ia]=M[ia];return U}function p(M,I,ia,U,Z){var aa,W=(0,J.xn)(M),fa=(0,r.SH)(M);M=M.filter(function(va){return!va.frameId||va.frameId&&!W.has(va.frameId)});var X=l(fa.keys());try{for(X.s();!(aa=X.n()).done;){var ea=aa.value;
W.has(ea)||fa.delete(ea)}}catch(va){X.e(va)}finally{X.f()}M=U(M,I,ia,Z);fa.forEach(function(va,ta){I.selectedElementIds[ta]||fa.set(ta,U(va,I,ia,Z))});var pa=[];return M.forEach(function(va){var ta;(0,t.He)(va)?pa=[].concat((0,D.Z)(pa),(0,D.Z)(null!==(ta=fa.get(va.id))&&void 0!==ta?ta:[]),[va]):pa=[].concat((0,D.Z)(pa),[va])}),pa}b.d(h,{jY:function(){return G},rr:function(){return O},ux:function(){return R},yZ:function(){return F}});var D=b(1930),v=b(7729),t=b(9472),r=b(3473),f=b(502),E=b(9547),B=
b(3223),J=b(7135),V=function(M,I,ia){var U=[],Z=[],aa=null,W=-1;for(I=(0,J.xn)(ia||(0,E.eD)(M,I,{includeBoundTextElement:!0}));++W<M.length;)ia=M[W],I.get(ia.id)?(Z.length&&(U=U.concat(Z),Z=[]),U.push(W),aa=W+1):ia.isDeleted&&aa===W?(aa=W+1,Z.push(W)):Z=[];return U},H=function(M,I,ia){if("containerId"in M&&M.containerId){if("left"!==ia||(M=B.Z.getScene(M).getElement(M.containerId)))return I.indexOf(M)}else{var U,Z,aa=null===(U=M.boundElements)||void 0===U||null===(Z=U.find(function(W){return"arrow"!==
W.type}))||void 0===Z?void 0:Z.id;if(aa&&("left"===ia||(M=B.Z.getScene(M).getElement(aa))))return I.indexOf(M)}},S=function(M,I){return I.reduce(function(ia,U){U=M[U];return ia[U.id]=U,ia},{})},L=function(M,I,ia,U){var Z,aa=V(M,I,U),W=S(M,aa);U=(Z=0,aa.reduce(function(fa,X,ea){return 0<ea&&aa[ea-1]!==X-1&&(Z=++Z),(fa[Z]||(fa[Z]=[])).push(X),fa},[]));return"right"===ia&&(U=U.reverse()),U.forEach(function(fa,X){X=fa[0];fa=fa[fa.length-1];var ea="left"===ia?X:fa,pa=function(ta,xa,Ga,Ia){var Ya,Fa=xa[Ga],
Ka=function(la){return!la.isDeleted&&(!ta.editingGroupId||la.groupIds.includes(ta.editingGroupId))};Ga="left"===Ia?(0,J.qr)(xa,Ka,Math.max(0,Ga-1)):(0,J.cx)(xa,Ka,Ga+1);Ka=xa[Ga];if(!Ka)return-1;if(ta.editingGroupId){var Ba;if((null==Fa?void 0:Fa.groupIds.join(""))===(null==Ka?void 0:Ka.groupIds.join("")))return null!==(Ba=H(Ka,xa,Ia))&&void 0!==Ba?Ba:Ga;if(null==Ka||!Ka.groupIds.includes(ta.editingGroupId))return-1}if(!Ka.groupIds.length)return null!==(Ya=H(Ka,xa,Ia))&&void 0!==Ya?Ya:Ga;Ya=ta.editingGroupId?
Ka.groupIds[Ka.groupIds.indexOf(ta.editingGroupId)-1]:Ka.groupIds[Ka.groupIds.length-1];Ya=(0,f.Fb)(xa,Ya);return Ya.length?"left"===Ia?xa.indexOf(Ya[0]):xa.indexOf(Ya[Ya.length-1]):Ga}(I,M,ea,ia);if(-1!==pa&&ea!==pa){ea="left"===ia?M.slice(0,pa):M.slice(0,X);var va=M.slice(X,fa+1);X="left"===ia?M.slice(pa,X):M.slice(fa+1,pa+1);fa="left"===ia?M.slice(fa+1):M.slice(pa+1);M="left"===ia?[].concat((0,D.Z)(ea),(0,D.Z)(va),(0,D.Z)(X),(0,D.Z)(fa)):[].concat((0,D.Z)(ea),(0,D.Z)(X),(0,D.Z)(va),(0,D.Z)(fa))}}),
M.map(function(fa){return W[fa.id]?(0,v.ZP)(fa):fa})},T=function(M,I,ia){var U=V(M,I),Z=S(M,U),aa=[];if("left"===ia){if(I.editingGroupId){I=(0,f.Fb)(M,I.editingGroupId);if(!I.length)return M;var W=M.indexOf(I[0])}else W=0;I=U[U.length-1]}else{if(I.editingGroupId){I=(0,f.Fb)(M,I.editingGroupId);if(!I.length)return M;I=M.indexOf(I[I.length-1])}else I=M.length-1;W=U[0]}for(var fa=W;fa<I+1;fa++)U.includes(fa)||aa.push(M[fa]);U=Object.values(Z).map(function(X){return(0,v.ZP)(X)});Z=M.slice(0,W);M=M.slice(I+
1);return"left"===ia?[].concat((0,D.Z)(Z),(0,D.Z)(U),aa,(0,D.Z)(M)):[].concat((0,D.Z)(Z),aa,(0,D.Z)(U),(0,D.Z)(M))},R=function(M,I,ia){return p(M,I,"left",L,ia)},G=function(M,I,ia){return p(M,I,"right",L,ia)},F=function(M,I,ia){return p(M,I,"left",T,ia)},O=function(M,I,ia){return p(M,I,"right",T,ia)}},3041:function(g,h,b){g=b(3379);g=b.n(g);h=b(7795);h=b.n(h);var l=b(569);l=b.n(l);var m=b(3565);m=b.n(m);var p=b(9216);p=b.n(p);var D=b(4589);D=b.n(D);b=b(2044);var v={};v.styleTagTransform=D();v.setAttributes=
m();v.insert=l().bind(null,"head");v.domAPI=h();v.insertStyleElement=p();g()(b.Z,v);b.Z&&b.Z.locals&&b.Z.locals},3379:function(g){function h(p){for(var D=-1,v=0;v<m.length;v++)if(m[v].identifier===p){D=v;break}return D}function b(p,D){for(var v={},t=[],r=0;r<p.length;r++){var f=p[r],E=D.base?f[0]+D.base:f[0],B=v[E]||0,J="".concat(E," ").concat(B);v[E]=B+1;E=h(J);f={css:f[1],media:f[2],sourceMap:f[3],supports:f[4],layer:f[5]};-1!==E?(m[E].references++,m[E].updater(f)):(f=l(f,D),D.byIndex=r,m.splice(r,
0,{identifier:J,updater:f,references:1}));t.push(J)}return t}function l(p,D){var v=D.domAPI(D);v.update(p);return function(t){t?(t.css!==p.css||t.media!==p.media||t.sourceMap!==p.sourceMap||t.supports!==p.supports||t.layer!==p.layer)&&v.update(p=t):v.remove()}}var m=[];g.exports=function(p,D){var v=b(p=p||[],D=D||{});return function(t){t=t||[];for(var r=0;r<v.length;r++){var f=h(v[r]);m[f].references--}t=b(t,D);for(r=0;r<v.length;r++)f=h(v[r]),0===m[f].references&&(m[f].updater(),m.splice(f,1));v=
t}}},569:function(g){var h={};g.exports=function(b,l){if(void 0===h[b]){var m=document.querySelector(b);if(window.HTMLIFrameElement&&m instanceof window.HTMLIFrameElement)try{m=m.contentDocument.head}catch(p){m=null}h[b]=m}b=h[b];if(!b)throw Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");b.appendChild(l)}},9216:function(g){g.exports=function(h){var b=document.createElement("style");return h.setAttributes(b,h.attributes),h.insert(b,
h.options),b}},3565:function(g,h,b){g.exports=function(l){var m=b.nc;m&&l.setAttribute("nonce",m)}},7795:function(g){g.exports=function(h){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var b=h.insertStyleElement(h);return{update:function(l){var m="";l.supports&&(m+="@supports (".concat(l.supports,") {"));l.media&&(m+="@media ".concat(l.media," {"));var p=void 0!==l.layer;p&&(m+="@layer".concat(0<l.layer.length?" ".concat(l.layer):""," {"));m+=l.css;p&&(m+="}");l.media&&
(m+="}");l.supports&&(m+="}");(l=l.sourceMap)&&"undefined"!=typeof btoa&&(m+="\n/*# sourceMappingURL\x3ddata:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(l))))," */"));h.styleTagTransform(m,b,h.options);!0},remove:function(){if(null===b.parentNode)var l=!1;else b.parentNode.removeChild(b),l=void 0;!l}}}},4589:function(g){g.exports=function(h,b){if(b.styleSheet)b.styleSheet.cssText=h;else{for(;b.firstChild;)b.removeChild(b.firstChild);b.appendChild(document.createTextNode(h))}}},
9669:function(g){g.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAMUlEQVQ4T2NkYGAQYcAP3uCTZhw1gGGYhAGBZIA/nYDCgBDAm9BGDWAAJyRCgLaBCAAgXwixzAS0pgAAAABJRU5ErkJggg\x3d\x3d"},7984:function(g){g.exports='data:image/svg+xml,\x3csvg xmlns\x3d"http://www.w3.org/2000/svg" width\x3d"292.4" height\x3d"292.4" viewBox\x3d"0 0 292 292"\x3e\x3cpath d\x3d"M287 197L159 69c-4-3-8-5-13-5s-9 2-13 5L5 197c-3 4-5 8-5 13s2 9 5 13c4 4 8 5 13 5h256c5 0 9-1 13-5s5-8 5-13-1-9-5-13z"/\x3e\x3c/svg\x3e'},
1639:function(g){g.exports='data:image/svg+xml,\x3csvg xmlns\x3d"http://www.w3.org/2000/svg" width\x3d"292.4" height\x3d"292.4" viewBox\x3d"0 0 292 292"\x3e\x3cpath fill\x3d"%23ced4da" d\x3d"M287 197L159 69c-4-3-8-5-13-5s-9 2-13 5L5 197c-3 4-5 8-5 13s2 9 5 13c4 4 8 5 13 5h256c5 0 9-1 13-5s5-8 5-13-1-9-5-13z"/\x3e\x3c/svg\x3e'},9729:function(g,h,b){g.exports=b.p+"excalidraw-assets/Assistant-Bold.woff2"},1273:function(g,h,b){g.exports=b.p+"excalidraw-assets/Assistant-Medium.woff2"},8303:function(g,
h,b){g.exports=b.p+"excalidraw-assets/Assistant-Regular.woff2"},9577:function(g,h,b){g.exports=b.p+"excalidraw-assets/Assistant-SemiBold.woff2"},3147:function(g,h,b){g.exports=b.p+"excalidraw-assets/Cascadia.woff2"},3940:function(g,h,b){g.exports=b.p+"excalidraw-assets/Virgil.woff2"},9787:function(g){g.exports=Y},5156:function(g){g.exports=y},9649:function(g,h,b){function l(){function p(X,ea,pa){return Object.defineProperty(X,ea,{value:pa,enumerable:!0,configurable:!0,writable:!0}),X[ea]}function D(X,
ea,pa,va){ea=Object.create((ea&&ea.prototype instanceof t?ea:t).prototype);va=new L(va||[]);return M(ea,"_invoke",{value:J(X,pa,va)}),ea}function v(X,ea,pa){try{return{type:"normal",arg:X.call(ea,pa)}}catch(va){return{type:"throw",arg:va}}}function t(){}function r(){}function f(){}function E(X){["next","throw","return"].forEach(function(ea){p(X,ea,function(pa){return this._invoke(ea,pa)})})}function B(X,ea){function pa(ta,xa,Ga,Ia){ta=v(X[ta],X,xa);if("throw"!==ta.type){var Ya=ta.arg;return(ta=Ya.value)&&
"object"==m(ta)&&O.call(ta,"__await")?ea.resolve(ta.__await).then(function(Fa){pa("next",Fa,Ga,Ia)},function(Fa){pa("throw",Fa,Ga,Ia)}):ea.resolve(ta).then(function(Fa){Ya.value=Fa;Ga(Ya)},function(Fa){return pa("throw",Fa,Ga,Ia)})}Ia(ta.arg)}var va;M(this,"_invoke",{value:function(ta,xa){function Ga(){return new ea(function(Ia,Ya){pa(ta,xa,Ia,Ya)})}return va=va?va.then(Ga,Ga):Ga()}})}function J(X,ea,pa){var va="suspendedStart";return function(ta,xa){if("executing"===va)throw Error("Generator is already running");
if("completed"===va){if("throw"===ta)throw xa;return R()}pa.method=ta;for(pa.arg=xa;;){if(ta=pa.delegate)if(ta=V(ta,pa)){if(ta===aa)continue;return ta}if("next"===pa.method)pa.sent=pa._sent=pa.arg;else if("throw"===pa.method){if("suspendedStart"===va)throw va="completed",pa.arg;pa.dispatchException(pa.arg)}else"return"===pa.method&&pa.abrupt("return",pa.arg);va="executing";ta=v(X,ea,pa);if("normal"===ta.type){if(va=pa.done?"completed":"suspendedYield",ta.arg===aa)continue;return{value:ta.arg,done:pa.done}}"throw"===
ta.type&&(va="completed",pa.method="throw",pa.arg=ta.arg)}}}function V(X,ea){var pa=ea.method,va=X.iterator[pa];if(void 0===va)return ea.delegate=null,"throw"===pa&&X.iterator.return&&(ea.method="return",ea.arg=void 0,V(X,ea),"throw"===ea.method)||"return"!==pa&&(ea.method="throw",ea.arg=new TypeError("The iterator does not provide a '"+pa+"' method")),aa;pa=v(va,X.iterator,ea.arg);return"throw"===pa.type?(ea.method="throw",ea.arg=pa.arg,ea.delegate=null,aa):(pa=pa.arg)?pa.done?(ea[X.resultName]=
pa.value,ea.next=X.nextLoc,"return"!==ea.method&&(ea.method="next",ea.arg=void 0),ea.delegate=null,aa):pa:(ea.method="throw",ea.arg=new TypeError("iterator result is not an object"),ea.delegate=null,aa)}function H(X){var ea={tryLoc:X[0]};1 in X&&(ea.catchLoc=X[1]);2 in X&&(ea.finallyLoc=X[2],ea.afterLoc=X[3]);this.tryEntries.push(ea)}function S(X){var ea=X.completion||{};ea.type="normal";delete ea.arg;X.completion=ea}function L(X){this.tryEntries=[{tryLoc:"root"}];X.forEach(H,this);this.reset(!0)}
function T(X){if(X){var ea=X[ia];if(ea)return ea.call(X);if("function"==typeof X.next)return X;if(!isNaN(X.length)){var pa=-1;ea=function ta(){for(;++pa<X.length;)if(O.call(X,pa))return ta.value=X[pa],ta.done=!1,ta;return ta.value=void 0,ta.done=!0,ta};return ea.next=ea}}return{next:R}}function R(){return{value:void 0,done:!0}}g.exports=l=function(){return G};g.exports.__esModule=!0;g.exports.default=g.exports;var G={},F=Object.prototype,O=F.hasOwnProperty,M=Object.defineProperty||function(X,ea,pa){X[ea]=
pa.value},I="function"==typeof Symbol?Symbol:{},ia=I.iterator||"@@iterator",U=I.asyncIterator||"@@asyncIterator",Z=I.toStringTag||"@@toStringTag";try{p({},"")}catch(X){p=function(ea,pa,va){return ea[pa]=va}}G.wrap=D;var aa={};I={};p(I,ia,function(){return this});var W=Object.getPrototypeOf;(W=W&&W(W(T([]))))&&W!==F&&O.call(W,ia)&&(I=W);var fa=f.prototype=t.prototype=Object.create(I);return r.prototype=f,M(fa,"constructor",{value:f,configurable:!0}),M(f,"constructor",{value:r,configurable:!0}),r.displayName=
p(f,Z,"GeneratorFunction"),G.isGeneratorFunction=function(X){X="function"==typeof X&&X.constructor;return!!X&&(X===r||"GeneratorFunction"===(X.displayName||X.name))},G.mark=function(X){return Object.setPrototypeOf?Object.setPrototypeOf(X,f):(X.__proto__=f,p(X,Z,"GeneratorFunction")),X.prototype=Object.create(fa),X},G.awrap=function(X){return{__await:X}},E(B.prototype),p(B.prototype,U,function(){return this}),G.AsyncIterator=B,G.async=function(X,ea,pa,va,ta){void 0===ta&&(ta=Promise);var xa=new B(D(X,
ea,pa,va),ta);return G.isGeneratorFunction(ea)?xa:xa.next().then(function(Ga){return Ga.done?Ga.value:xa.next()})},E(fa),p(fa,Z,"Generator"),p(fa,ia,function(){return this}),p(fa,"toString",function(){return"[object Generator]"}),G.keys=function(X){var ea=Object(X),pa=[],va;for(va in ea)pa.push(va);return pa.reverse(),function xa(){for(;pa.length;){var Ga=pa.pop();if(Ga in ea)return xa.value=Ga,xa.done=!1,xa}return xa.done=!0,xa}},G.values=T,L.prototype={constructor:L,reset:function(X){if(this.prev=
0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(S),!X)for(var ea in this)"t"===ea.charAt(0)&&O.call(this,ea)&&!isNaN(+ea.slice(1))&&(this[ea]=void 0)},stop:function(){this.done=!0;var X=this.tryEntries[0].completion;if("throw"===X.type)throw X.arg;return this.rval},dispatchException:function(X){function ea(Ya,Fa){return xa.type="throw",xa.arg=X,pa.next=Ya,Fa&&(pa.method="next",pa.arg=void 0),!!Fa}if(this.done)throw X;
for(var pa=this,va=this.tryEntries.length-1;0<=va;--va){var ta=this.tryEntries[va],xa=ta.completion;if("root"===ta.tryLoc)return ea("end");if(ta.tryLoc<=this.prev){var Ga=O.call(ta,"catchLoc"),Ia=O.call(ta,"finallyLoc");if(Ga&&Ia){if(this.prev<ta.catchLoc)return ea(ta.catchLoc,!0);if(this.prev<ta.finallyLoc)return ea(ta.finallyLoc)}else if(Ga){if(this.prev<ta.catchLoc)return ea(ta.catchLoc,!0)}else{if(!Ia)throw Error("try statement without catch or finally");if(this.prev<ta.finallyLoc)return ea(ta.finallyLoc)}}}},
abrupt:function(X,ea){for(var pa=this.tryEntries.length-1;0<=pa;--pa){var va=this.tryEntries[pa];if(va.tryLoc<=this.prev&&O.call(va,"finallyLoc")&&this.prev<va.finallyLoc){var ta=va;break}}ta&&("break"===X||"continue"===X)&&ta.tryLoc<=ea&&ea<=ta.finallyLoc&&(ta=null);pa=ta?ta.completion:{};return pa.type=X,pa.arg=ea,ta?(this.method="next",this.next=ta.finallyLoc,aa):this.complete(pa)},complete:function(X,ea){if("throw"===X.type)throw X.arg;return"break"===X.type||"continue"===X.type?this.next=X.arg:
"return"===X.type?(this.rval=this.arg=X.arg,this.method="return",this.next="end"):"normal"===X.type&&ea&&(this.next=ea),aa},finish:function(X){for(var ea=this.tryEntries.length-1;0<=ea;--ea){var pa=this.tryEntries[ea];if(pa.finallyLoc===X)return this.complete(pa.completion,pa.afterLoc),S(pa),aa}},catch:function(X){for(var ea=this.tryEntries.length-1;0<=ea;--ea){var pa=this.tryEntries[ea];if(pa.tryLoc===X){X=pa.completion;if("throw"===X.type){var va=X.arg;S(pa)}return va}}throw Error("illegal catch attempt");
},delegateYield:function(X,ea,pa){return this.delegate={iterator:T(X),resultName:ea,nextLoc:pa},"next"===this.method&&(this.arg=void 0),aa}},G}var m=b(8114).default;g.exports=l;g.exports.__esModule=!0;g.exports.default=g.exports},8114:function(g){function h(b){return g.exports=h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(l){return typeof l}:function(l){return l&&"function"==typeof Symbol&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l},g.exports.__esModule=
!0,g.exports.default=g.exports,h(b)}g.exports=h;g.exports.__esModule=!0;g.exports.default=g.exports},2975:function(g,h,b){h=b(9649)();g.exports=h;try{regeneratorRuntime=h}catch(l){"object"==typeof globalThis?globalThis.regeneratorRuntime=h:Function("r","regeneratorRuntime \x3d r")(h)}},7017:function(g,h,b){function l(m,p){(null==p||p>m.length)&&(p=m.length);for(var D=0,v=Array(p);D<p;D++)v[D]=m[D];return v}b.d(h,{Z:function(){return l}})},3173:function(g,h,b){function l(m){if(void 0===m)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return m}b.d(h,{Z:function(){return l}})},8950:function(g,h,b){function l(p,D,v,t,r,f,E){try{var B=p[f](E),J=B.value}catch(V){return void v(V)}B.done?D(J):Promise.resolve(J).then(t,r)}function m(p){return function(){var D=this,v=arguments;return new Promise(function(t,r){function f(J){l(B,t,r,f,E,"next",J)}function E(J){l(B,t,r,f,E,"throw",J)}var B=p.apply(D,v);f(void 0)})}}b.d(h,{Z:function(){return m}})},8821:function(g,h,b){function l(m,p){if(!(m instanceof p))throw new TypeError("Cannot call a class as a function");
}b.d(h,{Z:function(){return l}})},5169:function(g,h,b){function l(D,v){for(var t=0;t<v.length;t++){var r=v[t];r.enumerable=r.enumerable||!1;r.configurable=!0;"value"in r&&(r.writable=!0);Object.defineProperty(D,(0,p.Z)(r.key),r)}}function m(D,v,t){return v&&l(D.prototype,v),t&&l(D,t),Object.defineProperty(D,"prototype",{writable:!1}),D}b.d(h,{Z:function(){return m}});var p=b(3525)},7169:function(g,h,b){function l(p,D,v){return(D=(0,m.Z)(D))in p?Object.defineProperty(p,D,{value:v,enumerable:!0,configurable:!0,
writable:!0}):p[D]=v,p}b.d(h,{Z:function(){return l}});var m=b(3525)},11:function(g,h,b){function l(){return l=Object.assign?Object.assign.bind():function(m){for(var p=1;p<arguments.length;p++){var D=arguments[p],v;for(v in D)Object.prototype.hasOwnProperty.call(D,v)&&(m[v]=D[v])}return m},l.apply(this,arguments)}b.d(h,{Z:function(){return l}})},2312:function(g,h,b){function l(m){return l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(p){return p.__proto__||Object.getPrototypeOf(p)},
l(m)}b.d(h,{Z:function(){return l}})},2248:function(g,h,b){function l(p,D){if("function"!=typeof D&&null!==D)throw new TypeError("Super expression must either be null or a function");p.prototype=Object.create(D&&D.prototype,{constructor:{value:p,writable:!0,configurable:!0}});Object.defineProperty(p,"prototype",{writable:!1});D&&(0,m.Z)(p,D)}b.d(h,{Z:function(){return l}});var m=b(5901)},2726:function(g,h,b){function l(m,p){if(null==m)return{};var D;if(null==m)var v={};else{v={};var t=Object.keys(m);
for(D=0;D<t.length;D++){var r=t[D];0<=p.indexOf(r)||(v[r]=m[r])}}if(Object.getOwnPropertySymbols)for(t=Object.getOwnPropertySymbols(m),D=0;D<t.length;D++)r=t[D],0<=p.indexOf(r)||Object.prototype.propertyIsEnumerable.call(m,r)&&(v[r]=m[r]);return v}b.d(h,{Z:function(){return l}})},7245:function(g,h,b){function l(D,v){if(v&&("object"===(0,m.Z)(v)||"function"==typeof v))return v;if(void 0!==v)throw new TypeError("Derived constructors may only return object or undefined");return(0,p.Z)(D)}b.d(h,{Z:function(){return l}});
var m=b(6655),p=b(3173)},5901:function(g,h,b){function l(m,p){return l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(D,v){return D.__proto__=v,D},l(m,p)}b.d(h,{Z:function(){return l}})},2577:function(g,h,b){function l(p,D){if(!(p=function(v){if(Array.isArray(v))return v}(p)||function(v,t){var r=null==v?null:"undefined"!=typeof Symbol&&v[Symbol.iterator]||v["@@iterator"];if(null!=r){var f,E,B,J=[],V=!0,H=!1;try{if(E=(r=r.call(v)).next,0===t){if(Object(r)!==r)return;V=!1}else for(;!(V=
(f=E.call(r)).done)&&(J.push(f.value),J.length!==t);V=!0);}catch(L){H=!0;var S=L}finally{try{if(!V&&null!=r.return&&(B=r.return(),Object(B)!==B))return}finally{if(H)throw S;}}return J}}(p,D)||(0,m.Z)(p,D)))throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");return p}b.d(h,{Z:function(){return l}});var m=b(9139)},1930:function(g,h,b){function l(D){var v=Array.isArray(D)?(0,m.Z)(D):void 0;v||
(v="undefined"!=typeof Symbol&&null!=D[Symbol.iterator]||null!=D["@@iterator"]?Array.from(D):void 0);if(!(D=v||(0,p.Z)(D)))throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");return D}b.d(h,{Z:function(){return l}});var m=b(7017),p=b(9139)},3525:function(g,h,b){function l(p){a:if("object"===(0,m.Z)(p)&&null!==p){var D=p[Symbol.toPrimitive];if(void 0!==D){p=D.call(p,"string");if("object"!==(0,m.Z)(p))break a;
throw new TypeError("@@toPrimitive must return a primitive value.");}p=String(p)}return"symbol"===(0,m.Z)(p)?p:String(p)}b.d(h,{Z:function(){return l}});var m=b(6655)},6655:function(g,h,b){function l(m){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(p){return typeof p}:function(p){return p&&"function"==typeof Symbol&&p.constructor===Symbol&&p!==Symbol.prototype?"symbol":typeof p},l(m)}b.d(h,{Z:function(){return l}})},9139:function(g,h,b){function l(p,D){if(p){if("string"==
typeof p)return(0,m.Z)(p,D);var v=Object.prototype.toString.call(p).slice(8,-1);return"Object"===v&&p.constructor&&(v=p.constructor.name),"Map"===v||"Set"===v?Array.from(p):"Arguments"===v||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(v)?(0,m.Z)(p,D):void 0}}b.d(h,{Z:function(){return l}});var m=b(7017)},3607:function(g,h,b){function l(G,F){return function(O,M){const I="atom"+ ++t,ia={toString:()=>I};return"function"==typeof O?ia.read=O:(ia.init=O,ia.read=U=>U(ia),ia.write=(U,Z,aa)=>Z(ia,"function"==
typeof aa?aa(U(ia)):aa)),M&&(ia.write=M),ia}(G,F)}function m(G,F){F=T(F);const O=(0,v.useContext)(F),{s:M,v:I}=O,ia=fa=>{fa=M.r(G,fa);if(!fa.y)throw Error("should not be invalidated");if("e"in fa)throw fa.e;if("p"in fa)throw fa.p;if("v"in fa)return fa.v;throw Error("no atom value");},[[U,Z,aa],W]=(0,v.useReducer)((fa,X)=>{const ea=ia(X);return Object.is(fa[1],ea)&&fa[2]===G?fa:[X,ea,G]},I,fa=>[fa,ia(fa),G]);F=Z;return aa!==G&&(W(U),F=ia(U)),(0,v.useEffect)(()=>{const {v:fa}=O;fa&&M.c(G,fa);const X=
M.s(G,W,fa);return W(fa),X},[M,G,O]),(0,v.useEffect)(()=>{M.c(G,U)}),(0,v.useDebugValue)(F),F}function p(G,F){F=T(F);const {s:O,w:M}=(0,v.useContext)(F);return(0,v.useCallback)(I=>{if(!("write"in G))throw Error("not writable atom");const ia=U=>O.w(G,I,U);return M?M(ia):O.w(G,I,void 0)},[O,M,G])}function D(G,F){return"scope"in G&&(console.warn("atom.scope is deprecated. Please do useAtom(atom, scope) instead."),F=G.scope),[m(G,F),p(G,F)]}b.d(h,{zt:function(){return R},cn:function(){return l},Vv:function(){return H},
KO:function(){return D},Dv:function(){return m},b9:function(){return p}});var v=b(9787);let t=0;const r=Symbol(),f=G=>{var F;const {b:O,c:M}=G[r];M&&(M(),null==(F=J.get(O))||F())},E=(G,F)=>{const O=G[r].o,M=F[r].o;return O===M||G===M||!!O[r]&&E(O,F)},B=(G,F)=>{const O={b:G,o:F,c:null};G=new Promise(M=>{O.c=()=>{O.c=null;M()};F.finally(O.c)});return G[r]=O,G},J=new WeakMap,V=G=>{const F=new WeakMap,O=new WeakMap,M=new Map;let I,ia;if(I=new Set,ia=new Set,G)for(const [ua,na]of G)G={v:na,r:0,y:!0,d:new Map},
Object.freeze(G),"init"in ua||console.warn("Found initial value for derived atom which can cause unexpected behavior",ua),F.set(ua,G);const U=new WeakMap,Z=new WeakMap,aa=ua=>{let na=Z.get(ua);return na||(na=new Map,Z.set(ua,na)),na},W=(ua,na)=>{if(ua){const oa=aa(ua);let La=oa.get(na);return La||(La=W(ua.p,na),La&&"p"in La&&!La.p[r].c&&(La=void 0),La&&oa.set(na,La)),La}return F.get(na)},fa=(ua,na,oa)=>{(Object.freeze(oa),ua)?aa(ua).set(na,oa):(ua=F.get(na),F.set(na,oa),M.has(na)||M.set(na,ua))},
X=(ua,na=new Map,oa)=>{if(!oa)return na;const La=new Map;let Oa=!1;return oa.forEach(Va=>{var Ma;const Ua=(null==(Ma=W(ua,Va))?void 0:Ma.r)||0;La.set(Va,Ua);na.get(Va)!==Ua&&(Oa=!0)}),na.size!==La.size||Oa?La:na},ea=(ua,na,oa,La,Oa)=>{const Va=W(ua,na);if(Va){if(Oa&&!("p"in Va&&E(Va.p,Oa)))return Va;"p"in Va&&f(Va.p)}La={v:oa,r:(null==Va?void 0:Va.r)||0,y:!0,d:X(ua,null==Va?void 0:Va.d,La)};Oa=!(null==Va?0:Va.y);return Va&&"v"in Va&&Object.is(Va.v,oa)?La.d===Va.d||La.d.size===Va.d.size&&Array.from(La.d.keys()).every(Ma=>
Va.d.has(Ma))||(Oa=!0,Promise.resolve().then(()=>{ka(ua)})):(Oa=!0,++La.r,La.d.has(na)&&(La.d=(new Map(La.d)).set(na,La.r))),Va&&!Oa?Va:(fa(ua,na,La),La)},pa=(ua,na,oa,La,Oa)=>{const Va=W(ua,na);if(Va){if(Oa&&!("p"in Va&&E(Va.p,Oa)))return Va;"p"in Va&&f(Va.p)}oa={e:oa,r:((null==Va?void 0:Va.r)||0)+1,y:!0,d:X(ua,null==Va?void 0:Va.d,La)};return fa(ua,na,oa),oa},va=(ua,na,oa,La)=>{const Oa=W(ua,na);if(Oa&&"p"in Oa){if(E(Oa.p,oa)&&Oa.p[r].c)return Oa.y?Oa:{...Oa,y:!0};f(Oa.p)}((Va,Ma,Ua)=>{let ib=U.get(Ma);
ib||(ib=new Map,U.set(Ma,ib));Ua.then(()=>{ib.get(Va)===Ua&&(ib.delete(Va),ib.size||U.delete(Ma))});ib.set(Va,Ua)})(ua,na,oa);oa={p:oa,r:((null==Oa?void 0:Oa.r)||0)+1,y:!0,d:X(ua,null==Oa?void 0:Oa.d,La)};return fa(ua,na,oa),oa},ta=(ua,na,oa,La)=>{if(oa instanceof Promise){const Oa=B(oa,oa.then(Va=>{ea(ua,na,Va,La,Oa)}).catch(Va=>{if(Va instanceof Promise)return Va[r]?Va.then(()=>{xa(ua,na,!0)}):Va;pa(ua,na,Va,La,Oa)}));return va(ua,na,Oa,La)}return ea(ua,na,oa,La)},xa=(ua,na,oa)=>{if(!oa&&(oa=W(ua,
na))){if(oa.y&&"p"in oa&&oa.p[r].c)return oa;if(oa.d.forEach((Va,Ma)=>{Ma!==na&&(O.has(Ma)?(Va=W(ua,Ma))&&!Va.y&&xa(ua,Ma):xa(ua,Ma))}),Array.from(oa.d).every(([Va,Ma])=>(Va=W(ua,Va))&&!("p"in Va)&&Va.r===Ma))return oa.y?oa:{...oa,y:!0}}const La=new Set;try{var Oa=na.read(Va=>{La.add(Va);const Ma=Va===na?W(ua,Va):xa(ua,Va);if(Ma){if("e"in Ma)throw Ma.e;if("p"in Ma)throw Ma.p;return Ma.v}if("init"in Va)return Va.init;throw Error("no atom init");});return ta(ua,na,Oa,La)}catch(Va){return Va instanceof
Promise?(Oa=Va[r]&&!Va[r].c?B(Va[r].b,Va[r].o):B(Va,Va),va(ua,na,Oa,La)):pa(ua,na,Va,La)}},Ga=(ua,na)=>!na.l.size&&(!na.t.size||1===na.t.size&&na.t.has(ua)),Ia=(ua,na)=>{const oa=O.get(na);null==oa||oa.t.forEach(La=>{if(La!==na){const Oa=W(ua,La);Oa?fa(ua,La,{...Oa,y:!1}):console.warn("[Bug] could not invalidate non existing atom",La);Ia(ua,La)}})},Ya=(ua,na,oa)=>{let La=!0;const Oa=(Va,Ma)=>{const Ua=xa(ua,Va);if("e"in Ua)throw Ua.e;if("p"in Ua){if(null==Ma?0:Ma.unstable_promise)return Ua.p.then(()=>
{const ib=W(ua,Va);return ib&&"p"in ib&&ib.p===Ua.p?(new Promise(vb=>setTimeout(vb))).then(()=>Oa(Va,Ma)):Oa(Va,Ma)});throw console.info("Reading pending atom state in write operation. We throw a promise for now.",Va),Ua.p;}if("v"in Ua)return Ua.v;throw console.warn("[Bug] no value found while reading atom in write operation. This is probably a bug.",Va),Error("no value found");};oa=na.write(Oa,(Va,Ma)=>{let Ua;if(Va===na){if(!("init"in Va))throw Error("atom not writable");(ib=>{const vb=new Set,
yb=U.get(ib);return yb&&(U.delete(ib),yb.forEach((Wa,hb)=>{f(Wa);vb.add(hb)})),vb})(Va).forEach(ib=>{ib!==ua&&ta(ib,Va,Ma)});W(ua,Va)!==ta(ua,Va,Ma)&&Ia(ua,Va)}else Ua=Ya(ua,Va,Ma);return La||ka(ua),Ua},oa);return La=!1,oa},Fa=(ua,na,oa)=>{ua=Ya(oa,ua,na);return ka(oa),ua},Ka=(ua,na,oa)=>{oa={t:new Set(oa&&[oa]),l:new Set};O.set(na,oa);ia.add(na);if(xa(void 0,na).d.forEach((La,Oa)=>{(La=O.get(Oa))?La.t.add(na):Oa!==na&&Ka(ua,Oa,na)}),na.write&&na.onMount){const La=na.onMount(Oa=>Fa(na,Oa,ua));ua=
void 0;La&&(oa.u=La)}return oa},Ba=(ua,na)=>{var oa;const La=null==(oa=O.get(na))?void 0:oa.u;La&&La();O.delete(na);ia.delete(na);(oa=W(ua,na))?("p"in oa&&f(oa.p),oa.d.forEach((Oa,Va)=>{Va!==na&&(Oa=O.get(Va))&&(Oa.t.delete(na),Ga(Va,Oa)&&Ba(ua,Va))})):console.warn("[Bug] could not find atom state to unmount",na)},la=(ua,na,oa,La)=>{const Oa=new Set(oa.d.keys());null==La||La.forEach((Va,Ma)=>{if(Oa.has(Ma))return void Oa.delete(Ma);(Va=O.get(Ma))&&(Va.t.delete(na),Ga(Ma,Va)&&Ba(ua,Ma))});Oa.forEach(Va=>
{const Ma=O.get(Va);Ma?Ma.t.add(na):O.has(na)&&Ka(ua,Va,na)})},ka=ua=>{if(ua)aa(ua).forEach((na,oa)=>{na!==F.get(oa)&&(na=O.get(oa),null==na||na.l.forEach(La=>La(ua)))});else{for(;M.size;){const na=Array.from(M);M.clear();na.forEach(([oa,La])=>{const Oa=W(void 0,oa);(Oa&&Oa.d!==(null==La?void 0:La.d)&&la(void 0,oa,Oa,null==La?void 0:La.d),La&&!La.y&&(null==Oa?0:Oa.y))||(oa=O.get(oa),null==oa||oa.l.forEach(Va=>Va()))})}I.forEach(na=>na())}};return{r:(ua,na)=>xa(na,ua),w:Fa,c:(ua,na)=>{na&&(oa=>{aa(oa).forEach((La,
Oa)=>{const Va=F.get(Oa);(!Va||La.r>Va.r||La.y!==Va.y||La.r===Va.r&&La.d!==Va.d)&&(F.set(Oa,La),La.d!==(null==Va?void 0:Va.d)&&la(oa,Oa,La,null==Va?void 0:Va.d))})})(na);ka(void 0)},s:(ua,na,oa)=>{const La=((Oa,Va)=>{let Ma=O.get(Va);return Ma||=Ka(Oa,Va),Ma})(oa,ua).l;return La.add(na),()=>{La.delete(na);const Oa=O.get(ua);Oa&&Ga(ua,Oa)&&Ba(oa,ua)}},h:(ua,na)=>{for(const [oa,La]of ua)"init"in oa&&(ta(na,oa,La),Ia(na,oa));ka(na)},n:ua=>(I.add(ua),()=>{I.delete(ua)}),l:()=>ia.values(),a:ua=>F.get(ua),
m:ua=>O.get(ua)}},H=G=>{const F=V(G),O=M=>new Promise((I,ia)=>{const U=F.r(M);"e"in U?ia(U.e):I("p"in U?U.p.then(()=>O(M)):U.v)});return{get:M=>{M=F.r(M);if("e"in M)throw M.e;if(!("p"in M))return M.v},asyncGet:O,set:(M,I)=>F.w(M,I),sub:(M,I)=>F.s(M,I),SECRET_INTERNAL_store:F}},S=(G,F)=>({s:F?F(G).SECRET_INTERNAL_store:V(G)}),L=new Map,T=G=>(L.has(G)||L.set(G,(0,v.createContext)(S())),L.get(G)),R=({children:G,initialValues:F,scope:O,unstable_createStore:M,unstable_enableVersionedWrite:I})=>{const [ia,
U]=(0,v.useState)({});(0,v.useEffect)(()=>{const aa=Z.current;aa.w&&(aa.s.c(null,ia),delete ia.p,aa.v=ia)},[ia]);const Z=(0,v.useRef)();if(!Z.current){F=S(F,M);if(I){let aa=0;F.w=W=>{U(fa=>{fa=aa?fa:{p:fa};return W(fa),fa})};F.v=ia;F.r=W=>{++aa;W();--aa}}Z.current=F}O=T(O);return(0,v.createElement)(O.Provider,{value:Z.current},G)}},5605:function(g,h,b){b.d(h,{x0:function(){return l}});let l=(m=21)=>crypto.getRandomValues(new Uint8Array(m)).reduce((p,D)=>p+(36>(D&=63)?D.toString(36):62>D?(D-26).toString(36).toUpperCase():
62<D?"-":"_"),"")},5284:function(g){g.exports=JSON.parse('{"white":"#ffffff","black":"#000000","gray":["#f8f9fa","#f1f3f5","#e9ecef","#dee2e6","#ced4da","#adb5bd","#868e96","#495057","#343a40","#212529"],"red":["#fff5f5","#ffe3e3","#ffc9c9","#ffa8a8","#ff8787","#ff6b6b","#fa5252","#f03e3e","#e03131","#c92a2a"],"pink":["#fff0f6","#ffdeeb","#fcc2d7","#faa2c1","#f783ac","#f06595","#e64980","#d6336c","#c2255c","#a61e4d"],"grape":["#f8f0fc","#f3d9fa","#eebefa","#e599f7","#da77f2","#cc5de8","#be4bdb","#ae3ec9","#9c36b5","#862e9c"],"violet":["#f3f0ff","#e5dbff","#d0bfff","#b197fc","#9775fa","#845ef7","#7950f2","#7048e8","#6741d9","#5f3dc4"],"indigo":["#edf2ff","#dbe4ff","#bac8ff","#91a7ff","#748ffc","#5c7cfa","#4c6ef5","#4263eb","#3b5bdb","#364fc7"],"blue":["#e7f5ff","#d0ebff","#a5d8ff","#74c0fc","#4dabf7","#339af0","#228be6","#1c7ed6","#1971c2","#1864ab"],"cyan":["#e3fafc","#c5f6fa","#99e9f2","#66d9e8","#3bc9db","#22b8cf","#15aabf","#1098ad","#0c8599","#0b7285"],"teal":["#e6fcf5","#c3fae8","#96f2d7","#63e6be","#38d9a9","#20c997","#12b886","#0ca678","#099268","#087f5b"],"green":["#ebfbee","#d3f9d8","#b2f2bb","#8ce99a","#69db7c","#51cf66","#40c057","#37b24d","#2f9e44","#2b8a3e"],"lime":["#f4fce3","#e9fac8","#d8f5a2","#c0eb75","#a9e34b","#94d82d","#82c91e","#74b816","#66a80f","#5c940d"],"yellow":["#fff9db","#fff3bf","#ffec99","#ffe066","#ffd43b","#fcc419","#fab005","#f59f00","#f08c00","#e67700"],"orange":["#fff4e6","#ffe8cc","#ffd8a8","#ffc078","#ffa94d","#ff922b","#fd7e14","#f76707","#e8590c","#d9480f"]}')},
1463:function(g){g.exports=JSON.parse('{"labels":{"paste":"Paste","pasteAsPlaintext":"Paste as plaintext","pasteCharts":"Paste charts","selectAll":"Select all","multiSelect":"Add element to selection","moveCanvas":"Move canvas","cut":"Cut","copy":"Copy","copyAsPng":"Copy to clipboard as PNG","copyAsSvg":"Copy to clipboard as SVG","copyText":"Copy to clipboard as text","bringForward":"Bring forward","sendToBack":"Send to back","bringToFront":"Bring to front","sendBackward":"Send backward","delete":"Delete","copyStyles":"Copy styles","pasteStyles":"Paste styles","stroke":"Stroke","background":"Background","fill":"Fill","strokeWidth":"Stroke width","strokeStyle":"Stroke style","strokeStyle_solid":"Solid","strokeStyle_dashed":"Dashed","strokeStyle_dotted":"Dotted","sloppiness":"Sloppiness","opacity":"Opacity","textAlign":"Text align","edges":"Edges","sharp":"Sharp","round":"Round","arrowheads":"Arrowheads","arrowhead_none":"None","arrowhead_arrow":"Arrow","arrowhead_bar":"Bar","arrowhead_dot":"Dot","arrowhead_triangle":"Triangle","fontSize":"Font size","fontFamily":"Font family","addWatermark":"Add \\"Made with Excalidraw\\"","handDrawn":"Hand-drawn","normal":"Normal","code":"Code","small":"Small","medium":"Medium","large":"Large","veryLarge":"Very large","solid":"Solid","hachure":"Hachure","zigzag":"Zigzag","crossHatch":"Cross-hatch","thin":"Thin","bold":"Bold","left":"Left","center":"Center","right":"Right","extraBold":"Extra bold","architect":"Architect","artist":"Artist","cartoonist":"Cartoonist","fileTitle":"File name","colorPicker":"Color picker","canvasColors":"Used on canvas","canvasBackground":"Canvas background","drawingCanvas":"Drawing canvas","layers":"Layers","actions":"Actions","language":"Language","liveCollaboration":"Live collaboration...","duplicateSelection":"Duplicate","untitled":"Untitled","name":"Name","yourName":"Your name","madeWithExcalidraw":"Made with Excalidraw","group":"Group selection","ungroup":"Ungroup selection","collaborators":"Collaborators","showGrid":"Show grid","addToLibrary":"Add to library","removeFromLibrary":"Remove from library","libraryLoadingMessage":"Loading library…","libraries":"Browse libraries","loadingScene":"Loading scene…","align":"Align","alignTop":"Align top","alignBottom":"Align bottom","alignLeft":"Align left","alignRight":"Align right","centerVertically":"Center vertically","centerHorizontally":"Center horizontally","distributeHorizontally":"Distribute horizontally","distributeVertically":"Distribute vertically","flipHorizontal":"Flip horizontal","flipVertical":"Flip vertical","viewMode":"View mode","share":"Share","showStroke":"Show stroke color picker","showBackground":"Show background color picker","toggleTheme":"Toggle theme","personalLib":"Personal Library","excalidrawLib":"Excalidraw Library","decreaseFontSize":"Decrease font size","increaseFontSize":"Increase font size","unbindText":"Unbind text","bindText":"Bind text to the container","createContainerFromText":"Wrap text in a container","link":{"edit":"Edit link","editEmbed":"Edit link \x26 embed","create":"Create link","createEmbed":"Create link \x26 embed","label":"Link","labelEmbed":"Link \x26 embed","empty":"No link is set"},"lineEditor":{"edit":"Edit line","exit":"Exit line editor"},"elementLock":{"lock":"Lock","unlock":"Unlock","lockAll":"Lock all","unlockAll":"Unlock all"},"statusPublished":"Published","sidebarLock":"Keep sidebar open","selectAllElementsInFrame":"Select all elements in frame","removeAllElementsFromFrame":"Remove all elements from frame","eyeDropper":"Pick color from canvas"},"library":{"noItems":"No items added yet...","hint_emptyLibrary":"Select an item on canvas to add it here, or install a library from the public repository, below.","hint_emptyPrivateLibrary":"Select an item on canvas to add it here."},"buttons":{"clearReset":"Reset the canvas","exportJSON":"Export to file","exportImage":"Export image...","export":"Save to...","copyToClipboard":"Copy to clipboard","save":"Save to current file","saveAs":"Save as","load":"Open","getShareableLink":"Get shareable link","close":"Close","selectLanguage":"Select language","scrollBackToContent":"Scroll back to content","zoomIn":"Zoom in","zoomOut":"Zoom out","resetZoom":"Reset zoom","menu":"Menu","done":"Done","edit":"Edit","undo":"Undo","redo":"Redo","resetLibrary":"Reset library","createNewRoom":"Create new room","fullScreen":"Full screen","darkMode":"Dark mode","lightMode":"Light mode","zenMode":"Zen mode","exitZenMode":"Exit zen mode","cancel":"Cancel","clear":"Clear","remove":"Remove","embed":"Toggle embedding","publishLibrary":"Publish","submit":"Submit","confirm":"Confirm","embeddableInteractionButton":"Click to interact"},"alerts":{"clearReset":"This will clear the whole canvas. Are you sure?","couldNotCreateShareableLink":"Couldn\'t create shareable link.","couldNotCreateShareableLinkTooBig":"Couldn\'t create shareable link: the scene is too big","couldNotLoadInvalidFile":"Couldn\'t load invalid file","importBackendFailed":"Importing from backend failed.","cannotExportEmptyCanvas":"Cannot export empty canvas.","couldNotCopyToClipboard":"Couldn\'t copy to clipboard.","decryptFailed":"Couldn\'t decrypt data.","uploadedSecurly":"The upload has been secured with end-to-end encryption, which means that Excalidraw server and third parties can\'t read the content.","loadSceneOverridePrompt":"Loading external drawing will replace your existing content. Do you wish to continue?","collabStopOverridePrompt":"Stopping the session will overwrite your previous, locally stored drawing. Are you sure?\\n\\n(If you want to keep your local drawing, simply close the browser tab instead.)","errorAddingToLibrary":"Couldn\'t add item to the library","errorRemovingFromLibrary":"Couldn\'t remove item from the library","confirmAddLibrary":"This will add {{numShapes}} shape(s) to your library. Are you sure?","imageDoesNotContainScene":"This image does not seem to contain any scene data. Have you enabled scene embedding during export?","cannotRestoreFromImage":"Scene couldn\'t be restored from this image file","invalidSceneUrl":"Couldn\'t import scene from the supplied URL. It\'s either malformed, or doesn\'t contain valid Excalidraw JSON data.","resetLibrary":"This will clear your library. Are you sure?","removeItemsFromsLibrary":"Delete {{count}} item(s) from library?","invalidEncryptionKey":"Encryption key must be of 22 characters. Live collaboration is disabled.","collabOfflineWarning":"No internet connection available.\\nYour changes will not be saved!"},"errors":{"unsupportedFileType":"Unsupported file type.","imageInsertError":"Couldn\'t insert image. Try again later...","fileTooBig":"File is too big. Maximum allowed size is {{maxSize}}.","svgImageInsertError":"Couldn\'t insert SVG image. The SVG markup looks invalid.","invalidSVGString":"Invalid SVG.","cannotResolveCollabServer":"Couldn\'t connect to the collab server. Please reload the page and try again.","importLibraryError":"Couldn\'t load library","collabSaveFailed":"Couldn\'t save to the backend database. If problems persist, you should save your file locally to ensure you don\'t lose your work.","collabSaveFailed_sizeExceeded":"Couldn\'t save to the backend database, the canvas seems to be too big. You should save the file locally to ensure you don\'t lose your work.","brave_measure_text_error":{"line1":"Looks like you are using Brave browser with the \x3cbold\x3eAggressively Block Fingerprinting\x3c/bold\x3e setting enabled.","line2":"This could result in breaking the \x3cbold\x3eText Elements\x3c/bold\x3e in your drawings.","line3":"We strongly recommend disabling this setting. You can follow \x3clink\x3ethese steps\x3c/link\x3e on how to do so.","line4":"If disabling this setting doesn\'t fix the display of text elements, please open an \x3cissueLink\x3eissue\x3c/issueLink\x3e on our GitHub, or write us on \x3cdiscordLink\x3eDiscord\x3c/discordLink\x3e"},"libraryElementTypeError":{"embeddable":"Embeddable elements cannot be added to the library.","image":"Support for adding images to the library coming soon!"}},"toolBar":{"selection":"Selection","image":"Insert image","rectangle":"Rectangle","diamond":"Diamond","ellipse":"Ellipse","arrow":"Arrow","line":"Line","freedraw":"Draw","text":"Text","library":"Library","lock":"Keep selected tool active after drawing","penMode":"Pen mode - prevent touch","link":"Add/ Update link for a selected shape","eraser":"Eraser","frame":"Frame tool","embeddable":"Web Embed","hand":"Hand (panning tool)","extraTools":"More tools"},"headings":{"canvasActions":"Canvas actions","selectedShapeActions":"Selected shape actions","shapes":"Shapes"},"hints":{"canvasPanning":"To move canvas, hold mouse wheel or spacebar while dragging, or use the hand tool","linearElement":"Click to start multiple points, drag for single line","freeDraw":"Click and drag, release when you\'re finished","text":"Tip: you can also add text by double-clicking anywhere with the selection tool","embeddable":"Click-drag to create a website embed","text_selected":"Double-click or press ENTER to edit text","text_editing":"Press Escape or CtrlOrCmd+ENTER to finish editing","linearElementMulti":"Click on last point or press Escape or Enter to finish","lockAngle":"You can constrain angle by holding SHIFT","resize":"You can constrain proportions by holding SHIFT while resizing,\\nhold ALT to resize from the center","resizeImage":"You can resize freely by holding SHIFT,\\nhold ALT to resize from the center","rotate":"You can constrain angles by holding SHIFT while rotating","lineEditor_info":"Hold CtrlOrCmd and Double-click or press CtrlOrCmd + Enter to edit points","lineEditor_pointSelected":"Press Delete to remove point(s),\\nCtrlOrCmd+D to duplicate, or drag to move","lineEditor_nothingSelected":"Select a point to edit (hold SHIFT to select multiple),\\nor hold Alt and click to add new points","placeImage":"Click to place the image, or click and drag to set its size manually","publishLibrary":"Publish your own library","bindTextToElement":"Press enter to add text","deepBoxSelect":"Hold CtrlOrCmd to deep select, and to prevent dragging","eraserRevert":"Hold Alt to revert the elements marked for deletion","firefox_clipboard_write":"This feature can likely be enabled by setting the \\"dom.events.asyncClipboard.clipboardItem\\" flag to \\"true\\". To change the browser flags in Firefox, visit the \\"about:config\\" page.","disableSnapping":"Hold CtrlOrCmd to disable snapping"},"canvasError":{"cannotShowPreview":"Cannot show preview","canvasTooBig":"The canvas may be too big.","canvasTooBigTip":"Tip: try moving the farthest elements a bit closer together."},"errorSplash":{"headingMain":"Encountered an error. Try \x3cbutton\x3ereloading the page\x3c/button\x3e.","clearCanvasMessage":"If reloading doesn\'t work, try \x3cbutton\x3eclearing the canvas\x3c/button\x3e.","clearCanvasCaveat":" This will result in loss of work ","trackedToSentry":"The error with identifier {{eventId}} was tracked on our system.","openIssueMessage":"We were very cautious not to include your scene information on the error. If your scene is not private, please consider following up on our \x3cbutton\x3ebug tracker\x3c/button\x3e. Please include information below by copying and pasting into the GitHub issue.","sceneContent":"Scene content:"},"roomDialog":{"desc_intro":"You can invite people to your current scene to collaborate with you.","desc_privacy":"Don\'t worry, the session uses end-to-end encryption, so whatever you draw will stay private. Not even our server will be able to see what you come up with.","button_startSession":"Start session","button_stopSession":"Stop session","desc_inProgressIntro":"Live-collaboration session is now in progress.","desc_shareLink":"Share this link with anyone you want to collaborate with:","desc_exitSession":"Stopping the session will disconnect you from the room, but you\'ll be able to continue working with the scene, locally. Note that this won\'t affect other people, and they\'ll still be able to collaborate on their version.","shareTitle":"Join a live collaboration session on Excalidraw"},"errorDialog":{"title":"Error"},"exportDialog":{"disk_title":"Save to disk","disk_details":"Export the scene data to a file from which you can import later.","disk_button":"Save to file","link_title":"Shareable link","link_details":"Export as a read-only link.","link_button":"Export to Link","excalidrawplus_description":"Save the scene to your Excalidraw+ workspace.","excalidrawplus_button":"Export","excalidrawplus_exportError":"Couldn\'t export to Excalidraw+ at this moment..."},"helpDialog":{"blog":"Read our blog","click":"click","deepSelect":"Deep select","deepBoxSelect":"Deep select within box, and prevent dragging","curvedArrow":"Curved arrow","curvedLine":"Curved line","documentation":"Documentation","doubleClick":"double-click","drag":"drag","editor":"Editor","editLineArrowPoints":"Edit line/arrow points","editText":"Edit text / add label","github":"Found an issue? Submit","howto":"Follow our guides","or":"or","preventBinding":"Prevent arrow binding","tools":"Tools","shortcuts":"Keyboard shortcuts","textFinish":"Finish editing (text editor)","textNewLine":"Add new line (text editor)","title":"Help","view":"View","zoomToFit":"Zoom to fit all elements","zoomToSelection":"Zoom to selection","toggleElementLock":"Lock/unlock selection","movePageUpDown":"Move page up/down","movePageLeftRight":"Move page left/right"},"clearCanvasDialog":{"title":"Clear canvas"},"publishDialog":{"title":"Publish library","itemName":"Item name","authorName":"Author name","githubUsername":"GitHub username","twitterUsername":"Twitter username","libraryName":"Library name","libraryDesc":"Library description","website":"Website","placeholder":{"authorName":"Your name or username","libraryName":"Name of your library","libraryDesc":"Description of your library to help people understand its usage","githubHandle":"GitHub handle (optional), so you can edit the library once submitted for review","twitterHandle":"Twitter username (optional), so we know who to credit when promoting over Twitter","website":"Link to your personal website or elsewhere (optional)"},"errors":{"required":"Required","website":"Enter a valid URL"},"noteDescription":"Submit your library to be included in the \x3clink\x3epublic library repository\x3c/link\x3e for other people to use in their drawings.","noteGuidelines":"The library needs to be manually approved first. Please read the \x3clink\x3eguidelines\x3c/link\x3e before submitting. You will need a GitHub account to communicate and make changes if requested, but it is not strictly required.","noteLicense":"By submitting, you agree the library will be published under the \x3clink\x3eMIT License\x3c/link\x3e, which in short means anyone can use them without restrictions.","noteItems":"Each library item must have its own name so it\'s filterable. The following library items will be included:","atleastOneLibItem":"Please select at least one library item to get started","republishWarning":"Note: some of the selected items are marked as already published/submitted. You should only resubmit items when updating an existing library or submission."},"publishSuccessDialog":{"title":"Library submitted","content":"Thank you {{authorName}}. Your library has been submitted for review. You can track the status \x3clink\x3ehere\x3c/link\x3e"},"confirmDialog":{"resetLibrary":"Reset library","removeItemsFromLib":"Remove selected items from library"},"imageExportDialog":{"header":"Export image","label":{"withBackground":"Background","onlySelected":"Only selected","darkMode":"Dark mode","embedScene":"Embed scene","scale":"Scale","padding":"Padding"},"tooltip":{"embedScene":"Scene data will be saved into the exported PNG/SVG file so that the scene can be restored from it.\\nWill increase exported file size."},"title":{"exportToPng":"Export to PNG","exportToSvg":"Export to SVG","copyPngToClipboard":"Copy PNG to clipboard"},"button":{"exportToPng":"PNG","exportToSvg":"SVG","copyPngToClipboard":"Copy to clipboard"}},"encrypted":{"tooltip":"Your drawings are end-to-end encrypted so Excalidraw\'s servers will never see them.","link":"Blog post on end-to-end encryption in Excalidraw"},"stats":{"angle":"Angle","element":"Element","elements":"Elements","height":"Height","scene":"Scene","selected":"Selected","storage":"Storage","title":"Stats for nerds","total":"Total","version":"Version","versionCopy":"Click to copy","versionNotAvailable":"Version not available","width":"Width"},"toast":{"addedToLibrary":"Added to library","copyStyles":"Copied styles.","copyToClipboard":"Copied to clipboard.","copyToClipboardAsPng":"Copied {{exportSelection}} to clipboard as PNG\\n({{exportColorScheme}})","fileSaved":"File saved.","fileSavedToFilename":"Saved to {filename}","canvas":"canvas","selection":"selection","pasteAsSingleElement":"Use {{shortcut}} to paste as a single element,\\nor paste into an existing text editor","unableToEmbed":"Embedding this url is currently not allowed. Raise an issue on GitHub to request the url whitelisted","unrecognizedLinkFormat":"The link you embedded does not match the expected format. Please try to paste the \'embed\' string provided by the source site"},"colors":{"transparent":"Transparent","black":"Black","white":"White","red":"Red","pink":"Pink","grape":"Grape","violet":"Violet","gray":"Gray","blue":"Blue","cyan":"Cyan","teal":"Teal","green":"Green","yellow":"Yellow","orange":"Orange","bronze":"Bronze"},"welcomeScreen":{"app":{"center_heading":"All your data is saved locally in your browser.","center_heading_plus":"Did you want to go to the Excalidraw+ instead?","menuHint":"Export, preferences, languages, ..."},"defaults":{"menuHint":"Export, preferences, and more...","center_heading":"Diagrams. Made. Simple.","toolbarHint":"Pick a tool \x26 Start drawing!","helpHint":"Shortcuts \x26 help"}},"colorPicker":{"mostUsedCustomColors":"Most used custom colors","colors":"Colors","shades":"Shades","hexCode":"Hex code","noShades":"No shades available for this color"},"overwriteConfirm":{"action":{"exportToImage":{"title":"Export as image","button":"Export as image","description":"Export the scene data as an image from which you can import later."},"saveToDisk":{"title":"Save to disk","button":"Save to disk","description":"Export the scene data to a file from which you can import later."},"excalidrawPlus":{"title":"Excalidraw+","button":"Export to Excalidraw+","description":"Save the scene to your Excalidraw+ workspace."}},"modal":{"loadFromFile":{"title":"Load from file","button":"Load from file","description":"Loading from a file will \x3cbold\x3ereplace your existing content\x3c/bold\x3e.\x3cbr\x3e\x3c/br\x3eYou can back up your drawing first using one of the options below."},"shareableLink":{"title":"Load from link","button":"Replace my content","description":"Loading external drawing will \x3cbold\x3ereplace your existing content\x3c/bold\x3e.\x3cbr\x3e\x3c/br\x3eYou can back up your drawing first by using one of the options below."}}}}')},
4451:function(g){g.exports=JSON.parse('{"ar-SA":79,"az-AZ":20,"bg-BG":54,"bn-BD":59,"ca-ES":87,"cs-CZ":98,"da-DK":33,"de-DE":100,"el-GR":92,"en":100,"es-ES":88,"eu-ES":100,"fa-IR":88,"fi-FI":87,"fr-FR":88,"gl-ES":88,"he-IL":86,"hi-IN":77,"hu-HU":76,"id-ID":94,"it-IT":98,"ja-JP":88,"kaa":18,"kab-KAB":87,"kk-KZ":21,"km-KH":94,"ko-KR":100,"ku-TR":100,"lt-LT":55,"lv-LV":88,"mr-IN":95,"my-MM":40,"nb-NO":100,"nl-NL":83,"nn-NO":76,"oc-FR":86,"pa-IN":89,"pl-PL":98,"pt-BR":98,"pt-PT":94,"ro-RO":98,"ru-RU":98,"si-LK":9,"sk-SK":98,"sl-SI":100,"sv-SE":100,"ta-IN":84,"th-TH":38,"tr-TR":86,"uk-UA":96,"vi-VN":56,"zh-CN":100,"zh-HK":25,"zh-TW":100}')}},
A={};q.m=u;q.n=function(g){var h=g&&g.__esModule?function(){return g.default}:function(){return g};return q.d(h,{a:h}),h};var z=Object.getPrototypeOf?function(g){return Object.getPrototypeOf(g)}:function(g){return g.__proto__};q.t=function(g,h){if((1&h&&(g=this(g)),8&h)||"object"==typeof g&&g&&(4&h&&g.__esModule||16&h&&"function"==typeof g.then))return g;var b=Object.create(null);q.r(b);var l={};c=c||[null,z({}),z([]),z(z)];for(h=2&h&&g;"object"==typeof h&&!~c.indexOf(h);h=z(h))Object.getOwnPropertyNames(h).forEach(function(m){l[m]=
function(){return g[m]}});return l.default=function(){return g},q.d(b,l),b};q.d=function(g,h){for(var b in h)q.o(h,b)&&!q.o(g,b)&&Object.defineProperty(g,b,{enumerable:!0,get:h[b]})};q.f={};q.e=function(g){return Promise.all(Object.keys(q.f).reduce(function(h,b){return q.f[b](g,h),h},[]))};q.u=function(g){return"excalidraw-assets/"+{22:"locales/kk-KZ-json",537:"locales/th-TH-json",663:"locales/kaa-json",1204:"locales/ja-JP-json",1302:"locales/si-LK-json",1477:"locales/my-MM-json",1513:"locales/el-GR-json",
1628:"locales/bg-BG-json",1690:"locales/oc-FR-json",1790:"locales/da-DK-json",2091:"locales/ar-SA-json",2312:"locales/he-IL-json",2359:"locales/nb-NO-json",2404:"locales/ta-IN-json",2943:"locales/gl-ES-json",3024:"locales/nl-NL-json",3031:"locales/ku-TR-json",3082:"locales/de-DE-json",3162:"locales/pa-IN-json",3397:"locales/mr-IN-json",3421:"locales/zh-TW-json",3512:"locales/fi-FI-json",3674:"locales/pl-PL-json",3682:"locales/fr-FR-json",3721:"locales/pt-BR-json",3808:"locales/id-ID-json",3885:"locales/nn-NO-json",
4E3:"locales/vi-VN-json",4568:"locales/az-AZ-json",4680:"locales/zh-CN-json",4736:"vendor",4977:"locales/tr-TR-json",5089:"locales/ro-RO-json",5130:"locales/ca-ES-json",5330:"locales/fa-IR-json",5395:"locales/pt-PT-json",6071:"locales/sl-SI-json",6239:"locales/it-IT-json",6265:"locales/cs-CZ-json",6566:"locales/km-KH-json",6768:"locales/lv-LV-json",6844:"locales/ko-KR-json",7368:"locales/hu-HU-json",7429:"locales/bn-BD-json",7759:"locales/uk-UA-json",7920:"locales/zh-HK-json",8081:"locales/eu-ES-json",
8124:"locales/ru-RU-json",8340:"locales/lt-LT-json",8534:"locales/sv-SE-json",8750:"locales/sk-SK-json",8759:"locales/es-ES-json",9551:"locales/kab-KAB-json",9828:"locales/hi-IN-json"}[g]+"-"+{22:"f648362328b839e9313f",537:"4cbe42d56e0a6f261769",663:"b2f03ae2f239b9fae304",1204:"b7b0079dca8ece2551c7",1302:"674ece30d49390e45733",1477:"c3cff6d30b1e629f546f",1513:"8cc1609bd088ec4f197a",1628:"ff5ef83d3c2706367417",1690:"925326d13bc187dcd377",1790:"ac982a0c1e02b45f9500",2091:"b9c75e6743e089f51f9b",2312:"2e5cea590dd00f76b42f",
2359:"75cfab63ad7c2ff45f19",2404:"f59f50c4b8f2b2fee8ca",2943:"8408403b5df17158e269",3024:"90ef39ed303967aeb9c2",3031:"374bbbb0b003a490681d",3082:"a3222d8a9ed4864ccedf",3162:"d9ee09801ed220840b2b",3397:"05294735c64b63223d8e",3421:"3fcc3dcef74999ea3757",3512:"7250174bb3682c3ee602",3674:"9a1b0b7262cd86ab734f",3682:"f82759a1bc767e0889bd",3721:"62a1095dd13343b61194",3808:"0e69caf5d919807ed234",3885:"1a8db0d8c3717d895cc5",4E3:"cbbaff972778abc0e34b",4568:"32268e2c7ad89fce5d2c",4680:"62d636303447fe79db54",
4736:"ef3c5d81a00ef582b871",4977:"eb07e9699c26fef02345",5089:"162b57c475da796d5a5b",5130:"d4a1f01f8c174c315974",5330:"abcad5d329ac9558750e",5395:"cc517eed349ce432b054",6071:"826580e1006547dbbd3b",6239:"a1526e95ebe4c2156ffb",6265:"ff1b9bbfe92356698245",6566:"920cbd8cb9ea3c2ce631",6768:"c811870330575e53285c",6844:"e5f26d9854a5d68ada0a",7368:"1b5028b3a2676b3e7bde",7429:"f9b1344b2f5c0ab53ce8",7759:"a48bb2e866a11d396a35",7920:"19e6814bddb06e0dd6e3",8081:"f9efd2bf2555bceb526a",8124:"cfc347872e181d1335a7",
8340:"9caac0d3530651221c75",8534:"84a855efd030e37f51ab",8750:"8edebc008b63305c87e1",8759:"4f3da97feff33cb00e6d",9551:"e8618205ea49417e5fb4",9828:"3898c9c1216b44476529"}[g]+".js"};q.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||(new Function("return this"))()}catch(g){if("object"==typeof window)return window}}();q.o=function(g,h){return Object.prototype.hasOwnProperty.call(g,h)};var C={};q.l=function(g,h,b,l){if(C[g])C[g].push(h);else{var m;if(void 0!==b){l=document.getElementsByTagName("script");
for(var p=0;p<l.length;p++){var D=l[p];if(D.getAttribute("src")==g||D.getAttribute("data-webpack")=="ExcalidrawLib:"+b){var v=D;break}}}v||(m=!0,(v=document.createElement("script")).charset="utf-8",v.timeout=120,q.nc&&v.setAttribute("nonce",q.nc),v.setAttribute("data-webpack","ExcalidrawLib:"+b),v.src=g);C[g]=[h];h=function(r,f){v.onerror=v.onload=null;clearTimeout(t);var E=C[g];if(delete C[g],v.parentNode&&v.parentNode.removeChild(v),E&&E.forEach(function(B){return B(f)}),r)return r(f)};var t=setTimeout(h.bind(null,
void 0,{type:"timeout",target:v}),12E4);v.onerror=h.bind(null,v.onerror);v.onload=h.bind(null,v.onload);m&&document.head.appendChild(v)}};q.r=function(g){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(g,Symbol.toStringTag,{value:"Module"});Object.defineProperty(g,"__esModule",{value:!0})};q.p="";(function(){q.b=document.baseURI||self.location.href;var g={1388:0};q.f.j=function(l,m){var p=q.o(g,l)?g[l]:void 0;if(0!==p)if(p)m.push(p[2]);else{var D=new Promise(function(t,r){p=
g[l]=[t,r]});m.push(p[2]=D);m=q.p+q.u(l);var v=Error();q.l(m,function(t){if(q.o(g,l)&&(0!==(p=g[l])&&(g[l]=void 0),p)){var r=t&&("load"===t.type?"missing":t.type);t=t&&t.target&&t.target.src;v.message="Loading chunk "+l+" failed.\n("+r+": "+t+")";v.name="ChunkLoadError";v.type=r;v.request=t;p[1](v)}},"chunk-"+l,l)}};var h=function(l,m){var p,D=m[0],v=m[1],t=m[2],r=0;if(D.some(function(f){return 0!==g[f]})){for(p in v)q.o(v,p)&&(q.m[p]=v[p]);t&&t(q)}for(l&&l(m);r<D.length;r++)l=D[r],q.o(g,l)&&g[l]&&
g[l][0](),g[l]=0},b=self.webpackChunkExcalidrawLib=self.webpackChunkExcalidrawLib||[];b.forEach(h.bind(null,0));b.push=h.bind(null,b.push.bind(b))})();q.nc=void 0;var P={};return function(){function g(Zc,Gc){var ub=Object.keys(Zc);if(Object.getOwnPropertySymbols){var Bb=Object.getOwnPropertySymbols(Zc);Gc&&(Bb=Bb.filter(function(Eb){return Object.getOwnPropertyDescriptor(Zc,Eb).enumerable}));ub.push.apply(ub,Bb)}return ub}function h(Zc){for(var Gc=1;Gc<arguments.length;Gc++){var ub=null!=arguments[Gc]?
arguments[Gc]:{};Gc%2?g(Object(ub),!0).forEach(function(Bb){(0,Ma.Z)(Zc,Bb,ub[Bb])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Zc,Object.getOwnPropertyDescriptors(ub)):g(Object(ub)).forEach(function(Bb){Object.defineProperty(Zc,Bb,Object.getOwnPropertyDescriptor(ub,Bb))})}return Zc}function b(Zc,Gc){var ub=Object.keys(Zc);if(Object.getOwnPropertySymbols){var Bb=Object.getOwnPropertySymbols(Zc);Gc&&(Bb=Bb.filter(function(Eb){return Object.getOwnPropertyDescriptor(Zc,Eb).enumerable}));
ub.push.apply(ub,Bb)}return ub}function l(Zc){for(var Gc=1;Gc<arguments.length;Gc++){var ub=null!=arguments[Gc]?arguments[Gc]:{};Gc%2?b(Object(ub),!0).forEach(function(Bb){(0,Ma.Z)(Zc,Bb,ub[Bb])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Zc,Object.getOwnPropertyDescriptors(ub)):b(Object(ub)).forEach(function(Bb){Object.defineProperty(Zc,Bb,Object.getOwnPropertyDescriptor(ub,Bb))})}return Zc}function m(Zc,Gc){var ub=Object.keys(Zc);if(Object.getOwnPropertySymbols){var Bb=Object.getOwnPropertySymbols(Zc);
Gc&&(Bb=Bb.filter(function(Eb){return Object.getOwnPropertyDescriptor(Zc,Eb).enumerable}));ub.push.apply(ub,Bb)}return ub}function p(Zc){for(var Gc=1;Gc<arguments.length;Gc++){var ub=null!=arguments[Gc]?arguments[Gc]:{};Gc%2?m(Object(ub),!0).forEach(function(Bb){I()(Zc,Bb,ub[Bb])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Zc,Object.getOwnPropertyDescriptors(ub)):m(Object(ub)).forEach(function(Bb){Object.defineProperty(Zc,Bb,Object.getOwnPropertyDescriptor(ub,Bb))})}return Zc}q.r(P);
q.d(P,{Button:function(){return rb.z},DefaultSidebar:function(){return pf.O},Excalidraw:function(){return jc},FONT_FAMILY:function(){return D.ut},Footer:function(){return Oa},LiveCollaborationTrigger:function(){return ic},MIME_TYPES:function(){return D.LO},MainMenu:function(){return Va.Z},Sidebar:function(){return je.YE},THEME:function(){return D.C6},WelcomeScreen:function(){return db},bumpVersion:function(){return Ic.ZP},convertToExcalidrawElements:function(){return ue.w},defaultLang:function(){return ea.Fp},
exportToBlob:function(){return fd.Fl},exportToCanvas:function(){return fd.NL},exportToClipboard:function(){return fd.i1},exportToSvg:function(){return fd.$D},getFreeDrawSvgPath:function(){return fd.N7},getNonDeletedElements:function(){return Oc.Lm},getSceneVersion:function(){return Oc.Uo},isInvisiblySmallElement:function(){return Oc.QD},isLinearElement:function(){return pd.bt},languages:function(){return ea.Mj},loadFromBlob:function(){return fd.cT},loadLibraryFromBlob:function(){return fd.lV},loadSceneOrLibraryFromBlob:function(){return fd.ZY},
mergeLibraryItems:function(){return fd.zh},mutateElement:function(){return Ic.DR},newElementWith:function(){return Ic.BE},normalizeLink:function(){return qe.$u},parseLibraryTokensFromUrl:function(){return wc.Di},restore:function(){return Rc.nu},restoreAppState:function(){return Rc.lY},restoreElements:function(){return Rc.ET},restoreLibraryItems:function(){return Rc.wJ},sceneCoordsToViewportCoords:function(){return xa._i},serializeAsJSON:function(){return fd.I_},serializeLibraryAsJSON:function(){return fd.NI},
useDevice:function(){return ta.Fy},useHandleLibrary:function(){return wc.xS},useI18n:function(){return ea.QT},viewportCoordsToSceneCoords:function(){return xa.dE}});var D=q(7041);"production"!==D.Vi.TEST&&(q.p=window.EXCALIDRAW_ASSET_PATH||"https://unpkg.com/".concat("@excalidraw/excalidraw","@").concat("0.16.1","/dist/"));var v=q(3379),t=q.n(v),r=q(7795),f=q.n(r),E=q(569),B=q.n(E),J=q(3565),V=q.n(J),H=q(9216),S=q.n(H),L=q(4589),T=q.n(L),R=q(4295),G={};G.styleTagTransform=T();G.setAttributes=V();
G.insert=B().bind(null,"head");G.domAPI=f();G.insertStyleElement=S();t()(R.Z,G);R.Z&&R.Z.locals&&R.Z.locals;var F=q(6479),O=q.n(F),M=q(9713),I=q.n(M),ia=q(9787),U=q.n(ia),Z=q(8950),aa=q(2577),W=q(2975),fa=q.n(W),X=q(9507),ea=q(8557),pa=q(4512),va=function(Zc){var Gc=(0,ia.useState)(!0);Gc=(0,aa.Z)(Gc,2);var ub=Gc[0],Bb=Gc[1];return(0,ia.useEffect)(function(){var Eb=function(){var Ud=(0,Z.Z)(fa().mark(function Ue(){return fa().wrap(function(kb){for(;;)switch(kb.prev=kb.next){case 0:return kb.next=
2,(0,ea.m0)(hd);case 2:Bb(!1);case 3:case "end":return kb.stop()}},Ue)}));return function(){return Ud.apply(this,arguments)}}(),hd=ea.Mj.find(function(Ud){return Ud.code===Zc.langCode})||ea.Fp;Eb()},[Zc.langCode]),ub?(0,pa.jsx)(X.z,{theme:Zc.theme}):Zc.children},ta=q(3470),xa=q(7135),Ga=q(9915),Ia={};Ia.styleTagTransform=T();Ia.setAttributes=V();Ia.insert=B().bind(null,"head");Ia.domAPI=f();Ia.insertStyleElement=S();t()(Ga.Z,Ia);Ga.Z&&Ga.Z.locals&&Ga.Z.locals;var Ya=q(9310),Fa={};Fa.styleTagTransform=
T();Fa.setAttributes=V();Fa.insert=B().bind(null,"head");Fa.domAPI=f();Fa.insertStyleElement=S();t()(Ya.Z,Fa);Ya.Z&&Ya.Z.locals&&Ya.Z.locals;var Ka=q(3607),Ba=q(593),la=q(45),ka=q(5371),ua=q(8793),na={};na.styleTagTransform=T();na.setAttributes=V();na.insert=B().bind(null,"head");na.domAPI=f();na.insertStyleElement=S();t()(ua.Z,na);ua.Z&&ua.Z.locals&&ua.Z.locals;var oa=q(5990),La=function(Zc){Zc=Zc.children;var Gc=(0,ka.R6)().FooterCenterTunnel,ub=(0,oa.I)();return(0,pa.jsx)(Gc.In,{children:(0,pa.jsx)("div",
{className:(0,la.Z)("footer-center zen-mode-transition",{"layer-ui__wrapper__footer-left--transition-bottom":ub.zenModeEnabled}),children:Zc})})},Oa=La;La.displayName="FooterCenter";var Va=q(3013),Ma=q(7169),Ua=q(2726),ib=q(7903),vb=q(6445),yb=q(1119),Wa=q(5744),hb={};hb.styleTagTransform=T();hb.setAttributes=V();hb.insert=B().bind(null,"head");hb.domAPI=f();hb.insertStyleElement=S();t()(Wa.Z,hb);Wa.Z&&Wa.Z.locals&&Wa.Z.locals;var ab=function(){return(0,pa.jsx)("svg",{viewBox:"0 0 40 40",fill:"none",
xmlns:"http://www.w3.org/2000/svg",className:"ExcalidrawLogo-icon",children:(0,pa.jsx)("path",{d:"M39.9 32.889a.326.326 0 0 0-.279-.056c-2.094-3.083-4.774-6-7.343-8.833l-.419-.472a.212.212 0 0 0-.056-.139.586.586 0 0 0-.167-.111l-.084-.083-.056-.056c-.084-.167-.28-.278-.475-.167-.782.39-1.507.973-2.206 1.528-.92.722-1.842 1.445-2.708 2.25a8.405 8.405 0 0 0-.977 1.028c-.14.194-.028.361.14.444-.615.611-1.23 1.223-1.843 1.861a.315.315 0 0 0-.084.223c0 .083.056.166.111.194l1.09.833v.028c1.535 1.528 4.244 3.611 7.12 5.861.418.334.865.667 1.284 1 .195.223.39.473.558.695.084.11.28.139.391.055.056.056.14.111.196.167a.398.398 0 0 0 .167.056.255.255 0 0 0 .224-.111.394.394 0 0 0 .055-.167c.029 0 .028.028.056.028a.318.318 0 0 0 .224-.084l5.082-5.528a.309.309 0 0 0 0-.444Zm-14.63-1.917a.485.485 0 0 0 .111.14c.586.5 1.2 1 1.843 1.555l-2.569-1.945-.251-.166c-.056-.028-.112-.084-.168-.111l-.195-.167.056-.056.055-.055.112-.111c.866-.861 2.346-2.306 3.1-3.028-.81.805-2.43 3.167-2.095 3.944Zm8.767 6.89-2.122-1.612a44.713 44.713 0 0 0-2.625-2.5c1.145.861 2.122 1.611 2.262 1.75 1.117.972 1.06.806 1.815 1.445l.921.666a1.06 1.06 0 0 1-.251.25Zm.558.416-.056-.028c.084-.055.168-.111.252-.194l-.196.222ZM1.089 5.75c.055.361.14.722.195 1.056.335 1.833.67 3.5 1.284 4.75l.252.944c.084.361.223.806.363.917 1.424 1.25 3.602 3.11 5.947 4.889a.295.295 0 0 0 .363 0s0 .027.028.027a.254.254 0 0 0 .196.084.318.318 0 0 0 .223-.084c2.988-3.305 5.221-6.027 6.813-8.305.112-.111.14-.278.14-.417.111-.111.195-.25.307-.333.111-.111.111-.306 0-.39l-.028-.027c0-.055-.028-.139-.084-.167-.698-.666-1.2-1.138-1.731-1.638-.922-.862-1.871-1.75-3.881-3.75l-.028-.028c-.028-.028-.056-.056-.112-.056-.558-.194-1.703-.389-3.127-.639C6.087 2.223 3.21 1.723.614.944c0 0-.168 0-.196.028l-.083.084c-.028.027-.056.055-.224.11h.056-.056c.028.167.028.278.084.473 0 .055.112.5.112.555l.782 3.556Zm15.496 3.278-.335-.334c.084.112.196.195.335.334Zm-3.546 4.666-.056.056c0-.028.028-.056.056-.056Zm-2.038-10c.168.167.866.834 1.033.973-.726-.334-2.54-1.167-3.379-1.445.838.167 1.983.334 2.346.472ZM1.424 2.306c.419.722.754 3.222 1.089 5.666-.196-.778-.335-1.555-.503-2.278-.251-1.277-.503-2.416-.838-3.416.056 0 .14 0 .252.028Zm-.168-.584c-.112 0-.223-.028-.307-.028 0-.027 0-.055-.028-.055.14 0 .223.028.335.083Zm-1.089.222c0-.027 0-.027 0 0ZM39.453 1.333c.028-.11-.558-.61-.363-.639.42-.027.42-.666 0-.666-.558.028-1.144.166-1.675.25-.977.194-1.982.389-2.96.61-2.205.473-4.383.973-6.561 1.557-.67.194-1.424.333-2.066.666-.224.111-.196.333-.084.472-.056.028-.084.028-.14.056-.195.028-.363.056-.558.083-.168.028-.252.167-.224.334 0 .027.028.083.028.11-1.173 1.556-2.485 3.195-3.909 4.945-1.396 1.611-2.876 3.306-4.356 5.056-4.719 5.5-10.052 11.75-15.943 17.25a.268.268 0 0 0 0 .389c.028.027.056.055.084.055-.084.084-.168.14-.252.222-.056.056-.084.111-.084.167a.605.605 0 0 0-.111.139c-.112.111-.112.305.028.389.111.11.307.11.39-.028.029-.028.029-.056.056-.056a.44.44 0 0 1 .615 0c.335.362.67.723.977 1.028l-.698-.583c-.112-.111-.307-.083-.39.028-.113.11-.085.305.027.389l7.427 6.194c.056.056.112.056.196.056s.14-.028.195-.084l.168-.166c.028.027.083.027.111.027.084 0 .14-.027.196-.083 10.052-10.055 18.15-17.639 27.42-24.417.083-.055.111-.166.111-.25.112 0 .196-.083.251-.194 1.704-5.194 2.039-9.806 2.15-12.083v-.028c0-.028.028-.056.028-.083.028-.056.028-.084.028-.084a1.626 1.626 0 0 0-.111-1.028ZM21.472 9.5c.446-.5.893-1.028 1.34-1.5-2.876 3.778-7.65 9.583-14.408 16.5 4.607-5.083 9.242-10.333 13.068-15ZM5.193 35.778h.084-.084Zm3.462 3.194c-.027-.028-.027-.028 0-.028v.028Zm4.16-3.583c.224-.25.448-.472.699-.722 0 0 0 .027.028.027-.252.223-.475.445-.726.695Zm1.146-1.111c.14-.14.279-.334.446-.5l.028-.028c1.648-1.694 3.351-3.389 5.082-5.111l.028-.028c.419-.333.921-.694 1.368-1.028a379.003 379.003 0 0 0-6.952 6.695ZM24.794 6.472c-.921 1.195-1.954 2.778-2.82 4.028-2.736 3.944-11.532 13.583-11.727 13.75a1976.983 1976.983 0 0 1-8.042 7.639l-.167.167c-.14-.167-.14-.417.028-.556C14.49 19.861 22.03 10.167 25.074 5.917c-.084.194-.14.36-.28.555Zm4.83 5.695c-1.116-.64-1.646-1.64-1.34-2.611l.084-.334c.028-.083.084-.194.14-.277.307-.5.754-.917 1.257-1.167.027 0 .055 0 .083-.028-.028-.056-.028-.139-.028-.222.028-.167.14-.278.335-.278.335 0 1.369.306 1.76.639.111.083.223.194.335.305.14.167.363.445.474.667.056.028.112.306.196.445.056.222.111.472.084.694-.028.028 0 .194-.028.194a2.668 2.668 0 0 1-.363 1.028c-.028.028-.028.056-.056.084l-.028.027c-.14.223-.335.417-.53.556-.643.444-1.369.583-2.095.389 0 0-.195-.084-.28-.111Zm8.154-.834a39.098 39.098 0 0 1-.893 3.167c0 .028-.028.083 0 .111-.056 0-.084.028-.14.056-2.206 1.61-4.356 3.305-6.506 5.028 1.843-1.64 3.686-3.306 5.613-4.945.558-.5.949-1.139 1.06-1.861l.28-1.667v-.055c.14-.334.67-.195.586.166Z",
fill:"currentColor"})})},Qa=function(){return(0,pa.jsxs)("svg",{viewBox:"0 0 450 55",xmlns:"http://www.w3.org/2000/svg",fill:"none",className:"ExcalidrawLogo-text",children:[(0,pa.jsx)("path",{d:"M429.27 96.74c2.47-1.39 4.78-3.02 6.83-4.95 1.43-1.35 2.73-2.86 3.81-4.51-.66.9-1.4 1.77-2.23 2.59-2.91 2.84-5.72 5.09-8.42 6.87h.01ZM343.6 69.36c.33 3.13.58 6.27.79 9.4.09 1.37.18 2.75.25 4.12-.12-4.46-.27-8.93-.5-13.39-.11-2.08-.24-4.16-.4-6.24-.06 1.79-.11 3.85-.13 6.11h-.01ZM378.47 98.34c.01-.37.07-1.13.01-6.51-.11 1.9-.22 3.81-.31 5.71-.07 1.42-.22 2.91-.16 4.35.39.03.78.07 1.17.1-.92-.85-.76-2.01-.72-3.66l.01.01ZM344.09 86.12c-.09-2.41-.22-4.83-.39-7.24v12.21c.15-.05.32-.09.47-.14.05-1.61-.03-3.23-.09-4.83h.01ZM440.69 66.79c-.22-.34-.45-.67-.69-.99-3.71-4.87-9.91-7.14-15.65-8.55-1.05-.26-2.12-.49-3.18-.71 2.29.59 4.48 1.26 6.64 2.02 7.19 2.54 10.57 5.41 12.88 8.23ZM305.09 72.46l1.2 3.6c.84 2.53 1.67 5.06 2.46 7.61.24.78.5 1.57.73 2.36.22-.04.44-.08.67-.12a776.9 776.9 0 0 1-5.01-13.57c-.02.04-.03.09-.05.13v-.01ZM345.49 90.25v.31c1.48-.42 3.05-.83 4.66-1.2-1.56.25-3.12.52-4.66.89ZM371.02 90.22c0-.57-.04-1.14-.11-1.71-.06-.02-.12-.04-.19-.05-.21-.05-.43-.08-.65-.11.42.16.74.88.95 1.87ZM398.93 54.23c-.13 0-.27-.01-.4-.02l.03.4c.11-.15.23-.27.37-.38ZM401.57 62.28v-.15c-1.22-.24-2.86-.61-3.23-1.25-.09-.15-.18-.51-.27-.98-.09.37-.2.73-.33 1.09 1.24.56 2.52.98 3.83 1.29ZM421.73 88.68c-2.97 1.65-6.28 3.12-9.69 3.68v.18c4.72-.14 11.63-3.85 16.33-8.38-2.04 1.75-4.33 3.24-6.63 4.53l-.01-.01ZM411.28 80.92c-.05-1.2-.09-2.4-.15-3.6-.21 5.66-.46 11.38-.47 14.51.24-.02.48-.04.71-.07.15-3.61.05-7.23-.09-10.83v-.01Z",
transform:"translate(-144.023 -51.76)"}),(0,pa.jsx)("path",{d:"M425.38 67.41c-3.5-1.45-7.19-2.57-14.06-3.62.09 1.97.06 4.88-.03 8.12.03.04.06.09.06.15.19 1.36.28 2.73.37 4.1.25 3.77.39 7.55.41 11.33 0 1.38-.01 2.76-.07 4.13 1.4-.25 2.78-.65 4.12-1.15 4.07-1.5 7.94-3.78 11.28-6.54 2.33-1.92 5.13-4.49 5.88-7.58.63-3.53-2.45-6.68-7.97-8.96l.01.02ZM411.35 92.53v-.06l-.34.03c.11.01.22.03.34.03ZM314.26 64.06c-.23-.59-.47-1.17-.7-1.75.57 1.62 1.11 3.25 1.6 4.9l.15.54 2.35 6.05c.32.82.66 1.64.98 2.46-1.38-4.1-2.83-8.17-4.39-12.2h.01ZM156.82 103.07c-.18.13-.38.23-.58.33 1.32-.03 2.66-.2 3.93-.34.86-.09 1.72-.22 2.58-.33-2.12.1-4.12.17-5.94.34h.01ZM210.14 68.88s.03.04.05.07c.18-.31.39-.64.58-.96-.21.3-.42.6-.64.89h.01ZM201.65 82.8c-.5.77-1.02 1.56-1.49 2.37 1.11-1.55 2.21-3.1 3.2-4.59-.23.23-.49.51-.75.79-.32.47-.65.95-.96 1.43ZM194.03 98.66c-.33-.4-.65-.84-1.05-1.17-.24-.2-.07-.49.17-.56-.23-.26-.42-.5-.63-.75 1.51-2.55 3.93-5.87 6.4-9.28-.17-.08-.29-.28-.2-.49.04-.09.09-.17.13-.26-1.21 1.78-2.42 3.55-3.61 5.33-.87 1.31-1.74 2.64-2.54 4-.29.5-.63 1.04-.87 1.61.81.65 1.63 1.27 2.47 1.88-.09-.11-.18-.21-.27-.32v.01ZM307.79 82.93c-1-3.17-2.05-6.32-3.1-9.48-1.62 4.08-3.69 9.17-6.16 15.19 3.32-1.04 6.77-1.87 10.27-2.5-.32-1.08-.67-2.15-1.01-3.21ZM149.5 80.7c.05-1.71.04-3.43 0-5.14-.1 2.26-.16 4.51-.22 6.77-.02.73-.03 1.46-.04 2.19.14-1.27.2-2.55.24-3.82h.02ZM228.98 98.3c.39 1.25.91 3.03.94 3.91.06-.03.12-.07.17-.1.08-1.29-.55-2.65-1.11-3.81ZM307.72 53.36c.81.5 1.53 1.04 2.07 1.49-.38-.8-.78-1.58-1.21-2.35-.17.03-.34.06-.51.11-.43.12-.86.26-1.29.41.35-.01.53.1.94.34ZM283.69 96.14c3.91-7.25 6.89-13.35 8.88-18.15l1.1-2.66c-1.27 2.64-2.56 5.27-3.83 7.9-1.53 3.15-3.06 6.31-4.58 9.47-.87 1.81-1.76 3.62-2.54 5.47.04.02.07.04.11.07.05.05.1.09.15.14.05-.73.27-1.48.71-2.24ZM289.92 103.23s-.04.01-.05.03c0-.02.04-.03.05-.04.05-.05.11-.1.16-.15l.21-.21c-.55 0-1.5-.27-2.55-.72.4.26.8.51 1.22.74.24.13.48.26.73.37.05.02.1.03.14.05a.27.27 0 0 1 .08-.07h.01ZM269.23 68.49c-.39-.19-.82-.48-1.33-.87-3.06-1.56-6.31-2.78-9.36-2.35-3.5.49-5.7 1.11-7.74 2.44 5.71-2.6 12.82-2.07 18.44.79l-.01-.01ZM177.87 53.69l1.06.03c-.96-.22-2-.25-2.89-.3-4.95-.26-9.99.33-14.86 1.19-2.44.43-4.88.95-7.28 1.59 9.09-1.76 15.69-2.77 23.97-2.51ZM219.85 55.51c-.18.12-.36.27-.56.45-.45.53-.86 1.11-1.26 1.66-1.91 2.61-3.71 5.31-5.57 7.95l-.12.18 8.05-10.11c-.18-.05-.36-.1-.55-.13h.01ZM510.71 54.1c.12-.15.29-.3.53-.45.69-.4 3.72-.63 5.87-.74-.36-.02-.73-.04-1.09-.05-1.84-.03-3.67.09-5.49.35.05.3.12.59.18.88v.01ZM510.76 86.02c1.37-3.07 2.49-6.27 3.57-9.46.55-1.64 1.12-3.3 1.6-4.97-1.59 4.01-3.67 9.14-6.2 15.3.24-.08.5-.14.74-.22.1-.22.19-.44.29-.65ZM566.95 75.76c.11-.02.23.03.31.11-.05-.13-.09-.26-.14-.39-.05.09-.11.18-.17.28ZM511.33 86.41c3.08-.89 6.24-1.62 9.46-2.14-1.51-3.98-2.98-7.96-4.39-11.87-.05.15-.09.31-.14.46-1.02 3.32-2.15 6.61-3.39 9.85-.48 1.25-.98 2.49-1.53 3.7h-.01ZM578.24 74.45c.11-.44.23-.87.35-1.31-.31.7-.64 1.39-.97 2.08.09.21.19.4.28.61.12-.46.23-.92.35-1.38h-.01ZM520.62 53.11c-.09 0-.18-.01-.28-.02.38.34.29 1.08.93 2.53l6.65 17.15c2.2 5.68 4.69 11.36 7.41 16.87l1.06 2.17c-2.95-7.05-5.92-14.08-8.87-21.13-1.58-3.79-3.16-7.59-4.7-11.4-.78-1.92-1.73-3.89-2.25-5.91-.03-.1 0-.19.04-.26h.01ZM578.78 77.87c1.45-5.77 3.07-10.43 3.58-13.36.05-.34.16-.88.31-1.55-.67 1.79-1.37 3.56-2.08 5.33-.12.43-.23.86-.35 1.29-.65 2.43-1.29 4.86-1.9 7.3.14.33.29.65.43 1l.01-.01ZM545.3 94.66c.02-.44.03-.83.05-1.12.02-1.01.05-2.02.11-3.02.03-6.66-.46-14.33-1.46-22.8-.13-.42-.27-1.24-.56-2.89 0-.02 0-.04-.01-.06.62 6.61.95 13.25 1.32 19.87.17 3.08.33 6.16.52 9.23.02.25.03.52.04.78l-.01.01ZM580.77 102.81c.13.2.27.38.37.49.27-.11.53-.22.8-.32-.43.09-.82.05-1.17-.16v-.01ZM530.48 104.07h.33c-.36-.13-.71-.32-1.04-.56.14.24.3.47.45.7.06-.08.14-.13.26-.13v-.01ZM542.63 58.82c.06.23.11.47.15.71.14-.33.36-.62.7-.86-.28.05-.57.11-.85.15ZM583.81 57.87c.15-.7.29-1.41.42-2.11-.14.45-.28.9-.42 1.34-.46 1.44-.89 2.89-1.31 4.34.44-1.19.88-2.37 1.31-3.57ZM523.62 91.48c-4.66 1.17-9.05 2.89-14.02 5.27 4.65-1.84 9.48-3.29 14.28-4.63-.09-.22-.17-.41-.26-.64ZM460.64 78.3c-.04-2.9-.11-5.81-.28-8.71-.1-1.68-.17-3.43-.5-5.09-.07.02-.14.03-.2.05.3 6.54.45 12.17.51 17.12.17-.07.34-.14.51-.2 0-1.06-.01-2.11-.03-3.17h-.01ZM470.63 63.24c-3.38-.26-6.81.32-10.1 1.1.41 2.01.47 4.14.57 6.18.18 3.55.25 7.11.27 10.67 3.31-1.38 6.5-3.12 9.3-5.35 1.96-1.56 3.86-3.41 5.02-5.66.73-1.41 1.19-3.22.26-4.65-1.09-1.7-3.46-2.14-5.32-2.29ZM460.29 63.68c1-.24 2.01-.46 3.04-.65-1.15.16-2.37.38-3.71.69v.13c.07-.02.15-.04.22-.05.11-.13.3-.18.45-.11v-.01ZM457.24 100.96c.43-.03.86-.07 1.29-.11.14-.49.27-.99.38-1.49-.44.7-1 1.23-1.67 1.6ZM482.88 104.98c-.18.23-.36.38-.55.47.14.09.27.19.4.28a70.76 70.76 0 0 0 4.37-4.63c.76-.89 1.52-1.81 2.19-2.77-.3-.27-.61-.53-.92-.79-.07 1.94-4.62 6.32-5.49 7.45v-.01Z",
transform:"translate(-144.023 -51.76)"}),(0,pa.jsx)("path",{d:"M474.36 63.31c-.4-.16-.84-.27-1.29-.37 1.56.42 3.08 1.22 3.76 2.74.62 1.4.32 2.95-.28 4.32.7-1.22.94-2.34.74-3.47-.24-1.33-1.19-2.54-2.93-3.21v-.01ZM477.34 89.18c-1.2-.81-2.4-1.62-3.6-2.42-.14.1-.26.19-.4.29 1.4.67 2.73 1.39 4 2.13ZM465.88 93.85c.37.25.74.5 1.1.75.46.32.92.65 1.38.97-1.57-1.2-2.01-1.61-2.49-1.72h.01ZM574.92 90.06c-2.28-5.21-4.93-11.13-5.67-12.26-.1-.15-1.57-3.01-1.63-3.08 0 0-.01.02-.02.02.4 1.37 1.09 2.69 1.65 3.99 2.14 4.95 4.36 9.86 6.67 14.73.6 1.26 1.21 2.52 1.83 3.78-.75-2.01-1.64-4.45-2.83-7.18ZM448.73 65.29c.1.2.22.38.34.57.22-.02.43-.06.65-.08v-.08c-.14-.05-.25 0-.99-.41ZM460.16 94.81c-.02.31-.06.59-.1.89-.03 1.71-.33 3.43-.79 5.07.15-.02.3-.03.45-.05.01-.04.02-.08.03-.11.09-.34.15-.69.2-1.03.17-1.07.25-2.16.33-3.24.05-.69.08-1.39.12-2.08-.27.1-.27.26-.24.57v-.02Z",
transform:"translate(-144.023 -51.76)"}),(0,pa.jsx)("path",{d:"m328.67 98.12-3.22-6.58c-1.29-2.63-2.53-5.29-3.72-7.97-.25-.85-.52-1.69-.79-2.53-.81-2.57-1.67-5.12-2.55-7.67-1.92-5.53-3.9-11.08-6.32-16.41-.72-1.58-1.46-3.44-2.63-4.79-.03-.17-.16-.29-.34-.36a.282.282 0 0 0-.23-.04c-.06-.01-.12 0-.18.01-.74.06-1.5.38-2.19.61-2.22.77-4.4 1.64-6.63 2.38-.03-.08-.06-.16-.09-.25-.15-.42-.82-.24-.67.19.03.09.07.19.1.28l-.18.06c-.36.11-.28.6 0 .68.18 1.18.63 2.36.98 3.49.03.09.06.17.08.26-.08.23-.17.46-.24.64-.37.98-.79 1.94-1.21 2.9-1.27 2.89-2.62 5.75-3.98 8.6-3.18 6.67-6.44 13.31-9.64 19.97-1.08 2.25-2.2 4.5-3.15 6.81-.13.32.24.5.5.37 1.34 1.33 2.84 2.5 4.4 3.57.65.44 1.31.87 2.01 1.24.4.22.86.48 1.33.5.24.01.35-.19.33-.37.11-.1.21-.21.28-.28.41-.41.81-.84 1.2-1.26.85-.92 1.69-1.87 2.5-2.84 6.31-2.34 12.6-4.31 18.71-5.84 2.14 5.3 3.43 8.43 3.97 9.58.55 1.05 1.15 1.88 1.82 2.52 1.32.56 6.96-.03 9.23-1.96.87-1.28 1.19-2.67.93-4.15-.09-.5-.22-.95-.4-1.33l-.01-.03Zm-20.09-45.61c.43.77.83 1.56 1.21 2.35-.54-.45-1.27-.99-2.07-1.49-.42-.24-.6-.35-.94-.34.43-.15.85-.29 1.29-.41.17-.05.34-.08.51-.11Zm-25.86 45.66c.78-1.85 1.67-3.66 2.54-5.47 1.51-3.16 3.05-6.31 4.58-9.47 1.28-2.63 2.56-5.26 3.83-7.9l-1.1 2.66c-1.99 4.79-4.97 10.9-8.88 18.15-.43.76-.66 1.51-.71 2.24-.05-.05-.1-.09-.15-.14a.259.259 0 0 0-.11-.07Zm6.24 4.71c-.42-.23-.82-.48-1.22-.74 1.05.45 2 .72 2.55.72l-.21.21c-.05.05-.11.1-.16.15-.01.01-.04.03-.05.04 0-.02.03-.02.05-.03a.27.27 0 0 0-.08.07c-.05-.02-.1-.03-.14-.05-.25-.1-.49-.24-.73-.37h-.01Zm15.73-29.43c1.05 3.15 2.1 6.31 3.1 9.48.34 1.06.69 2.13 1.01 3.21-3.5.63-6.95 1.46-10.27 2.5 2.48-6.03 4.54-11.11 6.16-15.19Zm4.79 12.57c-.23-.79-.49-1.58-.73-2.36-.79-2.54-1.63-5.08-2.46-7.61l-1.2-3.6c.02-.04.04-.09.05-.13 1.6 4.45 3.28 9 5.01 13.57l-.67.12v.01Zm5.83-18.27-.15-.54c-.49-1.64-1.03-3.28-1.6-4.9.23.58.47 1.17.7 1.75 1.56 4.03 3.01 8.1 4.39 12.2-.33-.82-.67-1.64-.98-2.46l-2.35-6.05h-.01ZM390.43 79.37c-.13-10.43-.22-17.5-.24-19.97-.24-1.6.21-2.88-.65-3.65-.14-.13-.32-.23-.52-.32h.03c.45 0 .45-.69 0-.7-1.75-.03-3.5-.04-5.25-.14-1.38-.08-2.76-.21-4.15-.31-.07 0-.12.01-.17.04-.21-.07-.47.03-.45.31l.03.45c-.11.14-.19.3-.22.5-.21 1.26-.32 13.67-.36 23.59-.32 5.79-.67 11.57-.97 17.36-.09 1.73-.29 3.54-.21 5.3-.39.02-.38.64.04.69v.12c.05.44.74.45.7 0v-.06c1.1.09 2.2.21 3.3.3 1.14.19 2.44.2 3.29.17 1.73-.05 2.92-.05 3.8-.37.45-.05.9-.11 1.35-.17.44-.06.25-.73-.19-.67h-.01c.24-.32.45-.72.62-1.25.66-1.84.41-6.36.34-11.33l-.13-9.9.02.01Zm-12.26 18.17c.09-1.91.2-3.81.31-5.71.06 5.38 0 6.14-.01 6.51-.05 1.65-.21 2.81.72 3.66-.39-.04-.78-.07-1.17-.1-.06-1.44.09-2.93.16-4.35l-.01-.01ZM588.97 53.85c-2.06-.25-3.17-.51-3.76-.6a.3.3 0 0 1 .04-.08c.22-.39-.39-.75-.6-.35-.56 1.02-.9 2.19-1.26 3.29-.61 1.88-1.17 3.78-1.72 5.68-.63 2.19-1.24 4.39-1.83 6.59-.81 2.03-1.67 4.05-2.61 6.03-1.7-3.64-3.11-6.04-4.03-7.57-2.26-3.74-2.85-5.48-3.57-6.08l.31-.09c.43-.12.25-.8-.19-.67-1.06.3-2.12.6-3.17.95-.93.32-1.85.69-2.76 1.07-.13.05-.19.16-.22.27-.04.02-.08.05-.11.07-.04-.06-.07-.12-.11-.18a.354.354 0 0 0-.48-.12c-.16.09-.22.32-.13.48l.33.54c0 .09.02.18.06.28.51 1.16.78 1.38.72 1.47-2.42 3.44-5.41 7.86-6.2 9.1-1.27 1.97-2.01 3.14-2.45 3.84l-.91-6.56-.43-4.1c-.19-1.85-.37-3.23-.53-4.13-.19-1.1-.3-2.15-.45-3.16-.2-1.36-.29-2.06-.47-2.42h.04c.45.02.45-.68 0-.7-3.43-.16-6.81.94-10.17 1.48-.24-.22-.73-.04-.58.32.24.59.33 1.25.43 1.87.17 1.06.29 2.13.4 3.2.32 3.09.53 6.2.74 9.3.44 6.75.77 13.51 1.17 20.26.11 1.95.13 3.96.46 5.89.05.3.37.31.55.14.74 1.71 2.87 1.27 6.13 1.27 1.34 0 2.39.04 2.99-.11.02.32.48.53.63.18 3.61-8.26 7.41-16.46 12.05-24.2.03-.05.04-.1.05-.15.3.73.64 1.45.94 2.16.97 2.26 1.97 4.52 2.98 6.76 2.26 5.03 4.54 10.07 7.09 14.96.47.9.94 1.79 1.47 2.65.2.32.4.67.66.96-.18.25 0 .68.34.54.91-.38 1.82-.75 2.76-1.07 1.04-.35 2.11-.65 3.17-.95.39-.11.28-.66-.07-.68.62-.4.95-.96.87-1.91-.3-3.34.72-7.47.86-8.52l2.14-11.43c1.75-10.74 3.13-17.51 3.23-20.86.02-.49.08-2.84.13-3.24.17-1.25.48-1-4.96-1.65l.03-.02Zm-46.19 5.67c-.04-.24-.09-.48-.15-.71l.85-.15c-.34.24-.56.53-.7.86Zm1.95 25.12c-.36-6.63-.7-13.26-1.32-19.87 0 .02 0 .04.01.06.29 1.65.44 2.47.56 2.89 1 8.46 1.5 16.14 1.46 22.8-.06.99-.1 2-.11 3.02-.01.29-.03.68-.05 1.12-.01-.26-.03-.53-.04-.78-.19-3.08-.35-6.16-.52-9.23l.01-.01Zm36.4 18.66c-.11-.11-.24-.29-.37-.49.35.21.74.26 1.17.16-.27.11-.53.22-.8.32v.01Zm-.89-33.72c.12-.43.23-.86.35-1.29.71-1.77 1.41-3.55 2.08-5.33-.15.68-.26 1.22-.31 1.55-.5 2.94-2.13 7.59-3.58 13.36-.15-.35-.29-.66-.43-1 .61-2.44 1.25-4.87 1.9-7.3l-.01.01Zm3.56-12.48c.14-.44.28-.89.42-1.34-.13.7-.27 1.41-.42 2.11-.43 1.19-.86 2.38-1.31 3.57.42-1.45.85-2.9 1.31-4.34Zm-5.22 16.05c-.11.44-.23.87-.35 1.31-.12.46-.23.92-.35 1.38-.1-.22-.19-.4-.28-.61.34-.69.66-1.38.97-2.08h.01Zm-11.64 2.62c.06-.1.12-.19.17-.28.05.13.09.26.14.39a.398.398 0 0 0-.31-.11Zm2.3 2.98c-.56-1.3-1.25-2.63-1.65-3.99 0 0 .01-.02.02-.02.06.08 1.52 2.93 1.63 3.08.73 1.13 3.38 7.04 5.67 12.26 1.2 2.73 2.08 5.17 2.83 7.18-.62-1.25-1.23-2.51-1.83-3.78-2.31-4.87-4.53-9.78-6.67-14.73ZM275.92 87.03c-1.06-2.18-1.13-3.45-2.44-2.93-1.52.57-2.94 1.3-4.5 2.1-1.4.72-2.68 1.44-3.92 2.12.01-.25-.24-.5-.51-.34-4.8 2.93-12.41 4.7-17.28 1.31-1.98-1.77-3.32-4.15-3.97-5.78-.29-.95-.49-1.94-.63-2.93-.14-3.34 1.58-6.53 3.9-9.12.8-.79 1.68-1.51 2.66-2.12 3.7-2.3 8.22-3.07 12.51-2.51 2.71.35 5.32 1.24 7.71 2.55.39.22.75-.39.35-.6-.18-.1-.37-.18-.55-.27.56.27 1.03.33 1.51.19l-.48.39c-.15.11-.23.3-.13.48.09.15.33.24.48.13 1.3-.97 2.46-2.09 3.45-3.37.37-.29.64-.6.65-.97v-.02c.08-.33-.03-.7-.21-1.08-.31-.87-.98-2.01-2.19-3.26-2.43-2.52-3.79-3.45-5.68-4.26-1.14-.49-3.12-1.06-4.42-1.23-3.28-.42-10.64-1.21-18.18 4.11-7.74 5.46-11.94 12.3-12.23 20.61-.08 2.06.04 3.98.34 5.71.74 4.18 2.57 8 5.44 11.34 4.26 4.99 9.76 7.52 16.34 7.52 4.85 0 9.69-1.77 14.89-4.62.23-.12.45-.23.68-.35 2.19-1.1 4.37-2.23 6.46-3.5.49-.3 1.03-.61 1.5-.98 1.47-.87 1.11-1.12.49-2.95-.39-1.14-.76-2.7-2.06-5.36l.02-.01Zm-17.38-21.76c3.05-.42 6.31.79 9.36 2.35.51.39.94.68 1.33.87-5.61-2.86-12.72-3.39-18.44-.79 2.05-1.33 4.24-1.95 7.74-2.44l.01.01ZM443.67 72.67c-.4-2.2-1.15-4.33-2.37-6.22-1.49-2.32-3.58-4.19-5.91-5.64-6.17-3.81-13.75-5.11-20.83-6.01-3.23-.41-6.47-.69-9.72-.92l-1.39-.12c-.85-.07-1.52-.1-2.05-.1-1.08-.06-2.17-.12-3.25-.17-.08 0-.14.02-.19.05-.1.05-.18.14-.16.3.27 2.55-.01 5.12-.92 7.52-.15.38.4.56.62.28 1.32.59 2.68 1.05 4.08 1.37 0 2.78-.14 7.58-.33 12.91 0 0 0 .02-.01.03-.61 3.66-.79 7.42-1 11.12-.23 4.01-.43 8.03-.44 12.05 0 .64 0 1.28.03 1.93.02.31 0 .68.15.96.06.11.14.16.24.17-.2.17-.21.54.11.59 3.83.67 7.78.71 11.68.25 2.3-.19 4.87-.65 7.65-1.56 1.85-.54 3.67-1.18 5.43-1.91 7.2-3.02 14.31-8.07 17.35-15.53.76-1.86 1.17-3.8 1.31-5.75.3-1.93.28-3.82-.09-5.58l.01-.02Zm-19.32-15.42c5.74 1.41 11.94 3.68 15.65 8.55.25.32.47.65.69.99-2.3-2.82-5.68-5.69-12.88-8.23-2.16-.76-4.35-1.43-6.64-2.02 1.06.21 2.13.45 3.18.71Zm-25.82-3.04c.13 0 .27.01.4.02-.14.1-.26.23-.37.38 0-.13-.02-.26-.03-.4Zm34.82 22.17c-.75 3.09-3.55 5.66-5.88 7.58-3.35 2.76-7.21 5.03-11.28 6.54-1.33.49-2.71.9-4.12 1.15.06-1.38.08-2.76.07-4.13-.02-3.78-.16-7.56-.41-11.33-.09-1.37-.18-2.74-.37-4.1 0-.06-.03-.11-.06-.15.09-3.25.12-6.16.03-8.12 6.86 1.05 10.56 2.17 14.06 3.62 5.52 2.28 8.59 5.44 7.97 8.96l-.01-.02Zm-22 16.15c-.12 0-.23-.02-.34-.03l.34-.03v.06Zm-.69-.7c0-3.13.26-8.84.47-14.51.06 1.2.11 2.41.15 3.6.15 3.6.25 7.23.09 10.83-.24.03-.48.05-.71.07v.01Zm-12.33-30.94c.37.63 2.01 1.01 3.23 1.25v.15c-1.31-.31-2.59-.73-3.83-1.29.12-.36.23-.72.33-1.09.08.48.18.84.27.98Zm13.7 31.65v-.18c3.41-.56 6.71-2.02 9.69-3.68 2.31-1.28 4.59-2.78 6.63-4.53-4.69 4.53-11.61 8.24-16.33 8.38l.01.01Zm24.07-.75c-2.05 1.93-4.37 3.56-6.83 4.95 2.7-1.78 5.52-4.03 8.42-6.87.82-.82 1.56-1.69 2.23-2.59-1.08 1.65-2.38 3.16-3.81 4.51h-.01ZM187.16 92.14c-.79-2.47-2.1-7.12-3.1-6.87-.19-.01-2.09.77-4.08 1.54-3.06 1.18-5.91 2.13-10.09 2.82-2.74.42-5.87 1.01-10.61 1.06.04-3.34.05-6.01.05-7.99 7.97-.65 12.33-2.11 16.37-3.55 1.11-.39 2.69-1.01 2.63-1.8-.08-.35-.55-1.39-1.17-2.61-.47-1.16-.98-2.31-1.61-3.38-.42-.71-1.04-1.69-1.86-2.06-.11-.08-.22-.13-.29-.12-.02 0-.04 0-.07.01-.19-.04-.39-.05-.6-.01-.17.03-.24.15-.25.28-.04.02-.09.04-.14.05-4.33 1.48-8.85 2.33-13.24 3.61a499.1 499.1 0 0 0-.31-8.19c4.51-.99 8.88-1.38 13.11-1.82 3.68-.38 6.28.12 7.47.34.59.11.9.16 1.16.18h.1c-.1.37.44.66.62.28.02-.04.03-.08.05-.13.15.2.53.22.62-.1.17-.58.19-1.21.21-1.81v-.36c.03-.15.05-.3.07-.45.52-2.47.33-5.09-.64-7.44-.11-.27-.44-.28-.6-.14-.08-.21-.15-.42-.24-.62-.19-.41-.79-.05-.6.35.03.07.05.15.09.22-.98-.42-2.15-.54-3.17-.63-2.17-.19-4.37-.14-6.54 0-5.7.35-11.4 1.3-16.91 2.79-2.08.56-4.13 1.22-6.14 2-4.54 1.05-3.79 1.51-2.17 6.07.18.51.46 1.68.54 1.94.82 2.47 1.08 2.13 3.1 2.13s0 .05 0 .08h.52c-.48 2.66-.51 5.45-.62 8.13-.15 3.48-.22 6.96-.28 10.45 0 .41-.01.82-.02 1.23-.16.29-.33.57-.51.85-.05.38-.09.77-.14 1.18-.42 3.52-.59 6.48-.52 8.8v.34c.02.47.05.76.06.87.16 1.57-.26 3.47 1.35 3.79 1.61.32 3.5.55 4.85.55.11 0 .22-.02.33-.02 1.79.24 3.67.05 5.45-.12 2.85-.28 5.69-.7 8.51-1.19 3.03-.53 6.05-1.14 9.04-1.86 2.4-.58 4.82-1.19 7.13-2.06.51-.19 1.73-.57 2.46-1.14 1.81-.68 2.18-1 1.57-2.67-.23-.62-.48-1.49-.91-2.78l-.03-.02Zm-11.12-38.71c.89.05 1.93.08 2.89.3-.33 0-.68-.02-1.06-.03-8.28-.26-14.88.75-23.97 2.51 2.41-.64 4.85-1.16 7.28-1.59 4.87-.86 9.91-1.45 14.86-1.19Zm-26.53 22.13c.03 1.71.04 3.43 0 5.14-.04 1.27-.11 2.55-.24 3.82 0-.73.02-1.46.04-2.19.05-2.26.12-4.51.22-6.77h-.02Zm6.73 27.85c.2-.1.4-.21.58-.33 1.82-.17 3.82-.24 5.94-.34-.86.11-1.72.24-2.58.33-1.27.14-2.61.31-3.93.34h-.01ZM534.48 85.44c-3.52-8.38-7.07-16.75-10.5-25.17-.63-1.54-1.25-3.09-1.86-4.65-.31-.8-.65-1.6-.87-2.43-.04-.17-.17-.24-.31-.25.1-.2 0-.51-.29-.53-1.59-.08-3.18-.22-4.78-.25-1.96-.03-3.91.13-5.84.42-.31.05-.31.38-.13.56-.03.06-.05.14-.04.22.23 1.54.63 3.06 1.16 4.53.13.35.27.7.41 1.06l-2.68 6.18c-.11.03-.2.09-.25.22-.67 1.9-1.52 3.73-2.34 5.56a536.85 536.85 0 0 1-3.9 8.45c-2.64 5.64-5.34 11.25-7.91 16.93-.44.97-.88 1.94-1.29 2.93-.2.48-.47 1-.55 1.52v.05c-.02.12.02.26.16.34 1.19.73 2.41 1.41 3.66 2.05 1.2.62 2.45 1.25 3.76 1.61.43.12.62-.55.19-.67-1.13-.31-2.2-.83-3.24-1.36 1.09.36 2.1.69 2.75.93 2.82 1.01 2.38 1.1 4.3-3.75 2.1-1.09 4.34-1.96 6.53-2.79 4.35-1.64 8.8-3.03 13.27-4.29.82 2.01 1.77 3.97 2.72 5.92.35.83.62 1.45.79 1.82.22.42.45.8.69 1.15.17.33.33.67.5 1 .42.8.84 1.63 1.4 2.35.23.29.6 0 .55-.31 1.53-.02 3.06-.07 4.58-.27.92-.12 1.82-.32 2.71-.54 1.39-.27 3.85-1.11 3.74-1.42-.67-1.96-1.55-3.87-2.34-5.78-1.57-3.78-3.16-7.56-4.75-11.33v-.01Zm-11.65-26.16c1.54 3.81 3.12 7.6 4.7 11.4 2.94 7.05 5.91 14.09 8.87 21.13l-1.06-2.17c-2.71-5.51-5.2-11.19-7.41-16.87l-6.65-17.15c-.65-1.45-.55-2.19-.93-2.53.09 0 .18.01.28.02a.29.29 0 0 0-.04.26c.52 2.02 1.47 3.98 2.25 5.91h-.01Zm-6.58 13.58c.05-.15.09-.31.14-.46 1.41 3.92 2.88 7.9 4.39 11.87-3.22.52-6.38 1.25-9.46 2.14.55-1.22 1.05-2.46 1.53-3.7 1.24-3.24 2.37-6.53 3.39-9.85h.01Zm-.23-20c.36 0 .73.03 1.09.05-2.15.1-5.18.33-5.87.74-.24.15-.41.3-.53.45-.06-.29-.13-.58-.18-.88 1.82-.26 3.65-.39 5.49-.35v-.01Zm-.09 18.72c-.49 1.67-1.05 3.33-1.6 4.97-1.07 3.19-2.19 6.38-3.57 9.46-.09.21-.19.43-.29.65-.25.07-.5.14-.74.22 2.53-6.16 4.61-11.29 6.2-15.3Zm-6.34 25.16c4.97-2.38 9.37-4.1 14.02-5.27l.26.64c-4.8 1.35-9.63 2.8-14.28 4.63Zm20.17 6.76c.33.23.68.42 1.04.56h-.33c-.12 0-.21.06-.26.13-.15-.23-.31-.45-.45-.7v.01ZM226.57 91.75c-3.55-4.74-6.68-9.11-9.31-12.99 9.2-15.25 10.05-17.81 10.35-18.38.17-.34 1.09-2.27.64-2.53-1.13-.65-1.03-.65-2.97-1.71-1.19-.65-3.04-1.61-4.53-2.12-1.71-.59-1.24-.36-3 2.77-.06.1-.11.2-.17.3-.75 1.02-1.48 2.05-2.2 3.09-1.88 2.71-3.73 5.45-5.69 8.1-3.68-4.91-6.88-8.76-9.51-11.43-.15-.15-.3-.29-.46-.42-1.27-1.28-7.24 3.53-7.93 5.58-.09.09-.19.16-.28.25-.27.26.03.64.33.58.19.65.5 1.29.94 1.91 3.85 5.06 7.19 9.76 9.94 14-1.23 2.61-3.06 5-4.67 7.38l-2.28 3.33c-.5.66-.93 1.23-1.29 1.69-.67.93-2.09 2.61-2.3 3.87-.51.85-1.16 1.84-1.29 2.83-.06.44.61.63.67.19.01-.08.04-.15.06-.22 1.36 1.08 2.76 2.11 4.19 3.11 1.3.91 2.62 1.85 4.04 2.56.21.1.4 0 .48-.17.24.07.48.14.72.2.44.1.62-.57.19-.67-2.02-.48-3.77-1.57-5.23-3.02-.47-.46-.9-.96-1.32-1.46 1.74 1.35 4.2 2.89 5.89 4.14 1.39 1.03 2.85-2.27 4.22-4.2 1.86-2.64 3.96-5.86 5.52-8.29l10.39 14.51c.67.81 1.14 1.21 1.57 1.36-.05.24.12.51.41.4 1.53-.58 3.05-1.19 4.54-1.87 1.52-.69 3.06-1.45 4.36-2.5a.28.28 0 0 0 .12-.23c1.66-1.1.81-1.74-1.41-4.91-1.13-1.58-1.71-2.36-3.7-5.01l-.03-.02Zm2.41 6.54c.56 1.15 1.19 2.52 1.11 3.81-.06.04-.12.07-.17.1-.03-.88-.55-2.66-.94-3.91Zm-16.51-32.73c1.86-2.65 3.65-5.35 5.57-7.95.4-.55.81-1.13 1.26-1.66.19-.18.38-.33.56-.45.18.03.36.08.55.13l-8.05 10.11.12-.18h-.01ZM192.7 95.48c.79-1.37 1.66-2.69 2.54-4 1.19-1.79 2.4-3.56 3.61-5.33-.04.09-.09.17-.13.26-.1.22.03.41.2.49-2.47 3.42-4.89 6.73-6.4 9.28.21.24.4.48.63.75-.24.07-.4.36-.17.56.4.33.72.77 1.05 1.17.09.11.18.21.27.32-.84-.61-1.66-1.24-2.47-1.88.24-.57.58-1.11.87-1.61v-.01Zm7.46-10.32c.47-.81.98-1.59 1.49-2.37.31-.48.64-.95.96-1.43.26-.29.52-.56.75-.79-.99 1.48-2.09 3.03-3.2 4.59Zm10.03-16.22s-.03-.05-.05-.07c.22-.29.43-.59.64-.89-.2.32-.4.65-.58.96h-.01ZM371.54 87.96c-.01-.08-.01-.16-.03-.23-.06-.38-.58-.29-.66.03-.3-.05-.6-.08-.81-.11-1.14-.15-2.29-.19-3.44-.2 1.04-.09 2.09-.18 3.14-.23.45-.02.45-.72 0-.7-6.57.35-13.14 1.23-19.65 2.11-1.53.21-3.05.42-4.57.68-.01 0-.02.01-.04.01-.04-3.33-.13-6.66-.24-9.99-.19-5.7-.4-11.41-.88-17.1-.13-1.51-.23-3.07-.49-4.58 0-.25 0-.48-.02-.68-.06-1.19-.04-2.61-.68-2.78-.16-.07-.72-.16-1.5-.24.22-.17.16-.62-.2-.63-1.19-.04-2.39.09-3.57.23-1.2.14-2.41.32-3.59.6-.16-.1-.41-.06-.5.12-.06.02-.13.03-.19.05-.35.1-.29.55-.03.66-.26.6-.19 2.27-.21 3-.02.66-.66 33.73-.9 40.3-.03.65.06 1.12.04 1.45-.16 3.05.87 4.96 6.34 3.93 1.09-.08 2.75-.77 5.36-1.43 4.13-1.04 5.78-1.52 6.2-1.65 6.43-1.69 6.78-1.97 11.72-2.43.55-.05 4.8-.38 6.03-.3.64.04 1.19.07 1.65.1.09 0 .16-.03.24-.05.1.27.56.33.66-.02.39-1.32.61-2.71.78-4.08.2-1.61.29-3.24.15-4.86.24.03.52-.23.38-.53-.09-.2-.27-.33-.49-.43v-.02Zm-.63.56c.07.57.11 1.14.11 1.71-.21-.99-.53-1.71-.95-1.87.22.03.44.06.65.11.06.01.12.04.19.05Zm-25.41 1.73c1.54-.36 3.1-.64 4.66-.89-1.61.37-3.18.77-4.66 1.2v-.31Zm-.86-7.37c-.07-1.37-.16-2.75-.25-4.12-.21-3.13-.45-6.27-.79-9.4.02-2.25.08-4.31.13-6.11.16 2.08.29 4.16.4 6.24.23 4.46.38 8.93.5 13.39h.01Zm-.94-4c.16 2.41.29 4.83.39 7.24.06 1.6.14 3.22.09 4.83-.15.05-.32.09-.47.14V78.88h-.01ZM483.72 92.83c-3.05-2.28-6.22-4.4-9.38-6.51 8.86-6.49 13.49-12.95 13.73-19.23.04-.76 0-1.5-.13-2.2-.67-3.82-3.5-6.68-8.39-8.48.13.04.27.08.4.13 3.92 1.39 7.74 4.23 8.5 8.56.34 1.95-.05 3.96-.98 5.69-.21.4.39.75.6.35 1.86-3.46 1.46-7.55-.97-10.63-3.53-4.47-9.76-5.88-15.16-6.16-2.32-.12-4.64-.04-6.95.19-6 .32-12.71 1.68-17.63 3.21-.37.11-.67.23-.92.35-.2-.17-.62.02-.57.37v.03c-.64.68-.18 1.64.48 3.21.38.91.67 1.89 1.15 2.58.32.76.68 1.51 1.13 2.19.14.21.38.19.53.07.19-.02.38-.05.57-.08v1.57c-.06.06-.1.13-.11.23-.27 4.18-.34 8.38-.48 12.57l-.3 9.03c-.24 3.91-.44 6.77-.46 7.26-.05.88-.11 1.95.07 2.81-.01.22-.02.43-.04.65 0 .11-.02.23-.03.35 0 .05-.03.27-.01.16-.05.4.5.59.64.28.05.04.12.08.2.08 1.75.13 3.5.28 5.25.3 1.69.02 3.38-.12 5.06-.32.08.23.36.39.55.15.06-.08.11-.17.16-.26.18-.09.24-.32.18-.48.05-.2.1-.4.13-.6.16-.86.25-1.74.33-2.62.11-1.17.17-2.34.23-3.51.15-.01.32-.03.52-.04.36-.03 1.73-.15 2.06-.15.39 0 .7-.02.95-.04 1.76 1.11 3.45 2.35 5.14 3.55 2.83 2.01 5.64 4.04 8.47 6.04 1.42 1 2.85 2 4.29 2.97.1.06.19.07.27.04.08 0 .17-.02.25-.1 1.61-1.56 3.15-3.18 4.6-4.88.75-.88 1.49-1.78 2.15-2.73.01.01.03.02.04.03.34.3.83-.2.49-.49-2.16-1.9-4.34-3.76-6.64-5.48l.03-.01Zm-6.38-3.65a55.72 55.72 0 0 0-4-2.13c.14-.1.26-.19.4-.29 1.2.81 2.4 1.61 3.6 2.42Zm-20.1 11.78c.67-.37 1.23-.91 1.67-1.6-.11.5-.24 1-.38 1.49-.43.04-.86.08-1.29.11Zm2.38-37.24c1.34-.31 2.56-.52 3.71-.69-1.03.19-2.04.41-3.04.65-.14-.07-.34-.02-.45.11-.07.02-.15.04-.22.05v-.13.01Zm.04.84c.07-.02.14-.03.2-.05.34 1.66.41 3.41.5 5.09.17 2.9.24 5.81.28 8.71l.03 3.17c-.17.07-.34.14-.51.2-.06-4.96-.21-10.58-.51-17.12h.01Zm16.04 5.62c-1.16 2.25-3.06 4.1-5.02 5.66-2.8 2.23-5.99 3.97-9.3 5.35-.01-3.56-.09-7.12-.27-10.67-.1-2.04-.16-4.16-.57-6.18 3.3-.78 6.72-1.36 10.1-1.1 1.85.14 4.23.59 5.32 2.29.92 1.43.46 3.24-.26 4.65Zm.85-.18c.6-1.37.9-2.92.28-4.32-.67-1.52-2.2-2.32-3.76-2.74.46.1.89.21 1.29.37 1.74.67 2.69 1.88 2.93 3.21.2 1.13-.05 2.25-.74 3.47V70Zm-27.47-4.14c-.12-.19-.23-.38-.34-.57.74.42.85.36.99.41v.08c-.22.03-.43.06-.65.08Zm11.21 30.46c-.08 1.08-.16 2.17-.33 3.24-.05.35-.11.69-.2 1.03 0 .04-.02.07-.03.11-.15.02-.3.04-.45.05.45-1.64.76-3.36.79-5.07.03-.29.08-.57.1-.89-.03-.31-.03-.47.24-.57-.04.69-.07 1.39-.12 2.08v.02Zm5.6-2.47c.48.11.92.52 2.49 1.72-.46-.32-.92-.65-1.38-.97-.37-.25-.73-.5-1.1-.75h-.01Zm21.23 7.24a70.76 70.76 0 0 1-4.37 4.63c-.14-.09-.27-.19-.4-.28.19-.09.37-.24.55-.47.87-1.14 5.43-5.51 5.49-7.45.31.26.62.53.92.79-.67.97-1.42 1.88-2.19 2.77v.01Z",
fill:"currentColor",transform:"translate(-144.023 -51.76)"})]})},bb=function(Zc){var Gc=Zc.style,ub=Zc.size;Zc=Zc.withText;return(0,pa.jsxs)("div",{className:"ExcalidrawLogo is-".concat(void 0===ub?"small":ub),style:Gc,children:[(0,pa.jsx)(ab,{}),Zc&&(0,pa.jsx)(Qa,{})]})},Pa=["onSelect","children","icon","shortcut","className"],Lb=["children","href","icon","shortcut","className"],xc=function(Zc){var Gc=Zc.icon,ub=Zc.shortcut;Zc=Zc.children;var Bb=(0,ta.Fy)();return(0,pa.jsxs)(pa.Fragment,{children:[(0,pa.jsx)("div",
{className:"welcome-screen-menu-item__icon",children:Gc}),(0,pa.jsx)("div",{className:"welcome-screen-menu-item__text",children:Zc}),ub&&!Bb.isMobile&&(0,pa.jsx)("div",{className:"welcome-screen-menu-item__shortcut",children:ub})]})};xc.displayName="WelcomeScreenMenuItemContent";var oc=function(Zc){var Gc=Zc.onSelect,ub=Zc.children,Bb=Zc.icon,Eb=Zc.shortcut,hd=Zc.className;hd=void 0===hd?"":hd;Zc=(0,Ua.Z)(Zc,Pa);return(0,pa.jsx)("button",h(h({},Zc),{},{type:"button",className:"welcome-screen-menu-item ".concat(hd),
onClick:Gc,children:(0,pa.jsx)(xc,{icon:Bb,shortcut:Eb,children:ub})}))};oc.displayName="WelcomeScreenMenuItem";var pc=function(Zc){var Gc=Zc.children,ub=Zc.href,Bb=Zc.icon,Eb=Zc.shortcut,hd=Zc.className;hd=void 0===hd?"":hd;Zc=(0,Ua.Z)(Zc,Lb);return(0,pa.jsx)("a",h(h({},Zc),{},{className:"welcome-screen-menu-item ".concat(hd),href:ub,target:"_blank",rel:"noreferrer",children:(0,pa.jsx)(xc,{icon:Bb,shortcut:Eb,children:Gc})}))};pc.displayName="WelcomeScreenMenuItemLink";var Cc=function(Zc){Zc=Zc.children;
var Gc=(0,ka.R6)().WelcomeScreenCenterTunnel;return(0,pa.jsx)(Gc.In,{children:(0,pa.jsx)("div",{className:"welcome-screen-center",children:Zc||(0,pa.jsxs)(pa.Fragment,{children:[(0,pa.jsx)(bd,{}),(0,pa.jsx)(dc,{children:(0,ea.t)("welcomeScreen.defaults.center_heading")}),(0,pa.jsxs)(Nc,{children:[(0,pa.jsx)(Ad,{}),(0,pa.jsx)(Qc,{})]})]})})})};Cc.displayName="Center";var bd=function(Zc){return(0,pa.jsx)("div",{className:"welcome-screen-center__logo virgil welcome-screen-decor",children:Zc.children||
(0,pa.jsx)(bb,{withText:!0})})};bd.displayName="Logo";var dc=function(Zc){return(0,pa.jsx)("div",{className:"welcome-screen-center__heading welcome-screen-decor virgil",children:Zc.children})};dc.displayName="Heading";var Nc=function(Zc){return(0,pa.jsx)("div",{className:"welcome-screen-menu",children:Zc.children})};Nc.displayName="Menu";var Qc=function(){var Zc=(0,ta.eh)();return(0,pa.jsx)(oc,{onSelect:function(){return Zc.executeAction(ib.jY)},shortcut:"?",icon:yb.by,children:(0,ea.t)("helpDialog.title")})};
Qc.displayName="MenuItemHelp";var Ad=function(){var Zc=(0,oa.I)(),Gc=(0,ta.eh)();return Zc.viewModeEnabled?null:(0,pa.jsx)(oc,{onSelect:function(){return Gc.executeAction(ib._d)},shortcut:(0,vb.C)("loadScene"),icon:yb.Tl,children:(0,ea.t)("buttons.load")})};Ad.displayName="MenuItemLoadScene";var Xc=function(Zc){Zc=Zc.onSelect;var Gc=(0,ea.QT)().t;return(0,pa.jsx)(oc,{shortcut:null,onSelect:Zc,icon:yb.jn,children:Gc("labels.liveCollaboration")})};Xc.displayName="MenuItemLiveCollaborationTrigger";Cc.Logo=
bd;Cc.Heading=dc;Cc.Menu=Nc;Cc.MenuItem=oc;Cc.MenuItemLink=pc;Cc.MenuItemHelp=Qc;Cc.MenuItemLoadScene=Ad;Cc.MenuItemLiveCollaborationTrigger=Xc;var sc=function(Zc){Zc=Zc.children;var Gc=(0,ka.R6)().WelcomeScreenMenuHintTunnel;return(0,pa.jsx)(Gc.In,{children:(0,pa.jsxs)("div",{className:"virgil welcome-screen-decor welcome-screen-decor-hint welcome-screen-decor-hint--menu",children:[yb.oQ,(0,pa.jsx)("div",{className:"welcome-screen-decor-hint__label",children:Zc||(0,ea.t)("welcomeScreen.defaults.menuHint")})]})})};
sc.displayName="MenuHint";var Sc=function(Zc){Zc=Zc.children;var Gc=(0,ka.R6)().WelcomeScreenToolbarHintTunnel;return(0,pa.jsx)(Gc.In,{children:(0,pa.jsxs)("div",{className:"virgil welcome-screen-decor welcome-screen-decor-hint welcome-screen-decor-hint--toolbar",children:[(0,pa.jsx)("div",{className:"welcome-screen-decor-hint__label",children:Zc||(0,ea.t)("welcomeScreen.defaults.toolbarHint")}),yb.DJ]})})};Sc.displayName="ToolbarHint";var Ib=function(Zc){Zc=Zc.children;var Gc=(0,ka.R6)().WelcomeScreenHelpHintTunnel;
return(0,pa.jsx)(Gc.In,{children:(0,pa.jsxs)("div",{className:"virgil welcome-screen-decor welcome-screen-decor-hint welcome-screen-decor-hint--help",children:[(0,pa.jsx)("div",{children:Zc||(0,ea.t)("welcomeScreen.defaults.helpHint")}),yb._U]})})};Ib.displayName="HelpHint";var lb=q(1569),Db={};Db.styleTagTransform=T();Db.setAttributes=V();Db.insert=B().bind(null,"head");Db.domAPI=f();Db.insertStyleElement=S();t()(lb.Z,Db);lb.Z&&lb.Z.locals&&lb.Z.locals;var Gb=function(Zc){return(0,pa.jsx)(pa.Fragment,
{children:Zc.children||(0,pa.jsxs)(pa.Fragment,{children:[(0,pa.jsx)(Cc,{}),(0,pa.jsx)(sc,{}),(0,pa.jsx)(Sc,{}),(0,pa.jsx)(Ib,{})]})})};Gb.displayName="WelcomeScreen";Gb.Center=Cc;Gb.Hints={MenuHint:sc,ToolbarHint:Sc,HelpHint:Ib};var db=Gb,rb=q(3589),Nb=q(3397),fc={};fc.styleTagTransform=T();fc.setAttributes=V();fc.insert=B().bind(null,"head");fc.domAPI=f();fc.insertStyleElement=S();t()(Nb.Z,fc);Nb.Z&&Nb.Z.locals&&Nb.Z.locals;var Bc=["isCollaborating","onSelect"],Jc=function(Zc){var Gc=Zc.isCollaborating,
ub=Zc.onSelect;Zc=(0,Ua.Z)(Zc,Bc);var Bb=(0,oa.I)();return(0,pa.jsxs)(rb.z,l(l({},Zc),{},{className:(0,la.Z)("collab-button",{active:Gc}),type:"button",onSelect:ub,style:{position:"relative"},title:(0,ea.t)("labels.liveCollaboration"),children:[yb.jn,0<Bb.collaborators.size&&(0,pa.jsx)("div",{className:"CollabButton-collaborators",children:Bb.collaborators.size})]}))},ic=Jc;Jc.displayName="LiveCollaborationTrigger";var Oc=q(5734),Rc=q(7181),fd=q(3529),pd=q(9472),Ic=q(7729),wc=q(9605),je=q(3441),pf=
q(5553),qe=q(8132),ue=q(6419),kd=["initialData","UIOptions"],Ae=["initialData","UIOptions"],Bf=function(Zc){var Gc,ub,Bb,Eb=Zc.onChange,hd=Zc.initialData,Ud=Zc.excalidrawRef,Td=Zc.isCollaborating;Td=void 0!==Td&&Td;var Ue=Zc.onPointerUpdate,kb=Zc.renderTopRightUI,tb=Zc.langCode;tb=void 0===tb?ea.Fp.code:tb;var ob=Zc.viewModeEnabled,Ub=Zc.zenModeEnabled,Tb=Zc.gridModeEnabled,rd=Zc.libraryReturnUrl,td=Zc.theme,Hd=Zc.name,te=Zc.renderCustomStats,ve=Zc.onPaste,pe=Zc.detectScroll;pe=void 0===pe||pe;var $d=
Zc.handleKeyboardGlobally;$d=void 0!==$d&&$d;var Ab=Zc.onLibraryChange,ec=Zc.autoFocus;ec=void 0!==ec&&ec;var vc=Zc.generateIdForFile,Xa=Zc.onLinkOpen,sa=Zc.onPointerDown,qa=Zc.onScrollChange,Da=Zc.children,Ta=Zc.validateEmbeddable,wb=Zc.renderEmbeddable,ac=null===(Gc=Zc.UIOptions)||void 0===Gc?void 0:Gc.canvasActions;Zc=p(p({},Zc.UIOptions),{},{canvasActions:p(p({},D.cW.canvasActions),ac)});null!=ac&&ac.export&&(Zc.canvasActions.export.saveFileToDisk=null!==(ub=null===(Bb=ac.export)||void 0===Bb?
void 0:Bb.saveFileToDisk)&&void 0!==ub?ub:D.cW.canvasActions.export.saveFileToDisk);return null===Zc.canvasActions.toggleTheme&&void 0===td&&(Zc.canvasActions.toggleTheme=!0),(0,ia.useEffect)(function(){var Hc=function(Wc){"number"==typeof Wc.scale&&1!==Wc.scale&&Wc.preventDefault()};return document.addEventListener("touchmove",Hc,{passive:!1}),function(){document.removeEventListener("touchmove",Hc)}},[]),(0,pa.jsx)(Ka.zt,{unstable_createStore:function(){return Ba.e_},scope:Ba.yE,children:(0,pa.jsx)(va,
{langCode:tb,theme:td,children:(0,pa.jsx)(ta.ZP,{onChange:Eb,initialData:hd,excalidrawRef:Ud,isCollaborating:Td,onPointerUpdate:Ue,renderTopRightUI:kb,langCode:tb,viewModeEnabled:ob,zenModeEnabled:Ub,gridModeEnabled:Tb,libraryReturnUrl:rd,theme:td,name:Hd,renderCustomStats:te,UIOptions:Zc,onPaste:ve,detectScroll:pe,handleKeyboardGlobally:$d,onLibraryChange:Ab,autoFocus:ec,generateIdForFile:vc,onLinkOpen:Xa,onPointerDown:sa,onScrollChange:qa,validateEmbeddable:Ta,renderEmbeddable:wb,children:Da})})})},
gg=(0,ia.forwardRef)(function(Zc,Gc){return(0,pa.jsx)(Bf,p(p({},Zc),{},{excalidrawRef:Gc}))}),jc=U().memo(gg,function(Zc,Gc){if(Zc.children!==Gc.children)return!1;Zc.initialData;var ub=Zc.UIOptions,Bb=void 0===ub?{}:ub;Zc=O()(Zc,kd);ub=(Gc.initialData,Gc.UIOptions);var Eb=void 0===ub?{}:ub;Gc=O()(Gc,Ae);ub=Object.keys(Bb);var hd=Object.keys(Eb);return ub.length===hd.length&&ub.every(function(Ud){return"canvasActions"===Ud?Object.keys(Bb.canvasActions).every(function(Td){var Ue,kb,tb,ob;return"export"===
Td&&null!=Bb&&null!==(Ue=Bb.canvasActions)&&void 0!==Ue&&Ue.export&&null!=Eb&&null!==(kb=Eb.canvasActions)&&void 0!==kb&&kb.export?Bb.canvasActions.export.saveFileToDisk===Eb.canvasActions.export.saveFileToDisk:(null==Bb||null===(tb=Bb.canvasActions)||void 0===tb?void 0:tb[Td])===(null==Eb||null===(ob=Eb.canvasActions)||void 0===ob?void 0:ob[Td])}):Bb[Ud]===Eb[Ud]})&&(0,xa.w8)(Zc,Gc)});jc.displayName="Excalidraw";(function(){Array.prototype.at||Object.defineProperty(Array.prototype,"at",{value:function(Zc){if(0>
(Zc=Math.trunc(Zc)||0)&&(Zc+=this.length),!(0>Zc||Zc>=this.length))return this[Zc]},writable:!0,enumerable:!1,configurable:!0})})()}(),P}()})};
'use strict';var mCd=function(a,b){var c=$APP.Iz();$APP.m(c)&&$APP.GJa($APP.Mxb(c,a),function(d){return b.A?b.A(d):b.call(null,d)},function(d){return $APP.Sk.F($APP.F(["Error loading ",a,": ",d]))})},oCd=function(a){var b=$APP.er(a);if($APP.m(b)){for(b=b.querySelector(".draw-wrap");;){if(null!=b&&void 0!==b&&void 0!==b.classList)if($APP.m(b.classList.contains("block-content"))){var c=b.clientWidth;b=0===c?b.getBoundingClientRect.width:c;$APP.dg(nCd.A(a),b)}else{b=b.parentNode;continue}break}return a}return null},
pCd=new $APP.M(null,"view-mode-enabled","view-mode-enabled",-588220561),qCd=new $APP.M("frontend.extensions.excalidraw","grid-mode?","frontend.extensions.excalidraw/grid-mode?",-1189627787),rCd=new $APP.M(null,"grid-mode-enabled","grid-mode-enabled",584978327),sCd=new $APP.M(null,"on-pointer-down","on-pointer-down",573334138),tCd=new $APP.M("frontend.extensions.excalidraw","elements","frontend.extensions.excalidraw/elements",1745667967),uCd=new $APP.M("frontend.extensions.excalidraw","resize-observer",
"frontend.extensions.excalidraw/resize-observer",1997499684),vCd=new $APP.M("frontend.extensions.excalidraw","data","frontend.extensions.excalidraw/data",-1371036113),wCd=new $APP.M(null,"zen-mode-enabled","zen-mode-enabled",-955634269),xCd=new $APP.M("frontend.extensions.excalidraw","zen-mode?","frontend.extensions.excalidraw/zen-mode?",1559773511),nCd=new $APP.M("frontend.extensions.excalidraw","draw-width","frontend.extensions.excalidraw/draw-width",-681100043),yCd=new $APP.M("frontend.extensions.excalidraw",
"view-mode?","frontend.extensions.excalidraw/view-mode?",525380621),zCd=new $APP.M("frontend.extensions.excalidraw","loading?","frontend.extensions.excalidraw/loading?",-1335058663),ACd=new $APP.M(null,"initial-data","initial-data",-1315709804);$APP.kda("excalidraw");var BCd=$APP.xm(586);var CCd,DCd,ECd;$APP.cqd={};CCd=$APP.ZN(BCd.Excalidraw);
DCd=$APP.Yq($APP.cr,function(a,b,c){var d=$APP.kr(),e=$APP.G.j(a,nCd),f=$APP.G.j(a,xCd),g=$APP.G.j(a,yCd),h=$APP.G.j(a,qCd),n=$APP.Pz($APP.Ykb),p=$APP.G.j(a,tCd);a=$APP.Jf(c);var q=$APP.G.j(a,$APP.wp),r=$APP.G.j(a,$APP.$M);return $APP.m(b)?$APP.W("div",{onMouseDown:function(v){return $APP.mv(v)},className:"overflow-hidden"},[$APP.W("div",{style:{fontSize:10},className:"my-1"},[$APP.W("a",{onClick:$APP.Zkb,className:"mr-2"},[$APP.Mq($APP.cv("Wide Mode (%s)",$APP.F([$APP.m(n)?"ON":"OFF"])))]),$APP.W("a",
{onClick:function(){return $APP.ji.j(f,$APP.xb)},className:"mr-2"},[$APP.Mq($APP.cv("Zen Mode (%s)",$APP.F([$APP.m($APP.u(f))?"ON":"OFF"])))]),$APP.W("a",{onClick:function(){return $APP.ji.j(g,$APP.xb)},className:"mr-2"},[$APP.Mq($APP.cv("View Mode (%s)",$APP.F([$APP.m($APP.u(g))?"ON":"OFF"])))]),$APP.W("a",{onClick:function(){return $APP.ji.j(h,$APP.xb)},className:"mr-2"},[$APP.Mq($APP.cv("Grid Mode (%s)",$APP.F([$APP.m($APP.u(h))?"ON":"OFF"])))]),$APP.W("a",{onClick:function(){var v=new $APP.N(null,
2,5,$APP.O,[$APP.IA,r],null);v=$APP.hD.A?$APP.hD.A(v):$APP.hD.call(null,v);return $APP.m(v)?$APP.$L?$APP.$L(v,$APP.On,r):$APP.aM.call(null,v,$APP.On,r):null},className:"mr-2"},["Edit Block"])]),$APP.W("div",{ref:d,onMouseDown:function(v){$APP.mv(v);return $APP.Jz($APP.S0,!0)},onBlur:function(){return $APP.Jz($APP.S0,!1)},style:{width:$APP.u(e),height:$APP.m(n)?650:500},className:"draw-wrap"},[$APP.Mq(function(){var v=$APP.$l.F($APP.F([new $APP.l(null,7,[$APP.nO,function(y,z,E){if($APP.m(function(){var K=
$APP.B.j("down",$APP.qa(z,"cursorButton"));if(K)return K;K=$APP.qa(z,"draggingElement");if($APP.m(K))return K;K=$APP.qa(z,"editingElement");if($APP.m(K))return K;K=$APP.qa(z,"editingGroupId");return $APP.m(K)?K:$APP.qa(z,"editingLinearElement")}()))return null;var H=$APP.Rp.F(y,$APP.F([new $APP.l(null,1,[$APP.Sp,!0],null)]));return $APP.x(H)&&$APP.qh.j(H,$APP.u(p))?($APP.dg(p,H),$APP.myb(q,BCd.serializeAsJSON(y,z,E,"local"))):null},wCd,$APP.u(f),pCd,$APP.u(g),rCd,$APP.u(h),sCd,function(){return d.current.firstChild.focus()},
ACd,b,$APP.pB,$APP.Pz($APP.JA)],null)]));return CCd.A?CCd.A(v):CCd.call(null,v)}())])]):null},new $APP.N(null,8,5,$APP.O,[$APP.t8,$APP.fr(800,nCd),$APP.fr(!0,xCd),$APP.fr(!1,yCd),$APP.fr(!1,qCd),$APP.fr(null,tCd),$APP.fr(null,uCd),new $APP.l(null,3,[$APP.Uq,function(a){$APP.dg(uCd.A(a),new ResizeObserver($APP.Taa(function(){return $APP.dg(nCd.A(a),0)},300)));$APP.u(uCd.A(a)).observe($APP.LSb());return oCd(a)},$APP.Vq,oCd,$APP.Wq,function(a){return $APP.u(uCd.A(a)).disconnect()}],null)],null),"frontend.extensions.excalidraw/draw-inner");
ECd=$APP.Yq($APP.cr,function(a,b){var c=$APP.G.j(a,vCd);a=$APP.G.j(a,zCd);a=$APP.gr(a);c=$APP.gr(c);var d=$APP.Pz($APP.UMb);return $APP.m($APP.wp.A(b))?$APP.m(d)?(b=$APP.ETb(),$APP.W("div",$APP.Ed(b)?$APP.Lq($APP.Iq($APP.F([new $APP.l(null,1,[$APP.Gq,new $APP.N(null,1,5,$APP.O,["ls-center"],null)],null),b]))):{className:"ls-center"},$APP.Ed(b)?null:[$APP.Mq(b)])):!1===a?DCd(c,b):null:null},new $APP.N(null,2,5,$APP.O,[$APP.t8,new $APP.l(null,1,[$APP.Sq,function(a){var b=$APP.$q.A(a);b=$APP.C.C(b,0,
null);b=$APP.wp.A(b);var c=$APP.ii.A(null),d=$APP.ii.A(!0);$APP.m(b)&&mCd(b,function(e){if($APP.nk(e))var f=null;else try{f=JSON.parse(e)}catch(g){e=g,$APP.Sk.F($APP.F(["from json error:"])),console.dir(e),f=$APP.rm($APP.EJa("Could not load this invalid excalidraw file"),$APP.Ku)}$APP.dg(c,f);return $APP.dg(d,!1)});return $APP.P.F(a,vCd,c,$APP.F([zCd,d]))}],null)],null),"frontend.extensions.excalidraw/draw-container");
$APP.dqd=$APP.Yq($APP.br,function(a){var b=$APP.Iz(),c=$APP.Pz(new $APP.N(null,2,5,$APP.O,[$APP.IYa,b],null));return $APP.KB(b)&&$APP.xb(c)&&$APP.xb((0,$APP.Jv)())&&$APP.xb($APP.Op())?null:ECd(a)},new $APP.N(null,1,5,$APP.O,[$APP.t8],null),"frontend.extensions.excalidraw/draw");$APP.Ra.Zi();
}).call(this);