@myoc/common 0.19.510 → 0.19.511

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. package/dist/dev/index.js +4 -27
  2. package/dist/dev/index.js.map +2 -2
  3. package/dist/prod/index.js +3 -3
  4. package/dist/types/common/src/constants.d.ts +1 -16
  5. package/dist/types/excalidraw/actions/actionBoundText.d.ts +0 -4
  6. package/dist/types/excalidraw/actions/actionCanvas.d.ts +0 -22
  7. package/dist/types/excalidraw/actions/actionClipboard.d.ts +0 -4
  8. package/dist/types/excalidraw/actions/actionCropEditor.d.ts +0 -2
  9. package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +0 -6
  10. package/dist/types/excalidraw/actions/actionDeselect.d.ts +0 -2
  11. package/dist/types/excalidraw/actions/actionElementLock.d.ts +0 -4
  12. package/dist/types/excalidraw/actions/actionEmbeddable.d.ts +0 -2
  13. package/dist/types/excalidraw/actions/actionExport.d.ts +0 -4
  14. package/dist/types/excalidraw/actions/actionFrame.d.ts +0 -8
  15. package/dist/types/excalidraw/actions/actionGroup.d.ts +0 -4
  16. package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +0 -4
  17. package/dist/types/excalidraw/actions/actionLink.d.ts +0 -2
  18. package/dist/types/excalidraw/actions/actionProperties.d.ts +0 -4
  19. package/dist/types/excalidraw/actions/actionSelectAll.d.ts +0 -2
  20. package/dist/types/excalidraw/actions/actionStyles.d.ts +0 -2
  21. package/dist/types/excalidraw/actions/actionToggleArrowBinding.d.ts +0 -2
  22. package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +0 -2
  23. package/dist/types/excalidraw/actions/actionToggleMidpointSnapping.d.ts +0 -2
  24. package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +0 -2
  25. package/dist/types/excalidraw/actions/actionToggleStats.d.ts +0 -2
  26. package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +0 -2
  27. package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +0 -2
  28. package/dist/types/excalidraw/actions/index.d.ts +0 -1
  29. package/dist/types/excalidraw/actions/shortcuts.d.ts +1 -1
  30. package/dist/types/excalidraw/actions/types.d.ts +2 -2
  31. package/dist/types/excalidraw/components/App.d.ts +2 -4
  32. package/dist/types/excalidraw/components/MobileToolBar.d.ts +3 -1
  33. package/dist/types/excalidraw/components/icons.d.ts +0 -1
  34. package/dist/types/excalidraw/components/main-menu/DefaultItems.d.ts +0 -6
  35. package/dist/types/excalidraw/data/blob.d.ts +3 -184
  36. package/dist/types/excalidraw/data/json.d.ts +2 -7
  37. package/dist/types/excalidraw/data/restore.d.ts +1 -2
  38. package/dist/types/excalidraw/data/types.d.ts +1 -16
  39. package/dist/types/excalidraw/types.d.ts +3 -30
  40. package/package.json +1 -1
  41. package/dist/types/excalidraw/actions/actionAddToLibrary.d.ts +0 -512
  42. package/dist/types/excalidraw/actions/actionToggleShapeSwitch.d.ts +0 -19
  43. package/dist/types/excalidraw/components/CommandPalette/CommandPalette.d.ts +0 -19
  44. package/dist/types/excalidraw/components/CommandPalette/defaultCommandPaletteItems.d.ts +0 -2
  45. package/dist/types/excalidraw/components/CommandPalette/types.d.ts +0 -24
  46. package/dist/types/excalidraw/components/ConfirmDialog.d.ts +0 -10
  47. package/dist/types/excalidraw/components/LibraryMenu.d.ts +0 -10
  48. package/dist/types/excalidraw/components/LibraryMenuBrowseButton.d.ts +0 -7
  49. package/dist/types/excalidraw/components/LibraryMenuControlButtons.d.ts +0 -9
  50. package/dist/types/excalidraw/components/LibraryMenuHeaderContent.d.ts +0 -17
  51. package/dist/types/excalidraw/components/LibraryMenuItems.d.ts +0 -14
  52. package/dist/types/excalidraw/components/LibraryMenuSection.d.ts +0 -23
  53. package/dist/types/excalidraw/components/LibraryUnit.d.ts +0 -14
  54. package/dist/types/excalidraw/components/PublishLibrary.d.ts +0 -17
  55. package/dist/types/excalidraw/data/EditorLocalStorage.d.ts +0 -8
  56. package/dist/types/excalidraw/data/library.d.ts +0 -127
  57. package/dist/types/excalidraw/deburr.d.ts +0 -1
  58. package/dist/types/excalidraw/hooks/useLibraryItemSvg.d.ts +0 -11
  59. package/dist/types/excalidraw/hooks/useScrollPosition.d.ts +0 -1
  60. package/dist/types/excalidraw/hooks/useStableCallback.d.ts +0 -4
  61. package/dist/types/excalidraw/hooks/useTransition.d.ts +0 -2
@@ -1,4 +1,4 @@
1
- var Qe=Object.create;var re=Object.defineProperty;var Je=Object.getOwnPropertyDescriptor;var et=Object.getOwnPropertyNames;var tt=Object.getPrototypeOf,nt=Object.prototype.hasOwnProperty;var rt=(e,t)=>()=>(e&&(t=e(e=0)),t);var oe=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var ot=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of et(t))!nt.call(e,o)&&o!==n&&re(e,o,{get:()=>t[o],enumerable:!(r=Je(t,o))||r.enumerable});return e};var se=(e,t,n)=>(n=e!=null?Qe(tt(e)):{},ot(t||!e||!e.__esModule?re(n,"default",{value:e,enumerable:!0}):n,e));var m,p=rt(()=>{m={PROD:!0}});var De=oe((Q,Pe)=>{p();(function(e,t){typeof define=="function"&&define.amd?define([],t):typeof Q=="object"?Pe.exports=t():(e.PromisePool=t(),e.promisePool=e.PromisePool)})(Q,function(){"use strict";var e=function(){this._listeners={}};e.prototype.addEventListener=function(a,l){this._listeners[a]=this._listeners[a]||[],this._listeners[a].indexOf(l)<0&&this._listeners[a].push(l)},e.prototype.removeEventListener=function(a,l){if(this._listeners[a]){var u=this._listeners[a].indexOf(l);u>=0&&this._listeners[a].splice(u,1)}},e.prototype.dispatchEvent=function(a){if(this._listeners[a.type]&&this._listeners[a.type].length)for(var l=this._listeners[a.type].slice(),u=0,f=l.length;u<f;++u)l[u].call(this,a)};var t=function(a){return typeof a.constructor=="function"&&a.constructor.name==="GeneratorFunction"},n=function(a){return{next:function(){var l=a();return l?{value:l}:{done:!0}}}},r=function(a){var l=!1;return{next:function(){return l?{done:!0}:(l=!0,{value:a})}}},o=function(a,l){var u=typeof a;if(u==="object"){if(typeof a.next=="function")return a;if(typeof a.then=="function")return r(a)}return u==="function"?t(a)?a():n(a):r(l.resolve(a))},s=function(a,l,u){this.target=a,this.type=l,this.data=u},i=function(a,l,u){if(e.call(this),typeof l!="number"||Math.floor(l)!==l||l<1)throw new Error("Invalid concurrency");this._concurrency=l,this._options=u||{},this._options.promise=this._options.promise||Promise,this._iterator=o(a,this._options.promise),this._done=!1,this._size=0,this._promise=null,this._callbacks=null};return i.prototype=new e,i.prototype.constructor=i,i.prototype.concurrency=function(a){return typeof a<"u"&&(this._concurrency=a,this.active()&&this._proceed()),this._concurrency},i.prototype.size=function(){return this._size},i.prototype.active=function(){return!!this._promise},i.prototype.promise=function(){return this._promise},i.prototype.start=function(){var a=this,l=this._options.promise;return this._promise=new l(function(u,f){a._callbacks={reject:f,resolve:u},a._proceed()}),this._promise},i.prototype._fireEvent=function(a,l){this.dispatchEvent(new s(this,a,l))},i.prototype._settle=function(a){a?this._callbacks.reject(a):this._callbacks.resolve(),this._promise=null,this._callbacks=null},i.prototype._onPooledPromiseFulfilled=function(a,l){this._size--,this.active()&&(this._fireEvent("fulfilled",{promise:a,result:l}),this._proceed())},i.prototype._onPooledPromiseRejected=function(a,l){this._size--,this.active()&&(this._fireEvent("rejected",{promise:a,error:l}),this._settle(l||new Error("Unknown error")))},i.prototype._trackPromise=function(a){var l=this;a.then(function(u){l._onPooledPromiseFulfilled(a,u)},function(u){l._onPooledPromiseRejected(a,u)}).catch(function(u){l._settle(new Error("Promise processing failed: "+u))})},i.prototype._proceed=function(){if(!this._done){for(var a={done:!1};this._size<this._concurrency&&!(a=this._iterator.next()).done;)this._size++,this._trackPromise(a.value);this._done=a===null||!!a.done}this._done&&this._size===0&&this._settle()},i.PromisePoolEvent=s,i.PromisePool=i,i})});var Xe=oe(W=>{"use strict";p();Object.defineProperty(W,"__esModule",{value:!0});W.sanitizeUrl=void 0;var un=/^([^\w]*)(javascript|data|vbscript)/im,pn=/&#(\w+)(^\w|;)?/g,dn=/&(newline|tab);/gi,fn=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,hn=/^.+(:|&colon;)/gim,mn=[".","/"];function En(e){return mn.indexOf(e[0])>-1}function Tn(e){return e.replace(pn,function(t,n){return String.fromCharCode(n)})}function bn(e){var t=Tn(e||"").replace(dn,"").replace(fn,"").trim();if(!t)return"about:blank";if(En(t))return t;var n=t.match(hn);if(!n)return t;var r=n[0];return un.test(r)?"about:blank":t}W.sanitizeUrl=bn});p();p();var ae=class{constructor(t){this.scoreFunction=t}content=[];sinkDown(t){let n=this.content[t],r=this.scoreFunction(n);for(;t>0;){let o=(t+1>>1)-1,s=this.content[o];if(r<this.scoreFunction(s))this.content[t]=s,t=o;else break}this.content[t]=n}bubbleUp(t){let n=this.content.length,r=this.content[t],o=this.scoreFunction(r);for(;;){let s=(t+1<<1)-1,i=s+1,a=t,l=o;if(s<n){let u=this.scoreFunction(this.content[s]);u<l&&(a=s,l=u)}if(i<n&&this.scoreFunction(this.content[i])<l&&(a=i),a===t)break;this.content[t]=this.content[a],t=a}this.content[t]=r}push(t){this.content.push(t),this.sinkDown(this.content.length-1)}pop(){if(this.content.length===0)return null;let t=this.content[0],n=this.content.pop();return this.content.length>0&&(this.content[0]=n,this.bubbleUp(0)),t}remove(t){if(this.content.length===0)return;let n=this.content.indexOf(t),r=this.content.pop();n<this.content.length&&(this.content[n]=r,this.scoreFunction(r)<this.scoreFunction(t)?this.sinkDown(n):this.bubbleUp(n))}size(){return this.content.length}rescoreElement(t){this.sinkDown(this.content.indexOf(t))}};p();var Sn=e=>Array.isArray(e)&&e.length===4&&typeof e[0]=="number"&&typeof e[1]=="number"&&typeof e[2]=="number"&&typeof e[3]=="number";p();p();function U(e){"@babel/helpers - typeof";return U=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},U(e)}var at=/^\s+/,it=/\s+$/;function c(e,t){if(e=e||"",t=t||{},e instanceof c)return e;if(!(this instanceof c))return new c(e,t);var n=lt(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=Math.round(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=n.ok}c.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},getLuminance:function(){var t=this.toRgb(),n,r,o,s,i,a;return n=t.r/255,r=t.g/255,o=t.b/255,n<=.03928?s=n/12.92:s=Math.pow((n+.055)/1.055,2.4),r<=.03928?i=r/12.92:i=Math.pow((r+.055)/1.055,2.4),o<=.03928?a=o/12.92:a=Math.pow((o+.055)/1.055,2.4),.2126*s+.7152*i+.0722*a},setAlpha:function(t){return this._a=fe(t),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var t=le(this._r,this._g,this._b);return{h:t.h*360,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=le(this._r,this._g,this._b),n=Math.round(t.h*360),r=Math.round(t.s*100),o=Math.round(t.v*100);return this._a==1?"hsv("+n+", "+r+"%, "+o+"%)":"hsva("+n+", "+r+"%, "+o+"%, "+this._roundA+")"},toHsl:function(){var t=ie(this._r,this._g,this._b);return{h:t.h*360,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=ie(this._r,this._g,this._b),n=Math.round(t.h*360),r=Math.round(t.s*100),o=Math.round(t.l*100);return this._a==1?"hsl("+n+", "+r+"%, "+o+"%)":"hsla("+n+", "+r+"%, "+o+"%, "+this._roundA+")"},toHex:function(t){return ce(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return dt(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return"#"+this.toHex8(t)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(E(this._r,255)*100)+"%",g:Math.round(E(this._g,255)*100)+"%",b:Math.round(E(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(E(this._r,255)*100)+"%, "+Math.round(E(this._g,255)*100)+"%, "+Math.round(E(this._b,255)*100)+"%)":"rgba("+Math.round(E(this._r,255)*100)+"%, "+Math.round(E(this._g,255)*100)+"%, "+Math.round(E(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:vt[ce(this._r,this._g,this._b,!0)]||!1},toFilter:function(t){var n="#"+ue(this._r,this._g,this._b,this._a),r=n,o=this._gradientType?"GradientType = 1, ":"";if(t){var s=c(t);r="#"+ue(s._r,s._g,s._b,s._a)}return"progid:DXImageTransform.Microsoft.gradient("+o+"startColorstr="+n+",endColorstr="+r+")"},toString:function(t){var n=!!t;t=t||this._format;var r=!1,o=this._a<1&&this._a>=0,s=!n&&o&&(t==="hex"||t==="hex6"||t==="hex3"||t==="hex4"||t==="hex8"||t==="name");return s?t==="name"&&this._a===0?this.toName():this.toRgbString():(t==="rgb"&&(r=this.toRgbString()),t==="prgb"&&(r=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(r=this.toHexString()),t==="hex3"&&(r=this.toHexString(!0)),t==="hex4"&&(r=this.toHex8String(!0)),t==="hex8"&&(r=this.toHex8String()),t==="name"&&(r=this.toName()),t==="hsl"&&(r=this.toHslString()),t==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},clone:function(){return c(this.toString())},_applyModification:function(t,n){var r=t.apply(null,[this].concat([].slice.call(n)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(Et,arguments)},brighten:function(){return this._applyModification(Tt,arguments)},darken:function(){return this._applyModification(bt,arguments)},desaturate:function(){return this._applyModification(ft,arguments)},saturate:function(){return this._applyModification(ht,arguments)},greyscale:function(){return this._applyModification(mt,arguments)},spin:function(){return this._applyModification(gt,arguments)},_applyCombination:function(t,n){return t.apply(null,[this].concat([].slice.call(n)))},analogous:function(){return this._applyCombination(xt,arguments)},complement:function(){return this._applyCombination(_t,arguments)},monochromatic:function(){return this._applyCombination(yt,arguments)},splitcomplement:function(){return this._applyCombination(At,arguments)},triad:function(){return this._applyCombination(pe,[3])},tetrad:function(){return this._applyCombination(pe,[4])}};c.fromRatio=function(e,t){if(U(e)=="object"){var n={};for(var r in e)e.hasOwnProperty(r)&&(r==="a"?n[r]=e[r]:n[r]=F(e[r]));e=n}return c(e,t)};function lt(e){var t={r:0,g:0,b:0},n=1,r=null,o=null,s=null,i=!1,a=!1;return typeof e=="string"&&(e=Lt(e)),U(e)=="object"&&(y(e.r)&&y(e.g)&&y(e.b)?(t=ct(e.r,e.g,e.b),i=!0,a=String(e.r).substr(-1)==="%"?"prgb":"rgb"):y(e.h)&&y(e.s)&&y(e.v)?(r=F(e.s),o=F(e.v),t=pt(e.h,r,o),i=!0,a="hsv"):y(e.h)&&y(e.s)&&y(e.l)&&(r=F(e.s),s=F(e.l),t=ut(e.h,r,s),i=!0,a="hsl"),e.hasOwnProperty("a")&&(n=e.a)),n=fe(n),{ok:i,format:e.format||a,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}function ct(e,t,n){return{r:E(e,255)*255,g:E(t,255)*255,b:E(n,255)*255}}function ie(e,t,n){e=E(e,255),t=E(t,255),n=E(n,255);var r=Math.max(e,t,n),o=Math.min(e,t,n),s,i,a=(r+o)/2;if(r==o)s=i=0;else{var l=r-o;switch(i=a>.5?l/(2-r-o):l/(r+o),r){case e:s=(t-n)/l+(t<n?6:0);break;case t:s=(n-e)/l+2;break;case n:s=(e-t)/l+4;break}s/=6}return{h:s,s:i,l:a}}function ut(e,t,n){var r,o,s;e=E(e,360),t=E(t,100),n=E(n,100);function i(u,f,T){return T<0&&(T+=1),T>1&&(T-=1),T<1/6?u+(f-u)*6*T:T<1/2?f:T<2/3?u+(f-u)*(2/3-T)*6:u}if(t===0)r=o=s=n;else{var a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;r=i(l,a,e+1/3),o=i(l,a,e),s=i(l,a,e-1/3)}return{r:r*255,g:o*255,b:s*255}}function le(e,t,n){e=E(e,255),t=E(t,255),n=E(n,255);var r=Math.max(e,t,n),o=Math.min(e,t,n),s,i,a=r,l=r-o;if(i=r===0?0:l/r,r==o)s=0;else{switch(r){case e:s=(t-n)/l+(t<n?6:0);break;case t:s=(n-e)/l+2;break;case n:s=(e-t)/l+4;break}s/=6}return{h:s,s:i,v:a}}function pt(e,t,n){e=E(e,360)*6,t=E(t,100),n=E(n,100);var r=Math.floor(e),o=e-r,s=n*(1-t),i=n*(1-o*t),a=n*(1-(1-o)*t),l=r%6,u=[n,i,s,s,a,n][l],f=[a,n,n,i,s,s][l],T=[s,s,a,n,n,i][l];return{r:u*255,g:f*255,b:T*255}}function ce(e,t,n,r){var o=[x(Math.round(e).toString(16)),x(Math.round(t).toString(16)),x(Math.round(n).toString(16))];return r&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0):o.join("")}function dt(e,t,n,r,o){var s=[x(Math.round(e).toString(16)),x(Math.round(t).toString(16)),x(Math.round(n).toString(16)),x(he(r))];return o&&s[0].charAt(0)==s[0].charAt(1)&&s[1].charAt(0)==s[1].charAt(1)&&s[2].charAt(0)==s[2].charAt(1)&&s[3].charAt(0)==s[3].charAt(1)?s[0].charAt(0)+s[1].charAt(0)+s[2].charAt(0)+s[3].charAt(0):s.join("")}function ue(e,t,n,r){var o=[x(he(r)),x(Math.round(e).toString(16)),x(Math.round(t).toString(16)),x(Math.round(n).toString(16))];return o.join("")}c.equals=function(e,t){return!e||!t?!1:c(e).toRgbString()==c(t).toRgbString()};c.random=function(){return c.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function ft(e,t){t=t===0?0:t||10;var n=c(e).toHsl();return n.s-=t/100,n.s=N(n.s),c(n)}function ht(e,t){t=t===0?0:t||10;var n=c(e).toHsl();return n.s+=t/100,n.s=N(n.s),c(n)}function mt(e){return c(e).desaturate(100)}function Et(e,t){t=t===0?0:t||10;var n=c(e).toHsl();return n.l+=t/100,n.l=N(n.l),c(n)}function Tt(e,t){t=t===0?0:t||10;var n=c(e).toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(t/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(t/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(t/100)))),c(n)}function bt(e,t){t=t===0?0:t||10;var n=c(e).toHsl();return n.l-=t/100,n.l=N(n.l),c(n)}function gt(e,t){var n=c(e).toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,c(n)}function _t(e){var t=c(e).toHsl();return t.h=(t.h+180)%360,c(t)}function pe(e,t){if(isNaN(t)||t<=0)throw new Error("Argument to polyad must be a positive number");for(var n=c(e).toHsl(),r=[c(e)],o=360/t,s=1;s<t;s++)r.push(c({h:(n.h+s*o)%360,s:n.s,l:n.l}));return r}function At(e){var t=c(e).toHsl(),n=t.h;return[c(e),c({h:(n+72)%360,s:t.s,l:t.l}),c({h:(n+216)%360,s:t.s,l:t.l})]}function xt(e,t,n){t=t||6,n=n||30;var r=c(e).toHsl(),o=360/n,s=[c(e)];for(r.h=(r.h-(o*t>>1)+720)%360;--t;)r.h=(r.h+o)%360,s.push(c(r));return s}function yt(e,t){t=t||6;for(var n=c(e).toHsv(),r=n.h,o=n.s,s=n.v,i=[],a=1/t;t--;)i.push(c({h:r,s:o,v:s})),s=(s+a)%1;return i}c.mix=function(e,t,n){n=n===0?0:n||50;var r=c(e).toRgb(),o=c(t).toRgb(),s=n/100,i={r:(o.r-r.r)*s+r.r,g:(o.g-r.g)*s+r.g,b:(o.b-r.b)*s+r.b,a:(o.a-r.a)*s+r.a};return c(i)};c.readability=function(e,t){var n=c(e),r=c(t);return(Math.max(n.getLuminance(),r.getLuminance())+.05)/(Math.min(n.getLuminance(),r.getLuminance())+.05)};c.isReadable=function(e,t,n){var r=c.readability(e,t),o,s;switch(s=!1,o=Ot(n),o.level+o.size){case"AAsmall":case"AAAlarge":s=r>=4.5;break;case"AAlarge":s=r>=3;break;case"AAAsmall":s=r>=7;break}return s};c.mostReadable=function(e,t,n){var r=null,o=0,s,i,a,l;n=n||{},i=n.includeFallbackColors,a=n.level,l=n.size;for(var u=0;u<t.length;u++)s=c.readability(e,t[u]),s>o&&(o=s,r=c(t[u]));return c.isReadable(e,r,{level:a,size:l})||!i?r:(n.includeFallbackColors=!1,c.mostReadable(e,["#fff","#000"],n))};var j=c.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},vt=c.hexNames=St(j);function St(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}function fe(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function E(e,t){Mt(e)&&(e="100%");var n=Rt(e);return e=Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),Math.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function N(e){return Math.min(1,Math.max(0,e))}function g(e){return parseInt(e,16)}function Mt(e){return typeof e=="string"&&e.indexOf(".")!=-1&&parseFloat(e)===1}function Rt(e){return typeof e=="string"&&e.indexOf("%")!=-1}function x(e){return e.length==1?"0"+e:""+e}function F(e){return e<=1&&(e=e*100+"%"),e}function he(e){return Math.round(parseFloat(e)*255).toString(16)}function de(e){return g(e)/255}var A=function(){var e="[-\\+]?\\d+%?",t="[-\\+]?\\d*\\.\\d+%?",n="(?:"+t+")|(?:"+e+")",r="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?",o="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?";return{CSS_UNIT:new RegExp(n),rgb:new RegExp("rgb"+r),rgba:new RegExp("rgba"+o),hsl:new RegExp("hsl"+r),hsla:new RegExp("hsla"+o),hsv:new RegExp("hsv"+r),hsva:new RegExp("hsva"+o),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function y(e){return!!A.CSS_UNIT.exec(e)}function Lt(e){e=e.replace(at,"").replace(it,"").toLowerCase();var t=!1;if(j[e])e=j[e],t=!0;else if(e=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n;return(n=A.rgb.exec(e))?{r:n[1],g:n[2],b:n[3]}:(n=A.rgba.exec(e))?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=A.hsl.exec(e))?{h:n[1],s:n[2],l:n[3]}:(n=A.hsla.exec(e))?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=A.hsv.exec(e))?{h:n[1],s:n[2],v:n[3]}:(n=A.hsva.exec(e))?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=A.hex8.exec(e))?{r:g(n[1]),g:g(n[2]),b:g(n[3]),a:de(n[4]),format:t?"name":"hex8"}:(n=A.hex6.exec(e))?{r:g(n[1]),g:g(n[2]),b:g(n[3]),format:t?"name":"hex"}:(n=A.hex4.exec(e))?{r:g(n[1]+""+n[1]),g:g(n[2]+""+n[2]),b:g(n[3]+""+n[3]),a:de(n[4]+""+n[4]),format:t?"name":"hex8"}:(n=A.hex3.exec(e))?{r:g(n[1]+""+n[1]),g:g(n[2]+""+n[2]),b:g(n[3]+""+n[3]),format:t?"name":"hex"}:!1}function Ot(e){var t,n;return e=e||{level:"AA",size:"small"},t=(e.level||"AA").toUpperCase(),n=(e.size||"small").toLowerCase(),t!=="AA"&&t!=="AAA"&&(t="AA"),n!=="small"&&n!=="large"&&(n="small"),{level:t,size:n}}import{clamp as me}from"@excalidraw/math";import{degreesToRadians as wt}from"@excalidraw/math";var q=typeof window<"u"?new Map:null;function Ft(e,t,n,r){let o=e/255,s=t/255,i=n/255,a=wt(r),l=Math.cos(a),u=Math.sin(a),f=[.213+l*.787-u*.213,.715-l*.715-u*.715,.072-l*.072+u*.928,.213-l*.213+u*.143,.715+l*.285+u*.14,.072-l*.072-u*.283,.213-l*.213-u*.787,.715-l*.715+u*.715,.072+l*.928+u*.072],T=o*f[0]+s*f[1]+i*f[2],O=o*f[3]+s*f[4]+i*f[5],_=o*f[6]+s*f[7]+i*f[8];return{r:Math.round(Math.max(0,Math.min(1,T))*255),g:Math.round(Math.max(0,Math.min(1,O))*255),b:Math.round(Math.max(0,Math.min(1,_))*255)}}var It=(e,t,n,r)=>{let o=me(r,0,100)/100,s=u=>{let f=u*(1-o)+(255-u)*o;return Math.round(me(f,0,255))},i=s(e),a=s(t),l=s(n);return{r:i,g:a,b:l}},Cn=e=>{let t=q?.get(e);if(t)return t;let n=c(e),r=n.getAlpha(),o=n.toRgb(),s=It(o.r,o.g,o.b,93),i=Ft(s.r,s.g,s.b,180),a=Te(i.r,i.g,i.b,r);return q&&q.set(e,a),a},Ct=(e,t)=>t.reduce((n,r)=>(r in e&&(n[r]=e[r]),n),{}),Pn=5,Dn=5,kn=4,H=4,G=1,d={transparent:"transparent",black:"#1e1e1e",white:"#ffffff",gray:["#f8f9fa","#e9ecef","#ced4da","#868e96","#343a40"],red:["#fff5f5","#ffc9c9","#ff8787","#fa5252","#e03131"],pink:["#fff0f6","#fcc2d7","#f783ac","#e64980","#c2255c"],grape:["#f8f0fc","#eebefa","#da77f2","#be4bdb","#9c36b5"],violet:["#f3f0ff","#d0bfff","#9775fa","#7950f2","#6741d9"],blue:["#e7f5ff","#a5d8ff","#4dabf7","#228be6","#1971c2"],cyan:["#e3fafc","#99e9f2","#3bc9db","#15aabf","#0c8599"],teal:["#e6fcf5","#96f2d7","#38d9a9","#12b886","#099268"],green:["#ebfbee","#b2f2bb","#69db7c","#40c057","#2f9e44"],yellow:["#fff9db","#ffec99","#ffd43b","#fab005","#f08c00"],orange:["#fff4e6","#ffd8a8","#ffa94d","#fd7e14","#e8590c"],bronze:["#f8f1ee","#eaddd7","#d2bab0","#a18072","#846358"]},Ee=Ct(d,["cyan","blue","violet","grape","pink","green","teal","yellow","orange","red"]),Un=[d.black,d.red[H],d.green[H],d.blue[H],d.yellow[H]],Nn=[d.transparent,d.red[G],d.green[G],d.blue[G],d.yellow[G]],Hn=[d.white,"#f8f9fa","#f5faff","#fffce8","#fdf8f6"],Gn={transparent:d.transparent,white:d.white,gray:d.gray,black:d.black,bronze:d.bronze,...Ee},Bn={transparent:d.transparent,white:d.white,gray:d.gray,black:d.black,bronze:d.bronze,...Ee},Kn=e=>[d.cyan[e],d.blue[e],d.violet[e],d.grape[e],d.pink[e],d.green[e],d.teal[e],d.yellow[e],d.orange[e],d.red[e]],Te=(e,t,n,r)=>{let o=`#${(16777216+(e<<16)+(t<<8)+n).toString(16).slice(1)}`;if(r!==void 0&&r<1){let s=Math.round(r*255).toString(16).padStart(2,"0");return`${o}${s}`}return o},Vn=e=>{let t=c(e);if(!t.isValid())return null;let{r:n,g:r,b:o,a:s}=t.toRgb();return Te(n,r,o,s)},be=e=>c(e).getAlpha()===0,Wn=240,Pt=(e,t,n)=>(e*299+t*587+n*114)/1e3,Yn=(e,t=160)=>{if(!e)return!0;if(be(e))return!1;let n=c(e);if(!n.isValid())return!0;let{r,g:o,b:s}=n.toRgb();return Pt(r,o,s)<t},$n=e=>{if(e=e.trim(),be(e))return e;let t=c(e);return t.isValid()?["hex","hex8"].includes(t.getFormat())&&!e.startsWith("#")?`#${e}`:e:null};p();var qn=typeof window<"u"&&"ResizeObserver"in window,Zn="Excalidraw",Qn=36,Jn=10,er=20,tr=8,nr=5,rr=1,or=30,sr=Math.PI/12,ar="red",ir={TEXT:"text",CROSSHAIR:"crosshair",GRABBING:"grabbing",GRAB:"grab",POINTER:"pointer",MOVE:"move",AUTO:""},lr={MAIN:0,WHEEL:1,SECONDARY:2,TOUCH:-1,ERASER:5},cr={enabled:"all",disabled:"none",inheritFromUI:"var(--ui-pointerEvents)"},Dt=(h=>(h.COPY="copy",h.PASTE="paste",h.CUT="cut",h.KEYDOWN="keydown",h.KEYUP="keyup",h.MOUSE_MOVE="mousemove",h.RESIZE="resize",h.UNLOAD="unload",h.FOCUS="focus",h.BLUR="blur",h.DRAG_OVER="dragover",h.DROP="drop",h.GESTURE_END="gestureend",h.BEFORE_UNLOAD="beforeunload",h.GESTURE_START="gesturestart",h.GESTURE_CHANGE="gesturechange",h.POINTER_MOVE="pointermove",h.POINTER_DOWN="pointerdown",h.POINTER_UP="pointerup",h.STATE_CHANGE="statechange",h.WHEEL="wheel",h.TOUCH_START="touchstart",h.TOUCH_END="touchend",h.HASHCHANGE="hashchange",h.VISIBILITY_CHANGE="visibilitychange",h.SCROLL="scroll",h.EXCALIDRAW_LINK="excalidraw-link",h.MENU_ITEM_SELECT="menu.itemSelect",h.MESSAGE="message",h.FULLSCREENCHANGE="fullscreenchange",h))(Dt||{}),ur={UNSTARTED:-1,ENDED:0,PLAYING:1,PAUSED:2,BUFFERING:3,CUED:5},B={TEST:"test",DEVELOPMENT:"development",PRODUCTION:"production"},pr={SIDEBAR:"sidebar",SHAPE_ACTIONS_MENU:"App-menu__left",ZOOM_ACTIONS:"zoom-actions",SEARCH_MENU_INPUT_WRAPPER:"layer-ui__search-inputWrapper",CONVERT_ELEMENT_TYPE_POPUP:"ConvertElementTypePopup",SHAPE_ACTIONS_THEME_SCOPE:"shape-actions-theme-scope",FRAME_NAME:"frame-name",DROPDOWN_MENU_EVENT_WRAPPER:"dropdown-menu-event-wrapper"},dr={sm:16,md:20,lg:28,xl:36},_e="Xiaolai",I="Segoe UI Emoji",b={Virgil:1,Helvetica:2,Cascadia:3,Excalifont:5,Nunito:6,"Lilita One":7,"Comic Shanns":8,"Liberation Sans":9,Assistant:10},Ae="sans-serif",xe="monospace",kt={[Ae]:998,[xe]:999},Z={[_e]:100,...kt,[I]:1e3};function Ut(e){switch(e){case b.Cascadia:case b["Comic Shanns"]:return xe;default:return Ae}}var ye=e=>{let t=Ut(e);switch(e){case b.Excalifont:return[_e,t,I];default:return[t,I]}},fr={LIGHT:"light",DARK:"dark"},hr="invert(93%) hue-rotate(180deg)",mr={strokeColor:"#bbb",strokeWidth:2,strokeStyle:"solid",fillStyle:"solid",roughness:0,roundness:null,backgroundColor:"transparent",radius:8,nameOffsetY:3,nameColorLightTheme:"#999999",nameColorDarkTheme:"#7a7a7a",nameFontSize:14,nameLineHeight:1.25},Er=1,Tr=20,br=b.Excalifont,gr="left",_r="top",ve="{version}",Nt=2,Ht=2*Nt,Gt=1e-5,Ar=2*Ht-Gt,xr="#ffffff",yr="#1e1e1e",vr="#a2f1a6",Sr=["selectAll"],Mr=20,Rr=5,Se={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"},Bt={text:"text/plain",html:"text/html",json:"application/json",excalidraw:"application/vnd.excalidraw+json",excalidrawClipboard:"application/vnd.excalidraw.clipboard+json",excalidrawlib:"application/vnd.excalidrawlib+json",excalidrawlibIds:"application/vnd.excalidrawlib.ids+json"},ge={...Bt,"excalidraw.svg":"image/svg+xml","excalidraw.png":"image/png",binary:"application/octet-stream",...Se},Lr=[ge.text,ge.html,...Object.values(Se)],Or={png:"png",svg:"svg",clipboard:"clipboard"},wr={excalidraw:"excalidraw",excalidrawClipboard:"excalidraw/clipboard",excalidrawLibrary:"excalidrawlib",excalidrawClipboardWithAPI:"excalidraw-api/clipboard"},Fr=()=>window.EXCALIDRAW_EXPORT_SOURCE||window.location.origin,Ir=500,Cr=300,Pr=500,Dr=1e4,kr=3e4,Ur=100,Nr=.1,Hr=.1,Gr=30,Br=300,Kr=6e4,Vr=3e3,Wr={addLibrary:"addLibrary"},Yr={addLibrary:"addLibrary"},$r={canvasActions:{changeViewBackgroundColor:!0,export:{saveFileToDisk:!0},loadScene:!0,saveToActiveFile:!0,toggleTheme:null,saveAsImage:!0},tools:{image:!0}},Xr=2,zr=[1,2,3],jr=10,qr=1440,Zr=100*1024*1024,Qr="http://www.w3.org/2000/svg",Jr=`<?xml version="1.0" standalone="no"?>
1
+ var Qe=Object.create;var re=Object.defineProperty;var Je=Object.getOwnPropertyDescriptor;var et=Object.getOwnPropertyNames;var tt=Object.getPrototypeOf,nt=Object.prototype.hasOwnProperty;var rt=(e,t)=>()=>(e&&(t=e(e=0)),t);var oe=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var ot=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of et(t))!nt.call(e,o)&&o!==n&&re(e,o,{get:()=>t[o],enumerable:!(r=Je(t,o))||r.enumerable});return e};var se=(e,t,n)=>(n=e!=null?Qe(tt(e)):{},ot(t||!e||!e.__esModule?re(n,"default",{value:e,enumerable:!0}):n,e));var m,p=rt(()=>{m={PROD:!0}});var ke=oe((Q,Pe)=>{p();(function(e,t){typeof define=="function"&&define.amd?define([],t):typeof Q=="object"?Pe.exports=t():(e.PromisePool=t(),e.promisePool=e.PromisePool)})(Q,function(){"use strict";var e=function(){this._listeners={}};e.prototype.addEventListener=function(a,l){this._listeners[a]=this._listeners[a]||[],this._listeners[a].indexOf(l)<0&&this._listeners[a].push(l)},e.prototype.removeEventListener=function(a,l){if(this._listeners[a]){var u=this._listeners[a].indexOf(l);u>=0&&this._listeners[a].splice(u,1)}},e.prototype.dispatchEvent=function(a){if(this._listeners[a.type]&&this._listeners[a.type].length)for(var l=this._listeners[a.type].slice(),u=0,d=l.length;u<d;++u)l[u].call(this,a)};var t=function(a){return typeof a.constructor=="function"&&a.constructor.name==="GeneratorFunction"},n=function(a){return{next:function(){var l=a();return l?{value:l}:{done:!0}}}},r=function(a){var l=!1;return{next:function(){return l?{done:!0}:(l=!0,{value:a})}}},o=function(a,l){var u=typeof a;if(u==="object"){if(typeof a.next=="function")return a;if(typeof a.then=="function")return r(a)}return u==="function"?t(a)?a():n(a):r(l.resolve(a))},s=function(a,l,u){this.target=a,this.type=l,this.data=u},i=function(a,l,u){if(e.call(this),typeof l!="number"||Math.floor(l)!==l||l<1)throw new Error("Invalid concurrency");this._concurrency=l,this._options=u||{},this._options.promise=this._options.promise||Promise,this._iterator=o(a,this._options.promise),this._done=!1,this._size=0,this._promise=null,this._callbacks=null};return i.prototype=new e,i.prototype.constructor=i,i.prototype.concurrency=function(a){return typeof a<"u"&&(this._concurrency=a,this.active()&&this._proceed()),this._concurrency},i.prototype.size=function(){return this._size},i.prototype.active=function(){return!!this._promise},i.prototype.promise=function(){return this._promise},i.prototype.start=function(){var a=this,l=this._options.promise;return this._promise=new l(function(u,d){a._callbacks={reject:d,resolve:u},a._proceed()}),this._promise},i.prototype._fireEvent=function(a,l){this.dispatchEvent(new s(this,a,l))},i.prototype._settle=function(a){a?this._callbacks.reject(a):this._callbacks.resolve(),this._promise=null,this._callbacks=null},i.prototype._onPooledPromiseFulfilled=function(a,l){this._size--,this.active()&&(this._fireEvent("fulfilled",{promise:a,result:l}),this._proceed())},i.prototype._onPooledPromiseRejected=function(a,l){this._size--,this.active()&&(this._fireEvent("rejected",{promise:a,error:l}),this._settle(l||new Error("Unknown error")))},i.prototype._trackPromise=function(a){var l=this;a.then(function(u){l._onPooledPromiseFulfilled(a,u)},function(u){l._onPooledPromiseRejected(a,u)}).catch(function(u){l._settle(new Error("Promise processing failed: "+u))})},i.prototype._proceed=function(){if(!this._done){for(var a={done:!1};this._size<this._concurrency&&!(a=this._iterator.next()).done;)this._size++,this._trackPromise(a.value);this._done=a===null||!!a.done}this._done&&this._size===0&&this._settle()},i.PromisePoolEvent=s,i.PromisePool=i,i})});var Xe=oe(W=>{"use strict";p();Object.defineProperty(W,"__esModule",{value:!0});W.sanitizeUrl=void 0;var un=/^([^\w]*)(javascript|data|vbscript)/im,pn=/&#(\w+)(^\w|;)?/g,fn=/&(newline|tab);/gi,dn=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,hn=/^.+(:|&colon;)/gim,mn=[".","/"];function Tn(e){return mn.indexOf(e[0])>-1}function En(e){return e.replace(pn,function(t,n){return String.fromCharCode(n)})}function gn(e){var t=En(e||"").replace(fn,"").replace(dn,"").trim();if(!t)return"about:blank";if(Tn(t))return t;var n=t.match(hn);if(!n)return t;var r=n[0];return un.test(r)?"about:blank":t}W.sanitizeUrl=gn});p();p();var ae=class{constructor(t){this.scoreFunction=t}content=[];sinkDown(t){let n=this.content[t],r=this.scoreFunction(n);for(;t>0;){let o=(t+1>>1)-1,s=this.content[o];if(r<this.scoreFunction(s))this.content[t]=s,t=o;else break}this.content[t]=n}bubbleUp(t){let n=this.content.length,r=this.content[t],o=this.scoreFunction(r);for(;;){let s=(t+1<<1)-1,i=s+1,a=t,l=o;if(s<n){let u=this.scoreFunction(this.content[s]);u<l&&(a=s,l=u)}if(i<n&&this.scoreFunction(this.content[i])<l&&(a=i),a===t)break;this.content[t]=this.content[a],t=a}this.content[t]=r}push(t){this.content.push(t),this.sinkDown(this.content.length-1)}pop(){if(this.content.length===0)return null;let t=this.content[0],n=this.content.pop();return this.content.length>0&&(this.content[0]=n,this.bubbleUp(0)),t}remove(t){if(this.content.length===0)return;let n=this.content.indexOf(t),r=this.content.pop();n<this.content.length&&(this.content[n]=r,this.scoreFunction(r)<this.scoreFunction(t)?this.sinkDown(n):this.bubbleUp(n))}size(){return this.content.length}rescoreElement(t){this.sinkDown(this.content.indexOf(t))}};p();var Mn=e=>Array.isArray(e)&&e.length===4&&typeof e[0]=="number"&&typeof e[1]=="number"&&typeof e[2]=="number"&&typeof e[3]=="number";p();p();function U(e){"@babel/helpers - typeof";return U=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},U(e)}var at=/^\s+/,it=/\s+$/;function c(e,t){if(e=e||"",t=t||{},e instanceof c)return e;if(!(this instanceof c))return new c(e,t);var n=lt(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=Math.round(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=n.ok}c.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},getLuminance:function(){var t=this.toRgb(),n,r,o,s,i,a;return n=t.r/255,r=t.g/255,o=t.b/255,n<=.03928?s=n/12.92:s=Math.pow((n+.055)/1.055,2.4),r<=.03928?i=r/12.92:i=Math.pow((r+.055)/1.055,2.4),o<=.03928?a=o/12.92:a=Math.pow((o+.055)/1.055,2.4),.2126*s+.7152*i+.0722*a},setAlpha:function(t){return this._a=de(t),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var t=le(this._r,this._g,this._b);return{h:t.h*360,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=le(this._r,this._g,this._b),n=Math.round(t.h*360),r=Math.round(t.s*100),o=Math.round(t.v*100);return this._a==1?"hsv("+n+", "+r+"%, "+o+"%)":"hsva("+n+", "+r+"%, "+o+"%, "+this._roundA+")"},toHsl:function(){var t=ie(this._r,this._g,this._b);return{h:t.h*360,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=ie(this._r,this._g,this._b),n=Math.round(t.h*360),r=Math.round(t.s*100),o=Math.round(t.l*100);return this._a==1?"hsl("+n+", "+r+"%, "+o+"%)":"hsla("+n+", "+r+"%, "+o+"%, "+this._roundA+")"},toHex:function(t){return ce(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return ft(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return"#"+this.toHex8(t)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(T(this._r,255)*100)+"%",g:Math.round(T(this._g,255)*100)+"%",b:Math.round(T(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(T(this._r,255)*100)+"%, "+Math.round(T(this._g,255)*100)+"%, "+Math.round(T(this._b,255)*100)+"%)":"rgba("+Math.round(T(this._r,255)*100)+"%, "+Math.round(T(this._g,255)*100)+"%, "+Math.round(T(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:vt[ce(this._r,this._g,this._b,!0)]||!1},toFilter:function(t){var n="#"+ue(this._r,this._g,this._b,this._a),r=n,o=this._gradientType?"GradientType = 1, ":"";if(t){var s=c(t);r="#"+ue(s._r,s._g,s._b,s._a)}return"progid:DXImageTransform.Microsoft.gradient("+o+"startColorstr="+n+",endColorstr="+r+")"},toString:function(t){var n=!!t;t=t||this._format;var r=!1,o=this._a<1&&this._a>=0,s=!n&&o&&(t==="hex"||t==="hex6"||t==="hex3"||t==="hex4"||t==="hex8"||t==="name");return s?t==="name"&&this._a===0?this.toName():this.toRgbString():(t==="rgb"&&(r=this.toRgbString()),t==="prgb"&&(r=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(r=this.toHexString()),t==="hex3"&&(r=this.toHexString(!0)),t==="hex4"&&(r=this.toHex8String(!0)),t==="hex8"&&(r=this.toHex8String()),t==="name"&&(r=this.toName()),t==="hsl"&&(r=this.toHslString()),t==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},clone:function(){return c(this.toString())},_applyModification:function(t,n){var r=t.apply(null,[this].concat([].slice.call(n)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(Tt,arguments)},brighten:function(){return this._applyModification(Et,arguments)},darken:function(){return this._applyModification(gt,arguments)},desaturate:function(){return this._applyModification(dt,arguments)},saturate:function(){return this._applyModification(ht,arguments)},greyscale:function(){return this._applyModification(mt,arguments)},spin:function(){return this._applyModification(bt,arguments)},_applyCombination:function(t,n){return t.apply(null,[this].concat([].slice.call(n)))},analogous:function(){return this._applyCombination(xt,arguments)},complement:function(){return this._applyCombination(_t,arguments)},monochromatic:function(){return this._applyCombination(yt,arguments)},splitcomplement:function(){return this._applyCombination(At,arguments)},triad:function(){return this._applyCombination(pe,[3])},tetrad:function(){return this._applyCombination(pe,[4])}};c.fromRatio=function(e,t){if(U(e)=="object"){var n={};for(var r in e)e.hasOwnProperty(r)&&(r==="a"?n[r]=e[r]:n[r]=w(e[r]));e=n}return c(e,t)};function lt(e){var t={r:0,g:0,b:0},n=1,r=null,o=null,s=null,i=!1,a=!1;return typeof e=="string"&&(e=Ot(e)),U(e)=="object"&&(y(e.r)&&y(e.g)&&y(e.b)?(t=ct(e.r,e.g,e.b),i=!0,a=String(e.r).substr(-1)==="%"?"prgb":"rgb"):y(e.h)&&y(e.s)&&y(e.v)?(r=w(e.s),o=w(e.v),t=pt(e.h,r,o),i=!0,a="hsv"):y(e.h)&&y(e.s)&&y(e.l)&&(r=w(e.s),s=w(e.l),t=ut(e.h,r,s),i=!0,a="hsl"),e.hasOwnProperty("a")&&(n=e.a)),n=de(n),{ok:i,format:e.format||a,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}function ct(e,t,n){return{r:T(e,255)*255,g:T(t,255)*255,b:T(n,255)*255}}function ie(e,t,n){e=T(e,255),t=T(t,255),n=T(n,255);var r=Math.max(e,t,n),o=Math.min(e,t,n),s,i,a=(r+o)/2;if(r==o)s=i=0;else{var l=r-o;switch(i=a>.5?l/(2-r-o):l/(r+o),r){case e:s=(t-n)/l+(t<n?6:0);break;case t:s=(n-e)/l+2;break;case n:s=(e-t)/l+4;break}s/=6}return{h:s,s:i,l:a}}function ut(e,t,n){var r,o,s;e=T(e,360),t=T(t,100),n=T(n,100);function i(u,d,E){return E<0&&(E+=1),E>1&&(E-=1),E<1/6?u+(d-u)*6*E:E<1/2?d:E<2/3?u+(d-u)*(2/3-E)*6:u}if(t===0)r=o=s=n;else{var a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;r=i(l,a,e+1/3),o=i(l,a,e),s=i(l,a,e-1/3)}return{r:r*255,g:o*255,b:s*255}}function le(e,t,n){e=T(e,255),t=T(t,255),n=T(n,255);var r=Math.max(e,t,n),o=Math.min(e,t,n),s,i,a=r,l=r-o;if(i=r===0?0:l/r,r==o)s=0;else{switch(r){case e:s=(t-n)/l+(t<n?6:0);break;case t:s=(n-e)/l+2;break;case n:s=(e-t)/l+4;break}s/=6}return{h:s,s:i,v:a}}function pt(e,t,n){e=T(e,360)*6,t=T(t,100),n=T(n,100);var r=Math.floor(e),o=e-r,s=n*(1-t),i=n*(1-o*t),a=n*(1-(1-o)*t),l=r%6,u=[n,i,s,s,a,n][l],d=[a,n,n,i,s,s][l],E=[s,s,a,n,n,i][l];return{r:u*255,g:d*255,b:E*255}}function ce(e,t,n,r){var o=[x(Math.round(e).toString(16)),x(Math.round(t).toString(16)),x(Math.round(n).toString(16))];return r&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0):o.join("")}function ft(e,t,n,r,o){var s=[x(Math.round(e).toString(16)),x(Math.round(t).toString(16)),x(Math.round(n).toString(16)),x(he(r))];return o&&s[0].charAt(0)==s[0].charAt(1)&&s[1].charAt(0)==s[1].charAt(1)&&s[2].charAt(0)==s[2].charAt(1)&&s[3].charAt(0)==s[3].charAt(1)?s[0].charAt(0)+s[1].charAt(0)+s[2].charAt(0)+s[3].charAt(0):s.join("")}function ue(e,t,n,r){var o=[x(he(r)),x(Math.round(e).toString(16)),x(Math.round(t).toString(16)),x(Math.round(n).toString(16))];return o.join("")}c.equals=function(e,t){return!e||!t?!1:c(e).toRgbString()==c(t).toRgbString()};c.random=function(){return c.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function dt(e,t){t=t===0?0:t||10;var n=c(e).toHsl();return n.s-=t/100,n.s=N(n.s),c(n)}function ht(e,t){t=t===0?0:t||10;var n=c(e).toHsl();return n.s+=t/100,n.s=N(n.s),c(n)}function mt(e){return c(e).desaturate(100)}function Tt(e,t){t=t===0?0:t||10;var n=c(e).toHsl();return n.l+=t/100,n.l=N(n.l),c(n)}function Et(e,t){t=t===0?0:t||10;var n=c(e).toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(t/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(t/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(t/100)))),c(n)}function gt(e,t){t=t===0?0:t||10;var n=c(e).toHsl();return n.l-=t/100,n.l=N(n.l),c(n)}function bt(e,t){var n=c(e).toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,c(n)}function _t(e){var t=c(e).toHsl();return t.h=(t.h+180)%360,c(t)}function pe(e,t){if(isNaN(t)||t<=0)throw new Error("Argument to polyad must be a positive number");for(var n=c(e).toHsl(),r=[c(e)],o=360/t,s=1;s<t;s++)r.push(c({h:(n.h+s*o)%360,s:n.s,l:n.l}));return r}function At(e){var t=c(e).toHsl(),n=t.h;return[c(e),c({h:(n+72)%360,s:t.s,l:t.l}),c({h:(n+216)%360,s:t.s,l:t.l})]}function xt(e,t,n){t=t||6,n=n||30;var r=c(e).toHsl(),o=360/n,s=[c(e)];for(r.h=(r.h-(o*t>>1)+720)%360;--t;)r.h=(r.h+o)%360,s.push(c(r));return s}function yt(e,t){t=t||6;for(var n=c(e).toHsv(),r=n.h,o=n.s,s=n.v,i=[],a=1/t;t--;)i.push(c({h:r,s:o,v:s})),s=(s+a)%1;return i}c.mix=function(e,t,n){n=n===0?0:n||50;var r=c(e).toRgb(),o=c(t).toRgb(),s=n/100,i={r:(o.r-r.r)*s+r.r,g:(o.g-r.g)*s+r.g,b:(o.b-r.b)*s+r.b,a:(o.a-r.a)*s+r.a};return c(i)};c.readability=function(e,t){var n=c(e),r=c(t);return(Math.max(n.getLuminance(),r.getLuminance())+.05)/(Math.min(n.getLuminance(),r.getLuminance())+.05)};c.isReadable=function(e,t,n){var r=c.readability(e,t),o,s;switch(s=!1,o=Lt(n),o.level+o.size){case"AAsmall":case"AAAlarge":s=r>=4.5;break;case"AAlarge":s=r>=3;break;case"AAAsmall":s=r>=7;break}return s};c.mostReadable=function(e,t,n){var r=null,o=0,s,i,a,l;n=n||{},i=n.includeFallbackColors,a=n.level,l=n.size;for(var u=0;u<t.length;u++)s=c.readability(e,t[u]),s>o&&(o=s,r=c(t[u]));return c.isReadable(e,r,{level:a,size:l})||!i?r:(n.includeFallbackColors=!1,c.mostReadable(e,["#fff","#000"],n))};var q=c.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},vt=c.hexNames=Mt(q);function Mt(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}function de(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function T(e,t){St(e)&&(e="100%");var n=Rt(e);return e=Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),Math.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function N(e){return Math.min(1,Math.max(0,e))}function b(e){return parseInt(e,16)}function St(e){return typeof e=="string"&&e.indexOf(".")!=-1&&parseFloat(e)===1}function Rt(e){return typeof e=="string"&&e.indexOf("%")!=-1}function x(e){return e.length==1?"0"+e:""+e}function w(e){return e<=1&&(e=e*100+"%"),e}function he(e){return Math.round(parseFloat(e)*255).toString(16)}function fe(e){return b(e)/255}var A=function(){var e="[-\\+]?\\d+%?",t="[-\\+]?\\d*\\.\\d+%?",n="(?:"+t+")|(?:"+e+")",r="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?",o="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?";return{CSS_UNIT:new RegExp(n),rgb:new RegExp("rgb"+r),rgba:new RegExp("rgba"+o),hsl:new RegExp("hsl"+r),hsla:new RegExp("hsla"+o),hsv:new RegExp("hsv"+r),hsva:new RegExp("hsva"+o),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function y(e){return!!A.CSS_UNIT.exec(e)}function Ot(e){e=e.replace(at,"").replace(it,"").toLowerCase();var t=!1;if(q[e])e=q[e],t=!0;else if(e=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n;return(n=A.rgb.exec(e))?{r:n[1],g:n[2],b:n[3]}:(n=A.rgba.exec(e))?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=A.hsl.exec(e))?{h:n[1],s:n[2],l:n[3]}:(n=A.hsla.exec(e))?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=A.hsv.exec(e))?{h:n[1],s:n[2],v:n[3]}:(n=A.hsva.exec(e))?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=A.hex8.exec(e))?{r:b(n[1]),g:b(n[2]),b:b(n[3]),a:fe(n[4]),format:t?"name":"hex8"}:(n=A.hex6.exec(e))?{r:b(n[1]),g:b(n[2]),b:b(n[3]),format:t?"name":"hex"}:(n=A.hex4.exec(e))?{r:b(n[1]+""+n[1]),g:b(n[2]+""+n[2]),b:b(n[3]+""+n[3]),a:fe(n[4]+""+n[4]),format:t?"name":"hex8"}:(n=A.hex3.exec(e))?{r:b(n[1]+""+n[1]),g:b(n[2]+""+n[2]),b:b(n[3]+""+n[3]),format:t?"name":"hex"}:!1}function Lt(e){var t,n;return e=e||{level:"AA",size:"small"},t=(e.level||"AA").toUpperCase(),n=(e.size||"small").toLowerCase(),t!=="AA"&&t!=="AAA"&&(t="AA"),n!=="small"&&n!=="large"&&(n="small"),{level:t,size:n}}import{clamp as me}from"@excalidraw/math";import{degreesToRadians as Ft}from"@excalidraw/math";var j=typeof window<"u"?new Map:null;function wt(e,t,n,r){let o=e/255,s=t/255,i=n/255,a=Ft(r),l=Math.cos(a),u=Math.sin(a),d=[.213+l*.787-u*.213,.715-l*.715-u*.715,.072-l*.072+u*.928,.213-l*.213+u*.143,.715+l*.285+u*.14,.072-l*.072-u*.283,.213-l*.213-u*.787,.715-l*.715+u*.715,.072+l*.928+u*.072],E=o*d[0]+s*d[1]+i*d[2],L=o*d[3]+s*d[4]+i*d[5],_=o*d[6]+s*d[7]+i*d[8];return{r:Math.round(Math.max(0,Math.min(1,E))*255),g:Math.round(Math.max(0,Math.min(1,L))*255),b:Math.round(Math.max(0,Math.min(1,_))*255)}}var It=(e,t,n,r)=>{let o=me(r,0,100)/100,s=u=>{let d=u*(1-o)+(255-u)*o;return Math.round(me(d,0,255))},i=s(e),a=s(t),l=s(n);return{r:i,g:a,b:l}},Cn=e=>{let t=j?.get(e);if(t)return t;let n=c(e),r=n.getAlpha(),o=n.toRgb(),s=It(o.r,o.g,o.b,93),i=wt(s.r,s.g,s.b,180),a=Ee(i.r,i.g,i.b,r);return j&&j.set(e,a),a},Ct=(e,t)=>t.reduce((n,r)=>(r in e&&(n[r]=e[r]),n),{}),Pn=5,kn=5,Dn=4,H=4,G=1,f={transparent:"transparent",black:"#1e1e1e",white:"#ffffff",gray:["#f8f9fa","#e9ecef","#ced4da","#868e96","#343a40"],red:["#fff5f5","#ffc9c9","#ff8787","#fa5252","#e03131"],pink:["#fff0f6","#fcc2d7","#f783ac","#e64980","#c2255c"],grape:["#f8f0fc","#eebefa","#da77f2","#be4bdb","#9c36b5"],violet:["#f3f0ff","#d0bfff","#9775fa","#7950f2","#6741d9"],blue:["#e7f5ff","#a5d8ff","#4dabf7","#228be6","#1971c2"],cyan:["#e3fafc","#99e9f2","#3bc9db","#15aabf","#0c8599"],teal:["#e6fcf5","#96f2d7","#38d9a9","#12b886","#099268"],green:["#ebfbee","#b2f2bb","#69db7c","#40c057","#2f9e44"],yellow:["#fff9db","#ffec99","#ffd43b","#fab005","#f08c00"],orange:["#fff4e6","#ffd8a8","#ffa94d","#fd7e14","#e8590c"],bronze:["#f8f1ee","#eaddd7","#d2bab0","#a18072","#846358"]},Te=Ct(f,["cyan","blue","violet","grape","pink","green","teal","yellow","orange","red"]),Un=[f.black,f.red[H],f.green[H],f.blue[H],f.yellow[H]],Nn=[f.transparent,f.red[G],f.green[G],f.blue[G],f.yellow[G]],Hn=[f.white,"#f8f9fa","#f5faff","#fffce8","#fdf8f6"],Gn={transparent:f.transparent,white:f.white,gray:f.gray,black:f.black,bronze:f.bronze,...Te},Bn={transparent:f.transparent,white:f.white,gray:f.gray,black:f.black,bronze:f.bronze,...Te},Kn=e=>[f.cyan[e],f.blue[e],f.violet[e],f.grape[e],f.pink[e],f.green[e],f.teal[e],f.yellow[e],f.orange[e],f.red[e]],Ee=(e,t,n,r)=>{let o=`#${(16777216+(e<<16)+(t<<8)+n).toString(16).slice(1)}`;if(r!==void 0&&r<1){let s=Math.round(r*255).toString(16).padStart(2,"0");return`${o}${s}`}return o},Vn=e=>{let t=c(e);if(!t.isValid())return null;let{r:n,g:r,b:o,a:s}=t.toRgb();return Ee(n,r,o,s)},ge=e=>c(e).getAlpha()===0,Wn=240,Pt=(e,t,n)=>(e*299+t*587+n*114)/1e3,Yn=(e,t=160)=>{if(!e)return!0;if(ge(e))return!1;let n=c(e);if(!n.isValid())return!0;let{r,g:o,b:s}=n.toRgb();return Pt(r,o,s)<t},$n=e=>{if(e=e.trim(),ge(e))return e;let t=c(e);return t.isValid()?["hex","hex8"].includes(t.getFormat())&&!e.startsWith("#")?`#${e}`:e:null};p();var jn=typeof window<"u"&&"ResizeObserver"in window,Zn="Excalidraw",Qn=36,Jn=10,er=20,tr=8,nr=5,rr=1,or=30,sr=Math.PI/12,ar="red",ir={TEXT:"text",CROSSHAIR:"crosshair",GRABBING:"grabbing",GRAB:"grab",POINTER:"pointer",MOVE:"move",AUTO:""},lr={MAIN:0,WHEEL:1,SECONDARY:2,TOUCH:-1,ERASER:5},cr={enabled:"all",disabled:"none",inheritFromUI:"var(--ui-pointerEvents)"},kt=(h=>(h.COPY="copy",h.PASTE="paste",h.CUT="cut",h.KEYDOWN="keydown",h.KEYUP="keyup",h.MOUSE_MOVE="mousemove",h.RESIZE="resize",h.UNLOAD="unload",h.FOCUS="focus",h.BLUR="blur",h.DRAG_OVER="dragover",h.DROP="drop",h.GESTURE_END="gestureend",h.BEFORE_UNLOAD="beforeunload",h.GESTURE_START="gesturestart",h.GESTURE_CHANGE="gesturechange",h.POINTER_MOVE="pointermove",h.POINTER_DOWN="pointerdown",h.POINTER_UP="pointerup",h.STATE_CHANGE="statechange",h.WHEEL="wheel",h.TOUCH_START="touchstart",h.TOUCH_END="touchend",h.HASHCHANGE="hashchange",h.VISIBILITY_CHANGE="visibilitychange",h.SCROLL="scroll",h.EXCALIDRAW_LINK="excalidraw-link",h.MENU_ITEM_SELECT="menu.itemSelect",h.MESSAGE="message",h.FULLSCREENCHANGE="fullscreenchange",h))(kt||{}),ur={UNSTARTED:-1,ENDED:0,PLAYING:1,PAUSED:2,BUFFERING:3,CUED:5},B={TEST:"test",DEVELOPMENT:"development",PRODUCTION:"production"},pr={SIDEBAR:"sidebar",SHAPE_ACTIONS_MENU:"App-menu__left",ZOOM_ACTIONS:"zoom-actions",SEARCH_MENU_INPUT_WRAPPER:"layer-ui__search-inputWrapper",CONVERT_ELEMENT_TYPE_POPUP:"ConvertElementTypePopup",SHAPE_ACTIONS_THEME_SCOPE:"shape-actions-theme-scope",FRAME_NAME:"frame-name",DROPDOWN_MENU_EVENT_WRAPPER:"dropdown-menu-event-wrapper"},fr={sm:16,md:20,lg:28,xl:36},_e="Xiaolai",I="Segoe UI Emoji",g={Virgil:1,Helvetica:2,Cascadia:3,Excalifont:5,Nunito:6,"Lilita One":7,"Comic Shanns":8,"Liberation Sans":9,Assistant:10},Ae="sans-serif",xe="monospace",Dt={[Ae]:998,[xe]:999},Z={[_e]:100,...Dt,[I]:1e3};function Ut(e){switch(e){case g.Cascadia:case g["Comic Shanns"]:return xe;default:return Ae}}var ye=e=>{let t=Ut(e);switch(e){case g.Excalifont:return[_e,t,I];default:return[t,I]}},dr={LIGHT:"light",DARK:"dark"},hr="invert(93%) hue-rotate(180deg)",mr={strokeColor:"#bbb",strokeWidth:2,strokeStyle:"solid",fillStyle:"solid",roughness:0,roundness:null,backgroundColor:"transparent",radius:8,nameOffsetY:3,nameColorLightTheme:"#999999",nameColorDarkTheme:"#7a7a7a",nameFontSize:14,nameLineHeight:1.25},Tr=1,Er=20,gr=g.Excalifont,br="left",_r="top",ve="{version}",Nt=2,Ht=2*Nt,Gt=1e-5,Ar=2*Ht-Gt,xr="#ffffff",yr="#1e1e1e",vr="#a2f1a6",Mr=["selectAll"],Sr=20,Rr=5,Me={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"},Bt={text:"text/plain",html:"text/html",json:"application/json",excalidraw:"application/vnd.excalidraw+json",excalidrawClipboard:"application/vnd.excalidraw.clipboard+json"},be={...Bt,"excalidraw.svg":"image/svg+xml","excalidraw.png":"image/png",binary:"application/octet-stream",...Me},Or=[be.text,be.html,...Object.values(Me)],Lr={png:"png",svg:"svg",clipboard:"clipboard"},Fr={excalidraw:"excalidraw",excalidrawClipboard:"excalidraw/clipboard",excalidrawClipboardWithAPI:"excalidraw-api/clipboard"},wr=()=>window.EXCALIDRAW_EXPORT_SOURCE||window.location.origin,Ir=500,Cr=300,Pr=500,kr=1e4,Dr=3e4,Ur=100,Nr=.1,Hr=.1,Gr=30,Br=300,Kr=6e4,Vr=3e3,Wr={canvasActions:{changeViewBackgroundColor:!0,export:{saveFileToDisk:!0},loadScene:!0,saveToActiveFile:!0,toggleTheme:null,saveAsImage:!0},tools:{image:!0}},Yr=2,$r=[1,2,3],Xr=10,zr=1440,qr=100*1024*1024,jr="http://www.w3.org/2000/svg",Zr=`<?xml version="1.0" standalone="no"?>
2
2
  <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
3
- `,eo=128,to={excalidraw:2,excalidrawLibrary:2},no=5,ro=.7,oo=11,so={TOP:"top",MIDDLE:"middle",BOTTOM:"bottom"},ao={LEFT:"left",CENTER:"center",RIGHT:"right"},io=20,lo=.25,co=32,uo={LEGACY:1,PROPORTIONAL_RADIUS:2,ADAPTIVE_RADIUS:3},Kt={architect:0,artist:1,cartoonist:2},po={thin:1,bold:2,extraBold:4},fo={strokeColor:d.black,backgroundColor:d.transparent,fillStyle:"solid",strokeWidth:2,strokeStyle:"solid",roughness:Kt.artist,opacity:100,locked:!1},Vt="library",ho="search",mo={name:"default",defaultTab:Vt},Eo=new Set(["iframe","embeddable","image"]),To={selection:"selection",lasso:"lasso",rectangle:"rectangle",diamond:"diamond",ellipse:"ellipse",arrow:"arrow",line:"line",freedraw:"freedraw",text:"text",image:"image",eraser:"eraser",hand:"hand",frame:"frame",magicframe:"magicframe",embeddable:"embeddable",laser:"laser"},bo={OAI_API_KEY:"excalidraw-oai-api-key",MERMAID_TO_EXCALIDRAW:"mermaid-to-excalidraw",PUBLISH_LIBRARY:"publish-library-data"},go="Untitled",_o={generalStats:1,elementProperties:2},Ao=1,xo={sharp:"sharp",round:"round",elbow:"elbow"},yo=.3,vo="element",So=Symbol.for("__test__originalId__"),Wt=(r=>(r.ACTIVE="active",r.AWAY="away",r.IDLE="idle",r))(Wt||{}),Mo=20,Ro=35,Lo=700,Oo={background:"var(--mobile-action-button-bg)"};p();var K={[b.Excalifont]:{metrics:{unitsPerEm:1e3,ascender:886,descender:-374,lineHeight:1.25}},[b.Nunito]:{metrics:{unitsPerEm:1e3,ascender:1011,descender:-353,lineHeight:1.25}},[b["Lilita One"]]:{metrics:{unitsPerEm:1e3,ascender:923,descender:-220,lineHeight:1.15}},[b["Comic Shanns"]]:{metrics:{unitsPerEm:1e3,ascender:750,descender:-250,lineHeight:1.25}},[b.Virgil]:{metrics:{unitsPerEm:1e3,ascender:886,descender:-374,lineHeight:1.25},deprecated:!0},[b.Helvetica]:{metrics:{unitsPerEm:2048,ascender:1577,descender:-471,lineHeight:1.15},deprecated:!0,local:!0},[b.Cascadia]:{metrics:{unitsPerEm:2048,ascender:1900,descender:-480,lineHeight:1.2},deprecated:!0},[b["Liberation Sans"]]:{metrics:{unitsPerEm:2048,ascender:1854,descender:-434,lineHeight:1.15},private:!0},[b.Assistant]:{metrics:{unitsPerEm:2048,ascender:1021,descender:-287,lineHeight:1.25},private:!0},[Z.Xiaolai]:{metrics:{unitsPerEm:1e3,ascender:880,descender:-144,lineHeight:1.25},fallback:!0},[Z["Segoe UI Emoji"]]:{metrics:{unitsPerEm:1e3,ascender:886,descender:-374,lineHeight:1.25},local:!0,fallback:!0}},Co={LATIN:"U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD",LATIN_EXT:"U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF",CYRILIC_EXT:"U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F",CYRILIC:"U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116",VIETNAMESE:"U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB"},Po="local:",Do=(e,t,n)=>{let{unitsPerEm:r,ascender:o,descender:s}=K[e]?.metrics||K[b.Excalifont].metrics,i=t/r,a=(n-i*o+i*s)/2;return i*o+a},ko=e=>{let{lineHeight:t}=K[e]?.metrics||K[b.Excalifont].metrics;return t};p();var Me=class{jobs=[];running=!1;tick(){if(this.running)return;let t=this.jobs.shift();t?(this.running=!0,t.promise.resolve(Le(t.jobFactory,...t.args).finally(()=>{this.running=!1,this.tick()}))):this.running=!1}push(t,...n){let r=Re();return this.jobs.push({jobFactory:t,promise:r,args:n}),this.tick(),r}};p();p();var Oe="excalidraw.desktopUIMode",Ko=599,Vo=1e3,Wo=500,Yo=600,$o=1180,Xo=1440,zo=1229,we=/Mac|iPod|iPhone|iPad/.test(navigator.platform),jo=/^Win/.test(navigator.platform),Fe=/\b(android)\b/i.test(navigator.userAgent),qo=typeof window<"u"&&"netscape"in window&&navigator.userAgent.indexOf("rv:")>1&&navigator.userAgent.indexOf("Gecko")>1,Yt=navigator.userAgent.indexOf("Chrome")!==-1,Zo=!Yt&&navigator.userAgent.indexOf("Safari")!==-1,Ie=/iPad|iPhone/i.test(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document,Qo=()=>navigator.brave?.isBrave?.name==="isBrave",$t=(e,t)=>e<=599||t<500&&e<1e3,Xt=(e,t)=>{let n=Math.min(e,t),r=Math.max(e,t);return n>=600&&r<=1180},zt=()=>{let e=navigator.userAgent||"",t=navigator.platform||"",n=navigator.userAgentData;if(n){let o=(n.platform||"").toLowerCase(),s=o==="windows"||o==="macos"||o==="linux"||o==="chrome os";if(n.mobile===!0)return!0;if(n.mobile===!1&&o==="android")return matchMedia?.("(hover: none)").matches&&matchMedia?.("(pointer: coarse)").matches;if(s)return!1}if(Ie)return!0;if(Fe){let o=/Mobile/i.test(e);if(o||!o)return matchMedia?.("(hover: none)").matches&&matchMedia?.("(pointer: coarse)").matches}return/Win|Linux|CrOS|Mac/.test(t)||/Windows NT|X11|CrOS|Macintosh/.test(e),!1},Jo=(e,t)=>$t(e,t)?"phone":Xt(e,t)?"tablet":"desktop",es=e=>e.formFactor==="phone"?"mobile":e.formFactor==="tablet"?"compact":e.desktopUIMode,ts=e=>{let t=e??"",n="unknown";return Ie?n="ios":Fe?n="android":t&&(n="other"),{isMobileDevice:zt(),platform:n}},ns=()=>{if(typeof window>"u")return null;try{let e=window.localStorage.getItem(Oe);if(e==="compact"||e==="full")return e}catch{}return null},jt=e=>{if(!(typeof window>"u"))try{window.localStorage.setItem(Oe,e)}catch{}},rs=e=>{if(!(e!=="compact"&&e!=="full"))return jt(e),e};var Ce={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",Y:"KeyY",R:"KeyR",S:"KeyS"},R={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:we?"metaKey":"ctrlKey",DELETE:"Delete",ENTER:"Enter",ESCAPE:"Escape",QUESTION_MARK:"?",SPACE:" ",TAB:"Tab",CHEVRON_LEFT:"<",CHEVRON_RIGHT:">",PERIOD:".",COMMA:",",SUBTRACT:"-",SLASH:"/",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"},qt=new Map([[R.Z,Ce.Z],[R.Y,Ce.Y]]),Zt=e=>/^[a-z]$/.test(e.toLowerCase()),is=(e,t)=>{if(t===e.key.toLowerCase())return!0;let n=qt.get(t);return!!(n&&!Zt(e.key)&&e.code===n)},ls=e=>e===R.ARROW_LEFT||e===R.ARROW_RIGHT||e===R.ARROW_DOWN||e===R.ARROW_UP,cs=e=>e.altKey,us=e=>e.shiftKey,ps=e=>e.shiftKey;p();import{pointFromPair as Qt}from"@excalidraw/math";var ms=e=>{let t=e.map(r=>r[0]),n=e.map(r=>r[1]);return{width:Math.max(...t)-Math.min(...t),height:Math.max(...n)-Math.min(...n)}},Es=(e,t,n,r)=>{let o=n.map(_=>_[e]),s=Math.max(...o),i=Math.min(...o),a=s-i,l=a===0?1:t/a,u=1/0,f=n.map(_=>{let v=_[e]*l,S=[..._];return S[e]=v,v<u&&(u=v),S});if(!r||f.length===2)return f;let T=i-u;return f.map(_=>Qt(_.map((v,S)=>S===e?v+T:v)))},Ts=(e,t,n)=>n?[Math.round(e/n)*n,Math.round(t/n)*n]:[e,t];p();var Ue=se(De(),1),ke=class{pool;entries={};constructor(t,n){this.pool=new Ue.default(t,n)}all(){let t=n=>{if(n.data.result){let[r,o]=n.data.result;this.entries[r]=o}};return this.pool.addEventListener("fulfilled",t),this.pool.start().then(()=>(setTimeout(()=>{this.pool.removeEventListener("fulfilled",t)}),Object.values(this.entries)))}};p();p();p();var Ne=(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce((t,n)=>(n&=63,n<36?t+=n.toString(36):n<62?t+=(n-26).toString(36).toUpperCase():n>62?t+="-":t+="_",t),"");p();var C=class{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}};p();import{average as V}from"@excalidraw/math";var J=null,Cs=e=>{J=e},Ps=()=>{if(J)return J;let e=new Date,t=e.getFullYear(),n=`${e.getMonth()+1}`.padStart(2,"0"),r=`${e.getDate()}`.padStart(2,"0"),o=`${e.getHours()}`.padStart(2,"0"),s=`${e.getMinutes()}`.padStart(2,"0");return`${t}-${n}-${r}-${o}${s}`},Ds=e=>e.charAt(0).toUpperCase()+e.slice(1),ks=e=>e instanceof HTMLElement&&e.className.includes("ToolIcon"),Jt=e=>e instanceof HTMLElement&&e.dataset.type==="wysiwyg"||e instanceof HTMLBRElement||e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement||e instanceof HTMLSelectElement,Us=e=>Jt(e)||e instanceof Element&&!!e.closest("label, button"),Ns=e=>e instanceof HTMLElement&&e.dataset.type==="wysiwyg"||e instanceof HTMLBRElement||e instanceof HTMLTextAreaElement||e instanceof HTMLInputElement&&(e.type==="text"||e.type==="number"||e.type==="password"||e.type==="search")||e instanceof HTMLElement&&e.closest(".cm-editor")!==null,en=({fontFamily:e})=>{for(let[t,n]of Object.entries(b))if(n===e)return`${t}${ye(n).map(r=>`, ${r}`).join("")}`;return I},Hs=({fontSize:e,fontFamily:t})=>`${e}px ${en({fontFamily:t})}`,Gs=async e=>{requestAnimationFrame(()=>requestAnimationFrame(e))},Bs=(e,t)=>{let n=0,r=null,o=(...s)=>{r=s,clearTimeout(n),n=window.setTimeout(()=>{r=null,e(...s)},t)};return o.flush=()=>{if(clearTimeout(n),r){let s=r;r=null,e(...s)}},o.cancel=()=>{r=null,clearTimeout(n)},o},Ks=e=>{let t=null,n=null,r=()=>{t=window.requestAnimationFrame(()=>{t=null;let s=n;n=null,s&&e(...s)})},o=(...s)=>{n=s,t===null&&r()};return o.flush=()=>{t!==null&&(cancelAnimationFrame(t),t=null),n&&(e(...n),n=null)},o.cancel=()=>{n=null,t!==null&&(cancelAnimationFrame(t),t=null)},o},Be=e=>1-Math.pow(1-e,4),He=(e,t,n)=>(t-e)*Be(n)+e,Vs=({fromValues:e,toValues:t,onStep:n,duration:r=250,interpolateValue:o,onStart:s,onEnd:i,onCancel:a})=>{let l=!1,u=0,f;function T(O){if(l)return;f===void 0&&(f=O,s?.());let _=Math.min(O-f,r),v=Be(_/r),S={};if(Object.keys(e).forEach(w=>{let M=w,$=(t[M]-e[M])*v+e[M];S[M]=$}),n(S),_<r){let w=_/r,M={};Object.keys(e).forEach($=>{let D=$,X=e[D],z=t[D],k;k=o?o(X,z,w,D):He(X,z,w),k==null&&(k=He(X,z,w)),M[D]=k}),n(M),u=window.requestAnimationFrame(T)}else n(t),i?.()}return u=window.requestAnimationFrame(T),()=>{a?.(),l=!0,window.cancelAnimationFrame(u)}},Ws=(e,t)=>{if(!e.length||t<1)return[];let n=0,r=0,o=Array(Math.ceil(e.length/t));for(;n<e.length;)o[r++]=e.slice(n,n+=t);return o},Ys=e=>{let t=window.getSelection();if(t){let n=document.createRange();n.selectNodeContents(e),t.removeAllRanges(),t.addRange(n)}},$s=()=>{let e=window.getSelection();e&&e.removeAllRanges()},Xs=(e,t)=>Math.abs(e-t),zs=e=>e==="selection"||e==="lasso",js=(e,t)=>t.type==="custom"?{...e.activeTool,type:"custom",customType:t.customType,locked:t.locked??e.activeTool.locked}:{...e.activeTool,lastActiveTool:t.lastActiveToolBeforeEraser===void 0?e.activeTool.lastActiveTool:t.lastActiveToolBeforeEraser,type:t.type,customType:null,locked:t.locked??e.activeTool.locked,fromSelection:t.fromSelection??!1},qs=()=>document.fullscreenElement?.nodeName==="HTML",Zs=()=>document.documentElement.requestFullscreen(),Qs=()=>document.exitFullscreen(),Js=({clientX:e,clientY:t},{zoom:n,offsetLeft:r,offsetTop:o,scrollX:s,scrollY:i})=>{let a=(e-r)/n.value-s,l=(t-o)/n.value-i;return{x:a,y:l}},ea=({sceneX:e,sceneY:t},{zoom:n,offsetLeft:r,offsetTop:o,scrollX:s,scrollY:i})=>{let a=(e+s)*n.value+r,l=(t+i)*n.value+o;return{x:a,y:l}},ta=e=>getComputedStyle(document.documentElement).getPropertyValue(`--${e}`),tn="A-Za-z\xC0-\xD6\xD8-\xF6\xF8-\u02B8\u0300-\u0590\u0800-\u1FFF\u2C00-\uFB1C\uFDFE-\uFE6F\uFEFD-\uFFFF",nn="\u0591-\u07FF\uFB1D-\uFDFD\uFE70-\uFEFC",rn=new RegExp(`^[^${tn}]*[${nn}]`),na=e=>rn.test(e),ra=e=>{let[t,n]=e;return{x:t,y:n}},oa=e=>{if(e?.name==="AbortError"){console.warn(e);return}throw e},sa=(e,t,n=0)=>{n<0&&(n=e.length+n),n=Math.min(e.length,Math.max(n,0));let r=n-1;for(;++r<e.length;)if(t(e[r],r,e))return r;return-1},aa=(e,t,n=e.length-1)=>{n<0&&(n=e.length+n),n=Math.min(e.length-1,Math.max(n,0));let r=n+1;for(;--r>-1;)if(t(e[r],r,e))return r;return-1},ia=(e,t)=>{for(let n=0;n<e.length;n++){let r=t(e[n],n);if(r!=null)return r}},Re=()=>{let e,t,n=new Promise((r,o)=>{e=r,t=o});return n.resolve=e,n.reject=t,n},la=(e,t)=>{let n=[{value:1,symbol:"b"},{value:1e3,symbol:"k"},{value:1e6,symbol:"M"},{value:1e9,symbol:"G"}],r=/\.0+$|(\.[0-9]*[1-9])0+$/,o;for(o=n.length-1;o>0&&!(e>=n[o].value);o--);return(e/n[o].value).toFixed(t).replace(r,"$1")+n[o].symbol},ca=()=>document.querySelector('meta[name="version"]')?.content||ve,ua=()=>{let t=document.createElement("canvas").getContext("2d");if(!t)return!1;let n=12;return t.fillStyle="#f00",t.textBaseline="top",t.font="32px Arial",t.fillText("\u{1F600}",0,0),t.getImageData(n,n,1,1).data[0]!==0},pa=e=>{let t=e.parentElement;for(;t;){if(t===document.body)return document;let{overflowY:n}=window.getComputedStyle(t);if(t.scrollHeight>t.clientHeight&&(n==="auto"||n==="scroll"||n==="overlay"))return t;t=t.parentElement}return document},da=e=>{let t=e.parentElement;for(;t;){if(t.tabIndex>-1){t.focus();return}t=t.parentElement}},fa=e=>{e.preventDefault(),e.returnValue=""},ha=e=>Array.from(e).map(t=>`0${t.toString(16)}`.slice(-2)).join(""),ma=()=>te()?1:Date.now(),Ea=e=>e instanceof Map?e:e.reduce((t,n)=>(t.set(typeof n=="string"?n:n.id,n),t),new Map),Ta=e=>e.reduce((t,n,r)=>(t.set(n.id,[n,r]),t),new Map),ba=(e,t)=>e.reduce((n,r,o)=>(n[t?t(r):o]=r,n),{}),ga=e=>e.reduce((t,n,r)=>{let o={...n,prev:null,next:null};if(r!==0){let s=t[r-1];if(o.prev=s,s.next=o,r===e.length-1){let i=t[0];o.next=i,i.prev=o}}return t.push(o),t},[]),on=e=>Array.isArray(e)?e:e.values(),_a=e=>Array.isArray(e)?e:Array.from(on(e)),te=()=>m.MODE===B.TEST,Aa=()=>m.MODE===B.DEVELOPMENT,Ke=()=>m.MODE===B.PRODUCTION,xa=()=>typeof process<"u"&&!0,ya=(e,t)=>new CustomEvent(e,{detail:{nativeEvent:t},cancelable:!0}),va=(e,t)=>{let n=!1;for(let r in t){let o=t[r];if(typeof o<"u"){if(e[r]===o&&(typeof o!="object"||o===null))continue;n=!0}}return n?{...e,...t}:e},Sa=e=>{let t=typeof e;return e==null||t!=="object"&&t!=="function"},sn=()=>{try{return window.self===window.top?"top":"iframe"}catch{return"iframe"}},Ma=()=>sn()==="iframe",Ra=e=>!!e&&typeof e=="object"&&"then"in e&&"catch"in e&&"finally"in e,La=e=>{let t=e?.querySelectorAll("button, a, input, select, textarea, div[tabindex], label[tabindex]");return t?Array.from(t).filter(n=>n.tabIndex>-1&&!n.disabled):[]},Ge=(e,t)=>Array.isArray(e)&&Array.isArray(t)&&e.length===0&&t.length===0?!0:e===t,an=(e,t,n,r=!1)=>{let o=Object.keys(e),s=Object.keys(t);if(o.length!==s.length)return r&&console.warn("%cisShallowEqual: objects don't have same properties ->","color: #8B4000",e,t),!1;if(n&&Array.isArray(n)){for(let i of n)if(!(e[i]===t[i]||Ge(e[i],t[i])))return r&&console.warn(`%cisShallowEqual: ${i} not equal ->`,"color: #8B4000",e[i],t[i]),!1;return!0}return o.every(i=>{let a=n?.[i],l=a?a(e[i],t[i]):e[i]===t[i]||Ge(e[i],t[i]);return!l&&r&&console.warn(`%cisShallowEqual: ${i} not equal ->`,"color: #8B4000",e[i],t[i]),l})},Oa=(e,t,{checkForDefaultPrevented:n=!0}={})=>function(o){if(e?.(o),!n||!o?.defaultPrevented)return t?.(o)},wa=(e,t,n)=>{if(!t)return e;if(n)return console.error(t),e;throw new Error(t)};function Fa(e,t){if(!e)throw new Error(t)}var Ia=e=>{let t,n,r=function(o){let s=Object.entries(o);if(t){let a=!0;for(let[l,u]of s)if(t.get(l)!==u){a=!1;break}if(a)return n}let i=e(o);return t=new Map(s),n=i,i};return r.clear=()=>{t=void 0,n=void 0},r},Ca=(e,t)=>e instanceof Set||e instanceof Map?e.has(t):"includes"in e?e.includes(t):e.hasOwnProperty(t),Pa=e=>JSON.parse(JSON.stringify(e)),Da=(e,t)=>an(e,t)?e:t;function ka(e,t,n,r){return e?(e?.addEventListener?.(t,n,r),()=>{e?.removeEventListener?.(t,n,r)}):()=>{}}function Ua(e,t=!0){let n=e.length;if(n<4)return"";let r=e[0],o=e[1],s=e[2],i=`M${r[0].toFixed(2)},${r[1].toFixed(2)} Q${o[0].toFixed(2)},${o[1].toFixed(2)} ${V(o[0],s[0]).toFixed(2)},${V(o[1],s[1]).toFixed(2)} T`;for(let a=2,l=n-1;a<l;a++)r=e[a],o=e[a+1],i+=`${V(r[0],o[0]).toFixed(2)},${V(r[1],o[1]).toFixed(2)} `;return t&&(i+="Z"),i}var Na=e=>e.replace(/\r?\n|\r/g,`
4
- `);function Ha(e){return e}var Le=async(e,...t)=>new Promise(n=>{n(e(...t))}),Ga=(...e)=>Math.max(...e.map(t=>t?1:0))>0,Ba=e=>{try{return JSON.parse(e)}catch{return null}},Ve=e=>e.replace(/"/g,"&quot;"),Ka=e=>Array.isArray(e)?e:[e],ln=e=>Array.isArray(e),cn=e=>ln(e)?e.length:e instanceof Map||e instanceof Set?e.size:Object.keys(e).length,Va=(e,t)=>{if(cn(e)===0)return null;let n=t||(o=>o),r=null;for(let o of e){let s=n(o);if((r===null||r===s)&&s!=null)r=s;else return null}return r},We="excalidraw-feature-flags",ee={COMPLEX_BINDINGS:!1},L=null,Wa=e=>{if(!L)try{let t=localStorage.getItem(We);t&&(L=JSON.parse(t)??ee)}catch{}return(L||ee)[e]},Ya=(e,t)=>{try{L={...L||ee,[e]:t},localStorage.setItem(We,JSON.stringify(L))}catch(n){console.error("unable to set feature flag",n)}},$a=(e,t)=>t.includes(e);var Ye=new C(Date.now()),$e=0,Qa=()=>Math.floor(Ye.next()*2**31),Ja=e=>{Ye=new C(e),$e=0},ei=()=>te()?`id${$e++}`:Ne();p();var ze=se(Xe(),1);var gn=e=>(e=e.trim(),e&&(0,ze.sanitizeUrl)(Ve(e))),ai=e=>!!(e?.includes(location.origin)||e?.startsWith("/")),ii=e=>{if(e=gn(e),e.startsWith("/"))return`${location.origin}${e}`;try{new URL(e)}catch{return"about:blank"}return e};p();var Y=class{subscribers=[];on(...t){let n=t.flat().filter(r=>typeof r=="function");return this.subscribers.push(...n),()=>this.off(n)}once(...t){let n=t.flat().filter(o=>typeof o=="function");n.push(()=>r());let r=this.on(...n);return r}off(...t){let n=t.flat();this.subscribers=this.subscribers.filter(r=>!n.includes(r))}trigger(...t){for(let n of this.subscribers)n(...t);return this}clear(){this.subscribers=[]}};p();var je=class{constructor(t){this.behavior=t}emitters=new Map;lastPayload=new Map;emittedOnce=new Set;getEmitter(t){let n=this.emitters.get(t);return n||(n=new Y,this.emitters.set(t,n)),n}toPromiseValue(t){return t.length===1?t[0]:t}on(t,n){let r=this.behavior[t],o=this.lastPayload.get(t);if(n)return r.replay==="last"&&o&&(queueMicrotask(()=>n(...o)),r.cardinality==="once")?()=>{}:this.getEmitter(t).on(n);if(r.cardinality!=="once"||r.replay!=="last")throw new Error(`Event "${String(t)}" requires a callback`);return o?Promise.resolve(this.toPromiseValue(o)):new Promise(s=>{this.getEmitter(t).once((...i)=>{s(this.toPromiseValue(i))})})}emit(t,...n){let r=this.behavior[t];if(!Ke()&&r.cardinality==="once"){if(this.emittedOnce.has(t))throw new Error(`Event "${String(t)}" can only be emitted once`);this.emittedOnce.add(t)}r.replay==="last"&&this.lastPayload.set(t,n);try{this.getEmitter(t).trigger(...n)}finally{r.cardinality==="once"&&this.getEmitter(t).clear()}}clear(){this.lastPayload.clear(),this.emittedOnce.clear();for(let t of this.emitters.values())t.clear();this.emitters.clear()}};p();var qe=class{constructor(t,n=Object.is){this.isEqual=n;this.value=t}version=0;value;waiters=new Set;subscribers=new Set;getSnapshot(){return{version:this.version,value:this.value}}set(t){if(this.isEqual(this.value,t))return!1;this.value=t,this.version+=1;let n=this.getSnapshot();for(let r of this.subscribers)r(n);for(let r of this.waiters)r(n);return this.waiters.clear(),!0}update(t){return this.set(t(this.value))}subscribe(t){return this.subscribers.add(t),()=>{this.subscribers.delete(t)}}pull(t=-1){return this.version!==t?Promise.resolve(this.getSnapshot()):new Promise(n=>{this.waiters.add(n)})}};p();var P=(e,t=5)=>parseFloat(e.toPrecision(t)),_n=e=>P(e.reduce((t,n)=>t+n)/e.length),ne=class e{static DEBUG_LOG_TIMES=!0;static TIMES_AGGR={};static TIMES_AVG={};static LAST_DEBUG_LOG_CALL=0;static DEBUG_LOG_INTERVAL_ID=null;static LAST_FRAME_TIMESTAMP=0;static FRAME_COUNT=0;static ANIMATION_FRAME_ID=null;static scheduleAnimationFrame=()=>{e.DEBUG_LOG_INTERVAL_ID!==null&&(e.ANIMATION_FRAME_ID=requestAnimationFrame(t=>{e.LAST_FRAME_TIMESTAMP!==t&&(e.LAST_FRAME_TIMESTAMP=t,e.FRAME_COUNT++),e.DEBUG_LOG_INTERVAL_ID!==null&&e.scheduleAnimationFrame()}))};static setupInterval=()=>{e.DEBUG_LOG_INTERVAL_ID===null&&(console.info("%c(starting perf recording)","color: lime"),e.DEBUG_LOG_INTERVAL_ID=window.setInterval(e.debugLogger,1e3),e.scheduleAnimationFrame()),e.LAST_DEBUG_LOG_CALL=Date.now()};static debugLogger=()=>{if(e.DEBUG_LOG_TIMES){for(let[t,{t:n,times:r}]of Object.entries(e.TIMES_AGGR))r.length&&(console.info(t,P(r.reduce((o,s)=>o+s)),r.sort((o,s)=>o-s).map(o=>P(o))),e.TIMES_AGGR[t]={t:n,times:[]});for(let[t,{t:n,times:r,avg:o}]of Object.entries(e.TIMES_AVG))if(r.length){let s=r.reduce((a,l)=>a+l),i=P(s/e.FRAME_COUNT);console.info(t,`- ${r.length} calls - ${i}ms/frame across ${e.FRAME_COUNT} frames (${P(i/16.67*100,1)}% of frame budget)`),e.TIMES_AVG[t]={t:n,times:[],avg:o!=null?_n([o,i]):i}}}e.FRAME_COUNT=0,Date.now()-e.LAST_DEBUG_LOG_CALL>600&&e.DEBUG_LOG_INTERVAL_ID!==null&&(console.info("%c(stopping perf recording)","color: red"),window.clearInterval(e.DEBUG_LOG_INTERVAL_ID),window.cancelAnimationFrame(e.ANIMATION_FRAME_ID),e.ANIMATION_FRAME_ID=null,e.FRAME_COUNT=0,e.LAST_FRAME_TIMESTAMP=0,e.DEBUG_LOG_INTERVAL_ID=null,e.TIMES_AGGR={},e.TIMES_AVG={})};static logTime=(t,n="default")=>{e.setupInterval();let r=performance.now(),{t:o,times:s}=e.TIMES_AGGR[n]=e.TIMES_AGGR[n]||{t:0,times:[]};o&&s.push(t??r-o),e.TIMES_AGGR[n].t=r};static logTimeAverage=(t,n="default")=>{e.setupInterval();let r=performance.now(),{t:o,times:s}=e.TIMES_AVG[n]=e.TIMES_AVG[n]||{t:0,times:[]};o&&s.push(t??r-o),e.TIMES_AVG[n].t=r};static logWrapper=t=>(n,r="default")=>(...o)=>{let s=performance.now(),i=n(...o);return e[t](performance.now()-s,r),i};static logTimeWrap=e.logWrapper("logTime");static logTimeAverageWrap=e.logWrapper("logTimeAverage");static perfWrap=(t,n="default")=>(...r)=>{console.time(n);let o=t(...r);return console.timeEnd(n),o};static CHANGED_CACHE={};static logChanged(t,n){let r=e.CHANGED_CACHE[t];if(e.CHANGED_CACHE[t]=n,!r)return;let o=new Set([...Object.keys(r),...Object.keys(n)]),s={};for(let i of o){let a=r[i],l=n[i];Ze(a,l)||(s[i]={prev:a,next:l})}Object.keys(s).length>0&&console.info(`[${t}] changed:`,s)}};function Ze(e,t){if(Object.is(e,t))return!0;if(e===null||t===null||typeof e!="object"||typeof t!="object"||Array.isArray(e)!==Array.isArray(t))return!1;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let o of n)if(!Ze(e[o],t[o]))return!1;return!0}export{Vr as ACTIVE_THRESHOLD,Lr as ALLOWED_PASTE_MIME_TYPES,Zn as APP_NAME,oo as ARROW_LABEL_FONT_SIZE_TO_MIN_WIDTH_RATIO,ro as ARROW_LABEL_WIDTH_FRACTION,xo as ARROW_TYPE,je as AppEventBus,Lo as BIND_MODE_TIMEOUT,no as BOUND_TEXT_PADDING,ae as BinaryHeap,Sr as CANVAS_ONLY_ACTIONS,ho as CANVAS_SEARCH_TAB,_e as CJK_HAND_DRAWN_FALLBACK_FONT,pr as CLASSES,Ce as CODES,Dn as COLORS_PER_ROW,yr as COLOR_CHARCOAL_BLACK,Wn as COLOR_OUTLINE_CONTRAST_THRESHOLD,d as COLOR_PALETTE,vr as COLOR_VOICE_CALL,xr as COLOR_WHITE,ir as CURSOR_TYPE,hr as DARK_THEME_FILTER,co as DEFAULT_ADAPTIVE_RADIUS,Hn as DEFAULT_CANVAS_BACKGROUND_PICKS,kn as DEFAULT_CHART_COLOR_INDEX,Ar as DEFAULT_COLLISION_THRESHOLD,G as DEFAULT_ELEMENT_BACKGROUND_COLOR_INDEX,Bn as DEFAULT_ELEMENT_BACKGROUND_COLOR_PALETTE,Nn as DEFAULT_ELEMENT_BACKGROUND_PICKS,fo as DEFAULT_ELEMENT_PROPS,H as DEFAULT_ELEMENT_STROKE_COLOR_INDEX,Gn as DEFAULT_ELEMENT_STROKE_COLOR_PALETTE,Un as DEFAULT_ELEMENT_STROKE_PICKS,jr as DEFAULT_EXPORT_PADDING,go as DEFAULT_FILENAME,br as DEFAULT_FONT_FAMILY,Tr as DEFAULT_FONT_SIZE,Mr as DEFAULT_GRID_SIZE,Rr as DEFAULT_GRID_STEP,ar as DEFAULT_LASER_COLOR,qr as DEFAULT_MAX_IMAGE_WIDTH_OR_HEIGHT,lo as DEFAULT_PROPORTIONAL_RADIUS,yo as DEFAULT_REDUCED_GLOBAL_ALPHA,mo as DEFAULT_SIDEBAR,gr as DEFAULT_TEXT_ALIGN,Nt as DEFAULT_TRANSFORM_HANDLE_SPACING,$r as DEFAULT_UI_OPTIONS,ve as DEFAULT_VERSION,_r as DEFAULT_VERTICAL_ALIGN,Ro as DOUBLE_TAP_POSITION_THRESHOLD,Jn as DRAGGING_THRESHOLD,ne as Debug,bo as EDITOR_LS_KEYS,vo as ELEMENT_LINK_KEY,io as ELEMENT_READY_TO_ERASE_OPACITY,nr as ELEMENT_SHIFT_TRANSLATE_AMOUNT,rr as ELEMENT_TRANSLATE_AMOUNT,eo as ENCRYPTION_KEY_BITS,B as ENV,Gt as EPSILON,Dt as EVENT,wr as EXPORT_DATA_TYPES,Or as EXPORT_IMAGE_TYPES,zr as EXPORT_SCALES,Y as Emitter,b as FONT_FAMILY,Z as FONT_FAMILY_FALLBACKS,kt as FONT_FAMILY_GENERIC_FALLBACKS,K as FONT_METADATA,dr as FONT_SIZES,mr as FRAME_STYLE,Co as GOOGLE_FONTS_RANGES,Br as HYPERLINK_TOOLTIP_DELAY,Kr as IDLE_THRESHOLD,Se as IMAGE_MIME_TYPES,Ir as IMAGE_RENDER_TIMEOUT,R as KEYS,qt as KeyCodeMap,Eo as LIBRARY_DISABLED_TYPES,Vt as LIBRARY_SIDEBAR_TAB,tr as LINE_CONFIRM_THRESHOLD,Mo as LINE_POLYGON_POINT_MERGE_DISTANCE,Po as LOCAL_FONT_PROTOCOL,Zr as MAX_ALLOWED_FILE_BYTES,Pn as MAX_CUSTOM_COLORS_USED_IN_CANVAS,Xr as MAX_DECIMALS_FOR_SVG_EXPORT,Gr as MAX_ZOOM,ge as MIME_TYPES,er as MINIMUM_ARROW_SIZE,Er as MIN_FONT_SIZE,Ao as MIN_WIDTH_OR_HEIGHT,Hr as MIN_ZOOM,Oo as MOBILE_ACTION_BUTTON_BG,xe as MONOSPACE_GENERIC_FONT,Wo as MQ_MAX_HEIGHT_LANDSCAPE,Ko as MQ_MAX_MOBILE,$o as MQ_MAX_TABLET,Vo as MQ_MAX_WIDTH_LANDSCAPE,Yo as MQ_MIN_TABLET,Xo as MQ_MIN_WIDTH_DESKTOP,zo as MQ_RIGHT_SIDEBAR_MIN_WIDTH,So as ORIG_ID,lr as POINTER_BUTTON,cr as POINTER_EVENTS,ke as PromisePool,Me as Queue,Kt as ROUGHNESS,uo as ROUNDNESS,Ae as SANS_SERIF_GENERIC_FONT,Ur as SCROLL_TIMEOUT,sr as SHIFT_LOCKING_ANGLE,Ht as SIDE_RESIZING_THRESHOLD,_o as STATS_PANELS,Bt as STRING_MIME_TYPES,po as STROKE_WIDTH,Jr as SVG_DOCUMENT_PREAMBLE,Qr as SVG_NS,Cr as TAP_TWICE_TIMEOUT,ao as TEXT_ALIGN,Qn as TEXT_AUTOWRAP_THRESHOLD,or as TEXT_TO_CENTER_SNAP_THRESHOLD,fr as THEME,Dr as TITLE_TIMEOUT,To as TOOL_TYPE,Pr as TOUCH_CTX_MENU_TIMEOUT,Yr as URL_HASH_KEYS,Wr as URL_QUERY_KEYS,Wt as UserIdleState,to as VERSIONS,kr as VERSION_TIMEOUT,so as VERTICAL_ALIGN,qe as VersionedSnapshotStore,I as WINDOWS_EMOJI_FALLBACK_FONT,ur as YOUTUBE_STATES,Nr as ZOOM_STEP,ka as addEventListener,Zs as allowFullScreen,Cn as applyDarkModeFilter,ga as arrayToList,Ea as arrayToMap,Ta as arrayToMapWithIndex,ba as arrayToObject,wa as assertNever,ha as bytesToHexString,Ds as capitalizeString,Ka as castArray,Ws as chunk,Pa as cloneJSON,Vn as colorToHex,Oa as composeEventHandlers,ts as createUserAgentDescriptor,Bs as debounce,es as deriveStylesPanelMode,Xs as distance,Be as easeOut,Vs as easeToValuesRAF,Ve as escapeDoubleQuotes,Qs as exitFullScreen,sa as findIndex,aa as findLastIndex,da as focusNearestParent,Kn as getAllColorsSpecificShade,Ps as getDateTime,Fr as getExportSource,Wa as getFeatureFlag,ye as getFontFamilyFallbacks,en as getFontFamilyString,Hs as getFontString,Jo as getFormFactor,sn as getFrame,Ut as getGenericFontFamilyFallback,ta as getGlobalCSSVariable,Ts as getGridPoint,ko as getLineHeight,pa as getNearestScrollableContainer,ms as getSizeFromPoints,Ua as getSvgPathFromStroke,ma as getUpdatedTimestamp,ca as getVersion,Do as getVerticalOffset,Fa as invariant,Fe as isAndroid,Ga as isAnyTrue,ls as isArrowKey,Sn as isBounds,Qo as isBrave,Yt as isChrome,Yn as isColorDark,we as isDarwin,Aa as isDevEnv,qo as isFirefox,qs as isFullScreen,Ie as isIOS,Jt as isInputLike,Us as isInteractive,Zt as isLatinChar,ai as isLocalLink,Ca as isMemberOf,$t as isMobileBreakpoint,Sa as isPrimitive,Ke as isProdEnv,Ra as isPromiseLike,na as isRTL,ln as isReadonlyArray,Ma as isRunningInIframe,Zo as isSafari,zs as isSelectionLikeTool,xa as isServerEnv,an as isShallowEqual,Xt as isTabletBreakpoint,te as isTestEnv,ks as isToolIcon,be as isTransparent,jo as isWindows,Ns as isWritableElement,ns as loadDesktopUIModePreference,ia as mapFind,is as matchKey,Ia as memoize,oa as muteFSAbortError,la as nFormatter,Gs as nextAnimationFrame,Na as normalizeEOL,$n as normalizeInputColor,gn as normalizeLink,$a as oneOf,fa as preventUnload,Le as promiseTry,La as queryFocusableElements,ei as randomId,Qa as randomInteger,Va as reduceToCommonValue,$s as removeSelection,Es as rescalePoints,Ja as reseed,Re as resolvablePromise,Te as rgbToHex,Ba as safelyParseJSON,ea as sceneCoordsToViewportCoords,Ys as selectNode,Cs as setDateTimeForTests,rs as setDesktopUIMode,Ya as setFeatureFlag,us as shouldMaintainAspectRatio,cs as shouldResizeFromCenter,ps as shouldRotateWithDiscreteAngle,cn as sizeOf,ua as supportsEmoji,qn as supportsResizeObserver,Ks as throttleRAF,_a as toArray,Ha as toBrandedType,on as toIterable,ii as toValidURL,ra as tupleToCoors,js as updateActiveTool,va as updateObject,Da as updateStable,Js as viewportCoordsToSceneCoords,ya as wrapEvent};
3
+ `,Qr=128,Jr={excalidraw:2},eo=5,to=.7,no=11,ro={TOP:"top",MIDDLE:"middle",BOTTOM:"bottom"},oo={LEFT:"left",CENTER:"center",RIGHT:"right"},so=20,ao=.25,io=32,lo={LEGACY:1,PROPORTIONAL_RADIUS:2,ADAPTIVE_RADIUS:3},Kt={architect:0,artist:1,cartoonist:2},co={thin:1,bold:2,extraBold:4},uo={strokeColor:f.black,backgroundColor:f.transparent,fillStyle:"solid",strokeWidth:2,strokeStyle:"solid",roughness:Kt.artist,opacity:100,locked:!1},Vt="search",po={name:"default",defaultTab:Vt},fo={selection:"selection",lasso:"lasso",rectangle:"rectangle",diamond:"diamond",ellipse:"ellipse",arrow:"arrow",line:"line",freedraw:"freedraw",text:"text",image:"image",eraser:"eraser",hand:"hand",frame:"frame",magicframe:"magicframe",embeddable:"embeddable",laser:"laser"},ho={OAI_API_KEY:"excalidraw-oai-api-key",MERMAID_TO_EXCALIDRAW:"mermaid-to-excalidraw"},mo="Untitled",To={generalStats:1,elementProperties:2},Eo=1,go={sharp:"sharp",round:"round",elbow:"elbow"},bo=.3,_o="element",Ao=Symbol.for("__test__originalId__"),Wt=(r=>(r.ACTIVE="active",r.AWAY="away",r.IDLE="idle",r))(Wt||{}),xo=20,yo=35,vo=700,Mo={background:"var(--mobile-action-button-bg)"};p();var K={[g.Excalifont]:{metrics:{unitsPerEm:1e3,ascender:886,descender:-374,lineHeight:1.25}},[g.Nunito]:{metrics:{unitsPerEm:1e3,ascender:1011,descender:-353,lineHeight:1.25}},[g["Lilita One"]]:{metrics:{unitsPerEm:1e3,ascender:923,descender:-220,lineHeight:1.15}},[g["Comic Shanns"]]:{metrics:{unitsPerEm:1e3,ascender:750,descender:-250,lineHeight:1.25}},[g.Virgil]:{metrics:{unitsPerEm:1e3,ascender:886,descender:-374,lineHeight:1.25},deprecated:!0},[g.Helvetica]:{metrics:{unitsPerEm:2048,ascender:1577,descender:-471,lineHeight:1.15},deprecated:!0,local:!0},[g.Cascadia]:{metrics:{unitsPerEm:2048,ascender:1900,descender:-480,lineHeight:1.2},deprecated:!0},[g["Liberation Sans"]]:{metrics:{unitsPerEm:2048,ascender:1854,descender:-434,lineHeight:1.15},private:!0},[g.Assistant]:{metrics:{unitsPerEm:2048,ascender:1021,descender:-287,lineHeight:1.25},private:!0},[Z.Xiaolai]:{metrics:{unitsPerEm:1e3,ascender:880,descender:-144,lineHeight:1.25},fallback:!0},[Z["Segoe UI Emoji"]]:{metrics:{unitsPerEm:1e3,ascender:886,descender:-374,lineHeight:1.25},local:!0,fallback:!0}},Lo={LATIN:"U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD",LATIN_EXT:"U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF",CYRILIC_EXT:"U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F",CYRILIC:"U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116",VIETNAMESE:"U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB"},Fo="local:",wo=(e,t,n)=>{let{unitsPerEm:r,ascender:o,descender:s}=K[e]?.metrics||K[g.Excalifont].metrics,i=t/r,a=(n-i*o+i*s)/2;return i*o+a},Io=e=>{let{lineHeight:t}=K[e]?.metrics||K[g.Excalifont].metrics;return t};p();var Se=class{jobs=[];running=!1;tick(){if(this.running)return;let t=this.jobs.shift();t?(this.running=!0,t.promise.resolve(Oe(t.jobFactory,...t.args).finally(()=>{this.running=!1,this.tick()}))):this.running=!1}push(t,...n){let r=Re();return this.jobs.push({jobFactory:t,promise:r,args:n}),this.tick(),r}};p();p();var Le="excalidraw.desktopUIMode",No=599,Ho=1e3,Go=500,Bo=600,Ko=1180,Vo=1440,Wo=1229,Fe=/Mac|iPod|iPhone|iPad/.test(navigator.platform),Yo=/^Win/.test(navigator.platform),we=/\b(android)\b/i.test(navigator.userAgent),$o=typeof window<"u"&&"netscape"in window&&navigator.userAgent.indexOf("rv:")>1&&navigator.userAgent.indexOf("Gecko")>1,Yt=navigator.userAgent.indexOf("Chrome")!==-1,Xo=!Yt&&navigator.userAgent.indexOf("Safari")!==-1,Ie=/iPad|iPhone/i.test(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document,zo=()=>navigator.brave?.isBrave?.name==="isBrave",$t=(e,t)=>e<=599||t<500&&e<1e3,Xt=(e,t)=>{let n=Math.min(e,t),r=Math.max(e,t);return n>=600&&r<=1180},zt=()=>{let e=navigator.userAgent||"",t=navigator.platform||"",n=navigator.userAgentData;if(n){let o=(n.platform||"").toLowerCase(),s=o==="windows"||o==="macos"||o==="linux"||o==="chrome os";if(n.mobile===!0)return!0;if(n.mobile===!1&&o==="android")return matchMedia?.("(hover: none)").matches&&matchMedia?.("(pointer: coarse)").matches;if(s)return!1}if(Ie)return!0;if(we){let o=/Mobile/i.test(e);if(o||!o)return matchMedia?.("(hover: none)").matches&&matchMedia?.("(pointer: coarse)").matches}return/Win|Linux|CrOS|Mac/.test(t)||/Windows NT|X11|CrOS|Macintosh/.test(e),!1},qo=(e,t)=>$t(e,t)?"phone":Xt(e,t)?"tablet":"desktop",jo=e=>e.formFactor==="phone"?"mobile":e.formFactor==="tablet"?"compact":e.desktopUIMode,Zo=e=>{let t=e??"",n="unknown";return Ie?n="ios":we?n="android":t&&(n="other"),{isMobileDevice:zt(),platform:n}},Qo=()=>{if(typeof window>"u")return null;try{let e=window.localStorage.getItem(Le);if(e==="compact"||e==="full")return e}catch{}return null},qt=e=>{if(!(typeof window>"u"))try{window.localStorage.setItem(Le,e)}catch{}},Jo=e=>{if(!(e!=="compact"&&e!=="full"))return qt(e),e};var Ce={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",Y:"KeyY",R:"KeyR",S:"KeyS"},R={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:Fe?"metaKey":"ctrlKey",DELETE:"Delete",ENTER:"Enter",ESCAPE:"Escape",QUESTION_MARK:"?",SPACE:" ",TAB:"Tab",CHEVRON_LEFT:"<",CHEVRON_RIGHT:">",PERIOD:".",COMMA:",",SUBTRACT:"-",SLASH:"/",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"},jt=new Map([[R.Z,Ce.Z],[R.Y,Ce.Y]]),Zt=e=>/^[a-z]$/.test(e.toLowerCase()),rs=(e,t)=>{if(t===e.key.toLowerCase())return!0;let n=jt.get(t);return!!(n&&!Zt(e.key)&&e.code===n)},os=e=>e===R.ARROW_LEFT||e===R.ARROW_RIGHT||e===R.ARROW_DOWN||e===R.ARROW_UP,ss=e=>e.altKey,as=e=>e.shiftKey,is=e=>e.shiftKey;p();import{pointFromPair as Qt}from"@excalidraw/math";var ps=e=>{let t=e.map(r=>r[0]),n=e.map(r=>r[1]);return{width:Math.max(...t)-Math.min(...t),height:Math.max(...n)-Math.min(...n)}},fs=(e,t,n,r)=>{let o=n.map(_=>_[e]),s=Math.max(...o),i=Math.min(...o),a=s-i,l=a===0?1:t/a,u=1/0,d=n.map(_=>{let v=_[e]*l,M=[..._];return M[e]=v,v<u&&(u=v),M});if(!r||d.length===2)return d;let E=i-u;return d.map(_=>Qt(_.map((v,M)=>M===e?v+E:v)))},ds=(e,t,n)=>n?[Math.round(e/n)*n,Math.round(t/n)*n]:[e,t];p();var Ue=se(ke(),1),De=class{pool;entries={};constructor(t,n){this.pool=new Ue.default(t,n)}all(){let t=n=>{if(n.data.result){let[r,o]=n.data.result;this.entries[r]=o}};return this.pool.addEventListener("fulfilled",t),this.pool.start().then(()=>(setTimeout(()=>{this.pool.removeEventListener("fulfilled",t)}),Object.values(this.entries)))}};p();p();p();var Ne=(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce((t,n)=>(n&=63,n<36?t+=n.toString(36):n<62?t+=(n-26).toString(36).toUpperCase():n>62?t+="-":t+="_",t),"");p();var C=class{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}};p();import{average as V}from"@excalidraw/math";var J=null,Ls=e=>{J=e},Fs=()=>{if(J)return J;let e=new Date,t=e.getFullYear(),n=`${e.getMonth()+1}`.padStart(2,"0"),r=`${e.getDate()}`.padStart(2,"0"),o=`${e.getHours()}`.padStart(2,"0"),s=`${e.getMinutes()}`.padStart(2,"0");return`${t}-${n}-${r}-${o}${s}`},ws=e=>e.charAt(0).toUpperCase()+e.slice(1),Is=e=>e instanceof HTMLElement&&e.className.includes("ToolIcon"),Jt=e=>e instanceof HTMLElement&&e.dataset.type==="wysiwyg"||e instanceof HTMLBRElement||e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement||e instanceof HTMLSelectElement,Cs=e=>Jt(e)||e instanceof Element&&!!e.closest("label, button"),Ps=e=>e instanceof HTMLElement&&e.dataset.type==="wysiwyg"||e instanceof HTMLBRElement||e instanceof HTMLTextAreaElement||e instanceof HTMLInputElement&&(e.type==="text"||e.type==="number"||e.type==="password"||e.type==="search")||e instanceof HTMLElement&&e.closest(".cm-editor")!==null,en=({fontFamily:e})=>{for(let[t,n]of Object.entries(g))if(n===e)return`${t}${ye(n).map(r=>`, ${r}`).join("")}`;return I},ks=({fontSize:e,fontFamily:t})=>`${e}px ${en({fontFamily:t})}`,Ds=async e=>{requestAnimationFrame(()=>requestAnimationFrame(e))},Us=(e,t)=>{let n=0,r=null,o=(...s)=>{r=s,clearTimeout(n),n=window.setTimeout(()=>{r=null,e(...s)},t)};return o.flush=()=>{if(clearTimeout(n),r){let s=r;r=null,e(...s)}},o.cancel=()=>{r=null,clearTimeout(n)},o},Ns=e=>{let t=null,n=null,r=()=>{t=window.requestAnimationFrame(()=>{t=null;let s=n;n=null,s&&e(...s)})},o=(...s)=>{n=s,t===null&&r()};return o.flush=()=>{t!==null&&(cancelAnimationFrame(t),t=null),n&&(e(...n),n=null)},o.cancel=()=>{n=null,t!==null&&(cancelAnimationFrame(t),t=null)},o},Be=e=>1-Math.pow(1-e,4),He=(e,t,n)=>(t-e)*Be(n)+e,Hs=({fromValues:e,toValues:t,onStep:n,duration:r=250,interpolateValue:o,onStart:s,onEnd:i,onCancel:a})=>{let l=!1,u=0,d;function E(L){if(l)return;d===void 0&&(d=L,s?.());let _=Math.min(L-d,r),v=Be(_/r),M={};if(Object.keys(e).forEach(F=>{let S=F,$=(t[S]-e[S])*v+e[S];M[S]=$}),n(M),_<r){let F=_/r,S={};Object.keys(e).forEach($=>{let k=$,X=e[k],z=t[k],D;D=o?o(X,z,F,k):He(X,z,F),D==null&&(D=He(X,z,F)),S[k]=D}),n(S),u=window.requestAnimationFrame(E)}else n(t),i?.()}return u=window.requestAnimationFrame(E),()=>{a?.(),l=!0,window.cancelAnimationFrame(u)}},Gs=(e,t)=>{if(!e.length||t<1)return[];let n=0,r=0,o=Array(Math.ceil(e.length/t));for(;n<e.length;)o[r++]=e.slice(n,n+=t);return o},Bs=e=>{let t=window.getSelection();if(t){let n=document.createRange();n.selectNodeContents(e),t.removeAllRanges(),t.addRange(n)}},Ks=()=>{let e=window.getSelection();e&&e.removeAllRanges()},Vs=(e,t)=>Math.abs(e-t),Ws=e=>e==="selection"||e==="lasso",Ys=(e,t)=>t.type==="custom"?{...e.activeTool,type:"custom",customType:t.customType,locked:t.locked??e.activeTool.locked}:{...e.activeTool,lastActiveTool:t.lastActiveToolBeforeEraser===void 0?e.activeTool.lastActiveTool:t.lastActiveToolBeforeEraser,type:t.type,customType:null,locked:t.locked??e.activeTool.locked,fromSelection:t.fromSelection??!1},$s=()=>document.fullscreenElement?.nodeName==="HTML",Xs=()=>document.documentElement.requestFullscreen(),zs=()=>document.exitFullscreen(),qs=({clientX:e,clientY:t},{zoom:n,offsetLeft:r,offsetTop:o,scrollX:s,scrollY:i})=>{let a=(e-r)/n.value-s,l=(t-o)/n.value-i;return{x:a,y:l}},js=({sceneX:e,sceneY:t},{zoom:n,offsetLeft:r,offsetTop:o,scrollX:s,scrollY:i})=>{let a=(e+s)*n.value+r,l=(t+i)*n.value+o;return{x:a,y:l}},Zs=e=>getComputedStyle(document.documentElement).getPropertyValue(`--${e}`),tn="A-Za-z\xC0-\xD6\xD8-\xF6\xF8-\u02B8\u0300-\u0590\u0800-\u1FFF\u2C00-\uFB1C\uFDFE-\uFE6F\uFEFD-\uFFFF",nn="\u0591-\u07FF\uFB1D-\uFDFD\uFE70-\uFEFC",rn=new RegExp(`^[^${tn}]*[${nn}]`),Qs=e=>rn.test(e),Js=e=>{let[t,n]=e;return{x:t,y:n}},ea=e=>{if(e?.name==="AbortError"){console.warn(e);return}throw e},ta=(e,t,n=0)=>{n<0&&(n=e.length+n),n=Math.min(e.length,Math.max(n,0));let r=n-1;for(;++r<e.length;)if(t(e[r],r,e))return r;return-1},na=(e,t,n=e.length-1)=>{n<0&&(n=e.length+n),n=Math.min(e.length-1,Math.max(n,0));let r=n+1;for(;--r>-1;)if(t(e[r],r,e))return r;return-1},ra=(e,t)=>{for(let n=0;n<e.length;n++){let r=t(e[n],n);if(r!=null)return r}},Re=()=>{let e,t,n=new Promise((r,o)=>{e=r,t=o});return n.resolve=e,n.reject=t,n},oa=(e,t)=>{let n=[{value:1,symbol:"b"},{value:1e3,symbol:"k"},{value:1e6,symbol:"M"},{value:1e9,symbol:"G"}],r=/\.0+$|(\.[0-9]*[1-9])0+$/,o;for(o=n.length-1;o>0&&!(e>=n[o].value);o--);return(e/n[o].value).toFixed(t).replace(r,"$1")+n[o].symbol},sa=()=>document.querySelector('meta[name="version"]')?.content||ve,aa=()=>{let t=document.createElement("canvas").getContext("2d");if(!t)return!1;let n=12;return t.fillStyle="#f00",t.textBaseline="top",t.font="32px Arial",t.fillText("\u{1F600}",0,0),t.getImageData(n,n,1,1).data[0]!==0},ia=e=>{let t=e.parentElement;for(;t;){if(t===document.body)return document;let{overflowY:n}=window.getComputedStyle(t);if(t.scrollHeight>t.clientHeight&&(n==="auto"||n==="scroll"||n==="overlay"))return t;t=t.parentElement}return document},la=e=>{let t=e.parentElement;for(;t;){if(t.tabIndex>-1){t.focus();return}t=t.parentElement}},ca=e=>{e.preventDefault(),e.returnValue=""},ua=e=>Array.from(e).map(t=>`0${t.toString(16)}`.slice(-2)).join(""),pa=()=>te()?1:Date.now(),fa=e=>e instanceof Map?e:e.reduce((t,n)=>(t.set(typeof n=="string"?n:n.id,n),t),new Map),da=e=>e.reduce((t,n,r)=>(t.set(n.id,[n,r]),t),new Map),ha=(e,t)=>e.reduce((n,r,o)=>(n[t?t(r):o]=r,n),{}),ma=e=>e.reduce((t,n,r)=>{let o={...n,prev:null,next:null};if(r!==0){let s=t[r-1];if(o.prev=s,s.next=o,r===e.length-1){let i=t[0];o.next=i,i.prev=o}}return t.push(o),t},[]),on=e=>Array.isArray(e)?e:e.values(),Ta=e=>Array.isArray(e)?e:Array.from(on(e)),te=()=>m.MODE===B.TEST,Ea=()=>m.MODE===B.DEVELOPMENT,Ke=()=>m.MODE===B.PRODUCTION,ga=()=>typeof process<"u"&&!0,ba=(e,t)=>new CustomEvent(e,{detail:{nativeEvent:t},cancelable:!0}),_a=(e,t)=>{let n=!1;for(let r in t){let o=t[r];if(typeof o<"u"){if(e[r]===o&&(typeof o!="object"||o===null))continue;n=!0}}return n?{...e,...t}:e},Aa=e=>{let t=typeof e;return e==null||t!=="object"&&t!=="function"},sn=()=>{try{return window.self===window.top?"top":"iframe"}catch{return"iframe"}},xa=()=>sn()==="iframe",ya=e=>!!e&&typeof e=="object"&&"then"in e&&"catch"in e&&"finally"in e,va=e=>{let t=e?.querySelectorAll("button, a, input, select, textarea, div[tabindex], label[tabindex]");return t?Array.from(t).filter(n=>n.tabIndex>-1&&!n.disabled):[]},Ge=(e,t)=>Array.isArray(e)&&Array.isArray(t)&&e.length===0&&t.length===0?!0:e===t,an=(e,t,n,r=!1)=>{let o=Object.keys(e),s=Object.keys(t);if(o.length!==s.length)return r&&console.warn("%cisShallowEqual: objects don't have same properties ->","color: #8B4000",e,t),!1;if(n&&Array.isArray(n)){for(let i of n)if(!(e[i]===t[i]||Ge(e[i],t[i])))return r&&console.warn(`%cisShallowEqual: ${i} not equal ->`,"color: #8B4000",e[i],t[i]),!1;return!0}return o.every(i=>{let a=n?.[i],l=a?a(e[i],t[i]):e[i]===t[i]||Ge(e[i],t[i]);return!l&&r&&console.warn(`%cisShallowEqual: ${i} not equal ->`,"color: #8B4000",e[i],t[i]),l})},Ma=(e,t,{checkForDefaultPrevented:n=!0}={})=>function(o){if(e?.(o),!n||!o?.defaultPrevented)return t?.(o)},Sa=(e,t,n)=>{if(!t)return e;if(n)return console.error(t),e;throw new Error(t)};function Ra(e,t){if(!e)throw new Error(t)}var Oa=e=>{let t,n,r=function(o){let s=Object.entries(o);if(t){let a=!0;for(let[l,u]of s)if(t.get(l)!==u){a=!1;break}if(a)return n}let i=e(o);return t=new Map(s),n=i,i};return r.clear=()=>{t=void 0,n=void 0},r},La=(e,t)=>e instanceof Set||e instanceof Map?e.has(t):"includes"in e?e.includes(t):e.hasOwnProperty(t),Fa=e=>JSON.parse(JSON.stringify(e)),wa=(e,t)=>an(e,t)?e:t;function Ia(e,t,n,r){return e?(e?.addEventListener?.(t,n,r),()=>{e?.removeEventListener?.(t,n,r)}):()=>{}}function Ca(e,t=!0){let n=e.length;if(n<4)return"";let r=e[0],o=e[1],s=e[2],i=`M${r[0].toFixed(2)},${r[1].toFixed(2)} Q${o[0].toFixed(2)},${o[1].toFixed(2)} ${V(o[0],s[0]).toFixed(2)},${V(o[1],s[1]).toFixed(2)} T`;for(let a=2,l=n-1;a<l;a++)r=e[a],o=e[a+1],i+=`${V(r[0],o[0]).toFixed(2)},${V(r[1],o[1]).toFixed(2)} `;return t&&(i+="Z"),i}var Pa=e=>e.replace(/\r?\n|\r/g,`
4
+ `);function ka(e){return e}var Oe=async(e,...t)=>new Promise(n=>{n(e(...t))}),Da=(...e)=>Math.max(...e.map(t=>t?1:0))>0,Ua=e=>{try{return JSON.parse(e)}catch{return null}},Ve=e=>e.replace(/"/g,"&quot;"),Na=e=>Array.isArray(e)?e:[e],ln=e=>Array.isArray(e),cn=e=>ln(e)?e.length:e instanceof Map||e instanceof Set?e.size:Object.keys(e).length,Ha=(e,t)=>{if(cn(e)===0)return null;let n=t||(o=>o),r=null;for(let o of e){let s=n(o);if((r===null||r===s)&&s!=null)r=s;else return null}return r},We="excalidraw-feature-flags",ee={COMPLEX_BINDINGS:!1},O=null,Ga=e=>{if(!O)try{let t=localStorage.getItem(We);t&&(O=JSON.parse(t)??ee)}catch{}return(O||ee)[e]},Ba=(e,t)=>{try{O={...O||ee,[e]:t},localStorage.setItem(We,JSON.stringify(O))}catch(n){console.error("unable to set feature flag",n)}},Ka=(e,t)=>t.includes(e);var Ye=new C(Date.now()),$e=0,za=()=>Math.floor(Ye.next()*2**31),qa=e=>{Ye=new C(e),$e=0},ja=()=>te()?`id${$e++}`:Ne();p();var ze=se(Xe(),1);var bn=e=>(e=e.trim(),e&&(0,ze.sanitizeUrl)(Ve(e))),ni=e=>!!(e?.includes(location.origin)||e?.startsWith("/")),ri=e=>{if(e=bn(e),e.startsWith("/"))return`${location.origin}${e}`;try{new URL(e)}catch{return"about:blank"}return e};p();var Y=class{subscribers=[];on(...t){let n=t.flat().filter(r=>typeof r=="function");return this.subscribers.push(...n),()=>this.off(n)}once(...t){let n=t.flat().filter(o=>typeof o=="function");n.push(()=>r());let r=this.on(...n);return r}off(...t){let n=t.flat();this.subscribers=this.subscribers.filter(r=>!n.includes(r))}trigger(...t){for(let n of this.subscribers)n(...t);return this}clear(){this.subscribers=[]}};p();var qe=class{constructor(t){this.behavior=t}emitters=new Map;lastPayload=new Map;emittedOnce=new Set;getEmitter(t){let n=this.emitters.get(t);return n||(n=new Y,this.emitters.set(t,n)),n}toPromiseValue(t){return t.length===1?t[0]:t}on(t,n){let r=this.behavior[t],o=this.lastPayload.get(t);if(n)return r.replay==="last"&&o&&(queueMicrotask(()=>n(...o)),r.cardinality==="once")?()=>{}:this.getEmitter(t).on(n);if(r.cardinality!=="once"||r.replay!=="last")throw new Error(`Event "${String(t)}" requires a callback`);return o?Promise.resolve(this.toPromiseValue(o)):new Promise(s=>{this.getEmitter(t).once((...i)=>{s(this.toPromiseValue(i))})})}emit(t,...n){let r=this.behavior[t];if(!Ke()&&r.cardinality==="once"){if(this.emittedOnce.has(t))throw new Error(`Event "${String(t)}" can only be emitted once`);this.emittedOnce.add(t)}r.replay==="last"&&this.lastPayload.set(t,n);try{this.getEmitter(t).trigger(...n)}finally{r.cardinality==="once"&&this.getEmitter(t).clear()}}clear(){this.lastPayload.clear(),this.emittedOnce.clear();for(let t of this.emitters.values())t.clear();this.emitters.clear()}};p();var je=class{constructor(t,n=Object.is){this.isEqual=n;this.value=t}version=0;value;waiters=new Set;subscribers=new Set;getSnapshot(){return{version:this.version,value:this.value}}set(t){if(this.isEqual(this.value,t))return!1;this.value=t,this.version+=1;let n=this.getSnapshot();for(let r of this.subscribers)r(n);for(let r of this.waiters)r(n);return this.waiters.clear(),!0}update(t){return this.set(t(this.value))}subscribe(t){return this.subscribers.add(t),()=>{this.subscribers.delete(t)}}pull(t=-1){return this.version!==t?Promise.resolve(this.getSnapshot()):new Promise(n=>{this.waiters.add(n)})}};p();var P=(e,t=5)=>parseFloat(e.toPrecision(t)),_n=e=>P(e.reduce((t,n)=>t+n)/e.length),ne=class e{static DEBUG_LOG_TIMES=!0;static TIMES_AGGR={};static TIMES_AVG={};static LAST_DEBUG_LOG_CALL=0;static DEBUG_LOG_INTERVAL_ID=null;static LAST_FRAME_TIMESTAMP=0;static FRAME_COUNT=0;static ANIMATION_FRAME_ID=null;static scheduleAnimationFrame=()=>{e.DEBUG_LOG_INTERVAL_ID!==null&&(e.ANIMATION_FRAME_ID=requestAnimationFrame(t=>{e.LAST_FRAME_TIMESTAMP!==t&&(e.LAST_FRAME_TIMESTAMP=t,e.FRAME_COUNT++),e.DEBUG_LOG_INTERVAL_ID!==null&&e.scheduleAnimationFrame()}))};static setupInterval=()=>{e.DEBUG_LOG_INTERVAL_ID===null&&(console.info("%c(starting perf recording)","color: lime"),e.DEBUG_LOG_INTERVAL_ID=window.setInterval(e.debugLogger,1e3),e.scheduleAnimationFrame()),e.LAST_DEBUG_LOG_CALL=Date.now()};static debugLogger=()=>{if(e.DEBUG_LOG_TIMES){for(let[t,{t:n,times:r}]of Object.entries(e.TIMES_AGGR))r.length&&(console.info(t,P(r.reduce((o,s)=>o+s)),r.sort((o,s)=>o-s).map(o=>P(o))),e.TIMES_AGGR[t]={t:n,times:[]});for(let[t,{t:n,times:r,avg:o}]of Object.entries(e.TIMES_AVG))if(r.length){let s=r.reduce((a,l)=>a+l),i=P(s/e.FRAME_COUNT);console.info(t,`- ${r.length} calls - ${i}ms/frame across ${e.FRAME_COUNT} frames (${P(i/16.67*100,1)}% of frame budget)`),e.TIMES_AVG[t]={t:n,times:[],avg:o!=null?_n([o,i]):i}}}e.FRAME_COUNT=0,Date.now()-e.LAST_DEBUG_LOG_CALL>600&&e.DEBUG_LOG_INTERVAL_ID!==null&&(console.info("%c(stopping perf recording)","color: red"),window.clearInterval(e.DEBUG_LOG_INTERVAL_ID),window.cancelAnimationFrame(e.ANIMATION_FRAME_ID),e.ANIMATION_FRAME_ID=null,e.FRAME_COUNT=0,e.LAST_FRAME_TIMESTAMP=0,e.DEBUG_LOG_INTERVAL_ID=null,e.TIMES_AGGR={},e.TIMES_AVG={})};static logTime=(t,n="default")=>{e.setupInterval();let r=performance.now(),{t:o,times:s}=e.TIMES_AGGR[n]=e.TIMES_AGGR[n]||{t:0,times:[]};o&&s.push(t??r-o),e.TIMES_AGGR[n].t=r};static logTimeAverage=(t,n="default")=>{e.setupInterval();let r=performance.now(),{t:o,times:s}=e.TIMES_AVG[n]=e.TIMES_AVG[n]||{t:0,times:[]};o&&s.push(t??r-o),e.TIMES_AVG[n].t=r};static logWrapper=t=>(n,r="default")=>(...o)=>{let s=performance.now(),i=n(...o);return e[t](performance.now()-s,r),i};static logTimeWrap=e.logWrapper("logTime");static logTimeAverageWrap=e.logWrapper("logTimeAverage");static perfWrap=(t,n="default")=>(...r)=>{console.time(n);let o=t(...r);return console.timeEnd(n),o};static CHANGED_CACHE={};static logChanged(t,n){let r=e.CHANGED_CACHE[t];if(e.CHANGED_CACHE[t]=n,!r)return;let o=new Set([...Object.keys(r),...Object.keys(n)]),s={};for(let i of o){let a=r[i],l=n[i];Ze(a,l)||(s[i]={prev:a,next:l})}Object.keys(s).length>0&&console.info(`[${t}] changed:`,s)}};function Ze(e,t){if(Object.is(e,t))return!0;if(e===null||t===null||typeof e!="object"||typeof t!="object"||Array.isArray(e)!==Array.isArray(t))return!1;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let o of n)if(!Ze(e[o],t[o]))return!1;return!0}export{Vr as ACTIVE_THRESHOLD,Or as ALLOWED_PASTE_MIME_TYPES,Zn as APP_NAME,no as ARROW_LABEL_FONT_SIZE_TO_MIN_WIDTH_RATIO,to as ARROW_LABEL_WIDTH_FRACTION,go as ARROW_TYPE,qe as AppEventBus,vo as BIND_MODE_TIMEOUT,eo as BOUND_TEXT_PADDING,ae as BinaryHeap,Mr as CANVAS_ONLY_ACTIONS,Vt as CANVAS_SEARCH_TAB,_e as CJK_HAND_DRAWN_FALLBACK_FONT,pr as CLASSES,Ce as CODES,kn as COLORS_PER_ROW,yr as COLOR_CHARCOAL_BLACK,Wn as COLOR_OUTLINE_CONTRAST_THRESHOLD,f as COLOR_PALETTE,vr as COLOR_VOICE_CALL,xr as COLOR_WHITE,ir as CURSOR_TYPE,hr as DARK_THEME_FILTER,io as DEFAULT_ADAPTIVE_RADIUS,Hn as DEFAULT_CANVAS_BACKGROUND_PICKS,Dn as DEFAULT_CHART_COLOR_INDEX,Ar as DEFAULT_COLLISION_THRESHOLD,G as DEFAULT_ELEMENT_BACKGROUND_COLOR_INDEX,Bn as DEFAULT_ELEMENT_BACKGROUND_COLOR_PALETTE,Nn as DEFAULT_ELEMENT_BACKGROUND_PICKS,uo as DEFAULT_ELEMENT_PROPS,H as DEFAULT_ELEMENT_STROKE_COLOR_INDEX,Gn as DEFAULT_ELEMENT_STROKE_COLOR_PALETTE,Un as DEFAULT_ELEMENT_STROKE_PICKS,Xr as DEFAULT_EXPORT_PADDING,mo as DEFAULT_FILENAME,gr as DEFAULT_FONT_FAMILY,Er as DEFAULT_FONT_SIZE,Sr as DEFAULT_GRID_SIZE,Rr as DEFAULT_GRID_STEP,ar as DEFAULT_LASER_COLOR,zr as DEFAULT_MAX_IMAGE_WIDTH_OR_HEIGHT,ao as DEFAULT_PROPORTIONAL_RADIUS,bo as DEFAULT_REDUCED_GLOBAL_ALPHA,po as DEFAULT_SIDEBAR,br as DEFAULT_TEXT_ALIGN,Nt as DEFAULT_TRANSFORM_HANDLE_SPACING,Wr as DEFAULT_UI_OPTIONS,ve as DEFAULT_VERSION,_r as DEFAULT_VERTICAL_ALIGN,yo as DOUBLE_TAP_POSITION_THRESHOLD,Jn as DRAGGING_THRESHOLD,ne as Debug,ho as EDITOR_LS_KEYS,_o as ELEMENT_LINK_KEY,so as ELEMENT_READY_TO_ERASE_OPACITY,nr as ELEMENT_SHIFT_TRANSLATE_AMOUNT,rr as ELEMENT_TRANSLATE_AMOUNT,Qr as ENCRYPTION_KEY_BITS,B as ENV,Gt as EPSILON,kt as EVENT,Fr as EXPORT_DATA_TYPES,Lr as EXPORT_IMAGE_TYPES,$r as EXPORT_SCALES,Y as Emitter,g as FONT_FAMILY,Z as FONT_FAMILY_FALLBACKS,Dt as FONT_FAMILY_GENERIC_FALLBACKS,K as FONT_METADATA,fr as FONT_SIZES,mr as FRAME_STYLE,Lo as GOOGLE_FONTS_RANGES,Br as HYPERLINK_TOOLTIP_DELAY,Kr as IDLE_THRESHOLD,Me as IMAGE_MIME_TYPES,Ir as IMAGE_RENDER_TIMEOUT,R as KEYS,jt as KeyCodeMap,tr as LINE_CONFIRM_THRESHOLD,xo as LINE_POLYGON_POINT_MERGE_DISTANCE,Fo as LOCAL_FONT_PROTOCOL,qr as MAX_ALLOWED_FILE_BYTES,Pn as MAX_CUSTOM_COLORS_USED_IN_CANVAS,Yr as MAX_DECIMALS_FOR_SVG_EXPORT,Gr as MAX_ZOOM,be as MIME_TYPES,er as MINIMUM_ARROW_SIZE,Tr as MIN_FONT_SIZE,Eo as MIN_WIDTH_OR_HEIGHT,Hr as MIN_ZOOM,Mo as MOBILE_ACTION_BUTTON_BG,xe as MONOSPACE_GENERIC_FONT,Go as MQ_MAX_HEIGHT_LANDSCAPE,No as MQ_MAX_MOBILE,Ko as MQ_MAX_TABLET,Ho as MQ_MAX_WIDTH_LANDSCAPE,Bo as MQ_MIN_TABLET,Vo as MQ_MIN_WIDTH_DESKTOP,Wo as MQ_RIGHT_SIDEBAR_MIN_WIDTH,Ao as ORIG_ID,lr as POINTER_BUTTON,cr as POINTER_EVENTS,De as PromisePool,Se as Queue,Kt as ROUGHNESS,lo as ROUNDNESS,Ae as SANS_SERIF_GENERIC_FONT,Ur as SCROLL_TIMEOUT,sr as SHIFT_LOCKING_ANGLE,Ht as SIDE_RESIZING_THRESHOLD,To as STATS_PANELS,Bt as STRING_MIME_TYPES,co as STROKE_WIDTH,Zr as SVG_DOCUMENT_PREAMBLE,jr as SVG_NS,Cr as TAP_TWICE_TIMEOUT,oo as TEXT_ALIGN,Qn as TEXT_AUTOWRAP_THRESHOLD,or as TEXT_TO_CENTER_SNAP_THRESHOLD,dr as THEME,kr as TITLE_TIMEOUT,fo as TOOL_TYPE,Pr as TOUCH_CTX_MENU_TIMEOUT,Wt as UserIdleState,Jr as VERSIONS,Dr as VERSION_TIMEOUT,ro as VERTICAL_ALIGN,je as VersionedSnapshotStore,I as WINDOWS_EMOJI_FALLBACK_FONT,ur as YOUTUBE_STATES,Nr as ZOOM_STEP,Ia as addEventListener,Xs as allowFullScreen,Cn as applyDarkModeFilter,ma as arrayToList,fa as arrayToMap,da as arrayToMapWithIndex,ha as arrayToObject,Sa as assertNever,ua as bytesToHexString,ws as capitalizeString,Na as castArray,Gs as chunk,Fa as cloneJSON,Vn as colorToHex,Ma as composeEventHandlers,Zo as createUserAgentDescriptor,Us as debounce,jo as deriveStylesPanelMode,Vs as distance,Be as easeOut,Hs as easeToValuesRAF,Ve as escapeDoubleQuotes,zs as exitFullScreen,ta as findIndex,na as findLastIndex,la as focusNearestParent,Kn as getAllColorsSpecificShade,Fs as getDateTime,wr as getExportSource,Ga as getFeatureFlag,ye as getFontFamilyFallbacks,en as getFontFamilyString,ks as getFontString,qo as getFormFactor,sn as getFrame,Ut as getGenericFontFamilyFallback,Zs as getGlobalCSSVariable,ds as getGridPoint,Io as getLineHeight,ia as getNearestScrollableContainer,ps as getSizeFromPoints,Ca as getSvgPathFromStroke,pa as getUpdatedTimestamp,sa as getVersion,wo as getVerticalOffset,Ra as invariant,we as isAndroid,Da as isAnyTrue,os as isArrowKey,Mn as isBounds,zo as isBrave,Yt as isChrome,Yn as isColorDark,Fe as isDarwin,Ea as isDevEnv,$o as isFirefox,$s as isFullScreen,Ie as isIOS,Jt as isInputLike,Cs as isInteractive,Zt as isLatinChar,ni as isLocalLink,La as isMemberOf,$t as isMobileBreakpoint,Aa as isPrimitive,Ke as isProdEnv,ya as isPromiseLike,Qs as isRTL,ln as isReadonlyArray,xa as isRunningInIframe,Xo as isSafari,Ws as isSelectionLikeTool,ga as isServerEnv,an as isShallowEqual,Xt as isTabletBreakpoint,te as isTestEnv,Is as isToolIcon,ge as isTransparent,Yo as isWindows,Ps as isWritableElement,Qo as loadDesktopUIModePreference,ra as mapFind,rs as matchKey,Oa as memoize,ea as muteFSAbortError,oa as nFormatter,Ds as nextAnimationFrame,Pa as normalizeEOL,$n as normalizeInputColor,bn as normalizeLink,Ka as oneOf,ca as preventUnload,Oe as promiseTry,va as queryFocusableElements,ja as randomId,za as randomInteger,Ha as reduceToCommonValue,Ks as removeSelection,fs as rescalePoints,qa as reseed,Re as resolvablePromise,Ee as rgbToHex,Ua as safelyParseJSON,js as sceneCoordsToViewportCoords,Bs as selectNode,Ls as setDateTimeForTests,Jo as setDesktopUIMode,Ba as setFeatureFlag,as as shouldMaintainAspectRatio,ss as shouldResizeFromCenter,is as shouldRotateWithDiscreteAngle,cn as sizeOf,aa as supportsEmoji,jn as supportsResizeObserver,Ns as throttleRAF,Ta as toArray,ka as toBrandedType,on as toIterable,ri as toValidURL,Js as tupleToCoors,Ys as updateActiveTool,_a as updateObject,wa as updateStable,qs as viewportCoordsToSceneCoords,ba as wrapEvent};
@@ -181,8 +181,6 @@ export declare const STRING_MIME_TYPES: {
181
181
  readonly json: "application/json";
182
182
  readonly excalidraw: "application/vnd.excalidraw+json";
183
183
  readonly excalidrawClipboard: "application/vnd.excalidraw.clipboard+json";
184
- readonly excalidrawlib: "application/vnd.excalidrawlib+json";
185
- readonly excalidrawlibIds: "application/vnd.excalidrawlib.ids+json";
186
184
  };
187
185
  export declare const MIME_TYPES: {
188
186
  readonly svg: "image/svg+xml";
@@ -202,8 +200,6 @@ export declare const MIME_TYPES: {
202
200
  readonly json: "application/json";
203
201
  readonly excalidraw: "application/vnd.excalidraw+json";
204
202
  readonly excalidrawClipboard: "application/vnd.excalidraw.clipboard+json";
205
- readonly excalidrawlib: "application/vnd.excalidrawlib+json";
206
- readonly excalidrawlibIds: "application/vnd.excalidrawlib.ids+json";
207
203
  };
208
204
  export declare const ALLOWED_PASTE_MIME_TYPES: readonly ["text/plain", "text/html", ...("image/svg+xml" | "image/png" | "image/jpeg" | "image/gif" | "image/webp" | "image/bmp" | "image/x-icon" | "image/avif" | "image/jfif")[]];
209
205
  export declare const EXPORT_IMAGE_TYPES: {
@@ -214,7 +210,6 @@ export declare const EXPORT_IMAGE_TYPES: {
214
210
  export declare const EXPORT_DATA_TYPES: {
215
211
  readonly excalidraw: "excalidraw";
216
212
  readonly excalidrawClipboard: "excalidraw/clipboard";
217
- readonly excalidrawLibrary: "excalidrawlib";
218
213
  readonly excalidrawClipboardWithAPI: "excalidraw-api/clipboard";
219
214
  };
220
215
  export declare const getExportSource: () => string;
@@ -230,12 +225,6 @@ export declare const MAX_ZOOM = 30;
230
225
  export declare const HYPERLINK_TOOLTIP_DELAY = 300;
231
226
  export declare const IDLE_THRESHOLD = 60000;
232
227
  export declare const ACTIVE_THRESHOLD = 3000;
233
- export declare const URL_QUERY_KEYS: {
234
- readonly addLibrary: "addLibrary";
235
- };
236
- export declare const URL_HASH_KEYS: {
237
- readonly addLibrary: "addLibrary";
238
- };
239
228
  export declare const DEFAULT_UI_OPTIONS: AppProps["UIOptions"];
240
229
  export declare const MAX_DECIMALS_FOR_SVG_EXPORT = 2;
241
230
  export declare const EXPORT_SCALES: number[];
@@ -247,7 +236,6 @@ export declare const SVG_DOCUMENT_PREAMBLE = "<?xml version=\"1.0\" standalone=\
247
236
  export declare const ENCRYPTION_KEY_BITS = 128;
248
237
  export declare const VERSIONS: {
249
238
  readonly excalidraw: 2;
250
- readonly excalidrawLibrary: 2;
251
239
  };
252
240
  export declare const BOUND_TEXT_PADDING = 5;
253
241
  export declare const ARROW_LABEL_WIDTH_FRACTION = 0.7;
@@ -290,13 +278,11 @@ export declare const DEFAULT_ELEMENT_PROPS: {
290
278
  opacity: ExcalidrawElement["opacity"];
291
279
  locked: ExcalidrawElement["locked"];
292
280
  };
293
- export declare const LIBRARY_SIDEBAR_TAB = "library";
294
281
  export declare const CANVAS_SEARCH_TAB = "search";
295
282
  export declare const DEFAULT_SIDEBAR: {
296
283
  readonly name: "default";
297
- readonly defaultTab: "library";
284
+ readonly defaultTab: "search";
298
285
  };
299
- export declare const LIBRARY_DISABLED_TYPES: Set<"embeddable" | "iframe" | "image">;
300
286
  export declare const TOOL_TYPE: {
301
287
  readonly selection: "selection";
302
288
  readonly lasso: "lasso";
@@ -318,7 +304,6 @@ export declare const TOOL_TYPE: {
318
304
  export declare const EDITOR_LS_KEYS: {
319
305
  readonly OAI_API_KEY: "excalidraw-oai-api-key";
320
306
  readonly MERMAID_TO_EXCALIDRAW: "mermaid-to-excalidraw";
321
- readonly PUBLISH_LIBRARY: "publish-library-data";
322
307
  };
323
308
  /**
324
309
  * not translated as this is used only in public, stateless API as default value
@@ -122,8 +122,6 @@ export declare const actionBindText: {
122
122
  } | null;
123
123
  openDialog: null | {
124
124
  name: "imageExport" | "help" | "jsonExport";
125
- } | {
126
- name: "commandPalette";
127
125
  } | {
128
126
  name: "settings";
129
127
  } | {
@@ -302,8 +300,6 @@ export declare const actionWrapTextInContainer: {
302
300
  } | null;
303
301
  openDialog: null | {
304
302
  name: "imageExport" | "help" | "jsonExport";
305
- } | {
306
- name: "commandPalette";
307
303
  } | {
308
304
  name: "settings";
309
305
  } | {
@@ -110,8 +110,6 @@ export declare const actionZoomIn: {
110
110
  } | null;
111
111
  openDialog: null | {
112
112
  name: "imageExport" | "help" | "jsonExport";
113
- } | {
114
- name: "commandPalette";
115
113
  } | {
116
114
  name: "settings";
117
115
  } | {
@@ -294,8 +292,6 @@ export declare const actionZoomOut: {
294
292
  } | null;
295
293
  openDialog: null | {
296
294
  name: "imageExport" | "help" | "jsonExport";
297
- } | {
298
- name: "commandPalette";
299
295
  } | {
300
296
  name: "settings";
301
297
  } | {
@@ -478,8 +474,6 @@ export declare const actionResetZoom: {
478
474
  } | null;
479
475
  openDialog: null | {
480
476
  name: "imageExport" | "help" | "jsonExport";
481
- } | {
482
- name: "commandPalette";
483
477
  } | {
484
478
  name: "settings";
485
479
  } | {
@@ -663,8 +657,6 @@ export declare const zoomToFitBounds: ({ bounds, appState, canvasOffsets, fitToV
663
657
  } | null;
664
658
  openDialog: null | {
665
659
  name: "imageExport" | "help" | "jsonExport";
666
- } | {
667
- name: "commandPalette";
668
660
  } | {
669
661
  name: "settings";
670
662
  } | {
@@ -844,8 +836,6 @@ export declare const zoomToFit: ({ canvasOffsets, targetElements, appState, fitT
844
836
  } | null;
845
837
  openDialog: null | {
846
838
  name: "imageExport" | "help" | "jsonExport";
847
- } | {
848
- name: "commandPalette";
849
839
  } | {
850
840
  name: "settings";
851
841
  } | {
@@ -1022,8 +1012,6 @@ export declare const actionZoomToFitSelectionInViewport: {
1022
1012
  } | null;
1023
1013
  openDialog: null | {
1024
1014
  name: "imageExport" | "help" | "jsonExport";
1025
- } | {
1026
- name: "commandPalette";
1027
1015
  } | {
1028
1016
  name: "settings";
1029
1017
  } | {
@@ -1204,8 +1192,6 @@ export declare const actionZoomToFitSelection: {
1204
1192
  } | null;
1205
1193
  openDialog: null | {
1206
1194
  name: "imageExport" | "help" | "jsonExport";
1207
- } | {
1208
- name: "commandPalette";
1209
1195
  } | {
1210
1196
  name: "settings";
1211
1197
  } | {
@@ -1387,8 +1373,6 @@ export declare const actionZoomToFit: {
1387
1373
  } | null;
1388
1374
  openDialog: null | {
1389
1375
  name: "imageExport" | "help" | "jsonExport";
1390
- } | {
1391
- name: "commandPalette";
1392
1376
  } | {
1393
1377
  name: "settings";
1394
1378
  } | {
@@ -1568,8 +1552,6 @@ export declare const actionToggleEraserTool: {
1568
1552
  } | null;
1569
1553
  openDialog: null | {
1570
1554
  name: "imageExport" | "help" | "jsonExport";
1571
- } | {
1572
- name: "commandPalette";
1573
1555
  } | {
1574
1556
  name: "settings";
1575
1557
  } | {
@@ -1742,8 +1724,6 @@ export declare const actionToggleLassoTool: {
1742
1724
  } | null;
1743
1725
  openDialog: null | {
1744
1726
  name: "imageExport" | "help" | "jsonExport";
1745
- } | {
1746
- name: "commandPalette";
1747
1727
  } | {
1748
1728
  name: "settings";
1749
1729
  } | {
@@ -1915,8 +1895,6 @@ export declare const actionToggleHandTool: {
1915
1895
  } | null;
1916
1896
  openDialog: null | {
1917
1897
  name: "imageExport" | "help" | "jsonExport";
1918
- } | {
1919
- name: "commandPalette";
1920
1898
  } | {
1921
1899
  name: "settings";
1922
1900
  } | {
@@ -103,8 +103,6 @@ export declare const actionPaste: {
103
103
  } | null;
104
104
  openDialog: null | {
105
105
  name: "imageExport" | "help" | "jsonExport";
106
- } | {
107
- name: "commandPalette";
108
106
  } | {
109
107
  name: "settings";
110
108
  } | {
@@ -321,8 +319,6 @@ export declare const actionCopyAsPng: {
321
319
  } | null;
322
320
  openDialog: null | {
323
321
  name: "imageExport" | "help" | "jsonExport";
324
- } | {
325
- name: "commandPalette";
326
322
  } | {
327
323
  name: "settings";
328
324
  } | {
@@ -104,8 +104,6 @@ export declare const actionToggleCropEditor: {
104
104
  } | null;
105
105
  openDialog: null | {
106
106
  name: "imageExport" | "help" | "jsonExport";
107
- } | {
108
- name: "commandPalette";
109
107
  } | {
110
108
  name: "settings";
111
109
  } | {
@@ -105,8 +105,6 @@ export declare const actionDeleteSelected: {
105
105
  } | null;
106
106
  openDialog: null | {
107
107
  name: "imageExport" | "help" | "jsonExport";
108
- } | {
109
- name: "commandPalette";
110
108
  } | {
111
109
  name: "settings";
112
110
  } | {
@@ -306,8 +304,6 @@ export declare const actionDeleteSelected: {
306
304
  } | null;
307
305
  openDialog: null | {
308
306
  name: "imageExport" | "help" | "jsonExport";
309
- } | {
310
- name: "commandPalette";
311
307
  } | {
312
308
  name: "settings";
313
309
  } | {
@@ -475,8 +471,6 @@ export declare const actionDeleteSelected: {
475
471
  } | null;
476
472
  openDialog: null | {
477
473
  name: "imageExport" | "help" | "jsonExport";
478
- } | {
479
- name: "commandPalette";
480
474
  } | {
481
475
  name: "settings";
482
476
  } | {
@@ -97,8 +97,6 @@ export declare const actionDeselect: {
97
97
  } | null;
98
98
  openDialog: null | {
99
99
  name: "imageExport" | "help" | "jsonExport";
100
- } | {
101
- name: "commandPalette";
102
100
  } | {
103
101
  name: "settings";
104
102
  } | {
@@ -115,8 +115,6 @@ export declare const actionToggleElementLock: {
115
115
  } | null;
116
116
  openDialog: null | {
117
117
  name: "imageExport" | "help" | "jsonExport";
118
- } | {
119
- name: "commandPalette";
120
118
  } | {
121
119
  name: "settings";
122
120
  } | {
@@ -294,8 +292,6 @@ export declare const actionUnlockAllElements: {
294
292
  } | null;
295
293
  openDialog: null | {
296
294
  name: "imageExport" | "help" | "jsonExport";
297
- } | {
298
- name: "commandPalette";
299
295
  } | {
300
296
  name: "settings";
301
297
  } | {
@@ -101,8 +101,6 @@ export declare const actionSetEmbeddableAsActiveTool: {
101
101
  } | null;
102
102
  openDialog: null | {
103
103
  name: "imageExport" | "help" | "jsonExport";
104
- } | {
105
- name: "commandPalette";
106
104
  } | {
107
105
  name: "settings";
108
106
  } | {
@@ -181,8 +181,6 @@ export declare const actionLoadScene: {
181
181
  } | null;
182
182
  openDialog: null | {
183
183
  name: "imageExport" | "help" | "jsonExport";
184
- } | {
185
- name: "commandPalette";
186
184
  } | {
187
185
  name: "settings";
188
186
  } | {
@@ -341,8 +339,6 @@ export declare const actionLoadScene: {
341
339
  } | null;
342
340
  openDialog: null | {
343
341
  name: "imageExport" | "help" | "jsonExport";
344
- } | {
345
- name: "commandPalette";
346
342
  } | {
347
343
  name: "settings";
348
344
  } | {