polotno 2.3.5 → 2.4.0
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.
- package/canvas/figure-element.js +1 -1
- package/canvas/html-element.js +2 -2
- package/canvas/line-element.js +1 -1
- package/canvas/text-element.d.ts +0 -17
- package/canvas/text-element.js +1 -1
- package/canvas/use-color.d.ts +42 -0
- package/canvas/use-color.js +1 -0
- package/canvas/video-element.js +1 -1
- package/package.json +1 -1
- package/polotno.bundle.js +30 -30
- package/toolbar/figure-toolbar.js +1 -1
package/polotno.bundle.js
CHANGED
|
@@ -26,7 +26,7 @@ For more info see: https://github.com/konvajs/react-konva/issues/256
|
|
|
26
26
|
`,nZ=`ReactKonva: You are using "zIndex" attribute for a Konva node.
|
|
27
27
|
react-konva may get confused with ordering. Just define correct order of elements in your render function of a component.
|
|
28
28
|
For more info see: https://github.com/konvajs/react-konva/issues/194
|
|
29
|
-
`,nQ={};function nJ(e,t,n=nQ){if(!n$&&"zIndex"in t&&(console.warn(nZ),n$=!0),!nK&&t.draggable){var r=void 0!==t.x||void 0!==t.y,i=t.onDragEnd||t.onDragMove;r&&!i&&(console.warn(nX),nK=!0)}for(var o in n)if(!nW[o]){var a="on"===o.slice(0,2),l=n[o]!==t[o];if(a&&l){var s=o.substr(2).toLowerCase();"content"===s.substr(0,7)&&(s="content"+s.substr(7,1).toUpperCase()+s.substr(8)),e.off(s,n[o])}t.hasOwnProperty(o)||e.setAttr(o,void 0)}var u=t._useStrictMode,c={},d=!1;let h={};for(var o in t)if(!nW[o]){var a="on"===o.slice(0,2),f=n[o]!==t[o];if(a&&f){var s=o.substr(2).toLowerCase();"content"===s.substr(0,7)&&(s="content"+s.substr(7,1).toUpperCase()+s.substr(8)),t[o]&&(h[s]=t[o])}!a&&(t[o]!==n[o]||u&&t[o]!==e.getAttr(o))&&(d=!0,c[o]=t[o])}for(var s in d&&(e.setAttrs(c),n0(e)),h)e.on(s+nY,h[s])}function n0(e){if(!R.Konva.autoDrawEnabled){var t=e.getLayer()||e.getStage();t&&t.batchDraw()}}h("clk2u");let n1={},n2={};function n3(e,t){if("string"==typeof t){console.error(`Do not use plain text as child of Konva.Node. You are using text: ${t}`);return}e.add(t),n0(e)}function n5(e,t,n){let r=l(nH)[e];r||(console.error(`Konva has no node with the type ${e}. Group will be used instead. If you use minimal version of react-konva, just import required nodes into Konva: "import "konva/lib/shapes/${e}" If you want to render DOM elements as part of canvas tree take a look into this demo: https://konvajs.github.io/docs/react/DOM_Portal.html`),r=l(nH).Group);let i={},o={};for(var a in t)"on"===a.slice(0,2)?o[a]=t[a]:i[a]=t[a];let s=new r(i);return nJ(s,o),s}function n6(e,t,n){console.error(`Text components are not supported for now in ReactKonva. Your text is: "${e}"`)}function n4(e,t,n){return!1}function n8(e){return e}function n9(){return null}function n7(){return null}function re(e,t,n,r){return n2}function rt(){}function rn(e){}function rr(e,t){return!1}function ri(){return n1}function ro(){return n1}l(nH).Node.prototype._applyProps=nJ;let ra=setTimeout,rl=clearTimeout,rs=-1;function ru(e,t){return!1}let rc=!1,rd=!0,rh=!0;function rf(e,t){t.parent===e?t.moveToTop():e.add(t),n0(e)}function rp(e,t){t.parent===e?t.moveToTop():e.add(t),n0(e)}function rg(e,t,n){t._remove(),e.add(t),t.setZIndex(n.getZIndex()),n0(e)}function rm(e,t,n){rg(e,t,n)}function rv(e,t){t.destroy(),t.off(nY),n0(e)}function ry(e,t){t.destroy(),t.off(nY),n0(e)}function rb(e,t,n){console.error(`Text components are not yet supported in ReactKonva. You text is: "${n}"`)}function rw(e,t,n){}function rx(e,t,n,r,i){nJ(e,i,r)}function r_(e){e.hide(),n0(e)}function rE(e){}function rS(e,t){(null==t.visible||t.visible)&&e.show()}function rC(e,t){}function rO(e){}function rk(){}let rP=()=>nq.DefaultEventPriority;var v=h("8NFma"),rT=Object.defineProperty,rA=Object.defineProperties,rN=Object.getOwnPropertyDescriptors,rj=Object.getOwnPropertySymbols,rR=Object.prototype.hasOwnProperty,rI=Object.prototype.propertyIsEnumerable,rL=(e,t,n)=>t in e?rT(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,rM=(e,t)=>{for(var n in t||(t={}))rR.call(t,n)&&rL(e,n,t[n]);if(rj)for(var n of rj(t))rI.call(t,n)&&rL(e,n,t[n]);return e},rD=(e,t)=>rA(e,rN(t));function rF(e){try{return Object.defineProperties(e,{_currentRenderer:{get:()=>null,set(){}},_currentRenderer2:{get:()=>null,set(){}}})}catch(t){return e}}let rz=rF(v.createContext(null));class rB extends v.Component{render(){return v.createElement(rz.Provider,{value:this._reactInternals},this.props.children)}}let{ReactCurrentOwner:rU,ReactCurrentDispatcher:rH}=v.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,rV=e=>{let t=l(v).useRef(),n=l(v).useRef(),r=l(v).useRef(),i=function(e){let t=l(v).useRef({});return l(v).useLayoutEffect(()=>{t.current=e}),l(v).useLayoutEffect(()=>()=>{t.current={}},[]),t.current}(e),o=function(){let e=function(){var e,t;let n=function(){let e=v.useContext(rz);if(null===e)throw Error("its-fine: useFiber must be called within a <FiberProvider />!");let t=v.useId();return v.useMemo(()=>{for(let n of[null==rU?void 0:rU.current,e,null==e?void 0:e.alternate]){if(!n)continue;let e=function e(t,n,r){if(!t)return;if(!0===r(t))return t;let i=n?t.return:t.child;for(;i;){let t=e(i,n,r);if(t)return t;i=n?null:i.sibling}}(n,!1,e=>{let n=e.memoizedState;for(;n;){if(n.memoizedState===t)return!0;n=n.next}});if(e)return e}},[e,t])}(),[r]=v.useState(()=>new Map);r.clear();let i=n;for(;i;){let n=null==(e=i.type)?void 0:e._context;n&&n!==rz&&!r.has(n)&&r.set(n,null==(t=null==rH?void 0:rH.current)?void 0:t.readContext(rF(n))),i=i.return}return r}();return v.useMemo(()=>Array.from(e.keys()).reduce((t,n)=>r=>v.createElement(t,null,v.createElement(n.Provider,rD(rM({},r),{value:e.get(n)}))),e=>v.createElement(rB,rM({},e))),[e])}(),a=t=>{let{forwardedRef:n}=e;n&&("function"==typeof n?n(t):n.current=t)};return l(v).useLayoutEffect(()=>(n.current=new(l(nH)).Stage({width:e.width,height:e.height,container:t.current}),a(n.current),r.current=rQ.createContainer(n.current,nq.LegacyRoot,!1,null),rQ.updateContainer(l(v).createElement(o,{},e.children),r.current),()=>{l(nH).isBrowser&&(a(null),rQ.updateContainer(null,r.current,null),n.current.destroy())}),[]),l(v).useLayoutEffect(()=>{a(n.current),nJ(n.current,e,i),rQ.updateContainer(l(v).createElement(o,{},e.children),r.current,null)}),l(v).createElement("div",{ref:t,id:e.id,accessKey:e.accessKey,className:e.className,role:e.role,style:e.style,tabIndex:e.tabIndex,title:e.title})},rq="Group",rG="Label",rW="Rect",r$="Line",rK="Image",rY="Text",rX="Path",rZ="Transformer",rQ=l(nV)(nG);rQ.injectIntoDevTools({findHostInstanceByFiber:()=>null,bundleType:0,version:l(v).version,rendererPackageName:"react-konva"});let rJ=l(v).forwardRef((e,t)=>l(v).createElement(rB,{},l(v).createElement(rV,{...e,forwardedRef:t})));var r0={},v=h("8NFma");r0=function(e,t,n){let r=v.useRef("loading"),i=v.useRef(),[o,a]=v.useState(0),l=v.useRef(),s=v.useRef(),u=v.useRef();return(l.current!==e||s.current!==t||u.current!==n)&&(r.current="loading",i.current=void 0,l.current=e,s.current=t,u.current=n),v.useLayoutEffect(function(){if(e){var o=document.createElement("img");return o.addEventListener("load",l),o.addEventListener("error",s),t&&(o.crossOrigin=t),n&&(o.referrerPolicy=n),o.src=e,function(){o.removeEventListener("load",l),o.removeEventListener("error",s)}}function l(){r.current="loaded",i.current=o,a(Math.random())}function s(){r.current="failed",i.current=void 0,a(Math.random())}},[e,t,n]),[i.current,r.current]};var v=(h("8NFma"),h("8NFma"),h("8NFma")),r1=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)0>t.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};let r2=e=>{let t=window.getComputedStyle(e).position;return!("absolute"===t||"relative"===t)},r3=({children:e,groupProps:t,divProps:n,transform:r,transformFunc:i})=>{let o=l(v).useRef(null);l(v).useRef();let[a]=l(v).useState(()=>document.createElement("div")),s=l(v).useMemo(()=>l(g).createRoot(a),[a]),u=null==r||r,c=function(e=()=>{}){let t=l(v).useRef(e);return t.current=e,l(v).useCallback((...e)=>t.current.apply(null,e),[])}(()=>{if(u&&o.current){let e=o.current.getAbsoluteTransform().decompose();i&&(e=i(e)),a.style.position="absolute",a.style.zIndex="10",a.style.top="0px",a.style.left="0px",a.style.transform=`translate(${e.x}px, ${e.y}px) rotate(${e.rotation}deg) scaleX(${e.scaleX}) scaleY(${e.scaleY})`,a.style.transformOrigin="top left"}else a.style.position="",a.style.zIndex="",a.style.top="",a.style.left="",a.style.transform="",a.style.transformOrigin="";let e=n||{},{style:t}=e,r=r1(e,["style"]);Object.assign(a.style,t),Object.assign(a,r)});return l(v).useLayoutEffect(()=>{var e;let t=o.current;if(!t)return;let n=null===(e=t.getStage())||void 0===e?void 0:e.container();if(n)return n.appendChild(a),u&&r2(n)&&(n.style.position="relative"),t.on("absoluteTransformChange",c),c(),()=>{var e;t.off("absoluteTransformChange",c),null===(e=a.parentNode)||void 0===e||e.removeChild(a)}},[u]),l(v).useLayoutEffect(()=>{c()},[n,i]),l(v).useLayoutEffect(()=>{s.render(e)}),l(v).useLayoutEffect(()=>()=>{setTimeout(()=>{s.unmount()})},[]),l(v).createElement(rq,Object.assign({ref:o},t))};var v=h("8NFma");let r5=({selector:e,enabled:t,children:n})=>{let r=l(v).useRef(null),i=l(v).useRef(null),o=l(v).useRef(),a=null==t||t;return l(v).useLayoutEffect(()=>{if(!r.current||!i.current)return;o.current=i.current;let t=r.current.getStage().findOne(e);a&&t?i.current.moveTo(t):i.current.moveTo(r.current);let n=r.current.getLayer();if(n&&(n.batchDraw(),t)){let e=t.getLayer();if(!e)return;e.batchDraw()}},[e,a]),l(v).useEffect(()=>()=>{var e;null===(e=o.current)||void 0===e||e.destroy()},[]),l(v).createElement(rq,{name:"_outer_portal",ref:r},l(v).createElement(rq,{name:"_inner_portal",ref:i},n))};var y=h("2SBKn");function r6(e,t,n){let r=n[t-1]||{values:{x:0,y:0}};if(e.marker===e.marker.toLowerCase())switch(e.marker=e.marker.toUpperCase(),e.marker){case"M":case"L":case"A":case"T":e.values.x+=r.values.x,e.values.y+=r.values.y;break;case"H":e.marker="L",e.values.x+=r.values.x,e.values.y=r.values.y;break;case"V":e.marker="L",e.values.x=r.values.x,e.values.y+=r.values.y;break;case"C":e.values.x+=r.values.x,e.values.y+=r.values.y,e.values.x1+=r.values.x,e.values.y1+=r.values.y,e.values.x2+=r.values.x,e.values.y2+=r.values.y;break;case"S":e.values.x+=r.values.x,e.values.y+=r.values.y,e.values.x2+=r.values.x,e.values.y2+=r.values.y;break;case"Q":e.values.x+=r.values.x,e.values.y+=r.values.y,e.values.x1+=r.values.x,e.values.y1+=r.values.y}else if(e.marker===e.marker.toUpperCase())switch(e.marker){case"H":e.marker="L",e.values.y=r.values.y;break;case"V":e.marker="L",e.values.x=r.values.x}if("Z"===e.marker){let r=function e(t,n){return"M"===t[n].marker?t[n]:e(t,n-1)}(n,t);e.values.x=r.values.x,e.values.y=r.values.y}return e}function r4(e,t,n){if(0!==t&&"L"===e.marker){let r=n[t-1];["x","y"].every(t=>0===Math.round(Math.abs(r.values[t]-e.values[t])))&&(e.overlap=!0)}return e}function r8(e,t){return Math.atan2(t.x-e.x,t.y-e.y)}function r9(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function r7(e,t){let n=t/Math.tan(e);return n===1/0||n===-1/0||isNaN(n)?t:n}var v=h("8NFma");let ie=()=>!1;function it(e,t){let n=l(v).useRef();l(v).useLayoutEffect(()=>{n.current&&n.current.destroy()},[t]),l(v).useLayoutEffect(()=>{},[])}let ir=0,ii=[];function io(e){ir+=1;let t=!1,n=setTimeout(()=>{t||(is(`Timeout loading image ${e}`),console.error("Timeout triggered for loader. Some assets may not have loaded.",e),t=!0,ia())},3e4);return()=>{t||(clearTimeout(n),ia())}}function ia(){0==(ir-=1)&&(ii.forEach(e=>e()),ii=[])}let il=[];function is(e){il.forEach(t=>t(e))}var y=h("2SBKn");let iu=y.observable(["Roboto","Amatic SC","Press Start 2P","Marck Script","Rubik Mono One"]),ic=y.observable({value:!1});function id(){return ic.value}let ih=y.observable([]);var ip=document.createElement("canvas");function ig(e,t="Arial"){var n=ip.getContext("2d");return n.font=`normal 40px '${e}', ${t}`,n.measureText("Some test text;?#D-ПРИВЕТ!1230o9u8i7y6t5r4e3w2q1").width}let im={Arial:!0},iv=e=>!!im[e];async function iy(e){if(im[e])return;let t=!!document.fonts?.load,n=ig("Arial");if(t)try{await document.fonts.load(`16px '${e}'`);let t=ig(e);if(n!==t){im[e]=!0;return}}catch{}let r=ig("Times","Times"),i=ig(e);for(let t=0;t<100;t++){let t=ig(e,"Arial"),o=ig(e,"Times");if(t!==i||t!==n||o!==r){im[e]=!0;return}await new Promise(e=>setTimeout(e,60))}console.warn(`Timeout for loading font "${e}". Looks like polotno can't load it. Is it a correct font family?`),is(`Timeout for loading font "${e}"`)}let ib={},iw={};var y=h("2SBKn");let ix=y.observable({imageDownScalingEnabled:!0,removeBackgroundEnabled:!0,htmlRenderEnabled:!1,forceTextFitEnabled:!1,textVerticalResizeEnabled:!1,textOverflow:"resize",animationsEnabled:!1});function i_(e=""){return(e=e.replace(/<\/p>/gi,"\n")).replace(/(<([^>]+)>)/gi,"")}var iE={};i(iE,"parse",()=>kP,e=>kP=e),i(iE,"stringify",()=>kT,e=>kT=e);var iS=iS||{};iS.stringify=(O8={"visit_linear-gradient":function(e){return O8.visit_gradient(e)},"visit_repeating-linear-gradient":function(e){return O8.visit_gradient(e)},"visit_radial-gradient":function(e){return O8.visit_gradient(e)},"visit_repeating-radial-gradient":function(e){return O8.visit_gradient(e)},visit_gradient:function(e){var t=O8.visit(e.orientation);return t&&(t+=", "),e.type+"("+t+O8.visit(e.colorStops)+")"},visit_shape:function(e){var t=e.value,n=O8.visit(e.at),r=O8.visit(e.style);return r&&(t+=" "+r),n&&(t+=" at "+n),t},"visit_default-radial":function(e){var t="",n=O8.visit(e.at);return n&&(t+=n),t},"visit_extent-keyword":function(e){var t=e.value,n=O8.visit(e.at);return n&&(t+=" at "+n),t},"visit_position-keyword":function(e){return e.value},visit_position:function(e){return O8.visit(e.value.x)+" "+O8.visit(e.value.y)},"visit_%":function(e){return e.value+"%"},visit_em:function(e){return e.value+"em"},visit_px:function(e){return e.value+"px"},visit_literal:function(e){return O8.visit_color(e.value,e)},visit_hex:function(e){return O8.visit_color("#"+e.value,e)},visit_rgb:function(e){return O8.visit_color("rgb("+e.value.join(", ")+")",e)},visit_rgba:function(e){return O8.visit_color("rgba("+e.value.join(", ")+")",e)},visit_color:function(e,t){var n=e,r=O8.visit(t.length);return r&&(n+=" "+r),n},visit_angular:function(e){return e.value+"deg"},visit_directional:function(e){return"to "+e.value},visit_array:function(e){var t="",n=e.length;return e.forEach(function(e,r){t+=O8.visit(e),r<n-1&&(t+=", ")}),t},visit:function(e){if(!e)return"";if(e instanceof Array)return O8.visit_array(e,"");if(e.type){var t=O8["visit_"+e.type];if(t)return t(e);throw Error("Missing visitor visit_"+e.type)}throw Error("Invalid node.")}},function(e){return O8.visit(e)});var iS=iS||{};iS.parse=function(){var e={linearGradient:/^(\-(webkit|o|ms|moz)\-)?(linear\-gradient)/i,repeatingLinearGradient:/^(\-(webkit|o|ms|moz)\-)?(repeating\-linear\-gradient)/i,radialGradient:/^(\-(webkit|o|ms|moz)\-)?(radial\-gradient)/i,repeatingRadialGradient:/^(\-(webkit|o|ms|moz)\-)?(repeating\-radial\-gradient)/i,sideOrCorner:/^to (left (top|bottom)|right (top|bottom)|left|right|top|bottom)/i,extentKeywords:/^(closest\-side|closest\-corner|farthest\-side|farthest\-corner|contain|cover)/,positionKeywords:/^(left|center|right|top|bottom)/i,pixelValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))px/,percentageValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))\%/,emValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))em/,angleValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))deg/,startCall:/^\(/,endCall:/^\)/,comma:/^,/,hexColor:/^\#([0-9a-fA-F]+)/,literalColor:/^([a-zA-Z]+)/,rgbColor:/^rgb/i,rgbaColor:/^rgba/i,number:/^(([0-9]*\.[0-9]+)|([0-9]+\.?))/},t="";function n(e){var n=Error(t+": "+e);throw n.source=t,n}function r(){return i("linear-gradient",e.linearGradient,a)||i("repeating-linear-gradient",e.repeatingLinearGradient,a)||i("radial-gradient",e.radialGradient,l)||i("repeating-radial-gradient",e.repeatingRadialGradient,l)}function i(t,r,i){return o(r,function(r){var o=i();return o&&!y(e.comma)&&n("Missing comma before color stops"),{type:t,orientation:o,colorStops:h(f)}})}function o(t,r){var i=y(t);if(i){y(e.startCall)||n("Missing (");var o=r(i);return y(e.endCall)||n("Missing )"),o}}function a(){return v("directional",e.sideOrCorner,1)||v("angular",e.angleValue,1)}function l(){var n,r,i=s();return i&&((n=[]).push(i),r=t,y(e.comma)&&((i=s())?n.push(i):t=r)),n}function s(){var e,t,n=((e=v("shape",/^(circle)/i,0))&&(e.style=m()||u()),e||((t=v("shape",/^(ellipse)/i,0))&&(t.style=g()||u()),t));if(n)n.at=c();else{var r=u();if(r){n=r;var i=c();i&&(n.at=i)}else{var o=d();o&&(n={type:"default-radial",at:o})}}return n}function u(){return v("extent-keyword",e.extentKeywords,1)}function c(){if(v("position",/^at/,0)){var e=d();return e||n("Missing positioning value"),e}}function d(){var e={x:g(),y:g()};if(e.x||e.y)return{type:"position",value:e}}function h(t){var r=t(),i=[];if(r)for(i.push(r);y(e.comma);)(r=t())?i.push(r):n("One extra comma");return i}function f(){var t=v("hex",e.hexColor,1)||o(e.rgbaColor,function(){return{type:"rgba",value:h(p)}})||o(e.rgbColor,function(){return{type:"rgb",value:h(p)}})||v("literal",e.literalColor,0);return t||n("Expected color definition"),t.length=g(),t}function p(){return y(e.number)[1]}function g(){return v("%",e.percentageValue,1)||v("position-keyword",e.positionKeywords,1)||m()}function m(){return v("px",e.pixelValue,1)||v("em",e.emValue,1)}function v(e,t,n){var r=y(t);if(r)return{type:e,value:r[n]}}function y(e){var n,r;return(r=/^[\n\r\t\s]+/.exec(t))&&b(r[0].length),(n=e.exec(t))&&b(n[0].length),n}function b(e){t=t.substr(e)}return function(e){var i;return t=e.toString(),i=h(r),t.length>0&&n("Invalid input not EOF"),i}}(),kP=iS.parse,kT=iS.stringify;let iC=e=>e.indexOf("linear-gradient")>=0,iO=e=>"hex"===e.type?"#"+e.value:"literal"===e.type?e.value:`${e.type}(${e.value.join(",")})`,ik=e=>{if(!iC(e))return{rotation:0,stops:[{offset:0,color:e},{offset:1,color:e}]};let t=l(iE).parse(e)[0];return{rotation:parseFloat(t.orientation.value),stops:t.colorStops.map((e,n)=>({color:iO(e),offset:e.length?parseFloat(e.length.value)/100:n/(t.colorStops.length-1)}))}};function iP(e,t){let n={filters:[]};t.brightnessEnabled&&(n.filters.push(l(A).Filters.Brighten),n.brightness=t.brightness),t.blurEnabled&&(n.filters.push(l(A).Filters.Blur),n.blurRadius=t.blurRadius),t.sepiaEnabled&&n.filters.push(l(A).Filters.Sepia),t.grayscaleEnabled&&n.filters.push(l(A).Filters.Grayscale),e.setAttrs(n),n.filters.length?e.cache({pixelRatio:t.store._elementsPixelRatio}):e.clearCache(),e.getLayer()?.batchDraw()}h("8NFma");let iT={stroke:"rgb(0, 161, 255)",strokeWidth:2},iA=P(({element:e})=>(0,p.jsx)(rW,{name:"highlighter",x:e.a.x,y:e.a.y,rotation:e.a.rotation,width:e.a.width,height:e.a.height,listening:!1,strokeScaleEnabled:!1,...iT}));var v=h("8NFma");let iN=()=>window.innerWidth<=500,ij=e=>`
|
|
29
|
+
`,nQ={};function nJ(e,t,n=nQ){if(!n$&&"zIndex"in t&&(console.warn(nZ),n$=!0),!nK&&t.draggable){var r=void 0!==t.x||void 0!==t.y,i=t.onDragEnd||t.onDragMove;r&&!i&&(console.warn(nX),nK=!0)}for(var o in n)if(!nW[o]){var a="on"===o.slice(0,2),l=n[o]!==t[o];if(a&&l){var s=o.substr(2).toLowerCase();"content"===s.substr(0,7)&&(s="content"+s.substr(7,1).toUpperCase()+s.substr(8)),e.off(s,n[o])}t.hasOwnProperty(o)||e.setAttr(o,void 0)}var u=t._useStrictMode,c={},d=!1;let h={};for(var o in t)if(!nW[o]){var a="on"===o.slice(0,2),f=n[o]!==t[o];if(a&&f){var s=o.substr(2).toLowerCase();"content"===s.substr(0,7)&&(s="content"+s.substr(7,1).toUpperCase()+s.substr(8)),t[o]&&(h[s]=t[o])}!a&&(t[o]!==n[o]||u&&t[o]!==e.getAttr(o))&&(d=!0,c[o]=t[o])}for(var s in d&&(e.setAttrs(c),n0(e)),h)e.on(s+nY,h[s])}function n0(e){if(!R.Konva.autoDrawEnabled){var t=e.getLayer()||e.getStage();t&&t.batchDraw()}}h("clk2u");let n1={},n2={};function n3(e,t){if("string"==typeof t){console.error(`Do not use plain text as child of Konva.Node. You are using text: ${t}`);return}e.add(t),n0(e)}function n5(e,t,n){let r=l(nH)[e];r||(console.error(`Konva has no node with the type ${e}. Group will be used instead. If you use minimal version of react-konva, just import required nodes into Konva: "import "konva/lib/shapes/${e}" If you want to render DOM elements as part of canvas tree take a look into this demo: https://konvajs.github.io/docs/react/DOM_Portal.html`),r=l(nH).Group);let i={},o={};for(var a in t)"on"===a.slice(0,2)?o[a]=t[a]:i[a]=t[a];let s=new r(i);return nJ(s,o),s}function n6(e,t,n){console.error(`Text components are not supported for now in ReactKonva. Your text is: "${e}"`)}function n4(e,t,n){return!1}function n8(e){return e}function n9(){return null}function n7(){return null}function re(e,t,n,r){return n2}function rt(){}function rn(e){}function rr(e,t){return!1}function ri(){return n1}function ro(){return n1}l(nH).Node.prototype._applyProps=nJ;let ra=setTimeout,rl=clearTimeout,rs=-1;function ru(e,t){return!1}let rc=!1,rd=!0,rh=!0;function rf(e,t){t.parent===e?t.moveToTop():e.add(t),n0(e)}function rp(e,t){t.parent===e?t.moveToTop():e.add(t),n0(e)}function rg(e,t,n){t._remove(),e.add(t),t.setZIndex(n.getZIndex()),n0(e)}function rm(e,t,n){rg(e,t,n)}function rv(e,t){t.destroy(),t.off(nY),n0(e)}function ry(e,t){t.destroy(),t.off(nY),n0(e)}function rb(e,t,n){console.error(`Text components are not yet supported in ReactKonva. You text is: "${n}"`)}function rw(e,t,n){}function rx(e,t,n,r,i){nJ(e,i,r)}function r_(e){e.hide(),n0(e)}function rE(e){}function rS(e,t){(null==t.visible||t.visible)&&e.show()}function rC(e,t){}function rO(e){}function rk(){}let rP=()=>nq.DefaultEventPriority;var v=h("8NFma"),rT=Object.defineProperty,rA=Object.defineProperties,rN=Object.getOwnPropertyDescriptors,rj=Object.getOwnPropertySymbols,rR=Object.prototype.hasOwnProperty,rI=Object.prototype.propertyIsEnumerable,rL=(e,t,n)=>t in e?rT(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,rM=(e,t)=>{for(var n in t||(t={}))rR.call(t,n)&&rL(e,n,t[n]);if(rj)for(var n of rj(t))rI.call(t,n)&&rL(e,n,t[n]);return e},rD=(e,t)=>rA(e,rN(t));function rF(e){try{return Object.defineProperties(e,{_currentRenderer:{get:()=>null,set(){}},_currentRenderer2:{get:()=>null,set(){}}})}catch(t){return e}}let rz=rF(v.createContext(null));class rB extends v.Component{render(){return v.createElement(rz.Provider,{value:this._reactInternals},this.props.children)}}let{ReactCurrentOwner:rU,ReactCurrentDispatcher:rH}=v.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,rV=e=>{let t=l(v).useRef(),n=l(v).useRef(),r=l(v).useRef(),i=function(e){let t=l(v).useRef({});return l(v).useLayoutEffect(()=>{t.current=e}),l(v).useLayoutEffect(()=>()=>{t.current={}},[]),t.current}(e),o=function(){let e=function(){var e,t;let n=function(){let e=v.useContext(rz);if(null===e)throw Error("its-fine: useFiber must be called within a <FiberProvider />!");let t=v.useId();return v.useMemo(()=>{for(let n of[null==rU?void 0:rU.current,e,null==e?void 0:e.alternate]){if(!n)continue;let e=function e(t,n,r){if(!t)return;if(!0===r(t))return t;let i=n?t.return:t.child;for(;i;){let t=e(i,n,r);if(t)return t;i=n?null:i.sibling}}(n,!1,e=>{let n=e.memoizedState;for(;n;){if(n.memoizedState===t)return!0;n=n.next}});if(e)return e}},[e,t])}(),[r]=v.useState(()=>new Map);r.clear();let i=n;for(;i;){let n=null==(e=i.type)?void 0:e._context;n&&n!==rz&&!r.has(n)&&r.set(n,null==(t=null==rH?void 0:rH.current)?void 0:t.readContext(rF(n))),i=i.return}return r}();return v.useMemo(()=>Array.from(e.keys()).reduce((t,n)=>r=>v.createElement(t,null,v.createElement(n.Provider,rD(rM({},r),{value:e.get(n)}))),e=>v.createElement(rB,rM({},e))),[e])}(),a=t=>{let{forwardedRef:n}=e;n&&("function"==typeof n?n(t):n.current=t)};return l(v).useLayoutEffect(()=>(n.current=new(l(nH)).Stage({width:e.width,height:e.height,container:t.current}),a(n.current),r.current=rQ.createContainer(n.current,nq.LegacyRoot,!1,null),rQ.updateContainer(l(v).createElement(o,{},e.children),r.current),()=>{l(nH).isBrowser&&(a(null),rQ.updateContainer(null,r.current,null),n.current.destroy())}),[]),l(v).useLayoutEffect(()=>{a(n.current),nJ(n.current,e,i),rQ.updateContainer(l(v).createElement(o,{},e.children),r.current,null)}),l(v).createElement("div",{ref:t,id:e.id,accessKey:e.accessKey,className:e.className,role:e.role,style:e.style,tabIndex:e.tabIndex,title:e.title})},rq="Group",rG="Label",rW="Rect",r$="Line",rK="Image",rY="Text",rX="Path",rZ="Transformer",rQ=l(nV)(nG);rQ.injectIntoDevTools({findHostInstanceByFiber:()=>null,bundleType:0,version:l(v).version,rendererPackageName:"react-konva"});let rJ=l(v).forwardRef((e,t)=>l(v).createElement(rB,{},l(v).createElement(rV,{...e,forwardedRef:t})));var r0={},v=h("8NFma");r0=function(e,t,n){let r=v.useRef("loading"),i=v.useRef(),[o,a]=v.useState(0),l=v.useRef(),s=v.useRef(),u=v.useRef();return(l.current!==e||s.current!==t||u.current!==n)&&(r.current="loading",i.current=void 0,l.current=e,s.current=t,u.current=n),v.useLayoutEffect(function(){if(e){var o=document.createElement("img");return o.addEventListener("load",l),o.addEventListener("error",s),t&&(o.crossOrigin=t),n&&(o.referrerPolicy=n),o.src=e,function(){o.removeEventListener("load",l),o.removeEventListener("error",s)}}function l(){r.current="loaded",i.current=o,a(Math.random())}function s(){r.current="failed",i.current=void 0,a(Math.random())}},[e,t,n]),[i.current,r.current]};var v=(h("8NFma"),h("8NFma"),h("8NFma")),r1=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)0>t.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};let r2=e=>{let t=window.getComputedStyle(e).position;return!("absolute"===t||"relative"===t)},r3=({children:e,groupProps:t,divProps:n,transform:r,transformFunc:i})=>{let o=l(v).useRef(null);l(v).useRef();let[a]=l(v).useState(()=>document.createElement("div")),s=l(v).useMemo(()=>l(g).createRoot(a),[a]),u=null==r||r,c=function(e=()=>{}){let t=l(v).useRef(e);return t.current=e,l(v).useCallback((...e)=>t.current.apply(null,e),[])}(()=>{if(u&&o.current){let e=o.current.getAbsoluteTransform().decompose();i&&(e=i(e)),a.style.position="absolute",a.style.zIndex="10",a.style.top="0px",a.style.left="0px",a.style.transform=`translate(${e.x}px, ${e.y}px) rotate(${e.rotation}deg) scaleX(${e.scaleX}) scaleY(${e.scaleY})`,a.style.transformOrigin="top left"}else a.style.position="",a.style.zIndex="",a.style.top="",a.style.left="",a.style.transform="",a.style.transformOrigin="";let e=n||{},{style:t}=e,r=r1(e,["style"]);Object.assign(a.style,t),Object.assign(a,r)});return l(v).useLayoutEffect(()=>{var e;let t=o.current;if(!t)return;let n=null===(e=t.getStage())||void 0===e?void 0:e.container();if(n)return n.appendChild(a),u&&r2(n)&&(n.style.position="relative"),t.on("absoluteTransformChange",c),c(),()=>{var e;t.off("absoluteTransformChange",c),null===(e=a.parentNode)||void 0===e||e.removeChild(a)}},[u]),l(v).useLayoutEffect(()=>{c()},[n,i]),l(v).useLayoutEffect(()=>{s.render(e)}),l(v).useLayoutEffect(()=>()=>{setTimeout(()=>{s.unmount()})},[]),l(v).createElement(rq,Object.assign({ref:o},t))};var v=h("8NFma");let r5=({selector:e,enabled:t,children:n})=>{let r=l(v).useRef(null),i=l(v).useRef(null),o=l(v).useRef(),a=null==t||t;return l(v).useLayoutEffect(()=>{if(!r.current||!i.current)return;o.current=i.current;let t=r.current.getStage().findOne(e);a&&t?i.current.moveTo(t):i.current.moveTo(r.current);let n=r.current.getLayer();if(n&&(n.batchDraw(),t)){let e=t.getLayer();if(!e)return;e.batchDraw()}},[e,a]),l(v).useEffect(()=>()=>{var e;null===(e=o.current)||void 0===e||e.destroy()},[]),l(v).createElement(rq,{name:"_outer_portal",ref:r},l(v).createElement(rq,{name:"_inner_portal",ref:i},n))};var y=h("2SBKn");function r6(e,t,n){let r=n[t-1]||{values:{x:0,y:0}};if(e.marker===e.marker.toLowerCase())switch(e.marker=e.marker.toUpperCase(),e.marker){case"M":case"L":case"A":case"T":e.values.x+=r.values.x,e.values.y+=r.values.y;break;case"H":e.marker="L",e.values.x+=r.values.x,e.values.y=r.values.y;break;case"V":e.marker="L",e.values.x=r.values.x,e.values.y+=r.values.y;break;case"C":e.values.x+=r.values.x,e.values.y+=r.values.y,e.values.x1+=r.values.x,e.values.y1+=r.values.y,e.values.x2+=r.values.x,e.values.y2+=r.values.y;break;case"S":e.values.x+=r.values.x,e.values.y+=r.values.y,e.values.x2+=r.values.x,e.values.y2+=r.values.y;break;case"Q":e.values.x+=r.values.x,e.values.y+=r.values.y,e.values.x1+=r.values.x,e.values.y1+=r.values.y}else if(e.marker===e.marker.toUpperCase())switch(e.marker){case"H":e.marker="L",e.values.y=r.values.y;break;case"V":e.marker="L",e.values.x=r.values.x}if("Z"===e.marker){let r=function e(t,n){return"M"===t[n].marker?t[n]:e(t,n-1)}(n,t);e.values.x=r.values.x,e.values.y=r.values.y}return e}function r4(e,t,n){if(0!==t&&"L"===e.marker){let r=n[t-1];["x","y"].every(t=>0===Math.round(Math.abs(r.values[t]-e.values[t])))&&(e.overlap=!0)}return e}function r8(e,t){return Math.atan2(t.x-e.x,t.y-e.y)}function r9(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function r7(e,t){let n=t/Math.tan(e);return n===1/0||n===-1/0||isNaN(n)?t:n}var v=h("8NFma"),ie={};i(ie,"parse",()=>kP,e=>kP=e),i(ie,"stringify",()=>kT,e=>kT=e);var it=it||{};it.stringify=(O8={"visit_linear-gradient":function(e){return O8.visit_gradient(e)},"visit_repeating-linear-gradient":function(e){return O8.visit_gradient(e)},"visit_radial-gradient":function(e){return O8.visit_gradient(e)},"visit_repeating-radial-gradient":function(e){return O8.visit_gradient(e)},visit_gradient:function(e){var t=O8.visit(e.orientation);return t&&(t+=", "),e.type+"("+t+O8.visit(e.colorStops)+")"},visit_shape:function(e){var t=e.value,n=O8.visit(e.at),r=O8.visit(e.style);return r&&(t+=" "+r),n&&(t+=" at "+n),t},"visit_default-radial":function(e){var t="",n=O8.visit(e.at);return n&&(t+=n),t},"visit_extent-keyword":function(e){var t=e.value,n=O8.visit(e.at);return n&&(t+=" at "+n),t},"visit_position-keyword":function(e){return e.value},visit_position:function(e){return O8.visit(e.value.x)+" "+O8.visit(e.value.y)},"visit_%":function(e){return e.value+"%"},visit_em:function(e){return e.value+"em"},visit_px:function(e){return e.value+"px"},visit_literal:function(e){return O8.visit_color(e.value,e)},visit_hex:function(e){return O8.visit_color("#"+e.value,e)},visit_rgb:function(e){return O8.visit_color("rgb("+e.value.join(", ")+")",e)},visit_rgba:function(e){return O8.visit_color("rgba("+e.value.join(", ")+")",e)},visit_color:function(e,t){var n=e,r=O8.visit(t.length);return r&&(n+=" "+r),n},visit_angular:function(e){return e.value+"deg"},visit_directional:function(e){return"to "+e.value},visit_array:function(e){var t="",n=e.length;return e.forEach(function(e,r){t+=O8.visit(e),r<n-1&&(t+=", ")}),t},visit:function(e){if(!e)return"";if(e instanceof Array)return O8.visit_array(e,"");if(e.type){var t=O8["visit_"+e.type];if(t)return t(e);throw Error("Missing visitor visit_"+e.type)}throw Error("Invalid node.")}},function(e){return O8.visit(e)});var it=it||{};it.parse=function(){var e={linearGradient:/^(\-(webkit|o|ms|moz)\-)?(linear\-gradient)/i,repeatingLinearGradient:/^(\-(webkit|o|ms|moz)\-)?(repeating\-linear\-gradient)/i,radialGradient:/^(\-(webkit|o|ms|moz)\-)?(radial\-gradient)/i,repeatingRadialGradient:/^(\-(webkit|o|ms|moz)\-)?(repeating\-radial\-gradient)/i,sideOrCorner:/^to (left (top|bottom)|right (top|bottom)|left|right|top|bottom)/i,extentKeywords:/^(closest\-side|closest\-corner|farthest\-side|farthest\-corner|contain|cover)/,positionKeywords:/^(left|center|right|top|bottom)/i,pixelValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))px/,percentageValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))\%/,emValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))em/,angleValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))deg/,startCall:/^\(/,endCall:/^\)/,comma:/^,/,hexColor:/^\#([0-9a-fA-F]+)/,literalColor:/^([a-zA-Z]+)/,rgbColor:/^rgb/i,rgbaColor:/^rgba/i,number:/^(([0-9]*\.[0-9]+)|([0-9]+\.?))/},t="";function n(e){var n=Error(t+": "+e);throw n.source=t,n}function r(){return i("linear-gradient",e.linearGradient,a)||i("repeating-linear-gradient",e.repeatingLinearGradient,a)||i("radial-gradient",e.radialGradient,l)||i("repeating-radial-gradient",e.repeatingRadialGradient,l)}function i(t,r,i){return o(r,function(r){var o=i();return o&&!y(e.comma)&&n("Missing comma before color stops"),{type:t,orientation:o,colorStops:h(f)}})}function o(t,r){var i=y(t);if(i){y(e.startCall)||n("Missing (");var o=r(i);return y(e.endCall)||n("Missing )"),o}}function a(){return v("directional",e.sideOrCorner,1)||v("angular",e.angleValue,1)}function l(){var n,r,i=s();return i&&((n=[]).push(i),r=t,y(e.comma)&&((i=s())?n.push(i):t=r)),n}function s(){var e,t,n=((e=v("shape",/^(circle)/i,0))&&(e.style=m()||u()),e||((t=v("shape",/^(ellipse)/i,0))&&(t.style=g()||u()),t));if(n)n.at=c();else{var r=u();if(r){n=r;var i=c();i&&(n.at=i)}else{var o=d();o&&(n={type:"default-radial",at:o})}}return n}function u(){return v("extent-keyword",e.extentKeywords,1)}function c(){if(v("position",/^at/,0)){var e=d();return e||n("Missing positioning value"),e}}function d(){var e={x:g(),y:g()};if(e.x||e.y)return{type:"position",value:e}}function h(t){var r=t(),i=[];if(r)for(i.push(r);y(e.comma);)(r=t())?i.push(r):n("One extra comma");return i}function f(){var t=v("hex",e.hexColor,1)||o(e.rgbaColor,function(){return{type:"rgba",value:h(p)}})||o(e.rgbColor,function(){return{type:"rgb",value:h(p)}})||v("literal",e.literalColor,0);return t||n("Expected color definition"),t.length=g(),t}function p(){return y(e.number)[1]}function g(){return v("%",e.percentageValue,1)||v("position-keyword",e.positionKeywords,1)||m()}function m(){return v("px",e.pixelValue,1)||v("em",e.emValue,1)}function v(e,t,n){var r=y(t);if(r)return{type:e,value:r[n]}}function y(e){var n,r;return(r=/^[\n\r\t\s]+/.exec(t))&&b(r[0].length),(n=e.exec(t))&&b(n[0].length),n}function b(e){t=t.substr(e)}return function(e){var i;return t=e.toString(),i=h(r),t.length>0&&n("Invalid input not EOF"),i}}(),kP=it.parse,kT=it.stringify;let ir=e=>e.indexOf("linear-gradient")>=0,ii=e=>"hex"===e.type?"#"+e.value:"literal"===e.type?e.value:`${e.type}(${e.value.join(",")})`,io=e=>{if(!ir(e))return{rotation:0,stops:[{offset:0,color:e},{offset:1,color:e}]};let t=l(ie).parse(e)[0];return{rotation:parseFloat(t.orientation.value),stops:t.colorStops.map((e,n)=>({color:ii(e),offset:e.length?parseFloat(e.length.value)/100:n/(t.colorStops.length-1)}))}},ia=(e,t=e.fill,n="fill")=>l(v).useMemo(()=>{if(!ir(t))return{[n]:t};let{stops:r,rotation:i}=io(t),o={x:e.a.width/2,y:e.a.height/2},a=Math.sqrt(Math.pow(o.x,2)+Math.pow(o.y,2)),s=l(A).Util.degToRad(i)-Math.PI/2,u=[];return(r.forEach(({offset:e,color:t})=>{u.push(e,t)}),"fill"===n)?{fillLinearGradientStartPointX:o.x-a*Math.cos(s),fillLinearGradientStartPointY:o.y-a*Math.sin(s),fillLinearGradientColorStops:u,fillLinearGradientEndPointX:o.x+a*Math.cos(s),fillLinearGradientEndPointY:o.y+a*Math.sin(s),fill:r[1].color,fillPriority:"linear-gradient"}:{strokeLinearGradientStartPointX:o.x-a*Math.cos(s),strokeLinearGradientStartPointY:o.y-a*Math.sin(s),strokeLinearGradientColorStops:u,strokeLinearGradientEndPointX:o.x+a*Math.cos(s),strokeLinearGradientEndPointY:o.y+a*Math.sin(s)}},[t,e.width,e.height]);var v=h("8NFma");let il=()=>!1;function is(e,t){let n=l(v).useRef();l(v).useLayoutEffect(()=>{n.current&&n.current.destroy()},[t]),l(v).useLayoutEffect(()=>{},[])}let iu=0,ic=[];function id(e){iu+=1;let t=!1,n=setTimeout(()=>{t||(ig(`Timeout loading image ${e}`),console.error("Timeout triggered for loader. Some assets may not have loaded.",e),t=!0,ih())},3e4);return()=>{t||(clearTimeout(n),ih())}}function ih(){0==(iu-=1)&&(ic.forEach(e=>e()),ic=[])}let ip=[];function ig(e){ip.forEach(t=>t(e))}var y=h("2SBKn");let im=y.observable(["Roboto","Amatic SC","Press Start 2P","Marck Script","Rubik Mono One"]),iv=y.observable({value:!1});function iy(){return iv.value}let ib=y.observable([]);var iw=document.createElement("canvas");function ix(e,t="Arial"){var n=iw.getContext("2d");return n.font=`normal 40px '${e}', ${t}`,n.measureText("Some test text;?#D-ПРИВЕТ!1230o9u8i7y6t5r4e3w2q1").width}let i_={Arial:!0},iE=e=>!!i_[e];async function iS(e){if(i_[e])return;let t=!!document.fonts?.load,n=ix("Arial");if(t)try{await document.fonts.load(`16px '${e}'`);let t=ix(e);if(n!==t){i_[e]=!0;return}}catch{}let r=ix("Times","Times"),i=ix(e);for(let t=0;t<100;t++){let t=ix(e,"Arial"),o=ix(e,"Times");if(t!==i||t!==n||o!==r){i_[e]=!0;return}await new Promise(e=>setTimeout(e,60))}console.warn(`Timeout for loading font "${e}". Looks like polotno can't load it. Is it a correct font family?`),ig(`Timeout for loading font "${e}"`)}let iC={},iO={};var y=h("2SBKn");let ik=y.observable({imageDownScalingEnabled:!0,removeBackgroundEnabled:!0,htmlRenderEnabled:!1,forceTextFitEnabled:!1,textVerticalResizeEnabled:!1,textOverflow:"resize",animationsEnabled:!1});function iP(e=""){return(e=e.replace(/<\/p>/gi,"\n")).replace(/(<([^>]+)>)/gi,"")}function iT(e,t){let n={filters:[]};t.brightnessEnabled&&(n.filters.push(l(A).Filters.Brighten),n.brightness=t.brightness),t.blurEnabled&&(n.filters.push(l(A).Filters.Blur),n.blurRadius=t.blurRadius),t.sepiaEnabled&&n.filters.push(l(A).Filters.Sepia),t.grayscaleEnabled&&n.filters.push(l(A).Filters.Grayscale),e.setAttrs(n),n.filters.length?e.cache({pixelRatio:t.store._elementsPixelRatio}):e.clearCache(),e.getLayer()?.batchDraw()}h("8NFma");let iA={stroke:"rgb(0, 161, 255)",strokeWidth:2},iN=P(({element:e})=>(0,p.jsx)(rW,{name:"highlighter",x:e.a.x,y:e.a.y,rotation:e.a.rotation,width:e.a.width,height:e.a.height,listening:!1,strokeScaleEnabled:!1,...iA}));var v=h("8NFma");let ij=()=>window.innerWidth<=500,iR=e=>`
|
|
30
30
|
@media (max-width: 500px) {
|
|
31
31
|
${e}
|
|
32
32
|
}
|
|
@@ -34,12 +34,12 @@ For more info see: https://github.com/konvajs/react-konva/issues/194
|
|
|
34
34
|
.polotno-mobile & {
|
|
35
35
|
${e}
|
|
36
36
|
}
|
|
37
|
-
`,
|
|
37
|
+
`,iI=()=>{let[e,t]=l(v).useState(ij());return l(v).useEffect(()=>{let e=()=>{t(ij())};return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}},[]),e},iL=document.createElement("style");iL.type="text/css",document.head.appendChild(iL);let iM={border:"none",padding:"0px",overflow:"hidden",background:"none",outline:"none",resize:"none",overflowWrap:"break-word",whiteSpace:"pre-wrap",userSelect:"text",wordBreak:"normal"};function iD(e){return!function(e){e=e.replace(/\s/g,"");let t=0;for(var n=0;n<e.length;n++)(function(e){var t="֑-߿יִ-﷽ﹰ-ﻼ";return RegExp("^[^"+t+"]*?["+t+"]").test(e)})(e[n])&&(t+=1);return t>e.length/2}(e)?"ltr":"rtl"}let iF=P(({textNodeRef:e,element:t,onBlur:n,selectAll:r,cursorPosition:i})=>{let[o,a]=l(v).useState(iM),s=e.current;l(v).useLayoutEffect(()=>{let e={};e.width=s.width()-2*s.padding()+"px",e.height=s.height()-2*s.padding()+10+"px",e.fontSize=s.fontSize()+"px",e.lineHeight=s.lineHeight()+.01,e.fontFamily=s.fontFamily(),e.textAlign=s.align(),e.color=s.fill(),e.fontWeight=t.fontWeight,e.fontStyle=t.fontStyle,e.letterSpacing=t.letterSpacing+"em";let n=`
|
|
38
38
|
.polotno-input::placeholder {
|
|
39
39
|
color: ${o.color};
|
|
40
40
|
opacity: 0.6;
|
|
41
41
|
}
|
|
42
|
-
`;iI.innerHTML="",iI.appendChild(document.createTextNode(n)),JSON.stringify(e)!==JSON.stringify(o)&&a(e)});let u=l(v).useRef(null);l(v).useEffect(()=>{let e=setTimeout(()=>{let e=u.current;if(!e)return;u.current?.focus();let t=i||e.value.length;e.selectionStart=e.selectionEnd=t,r&&(e?.select(),document.execCommand("selectAll",!1,null))});return()=>{clearTimeout(e)}},[]),l(v).useEffect(()=>{window.addEventListener("blur",n);let e=e=>{u.current?.contains(e.target)||n()};return window.addEventListener("touchstart",e),()=>{window.removeEventListener("blur",n),window.removeEventListener("touchstart",e)}},[]);let c=0,d=s.textArr.length*s.lineHeight()*s.fontSize();"middle"===t.verticalAlign&&(c=(t.a.height-d)/2),"bottom"===t.verticalAlign&&(c=t.a.height-d);let h=i_(t.text);return(0,p.jsx)(r3,{children:(0,p.jsx)("textarea",{className:"polotno-input",ref:u,dir:iM(h),style:{...iL,...o,paddingTop:c+"px"},value:h,onChange:e=>{t.set({text:e.target.value})},placeholder:t.placeholder,onBlur:n})})}),iF=e=>{let[t,n]=l(v).useState(!1),r=l(v).useRef(!1);return l(v).useEffect(()=>{var t=!0;return setTimeout(()=>{t&&(e._editModeEnabled&&(r.current=!0),n(!0),setTimeout(()=>{r.current=!1},50))},50),()=>{t=!1}},[]),{editorEnabled:t&&e._editModeEnabled,selectAll:r.current}},iz=(e,t)=>{let[n,r]=l(v).useReducer(e=>e+1,0),i=l(v).useRef(iv(t));return l(v).useLayoutEffect(()=>{if(i.current=iv(t),i.current)return;let n=!0;return(async()=>{i.current=!1,r();let o=io(`text ${t}`);await e.loadFont(t),l(A).Util.requestAnimFrame(o),n&&(i.current=!0,r())})(),()=>{n=!1}},[t]),[i.current]},iB=({fontLoaded:e,fontFamily:t,fontSize:n,lineHeight:r})=>l(v).useMemo(()=>{if("number"==typeof r)return r;let e=document.createElement("div");e.style.fontFamily=t,e.style.fontSize=n+"px",e.style.lineHeight=r,e.innerText="Test text",document.body.appendChild(e);let i=e.offsetHeight;return document.body.removeChild(e),i/n},[e,t,n,r]);function iU(e){let t=l(v).useRef(e),n=l(v).useRef(e);return l(v).useMemo(()=>{n.current=t.current,t.current=e},[e]),n.current}let iH=e=>l(v).useMemo(()=>{if(!iC(e.fill))return{fill:e.fill};let{stops:t,rotation:n}=ik(e.fill),r={x:e.a.width/2,y:e.a.height/2},i=Math.sqrt(Math.pow(r.x,2)+Math.pow(r.y,2)),o=l(A).Util.degToRad(n)-Math.PI/2,a=[];return t.forEach(({offset:e,color:t})=>{a.push(e,t)}),{fillLinearGradientStartPointX:r.x-i*Math.cos(o),fillLinearGradientStartPointY:r.y-i*Math.sin(o),fillLinearGradientColorStops:a,fillLinearGradientEndPointX:r.x+i*Math.cos(o),fillLinearGradientEndPointY:r.y+i*Math.sin(o),fill:t[1].color,fillPriority:"linear-gradient"}},[e.fill]),iV=P(({element:e,store:t})=>{let n=l(v).useRef(null),r=l(v).useRef(null),{editorEnabled:i,selectAll:o}=iF(e),[a,s]=l(v).useState(!1),[u,c]=l(v).useState(!1),d=l(v).useRef(e.a.height),h=t.selectedElements.indexOf(e)>=0,{textVerticalResizeEnabled:f}=ix,g=iU(e.fontFamily),[m,b]=l(v).useState([]);l(v).useEffect(()=>{let e=n.current?.textArr??[];JSON.stringify(e)!==JSON.stringify(m)&&b(e)}),l(v).useEffect(()=>{if(e.a.width)return;let t=n.current;t.width(600),e.set({width:1.4*t.getTextWidth()})},[]),l(v).useLayoutEffect(()=>(0,y.autorun)(()=>{iP(n.current,e)}));let[w]=iz(t,e.fontFamily),x=i_(e.text),_=()=>{let e=n.current.clone({height:void 0}),t=Math.ceil(e.fontSize()*e.lineHeight()*e.textArr.length+1);return e.destroy(),t};l(v).useLayoutEffect(()=>{if(!w)return;let{textOverflow:r}=ix;if(!e.a.height){let n=_();t.history.ignore(()=>{e.set({height:n})},!1,!0);return}if("change-font-size"!==r||u||t.isPlaying){if("resize"===r){let r=_();f&&e.a.height<r&&t.history.ignore(()=>{e.set({height:r}),n.current.height(r)},!1,!0),f||e.a.height===r||t.history.ignore(()=>{e.set({height:r}),n.current.height(r)},!1,!0)}}else{let r=function(e,t){let n=e.fontSize(),r=e.height(),i=i_(t.text),o=t.a.fontSize;e.height(void 0);let a=Math.round(2*t.a.fontSize)-1;for(let n=1;n<a;n++){let n=t.a.height&&e.height()>t.a.height,r=i.split("\n").join(" ").split(/[\s-]+/),a=e.textArr.map(e=>e.text).join(";"),l=r.find(e=>!a.includes(e)||(a=a.replace(e,""),!1));if(!(n||l))break;o-=.5,e.fontSize(o)}return e.fontSize(n),e.height(r),o}(n.current,e);if(r!==e.a.fontSize){t.history.ignore(()=>{e.set({fontSize:r})},!1,!0);return}let i=_();e.a.height===i||f||t.history.ignore(()=>{e.set({height:i})},!1,!0)}}),l(v).useLayoutEffect(()=>{let t=n.current;t&&(t.width(t.width()+1e-8),t._setTextData(),iP(t,e))},[w]);let E=l(v).useRef(null),S=l(v).useRef(0),C=n=>{n.evt.preventDefault(),t.selectedShapes.find(t=>t===e)&&e.contentEditable&&(S.current=function(e){var t,n;let r=e.target,i=((t=r.getAbsoluteTransform().copy()).invert(),n=r.getStage().getPointerPosition(),t.point(n)),o=r.textArr,a=Math.floor(i.y/(r.fontSize()*r.lineHeight())),l=o.slice(0,a).reduce((e,t)=>e+t.text.length,a),s=o[a]??o[0],u=0;return"right"===r.align()?u=r.width()-s.width:"center"===r.align()&&(u=r.width()/2-s.width/2),l+Math.round((i.x-u)/s.width*s.text.length)}(n),e.toggleEditMode())},O=!x&&e.placeholder?.6:e.a.opacity;it(n,O);let k=iB({fontLoaded:w,fontFamily:e.fontFamily,fontSize:e.a.fontSize,lineHeight:e.lineHeight}),P=e.selectable||"admin"===t.role,T=iH(e),A=l(v).useMemo(()=>e.backgroundEnabled?function({lines:e,lineHeight:t,width:n,align:r="left",padding:i=0,cornerRadius:o=0}){let a,l;e.forEach((e,t)=>{e.cx=n/2,"right"===r?e.cx=n-e.width/2:"left"===r&&(e.cx=e.width/2),"justify"!==r||e.lastInParagraph||(e.width=n),"justify"===r&&(e.cx=e.width/2)});let s=`M ${e[0]?.cx} ${-i}`;e.forEach((n,r)=>{let{cx:o}=n,a=e[r-1];a&&a.width>n.width?s+=` L ${o+n.width/2+i} ${r*t+i}`:s+=` L ${o+n.width/2+i} ${r*t-i}`;let l=e[r+1];l&&l.width>n.width?s+=` L ${o+n.width/2+i} ${(r+1)*t-i}`:s+=` L ${o+n.width/2+i} ${(r+1)*t+i}`});for(var u,c,d=e.length-1;d>=0;d--){let n=e[d],{cx:r}=n,o=e[d+1];o&&o.width>n.width?s+=` L ${r-n.width/2-i} ${(d+1)*t-i}`:s+=` L ${r-n.width/2-i} ${(d+1)*t+i}`;let a=e[d-1];a&&a.width>n.width?s+=` L ${r-n.width/2-i} ${d*t+i}`:s+=` L ${r-n.width/2-i} ${d*t-i}`}return(u=function(e){let t=/-?[0-9]*\.?\d+/g;return[...e.matchAll(/[MmLlSsQqLlHhVvCcSsQqTtAaZz]/g)].map(e=>({marker:e[0],index:e.index})).reduceRight((t,n)=>{let r=e.substring(n.index,t.length?t[t.length-1].index:e.length);return t.concat([{marker:n.marker,index:n.index,chunk:r.length>0?r.substr(1,r.length-1):r}])},[]).reverse().flatMap(e=>{let n=e.chunk.match(t),r=n?n.map(parseFloat):[];return function(e,t){let n=[];switch(e.toUpperCase()){case"M":for(let r=0;r<t.length;r+=2){let i;i=e===e.toUpperCase()?0===r?"M":"L":0===r?"m":"l",n.push({marker:i,values:{x:t[r],y:t[r+1]}})}break;case"L":for(let r=0;r<t.length;r+=2)n.push({marker:e,values:{x:t[r],y:t[r+1]}});break;case"H":for(let r=0;r<t.length;r++)n.push({marker:e,values:{x:t[r],y:0}});break;case"V":for(let r=0;r<t.length;r++)n.push({marker:e,values:{x:0,y:t[r]}});break;case"C":for(let r=0;r<t.length;r+=6)n.push({marker:e,values:{x1:t[r],y1:t[r+1],x2:t[r+2],y2:t[r+3],x:t[r+4],y:t[r+5]}});break;case"S":for(let r=0;r<t.length;r+=4)n.push({marker:e,values:{x2:t[r],y2:t[r+1],x:t[r+2],y:t[r+3]}});break;case"Q":for(let r=0;r<t.length;r+=4)n.push({marker:e,values:{x1:t[r],y1:t[r+1],x:t[r+2],y:t[r+3]}});break;case"T":for(let r=0;r<t.length;r+=2)n.push({marker:e,values:{x:t[r],y:t[r+1]}});break;case"A":for(let r=0;r<t.length;r+=7)n.push({marker:e,values:{radiusX:t[r],radiusY:t[r+1],rotation:t[r+2],largeArc:t[r+3],sweep:t[r+4],x:t[r+5],y:t[r+6]}});break;case"Z":n.push({marker:e,values:{x:0,y:0}})}return n}(e.marker,r)}).map(r6)}(s+=" Z"),a=[],l=[],c&&u.forEach(e=>(Object.keys(e.values).forEach(t=>e.values[t]=e.values[t]&&parseFloat(e.values[t].toFixed(c))),e)),u.forEach(e=>{"M"===e.marker&&a.push([]),a[a.length-1].push(e)}),a.forEach(e=>{e.map(r4),function e(t,n){let r=["x","y"].every(e=>0===Math.round(Math.abs(t[n].values[e]-t[0].values[e])));"L"===t[n].marker&&r&&(t[n].overlap=!0,e(t,n-1)),"Z"===t[n].marker&&e(t,n-1)}(e,e.length-1);let t="Z"==e[e.length-1].marker;e.filter(e=>!e.overlap).map((e,n,r)=>{let i,a,s;let u=function e(t,n,r){var i;let o=n-1,a=r[(o%(i=r.length)+i)%i];return"Z"!==a.marker?a:e(t,o,r)}(e,n,r),c=function e(t,n,r){var i;let o=n+1,a=r[(o%(i=r.length)+i)%i];return"Z"===a.marker?e(t,o,r):a}(e,n,r),d=r8(e.values,u.values),h=r8(e.values,c.values),f=h-d,p=180/Math.PI*f,g=Math.min(o,Math.abs(function(e,t,n){let r=r9(e.values,n.values);return Math.min(r9(t.values,e.values),r)}(e,u,c)/2*Math.tan(f/2))),m=(a=0,(s=180/Math.PI*f)<0&&s>=-180||s>180&&s<360?i=r7(f/2,-g):(i=r7(f/2,g),a=1,i===1/0&&(i=g)),{offset:i,sweepFlag:a}),v=m.offset,y=m.sweepFlag,b=(0==n||n==r.length-1)&&!t;switch(e.marker){case"M":case"L":let w=[e.values.x+Math.sin(d)*v,e.values.y+Math.cos(d)*v],x=[e.values.x+Math.sin(h)*v,e.values.y+Math.cos(h)*v];b?l.push({marker:e.marker,values:e.values}):l.push({marker:e.marker,values:{x:parseFloat(w[0].toFixed(3)),y:parseFloat(w[1].toFixed(3))}}),b||"L"!==c.marker&&"M"!==c.marker||l.push({marker:"A",radius:g,values:{radiusX:g,radiusY:g,rotation:p,largeArc:0,sweep:y,x:parseFloat(x[0].toFixed(3)),y:parseFloat(x[1].toFixed(3))}});break;case"C":case"S":case"Q":case"T":case"A":case"Z":l.push({marker:e.marker,values:e.values})}})}),{path:function(e){let t=["radiusX","radiusY","rotation","largeArc","sweep","x1","y1","x2","y2","x","y"];return e.map(e=>{let n="";if("Z"!==e.marker){let r=Object.keys(e.values);n=t.filter(e=>-1!==r.indexOf(e)).map(t=>e.values[t]).join()}return`${e.marker}${n}`}).join("").trim()}(l),commands:l}).path}({lines:JSON.parse(JSON.stringify(m)),cornerRadius:e.backgroundCornerRadius*(e.a.fontSize*k*.5),lineHeight:k*e.a.fontSize,padding:e.backgroundPadding*(e.a.fontSize*k*.5),width:e.a.width,align:e.align}):"",[e.backgroundEnabled,e.backgroundCornerRadius,e.a.fontSize,k,e.backgroundPadding,e.a.width,e.align,m]),N=iR(),j=0;return"middle"===e.verticalAlign?j=(e.a.height-m.length*k*e.a.fontSize)/2:"bottom"===e.verticalAlign&&(j=e.a.height-m.length*k*e.a.fontSize),(0,p.jsxs)(l(v).Fragment,{children:[(0,p.jsx)(rX,{ref:r,x:e.a.x,y:e.a.y,rotation:e.a.rotation,hideInExport:!e.showInExport||!x,listening:!1,visible:e.backgroundEnabled,opacity:e.backgroundOpacity,data:A,fill:e.backgroundColor,offsetY:-j}),(0,p.jsx)(rY,{ref:n,id:e.id,name:"element",hideInExport:!e.showInExport||!x,editModeEnabled:e._editModeEnabled,x:e.a.x,y:e.a.y,rotation:e.a.rotation,width:e.a.width,height:e.a.height,text:x||e.placeholder,...T,stroke:e.stroke,lineJoin:"round",strokeWidth:e.strokeWidth,fillAfterStrokeEnabled:!0,fontSize:e.a.fontSize,fontFamily:`"${e.fontFamily}", "${g}"`,fontStyle:e.fontStyle+" "+e.fontWeight,textDecoration:e.textDecoration,align:e.align,verticalAlign:e.verticalAlign,draggable:N?e.draggable&&h:e.draggable,preventDefault:!N||h,opacity:O,visible:!e._editModeEnabled,ellipsis:"ellipsis"===ix.textOverflow,shadowEnabled:e.shadowEnabled,shadowBlur:e.shadowBlur,shadowOffsetX:e.shadowOffsetX,shadowOffsetY:e.shadowOffsetY,shadowColor:e.shadowColor,shadowOpacity:e.shadowOpacity,lineHeight:k,letterSpacing:e.letterSpacing*e.a.fontSize,listening:P,onDragMove:t=>{e.set({x:t.target.x(),y:t.target.y()})},onDragEnd:t=>{e.set({x:t.target.x(),y:t.target.y()})},onMouseEnter:()=>{s(!0)},onMouseLeave:()=>{s(!1)},onClick:C,onTap:C,onTransformStart:()=>{c(!0),d.current=n.current.height()},onTransform:t=>{let n=t.target;r.current?.setAttrs({x:n.x(),y:n.y(),rotation:n.rotation(),scale:n.scale()});let i=(n.getStage()?.findOne("Transformer")).getActiveAnchor();if("middle-left"===i||"middle-right"===i){let t=n.scaleX(),r=n.width()*t,i=e.a.fontSize,o=r;r<i&&(o=i,E.current&&n.position(E.current)),n.width(o),n.scaleX(1),n.scaleY(1);let a=_();if("ellipsis"!==ix.textOverflow){let t=Math.max(a,d.current);n.height(t),e.set({height:n.height()})}e.set({x:n.x(),y:n.y(),width:n.width(),rotation:n.rotation()}),iP(n,e)}if("top-center"===i||"bottom-center"===i){let n="resize"===ix.textOverflow?_():k*e.a.fontSize;t.target.height(Math.max(n,t.target.height()*t.target.scaleY())),t.target.scaleY(1)}t.target.strokeWidth(e.strokeWidth/t.target.scaleX()),E.current=t.target.position()},onTransformEnd:t=>{let n=t.target.scaleX();t.target.scaleX(1),t.target.scaleY(1),t.target.strokeWidth(e.strokeWidth),e.set({fontSize:Math.round(e.a.fontSize*n),width:Math.ceil(t.target.width()*n),x:t.target.x(),y:t.target.y(),rotation:t.target.rotation(),height:t.target.height()*n}),r.current?.setAttrs({scaleX:1,scaleY:1}),c(!1)}}),i&&(0,p.jsx)(rq,{x:e.a.x,y:e.a.y,rotation:e.a.rotation,children:(0,p.jsx)(iD,{textNodeRef:n,element:e,selectAll:o,cursorPosition:S.current,onBlur:()=>{e.toggleEditMode(!1)}})}),!u&&(a||h)&&(0,p.jsx)(iA,{element:e})]})});var v=h("8NFma"),y=h("2SBKn"),v=h("8NFma");function iq(e){let t={fill:"",stroke:""};return e.getAttribute("fill")&&"none"!==e.getAttribute("fill")&&(t.fill=e.getAttribute("fill")),!t.fill&&e.style.fill&&"none"!==e.style.fill&&(t.fill=e.style.fill),e.getAttribute("stroke")&&(t.stroke=e.getAttribute("stroke")),!t.stroke&&e.style.stroke&&(t.stroke=e.style.stroke),t.stroke||t.fill||(t.fill="black"),t}let iG=["path","rect","circle"];function iW(e){for(var t=[],n=e.getElementsByTagName("*"),r=0,i=n.length;r<i;r++){let e=n[r];!function(e){for(;e.parentNode;){if("defs"===e.nodeName)return!0;e=e.parentNode}return!1}(e)&&(null!==e.getAttribute("fill")&&t.push(e),null!==e.getAttribute("stroke")?t.push(e):e.style&&e.style.fill?t.push(e):iG.indexOf(e.nodeName)>=0&&t.push(e))}return t}async function i$(e){let t=await fetch(e);return iY(await t.text())}async function iK(e){let t=await fetch(e,{mode:"cors"});return await t.text()}function iY(e){return"data:image/svg+xml;base64,"+window.btoa(unescape(encodeURIComponent(e)))}async function iX(e){let t=await iK(e),n=new DOMParser().parseFromString(t,"image/svg+xml").documentElement.getAttribute("viewBox"),[r,i,o,a]=n?.split(" ")||[];return{width:parseFloat(o),height:parseFloat(a)}}function iZ(e){var t=new DOMParser().parseFromString(e,"image/svg+xml");let n=t.documentElement.getAttribute("viewBox"),[r,i,o,a]=n?.split(" ")||[],l=t.documentElement.getAttribute("width");l||t.documentElement.setAttribute("width",o+"px");let s=t.documentElement.getAttribute("height");if((!s||s.indexOf("%")>=0)&&t.documentElement.setAttribute("height",a+"px"),l&&l.indexOf("%")>=0&&s&&-1===s.indexOf("%")){let e=parseFloat(s)/parseFloat(a);t.documentElement.setAttribute("width",e*parseFloat(o)+"px")}if(s&&s.indexOf("%")>=0&&l&&-1===l.indexOf("%")){let e=parseFloat(l)/parseFloat(o);t.documentElement.setAttribute("height",e*parseFloat(a)+"px")}return new XMLSerializer().serializeToString(t)}let iQ=(e,t)=>{if(!e||!t)return!1;let n=l(A).Util.colorToRGBA(e),r=l(A).Util.colorToRGBA(t);if(n&&r)return n.r===r.r&&n.g===r.g&&n.b===r.b&&n.a===r.a};function iJ(e,t){var n=new DOMParser().parseFromString(e,"image/svg+xml");let r=iW(n),i=Array.from(t.keys());return r.forEach(e=>{let{fill:r,stroke:o}=iq(e);[{prop:"fill",color:r},{prop:"stroke",color:o}].forEach(({prop:r,color:o})=>{let a=i.find(e=>iQ(e,o));if(a){let i=t.get(a);if(iC(i)){let{rotation:t,stops:o}=ik(i),a=o.map(e=>({offset:100*e.offset+"%","stop-color":e.color})),s="color"+Math.round(1e8*Math.random());(function(e,t,n,r){var i=e.namespaceURI,o=document.createElementNS(i,"linearGradient");let a=l(A).Util.degToRad(n+90),s=(Math.cos(a)+1)/2,u=(Math.sin(a)+1)/2,c=(Math.cos(a+Math.PI)+1)/2,d=(Math.sin(a+Math.PI)+1)/2;o.setAttribute("x1",100*s+"%"),o.setAttribute("y1",100*u+"%"),o.setAttribute("x2",100*c+"%"),o.setAttribute("y2",100*d+"%"),o.setAttribute("gradientUnits","userSpaceOnUse"),o.setAttribute("id",t);for(var h=0;h<r.length;h++){var f=r[h],p=document.createElementNS(i,"stop");for(var g in f)f.hasOwnProperty(g)&&p.setAttribute(g,f[g]);o.appendChild(p)}(e.querySelector("defs")||e.insertBefore(document.createElementNS(i,"defs"),e.firstChild)).appendChild(o)})(n.children[0],s,t,a),e.style[r]=null,e.setAttribute(r,`url('#${s}')`)}else e.style[r]=t.get(a)}})}),iY(new XMLSerializer().serializeToString(n))}let i0=e=>{let[t,n]=l(v).useState([]);return l(v).useEffect(()=>{let t=!1;return(async()=>{n([]);let r=function(e){let t=iW(new DOMParser().parseFromString(e,"image/svg+xml")),n=[];return t.forEach(e=>{let{fill:t,stroke:r}=iq(e);[t,r].forEach(e=>{e&&l(A).Util.colorToRGBA(e)&&-1===n.indexOf(e)&&n.push(e)})}),n}(await iK(e));t||n(r)})(),()=>{t=!0}},[e]),t};function i1(){return document.createElement("canvas")}async function i2(e){return e.indexOf("data:image/svg+xml")>=0||e.indexOf(".svg")>=0?iY(iZ(await iK(e))):e}let i3=e=>{let[t,n]=l(v).useState(e);return l(v).useEffect(()=>{(async()=>{let r=await i2(e);r!==t&&n(r)})()},[e]),t};function i5(e,t){return{x:(e.x+t.x)/2,y:(e.y+t.y)/2}}let i6=(e,t,n)=>{let r=l(v).useMemo(()=>{let{flipX:r,flipY:i}=e,o="svg"===e.type||e.src.indexOf("data:image/svg+xml")>=0||e.src.indexOf(".svg")>=0,a=navigator.userAgent.toLowerCase().indexOf("firefox")>-1&&o||e.maskSrc;if(!r&&!i&&!a)return t;if(!t||!t.width||!t.height)return null;let l=i1(),s=1;"svg"===e.type&&(s=Math.max(e.a.width/t.width*n,e.a.height/t.height*n)),l.width=Math.max(t.width*s,1),l.height=Math.max(t.height*s,1);let u=r?-l.width:0,c=i?-l.height:0;return l.getContext("2d")?.scale(r?-1:1,i?-1:1),l.getContext("2d")?.drawImage(t,u,c,l.width,l.height),l},[e.maskSrc,e.flipX,e.flipY,t,e.a.width,e.a.height,n]);return l(v).useEffect(()=>()=>{r&&"CANVAS"===r.nodeName&&l(A).Util.releaseCanvas(r)},[r]),r},i4=(e,t)=>{let[n,r]=on(e.maskSrc,"anonymous");return or(e.maskSrc?r:"loaded",e.id+"-mask"),l(v).useMemo(()=>{if(!n||!t||!t.width||!t.height)return t;let r=i1();r.width=Math.max(t.width,1),r.height=Math.max(t.height,1);let i=r.getContext("2d");if(!i)return t;i.drawImage(t,0,0),i.globalCompositeOperation="source-in";let o=function(e,t){let n,r;let i=t.width/t.height;return i>=e.width/e.height?(n=e.width,r=e.width/i):(n=e.height*i,r=e.height),{x:(e.width-n)/2,y:(e.height-r)/2,width:n,height:r}}(n,e);return i.drawImage(n,o.x,o.y,o.width,o.height,0,0,t.width,t.height),r},[t,n,e.a.width,e.a.height])},i8=(e,t,n,r,i=0,o=!1)=>{let a=Math.floor(Math.max(e.a.width*r,1)),s=Math.floor(Math.max(e.a.height*r,1)),u=Math.min(i*r,a/2,s/2),c=Math.max(e.a.width/n.width,e.a.height/n.height)*r,d=e.page._exporting&&ix.imageDownScalingEnabled&&c<1&&!o,h=0===n.x&&0===n.y&&n.width===t?.width&&n.height===t?.height,f=l(v).useMemo(()=>{if(!t||!t.width||!t.height)return;let e=0===u,n=!d;if(!h||!e||!n)return i1()},[t,u,d,h]);return l(v).useLayoutEffect(()=>{if(!f||!t)return;f.width=a,f.height=s;let e=f.getContext("2d");if(!e)return;u&&(e.beginPath(),e.moveTo(u,0),e.lineTo(a-u,0),e.arc(a-u,u,u,3*Math.PI/2,0,!1),e.lineTo(a,s-u),e.arc(a-u,s-u,u,0,Math.PI/2,!1),e.lineTo(u,s),e.arc(u,s-u,u,Math.PI/2,Math.PI,!1),e.lineTo(0,u),e.arc(u,u,u,Math.PI,3*Math.PI/2,!1),e.clip());let r=d?function(e,t){let n=i1();n.width=e.width,n.height=e.height,n.getContext("2d")?.drawImage(e,0,0,n.width,n.height);let r=function(e,t,n,r,i,o,a){for(var l=new ImageData(t,n),s=new Int32Array(e.data.buffer),u=e.width,c=new Int32Array(l.data.buffer),d=l.width,h=t/o,f=n/a,p=Math.round(1/h),g=Math.round(1/f),m=p*g,v=0;v<l.height;v++)for(var y=0;y<d;y++){for(var b=0+Math.round(y/h)+(0+Math.round(v/f))*u,w=0,x=0,_=0,E=0,S=0;S<g;S++)for(var C=0;C<p;C++){var O=s[b+C+S*u];w+=O<<24>>>24,x+=O<<16>>>24,_+=O<<8>>>24,E+=O>>>24}w=Math.round(w/m),x=Math.round(x/m),_=Math.round(_/m),E=Math.round(E/m),c[y+v*d]=E<<24|_<<16|x<<8|w}return l}(n.getContext("2d").getImageData(0,0,n.width,n.height),Math.floor(n.width*t),Math.floor(n.height*t),0,0,n.width,n.height);return n.width=Math.floor(n.width*t),n.height=Math.floor(n.height*t),n.getContext("2d")?.putImageData(r,0,0),n}(t,c):t,i=d?{x:Math.floor(n.x*c),y:Math.floor(n.y*c),width:Math.floor(n.width*c),height:Math.floor(n.height*c)}:n;e.drawImage(r,i.x,i.y,i.width,i.height,0,0,f.width,f.height)},[f,e.a.width,e.a.height,n.x,n.y,n.width,n.height,i,r,o,e.page._exporting,d]),l(v).useEffect(()=>()=>{f&&"CANVAS"===f.nodeName&&l(A).Util.releaseCanvas(f)},[f]),f||t},i9=(e,t,n,r)=>{let[i,o]=on(i3(e.clipSrc||""),"anonymous");or(e.clipSrc?o:"loaded",e.id+"-clip");let a=l(v).useMemo(()=>{if(t&&i)return i1()},[t,i]);return l(v).useLayoutEffect(()=>{if(!i||!t||!t.width||!t.height||!i||!i.width||!i.height||!a)return;let r=i1(),o=Math.max(e.a.width/i.width*n,e.a.height/i.height*n);r.width=i.width*o,r.height=i.height*o,r.getContext("2d")?.drawImage(i,0,0,r.width,r.height),a.width=Math.max(t.width,1),a.height=Math.max(t.height,1);let s=a.getContext("2d");s&&(s.save(),s.drawImage(r,0,0,t.width,t.height),l(A).Util.releaseCanvas(r),s.globalCompositeOperation="source-in",s.drawImage(t,0,0,a.width,a.height),s.restore())},[a,t,i,e.a.width,e.a.height,n,...r]),e.clipSrc&&i?a:t},i7=i1(),oe=P(({element:e})=>{let t=Math.min(30,e.a.width/4,e.a.height/4),n=l(v).useRef(null);return l(v).useEffect(()=>{let e=n.current;if(!e)return;let t=new(l(A)).Animation(t=>{e.rotate((t?.timeDiff||0)/2)},e.getLayer());return t.start(),()=>{t.stop()}}),(0,p.jsxs)(rq,{x:e.x,y:e.y,rotation:e.rotation,listening:!1,opacity:e.a.opacity,hideInExport:!e.showInExport,children:[(0,p.jsx)(rW,{width:e.a.width,height:e.a.height,fill:"rgba(124, 173, 212, 0.8)"}),(0,p.jsx)("Arc",{ref:n,x:e.a.width/2,y:e.a.height/2,fill:"white",outerRadius:Math.abs(t),innerRadius:Math.max(1,t-5),angle:270})]})}),ot=P(({element:e})=>{let t="Can not load the image...",n=Math.max(10,Math.min(30,e.a.width/t.length));return(0,p.jsxs)(rq,{x:e.x,y:e.y,rotation:e.rotation,listening:!1,opacity:e.a.opacity,hideInExport:!e.showInExport,children:[(0,p.jsx)(rW,{width:e.a.width,height:e.a.height,fill:"rgba(223, 102, 102, 0.8)"}),(0,p.jsx)(rY,{text:t,fontSize:n,width:e.a.width,height:e.a.height,align:"center",fill:"white",verticalAlign:"middle",padding:5})]})}),on=l(r0),or=(e,t)=>{let n=l(v).useRef(),r=()=>{n.current?.(),n.current=void 0};l(v).useEffect(()=>r,[]),l(v).useLayoutEffect(()=>{"loading"!==e||n.current||(n.current=io(`image ${t}`)),"loading"!==e&&r(),"failed"===e&&is(`image ${t}`)},[e])},oi=({image:e,status:t,type:n})=>{let r=l(v).useRef();return l(v).useEffect(()=>{r.current=e||r.current},[e]),"failed"!==t||"failed"!==t&&"svg"===n?r.current:void 0},oo=e=>{let[t,n]=l(v).useReducer(e=>e+1,0),r=l(v).useRef("loading"),i=l(v).useRef(e.src),o=l(v).useRef(e.src);return(o.current!==e.src&&(o.current=e.src,r.current="loading"),l(v).useEffect(()=>{if("svg"!==e.type||!e.src)return;let t=!1;return(async()=>{r.current="loading",n();let o=iJ(iZ(await iK(e.src)),e.colorsReplace);t||(i.current=o,r.current="loaded",n())})(),()=>{t=!0}},[e.src,JSON.stringify(e.colorsReplace)]),"svg"!==e.type)?[e.src,"loaded"]:[i.current,r.current]},oa=P(({element:e,store:t})=>{let n,r;let[i,o]=l(v).useState(!1),a=l(v).useRef(null),s=l(v).useRef(null),[u,c]=l(v).useState(!1),d=t.selectedElements.indexOf(e)>=0,[h,f]=oo(e),[g,m]=on(h,"anonymous");or("svg"!==e.type||"loaded"===f?m:"loading",e.id);let b=oi({image:g,status:m,type:e.type}),w=i4(e,i6(e,g||b,t._elementsPixelRatio))||i7,{cropX:x,cropY:_,cropWidth:E,cropHeight:S}=e;"loaded"!==m&&(x=_=0,E=S=1);let C=w.width*E,O=w.height*S,k=e.a.width/e.a.height,P=C/O,T="svg"===e.type;T?(n=C,r=O):k>=P?(n=C,r=C/k):(n=O*k,r=O);let N={x:w.width*x,y:w.height*_,width:n,height:r},j=e.cornerRadius??0,R=e.page._exporting?1:Math.min(2,t.scale),I=t._elementsPixelRatio*R,L=i9(e,i8(e,w,N,I,j,i||e._cropModeEnabled||"svg"===e.type),I,[N,j,I]),M=Math.max(e.a.width/n,e.a.height/r);l(v).useEffect(()=>{if(!e._cropModeEnabled)return;let t=a.current?.getStage();function n(t){e._cropModeEnabled&&t.target!==s.current&&e.toggleCropMode(!1)}function r(n){e._cropModeEnabled&&n.target.parentNode!==t.content&&e.toggleCropMode(!1)}return document.body.addEventListener("click",r),t?.on("click",n),t?.on("tap",n),()=>{document.body.removeEventListener("click",r),document.body.removeEventListener("touchstart",r),t?.off("click",n),t?.off("click",n)}},[e._cropModeEnabled]),l(v).useLayoutEffect(()=>{if(!i&&!e._cropModeEnabled)return iP(a.current,e),(0,y.autorun)(()=>{iP(a.current,e)},{delay:100})},[w,i,E,S,e._cropModeEnabled]),l(v).useLayoutEffect(()=>{i||e._cropModeEnabled?a.current?.clearCache():iP(a.current,e)},[i,e.a.width,e.a.height,e._cropModeEnabled]),l(v).useEffect(()=>{iP(a.current,e)},[e.shadowEnabled,e.shadowBlur,e.cornerRadius,e.shadowColor,e.shadowOffsetX,e.shadowOffsetY,e.shadowOpacity]);let D=l(v).useRef(null),F=l(v).useRef(null),z=l(v).useRef(null);l(v).useLayoutEffect(()=>{e._cropModeEnabled&&(F.current.nodes([D.current]),z.current.nodes([s.current]))},[e._cropModeEnabled]);var B=l(v).useRef(null),U=l(v).useRef(0),H=l(v).useRef(!1);let V=t=>{t.evt.touches?.length>2&&t.target.stopDrag(),Math.round(t.target.x())>0&&(t.target.x(0),t.target.scaleX(1)),Math.round(t.target.y())>0&&(t.target.y(0),t.target.scaleY(1));let i=t.target.width()*t.target.scaleX(),o=t.target.height()*t.target.scaleY(),a=Math.min(1,n/i),l=Math.min(1,r/o),s=Math.min(1-a,Math.max(0,Math.round(-t.target.x())/i)),u=Math.min(1-l,Math.max(0,Math.round(-t.target.y())/o));t.target.setAttrs({x:-s*w.width,y:-u*w.height,scaleX:1,scaleY:1}),e.set({cropX:s,cropY:u,cropWidth:a,cropHeight:l})},q=()=>{"image"===e.type&&e.contentEditable&&setTimeout(()=>{e.toggleCropMode(!0)})},G="svg"===e.type&&b,W="loading"===m&&!G,$="failed"===m,K=!W&&!$,Y=l(v).useRef({cropX:0,cropY:0,cropWidth:0,cropHeight:0}),X=K?e.a.opacity:0;it(a,X);let Z=e.selectable||"admin"===t.role,Q=iR();return(0,p.jsxs)(l(v).Fragment,{children:[W&&(0,p.jsx)(oe,{element:e}),$&&(0,p.jsx)(ot,{element:e}),(0,p.jsx)(rK,{ref:a,name:"element",id:e.id,image:L,x:e.a.x,y:e.a.y,width:e.a.width||1,height:e.a.height||1,rotation:e.rotation,opacity:X,shadowEnabled:e.shadowEnabled,shadowBlur:e.shadowBlur,shadowOffsetX:e.shadowOffsetX,shadowOffsetY:e.shadowOffsetY,shadowColor:e.shadowColor,shadowOpacity:e.shadowOpacity,customCrop:N,listening:Z,draggable:Q?e.draggable&&d:e.draggable,preventDefault:!Q||d,hideInExport:!e.showInExport,onMouseEnter:()=>{c(!0)},onMouseLeave:()=>{c(!1)},onDragMove:t=>{e.set({x:t.target.x(),y:t.target.y()})},onDragEnd:t=>{e.set({x:t.target.x(),y:t.target.y()})},onDblClick:q,onDblTap:q,onTransformStart:()=>{o(!0),Y.current={cropX:e.cropX,cropY:e.cropY,cropWidth:e.cropWidth,cropHeight:e.cropHeight}},onTransform:t=>{let i=t.currentTarget,o=1e-7>Math.abs(i.scaleX()-1)?1:i.scaleX(),a=1e-7>Math.abs(i.scaleY()-1)?1:i.scaleY();i.scaleX(1),i.scaleY(1);let l=t.target.getStage()?.findOne("Transformer"),s=Math.min(1-n/w.width,Math.max(0,e.cropX)),u=Math.min(1-r/w.height,Math.max(0,e.cropY)),c=l.getActiveAnchor(),d=!(c.indexOf("middle")>=0||c.indexOf("center")>=0),h=!d&&o<1&&Y.current.cropHeight>r/w.height,f=d?e.cropWidth:e.cropWidth*o;h&&(f=e.cropWidth);let p=!d&&a<1&&Y.current.cropWidth>n/w.width,g=d?e.cropHeight:e.cropHeight*a;p&&(g=e.cropHeight),T&&(f=e.cropWidth,g=e.cropHeight),e.set({cropX:s,cropY:u,x:i.x(),y:i.y(),width:i.width()*o,height:i.height()*a,rotation:t.target.rotation(),cropWidth:Math.min(f,1-s),cropHeight:Math.min(g,1-u)})},onTransformEnd:t=>{let i=t.currentTarget;e.set({width:i.width(),height:i.height(),x:i.x(),y:i.y(),rotation:t.target.rotation(),cropWidth:n/w.width,cropHeight:r/w.height}),o(!1)}}),(0,p.jsx)(rW,{x:e.x,y:e.y,width:Math.max(e.a.width-e.borderSize,0),height:Math.max(e.a.height-e.borderSize,0),opacity:X,offsetX:-e.borderSize/2,offsetY:-e.borderSize/2,stroke:e.borderColor,strokeWidth:e.borderSize,listening:!1,visible:!!e.borderSize,rotation:e.rotation,cornerRadius:Math.max(0,j-e.borderSize),hideInExport:!e.showInExport}),e._cropModeEnabled&&(0,p.jsxs)(r5,{selector:".page-abs-container",enabled:!0,children:[(0,p.jsx)(rW,{x:-window.innerWidth/t.scale,y:-window.innerWidth/t.scale,width:window.innerWidth/t.scale*3,height:window.innerWidth/t.scale*3,fill:"rgba(0,0,0,0.3)"}),(0,p.jsx)(rK,{listening:!1,image:L,x:e.x,y:e.y,width:e.a.width,height:e.a.height,rotation:e.rotation,shadowEnabled:e.shadowEnabled,shadowBlur:e.shadowBlur}),(0,p.jsxs)(rq,{x:e.x,y:e.y,rotation:e.rotation,scaleX:M,scaleY:M,children:[(0,p.jsx)(rK,{image:w,ref:s,opacity:.4,draggable:!0,x:-e.cropX*w.width,y:-e.cropY*w.height,onDragMove:V,onTransform:V,onTouchMove:e=>{e.evt.preventDefault();let t=e.target.getStage().getPointersPositions();var n=t[0],r=t[1];let i=e.target;if(n&&!r&&!i.isDragging()&&H.current&&(i.startDrag(),H.current=!1),n&&r){l(A).hitOnDragEnabled=!0,i.isDragging()&&(H.current=!0,i.stopDrag());let t=e.target.getAbsoluteTransform().copy();t.invert();var o={x:n.x,y:n.y},a={x:r.x,y:r.y};if(!B.current){B.current=i5(o,a);return}var s=i5(o,a),u=Math.sqrt(Math.pow(a.x-o.x,2)+Math.pow(a.y-o.y,2));U.current||(U.current=u);let g=i.position();var c={x:s.x-g.x,y:s.y-g.y},d=u/U.current;i.scaleX(d),i.scaleY(d);let m=t.point(s),v=t.point(B.current);var h=m.x-v.x,f=m.y-v.y,p={x:Math.min(0,s.x-c.x*d+h),y:Math.min(0,s.y-c.y*d+f)};i.position(p),U.current=u,B.current=s,V(e)}},onTouchEnd:e=>{U.current=0,B.current=null,l(A).hitOnDragEnabled=!1}}),(0,p.jsx)(rZ,{ref:z,anchorSize:20,enabledAnchors:["top-left","top-right","bottom-left","bottom-right"],boundBoxFunc:(e,t)=>t.width<5||t.height<5?e:t,rotateEnabled:!1,borderEnabled:!1,anchorCornerRadius:10,anchorStrokeWidth:2,borderStrokeWidth:2}),(0,p.jsx)(rW,{width:n,height:r,ref:D,listening:!1,onTransform:t=>{t.target.x()<-e.cropX*w.width-1e-9&&(t.target.x(-e.cropX*w.width),t.target.scaleX(1)),t.target.y()<-e.cropY*w.height-1e-9&&(t.target.y(-e.cropY*w.height),t.target.scaleY(1));let n=Math.min(1,Math.max(0,e.cropX+t.target.x()/w.width)),r=Math.min(1,Math.max(0,t.target.y()/w.height+e.cropY)),i=t.target.width()*t.target.scaleX(),o=t.target.height()*t.target.scaleY(),a=Math.min(1-n,i/w.width),l=Math.min(1-r,o/w.height),s=t.target.getAbsolutePosition(t.target.getParent().getParent());t.target.scale({x:1,y:1}),t.target.position({x:0,y:0}),e.set({x:s.x,y:s.y,cropX:n,cropY:r,cropWidth:a,cropHeight:l,width:Math.min(i*M,w.width*(1-n)*M),height:Math.min(o*M,w.height*(1-r)*M)})}}),(0,p.jsx)(rZ,{ref:F,enabledAnchors:["top-left","top-right","bottom-left","bottom-right"],boundBoxFunc:(e,t)=>t.width<5||t.height<5?e:t,visible:e.resizable,keepRatio:!1,rotateEnabled:!1,anchorFill:"rgb(240, 240, 240)",anchorStrokeWidth:2,borderStrokeWidth:2})]})]}),(u||d)&&(0,p.jsx)(iA,{element:e})]})});var v=h("8NFma"),ol={};kA=function(e){for(var t,n=e.length,r=n%3,i=[],o=0,a=n-r;o<a;o+=16383)i.push(function(e,t,n){for(var r,i=[],o=t;o<n;o+=3)i.push(os[(r=(e[o]<<16&16711680)+(e[o+1]<<8&65280)+(255&e[o+2]))>>18&63]+os[r>>12&63]+os[r>>6&63]+os[63&r]);return i.join("")}(e,o,o+16383>a?a:o+16383));return 1===r?i.push(os[(t=e[n-1])>>2]+os[t<<4&63]+"=="):2===r&&i.push(os[(t=(e[n-2]<<8)+e[n-1])>>10]+os[t>>4&63]+os[t<<2&63]+"="),i.join("")};for(var os=[],ou=[],oc="undefined"!=typeof Uint8Array?Uint8Array:Array,od="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",oh=0,of=od.length;oh<of;++oh)os[oh]=od[oh],ou[od.charCodeAt(oh)]=oh;ou["-".charCodeAt(0)]=62,ou["_".charCodeAt(0)]=63,kN=function(e,t,n,r,i){var o,a,l=8*i-r-1,s=(1<<l)-1,u=s>>1,c=-7,d=n?i-1:0,h=n?-1:1,f=e[t+d];for(d+=h,o=f&(1<<-c)-1,f>>=-c,c+=l;c>0;o=256*o+e[t+d],d+=h,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=r;c>0;a=256*a+e[t+d],d+=h,c-=8);if(0===o)o=1-u;else{if(o===s)return a?NaN:1/0*(f?-1:1);a+=Math.pow(2,r),o-=u}return(f?-1:1)*a*Math.pow(2,o-r)},kj=function(e,t,n,r,i,o){var a,l,s,u=8*o-i-1,c=(1<<u)-1,d=c>>1,h=23===i?5960464477539062e-23:0,f=r?0:o-1,p=r?1:-1,g=t<0||0===t&&1/t<0?1:0;for(isNaN(t=Math.abs(t))||t===1/0?(l=isNaN(t)?1:0,a=c):(a=Math.floor(Math.log(t)/Math.LN2),t*(s=Math.pow(2,-a))<1&&(a--,s*=2),a+d>=1?t+=h/s:t+=h*Math.pow(2,1-d),t*s>=2&&(a++,s/=2),a+d>=c?(l=0,a=c):a+d>=1?(l=(t*s-1)*Math.pow(2,i),a+=d):(l=t*Math.pow(2,d-1)*Math.pow(2,i),a=0));i>=8;e[n+f]=255&l,f+=p,l/=256,i-=8);for(a=a<<i|l,u+=i;u>0;e[n+f]=255&a,f+=p,a/=256,u-=8);e[n+f-p]|=128*g};let op="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;function og(e){if(e>2147483647)throw RangeError('The value "'+e+'" is invalid for option "size"');let t=new Uint8Array(e);return Object.setPrototypeOf(t,om.prototype),t}function om(e,t,n){if("number"==typeof e){if("string"==typeof t)throw TypeError('The "string" argument must be of type string. Received type number');return ob(e)}return ov(e,t,n)}function ov(e,t,n){if("string"==typeof e)return function(e,t){if(("string"!=typeof t||""===t)&&(t="utf8"),!om.isEncoding(t))throw TypeError("Unknown encoding: "+t);let n=0|oE(e,t),r=og(n),i=r.write(e,t);return i!==n&&(r=r.slice(0,i)),r}(e,t);if(ArrayBuffer.isView(e))return function(e){if(oW(e,Uint8Array)){let t=new Uint8Array(e);return ox(t.buffer,t.byteOffset,t.byteLength)}return ow(e)}(e);if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(oW(e,ArrayBuffer)||e&&oW(e.buffer,ArrayBuffer)||"undefined"!=typeof SharedArrayBuffer&&(oW(e,SharedArrayBuffer)||e&&oW(e.buffer,SharedArrayBuffer)))return ox(e,t,n);if("number"==typeof e)throw TypeError('The "value" argument must not be of type number. Received type number');let r=e.valueOf&&e.valueOf();if(null!=r&&r!==e)return om.from(r,t,n);let i=function(e){var t;if(om.isBuffer(e)){let t=0|o_(e.length),n=og(t);return 0===n.length||e.copy(n,0,0,t),n}return void 0!==e.length?"number"!=typeof e.length||(t=e.length)!=t?og(0):ow(e):"Buffer"===e.type&&Array.isArray(e.data)?ow(e.data):void 0}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return om.from(e[Symbol.toPrimitive]("string"),t,n);throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function oy(e){if("number"!=typeof e)throw TypeError('"size" argument must be of type number');if(e<0)throw RangeError('The value "'+e+'" is invalid for option "size"')}function ob(e){return oy(e),og(e<0?0:0|o_(e))}function ow(e){let t=e.length<0?0:0|o_(e.length),n=og(t);for(let r=0;r<t;r+=1)n[r]=255&e[r];return n}function ox(e,t,n){let r;if(t<0||e.byteLength<t)throw RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(n||0))throw RangeError('"length" is outside of buffer bounds');return Object.setPrototypeOf(r=void 0===t&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,t):new Uint8Array(e,t,n),om.prototype),r}function o_(e){if(e>=2147483647)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|e}function oE(e,t){if(om.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||oW(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);let n=e.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return oV(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return oq(e).length;default:if(i)return r?-1:oV(e).length;t=(""+t).toLowerCase(),i=!0}}function oS(e,t,n){let r=!1;if((void 0===t||t<0)&&(t=0),t>this.length||((void 0===n||n>this.length)&&(n=this.length),n<=0||(n>>>=0)<=(t>>>=0)))return"";for(e||(e="utf8");;)switch(e){case"hex":return function(e,t,n){let r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);let i="";for(let r=t;r<n;++r)i+=o$[e[r]];return i}(this,t,n);case"utf8":case"utf-8":return oP(this,t,n);case"ascii":return function(e,t,n){let r="";n=Math.min(e.length,n);for(let i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}(this,t,n);case"latin1":case"binary":return function(e,t,n){let r="";n=Math.min(e.length,n);for(let i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}(this,t,n);case"base64":var i,o;return i=t,o=n,0===i&&o===this.length?kA(this):kA(this.slice(i,o));case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return function(e,t,n){let r=e.slice(t,n),i="";for(let e=0;e<r.length-1;e+=2)i+=String.fromCharCode(r[e]+256*r[e+1]);return i}(this,t,n);default:if(r)throw TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function oC(e,t,n){let r=e[t];e[t]=e[n],e[n]=r}function oO(e,t,n,r,i){var o;if(0===e.length)return -1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),(o=n=+n)!=o&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return -1;n=e.length-1}else if(n<0){if(!i)return -1;n=0}if("string"==typeof t&&(t=om.from(t,r)),om.isBuffer(t))return 0===t.length?-1:ok(e,t,n,r,i);if("number"==typeof t)return(t&=255,"function"==typeof Uint8Array.prototype.indexOf)?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):ok(e,[t],n,r,i);throw TypeError("val must be string, number or Buffer")}function ok(e,t,n,r,i){let o,a=1,l=e.length,s=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return -1;a=2,l/=2,s/=2,n/=2}function u(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){let r=-1;for(o=n;o<l;o++)if(u(e,o)===u(t,-1===r?0:o-r)){if(-1===r&&(r=o),o-r+1===s)return r*a}else -1!==r&&(o-=o-r),r=-1}else for(n+s>l&&(n=l-s),o=n;o>=0;o--){let n=!0;for(let r=0;r<s;r++)if(u(e,o+r)!==u(t,r)){n=!1;break}if(n)return o}return -1}function oP(e,t,n){n=Math.min(e.length,n);let r=[],i=t;for(;i<n;){let t=e[i],o=null,a=t>239?4:t>223?3:t>191?2:1;if(i+a<=n){let n,r,l,s;switch(a){case 1:t<128&&(o=t);break;case 2:(192&(n=e[i+1]))==128&&(s=(31&t)<<6|63&n)>127&&(o=s);break;case 3:n=e[i+1],r=e[i+2],(192&n)==128&&(192&r)==128&&(s=(15&t)<<12|(63&n)<<6|63&r)>2047&&(s<55296||s>57343)&&(o=s);break;case 4:n=e[i+1],r=e[i+2],l=e[i+3],(192&n)==128&&(192&r)==128&&(192&l)==128&&(s=(15&t)<<18|(63&n)<<12|(63&r)<<6|63&l)>65535&&s<1114112&&(o=s)}}null===o?(o=65533,a=1):o>65535&&(o-=65536,r.push(o>>>10&1023|55296),o=56320|1023&o),r.push(o),i+=a}return function(e){let t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);let n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=4096));return n}(r)}function oT(e,t,n){if(e%1!=0||e<0)throw RangeError("offset is not uint");if(e+t>n)throw RangeError("Trying to access beyond buffer length")}function oA(e,t,n,r,i,o){if(!om.isBuffer(e))throw TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw RangeError('"value" argument is out of bounds');if(n+r>e.length)throw RangeError("Index out of range")}function oN(e,t,n,r,i){oz(t,r,i,e,n,7);let o=Number(t&BigInt(4294967295));e[n++]=o,o>>=8,e[n++]=o,o>>=8,e[n++]=o,o>>=8,e[n++]=o;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a,n}function oj(e,t,n,r,i){oz(t,r,i,e,n,7);let o=Number(t&BigInt(4294967295));e[n+7]=o,o>>=8,e[n+6]=o,o>>=8,e[n+5]=o,o>>=8,e[n+4]=o;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[n+3]=a,a>>=8,e[n+2]=a,a>>=8,e[n+1]=a,a>>=8,e[n]=a,n+8}function oR(e,t,n,r,i,o){if(n+r>e.length||n<0)throw RangeError("Index out of range")}function oI(e,t,n,r,i){return t=+t,n>>>=0,i||oR(e,t,n,4,34028234663852886e22,-34028234663852886e22),kj(e,t,n,r,23,4),n+4}function oL(e,t,n,r,i){return t=+t,n>>>=0,i||oR(e,t,n,8,17976931348623157e292,-17976931348623157e292),kj(e,t,n,r,52,8),n+8}om.TYPED_ARRAY_SUPPORT=function(){try{let e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),om.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(om.prototype,"parent",{enumerable:!0,get:function(){if(om.isBuffer(this))return this.buffer}}),Object.defineProperty(om.prototype,"offset",{enumerable:!0,get:function(){if(om.isBuffer(this))return this.byteOffset}}),om.poolSize=8192,om.from=function(e,t,n){return ov(e,t,n)},Object.setPrototypeOf(om.prototype,Uint8Array.prototype),Object.setPrototypeOf(om,Uint8Array),om.alloc=function(e,t,n){return(oy(e),e<=0)?og(e):void 0!==t?"string"==typeof n?og(e).fill(t,n):og(e).fill(t):og(e)},om.allocUnsafe=function(e){return ob(e)},om.allocUnsafeSlow=function(e){return ob(e)},om.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==om.prototype},om.compare=function(e,t){if(oW(e,Uint8Array)&&(e=om.from(e,e.offset,e.byteLength)),oW(t,Uint8Array)&&(t=om.from(t,t.offset,t.byteLength)),!om.isBuffer(e)||!om.isBuffer(t))throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let n=e.length,r=t.length;for(let i=0,o=Math.min(n,r);i<o;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0},om.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},om.concat=function(e,t){let n;if(!Array.isArray(e))throw TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return om.alloc(0);if(void 0===t)for(n=0,t=0;n<e.length;++n)t+=e[n].length;let r=om.allocUnsafe(t),i=0;for(n=0;n<e.length;++n){let t=e[n];if(oW(t,Uint8Array))i+t.length>r.length?(om.isBuffer(t)||(t=om.from(t)),t.copy(r,i)):Uint8Array.prototype.set.call(r,t,i);else if(om.isBuffer(t))t.copy(r,i);else throw TypeError('"list" argument must be an Array of Buffers');i+=t.length}return r},om.byteLength=oE,om.prototype._isBuffer=!0,om.prototype.swap16=function(){let e=this.length;if(e%2!=0)throw RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)oC(this,t,t+1);return this},om.prototype.swap32=function(){let e=this.length;if(e%4!=0)throw RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)oC(this,t,t+3),oC(this,t+1,t+2);return this},om.prototype.swap64=function(){let e=this.length;if(e%8!=0)throw RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)oC(this,t,t+7),oC(this,t+1,t+6),oC(this,t+2,t+5),oC(this,t+3,t+4);return this},om.prototype.toString=function(){let e=this.length;return 0===e?"":0==arguments.length?oP(this,0,e):oS.apply(this,arguments)},om.prototype.toLocaleString=om.prototype.toString,om.prototype.equals=function(e){if(!om.isBuffer(e))throw TypeError("Argument must be a Buffer");return this===e||0===om.compare(this,e)},om.prototype.inspect=function(){let e="";return e=this.toString("hex",0,50).replace(/(.{2})/g,"$1 ").trim(),this.length>50&&(e+=" ... "),"<Buffer "+e+">"},op&&(om.prototype[op]=om.prototype.inspect),om.prototype.compare=function(e,t,n,r,i){if(oW(e,Uint8Array)&&(e=om.from(e,e.offset,e.byteLength)),!om.isBuffer(e))throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return -1;if(t>=n)return 1;if(t>>>=0,n>>>=0,r>>>=0,i>>>=0,this===e)return 0;let o=i-r,a=n-t,l=Math.min(o,a),s=this.slice(r,i),u=e.slice(t,n);for(let e=0;e<l;++e)if(s[e]!==u[e]){o=s[e],a=u[e];break}return o<a?-1:a<o?1:0},om.prototype.includes=function(e,t,n){return -1!==this.indexOf(e,t,n)},om.prototype.indexOf=function(e,t,n){return oO(this,e,t,n,!0)},om.prototype.lastIndexOf=function(e,t,n){return oO(this,e,t,n,!1)},om.prototype.write=function(e,t,n,r){var i,o,a,l,s,u,c,d;if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else if(isFinite(t))t>>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0);else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let h=this.length-t;if((void 0===n||n>h)&&(n=h),e.length>0&&(n<0||t<0)||t>this.length)throw RangeError("Attempt to write outside buffer bounds");r||(r="utf8");let f=!1;for(;;)switch(r){case"hex":return function(e,t,n,r){let i;n=Number(n)||0;let o=e.length-n;r?(r=Number(r))>o&&(r=o):r=o;let a=t.length;for(r>a/2&&(r=a/2),i=0;i<r;++i){let r=parseInt(t.substr(2*i,2),16);if(r!=r)break;e[n+i]=r}return i}(this,e,t,n);case"utf8":case"utf-8":return i=t,o=n,oG(oV(e,this.length-i),this,i,o);case"ascii":case"latin1":case"binary":return a=t,l=n,oG(function(e){let t=[];for(let n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(e),this,a,l);case"base64":return s=t,u=n,oG(oq(e),this,s,u);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return c=t,d=n,oG(function(e,t){let n,r;let i=[];for(let o=0;o<e.length&&!((t-=2)<0);++o)r=(n=e.charCodeAt(o))>>8,i.push(n%256),i.push(r);return i}(e,this.length-c),this,c,d);default:if(f)throw TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),f=!0}},om.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},om.prototype.slice=function(e,t){let n=this.length;e=~~e,t=void 0===t?n:~~t,e<0?(e+=n)<0&&(e=0):e>n&&(e=n),t<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e);let r=this.subarray(e,t);return Object.setPrototypeOf(r,om.prototype),r},om.prototype.readUintLE=om.prototype.readUIntLE=function(e,t,n){e>>>=0,t>>>=0,n||oT(e,t,this.length);let r=this[e],i=1,o=0;for(;++o<t&&(i*=256);)r+=this[e+o]*i;return r},om.prototype.readUintBE=om.prototype.readUIntBE=function(e,t,n){e>>>=0,t>>>=0,n||oT(e,t,this.length);let r=this[e+--t],i=1;for(;t>0&&(i*=256);)r+=this[e+--t]*i;return r},om.prototype.readUint8=om.prototype.readUInt8=function(e,t){return e>>>=0,t||oT(e,1,this.length),this[e]},om.prototype.readUint16LE=om.prototype.readUInt16LE=function(e,t){return e>>>=0,t||oT(e,2,this.length),this[e]|this[e+1]<<8},om.prototype.readUint16BE=om.prototype.readUInt16BE=function(e,t){return e>>>=0,t||oT(e,2,this.length),this[e]<<8|this[e+1]},om.prototype.readUint32LE=om.prototype.readUInt32LE=function(e,t){return e>>>=0,t||oT(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},om.prototype.readUint32BE=om.prototype.readUInt32BE=function(e,t){return e>>>=0,t||oT(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},om.prototype.readBigUInt64LE=oK(function(e){oB(e>>>=0,"offset");let t=this[e],n=this[e+7];(void 0===t||void 0===n)&&oU(e,this.length-8);let r=t+256*this[++e]+65536*this[++e]+16777216*this[++e],i=this[++e]+256*this[++e]+65536*this[++e]+16777216*n;return BigInt(r)+(BigInt(i)<<BigInt(32))}),om.prototype.readBigUInt64BE=oK(function(e){oB(e>>>=0,"offset");let t=this[e],n=this[e+7];(void 0===t||void 0===n)&&oU(e,this.length-8);let r=16777216*t+65536*this[++e]+256*this[++e]+this[++e],i=16777216*this[++e]+65536*this[++e]+256*this[++e]+n;return(BigInt(r)<<BigInt(32))+BigInt(i)}),om.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||oT(e,t,this.length);let r=this[e],i=1,o=0;for(;++o<t&&(i*=256);)r+=this[e+o]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*t)),r},om.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||oT(e,t,this.length);let r=t,i=1,o=this[e+--r];for(;r>0&&(i*=256);)o+=this[e+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},om.prototype.readInt8=function(e,t){return(e>>>=0,t||oT(e,1,this.length),128&this[e])?-((255-this[e]+1)*1):this[e]},om.prototype.readInt16LE=function(e,t){e>>>=0,t||oT(e,2,this.length);let n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},om.prototype.readInt16BE=function(e,t){e>>>=0,t||oT(e,2,this.length);let n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},om.prototype.readInt32LE=function(e,t){return e>>>=0,t||oT(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},om.prototype.readInt32BE=function(e,t){return e>>>=0,t||oT(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},om.prototype.readBigInt64LE=oK(function(e){oB(e>>>=0,"offset");let t=this[e],n=this[e+7];return(void 0===t||void 0===n)&&oU(e,this.length-8),(BigInt(this[e+4]+256*this[e+5]+65536*this[e+6]+(n<<24))<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+16777216*this[++e])}),om.prototype.readBigInt64BE=oK(function(e){oB(e>>>=0,"offset");let t=this[e],n=this[e+7];return(void 0===t||void 0===n)&&oU(e,this.length-8),(BigInt((t<<24)+65536*this[++e]+256*this[++e]+this[++e])<<BigInt(32))+BigInt(16777216*this[++e]+65536*this[++e]+256*this[++e]+n)}),om.prototype.readFloatLE=function(e,t){return e>>>=0,t||oT(e,4,this.length),kN(this,e,!0,23,4)},om.prototype.readFloatBE=function(e,t){return e>>>=0,t||oT(e,4,this.length),kN(this,e,!1,23,4)},om.prototype.readDoubleLE=function(e,t){return e>>>=0,t||oT(e,8,this.length),kN(this,e,!0,52,8)},om.prototype.readDoubleBE=function(e,t){return e>>>=0,t||oT(e,8,this.length),kN(this,e,!1,52,8)},om.prototype.writeUintLE=om.prototype.writeUIntLE=function(e,t,n,r){if(e=+e,t>>>=0,n>>>=0,!r){let r=Math.pow(2,8*n)-1;oA(this,e,t,n,r,0)}let i=1,o=0;for(this[t]=255&e;++o<n&&(i*=256);)this[t+o]=e/i&255;return t+n},om.prototype.writeUintBE=om.prototype.writeUIntBE=function(e,t,n,r){if(e=+e,t>>>=0,n>>>=0,!r){let r=Math.pow(2,8*n)-1;oA(this,e,t,n,r,0)}let i=n-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+n},om.prototype.writeUint8=om.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||oA(this,e,t,1,255,0),this[t]=255&e,t+1},om.prototype.writeUint16LE=om.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||oA(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},om.prototype.writeUint16BE=om.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||oA(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},om.prototype.writeUint32LE=om.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||oA(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},om.prototype.writeUint32BE=om.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||oA(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},om.prototype.writeBigUInt64LE=oK(function(e,t=0){return oN(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),om.prototype.writeBigUInt64BE=oK(function(e,t=0){return oj(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),om.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){let r=Math.pow(2,8*n-1);oA(this,e,t,n,r-1,-r)}let i=0,o=1,a=0;for(this[t]=255&e;++i<n&&(o*=256);)e<0&&0===a&&0!==this[t+i-1]&&(a=1),this[t+i]=(e/o>>0)-a&255;return t+n},om.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){let r=Math.pow(2,8*n-1);oA(this,e,t,n,r-1,-r)}let i=n-1,o=1,a=0;for(this[t+i]=255&e;--i>=0&&(o*=256);)e<0&&0===a&&0!==this[t+i+1]&&(a=1),this[t+i]=(e/o>>0)-a&255;return t+n},om.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||oA(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},om.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||oA(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},om.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||oA(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},om.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||oA(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},om.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||oA(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},om.prototype.writeBigInt64LE=oK(function(e,t=0){return oN(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),om.prototype.writeBigInt64BE=oK(function(e,t=0){return oj(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),om.prototype.writeFloatLE=function(e,t,n){return oI(this,e,t,!0,n)},om.prototype.writeFloatBE=function(e,t,n){return oI(this,e,t,!1,n)},om.prototype.writeDoubleLE=function(e,t,n){return oL(this,e,t,!0,n)},om.prototype.writeDoubleBE=function(e,t,n){return oL(this,e,t,!1,n)},om.prototype.copy=function(e,t,n,r){if(!om.isBuffer(e))throw TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n||0===e.length||0===this.length)return 0;if(t<0)throw RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw RangeError("Index out of range");if(r<0)throw RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);let i=r-n;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,n,r):Uint8Array.prototype.set.call(e,this.subarray(n,r),t),i},om.prototype.fill=function(e,t,n,r){let i;if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),void 0!==r&&"string"!=typeof r)throw TypeError("encoding must be a string");if("string"==typeof r&&!om.isEncoding(r))throw TypeError("Unknown encoding: "+r);if(1===e.length){let t=e.charCodeAt(0);("utf8"===r&&t<128||"latin1"===r)&&(e=t)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<n)throw RangeError("Out of range index");if(n<=t)return this;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(i=t;i<n;++i)this[i]=e;else{let o=om.isBuffer(e)?e:om.from(e,r),a=o.length;if(0===a)throw TypeError('The value "'+e+'" is invalid for argument "value"');for(i=0;i<n-t;++i)this[i+t]=o[i%a]}return this};let oM={};function oD(e,t,n){oM[e]=class extends n{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function oF(e){let t="",n=e.length,r="-"===e[0]?1:0;for(;n>=r+4;n-=3)t=`_${e.slice(n-3,n)}${t}`;return`${e.slice(0,n)}${t}`}function oz(e,t,n,r,i,o){if(e>n||e<t){let r;let i="bigint"==typeof t?"n":"";throw r=o>3?0===t||t===BigInt(0)?`>= 0${i} and < 2${i} ** ${(o+1)*8}${i}`:`>= -(2${i} ** ${(o+1)*8-1}${i}) and < 2 ** ${(o+1)*8-1}${i}`:`>= ${t}${i} and <= ${n}${i}`,new oM.ERR_OUT_OF_RANGE("value",r,e)}oB(i,"offset"),(void 0===r[i]||void 0===r[i+o])&&oU(i,r.length-(o+1))}function oB(e,t){if("number"!=typeof e)throw new oM.ERR_INVALID_ARG_TYPE(t,"number",e)}function oU(e,t,n){if(Math.floor(e)!==e)throw oB(e,n),new oM.ERR_OUT_OF_RANGE(n||"offset","an integer",e);if(t<0)throw new oM.ERR_BUFFER_OUT_OF_BOUNDS;throw new oM.ERR_OUT_OF_RANGE(n||"offset",`>= ${n?1:0} and <= ${t}`,e)}oD("ERR_BUFFER_OUT_OF_BOUNDS",function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),oD("ERR_INVALID_ARG_TYPE",function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`},TypeError),oD("ERR_OUT_OF_RANGE",function(e,t,n){let r=`The value of "${e}" is out of range.`,i=n;return Number.isInteger(n)&&Math.abs(n)>4294967296?i=oF(String(n)):"bigint"==typeof n&&(i=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(i=oF(i)),i+="n"),r+=` It must be ${t}. Received ${i}`},RangeError);let oH=/[^+/0-9A-Za-z-_]/g;function oV(e,t){let n;t=t||1/0;let r=e.length,i=null,o=[];for(let a=0;a<r;++a){if((n=e.charCodeAt(a))>55295&&n<57344){if(!i){if(n>56319||a+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=(i-55296<<10|n-56320)+65536}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else if(n<1114112){if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}else throw Error("Invalid code point")}return o}function oq(e){return function(e){var t,n,r=function(e){var t=e.length;if(t%4>0)throw Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");-1===n&&(n=t);var r=n===t?0:4-n%4;return[n,r]}(e),i=r[0],o=r[1],a=new oc((i+o)*3/4-o),l=0,s=o>0?i-4:i;for(n=0;n<s;n+=4)t=ou[e.charCodeAt(n)]<<18|ou[e.charCodeAt(n+1)]<<12|ou[e.charCodeAt(n+2)]<<6|ou[e.charCodeAt(n+3)],a[l++]=t>>16&255,a[l++]=t>>8&255,a[l++]=255&t;return 2===o&&(t=ou[e.charCodeAt(n)]<<2|ou[e.charCodeAt(n+1)]>>4,a[l++]=255&t),1===o&&(t=ou[e.charCodeAt(n)]<<10|ou[e.charCodeAt(n+1)]<<4|ou[e.charCodeAt(n+2)]>>2,a[l++]=t>>8&255,a[l++]=255&t),a}(function(e){if((e=(e=e.split("=")[0]).trim().replace(oH,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function oG(e,t,n,r){let i;for(i=0;i<r&&!(i+n>=t.length)&&!(i>=e.length);++i)t[i+n]=e[i];return i}function oW(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}let o$=function(){let e="0123456789abcdef",t=Array(256);for(let n=0;n<16;++n){let r=16*n;for(let i=0;i<16;++i)t[r+i]=e[n]+e[i]}return t}();function oK(e){return"undefined"==typeof BigInt?oY:e}function oY(){throw Error("BigInt not supported")}"undefined"!=typeof self&&self,ol=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=109)}([function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=n(17),i=n(18),o=n(19),a=n(45),l=n(46),s=n(47),u=n(48),c=n(49),d=n(12),h=n(32),f=n(33),p=n(31),g=n(1),m={Scope:g.Scope,create:g.create,find:g.find,query:g.query,register:g.register,Container:r.default,Format:i.default,Leaf:o.default,Embed:u.default,Scroll:a.default,Block:s.default,Inline:l.default,Text:c.default,Attributor:{Attribute:d.default,Class:h.default,Style:f.default,Store:p.default}};t.default=m},function(e,t,n){var r,i,o,a=this&&this.__extends||(i=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var l=function(e){function t(t){var n=this;return t="[Parchment] "+t,(n=e.call(this,t)||this).message=t,n.name=n.constructor.name,n}return a(t,e),t}(Error);t.ParchmentError=l;var s={},u={},c={},d={};function h(e,t){if(void 0===t&&(t=o.ANY),"string"==typeof e)n=d[e]||s[e];else if(e instanceof Text||e.nodeType===Node.TEXT_NODE)n=d.text;else if("number"==typeof e)e&o.LEVEL&o.BLOCK?n=d.block:e&o.LEVEL&o.INLINE&&(n=d.inline);else if(e instanceof HTMLElement){var n,r=(e.getAttribute("class")||"").split(/\s+/);for(var i in r)if(n=u[r[i]])break;n=n||c[e.tagName]}return null==n?null:t&o.LEVEL&n.scope&&t&o.TYPE&n.scope?n:null}t.DATA_KEY="__blot",(r=o=t.Scope||(t.Scope={}))[r.TYPE=3]="TYPE",r[r.LEVEL=12]="LEVEL",r[r.ATTRIBUTE=13]="ATTRIBUTE",r[r.BLOT=14]="BLOT",r[r.INLINE=7]="INLINE",r[r.BLOCK=11]="BLOCK",r[r.BLOCK_BLOT=10]="BLOCK_BLOT",r[r.INLINE_BLOT=6]="INLINE_BLOT",r[r.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",r[r.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",r[r.ANY=15]="ANY",t.create=function(e,t){var n=h(e);if(null==n)throw new l("Unable to create "+e+" blot");var r=e instanceof Node||e.nodeType===Node.TEXT_NODE?e:n.create(t);return new n(r,t)},t.find=function e(n,r){return(void 0===r&&(r=!1),null==n)?null:null!=n[t.DATA_KEY]?n[t.DATA_KEY].blot:r?e(n.parentNode,r):null},t.query=h,t.register=function e(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(t.length>1)return t.map(function(t){return e(t)});var r=t[0];if("string"!=typeof r.blotName&&"string"!=typeof r.attrName)throw new l("Invalid definition");if("abstract"===r.blotName)throw new l("Cannot register abstract class");return d[r.blotName||r.attrName]=r,"string"==typeof r.keyName?s[r.keyName]=r:(null!=r.className&&(u[r.className]=r),null!=r.tagName&&(Array.isArray(r.tagName)?r.tagName=r.tagName.map(function(e){return e.toUpperCase()}):r.tagName=r.tagName.toUpperCase(),(Array.isArray(r.tagName)?r.tagName:[r.tagName]).forEach(function(e){(null==c[e]||null==r.className)&&(c[e]=r)}))),r}},function(e,t,n){var r=n(51),i=n(11),o=n(3),a=n(20),l=function(e){Array.isArray(e)?this.ops=e:null!=e&&Array.isArray(e.ops)?this.ops=e.ops:this.ops=[]};l.prototype.insert=function(e,t){var n={};return 0===e.length?this:(n.insert=e,null!=t&&"object"==typeof t&&Object.keys(t).length>0&&(n.attributes=t),this.push(n))},l.prototype.delete=function(e){return e<=0?this:this.push({delete:e})},l.prototype.retain=function(e,t){if(e<=0)return this;var n={retain:e};return null!=t&&"object"==typeof t&&Object.keys(t).length>0&&(n.attributes=t),this.push(n)},l.prototype.push=function(e){var t=this.ops.length,n=this.ops[t-1];if(e=o(!0,{},e),"object"==typeof n){if("number"==typeof e.delete&&"number"==typeof n.delete)return this.ops[t-1]={delete:n.delete+e.delete},this;if("number"==typeof n.delete&&null!=e.insert&&(t-=1,"object"!=typeof(n=this.ops[t-1])))return this.ops.unshift(e),this;if(i(e.attributes,n.attributes)){if("string"==typeof e.insert&&"string"==typeof n.insert)return this.ops[t-1]={insert:n.insert+e.insert},"object"==typeof e.attributes&&(this.ops[t-1].attributes=e.attributes),this;if("number"==typeof e.retain&&"number"==typeof n.retain)return this.ops[t-1]={retain:n.retain+e.retain},"object"==typeof e.attributes&&(this.ops[t-1].attributes=e.attributes),this}}return t===this.ops.length?this.ops.push(e):this.ops.splice(t,0,e),this},l.prototype.chop=function(){var e=this.ops[this.ops.length-1];return e&&e.retain&&!e.attributes&&this.ops.pop(),this},l.prototype.filter=function(e){return this.ops.filter(e)},l.prototype.forEach=function(e){this.ops.forEach(e)},l.prototype.map=function(e){return this.ops.map(e)},l.prototype.partition=function(e){var t=[],n=[];return this.forEach(function(r){(e(r)?t:n).push(r)}),[t,n]},l.prototype.reduce=function(e,t){return this.ops.reduce(e,t)},l.prototype.changeLength=function(){return this.reduce(function(e,t){return t.insert?e+a.length(t):t.delete?e-t.delete:e},0)},l.prototype.length=function(){return this.reduce(function(e,t){return e+a.length(t)},0)},l.prototype.slice=function(e,t){e=e||0,"number"!=typeof t&&(t=1/0);for(var n,r=[],i=a.iterator(this.ops),o=0;o<t&&i.hasNext();)o<e?n=i.next(e-o):(n=i.next(t-o),r.push(n)),o+=a.length(n);return new l(r)},l.prototype.compose=function(e){var t=a.iterator(this.ops),n=a.iterator(e.ops),r=[],o=n.peek();if(null!=o&&"number"==typeof o.retain&&null==o.attributes){for(var s=o.retain;"insert"===t.peekType()&&t.peekLength()<=s;)s-=t.peekLength(),r.push(t.next());o.retain-s>0&&n.next(o.retain-s)}for(var u=new l(r);t.hasNext()||n.hasNext();)if("insert"===n.peekType())u.push(n.next());else if("delete"===t.peekType())u.push(t.next());else{var c=Math.min(t.peekLength(),n.peekLength()),d=t.next(c),h=n.next(c);if("number"==typeof h.retain){var f={};"number"==typeof d.retain?f.retain=c:f.insert=d.insert;var p=a.attributes.compose(d.attributes,h.attributes,"number"==typeof d.retain);if(p&&(f.attributes=p),u.push(f),!n.hasNext()&&i(u.ops[u.ops.length-1],f)){var g=new l(t.rest());return u.concat(g).chop()}}else"number"==typeof h.delete&&"number"==typeof d.retain&&u.push(h)}return u.chop()},l.prototype.concat=function(e){var t=new l(this.ops.slice());return e.ops.length>0&&(t.push(e.ops[0]),t.ops=t.ops.concat(e.ops.slice(1))),t},l.prototype.diff=function(e,t){if(this.ops===e.ops)return new l;var n=[this,e].map(function(t){return t.map(function(n){if(null!=n.insert)return"string"==typeof n.insert?n.insert:"\x00";throw Error("diff() called "+(t===e?"on":"with")+" non-document")}).join("")}),o=new l,s=r(n[0],n[1],t),u=a.iterator(this.ops),c=a.iterator(e.ops);return s.forEach(function(e){for(var t=e[1].length;t>0;){var n=0;switch(e[0]){case r.INSERT:n=Math.min(c.peekLength(),t),o.push(c.next(n));break;case r.DELETE:n=Math.min(t,u.peekLength()),u.next(n),o.delete(n);break;case r.EQUAL:n=Math.min(u.peekLength(),c.peekLength(),t);var l=u.next(n),s=c.next(n);i(l.insert,s.insert)?o.retain(n,a.attributes.diff(l.attributes,s.attributes)):o.push(s).delete(n)}t-=n}}),o.chop()},l.prototype.eachLine=function(e,t){t=t||"\n";for(var n=a.iterator(this.ops),r=new l,i=0;n.hasNext();){if("insert"!==n.peekType())return;var o=n.peek(),s=a.length(o)-n.peekLength(),u="string"==typeof o.insert?o.insert.indexOf(t,s)-s:-1;if(u<0)r.push(n.next());else if(u>0)r.push(n.next(u));else{if(!1===e(r,n.next(1).attributes||{},i))return;i+=1,r=new l}}r.length()>0&&e(r,{},i)},l.prototype.transform=function(e,t){if(t=!!t,"number"==typeof e)return this.transformPosition(e,t);for(var n=a.iterator(this.ops),r=a.iterator(e.ops),i=new l;n.hasNext()||r.hasNext();)if("insert"===n.peekType()&&(t||"insert"!==r.peekType()))i.retain(a.length(n.next()));else if("insert"===r.peekType())i.push(r.next());else{var o=Math.min(n.peekLength(),r.peekLength()),s=n.next(o),u=r.next(o);if(s.delete)continue;u.delete?i.push(u):i.retain(o,a.attributes.transform(s.attributes,u.attributes,t))}return i.chop()},l.prototype.transformPosition=function(e,t){t=!!t;for(var n=a.iterator(this.ops),r=0;n.hasNext()&&r<=e;){var i=n.peekLength(),o=n.peekType();if(n.next(),"delete"===o){e-=Math.min(i,e-r);continue}"insert"===o&&(r<e||!t)&&(e+=i),r+=i}return e},e.exports=l},function(e,t){var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,o=Object.getOwnPropertyDescriptor,a=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===r.call(e)},l=function(e){if(!e||"[object Object]"!==r.call(e))return!1;var t,i=n.call(e,"constructor"),o=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!i&&!o)return!1;for(t in e);return void 0===t||n.call(e,t)},s=function(e,t){i&&"__proto__"===t.name?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},u=function(e,t){if("__proto__"===t){if(!n.call(e,t))return;if(o)return o(e,t).value}return e[t]};e.exports=function e(){var t,n,r,i,o,c,d=arguments[0],h=1,f=arguments.length,p=!1;for("boolean"==typeof d&&(p=d,d=arguments[1]||{},h=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});h<f;++h)if(t=arguments[h],null!=t)for(n in t)r=u(d,n),d!==(i=u(t,n))&&(p&&i&&(l(i)||(o=a(i)))?(o?(o=!1,c=r&&a(r)?r:[]):c=r&&l(r)?r:{},s(d,{name:n,newValue:e(p,c,i)})):void 0!==i&&s(d,{name:n,newValue:i}));return d}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.BlockEmbed=t.bubbleFormats=void 0;var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);if(null===o)return;return e(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},o=d(n(3)),a=d(n(2)),l=d(n(0)),s=d(n(16)),u=d(n(6)),c=d(n(7));function d(e){return e&&e.__esModule?e:{default:e}}function h(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function f(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}function p(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var g=function(e){function t(){return h(this,t),f(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return p(t,e),r(t,[{key:"attach",value:function(){i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"attach",this).call(this),this.attributes=new l.default.Attributor.Store(this.domNode)}},{key:"delta",value:function(){return new a.default().insert(this.value(),(0,o.default)(this.formats(),this.attributes.values()))}},{key:"format",value:function(e,t){var n=l.default.query(e,l.default.Scope.BLOCK_ATTRIBUTE);null!=n&&this.attributes.attribute(n,t)}},{key:"formatAt",value:function(e,t,n,r){this.format(n,r)}},{key:"insertAt",value:function(e,n,r){if("string"==typeof n&&n.endsWith("\n")){var o=l.default.create(m.blotName);this.parent.insertBefore(o,0===e?this:this.next),o.insertAt(0,n.slice(0,-1))}else i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertAt",this).call(this,e,n,r)}}]),t}(l.default.Embed);g.scope=l.default.Scope.BLOCK_BLOT;var m=function(e){function t(e){h(this,t);var n=f(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.cache={},n}return p(t,e),r(t,[{key:"delta",value:function(){return null==this.cache.delta&&(this.cache.delta=this.descendants(l.default.Leaf).reduce(function(e,t){return 0===t.length()?e:e.insert(t.value(),v(t))},new a.default).insert("\n",v(this))),this.cache.delta}},{key:"deleteAt",value:function(e,n){i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"deleteAt",this).call(this,e,n),this.cache={}}},{key:"formatAt",value:function(e,n,r,o){n<=0||(l.default.query(r,l.default.Scope.BLOCK)?e+n===this.length()&&this.format(r,o):i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"formatAt",this).call(this,e,Math.min(n,this.length()-e-1),r,o),this.cache={})}},{key:"insertAt",value:function(e,n,r){if(null!=r)return i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertAt",this).call(this,e,n,r);if(0!==n.length){var o=n.split("\n"),a=o.shift();a.length>0&&(e<this.length()-1||null==this.children.tail?i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertAt",this).call(this,Math.min(e,this.length()-1),a):this.children.tail.insertAt(this.children.tail.length(),a),this.cache={});var l=this;o.reduce(function(e,t){return(l=l.split(e,!0)).insertAt(0,t),t.length},e+a.length)}}},{key:"insertBefore",value:function(e,n){var r=this.children.head;i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertBefore",this).call(this,e,n),r instanceof s.default&&r.remove(),this.cache={}}},{key:"length",value:function(){return null==this.cache.length&&(this.cache.length=i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"length",this).call(this)+1),this.cache.length}},{key:"moveChildren",value:function(e,n){i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"moveChildren",this).call(this,e,n),this.cache={}}},{key:"optimize",value:function(e){i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"optimize",this).call(this,e),this.cache={}}},{key:"path",value:function(e){return i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"path",this).call(this,e,!0)}},{key:"removeChild",value:function(e){i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"removeChild",this).call(this,e),this.cache={}}},{key:"split",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(n&&(0===e||e>=this.length()-1)){var r=this.clone();return 0===e?(this.parent.insertBefore(r,this),this):(this.parent.insertBefore(r,this.next),r)}var o=i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"split",this).call(this,e,n);return this.cache={},o}}]),t}(l.default.Block);function v(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return null==e?t:("function"==typeof e.formats&&(t=(0,o.default)(t,e.formats())),null==e.parent||"scroll"==e.parent.blotName||e.parent.statics.scope!==e.statics.scope)?t:v(e.parent,t)}m.blotName="block",m.tagName="P",m.defaultChild="break",m.allowedChildren=[u.default,l.default.Embed,c.default],t.bubbleFormats=v,t.BlockEmbed=g,t.default=m},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.overload=t.expandConfig=void 0;var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,l=e[Symbol.iterator]();!(r=(a=l.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&l.return&&l.return()}finally{if(i)throw o}}return n}(e,t);throw TypeError("Invalid attempt to destructure non-iterable instance")},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();n(50);var a=m(n(2)),l=m(n(14)),s=m(n(8)),u=m(n(9)),c=m(n(0)),d=n(15),h=m(d),f=m(n(3)),p=m(n(10)),g=m(n(34));function m(e){return e&&e.__esModule?e:{default:e}}function v(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var y=(0,p.default)("quill"),b=function(){function e(t){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,e),this.options=w(t,r),this.container=this.options.container,null==this.container)return y.error("Invalid Quill container",t);this.options.debug&&e.debug(this.options.debug);var i=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",this.container.__quill=this,this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.root.setAttribute("data-gramm",!1),this.scrollingContainer=this.options.scrollingContainer||this.root,this.emitter=new s.default,this.scroll=c.default.create(this.root,{emitter:this.emitter,whitelist:this.options.formats}),this.editor=new l.default(this.scroll),this.selection=new h.default(this.scroll,this.emitter),this.theme=new this.options.theme(this,this.options),this.keyboard=this.theme.addModule("keyboard"),this.clipboard=this.theme.addModule("clipboard"),this.history=this.theme.addModule("history"),this.theme.init(),this.emitter.on(s.default.events.EDITOR_CHANGE,function(e){e===s.default.events.TEXT_CHANGE&&n.root.classList.toggle("ql-blank",n.editor.isBlank())}),this.emitter.on(s.default.events.SCROLL_UPDATE,function(e,t){var r=n.selection.lastRange,i=r&&0===r.length?r.index:void 0;x.call(n,function(){return n.editor.update(null,t,i)},e)});var o=this.clipboard.convert("<div class='ql-editor' style=\"white-space: normal;\">"+i+"<p><br></p></div>");this.setContents(o),this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable()}return o(e,null,[{key:"debug",value:function(e){!0===e&&(e="log"),p.default.level(e)}},{key:"find",value:function(e){return e.__quill||c.default.find(e)}},{key:"import",value:function(e){return null==this.imports[e]&&y.error("Cannot import "+e+". Are you sure it was registered?"),this.imports[e]}},{key:"register",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if("string"!=typeof e){var i=e.attrName||e.blotName;"string"==typeof i?this.register("formats/"+i,e,t):Object.keys(e).forEach(function(r){n.register(r,e[r],t)})}else null==this.imports[e]||r||y.warn("Overwriting "+e+" with",t),this.imports[e]=t,(e.startsWith("blots/")||e.startsWith("formats/"))&&"abstract"!==t.blotName?c.default.register(t):e.startsWith("modules")&&"function"==typeof t.register&&t.register()}}]),o(e,[{key:"addContainer",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if("string"==typeof e){var n=e;(e=document.createElement("div")).classList.add(n)}return this.container.insertBefore(e,t),e}},{key:"blur",value:function(){this.selection.setRange(null)}},{key:"deleteText",value:function(e,t,n){var r=this,o=i(_(e,t,n),4);return e=o[0],t=o[1],x.call(this,function(){return r.editor.deleteText(e,t)},n=o[3],e,-1*t)}},{key:"disable",value:function(){this.enable(!1)}},{key:"enable",value:function(){var e=!(arguments.length>0)||void 0===arguments[0]||arguments[0];this.scroll.enable(e),this.container.classList.toggle("ql-disabled",!e)}},{key:"focus",value:function(){var e=this.scrollingContainer.scrollTop;this.selection.focus(),this.scrollingContainer.scrollTop=e,this.scrollIntoView()}},{key:"format",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:s.default.sources.API;return x.call(this,function(){var r=n.getSelection(!0),i=new a.default;if(null==r)return i;if(c.default.query(e,c.default.Scope.BLOCK))i=n.editor.formatLine(r.index,r.length,v({},e,t));else{if(0===r.length)return n.selection.format(e,t),i;i=n.editor.formatText(r.index,r.length,v({},e,t))}return n.setSelection(r,s.default.sources.SILENT),i},r)}},{key:"formatLine",value:function(e,t,n,r,o){var a=this,l=void 0,s=i(_(e,t,n,r,o),4);return e=s[0],t=s[1],l=s[2],x.call(this,function(){return a.editor.formatLine(e,t,l)},o=s[3],e,0)}},{key:"formatText",value:function(e,t,n,r,o){var a=this,l=void 0,s=i(_(e,t,n,r,o),4);return e=s[0],t=s[1],l=s[2],x.call(this,function(){return a.editor.formatText(e,t,l)},o=s[3],e,0)}},{key:"getBounds",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=void 0;n="number"==typeof e?this.selection.getBounds(e,t):this.selection.getBounds(e.index,e.length);var r=this.container.getBoundingClientRect();return{bottom:n.bottom-r.top,height:n.height,left:n.left-r.left,right:n.right-r.left,top:n.top-r.top,width:n.width}}},{key:"getContents",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getLength()-e,n=i(_(e,t),2);return e=n[0],t=n[1],this.editor.getContents(e,t)}},{key:"getFormat",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getSelection(!0),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return"number"==typeof e?this.editor.getFormat(e,t):this.editor.getFormat(e.index,e.length)}},{key:"getIndex",value:function(e){return e.offset(this.scroll)}},{key:"getLength",value:function(){return this.scroll.length()}},{key:"getLeaf",value:function(e){return this.scroll.leaf(e)}},{key:"getLine",value:function(e){return this.scroll.line(e)}},{key:"getLines",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE;return"number"!=typeof e?this.scroll.lines(e.index,e.length):this.scroll.lines(e,t)}},{key:"getModule",value:function(e){return this.theme.modules[e]}},{key:"getSelection",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return e&&this.focus(),this.update(),this.selection.getRange()[0]}},{key:"getText",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getLength()-e,n=i(_(e,t),2);return e=n[0],t=n[1],this.editor.getText(e,t)}},{key:"hasFocus",value:function(){return this.selection.hasFocus()}},{key:"insertEmbed",value:function(t,n,r){var i=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e.sources.API;return x.call(this,function(){return i.editor.insertEmbed(t,n,r)},o,t)}},{key:"insertText",value:function(e,t,n,r,o){var a=this,l=void 0,s=i(_(e,0,n,r,o),4);return e=s[0],l=s[2],x.call(this,function(){return a.editor.insertText(e,t,l)},o=s[3],e,t.length)}},{key:"isEnabled",value:function(){return!this.container.classList.contains("ql-disabled")}},{key:"off",value:function(){return this.emitter.off.apply(this.emitter,arguments)}},{key:"on",value:function(){return this.emitter.on.apply(this.emitter,arguments)}},{key:"once",value:function(){return this.emitter.once.apply(this.emitter,arguments)}},{key:"pasteHTML",value:function(e,t,n){this.clipboard.dangerouslyPasteHTML(e,t,n)}},{key:"removeFormat",value:function(e,t,n){var r=this,o=i(_(e,t,n),4);return e=o[0],t=o[1],x.call(this,function(){return r.editor.removeFormat(e,t)},n=o[3],e)}},{key:"scrollIntoView",value:function(){this.selection.scrollIntoView(this.scrollingContainer)}},{key:"setContents",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.sources.API;return x.call(this,function(){e=new a.default(e);var n=t.getLength(),r=t.editor.deleteText(0,n),i=t.editor.applyDelta(e),o=i.ops[i.ops.length-1];return null!=o&&"string"==typeof o.insert&&"\n"===o.insert[o.insert.length-1]&&(t.editor.deleteText(t.getLength()-1,1),i.delete(1)),r.compose(i)},n)}},{key:"setSelection",value:function(t,n,r){if(null==t)this.selection.setRange(null,n||e.sources.API);else{var o=i(_(t,n,r),4);t=o[0],n=o[1],r=o[3],this.selection.setRange(new d.Range(t,n),r),r!==s.default.sources.SILENT&&this.selection.scrollIntoView(this.scrollingContainer)}}},{key:"setText",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.sources.API,n=new a.default().insert(e);return this.setContents(n,t)}},{key:"update",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s.default.sources.USER,t=this.scroll.update(e);return this.selection.update(e),t}},{key:"updateContents",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.sources.API;return x.call(this,function(){return e=new a.default(e),t.editor.applyDelta(e,n)},n,!0)}}]),e}();function w(e,t){if((t=(0,f.default)(!0,{container:e,modules:{clipboard:!0,keyboard:!0,history:!0}},t)).theme&&t.theme!==b.DEFAULTS.theme){if(t.theme=b.import("themes/"+t.theme),null==t.theme)throw Error("Invalid theme "+t.theme+". Did you register it?")}else t.theme=g.default;var n=(0,f.default)(!0,{},t.theme.DEFAULTS);[n,t].forEach(function(e){e.modules=e.modules||{},Object.keys(e.modules).forEach(function(t){!0===e.modules[t]&&(e.modules[t]={})})});var r=Object.keys(n.modules).concat(Object.keys(t.modules)).reduce(function(e,t){var n=b.import("modules/"+t);return null==n?y.error("Cannot load "+t+" module. Are you sure you registered it?"):e[t]=n.DEFAULTS||{},e},{});return null!=t.modules&&t.modules.toolbar&&t.modules.toolbar.constructor!==Object&&(t.modules.toolbar={container:t.modules.toolbar}),t=(0,f.default)(!0,{},b.DEFAULTS,{modules:r},n,t),["bounds","container","scrollingContainer"].forEach(function(e){"string"==typeof t[e]&&(t[e]=document.querySelector(t[e]))}),t.modules=Object.keys(t.modules).reduce(function(e,n){return t.modules[n]&&(e[n]=t.modules[n]),e},{}),t}function x(e,t,n,r){if(this.options.strict&&!this.isEnabled()&&t===s.default.sources.USER)return new a.default;var i=null==n?null:this.getSelection(),o=this.editor.delta,l=e();if(null!=i&&(!0===n&&(n=i.index),null==r?i=E(i,l,t):0!==r&&(i=E(i,n,r,t)),this.setSelection(i,s.default.sources.SILENT)),l.length()>0){var u,c,d=[s.default.events.TEXT_CHANGE,l,o,t];(u=this.emitter).emit.apply(u,[s.default.events.EDITOR_CHANGE].concat(d)),t!==s.default.sources.SILENT&&(c=this.emitter).emit.apply(c,d)}return l}function _(e,t,n,i,o){var a={};return"number"==typeof e.index&&"number"==typeof e.length?("number"!=typeof t&&(o=i,i=n,n=t),t=e.length,e=e.index):"number"!=typeof t&&(o=i,i=n,n=t,t=0),(void 0===n?"undefined":r(n))==="object"?(a=n,o=i):"string"==typeof n&&(null!=i?a[n]=i:o=n),[e,t,a,o=o||s.default.sources.API]}function E(e,t,n,r){if(null==e)return null;var o=void 0,l=void 0;if(t instanceof a.default){var u=i([e.index,e.index+e.length].map(function(e){return t.transformPosition(e,r!==s.default.sources.USER)}),2);o=u[0],l=u[1]}else{var c=i([e.index,e.index+e.length].map(function(e){return e<t||e===t&&r===s.default.sources.USER?e:n>=0?e+n:Math.max(t,e+n)}),2);o=c[0],l=c[1]}return new d.Range(o,l-o)}b.DEFAULTS={bounds:null,formats:null,modules:{},placeholder:"",readOnly:!1,scrollingContainer:null,strict:!0,theme:"default"},b.events=s.default.events,b.sources=s.default.sources,b.version="1.3.7",b.imports={delta:a.default,parchment:c.default,"core/module":u.default,"core/theme":g.default},t.expandConfig=w,t.overload=_,t.default=b},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);if(null===o)return;return e(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},o=l(n(7)),a=l(n(0));function l(e){return e&&e.__esModule?e:{default:e}}var s=function(e){function t(){return function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"formatAt",value:function(e,n,r,o){if(0>t.compare(this.statics.blotName,r)&&a.default.query(r,a.default.Scope.BLOT)){var l=this.isolate(e,n);o&&l.wrap(r,o)}else i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"formatAt",this).call(this,e,n,r,o)}},{key:"optimize",value:function(e){if(i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"optimize",this).call(this,e),this.parent instanceof t&&t.compare(this.statics.blotName,this.parent.statics.blotName)>0){var n=this.parent.isolate(this.offset(),this.length());this.moveChildren(n),n.wrap(this)}}}],[{key:"compare",value:function(e,n){var r=t.order.indexOf(e),i=t.order.indexOf(n);return r>=0||i>=0?r-i:e===n?0:e<n?-1:1}}]),t}(a.default.Inline);s.allowedChildren=[s,a.default.Embed,o.default],s.order=["cursor","inline","underline","strike","italic","bold","script","link","code"],t.default=s},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r,i=function(e){function t(){return function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(((r=n(0))&&r.__esModule?r:{default:r}).default.Text);t.default=i},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);if(null===o)return;return e(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},o=a(n(54));function a(e){return e&&e.__esModule?e:{default:e}}var l=(0,a(n(10)).default)("quill:events");["selectionchange","mousedown","mouseup","click"].forEach(function(e){document.addEventListener(e,function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];[].slice.call(document.querySelectorAll(".ql-container")).forEach(function(e){if(e.__quill&&e.__quill.emitter){var n;(n=e.__quill.emitter).handleDOM.apply(n,t)}})})});var s=function(e){function t(){!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,t);var e=function(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.listeners={},e.on("error",l.error),e}return function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"emit",value:function(){l.log.apply(l,arguments),i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"emit",this).apply(this,arguments)}},{key:"handleDOM",value:function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];(this.listeners[e.type]||[]).forEach(function(t){var r=t.node,i=t.handler;(e.target===r||r.contains(e.target))&&i.apply(void 0,[e].concat(n))})}},{key:"listenDOM",value:function(e,t,n){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push({node:t,handler:n})}}]),t}(o.default);s.events={EDITOR_CHANGE:"editor-change",SCROLL_BEFORE_UPDATE:"scroll-before-update",SCROLL_OPTIMIZE:"scroll-optimize",SCROLL_UPDATE:"scroll-update",SELECTION_CHANGE:"selection-change",TEXT_CHANGE:"text-change"},s.sources={API:"api",SILENT:"silent",USER:"user"},t.default=s},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")})(this,e),this.quill=t,this.options=n};r.DEFAULTS={},t.default=r},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=["error","warn","log","info"],i="warn";function o(e){if(r.indexOf(e)<=r.indexOf(i)){for(var t,n=arguments.length,o=Array(n>1?n-1:0),a=1;a<n;a++)o[a-1]=arguments[a];(t=console)[e].apply(t,o)}}function a(e){return r.reduce(function(t,n){return t[n]=o.bind(console,n,e),t},{})}o.level=a.level=function(e){i=e},t.default=a},function(e,t,n){var r=Array.prototype.slice,i=n(52),o=n(53),a=e.exports=function(e,t,n){return n||(n={}),e===t||(e instanceof Date&&t instanceof Date?e.getTime()===t.getTime():e&&t&&("object"==typeof e||"object"==typeof t)?function(e,t,n){if(null==e||null==t||e.prototype!==t.prototype)return!1;if(o(e))return!!o(t)&&a(e=r.call(e),t=r.call(t),n);if(l(e)){if(!l(t)||e.length!==t.length)return!1;for(s=0;s<e.length;s++)if(e[s]!==t[s])return!1;return!0}try{var s,u,c=i(e),d=i(t)}catch(e){return!1}if(c.length!=d.length)return!1;for(c.sort(),d.sort(),s=c.length-1;s>=0;s--)if(c[s]!=d[s])return!1;for(s=c.length-1;s>=0;s--)if(!a(e[u=c[s]],t[u],n))return!1;return typeof e==typeof t}(e,t,n):n.strict?e===t:e==t)};function l(e){return!!e&&"object"==typeof e&&"number"==typeof e.length&&"function"==typeof e.copy&&"function"==typeof e.slice&&(!(e.length>0)||"number"==typeof e[0])}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),i=function(){function e(e,t,n){void 0===n&&(n={}),this.attrName=e,this.keyName=t;var i=r.Scope.TYPE&r.Scope.ATTRIBUTE;null!=n.scope?this.scope=n.scope&r.Scope.LEVEL|i:this.scope=r.Scope.ATTRIBUTE,null!=n.whitelist&&(this.whitelist=n.whitelist)}return e.keys=function(e){return[].map.call(e.attributes,function(e){return e.name})},e.prototype.add=function(e,t){return!!this.canAdd(e,t)&&(e.setAttribute(this.keyName,t),!0)},e.prototype.canAdd=function(e,t){return null!=r.query(e,r.Scope.BLOT&(this.scope|r.Scope.TYPE))&&(null==this.whitelist||("string"==typeof t?this.whitelist.indexOf(t.replace(/["']/g,""))>-1:this.whitelist.indexOf(t)>-1))},e.prototype.remove=function(e){e.removeAttribute(this.keyName)},e.prototype.value=function(e){var t=e.getAttribute(this.keyName);return this.canAdd(e,t)&&t?t:""},e}();t.default=i},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Code=void 0;var r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,l=e[Symbol.iterator]();!(r=(a=l.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&l.return&&l.return()}finally{if(i)throw o}}return n}(e,t);throw TypeError("Invalid attempt to destructure non-iterable instance")},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);if(null===o)return;return e(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},a=d(n(2)),l=d(n(0)),s=d(n(4)),u=d(n(6)),c=d(n(7));function d(e){return e&&e.__esModule?e:{default:e}}function h(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function f(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}function p(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var g=function(e){function t(){return h(this,t),f(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return p(t,e),t}(u.default);g.blotName="code",g.tagName="CODE";var m=function(e){function t(){return h(this,t),f(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return p(t,e),i(t,[{key:"delta",value:function(){var e=this,t=this.domNode.textContent;return t.endsWith("\n")&&(t=t.slice(0,-1)),t.split("\n").reduce(function(t,n){return t.insert(n).insert("\n",e.formats())},new a.default)}},{key:"format",value:function(e,n){if(e!==this.statics.blotName||!n){var i=r(this.descendant(c.default,this.length()-1),1)[0];null!=i&&i.deleteAt(i.length()-1,1),o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"format",this).call(this,e,n)}}},{key:"formatAt",value:function(e,n,r,i){if(0!==n&&null!=l.default.query(r,l.default.Scope.BLOCK)&&(r!==this.statics.blotName||i!==this.statics.formats(this.domNode))){var o=this.newlineIndex(e);if(!(o<0)&&!(o>=e+n)){var a=this.newlineIndex(e,!0)+1,s=o-a+1,u=this.isolate(a,s),c=u.next;u.format(r,i),c instanceof t&&c.formatAt(0,e-a+n-s,r,i)}}}},{key:"insertAt",value:function(e,t,n){if(null==n){var i=r(this.descendant(c.default,e),2),o=i[0],a=i[1];o.insertAt(a,t)}}},{key:"length",value:function(){var e=this.domNode.textContent.length;return this.domNode.textContent.endsWith("\n")?e:e+1}},{key:"newlineIndex",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(t)return this.domNode.textContent.slice(0,e).lastIndexOf("\n");var n=this.domNode.textContent.slice(e).indexOf("\n");return n>-1?e+n:-1}},{key:"optimize",value:function(e){this.domNode.textContent.endsWith("\n")||this.appendChild(l.default.create("text","\n")),o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"optimize",this).call(this,e);var n=this.next;null!=n&&n.prev===this&&n.statics.blotName===this.statics.blotName&&this.statics.formats(this.domNode)===n.statics.formats(n.domNode)&&(n.optimize(e),n.moveChildren(this),n.remove())}},{key:"replace",value:function(e){o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"replace",this).call(this,e),[].slice.call(this.domNode.querySelectorAll("*")).forEach(function(e){var t=l.default.find(e);null==t?e.parentNode.removeChild(e):t instanceof l.default.Embed?t.remove():t.unwrap()})}}],[{key:"create",value:function(e){var n=o(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,e);return n.setAttribute("spellcheck",!1),n}},{key:"formats",value:function(){return!0}}]),t}(s.default);m.blotName="code-block",m.tagName="PRE",m.TAB=" ",t.Code=g,t.default=m},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,l=e[Symbol.iterator]();!(r=(a=l.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&l.return&&l.return()}finally{if(i)throw o}}return n}(e,t);throw TypeError("Invalid attempt to destructure non-iterable instance")},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=v(n(2)),l=v(n(20)),s=v(n(0)),u=v(n(13)),c=v(n(24)),d=n(4),h=v(d),f=v(n(16)),p=v(n(21)),g=v(n(11)),m=v(n(3));function v(e){return e&&e.__esModule?e:{default:e}}var y=/^[ -~]*$/,b=function(){function e(t){(function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")})(this,e),this.scroll=t,this.delta=this.getDelta()}return o(e,[{key:"applyDelta",value:function(e){var t=this,n=!1;this.scroll.update();var o=this.scroll.length();return this.scroll.batchStart(),(e=e.reduce(function(e,t){if(1===t.insert){var n=(0,p.default)(t.attributes);return delete n.image,e.insert({image:t.attributes.image},n)}if(null!=t.attributes&&(!0===t.attributes.list||!0===t.attributes.bullet)&&((t=(0,p.default)(t)).attributes.list?t.attributes.list="ordered":(t.attributes.list="bullet",delete t.attributes.bullet)),"string"==typeof t.insert){var r=t.insert.replace(/\r\n/g,"\n").replace(/\r/g,"\n");return e.insert(r,t.attributes)}return e.push(t)},new a.default)).reduce(function(e,a){var u=a.retain||a.delete||a.insert.length||1,c=a.attributes||{};if(null!=a.insert){if("string"==typeof a.insert){var f=a.insert;f.endsWith("\n")&&n&&(n=!1,f=f.slice(0,-1)),e>=o&&!f.endsWith("\n")&&(n=!0),t.scroll.insertAt(e,f);var p=i(t.scroll.line(e),2),g=p[0],v=p[1],y=(0,m.default)({},(0,d.bubbleFormats)(g));if(g instanceof h.default){var b=i(g.descendant(s.default.Leaf,v),1)[0];y=(0,m.default)(y,(0,d.bubbleFormats)(b))}c=l.default.attributes.diff(y,c)||{}}else if("object"===r(a.insert)){var w=Object.keys(a.insert)[0];if(null==w)return e;t.scroll.insertAt(e,w,a.insert[w])}o+=u}return Object.keys(c).forEach(function(n){t.scroll.formatAt(e,u,n,c[n])}),e+u},0),e.reduce(function(e,n){return"number"==typeof n.delete?(t.scroll.deleteAt(e,n.delete),e):e+(n.retain||n.insert.length||1)},0),this.scroll.batchEnd(),this.update(e)}},{key:"deleteText",value:function(e,t){return this.scroll.deleteAt(e,t),this.update(new a.default().retain(e).delete(t))}},{key:"formatLine",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.scroll.update(),Object.keys(r).forEach(function(i){if(null==n.scroll.whitelist||n.scroll.whitelist[i]){var o=n.scroll.lines(e,Math.max(t,1)),a=t;o.forEach(function(t){var o=t.length();if(t instanceof u.default){var l=e-t.offset(n.scroll),s=t.newlineIndex(l+a)-l+1;t.formatAt(l,s,i,r[i])}else t.format(i,r[i]);a-=o})}}),this.scroll.optimize(),this.update(new a.default().retain(e).retain(t,(0,p.default)(r)))}},{key:"formatText",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Object.keys(r).forEach(function(i){n.scroll.formatAt(e,t,i,r[i])}),this.update(new a.default().retain(e).retain(t,(0,p.default)(r)))}},{key:"getContents",value:function(e,t){return this.delta.slice(e,e+t)}},{key:"getDelta",value:function(){return this.scroll.lines().reduce(function(e,t){return e.concat(t.delta())},new a.default)}},{key:"getFormat",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=[],r=[];0===t?this.scroll.path(e).forEach(function(e){var t=i(e,1)[0];t instanceof h.default?n.push(t):t instanceof s.default.Leaf&&r.push(t)}):(n=this.scroll.lines(e,t),r=this.scroll.descendants(s.default.Leaf,e,t));var o=[n,r].map(function(e){if(0===e.length)return{};for(var t=(0,d.bubbleFormats)(e.shift());Object.keys(t).length>0;){var n=e.shift();if(null==n)break;t=function(e,t){return Object.keys(t).reduce(function(n,r){return null==e[r]||(t[r]===e[r]?n[r]=t[r]:Array.isArray(t[r])?0>t[r].indexOf(e[r])&&(n[r]=t[r].concat([e[r]])):n[r]=[t[r],e[r]]),n},{})}((0,d.bubbleFormats)(n),t)}return t});return m.default.apply(m.default,o)}},{key:"getText",value:function(e,t){return this.getContents(e,t).filter(function(e){return"string"==typeof e.insert}).map(function(e){return e.insert}).join("")}},{key:"insertEmbed",value:function(e,t,n){var r;return this.scroll.insertAt(e,t,n),this.update(new a.default().retain(e).insert((t in(r={})?Object.defineProperty(r,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):r[t]=n,r)))}},{key:"insertText",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return t=t.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),this.scroll.insertAt(e,t),Object.keys(r).forEach(function(i){n.scroll.formatAt(e,t.length,i,r[i])}),this.update(new a.default().retain(e).insert(t,(0,p.default)(r)))}},{key:"isBlank",value:function(){if(0==this.scroll.children.length)return!0;if(this.scroll.children.length>1)return!1;var e=this.scroll.children.head;return e.statics.blotName===h.default.blotName&&!(e.children.length>1)&&e.children.head instanceof f.default}},{key:"removeFormat",value:function(e,t){var n=this.getText(e,t),r=i(this.scroll.line(e+t),2),o=r[0],l=r[1],s=0,c=new a.default;null!=o&&(s=o instanceof u.default?o.newlineIndex(l)-l+1:o.length()-l,c=o.delta().slice(l,l+s-1).insert("\n"));var d=this.getContents(e,t+s).diff(new a.default().insert(n).concat(c)),h=new a.default().retain(e).concat(d);return this.applyDelta(h)}},{key:"update",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,r=this.delta;if(1===t.length&&"characterData"===t[0].type&&t[0].target.data.match(y)&&s.default.find(t[0].target)){var i=s.default.find(t[0].target),o=(0,d.bubbleFormats)(i),l=i.offset(this.scroll),u=t[0].oldValue.replace(c.default.CONTENTS,""),h=new a.default().insert(u),f=new a.default().insert(i.value());e=new a.default().retain(l).concat(h.diff(f,n)).reduce(function(e,t){return t.insert?e.insert(t.insert,o):e.push(t)},new a.default),this.delta=r.compose(e)}else this.delta=this.getDelta(),e&&(0,g.default)(r.compose(e),this.delta)||(e=r.diff(this.delta,n));return e}}]),e}();t.default=b},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Range=void 0;var r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,l=e[Symbol.iterator]();!(r=(a=l.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&l.return&&l.return()}finally{if(i)throw o}}return n}(e,t);throw TypeError("Invalid attempt to destructure non-iterable instance")},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=u(n(0)),a=u(n(21)),l=u(n(11)),s=u(n(8));function u(e){return e&&e.__esModule?e:{default:e}}function c(e){if(!Array.isArray(e))return Array.from(e);for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}function d(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}var h=(0,u(n(10)).default)("quill:selection"),f=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;d(this,e),this.index=t,this.length=n},p=function(){function e(t,n){var r=this;d(this,e),this.emitter=n,this.scroll=t,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=o.default.create("cursor",this),this.lastRange=this.savedRange=new f(0,0),this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,function(){r.mouseDown||setTimeout(r.update.bind(r,s.default.sources.USER),1)}),this.emitter.on(s.default.events.EDITOR_CHANGE,function(e,t){e===s.default.events.TEXT_CHANGE&&t.length()>0&&r.update(s.default.sources.SILENT)}),this.emitter.on(s.default.events.SCROLL_BEFORE_UPDATE,function(){if(r.hasFocus()){var e=r.getNativeRange();null!=e&&e.start.node!==r.cursor.textNode&&r.emitter.once(s.default.events.SCROLL_UPDATE,function(){try{r.setNativeRange(e.start.node,e.start.offset,e.end.node,e.end.offset)}catch(e){}})}}),this.emitter.on(s.default.events.SCROLL_OPTIMIZE,function(e,t){if(t.range){var n=t.range,i=n.startNode,o=n.startOffset,a=n.endNode,l=n.endOffset;r.setNativeRange(i,o,a,l)}}),this.update(s.default.sources.SILENT)}return i(e,[{key:"handleComposition",value:function(){var e=this;this.root.addEventListener("compositionstart",function(){e.composing=!0}),this.root.addEventListener("compositionend",function(){if(e.composing=!1,e.cursor.parent){var t=e.cursor.restore();t&&setTimeout(function(){e.setNativeRange(t.startNode,t.startOffset,t.endNode,t.endOffset)},1)}})}},{key:"handleDragging",value:function(){var e=this;this.emitter.listenDOM("mousedown",document.body,function(){e.mouseDown=!0}),this.emitter.listenDOM("mouseup",document.body,function(){e.mouseDown=!1,e.update(s.default.sources.USER)})}},{key:"focus",value:function(){this.hasFocus()||(this.root.focus(),this.setRange(this.savedRange))}},{key:"format",value:function(e,t){if(null==this.scroll.whitelist||this.scroll.whitelist[e]){this.scroll.update();var n=this.getNativeRange();if(!(null==n||!n.native.collapsed||o.default.query(e,o.default.Scope.BLOCK))){if(n.start.node!==this.cursor.textNode){var r=o.default.find(n.start.node,!1);if(null==r)return;if(r instanceof o.default.Leaf){var i=r.split(n.start.offset);r.parent.insertBefore(this.cursor,i)}else r.insertBefore(this.cursor,n.start.node);this.cursor.attach()}this.cursor.format(e,t),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}}},{key:"getBounds",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.scroll.length();t=Math.min((e=Math.min(e,n-1))+t,n-1)-e;var i=void 0,o=r(this.scroll.leaf(e),2),a=o[0],l=o[1];if(null==a)return null;var s=r(a.position(l,!0),2);i=s[0],l=s[1];var u=document.createRange();if(t>0){u.setStart(i,l);var c=r(this.scroll.leaf(e+t),2);if(a=c[0],l=c[1],null==a)return null;var d=r(a.position(l,!0),2);return i=d[0],l=d[1],u.setEnd(i,l),u.getBoundingClientRect()}var h="left",f=void 0;return i instanceof Text?(l<i.data.length?(u.setStart(i,l),u.setEnd(i,l+1)):(u.setStart(i,l-1),u.setEnd(i,l),h="right"),f=u.getBoundingClientRect()):(f=a.domNode.getBoundingClientRect(),l>0&&(h="right")),{bottom:f.top+f.height,height:f.height,left:f[h],right:f[h],top:f.top,width:0}}},{key:"getNativeRange",value:function(){var e=document.getSelection();if(null==e||e.rangeCount<=0)return null;var t=e.getRangeAt(0);if(null==t)return null;var n=this.normalizeNative(t);return h.info("getNativeRange",n),n}},{key:"getRange",value:function(){var e=this.getNativeRange();return null==e?[null,null]:[this.normalizedToRange(e),e]}},{key:"hasFocus",value:function(){return document.activeElement===this.root}},{key:"normalizedToRange",value:function(e){var t=this,n=[[e.start.node,e.start.offset]];e.native.collapsed||n.push([e.end.node,e.end.offset]);var i=n.map(function(e){var n=r(e,2),i=n[0],a=n[1],l=o.default.find(i,!0),s=l.offset(t.scroll);return 0===a?s:l instanceof o.default.Container?s+l.length():s+l.index(i,a)}),a=Math.min(Math.max.apply(Math,c(i)),this.scroll.length()-1),l=Math.min.apply(Math,[a].concat(c(i)));return new f(l,a-l)}},{key:"normalizeNative",value:function(e){if(!g(this.root,e.startContainer)||!e.collapsed&&!g(this.root,e.endContainer))return null;var t={start:{node:e.startContainer,offset:e.startOffset},end:{node:e.endContainer,offset:e.endOffset},native:e};return[t.start,t.end].forEach(function(e){for(var t=e.node,n=e.offset;!(t instanceof Text)&&t.childNodes.length>0;)if(t.childNodes.length>n)t=t.childNodes[n],n=0;else if(t.childNodes.length===n)n=(t=t.lastChild)instanceof Text?t.data.length:t.childNodes.length+1;else break;e.node=t,e.offset=n}),t}},{key:"rangeToNative",value:function(e){var t=this,n=e.collapsed?[e.index]:[e.index,e.index+e.length],i=[],o=this.scroll.length();return n.forEach(function(e,n){e=Math.min(o-1,e);var a=void 0,l=r(t.scroll.leaf(e),2),s=l[0],u=l[1],c=r(s.position(u,0!==n),2);a=c[0],u=c[1],i.push(a,u)}),i.length<2&&(i=i.concat(i)),i}},{key:"scrollIntoView",value:function(e){var t=this.lastRange;if(null!=t){var n=this.getBounds(t.index,t.length);if(null!=n){var i=this.scroll.length()-1,o=r(this.scroll.line(Math.min(t.index,i)),1)[0],a=o;if(t.length>0&&(a=r(this.scroll.line(Math.min(t.index+t.length,i)),1)[0]),null!=o&&null!=a){var l=e.getBoundingClientRect();n.top<l.top?e.scrollTop-=l.top-n.top:n.bottom>l.bottom&&(e.scrollTop+=n.bottom-l.bottom)}}}}},{key:"setNativeRange",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t,i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(h.info("setNativeRange",e,t,n,r),null==e||null!=this.root.parentNode&&null!=e.parentNode&&null!=n.parentNode){var o=document.getSelection();if(null!=o){if(null!=e){this.hasFocus()||this.root.focus();var a=(this.getNativeRange()||{}).native;if(null==a||i||e!==a.startContainer||t!==a.startOffset||n!==a.endContainer||r!==a.endOffset){"BR"==e.tagName&&(t=[].indexOf.call(e.parentNode.childNodes,e),e=e.parentNode),"BR"==n.tagName&&(r=[].indexOf.call(n.parentNode.childNodes,n),n=n.parentNode);var l=document.createRange();l.setStart(e,t),l.setEnd(n,r),o.removeAllRanges(),o.addRange(l)}}else o.removeAllRanges(),this.root.blur(),document.body.focus()}}}},{key:"setRange",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:s.default.sources.API;if("string"==typeof t&&(n=t,t=!1),h.info("setRange",e),null!=e){var r=this.rangeToNative(e);this.setNativeRange.apply(this,c(r).concat([t]))}else this.setNativeRange(null);this.update(n)}},{key:"update",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s.default.sources.USER,t=this.lastRange,n=r(this.getRange(),2),i=n[0],o=n[1];if(this.lastRange=i,null!=this.lastRange&&(this.savedRange=this.lastRange),!(0,l.default)(t,this.lastRange)){!this.composing&&null!=o&&o.native.collapsed&&o.start.node!==this.cursor.textNode&&this.cursor.restore();var u,c,d=[s.default.events.SELECTION_CHANGE,(0,a.default)(this.lastRange),(0,a.default)(t),e];(u=this.emitter).emit.apply(u,[s.default.events.EDITOR_CHANGE].concat(d)),e!==s.default.sources.SILENT&&(c=this.emitter).emit.apply(c,d)}}}]),e}();function g(e,t){try{t.parentNode}catch(e){return!1}return t instanceof Text&&(t=t.parentNode),e.contains(t)}t.Range=f,t.default=p},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r,i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);if(null===o)return;return e(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},a=function(e){function t(){return function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"insertInto",value:function(e,n){0===e.children.length?o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertInto",this).call(this,e,n):this.remove()}},{key:"length",value:function(){return 0}},{key:"value",value:function(){return""}}],[{key:"value",value:function(){}}]),t}(((r=n(0))&&r.__esModule?r:{default:r}).default.Embed);a.blotName="break",a.tagName="BR",t.default=a},function(e,t,n){var r,i=this&&this.__extends||(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(44),a=n(30),l=n(1),s=function(e){function t(t){var n=e.call(this,t)||this;return n.build(),n}return i(t,e),t.prototype.appendChild=function(e){this.insertBefore(e)},t.prototype.attach=function(){e.prototype.attach.call(this),this.children.forEach(function(e){e.attach()})},t.prototype.build=function(){var e=this;this.children=new o.default,[].slice.call(this.domNode.childNodes).reverse().forEach(function(t){try{var n=u(t);e.insertBefore(n,e.children.head||void 0)}catch(e){if(e instanceof l.ParchmentError)return;throw e}})},t.prototype.deleteAt=function(e,t){if(0===e&&t===this.length())return this.remove();this.children.forEachAt(e,t,function(e,t,n){e.deleteAt(t,n)})},t.prototype.descendant=function(e,n){var r=this.children.find(n),i=r[0],o=r[1];return null==e.blotName&&e(i)||null!=e.blotName&&i instanceof e?[i,o]:i instanceof t?i.descendant(e,o):[null,-1]},t.prototype.descendants=function(e,n,r){void 0===n&&(n=0),void 0===r&&(r=Number.MAX_VALUE);var i=[],o=r;return this.children.forEachAt(n,r,function(n,r,a){(null==e.blotName&&e(n)||null!=e.blotName&&n instanceof e)&&i.push(n),n instanceof t&&(i=i.concat(n.descendants(e,r,o))),o-=a}),i},t.prototype.detach=function(){this.children.forEach(function(e){e.detach()}),e.prototype.detach.call(this)},t.prototype.formatAt=function(e,t,n,r){this.children.forEachAt(e,t,function(e,t,i){e.formatAt(t,i,n,r)})},t.prototype.insertAt=function(e,t,n){var r=this.children.find(e),i=r[0],o=r[1];if(i)i.insertAt(o,t,n);else{var a=null==n?l.create("text",t):l.create(t,n);this.appendChild(a)}},t.prototype.insertBefore=function(e,t){if(null!=this.statics.allowedChildren&&!this.statics.allowedChildren.some(function(t){return e instanceof t}))throw new l.ParchmentError("Cannot insert "+e.statics.blotName+" into "+this.statics.blotName);e.insertInto(this,t)},t.prototype.length=function(){return this.children.reduce(function(e,t){return e+t.length()},0)},t.prototype.moveChildren=function(e,t){this.children.forEach(function(n){e.insertBefore(n,t)})},t.prototype.optimize=function(t){if(e.prototype.optimize.call(this,t),0===this.children.length){if(null!=this.statics.defaultChild){var n=l.create(this.statics.defaultChild);this.appendChild(n),n.optimize(t)}else this.remove()}},t.prototype.path=function(e,n){void 0===n&&(n=!1);var r=this.children.find(e,n),i=r[0],o=r[1],a=[[this,e]];return i instanceof t?a.concat(i.path(o,n)):(null!=i&&a.push([i,o]),a)},t.prototype.removeChild=function(e){this.children.remove(e)},t.prototype.replace=function(n){n instanceof t&&n.moveChildren(this),e.prototype.replace.call(this,n)},t.prototype.split=function(e,t){if(void 0===t&&(t=!1),!t){if(0===e)return this;if(e===this.length())return this.next}var n=this.clone();return this.parent.insertBefore(n,this.next),this.children.forEachAt(e,this.length(),function(e,r,i){e=e.split(r,t),n.appendChild(e)}),n},t.prototype.unwrap=function(){this.moveChildren(this.parent,this.next),this.remove()},t.prototype.update=function(e,t){var n=this,r=[],i=[];e.forEach(function(e){e.target===n.domNode&&"childList"===e.type&&(r.push.apply(r,e.addedNodes),i.push.apply(i,e.removedNodes))}),i.forEach(function(e){if(!(null!=e.parentNode&&"IFRAME"!==e.tagName&&document.body.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY)){var t=l.find(e);null!=t&&(null==t.domNode.parentNode||t.domNode.parentNode===n.domNode)&&t.detach()}}),r.filter(function(e){return e.parentNode==n.domNode}).sort(function(e,t){return e===t?0:e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1}).forEach(function(e){var t=null;null!=e.nextSibling&&(t=l.find(e.nextSibling));var r=u(e);(r.next!=t||null==r.next)&&(null!=r.parent&&r.parent.removeChild(n),n.insertBefore(r,t||void 0))})},t}(a.default);function u(e){var t=l.find(e);if(null==t)try{t=l.create(e)}catch(n){t=l.create(l.Scope.INLINE),[].slice.call(e.childNodes).forEach(function(e){t.domNode.appendChild(e)}),e.parentNode&&e.parentNode.replaceChild(t.domNode,e),t.attach()}return t}t.default=s},function(e,t,n){var r,i=this&&this.__extends||(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(12),a=n(31),l=n(17),s=n(1),u=function(e){function t(t){var n=e.call(this,t)||this;return n.attributes=new a.default(n.domNode),n}return i(t,e),t.formats=function(e){return"string"==typeof this.tagName||(Array.isArray(this.tagName)?e.tagName.toLowerCase():void 0)},t.prototype.format=function(e,t){var n=s.query(e);n instanceof o.default?this.attributes.attribute(n,t):t&&null!=n&&(e!==this.statics.blotName||this.formats()[e]!==t)&&this.replaceWith(e,t)},t.prototype.formats=function(){var e=this.attributes.values(),t=this.statics.formats(this.domNode);return null!=t&&(e[this.statics.blotName]=t),e},t.prototype.replaceWith=function(t,n){var r=e.prototype.replaceWith.call(this,t,n);return this.attributes.copy(r),r},t.prototype.update=function(t,n){var r=this;e.prototype.update.call(this,t,n),t.some(function(e){return e.target===r.domNode&&"attributes"===e.type})&&this.attributes.build()},t.prototype.wrap=function(n,r){var i=e.prototype.wrap.call(this,n,r);return i instanceof t&&i.statics.scope===this.statics.scope&&this.attributes.move(i),i},t}(l.default);t.default=u},function(e,t,n){var r,i=this&&this.__extends||(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(30),a=n(1),l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.value=function(e){return!0},t.prototype.index=function(e,t){return this.domNode===e||this.domNode.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(t,1):-1},t.prototype.position=function(e,t){var n=[].indexOf.call(this.parent.domNode.childNodes,this.domNode);return e>0&&(n+=1),[this.parent.domNode,n]},t.prototype.value=function(){var e;return(e={})[this.statics.blotName]=this.statics.value(this.domNode)||!0,e},t.scope=a.Scope.INLINE_BLOT,t}(o.default);t.default=l},function(e,t,n){var r=n(11),i=n(3),o={attributes:{compose:function(e,t,n){"object"!=typeof e&&(e={}),"object"!=typeof t&&(t={});var r=i(!0,{},t);for(var o in n||(r=Object.keys(r).reduce(function(e,t){return null!=r[t]&&(e[t]=r[t]),e},{})),e)void 0!==e[o]&&void 0===t[o]&&(r[o]=e[o]);return Object.keys(r).length>0?r:void 0},diff:function(e,t){"object"!=typeof e&&(e={}),"object"!=typeof t&&(t={});var n=Object.keys(e).concat(Object.keys(t)).reduce(function(n,i){return r(e[i],t[i])||(n[i]=void 0===t[i]?null:t[i]),n},{});return Object.keys(n).length>0?n:void 0},transform:function(e,t,n){if("object"!=typeof e)return t;if("object"==typeof t){if(!n)return t;var r=Object.keys(t).reduce(function(n,r){return void 0===e[r]&&(n[r]=t[r]),n},{});return Object.keys(r).length>0?r:void 0}}},iterator:function(e){return new a(e)},length:function(e){return"number"==typeof e.delete?e.delete:"number"==typeof e.retain?e.retain:"string"==typeof e.insert?e.insert.length:1}};function a(e){this.ops=e,this.index=0,this.offset=0}a.prototype.hasNext=function(){return this.peekLength()<1/0},a.prototype.next=function(e){e||(e=1/0);var t=this.ops[this.index];if(!t)return{retain:1/0};var n=this.offset,r=o.length(t);if(e>=r-n?(e=r-n,this.index+=1,this.offset=0):this.offset+=e,"number"==typeof t.delete)return{delete:e};var i={};return t.attributes&&(i.attributes=t.attributes),"number"==typeof t.retain?i.retain=e:"string"==typeof t.insert?i.insert=t.insert.substr(n,e):i.insert=t.insert,i},a.prototype.peek=function(){return this.ops[this.index]},a.prototype.peekLength=function(){return this.ops[this.index]?o.length(this.ops[this.index])-this.offset:1/0},a.prototype.peekType=function(){if(this.ops[this.index]){if("number"==typeof this.ops[this.index].delete)return"delete";if("number"!=typeof this.ops[this.index].retain)return"insert"}return"retain"},a.prototype.rest=function(){if(!this.hasNext())return[];if(0===this.offset)return this.ops.slice(this.index);var e=this.offset,t=this.index,n=this.next(),r=this.ops.slice(this.index);return this.offset=e,this.index=t,[n].concat(r)},e.exports=o},function(e,t){var n=function(){var e,t,n;function r(e,t){return null!=t&&e instanceof t}try{e=Map}catch(t){e=function(){}}try{t=Set}catch(e){t=function(){}}try{n=Promise}catch(e){n=function(){}}function i(o,l,s,u,c){"object"==typeof l&&(s=l.depth,u=l.prototype,c=l.includeNonEnumerable,l=l.circular);var d=[],h=[];return void 0===l&&(l=!0),void 0===s&&(s=1/0),function o(s,f){if(null===s)return null;if(0===f||"object"!=typeof s)return s;if(r(s,e))p=new e;else if(r(s,t))p=new t;else if(r(s,n))p=new n(function(e,t){s.then(function(t){e(o(t,f-1))},function(e){t(o(e,f-1))})});else if(i.__isArray(s))p=[];else if(i.__isRegExp(s))p=new RegExp(s.source,a(s)),s.lastIndex&&(p.lastIndex=s.lastIndex);else if(i.__isDate(s))p=new Date(s.getTime());else{if(om.isBuffer(s))return p=om.allocUnsafe?om.allocUnsafe(s.length):new om(s.length),s.copy(p),p;r(s,Error)?p=Object.create(s):void 0===u?p=Object.create(g=Object.getPrototypeOf(s)):(p=Object.create(u),g=u)}if(l){var p,g,m,v=d.indexOf(s);if(-1!=v)return h[v];d.push(s),h.push(p)}for(var y in r(s,e)&&s.forEach(function(e,t){var n=o(t,f-1),r=o(e,f-1);p.set(n,r)}),r(s,t)&&s.forEach(function(e){var t=o(e,f-1);p.add(t)}),s)g&&(m=Object.getOwnPropertyDescriptor(g,y)),m&&null==m.set||(p[y]=o(s[y],f-1));if(Object.getOwnPropertySymbols)for(var b=Object.getOwnPropertySymbols(s),y=0;y<b.length;y++){var w=b[y],x=Object.getOwnPropertyDescriptor(s,w);(!x||x.enumerable||c)&&(p[w]=o(s[w],f-1),x.enumerable||Object.defineProperty(p,w,{enumerable:!1}))}if(c)for(var _=Object.getOwnPropertyNames(s),y=0;y<_.length;y++){var E=_[y],x=Object.getOwnPropertyDescriptor(s,E);x&&x.enumerable||(p[E]=o(s[E],f-1),Object.defineProperty(p,E,{enumerable:!1}))}return p}(o,s)}function o(e){return Object.prototype.toString.call(e)}function a(e){var t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),t}return i.clonePrototype=function(e){if(null===e)return null;var t=function(){};return t.prototype=e,new t},i.__objToStr=o,i.__isDate=function(e){return"object"==typeof e&&"[object Date]"===o(e)},i.__isArray=function(e){return"object"==typeof e&&"[object Array]"===o(e)},i.__isRegExp=function(e){return"object"==typeof e&&"[object RegExp]"===o(e)},i.__getRegExpFlags=a,i}();"object"==typeof e&&e.exports&&(e.exports=n)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,l=e[Symbol.iterator]();!(r=(a=l.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&l.return&&l.return()}finally{if(i)throw o}}return n}(e,t);throw TypeError("Invalid attempt to destructure non-iterable instance")},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);if(null===o)return;return e(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},a=f(n(0)),l=f(n(8)),s=n(4),u=f(s),c=f(n(16)),d=f(n(13)),h=f(n(25));function f(e){return e&&e.__esModule?e:{default:e}}function p(e){return e instanceof u.default||e instanceof s.BlockEmbed}var g=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r.emitter=n.emitter,Array.isArray(n.whitelist)&&(r.whitelist=n.whitelist.reduce(function(e,t){return e[t]=!0,e},{})),r.domNode.addEventListener("DOMNodeInserted",function(){}),r.optimize(),r.enable(),r}return function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"batchStart",value:function(){this.batch=!0}},{key:"batchEnd",value:function(){this.batch=!1,this.optimize()}},{key:"deleteAt",value:function(e,n){var i=r(this.line(e),2),a=i[0],l=i[1],u=r(this.line(e+n),1)[0];if(o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"deleteAt",this).call(this,e,n),null!=u&&a!==u&&l>0){if(a instanceof s.BlockEmbed||u instanceof s.BlockEmbed){this.optimize();return}if(a instanceof d.default){var h=a.newlineIndex(a.length(),!0);if(h>-1&&(a=a.split(h+1))===u){this.optimize();return}}else if(u instanceof d.default){var f=u.newlineIndex(0);f>-1&&u.split(f+1)}var p=u.children.head instanceof c.default?null:u.children.head;a.moveChildren(u,p),a.remove()}this.optimize()}},{key:"enable",value:function(){var e=!(arguments.length>0)||void 0===arguments[0]||arguments[0];this.domNode.setAttribute("contenteditable",e)}},{key:"formatAt",value:function(e,n,r,i){(null==this.whitelist||this.whitelist[r])&&(o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"formatAt",this).call(this,e,n,r,i),this.optimize())}},{key:"insertAt",value:function(e,n,r){if(null==r||null==this.whitelist||this.whitelist[n]){if(e>=this.length()){if(null==r||null==a.default.query(n,a.default.Scope.BLOCK)){var i=a.default.create(this.statics.defaultChild);this.appendChild(i),null==r&&n.endsWith("\n")&&(n=n.slice(0,-1)),i.insertAt(0,n,r)}else{var l=a.default.create(n,r);this.appendChild(l)}}else o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertAt",this).call(this,e,n,r);this.optimize()}}},{key:"insertBefore",value:function(e,n){if(e.statics.scope===a.default.Scope.INLINE_BLOT){var r=a.default.create(this.statics.defaultChild);r.appendChild(e),e=r}o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertBefore",this).call(this,e,n)}},{key:"leaf",value:function(e){return this.path(e).pop()||[null,-1]}},{key:"line",value:function(e){return e===this.length()?this.line(e-1):this.descendant(p,e)}},{key:"lines",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE;return function e(t,n,r){var i=[],o=r;return t.children.forEachAt(n,r,function(t,n,r){p(t)?i.push(t):t instanceof a.default.Container&&(i=i.concat(e(t,n,o))),o-=r}),i}(this,e,t)}},{key:"optimize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!0!==this.batch&&(o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"optimize",this).call(this,e,n),e.length>0&&this.emitter.emit(l.default.events.SCROLL_OPTIMIZE,e,n))}},{key:"path",value:function(e){return o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"path",this).call(this,e).slice(1)}},{key:"update",value:function(e){if(!0!==this.batch){var n=l.default.sources.USER;"string"==typeof e&&(n=e),Array.isArray(e)||(e=this.observer.takeRecords()),e.length>0&&this.emitter.emit(l.default.events.SCROLL_BEFORE_UPDATE,n,e),o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"update",this).call(this,e.concat([])),e.length>0&&this.emitter.emit(l.default.events.SCROLL_UPDATE,n,e)}}}]),t}(a.default.Scroll);g.blotName="scroll",g.className="ql-editor",g.tagName="DIV",g.defaultChild="block",g.allowedChildren=[u.default,s.BlockEmbed,h.default],t.default=g},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.SHORTKEY=t.default=void 0;var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,l=e[Symbol.iterator]();!(r=(a=l.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&l.return&&l.return()}finally{if(i)throw o}}return n}(e,t);throw TypeError("Invalid attempt to destructure non-iterable instance")},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=g(n(21)),l=g(n(11)),s=g(n(3)),u=g(n(2)),c=g(n(20)),d=g(n(0)),h=g(n(5)),f=g(n(10)),p=g(n(9));function g(e){return e&&e.__esModule?e:{default:e}}function m(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var v=(0,f.default)("quill:keyboard"),y=/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey",b=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r.bindings={},Object.keys(r.options.bindings).forEach(function(t){("list autofill"!==t||null==e.scroll.whitelist||e.scroll.whitelist.list)&&r.options.bindings[t]&&r.addBinding(r.options.bindings[t])}),r.addBinding({key:t.keys.ENTER,shiftKey:null},S),r.addBinding({key:t.keys.ENTER,metaKey:null,ctrlKey:null,altKey:null},function(){}),/Firefox/i.test(navigator.userAgent)?(r.addBinding({key:t.keys.BACKSPACE},{collapsed:!0},x),r.addBinding({key:t.keys.DELETE},{collapsed:!0},_)):(r.addBinding({key:t.keys.BACKSPACE},{collapsed:!0,prefix:/^.?$/},x),r.addBinding({key:t.keys.DELETE},{collapsed:!0,suffix:/^.?$/},_)),r.addBinding({key:t.keys.BACKSPACE},{collapsed:!1},E),r.addBinding({key:t.keys.DELETE},{collapsed:!1},E),r.addBinding({key:t.keys.BACKSPACE,altKey:null,ctrlKey:null,metaKey:null,shiftKey:null},{collapsed:!0,offset:0},x),r.listen(),r}return function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,null,[{key:"match",value:function(e,t){return t=k(t),!["altKey","ctrlKey","metaKey","shiftKey"].some(function(n){return!!t[n]!==e[n]&&null!==t[n]})&&t.key===(e.which||e.keyCode)}}]),o(t,[{key:"addBinding",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=k(e);if(null==r||null==r.key)return v.warn("Attempted to add invalid keyboard binding",r);"function"==typeof t&&(t={handler:t}),"function"==typeof n&&(n={handler:n}),r=(0,s.default)(r,t,n),this.bindings[r.key]=this.bindings[r.key]||[],this.bindings[r.key].push(r)}},{key:"listen",value:function(){var e=this;this.quill.root.addEventListener("keydown",function(n){if(!n.defaultPrevented){var o=n.which||n.keyCode,a=(e.bindings[o]||[]).filter(function(e){return t.match(n,e)});if(0!==a.length){var s=e.quill.getSelection();if(null!=s&&e.quill.hasFocus()){var u=i(e.quill.getLine(s.index),2),c=u[0],h=u[1],f=i(e.quill.getLeaf(s.index),2),p=f[0],g=f[1],m=i(0===s.length?[p,g]:e.quill.getLeaf(s.index+s.length),2),v=m[0],y=m[1],b=p instanceof d.default.Text?p.value().slice(0,g):"",w=v instanceof d.default.Text?v.value().slice(y):"",x={collapsed:0===s.length,empty:0===s.length&&1>=c.length(),format:e.quill.getFormat(s),offset:h,prefix:b,suffix:w};a.some(function(t){if(null!=t.collapsed&&t.collapsed!==x.collapsed||null!=t.empty&&t.empty!==x.empty||null!=t.offset&&t.offset!==x.offset)return!1;if(Array.isArray(t.format)){if(t.format.every(function(e){return null==x.format[e]}))return!1}else if("object"===r(t.format)&&!Object.keys(t.format).every(function(e){return!0===t.format[e]?null!=x.format[e]:!1===t.format[e]?null==x.format[e]:(0,l.default)(t.format[e],x.format[e])}))return!1;return!!((null==t.prefix||t.prefix.test(x.prefix))&&(null==t.suffix||t.suffix.test(x.suffix)))&&!0!==t.handler.call(e,s,x)})&&n.preventDefault()}}}})}}]),t}(p.default);function w(e,t){var n,r=e===b.keys.LEFT?"prefix":"suffix";return m(n={key:e,shiftKey:t,altKey:null},r,/^$/),m(n,"handler",function(n){var r=n.index;return e===b.keys.RIGHT&&(r+=n.length+1),!(i(this.quill.getLeaf(r),1)[0]instanceof d.default.Embed)||(e===b.keys.LEFT?t?this.quill.setSelection(n.index-1,n.length+1,h.default.sources.USER):this.quill.setSelection(n.index-1,h.default.sources.USER):t?this.quill.setSelection(n.index,n.length+1,h.default.sources.USER):this.quill.setSelection(n.index+n.length+1,h.default.sources.USER),!1)}),n}function x(e,t){if(!(0===e.index||1>=this.quill.getLength())){var n=i(this.quill.getLine(e.index),1)[0],r={};if(0===t.offset){var o=i(this.quill.getLine(e.index-1),1)[0];if(null!=o&&o.length()>1){var a=n.formats(),l=this.quill.getFormat(e.index-1,1);r=c.default.attributes.diff(a,l)||{}}}var s=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(t.prefix)?2:1;this.quill.deleteText(e.index-s,s,h.default.sources.USER),Object.keys(r).length>0&&this.quill.formatLine(e.index-s,s,r,h.default.sources.USER),this.quill.focus()}}function _(e,t){var n=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(t.suffix)?2:1;if(!(e.index>=this.quill.getLength()-n)){var r={},o=0,a=i(this.quill.getLine(e.index),1)[0];if(t.offset>=a.length()-1){var l=i(this.quill.getLine(e.index+1),1)[0];if(l){var s=a.formats(),u=this.quill.getFormat(e.index,1);r=c.default.attributes.diff(s,u)||{},o=l.length()}}this.quill.deleteText(e.index,n,h.default.sources.USER),Object.keys(r).length>0&&this.quill.formatLine(e.index+o-1,n,r,h.default.sources.USER)}}function E(e){var t=this.quill.getLines(e),n={};if(t.length>1){var r=t[0].formats(),i=t[t.length-1].formats();n=c.default.attributes.diff(i,r)||{}}this.quill.deleteText(e,h.default.sources.USER),Object.keys(n).length>0&&this.quill.formatLine(e.index,1,n,h.default.sources.USER),this.quill.setSelection(e.index,h.default.sources.SILENT),this.quill.focus()}function S(e,t){var n=this;e.length>0&&this.quill.scroll.deleteAt(e.index,e.length);var r=Object.keys(t.format).reduce(function(e,n){return d.default.query(n,d.default.Scope.BLOCK)&&!Array.isArray(t.format[n])&&(e[n]=t.format[n]),e},{});this.quill.insertText(e.index,"\n",r,h.default.sources.USER),this.quill.setSelection(e.index+1,h.default.sources.SILENT),this.quill.focus(),Object.keys(t.format).forEach(function(e){null!=r[e]||Array.isArray(t.format[e])||"link"===e||n.quill.format(e,t.format[e],h.default.sources.USER)})}function C(e){return{key:b.keys.TAB,shiftKey:!e,format:{"code-block":!0},handler:function(t){var n=d.default.query("code-block"),r=t.index,o=t.length,a=i(this.quill.scroll.descendant(n,r),2),l=a[0],s=a[1];if(null!=l){var u=this.quill.getIndex(l),c=l.newlineIndex(s,!0)+1,f=l.newlineIndex(u+s+o),p=l.domNode.textContent.slice(c,f).split("\n");s=0,p.forEach(function(t,i){e?(l.insertAt(c+s,n.TAB),s+=n.TAB.length,0===i?r+=n.TAB.length:o+=n.TAB.length):t.startsWith(n.TAB)&&(l.deleteAt(c+s,n.TAB.length),s-=n.TAB.length,0===i?r-=n.TAB.length:o-=n.TAB.length),s+=t.length+1}),this.quill.update(h.default.sources.USER),this.quill.setSelection(r,o,h.default.sources.SILENT)}}}}function O(e){return{key:e[0].toUpperCase(),shortKey:!0,handler:function(t,n){this.quill.format(e,!n.format[e],h.default.sources.USER)}}}function k(e){if("string"==typeof e||"number"==typeof e)return k({key:e});if((void 0===e?"undefined":r(e))==="object"&&(e=(0,a.default)(e,!1)),"string"==typeof e.key){if(null!=b.keys[e.key.toUpperCase()])e.key=b.keys[e.key.toUpperCase()];else{if(1!==e.key.length)return null;e.key=e.key.toUpperCase().charCodeAt(0)}}return e.shortKey&&(e[y]=e.shortKey,delete e.shortKey),e}b.keys={BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},b.DEFAULTS={bindings:{bold:O("bold"),italic:O("italic"),underline:O("underline"),indent:{key:b.keys.TAB,format:["blockquote","indent","list"],handler:function(e,t){if(t.collapsed&&0!==t.offset)return!0;this.quill.format("indent","+1",h.default.sources.USER)}},outdent:{key:b.keys.TAB,shiftKey:!0,format:["blockquote","indent","list"],handler:function(e,t){if(t.collapsed&&0!==t.offset)return!0;this.quill.format("indent","-1",h.default.sources.USER)}},"outdent backspace":{key:b.keys.BACKSPACE,collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler:function(e,t){null!=t.format.indent?this.quill.format("indent","-1",h.default.sources.USER):null!=t.format.list&&this.quill.format("list",!1,h.default.sources.USER)}},"indent code-block":C(!0),"outdent code-block":C(!1),"remove tab":{key:b.keys.TAB,shiftKey:!0,collapsed:!0,prefix:/\t$/,handler:function(e){this.quill.deleteText(e.index-1,1,h.default.sources.USER)}},tab:{key:b.keys.TAB,handler:function(e){this.quill.history.cutoff();var t=new u.default().retain(e.index).delete(e.length).insert(" ");this.quill.updateContents(t,h.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(e.index+1,h.default.sources.SILENT)}},"list empty enter":{key:b.keys.ENTER,collapsed:!0,format:["list"],empty:!0,handler:function(e,t){this.quill.format("list",!1,h.default.sources.USER),t.format.indent&&this.quill.format("indent",!1,h.default.sources.USER)}},"checklist enter":{key:b.keys.ENTER,collapsed:!0,format:{list:"checked"},handler:function(e){var t=i(this.quill.getLine(e.index),2),n=t[0],r=t[1],o=(0,s.default)({},n.formats(),{list:"checked"}),a=new u.default().retain(e.index).insert("\n",o).retain(n.length()-r-1).retain(1,{list:"unchecked"});this.quill.updateContents(a,h.default.sources.USER),this.quill.setSelection(e.index+1,h.default.sources.SILENT),this.quill.scrollIntoView()}},"header enter":{key:b.keys.ENTER,collapsed:!0,format:["header"],suffix:/^$/,handler:function(e,t){var n=i(this.quill.getLine(e.index),2),r=n[0],o=n[1],a=new u.default().retain(e.index).insert("\n",t.format).retain(r.length()-o-1).retain(1,{header:null});this.quill.updateContents(a,h.default.sources.USER),this.quill.setSelection(e.index+1,h.default.sources.SILENT),this.quill.scrollIntoView()}},"list autofill":{key:" ",collapsed:!0,format:{list:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler:function(e,t){var n=t.prefix.length,r=i(this.quill.getLine(e.index),2),o=r[0],a=r[1];if(a>n)return!0;var l=void 0;switch(t.prefix.trim()){case"[]":case"[ ]":l="unchecked";break;case"[x]":l="checked";break;case"-":case"*":l="bullet";break;default:l="ordered"}this.quill.insertText(e.index," ",h.default.sources.USER),this.quill.history.cutoff();var s=new u.default().retain(e.index-a).delete(n+1).retain(o.length()-2-a).retain(1,{list:l});this.quill.updateContents(s,h.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(e.index-n,h.default.sources.SILENT)}},"code exit":{key:b.keys.ENTER,collapsed:!0,format:["code-block"],prefix:/\n\n$/,suffix:/^\s+$/,handler:function(e){var t=i(this.quill.getLine(e.index),2),n=t[0],r=t[1],o=new u.default().retain(e.index+n.length()-r-2).retain(1,{"code-block":null}).delete(1);this.quill.updateContents(o,h.default.sources.USER)}},"embed left":w(b.keys.LEFT,!1),"embed left shift":w(b.keys.LEFT,!0),"embed right":w(b.keys.RIGHT,!1),"embed right shift":w(b.keys.RIGHT,!0)}},t.default=b,t.SHORTKEY=y},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,l=e[Symbol.iterator]();!(r=(a=l.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&l.return&&l.return()}finally{if(i)throw o}}return n}(e,t);throw TypeError("Invalid attempt to destructure non-iterable instance")},i=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);if(null===o)return;return e(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=s(n(0)),l=s(n(7));function s(e){return e&&e.__esModule?e:{default:e}}var u=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r.selection=n,r.textNode=document.createTextNode(t.CONTENTS),r.domNode.appendChild(r.textNode),r._length=0,r}return function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,null,[{key:"value",value:function(){}}]),o(t,[{key:"detach",value:function(){null!=this.parent&&this.parent.removeChild(this)}},{key:"format",value:function(e,n){if(0!==this._length)return i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"format",this).call(this,e,n);for(var r=this,o=0;null!=r&&r.statics.scope!==a.default.Scope.BLOCK_BLOT;)o+=r.offset(r.parent),r=r.parent;null!=r&&(this._length=t.CONTENTS.length,r.optimize(),r.formatAt(o,t.CONTENTS.length,e,n),this._length=0)}},{key:"index",value:function(e,n){return e===this.textNode?0:i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"index",this).call(this,e,n)}},{key:"length",value:function(){return this._length}},{key:"position",value:function(){return[this.textNode,this.textNode.data.length]}},{key:"remove",value:function(){i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"remove",this).call(this),this.parent=null}},{key:"restore",value:function(){if(!this.selection.composing&&null!=this.parent){var e=this.textNode,n=this.selection.getNativeRange(),i=void 0,o=void 0,s=void 0;if(null!=n&&n.start.node===e&&n.end.node===e){var u=[e,n.start.offset,n.end.offset];i=u[0],o=u[1],s=u[2]}for(;null!=this.domNode.lastChild&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode);if(this.textNode.data!==t.CONTENTS){var c=this.textNode.data.split(t.CONTENTS).join("");this.next instanceof l.default?(i=this.next.domNode,this.next.insertAt(0,c),this.textNode.data=t.CONTENTS):(this.textNode.data=c,this.parent.insertBefore(a.default.create(this.textNode),this),this.textNode=document.createTextNode(t.CONTENTS),this.domNode.appendChild(this.textNode))}if(this.remove(),null!=o){var d=r([o,s].map(function(e){return Math.max(0,Math.min(i.data.length,e-1))}),2);return o=d[0],s=d[1],{startNode:i,startOffset:o,endNode:i,endOffset:s}}}}},{key:"update",value:function(e,t){var n=this;if(e.some(function(e){return"characterData"===e.type&&e.target===n.textNode})){var r=this.restore();r&&(t.range=r)}}},{key:"value",value:function(){return""}}]),t}(a.default.Embed);u.blotName="cursor",u.className="ql-cursor",u.tagName="span",u.CONTENTS="\uFEFF",t.default=u},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=a(n(0)),i=n(4),o=a(i);function a(e){return e&&e.__esModule?e:{default:e}}var l=function(e){function t(){return function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(r.default.Container);l.allowedChildren=[o.default,i.BlockEmbed,l],t.default=l},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.ColorStyle=t.ColorClass=t.ColorAttributor=void 0;var r,i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);if(null===o)return;return e(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},a=(r=n(0))&&r.__esModule?r:{default:r},l=function(e){function t(){return function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"value",value:function(e){var n=o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"value",this).call(this,e);return n.startsWith("rgb(")?"#"+(n=n.replace(/^[^\d]+/,"").replace(/[^\d]+$/,"")).split(",").map(function(e){return("00"+parseInt(e).toString(16)).slice(-2)}).join(""):n}}]),t}(a.default.Attributor.Style),s=new a.default.Attributor.Class("color","ql-color",{scope:a.default.Scope.INLINE}),u=new l("color","color",{scope:a.default.Scope.INLINE});t.ColorAttributor=l,t.ColorClass=s,t.ColorStyle=u},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.sanitize=t.default=void 0;var r,i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);if(null===o)return;return e(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},a=function(e){function t(){return function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"format",value:function(e,n){if(e!==this.statics.blotName||!n)return o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"format",this).call(this,e,n);n=this.constructor.sanitize(n),this.domNode.setAttribute("href",n)}}],[{key:"create",value:function(e){var n=o(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,e);return e=this.sanitize(e),n.setAttribute("href",e),n.setAttribute("rel","noopener noreferrer"),n.setAttribute("target","_blank"),n}},{key:"formats",value:function(e){return e.getAttribute("href")}},{key:"sanitize",value:function(e){return l(e,this.PROTOCOL_WHITELIST)?e:this.SANITIZED_URL}}]),t}(((r=n(6))&&r.__esModule?r:{default:r}).default);function l(e,t){var n=document.createElement("a");n.href=e;var r=n.href.slice(0,n.href.indexOf(":"));return t.indexOf(r)>-1}a.blotName="link",a.tagName="A",a.SANITIZED_URL="about:blank",a.PROTOCOL_WHITELIST=["http","https","mailto","tel"],t.default=a,t.sanitize=l},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=l(n(23)),a=l(n(107));function l(e){return e&&e.__esModule?e:{default:e}}var s=0;function u(e,t){e.setAttribute(t,"true"!==e.getAttribute(t))}var c=function(){function e(t){var n=this;(function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")})(this,e),this.select=t,this.container=document.createElement("span"),this.buildPicker(),this.select.style.display="none",this.select.parentNode.insertBefore(this.container,this.select),this.label.addEventListener("mousedown",function(){n.togglePicker()}),this.label.addEventListener("keydown",function(e){switch(e.keyCode){case o.default.keys.ENTER:n.togglePicker();break;case o.default.keys.ESCAPE:n.escape(),e.preventDefault()}}),this.select.addEventListener("change",this.update.bind(this))}return i(e,[{key:"togglePicker",value:function(){this.container.classList.toggle("ql-expanded"),u(this.label,"aria-expanded"),u(this.options,"aria-hidden")}},{key:"buildItem",value:function(e){var t=this,n=document.createElement("span");return n.tabIndex="0",n.setAttribute("role","button"),n.classList.add("ql-picker-item"),e.hasAttribute("value")&&n.setAttribute("data-value",e.getAttribute("value")),e.textContent&&n.setAttribute("data-label",e.textContent),n.addEventListener("click",function(){t.selectItem(n,!0)}),n.addEventListener("keydown",function(e){switch(e.keyCode){case o.default.keys.ENTER:t.selectItem(n,!0),e.preventDefault();break;case o.default.keys.ESCAPE:t.escape(),e.preventDefault()}}),n}},{key:"buildLabel",value:function(){var e=document.createElement("span");return e.classList.add("ql-picker-label"),e.innerHTML=a.default,e.tabIndex="0",e.setAttribute("role","button"),e.setAttribute("aria-expanded","false"),this.container.appendChild(e),e}},{key:"buildOptions",value:function(){var e=this,t=document.createElement("span");t.classList.add("ql-picker-options"),t.setAttribute("aria-hidden","true"),t.tabIndex="-1",t.id="ql-picker-options-"+s,s+=1,this.label.setAttribute("aria-controls",t.id),this.options=t,[].slice.call(this.select.options).forEach(function(n){var r=e.buildItem(n);t.appendChild(r),!0===n.selected&&e.selectItem(r)}),this.container.appendChild(t)}},{key:"buildPicker",value:function(){var e=this;[].slice.call(this.select.attributes).forEach(function(t){e.container.setAttribute(t.name,t.value)}),this.container.classList.add("ql-picker"),this.label=this.buildLabel(),this.buildOptions()}},{key:"escape",value:function(){var e=this;this.close(),setTimeout(function(){return e.label.focus()},1)}},{key:"close",value:function(){this.container.classList.remove("ql-expanded"),this.label.setAttribute("aria-expanded","false"),this.options.setAttribute("aria-hidden","true")}},{key:"selectItem",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.container.querySelector(".ql-selected");if(e!==n&&(null!=n&&n.classList.remove("ql-selected"),null!=e&&(e.classList.add("ql-selected"),this.select.selectedIndex=[].indexOf.call(e.parentNode.children,e),e.hasAttribute("data-value")?this.label.setAttribute("data-value",e.getAttribute("data-value")):this.label.removeAttribute("data-value"),e.hasAttribute("data-label")?this.label.setAttribute("data-label",e.getAttribute("data-label")):this.label.removeAttribute("data-label"),t))){if("function"==typeof Event)this.select.dispatchEvent(new Event("change"));else if(("undefined"==typeof Event?"undefined":r(Event))==="object"){var i=document.createEvent("Event");i.initEvent("change",!0,!0),this.select.dispatchEvent(i)}this.close()}}},{key:"update",value:function(){var e=void 0;if(this.select.selectedIndex>-1){var t=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];e=this.select.options[this.select.selectedIndex],this.selectItem(t)}else this.selectItem(null);var n=null!=e&&e!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",n)}}]),e}();t.default=c},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=v(n(0)),i=v(n(5)),o=n(4),a=v(o),l=v(n(16)),s=v(n(25)),u=v(n(24)),c=v(n(35)),d=v(n(6)),h=v(n(22)),f=v(n(7)),p=v(n(55)),g=v(n(42)),m=v(n(23));function v(e){return e&&e.__esModule?e:{default:e}}i.default.register({"blots/block":a.default,"blots/block/embed":o.BlockEmbed,"blots/break":l.default,"blots/container":s.default,"blots/cursor":u.default,"blots/embed":c.default,"blots/inline":d.default,"blots/scroll":h.default,"blots/text":f.default,"modules/clipboard":p.default,"modules/history":g.default,"modules/keyboard":m.default}),r.default.register(a.default,l.default,u.default,d.default,h.default,f.default),t.default=i.default},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),i=function(){function e(e){this.domNode=e,this.domNode[r.DATA_KEY]={blot:this}}return Object.defineProperty(e.prototype,"statics",{get:function(){return this.constructor},enumerable:!0,configurable:!0}),e.create=function(e){var t;if(null==this.tagName)throw new r.ParchmentError("Blot definition missing tagName");return Array.isArray(this.tagName)?("string"==typeof e&&parseInt(e=e.toUpperCase()).toString()===e&&(e=parseInt(e)),t="number"==typeof e?document.createElement(this.tagName[e-1]):this.tagName.indexOf(e)>-1?document.createElement(e):document.createElement(this.tagName[0])):t=document.createElement(this.tagName),this.className&&t.classList.add(this.className),t},e.prototype.attach=function(){null!=this.parent&&(this.scroll=this.parent.scroll)},e.prototype.clone=function(){var e=this.domNode.cloneNode(!1);return r.create(e)},e.prototype.detach=function(){null!=this.parent&&this.parent.removeChild(this),delete this.domNode[r.DATA_KEY]},e.prototype.deleteAt=function(e,t){this.isolate(e,t).remove()},e.prototype.formatAt=function(e,t,n,i){var o=this.isolate(e,t);if(null!=r.query(n,r.Scope.BLOT)&&i)o.wrap(n,i);else if(null!=r.query(n,r.Scope.ATTRIBUTE)){var a=r.create(this.statics.scope);o.wrap(a),a.format(n,i)}},e.prototype.insertAt=function(e,t,n){var i=null==n?r.create("text",t):r.create(t,n),o=this.split(e);this.parent.insertBefore(i,o)},e.prototype.insertInto=function(e,t){void 0===t&&(t=null),null!=this.parent&&this.parent.children.remove(this);var n=null;e.children.insertBefore(this,t),null!=t&&(n=t.domNode),(this.domNode.parentNode!=e.domNode||this.domNode.nextSibling!=n)&&e.domNode.insertBefore(this.domNode,n),this.parent=e,this.attach()},e.prototype.isolate=function(e,t){var n=this.split(e);return n.split(t),n},e.prototype.length=function(){return 1},e.prototype.offset=function(e){return(void 0===e&&(e=this.parent),null==this.parent||this==e)?0:this.parent.children.offset(this)+this.parent.offset(e)},e.prototype.optimize=function(e){null!=this.domNode[r.DATA_KEY]&&delete this.domNode[r.DATA_KEY].mutations},e.prototype.remove=function(){null!=this.domNode.parentNode&&this.domNode.parentNode.removeChild(this.domNode),this.detach()},e.prototype.replace=function(e){null!=e.parent&&(e.parent.insertBefore(this,e.next),e.remove())},e.prototype.replaceWith=function(e,t){var n="string"==typeof e?r.create(e,t):e;return n.replace(this),n},e.prototype.split=function(e,t){return 0===e?this:this.next},e.prototype.update=function(e,t){},e.prototype.wrap=function(e,t){var n="string"==typeof e?r.create(e,t):e;return null!=this.parent&&this.parent.insertBefore(n,this.next),n.appendChild(this),n},e.blotName="abstract",e}();t.default=i},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=n(12),i=n(32),o=n(33),a=n(1),l=function(){function e(e){this.attributes={},this.domNode=e,this.build()}return e.prototype.attribute=function(e,t){t?e.add(this.domNode,t)&&(null!=e.value(this.domNode)?this.attributes[e.attrName]=e:delete this.attributes[e.attrName]):(e.remove(this.domNode),delete this.attributes[e.attrName])},e.prototype.build=function(){var e=this;this.attributes={};var t=r.default.keys(this.domNode),n=i.default.keys(this.domNode),l=o.default.keys(this.domNode);t.concat(n).concat(l).forEach(function(t){var n=a.query(t,a.Scope.ATTRIBUTE);n instanceof r.default&&(e.attributes[n.attrName]=n)})},e.prototype.copy=function(e){var t=this;Object.keys(this.attributes).forEach(function(n){var r=t.attributes[n].value(t.domNode);e.format(n,r)})},e.prototype.move=function(e){var t=this;this.copy(e),Object.keys(this.attributes).forEach(function(e){t.attributes[e].remove(t.domNode)}),this.attributes={}},e.prototype.values=function(){var e=this;return Object.keys(this.attributes).reduce(function(t,n){return t[n]=e.attributes[n].value(e.domNode),t},{})},e}();t.default=l},function(e,t,n){var r,i=this&&this.__extends||(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});function o(e,t){return(e.getAttribute("class")||"").split(/\s+/).filter(function(e){return 0===e.indexOf(t+"-")})}Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.keys=function(e){return(e.getAttribute("class")||"").split(/\s+/).map(function(e){return e.split("-").slice(0,-1).join("-")})},t.prototype.add=function(e,t){return!!this.canAdd(e,t)&&(this.remove(e),e.classList.add(this.keyName+"-"+t),!0)},t.prototype.remove=function(e){o(e,this.keyName).forEach(function(t){e.classList.remove(t)}),0===e.classList.length&&e.removeAttribute("class")},t.prototype.value=function(e){var t=(o(e,this.keyName)[0]||"").slice(this.keyName.length+1);return this.canAdd(e,t)?t:""},t}(n(12).default);t.default=a},function(e,t,n){var r,i=this&&this.__extends||(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});function o(e){var t=e.split("-"),n=t.slice(1).map(function(e){return e[0].toUpperCase()+e.slice(1)}).join("");return t[0]+n}Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.keys=function(e){return(e.getAttribute("style")||"").split(";").map(function(e){return e.split(":")[0].trim()})},t.prototype.add=function(e,t){return!!this.canAdd(e,t)&&(e.style[o(this.keyName)]=t,!0)},t.prototype.remove=function(e){e.style[o(this.keyName)]="",e.getAttribute("style")||e.removeAttribute("style")},t.prototype.value=function(e){var t=e.style[o(this.keyName)];return this.canAdd(e,t)?t:""},t}(n(12).default);t.default=a},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function(){function e(t,n){(function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")})(this,e),this.quill=t,this.options=n,this.modules={}}return r(e,[{key:"init",value:function(){var e=this;Object.keys(this.options.modules).forEach(function(t){null==e.modules[t]&&e.addModule(t)})}},{key:"addModule",value:function(e){var t=this.quill.constructor.import("modules/"+e);return this.modules[e]=new t(this.quill,this.options.modules[e]||{}),this.modules[e]}}]),e}();i.DEFAULTS={modules:{}},i.themes={default:i},t.default=i},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);if(null===o)return;return e(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},o=l(n(0)),a=l(n(7));function l(e){return e&&e.__esModule?e:{default:e}}var s=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.contentNode=document.createElement("span"),n.contentNode.setAttribute("contenteditable",!1),[].slice.call(n.domNode.childNodes).forEach(function(e){n.contentNode.appendChild(e)}),n.leftGuard=document.createTextNode("\uFEFF"),n.rightGuard=document.createTextNode("\uFEFF"),n.domNode.appendChild(n.leftGuard),n.domNode.appendChild(n.contentNode),n.domNode.appendChild(n.rightGuard),n}return function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"index",value:function(e,n){return e===this.leftGuard?0:e===this.rightGuard?1:i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"index",this).call(this,e,n)}},{key:"restore",value:function(e){var t=void 0,n=void 0,r=e.data.split("\uFEFF").join("");if(e===this.leftGuard){if(this.prev instanceof a.default){var i=this.prev.length();this.prev.insertAt(i,r),t={startNode:this.prev.domNode,startOffset:i+r.length}}else n=document.createTextNode(r),this.parent.insertBefore(o.default.create(n),this),t={startNode:n,startOffset:r.length}}else e===this.rightGuard&&(this.next instanceof a.default?(this.next.insertAt(0,r),t={startNode:this.next.domNode,startOffset:r.length}):(n=document.createTextNode(r),this.parent.insertBefore(o.default.create(n),this.next),t={startNode:n,startOffset:r.length}));return e.data="\uFEFF",t}},{key:"update",value:function(e,t){var n=this;e.forEach(function(e){if("characterData"===e.type&&(e.target===n.leftGuard||e.target===n.rightGuard)){var r=n.restore(e.target);r&&(t.range=r)}})}}]),t}(o.default.Embed);t.default=s},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.AlignStyle=t.AlignClass=t.AlignAttribute=void 0;var r,i=(r=n(0))&&r.__esModule?r:{default:r},o={scope:i.default.Scope.BLOCK,whitelist:["right","center","justify"]},a=new i.default.Attributor.Attribute("align","align",o),l=new i.default.Attributor.Class("align","ql-align",o),s=new i.default.Attributor.Style("align","text-align",o);t.AlignAttribute=a,t.AlignClass=l,t.AlignStyle=s},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.BackgroundStyle=t.BackgroundClass=void 0;var r,i=(r=n(0))&&r.__esModule?r:{default:r},o=n(26),a=new i.default.Attributor.Class("background","ql-bg",{scope:i.default.Scope.INLINE}),l=new o.ColorAttributor("background","background-color",{scope:i.default.Scope.INLINE});t.BackgroundClass=a,t.BackgroundStyle=l},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.DirectionStyle=t.DirectionClass=t.DirectionAttribute=void 0;var r,i=(r=n(0))&&r.__esModule?r:{default:r},o={scope:i.default.Scope.BLOCK,whitelist:["rtl"]},a=new i.default.Attributor.Attribute("direction","dir",o),l=new i.default.Attributor.Class("direction","ql-direction",o),s=new i.default.Attributor.Style("direction","direction",o);t.DirectionAttribute=a,t.DirectionClass=l,t.DirectionStyle=s},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.FontClass=t.FontStyle=void 0;var r,i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);if(null===o)return;return e(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},a=(r=n(0))&&r.__esModule?r:{default:r},l={scope:a.default.Scope.INLINE,whitelist:["serif","monospace"]},s=new a.default.Attributor.Class("font","ql-font",l),u=new(function(e){function t(){return function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"value",value:function(e){return o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"value",this).call(this,e).replace(/["']/g,"")}}]),t}(a.default.Attributor.Style))("font","font-family",l);t.FontStyle=u,t.FontClass=s},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.SizeStyle=t.SizeClass=void 0;var r,i=(r=n(0))&&r.__esModule?r:{default:r},o=new i.default.Attributor.Class("size","ql-size",{scope:i.default.Scope.INLINE,whitelist:["small","large","huge"]}),a=new i.default.Attributor.Style("size","font-size",{scope:i.default.Scope.INLINE,whitelist:["10px","18px","32px"]});t.SizeClass=o,t.SizeStyle=a},function(e,t,n){e.exports={align:{"":n(76),center:n(77),right:n(78),justify:n(79)},background:n(80),blockquote:n(81),bold:n(82),clean:n(83),code:n(58),"code-block":n(58),color:n(84),direction:{"":n(85),rtl:n(86)},float:{center:n(87),full:n(88),left:n(89),right:n(90)},formula:n(91),header:{1:n(92),2:n(93)},italic:n(94),image:n(95),indent:{"+1":n(96),"-1":n(97)},link:n(98),list:{ordered:n(99),bullet:n(100),check:n(101)},script:{sub:n(102),super:n(103)},strike:n(104),underline:n(105),video:n(106)}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.getLastChangeIndex=t.default=void 0;var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=a(n(0)),o=a(n(5));function a(e){return e&&e.__esModule?e:{default:e}}var l=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r.lastRecorded=0,r.ignoreChange=!1,r.clear(),r.quill.on(o.default.events.EDITOR_CHANGE,function(e,t,n,i){e!==o.default.events.TEXT_CHANGE||r.ignoreChange||(r.options.userOnly&&i!==o.default.sources.USER?r.transform(t):r.record(t,n))}),r.quill.keyboard.addBinding({key:"Z",shortKey:!0},r.undo.bind(r)),r.quill.keyboard.addBinding({key:"Z",shortKey:!0,shiftKey:!0},r.redo.bind(r)),/Win/i.test(navigator.platform)&&r.quill.keyboard.addBinding({key:"Y",shortKey:!0},r.redo.bind(r)),r}return function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"change",value:function(e,t){if(0!==this.stack[e].length){var n=this.stack[e].pop();this.stack[t].push(n),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(n[e],o.default.sources.USER),this.ignoreChange=!1;var r=s(n[e]);this.quill.setSelection(r)}}},{key:"clear",value:function(){this.stack={undo:[],redo:[]}}},{key:"cutoff",value:function(){this.lastRecorded=0}},{key:"record",value:function(e,t){if(0!==e.ops.length){this.stack.redo=[];var n=this.quill.getContents().diff(t),r=Date.now();if(this.lastRecorded+this.options.delay>r&&this.stack.undo.length>0){var i=this.stack.undo.pop();n=n.compose(i.undo),e=i.redo.compose(e)}else this.lastRecorded=r;this.stack.undo.push({redo:e,undo:n}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift()}}},{key:"redo",value:function(){this.change("redo","undo")}},{key:"transform",value:function(e){this.stack.undo.forEach(function(t){t.undo=e.transform(t.undo,!0),t.redo=e.transform(t.redo,!0)}),this.stack.redo.forEach(function(t){t.undo=e.transform(t.undo,!0),t.redo=e.transform(t.redo,!0)})}},{key:"undo",value:function(){this.change("undo","redo")}}]),t}(a(n(9)).default);function s(e){var t,n=e.reduce(function(e,t){return e+(t.delete||0)},0),r=e.length()-n;return null!=(t=e.ops[e.ops.length-1])&&(null!=t.insert?"string"==typeof t.insert&&t.insert.endsWith("\n"):null!=t.attributes&&Object.keys(t.attributes).some(function(e){return null!=i.default.query(e,i.default.Scope.BLOCK)}))&&(r-=1),r}l.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1},t.default=l,t.getLastChangeIndex=s},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.BaseTooltip=void 0;var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);if(null===o)return;return e(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},o=p(n(3)),a=p(n(2)),l=p(n(8)),s=p(n(23)),u=p(n(34)),c=p(n(59)),d=p(n(60)),h=p(n(28)),f=p(n(61));function p(e){return e&&e.__esModule?e:{default:e}}function g(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function m(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}function v(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var y=[!1,"center","right","justify"],b=["#000000","#e60000","#ff9900","#ffff00","#008a00","#0066cc","#9933ff","#ffffff","#facccc","#ffebcc","#ffffcc","#cce8cc","#cce0f5","#ebd6ff","#bbbbbb","#f06666","#ffc266","#ffff66","#66b966","#66a3e0","#c285ff","#888888","#a10000","#b26b00","#b2b200","#006100","#0047b2","#6b24b2","#444444","#5c0000","#663d00","#666600","#003700","#002966","#3d1466"],w=[!1,"serif","monospace"],x=["1","2","3",!1],_=["small",!1,"large","huge"],E=function(e){function t(e,n){g(this,t);var r=m(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return e.emitter.listenDOM("click",document.body,function t(n){if(!document.body.contains(e.root))return document.body.removeEventListener("click",t);null==r.tooltip||r.tooltip.root.contains(n.target)||document.activeElement===r.tooltip.textbox||r.quill.hasFocus()||r.tooltip.hide(),null!=r.pickers&&r.pickers.forEach(function(e){e.container.contains(n.target)||e.close()})}),r}return v(t,e),r(t,[{key:"addModule",value:function(e){var n=i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"addModule",this).call(this,e);return"toolbar"===e&&this.extendToolbar(n),n}},{key:"buildButtons",value:function(e,t){e.forEach(function(e){(e.getAttribute("class")||"").split(/\s+/).forEach(function(n){if(n.startsWith("ql-")&&null!=t[n=n.slice(3)]){if("direction"===n)e.innerHTML=t[n][""]+t[n].rtl;else if("string"==typeof t[n])e.innerHTML=t[n];else{var r=e.value||"";null!=r&&t[n][r]&&(e.innerHTML=t[n][r])}}})})}},{key:"buildPickers",value:function(e,t){var n=this;this.pickers=e.map(function(e){if(e.classList.contains("ql-align"))return null==e.querySelector("option")&&C(e,y),new d.default(e,t.align);if(!(e.classList.contains("ql-background")||e.classList.contains("ql-color")))return null==e.querySelector("option")&&(e.classList.contains("ql-font")?C(e,w):e.classList.contains("ql-header")?C(e,x):e.classList.contains("ql-size")&&C(e,_)),new h.default(e);var n=e.classList.contains("ql-background")?"background":"color";return null==e.querySelector("option")&&C(e,b,"background"===n?"#ffffff":"#000000"),new c.default(e,t[n])}),this.quill.on(l.default.events.EDITOR_CHANGE,function(){n.pickers.forEach(function(e){e.update()})})}}]),t}(u.default);E.DEFAULTS=(0,o.default)(!0,{},u.default.DEFAULTS,{modules:{toolbar:{handlers:{formula:function(){this.quill.theme.tooltip.edit("formula")},image:function(){var e=this,t=this.container.querySelector("input.ql-image[type=file]");null==t&&((t=document.createElement("input")).setAttribute("type","file"),t.setAttribute("accept","image/png, image/gif, image/jpeg, image/bmp, image/x-icon"),t.classList.add("ql-image"),t.addEventListener("change",function(){if(null!=t.files&&null!=t.files[0]){var n=new FileReader;n.onload=function(n){var r=e.quill.getSelection(!0);e.quill.updateContents(new a.default().retain(r.index).delete(r.length).insert({image:n.target.result}),l.default.sources.USER),e.quill.setSelection(r.index+1,l.default.sources.SILENT),t.value=""},n.readAsDataURL(t.files[0])}}),this.container.appendChild(t)),t.click()},video:function(){this.quill.theme.tooltip.edit("video")}}}}});var S=function(e){function t(e,n){g(this,t);var r=m(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r.textbox=r.root.querySelector('input[type="text"]'),r.listen(),r}return v(t,e),r(t,[{key:"listen",value:function(){var e=this;this.textbox.addEventListener("keydown",function(t){s.default.match(t,"enter")?(e.save(),t.preventDefault()):s.default.match(t,"escape")&&(e.cancel(),t.preventDefault())})}},{key:"cancel",value:function(){this.hide()}},{key:"edit",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"link",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),null!=t?this.textbox.value=t:e!==this.root.getAttribute("data-mode")&&(this.textbox.value=""),this.position(this.quill.getBounds(this.quill.selection.savedRange)),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute("data-"+e)||""),this.root.setAttribute("data-mode",e)}},{key:"restoreFocus",value:function(){var e=this.quill.scrollingContainer.scrollTop;this.quill.focus(),this.quill.scrollingContainer.scrollTop=e}},{key:"save",value:function(){var e,t,n=this.textbox.value;switch(this.root.getAttribute("data-mode")){case"link":var r=this.quill.root.scrollTop;this.linkRange?(this.quill.formatText(this.linkRange,"link",n,l.default.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",n,l.default.sources.USER)),this.quill.root.scrollTop=r;break;case"video":n=(t=(e=n).match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||e.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/))?(t[1]||"https")+"://www.youtube.com/embed/"+t[2]+"?showinfo=0":(t=e.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?(t[1]||"https")+"://player.vimeo.com/video/"+t[2]+"/":e;case"formula":if(!n)break;var i=this.quill.getSelection(!0);if(null!=i){var o=i.index+i.length;this.quill.insertEmbed(o,this.root.getAttribute("data-mode"),n,l.default.sources.USER),"formula"===this.root.getAttribute("data-mode")&&this.quill.insertText(o+1," ",l.default.sources.USER),this.quill.setSelection(o+2,l.default.sources.USER)}}this.textbox.value="",this.hide()}}]),t}(f.default);function C(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];t.forEach(function(t){var r=document.createElement("option");t===n?r.setAttribute("selected","selected"):r.setAttribute("value",t),e.appendChild(r)})}t.BaseTooltip=S,t.default=E},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(){this.head=this.tail=null,this.length=0}return e.prototype.append=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.insertBefore(e[0],null),e.length>1&&this.append.apply(this,e.slice(1))},e.prototype.contains=function(e){for(var t,n=this.iterator();t=n();)if(t===e)return!0;return!1},e.prototype.insertBefore=function(e,t){e&&(e.next=t,null!=t?(e.prev=t.prev,null!=t.prev&&(t.prev.next=e),t.prev=e,t===this.head&&(this.head=e)):null!=this.tail?(this.tail.next=e,e.prev=this.tail,this.tail=e):(e.prev=null,this.head=this.tail=e),this.length+=1)},e.prototype.offset=function(e){for(var t=0,n=this.head;null!=n;){if(n===e)return t;t+=n.length(),n=n.next}return -1},e.prototype.remove=function(e){this.contains(e)&&(null!=e.prev&&(e.prev.next=e.next),null!=e.next&&(e.next.prev=e.prev),e===this.head&&(this.head=e.next),e===this.tail&&(this.tail=e.prev),this.length-=1)},e.prototype.iterator=function(e){return void 0===e&&(e=this.head),function(){var t=e;return null!=e&&(e=e.next),t}},e.prototype.find=function(e,t){void 0===t&&(t=!1);for(var n,r=this.iterator();n=r();){var i=n.length();if(e<i||t&&e===i&&(null==n.next||0!==n.next.length()))return[n,e];e-=i}return[null,0]},e.prototype.forEach=function(e){for(var t,n=this.iterator();t=n();)e(t)},e.prototype.forEachAt=function(e,t,n){if(!(t<=0))for(var r,i=this.find(e),o=i[0],a=e-i[1],l=this.iterator(o);(r=l())&&a<e+t;){var s=r.length();e>a?n(r,e-a,Math.min(t,a+s-e)):n(r,0,Math.min(s,e+t-a)),a+=s}},e.prototype.map=function(e){return this.reduce(function(t,n){return t.push(e(n)),t},[])},e.prototype.reduce=function(e,t){for(var n,r=this.iterator();n=r();)t=e(t,n);return t},e}();t.default=r},function(e,t,n){var r,i=this&&this.__extends||(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(17),a=n(1),l={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},s=function(e){function t(t){var n=e.call(this,t)||this;return n.scroll=n,n.observer=new MutationObserver(function(e){n.update(e)}),n.observer.observe(n.domNode,l),n.attach(),n}return i(t,e),t.prototype.detach=function(){e.prototype.detach.call(this),this.observer.disconnect()},t.prototype.deleteAt=function(t,n){this.update(),0===t&&n===this.length()?this.children.forEach(function(e){e.remove()}):e.prototype.deleteAt.call(this,t,n)},t.prototype.formatAt=function(t,n,r,i){this.update(),e.prototype.formatAt.call(this,t,n,r,i)},t.prototype.insertAt=function(t,n,r){this.update(),e.prototype.insertAt.call(this,t,n,r)},t.prototype.optimize=function(t,n){var r=this;void 0===t&&(t=[]),void 0===n&&(n={}),e.prototype.optimize.call(this,n);for(var i=[].slice.call(this.observer.takeRecords());i.length>0;)t.push(i.pop());for(var l=function(e,t){void 0===t&&(t=!0),null!=e&&e!==r&&null!=e.domNode.parentNode&&(null==e.domNode[a.DATA_KEY].mutations&&(e.domNode[a.DATA_KEY].mutations=[]),t&&l(e.parent))},s=function(e){null!=e.domNode[a.DATA_KEY]&&null!=e.domNode[a.DATA_KEY].mutations&&(e instanceof o.default&&e.children.forEach(s),e.optimize(n))},u=t,c=0;u.length>0;c+=1){if(c>=100)throw Error("[Parchment] Maximum optimize iterations reached");for(u.forEach(function(e){var t=a.find(e.target,!0);null!=t&&(t.domNode===e.target&&("childList"===e.type?(l(a.find(e.previousSibling,!1)),[].forEach.call(e.addedNodes,function(e){var t=a.find(e,!1);l(t,!1),t instanceof o.default&&t.children.forEach(function(e){l(e,!1)})})):"attributes"===e.type&&l(t.prev)),l(t))}),this.children.forEach(s),i=(u=[].slice.call(this.observer.takeRecords())).slice();i.length>0;)t.push(i.pop())}},t.prototype.update=function(t,n){var r=this;void 0===n&&(n={}),(t=t||this.observer.takeRecords()).map(function(e){var t=a.find(e.target,!0);return null==t?null:null==t.domNode[a.DATA_KEY].mutations?(t.domNode[a.DATA_KEY].mutations=[e],t):(t.domNode[a.DATA_KEY].mutations.push(e),null)}).forEach(function(e){null!=e&&e!==r&&null!=e.domNode[a.DATA_KEY]&&e.update(e.domNode[a.DATA_KEY].mutations||[],n)}),null!=this.domNode[a.DATA_KEY].mutations&&e.prototype.update.call(this,this.domNode[a.DATA_KEY].mutations,n),this.optimize(t,n)},t.blotName="scroll",t.defaultChild="block",t.scope=a.Scope.BLOCK_BLOT,t.tagName="DIV",t}(o.default);t.default=s},function(e,t,n){var r,i=this&&this.__extends||(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(18),a=n(1),l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.formats=function(n){if(n.tagName!==t.tagName)return e.formats.call(this,n)},t.prototype.format=function(n,r){var i=this;n!==this.statics.blotName||r?e.prototype.format.call(this,n,r):(this.children.forEach(function(e){e instanceof o.default||(e=e.wrap(t.blotName,!0)),i.attributes.copy(e)}),this.unwrap())},t.prototype.formatAt=function(t,n,r,i){null!=this.formats()[r]||a.query(r,a.Scope.ATTRIBUTE)?this.isolate(t,n).format(r,i):e.prototype.formatAt.call(this,t,n,r,i)},t.prototype.optimize=function(n){e.prototype.optimize.call(this,n);var r=this.formats();if(0===Object.keys(r).length)return this.unwrap();var i=this.next;i instanceof t&&i.prev===this&&function(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(e[n]!==t[n])return!1;return!0}(r,i.formats())&&(i.moveChildren(this),i.remove())},t.blotName="inline",t.scope=a.Scope.INLINE_BLOT,t.tagName="SPAN",t}(o.default);t.default=l},function(e,t,n){var r,i=this&&this.__extends||(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(18),a=n(1),l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.formats=function(n){var r=a.query(t.blotName).tagName;if(n.tagName!==r)return e.formats.call(this,n)},t.prototype.format=function(n,r){null!=a.query(n,a.Scope.BLOCK)&&(n!==this.statics.blotName||r?e.prototype.format.call(this,n,r):this.replaceWith(t.blotName))},t.prototype.formatAt=function(t,n,r,i){null!=a.query(r,a.Scope.BLOCK)?this.format(r,i):e.prototype.formatAt.call(this,t,n,r,i)},t.prototype.insertAt=function(t,n,r){if(null==r||null!=a.query(n,a.Scope.INLINE))e.prototype.insertAt.call(this,t,n,r);else{var i=this.split(t),o=a.create(n,r);i.parent.insertBefore(o,i)}},t.prototype.update=function(t,n){navigator.userAgent.match(/Trident/)?this.build():e.prototype.update.call(this,t,n)},t.blotName="block",t.scope=a.Scope.BLOCK_BLOT,t.tagName="P",t}(o.default);t.default=l},function(e,t,n){var r,i=this&&this.__extends||(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.formats=function(e){},t.prototype.format=function(t,n){e.prototype.formatAt.call(this,0,this.length(),t,n)},t.prototype.formatAt=function(t,n,r,i){0===t&&n===this.length()?this.format(r,i):e.prototype.formatAt.call(this,t,n,r,i)},t.prototype.formats=function(){return this.statics.formats(this.domNode)},t}(n(19).default);t.default=o},function(e,t,n){var r,i=this&&this.__extends||(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(19),a=n(1),l=function(e){function t(t){var n=e.call(this,t)||this;return n.text=n.statics.value(n.domNode),n}return i(t,e),t.create=function(e){return document.createTextNode(e)},t.value=function(e){var t=e.data;return t.normalize&&(t=t.normalize()),t},t.prototype.deleteAt=function(e,t){this.domNode.data=this.text=this.text.slice(0,e)+this.text.slice(e+t)},t.prototype.index=function(e,t){return this.domNode===e?t:-1},t.prototype.insertAt=function(t,n,r){null==r?(this.text=this.text.slice(0,t)+n+this.text.slice(t),this.domNode.data=this.text):e.prototype.insertAt.call(this,t,n,r)},t.prototype.length=function(){return this.text.length},t.prototype.optimize=function(n){e.prototype.optimize.call(this,n),this.text=this.statics.value(this.domNode),0===this.text.length?this.remove():this.next instanceof t&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())},t.prototype.position=function(e,t){return void 0===t&&(t=!1),[this.domNode,e]},t.prototype.split=function(e,t){if(void 0===t&&(t=!1),!t){if(0===e)return this;if(e===this.length())return this.next}var n=a.create(this.domNode.splitText(e));return this.parent.insertBefore(n,this.next),this.text=this.statics.value(this.domNode),n},t.prototype.update=function(e,t){var n=this;e.some(function(e){return"characterData"===e.type&&e.target===n.domNode})&&(this.text=this.statics.value(this.domNode))},t.prototype.value=function(){return this.text},t.blotName="text",t.scope=a.Scope.INLINE_BLOT,t}(o.default);t.default=l},function(e,t,n){var r=document.createElement("div");if(r.classList.toggle("test-class",!1),r.classList.contains("test-class")){var i=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(e,t){return arguments.length>1&&!this.contains(e)==!t?t:i.call(this,e)}}String.prototype.startsWith||(String.prototype.startsWith=function(e,t){return t=t||0,this.substr(t,e.length)===e}),String.prototype.endsWith||(String.prototype.endsWith=function(e,t){var n=this.toString();("number"!=typeof t||!isFinite(t)||Math.floor(t)!==t||t>n.length)&&(t=n.length),t-=e.length;var r=n.indexOf(e,t);return -1!==r&&r===t}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(e){if(this===null)throw TypeError("Array.prototype.find called on null or undefined");if("function"!=typeof e)throw TypeError("predicate must be a function");for(var t,n=Object(this),r=n.length>>>0,i=arguments[1],o=0;o<r;o++)if(t=n[o],e.call(i,t,o,n))return t}}),document.addEventListener("DOMContentLoaded",function(){document.execCommand("enableObjectResizing",!1,!1),document.execCommand("autoUrlDetect",!1,!1)})},function(e,t){function n(e,t,l){if(e==t)return e?[[0,e]]:[];(l<0||e.length<l)&&(l=null);var s=i(e,t),u=e.substring(0,s);s=o(e=e.substring(s),t=t.substring(s));var c=e.substring(e.length-s),d=function(e,t){if(!e)return[[1,t]];if(!t)return[[-1,e]];var a,l=e.length>t.length?e:t,s=e.length>t.length?t:e,u=l.indexOf(s);if(-1!=u)return a=[[1,l.substring(0,u)],[0,s],[1,l.substring(u+s.length)]],e.length>t.length&&(a[0][0]=a[2][0]=-1),a;if(1==s.length)return[[-1,e],[1,t]];var c=function(e,t){var n,r,a,l,s,u=e.length>t.length?e:t,c=e.length>t.length?t:e;if(u.length<4||2*c.length<u.length)return null;function d(e,t,n){for(var r,a,l,s,u=e.substring(n,n+Math.floor(e.length/4)),c=-1,d="";-1!=(c=t.indexOf(u,c+1));){var h=i(e.substring(n),t.substring(c)),f=o(e.substring(0,n),t.substring(0,c));d.length<f+h&&(d=t.substring(c-f,c)+t.substring(c,c+h),r=e.substring(0,n-f),a=e.substring(n+h),l=t.substring(0,c-f),s=t.substring(c+h))}return 2*d.length>=e.length?[r,a,l,s,d]:null}var h=d(u,c,Math.ceil(u.length/4)),f=d(u,c,Math.ceil(u.length/2));return h||f?(n=f?h&&h[4].length>f[4].length?h:f:h,e.length>t.length?(r=n[0],a=n[1],l=n[2],s=n[3]):(l=n[0],s=n[1],r=n[2],a=n[3]),[r,a,l,s,n[4]]):null}(e,t);if(c){var d=c[0],h=c[1],f=c[2],p=c[3],g=c[4],m=n(d,f),v=n(h,p);return m.concat([[0,g]],v)}return function(e,t){for(var n=e.length,i=t.length,o=Math.ceil((n+i)/2),a=2*o,l=Array(a),s=Array(a),u=0;u<a;u++)l[u]=-1,s[u]=-1;l[o+1]=0,s[o+1]=0;for(var c=n-i,d=c%2!=0,h=0,f=0,p=0,g=0,m=0;m<o;m++){for(var v=-m+h;v<=m-f;v+=2){for(var y,b=o+v,w=(y=v==-m||v!=m&&l[b-1]<l[b+1]?l[b+1]:l[b-1]+1)-v;y<n&&w<i&&e.charAt(y)==t.charAt(w);)y++,w++;if(l[b]=y,y>n)f+=2;else if(w>i)h+=2;else if(d){var x=o+c-v;if(x>=0&&x<a&&-1!=s[x]){var _=n-s[x];if(y>=_)return r(e,t,y,w)}}}for(var E=-m+p;E<=m-g;E+=2){for(var _,x=o+E,S=(_=E==-m||E!=m&&s[x-1]<s[x+1]?s[x+1]:s[x-1]+1)-E;_<n&&S<i&&e.charAt(n-_-1)==t.charAt(i-S-1);)_++,S++;if(s[x]=_,_>n)g+=2;else if(S>i)p+=2;else if(!d){var b=o+c-E;if(b>=0&&b<a&&-1!=l[b]){var y=l[b],w=o+y-b;if(y>=(_=n-_))return r(e,t,y,w)}}}}return[[-1,e],[1,t]]}(e,t)}(e=e.substring(0,e.length-s),t=t.substring(0,t.length-s));return u&&d.unshift([0,u]),c&&d.push([0,c]),function e(t){t.push([0,""]);for(var n,r=0,a=0,l=0,s="",u="";r<t.length;)switch(t[r][0]){case 1:l++,u+=t[r][1],r++;break;case -1:a++,s+=t[r][1],r++;break;case 0:a+l>1?(0!==a&&0!==l&&(0!==(n=i(u,s))&&(r-a-l>0&&0==t[r-a-l-1][0]?t[r-a-l-1][1]+=u.substring(0,n):(t.splice(0,0,[0,u.substring(0,n)]),r++),u=u.substring(n),s=s.substring(n)),0!==(n=o(u,s))&&(t[r][1]=u.substring(u.length-n)+t[r][1],u=u.substring(0,u.length-n),s=s.substring(0,s.length-n))),0===a?t.splice(r-l,a+l,[1,u]):0===l?t.splice(r-a,a+l,[-1,s]):t.splice(r-a-l,a+l,[-1,s],[1,u]),r=r-a-l+(a?1:0)+(l?1:0)+1):0!==r&&0==t[r-1][0]?(t[r-1][1]+=t[r][1],t.splice(r,1)):r++,l=0,a=0,s="",u=""}""===t[t.length-1][1]&&t.pop();var c=!1;for(r=1;r<t.length-1;)0==t[r-1][0]&&0==t[r+1][0]&&(t[r][1].substring(t[r][1].length-t[r-1][1].length)==t[r-1][1]?(t[r][1]=t[r-1][1]+t[r][1].substring(0,t[r][1].length-t[r-1][1].length),t[r+1][1]=t[r-1][1]+t[r+1][1],t.splice(r-1,1),c=!0):t[r][1].substring(0,t[r+1][1].length)==t[r+1][1]&&(t[r-1][1]+=t[r+1][1],t[r][1]=t[r][1].substring(t[r+1][1].length)+t[r+1][1],t.splice(r+1,1),c=!0)),r++;c&&e(t)}(d),null!=l&&(d=function(e,t){var n=function(e,t){if(0===t)return[0,e];for(var n=0,r=0;r<e.length;r++){var i=e[r];if(-1===i[0]||0===i[0]){var o=n+i[1].length;if(t===o)return[r+1,e];if(t<o){e=e.slice();var a=t-n,l=[i[0],i[1].slice(0,a)],s=[i[0],i[1].slice(a)];return e.splice(r,1,l,s),[r+1,e]}n=o}}throw Error("cursor_pos is out of bounds!")}(e,t),r=n[1],i=n[0],o=r[i],l=r[i+1];if(null==o||0!==o[0])return e;if(null!=l&&o[1]+l[1]===l[1]+o[1])return r.splice(i,2,l,o),a(r,i,2);if(null==l||0!==l[1].indexOf(o[1]))return e;r.splice(i,2,[l[0],o[1]],[0,o[1]]);var s=l[1].slice(o[1].length);return s.length>0&&r.splice(i+2,0,[l[0],s]),a(r,i,3)}(d,l)),d=function(e){for(var t,n=!1,r=function(e){return e.charCodeAt(0)>=56320&&57343>=e.charCodeAt(0)},i=2;i<e.length;i+=1)0===e[i-2][0]&&(t=e[i-2][1]).charCodeAt(t.length-1)>=55296&&56319>=t.charCodeAt(t.length-1)&&-1===e[i-1][0]&&r(e[i-1][1])&&1===e[i][0]&&r(e[i][1])&&(n=!0,e[i-1][1]=e[i-2][1].slice(-1)+e[i-1][1],e[i][1]=e[i-2][1].slice(-1)+e[i][1],e[i-2][1]=e[i-2][1].slice(0,-1));if(!n)return e;for(var o=[],i=0;i<e.length;i+=1)e[i][1].length>0&&o.push(e[i]);return o}(d)}function r(e,t,r,i){var o=e.substring(0,r),a=t.substring(0,i),l=e.substring(r),s=t.substring(i),u=n(o,a),c=n(l,s);return u.concat(c)}function i(e,t){if(!e||!t||e.charAt(0)!=t.charAt(0))return 0;for(var n=0,r=Math.min(e.length,t.length),i=r,o=0;n<i;)e.substring(o,i)==t.substring(o,i)?o=n=i:r=i,i=Math.floor((r-n)/2+n);return i}function o(e,t){if(!e||!t||e.charAt(e.length-1)!=t.charAt(t.length-1))return 0;for(var n=0,r=Math.min(e.length,t.length),i=r,o=0;n<i;)e.substring(e.length-i,e.length-o)==t.substring(t.length-i,t.length-o)?o=n=i:r=i,i=Math.floor((r-n)/2+n);return i}function a(e,t,n){for(var r=t+n-1;r>=0&&r>=t-1;r--)if(r+1<e.length){var i=e[r],o=e[r+1];i[0]===o[1]&&e.splice(r,2,[i[0],i[1]+o[1]])}return e}n.INSERT=1,n.DELETE=-1,n.EQUAL=0,e.exports=n},function(e,t){(e.exports="function"==typeof Object.keys?Object.keys:n).shim=n;function n(e){var t=[];for(var n in e)t.push(n);return t}},function(e,t){var n="[object Arguments]"==function(){return Object.prototype.toString.call(arguments)}();function r(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function i(e){return e&&"object"==typeof e&&"number"==typeof e.length&&Object.prototype.hasOwnProperty.call(e,"callee")&&!Object.prototype.propertyIsEnumerable.call(e,"callee")||!1}(t=e.exports=n?r:i).supported=r,t.unsupported=i},function(e,t){var n=Object.prototype.hasOwnProperty,r="~";function i(){}function o(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function a(){this._events=new i,this._eventsCount=0}Object.create&&(i.prototype=Object.create(null),new i().__proto__||(r=!1)),a.prototype.eventNames=function(){var e,t,i=[];if(0===this._eventsCount)return i;for(t in e=this._events)n.call(e,t)&&i.push(r?t.slice(1):t);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(e)):i},a.prototype.listeners=function(e,t){var n=r?r+e:e,i=this._events[n];if(t)return!!i;if(!i)return[];if(i.fn)return[i.fn];for(var o=0,a=i.length,l=Array(a);o<a;o++)l[o]=i[o].fn;return l},a.prototype.emit=function(e,t,n,i,o,a){var l=r?r+e:e;if(!this._events[l])return!1;var s,u,c=this._events[l],d=arguments.length;if(c.fn){switch(c.once&&this.removeListener(e,c.fn,void 0,!0),d){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,t),!0;case 3:return c.fn.call(c.context,t,n),!0;case 4:return c.fn.call(c.context,t,n,i),!0;case 5:return c.fn.call(c.context,t,n,i,o),!0;case 6:return c.fn.call(c.context,t,n,i,o,a),!0}for(u=1,s=Array(d-1);u<d;u++)s[u-1]=arguments[u];c.fn.apply(c.context,s)}else{var h,f=c.length;for(u=0;u<f;u++)switch(c[u].once&&this.removeListener(e,c[u].fn,void 0,!0),d){case 1:c[u].fn.call(c[u].context);break;case 2:c[u].fn.call(c[u].context,t);break;case 3:c[u].fn.call(c[u].context,t,n);break;case 4:c[u].fn.call(c[u].context,t,n,i);break;default:if(!s)for(h=1,s=Array(d-1);h<d;h++)s[h-1]=arguments[h];c[u].fn.apply(c[u].context,s)}}return!0},a.prototype.on=function(e,t,n){var i=new o(t,n||this),a=r?r+e:e;return this._events[a]?this._events[a].fn?this._events[a]=[this._events[a],i]:this._events[a].push(i):(this._events[a]=i,this._eventsCount++),this},a.prototype.once=function(e,t,n){var i=new o(t,n||this,!0),a=r?r+e:e;return this._events[a]?this._events[a].fn?this._events[a]=[this._events[a],i]:this._events[a].push(i):(this._events[a]=i,this._eventsCount++),this},a.prototype.removeListener=function(e,t,n,o){var a=r?r+e:e;if(!this._events[a])return this;if(!t)return 0==--this._eventsCount?this._events=new i:delete this._events[a],this;var l=this._events[a];if(l.fn)l.fn!==t||o&&!l.once||n&&l.context!==n||(0==--this._eventsCount?this._events=new i:delete this._events[a]);else{for(var s=0,u=[],c=l.length;s<c;s++)(l[s].fn!==t||o&&!l[s].once||n&&l[s].context!==n)&&u.push(l[s]);u.length?this._events[a]=1===u.length?u[0]:u:0==--this._eventsCount?this._events=new i:delete this._events[a]}return this},a.prototype.removeAllListeners=function(e){var t;return e?(t=r?r+e:e,this._events[t]&&(0==--this._eventsCount?this._events=new i:delete this._events[t])):(this._events=new i,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prototype.setMaxListeners=function(){return this},a.prefixed=r,a.EventEmitter=a,void 0!==e&&(e.exports=a)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.matchText=t.matchSpacing=t.matchNewline=t.matchBlot=t.matchAttributor=t.default=void 0;var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,l=e[Symbol.iterator]();!(r=(a=l.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&l.return&&l.return()}finally{if(i)throw o}}return n}(e,t);throw TypeError("Invalid attempt to destructure non-iterable instance")},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=b(n(3)),l=b(n(2)),s=b(n(0)),u=b(n(5)),c=b(n(10)),d=b(n(9)),h=n(36),f=n(37),p=b(n(13)),g=n(26),m=n(38),v=n(39),y=n(40);function b(e){return e&&e.__esModule?e:{default:e}}function w(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var x=(0,c.default)("quill:clipboard"),_="__ql-matcher",E=[[Node.TEXT_NODE,M],[Node.TEXT_NODE,I],["br",function(e,t){return T(t,"\n")||t.insert("\n"),t}],[Node.ELEMENT_NODE,I],[Node.ELEMENT_NODE,R],[Node.ELEMENT_NODE,L],[Node.ELEMENT_NODE,j],[Node.ELEMENT_NODE,function(e,t){var n={},r=e.style||{};return r.fontStyle&&"italic"===P(e).fontStyle&&(n.italic=!0),r.fontWeight&&(P(e).fontWeight.startsWith("bold")||parseInt(P(e).fontWeight)>=700)&&(n.bold=!0),Object.keys(n).length>0&&(t=k(t,n)),parseFloat(r.textIndent||0)>0&&(t=new l.default().insert(" ").concat(t)),t}],["li",function(e,t){var n=s.default.query(e);if(null==n||"list-item"!==n.blotName||!T(t,"\n"))return t;for(var r=-1,i=e.parentNode;!i.classList.contains("ql-clipboard");)"list"===(s.default.query(i)||{}).blotName&&(r+=1),i=i.parentNode;return r<=0?t:t.compose(new l.default().retain(t.length()-1).retain(1,{indent:r}))}],["b",N.bind(N,"bold")],["i",N.bind(N,"italic")],["style",function(){return new l.default}]],S=[h.AlignAttribute,m.DirectionAttribute].reduce(function(e,t){return e[t.keyName]=t,e},{}),C=[h.AlignStyle,f.BackgroundStyle,g.ColorStyle,m.DirectionStyle,v.FontStyle,y.SizeStyle].reduce(function(e,t){return e[t.keyName]=t,e},{}),O=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r.quill.root.addEventListener("paste",r.onPaste.bind(r)),r.container=r.quill.addContainer("ql-clipboard"),r.container.setAttribute("contenteditable",!0),r.container.setAttribute("tabindex",-1),r.matchers=[],E.concat(r.options.matchers).forEach(function(e){var t=i(e,2),o=t[0],a=t[1];(n.matchVisual||a!==L)&&r.addMatcher(o,a)}),r}return function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"addMatcher",value:function(e,t){this.matchers.push([e,t])}},{key:"convert",value:function(e){if("string"==typeof e)return this.container.innerHTML=e.replace(/\>\r?\n +\</g,"><"),this.convert();var t=this.quill.getFormat(this.quill.selection.savedRange.index);if(t[p.default.blotName]){var n=this.container.innerText;return this.container.innerHTML="",new l.default().insert(n,w({},p.default.blotName,t[p.default.blotName]))}var r=i(this.prepareMatching(),2),o=r[0],a=r[1],s=function e(t,n,r){return t.nodeType===t.TEXT_NODE?r.reduce(function(e,n){return n(t,e)},new l.default):t.nodeType===t.ELEMENT_NODE?[].reduce.call(t.childNodes||[],function(i,o){var a=e(o,n,r);return o.nodeType===t.ELEMENT_NODE&&(a=n.reduce(function(e,t){return t(o,e)},a),a=(o[_]||[]).reduce(function(e,t){return t(o,e)},a)),i.concat(a)},new l.default):new l.default}(this.container,o,a);return T(s,"\n")&&null==s.ops[s.ops.length-1].attributes&&(s=s.compose(new l.default().retain(s.length()-1).delete(1))),x.log("convert",this.container.innerHTML,s),this.container.innerHTML="",s}},{key:"dangerouslyPasteHTML",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:u.default.sources.API;if("string"==typeof e)this.quill.setContents(this.convert(e),t),this.quill.setSelection(0,u.default.sources.SILENT);else{var r=this.convert(t);this.quill.updateContents(new l.default().retain(e).concat(r),n),this.quill.setSelection(e+r.length(),u.default.sources.SILENT)}}},{key:"onPaste",value:function(e){var t=this;if(!e.defaultPrevented&&this.quill.isEnabled()){var n=this.quill.getSelection(),r=new l.default().retain(n.index),i=this.quill.scrollingContainer.scrollTop;this.container.focus(),this.quill.selection.update(u.default.sources.SILENT),setTimeout(function(){r=r.concat(t.convert()).delete(n.length),t.quill.updateContents(r,u.default.sources.USER),t.quill.setSelection(r.length()-n.length,u.default.sources.SILENT),t.quill.scrollingContainer.scrollTop=i,t.quill.focus()},1)}}},{key:"prepareMatching",value:function(){var e=this,t=[],n=[];return this.matchers.forEach(function(r){var o=i(r,2),a=o[0],l=o[1];switch(a){case Node.TEXT_NODE:n.push(l);break;case Node.ELEMENT_NODE:t.push(l);break;default:[].forEach.call(e.container.querySelectorAll(a),function(e){e[_]=e[_]||[],e[_].push(l)})}}),[t,n]}}]),t}(d.default);function k(e,t,n){return(void 0===t?"undefined":r(t))==="object"?Object.keys(t).reduce(function(e,n){return k(e,n,t[n])},e):e.reduce(function(e,r){return r.attributes&&r.attributes[t]?e.push(r):e.insert(r.insert,(0,a.default)({},w({},t,n),r.attributes))},new l.default)}function P(e){if(e.nodeType!==Node.ELEMENT_NODE)return{};var t="__ql-computed-style";return e[t]||(e[t]=window.getComputedStyle(e))}function T(e,t){for(var n="",r=e.ops.length-1;r>=0&&n.length<t.length;--r){var i=e.ops[r];if("string"!=typeof i.insert)break;n=i.insert+n}return n.slice(-1*t.length)===t}function A(e){return 0!==e.childNodes.length&&["block","list-item"].indexOf(P(e).display)>-1}function N(e,t,n){return k(n,e,!0)}function j(e,t){var n=s.default.Attributor.Attribute.keys(e),r=s.default.Attributor.Class.keys(e),i=s.default.Attributor.Style.keys(e),o={};return n.concat(r).concat(i).forEach(function(t){var n=s.default.query(t,s.default.Scope.ATTRIBUTE);null!=n&&(o[n.attrName]=n.value(e),o[n.attrName])||(null!=(n=S[t])&&(n.attrName===t||n.keyName===t)&&(o[n.attrName]=n.value(e)||void 0),null!=(n=C[t])&&(n.attrName===t||n.keyName===t)&&(o[(n=C[t]).attrName]=n.value(e)||void 0))}),Object.keys(o).length>0&&(t=k(t,o)),t}function R(e,t){var n=s.default.query(e);if(null==n)return t;if(n.prototype instanceof s.default.Embed){var r={},i=n.value(e);null!=i&&(r[n.blotName]=i,t=new l.default().insert(r,n.formats(e)))}else"function"==typeof n.formats&&(t=k(t,n.blotName,n.formats(e)));return t}function I(e,t){return!T(t,"\n")&&(A(e)||t.length()>0&&e.nextSibling&&A(e.nextSibling))&&t.insert("\n"),t}function L(e,t){if(A(e)&&null!=e.nextElementSibling&&!T(t,"\n\n")){var n=e.offsetHeight+parseFloat(P(e).marginTop)+parseFloat(P(e).marginBottom);e.nextElementSibling.offsetTop>e.offsetTop+1.5*n&&t.insert("\n")}return t}function M(e,t){var n=e.data;if("O:P"===e.parentNode.tagName)return t.insert(n.trim());if(0===n.trim().length&&e.parentNode.classList.contains("ql-clipboard"))return t;if(!P(e.parentNode).whiteSpace.startsWith("pre")){var r=function(e,t){return(t=t.replace(/[^\u00a0]/g,"")).length<1&&e?" ":t};n=(n=n.replace(/\r\n/g," ").replace(/\n/g," ")).replace(/\s\s+/g,r.bind(r,!0)),(null==e.previousSibling&&A(e.parentNode)||null!=e.previousSibling&&A(e.previousSibling))&&(n=n.replace(/^\s+/,r.bind(r,!1))),(null==e.nextSibling&&A(e.parentNode)||null!=e.nextSibling&&A(e.nextSibling))&&(n=n.replace(/\s+$/,r.bind(r,!1)))}return t.insert(n)}O.DEFAULTS={matchers:[],matchVisual:!0},t.default=O,t.matchAttributor=j,t.matchBlot=R,t.matchNewline=I,t.matchSpacing=L,t.matchText=M},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r,i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);if(null===o)return;return e(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},a=function(e){function t(){return function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"optimize",value:function(e){o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"optimize",this).call(this,e),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}}],[{key:"create",value:function(){return o(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this)}},{key:"formats",value:function(){return!0}}]),t}(((r=n(6))&&r.__esModule?r:{default:r}).default);a.blotName="bold",a.tagName=["STRONG","B"],t.default=a},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.addControls=t.default=void 0;var r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,l=e[Symbol.iterator]();!(r=(a=l.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&l.return&&l.return()}finally{if(i)throw o}}return n}(e,t);throw TypeError("Invalid attempt to destructure non-iterable instance")},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=c(n(2)),a=c(n(0)),l=c(n(5)),s=c(n(10)),u=c(n(9));function c(e){return e&&e.__esModule?e:{default:e}}function d(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}var h=(0,s.default)("quill:toolbar"),f=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,t);var i,o=d(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));if(Array.isArray(o.options.container)){var a=document.createElement("div");g(a,o.options.container),e.container.parentNode.insertBefore(a,e.container),o.container=a}else"string"==typeof o.options.container?o.container=document.querySelector(o.options.container):o.container=o.options.container;return o.container instanceof HTMLElement?(o.container.classList.add("ql-toolbar"),o.controls=[],o.handlers={},Object.keys(o.options.handlers).forEach(function(e){o.addHandler(e,o.options.handlers[e])}),[].forEach.call(o.container.querySelectorAll("button, select"),function(e){o.attach(e)}),o.quill.on(l.default.events.EDITOR_CHANGE,function(e,t){e===l.default.events.SELECTION_CHANGE&&o.update(t)}),o.quill.on(l.default.events.SCROLL_OPTIMIZE,function(){var e=r(o.quill.selection.getRange(),1)[0];o.update(e)}),o):(i=h.error("Container required for toolbar",o.options),d(o,i))}return function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"addHandler",value:function(e,t){this.handlers[e]=t}},{key:"attach",value:function(e){var t=this,n=[].find.call(e.classList,function(e){return 0===e.indexOf("ql-")});if(n){if(n=n.slice(3),"BUTTON"===e.tagName&&e.setAttribute("type","button"),null==this.handlers[n]){if(null!=this.quill.scroll.whitelist&&null==this.quill.scroll.whitelist[n]){h.warn("ignoring attaching to disabled format",n,e);return}if(null==a.default.query(n)){h.warn("ignoring attaching to nonexistent format",n,e);return}}var i="SELECT"===e.tagName?"change":"click";e.addEventListener(i,function(i){var s,u,c,d=void 0;if("SELECT"===e.tagName){if(e.selectedIndex<0)return;var h=e.options[e.selectedIndex];d=!h.hasAttribute("selected")&&(h.value||!1)}else d=!e.classList.contains("ql-active")&&(e.value||!e.hasAttribute("value")),i.preventDefault();t.quill.focus();var f=r(t.quill.selection.getRange(),1)[0];if(null!=t.handlers[n])t.handlers[n].call(t,d);else if(a.default.query(n).prototype instanceof a.default.Embed){if(!(d=prompt("Enter "+n)))return;t.quill.updateContents(new o.default().retain(f.index).delete(f.length).insert((s={},u=n,c=d,u in s?Object.defineProperty(s,u,{value:c,enumerable:!0,configurable:!0,writable:!0}):s[u]=c,s)),l.default.sources.USER)}else t.quill.format(n,d,l.default.sources.USER);t.update(f)}),this.controls.push([n,e])}}},{key:"update",value:function(e){var t=null==e?{}:this.quill.getFormat(e);this.controls.forEach(function(n){var i=r(n,2),o=i[0],a=i[1];if("SELECT"===a.tagName){var l=void 0;if(null==e)l=null;else if(null==t[o])l=a.querySelector("option[selected]");else if(!Array.isArray(t[o])){var s=t[o];"string"==typeof s&&(s=s.replace(/\"/g,'\\"')),l=a.querySelector('option[value="'+s+'"]')}null==l?(a.value="",a.selectedIndex=-1):l.selected=!0}else if(null==e)a.classList.remove("ql-active");else if(a.hasAttribute("value")){var u=t[o]===a.getAttribute("value")||null!=t[o]&&t[o].toString()===a.getAttribute("value")||null==t[o]&&!a.getAttribute("value");a.classList.toggle("ql-active",u)}else a.classList.toggle("ql-active",null!=t[o])})}}]),t}(u.default);function p(e,t,n){var r=document.createElement("button");r.setAttribute("type","button"),r.classList.add("ql-"+t),null!=n&&(r.value=n),e.appendChild(r)}function g(e,t){Array.isArray(t[0])||(t=[t]),t.forEach(function(t){var n=document.createElement("span");n.classList.add("ql-formats"),t.forEach(function(e){if("string"==typeof e)p(n,e);else{var t,r=Object.keys(e)[0],i=e[r];Array.isArray(i)?((t=document.createElement("select")).classList.add("ql-"+r),i.forEach(function(e){var n=document.createElement("option");!1!==e?n.setAttribute("value",e):n.setAttribute("selected","selected"),t.appendChild(n)}),n.appendChild(t)):p(n,r,i)}}),e.appendChild(n)})}f.DEFAULTS={},f.DEFAULTS={container:null,handlers:{clean:function(){var e=this,t=this.quill.getSelection();null!=t&&(0==t.length?Object.keys(this.quill.getFormat()).forEach(function(t){null!=a.default.query(t,a.default.Scope.INLINE)&&e.quill.format(t,!1)}):this.quill.removeFormat(t,l.default.sources.USER))},direction:function(e){var t=this.quill.getFormat().align;"rtl"===e&&null==t?this.quill.format("align","right",l.default.sources.USER):e||"right"!==t||this.quill.format("align",!1,l.default.sources.USER),this.quill.format("direction",e,l.default.sources.USER)},indent:function(e){var t=this.quill.getSelection(),n=this.quill.getFormat(t),r=parseInt(n.indent||0);if("+1"===e||"-1"===e){var i="+1"===e?1:-1;"rtl"===n.direction&&(i*=-1),this.quill.format("indent",r+i,l.default.sources.USER)}},link:function(e){!0===e&&(e=prompt("Enter link URL:")),this.quill.format("link",e,l.default.sources.USER)},list:function(e){var t=this.quill.getSelection(),n=this.quill.getFormat(t);"check"===e?"checked"===n.list||"unchecked"===n.list?this.quill.format("list",!1,l.default.sources.USER):this.quill.format("list","unchecked",l.default.sources.USER):this.quill.format("list",e,l.default.sources.USER)}}},t.default=f,t.addControls=g},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <polyline class="ql-even ql-stroke" points="5 7 3 9 5 11"></polyline> <polyline class="ql-even ql-stroke" points="13 7 15 9 13 11"></polyline> <line class=ql-stroke x1=10 x2=8 y1=5 y2=13></line> </svg>'},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r,i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);if(null===o)return;return e(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},a=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r.label.innerHTML=n,r.container.classList.add("ql-color-picker"),[].slice.call(r.container.querySelectorAll(".ql-picker-item"),0,7).forEach(function(e){e.classList.add("ql-primary")}),r}return function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"buildItem",value:function(e){var n=o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"buildItem",this).call(this,e);return n.style.backgroundColor=e.getAttribute("value")||"",n}},{key:"selectItem",value:function(e,n){o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"selectItem",this).call(this,e,n);var r=this.label.querySelector(".ql-color-label"),i=e&&e.getAttribute("data-value")||"";r&&("line"===r.tagName?r.style.stroke=i:r.style.fill=i)}}]),t}(((r=n(28))&&r.__esModule?r:{default:r}).default);t.default=a},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r,i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);if(null===o)return;return e(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},a=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r.container.classList.add("ql-icon-picker"),[].forEach.call(r.container.querySelectorAll(".ql-picker-item"),function(e){e.innerHTML=n[e.getAttribute("data-value")||""]}),r.defaultItem=r.container.querySelector(".ql-selected"),r.selectItem(r.defaultItem),r}return function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"selectItem",value:function(e,n){o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"selectItem",this).call(this,e,n),e=e||this.defaultItem,this.label.innerHTML=e.innerHTML}}]),t}(((r=n(28))&&r.__esModule?r:{default:r}).default);t.default=a},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function(){function e(t,n){var r=this;(function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")})(this,e),this.quill=t,this.boundsContainer=n||document.body,this.root=t.addContainer("ql-tooltip"),this.root.innerHTML=this.constructor.TEMPLATE,this.quill.root===this.quill.scrollingContainer&&this.quill.root.addEventListener("scroll",function(){r.root.style.marginTop=-1*r.quill.root.scrollTop+"px"}),this.hide()}return r(e,[{key:"hide",value:function(){this.root.classList.add("ql-hidden")}},{key:"position",value:function(e){var t=e.left+e.width/2-this.root.offsetWidth/2,n=e.bottom+this.quill.root.scrollTop;this.root.style.left=t+"px",this.root.style.top=n+"px",this.root.classList.remove("ql-flip");var r=this.boundsContainer.getBoundingClientRect(),i=this.root.getBoundingClientRect(),o=0;if(i.right>r.right&&(o=r.right-i.right,this.root.style.left=t+o+"px"),i.left<r.left&&(o=r.left-i.left,this.root.style.left=t+o+"px"),i.bottom>r.bottom){var a=i.bottom-i.top,l=e.bottom-e.top+a;this.root.style.top=n-l+"px",this.root.classList.add("ql-flip")}return o}},{key:"show",value:function(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}]),e}();t.default=i},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,l=e[Symbol.iterator]();!(r=(a=l.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&l.return&&l.return()}finally{if(i)throw o}}return n}(e,t);throw TypeError("Invalid attempt to destructure non-iterable instance")},i=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);if(null===o)return;return e(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=f(n(3)),l=f(n(8)),s=n(43),u=f(s),c=f(n(27)),d=n(15),h=f(n(41));function f(e){return e&&e.__esModule?e:{default:e}}function p(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function g(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}function m(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var v=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]],y=function(e){function t(e,n){p(this,t),null!=n.modules.toolbar&&null==n.modules.toolbar.container&&(n.modules.toolbar.container=v);var r=g(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r.quill.container.classList.add("ql-snow"),r}return m(t,e),o(t,[{key:"extendToolbar",value:function(e){e.container.classList.add("ql-snow"),this.buildButtons([].slice.call(e.container.querySelectorAll("button")),h.default),this.buildPickers([].slice.call(e.container.querySelectorAll("select")),h.default),this.tooltip=new b(this.quill,this.options.bounds),e.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"K",shortKey:!0},function(t,n){e.handlers.link.call(e,!n.format.link)})}}]),t}(u.default);y.DEFAULTS=(0,a.default)(!0,{},u.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(e){if(e){var t=this.quill.getSelection();if(null!=t&&0!=t.length){var n=this.quill.getText(t);/^\S+@\S+\.\S+$/.test(n)&&0!==n.indexOf("mailto:")&&(n="mailto:"+n),this.quill.theme.tooltip.edit("link",n)}}else this.quill.format("link",!1)}}}}});var b=function(e){function t(e,n){p(this,t);var r=g(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r.preview=r.root.querySelector("a.ql-preview"),r}return m(t,e),o(t,[{key:"listen",value:function(){var e=this;i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"listen",this).call(this),this.root.querySelector("a.ql-action").addEventListener("click",function(t){e.root.classList.contains("ql-editing")?e.save():e.edit("link",e.preview.textContent),t.preventDefault()}),this.root.querySelector("a.ql-remove").addEventListener("click",function(t){if(null!=e.linkRange){var n=e.linkRange;e.restoreFocus(),e.quill.formatText(n,"link",!1,l.default.sources.USER),delete e.linkRange}t.preventDefault(),e.hide()}),this.quill.on(l.default.events.SELECTION_CHANGE,function(t,n,i){if(null!=t){if(0===t.length&&i===l.default.sources.USER){var o=r(e.quill.scroll.descendant(c.default,t.index),2),a=o[0],s=o[1];if(null!=a){e.linkRange=new d.Range(t.index-s,a.length());var u=c.default.formats(a.domNode);e.preview.textContent=u,e.preview.setAttribute("href",u),e.show(),e.position(e.quill.getBounds(e.linkRange));return}}else delete e.linkRange;e.hide()}})}},{key:"show",value:function(){i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"show",this).call(this),this.root.removeAttribute("data-mode")}}]),t}(s.BaseTooltip);b.TEMPLATE='<a class="ql-preview" rel="noopener noreferrer" target="_blank" href="about:blank"></a><input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL"><a class="ql-action"></a><a class="ql-remove"></a>',t.default=y},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=L(n(29)),i=n(36),o=n(38),a=n(64),l=L(n(65)),s=L(n(66)),u=n(67),c=L(u),d=n(37),h=n(26),f=n(39),p=n(40),g=L(n(56)),m=L(n(68)),v=L(n(27)),y=L(n(69)),b=L(n(70)),w=L(n(71)),x=L(n(72)),_=L(n(73)),E=n(13),S=L(E),C=L(n(74)),O=L(n(75)),k=L(n(57)),P=L(n(41)),T=L(n(28)),A=L(n(59)),N=L(n(60)),j=L(n(61)),R=L(n(108)),I=L(n(62));function L(e){return e&&e.__esModule?e:{default:e}}r.default.register({"attributors/attribute/direction":o.DirectionAttribute,"attributors/class/align":i.AlignClass,"attributors/class/background":d.BackgroundClass,"attributors/class/color":h.ColorClass,"attributors/class/direction":o.DirectionClass,"attributors/class/font":f.FontClass,"attributors/class/size":p.SizeClass,"attributors/style/align":i.AlignStyle,"attributors/style/background":d.BackgroundStyle,"attributors/style/color":h.ColorStyle,"attributors/style/direction":o.DirectionStyle,"attributors/style/font":f.FontStyle,"attributors/style/size":p.SizeStyle},!0),r.default.register({"formats/align":i.AlignClass,"formats/direction":o.DirectionClass,"formats/indent":a.IndentClass,"formats/background":d.BackgroundStyle,"formats/color":h.ColorStyle,"formats/font":f.FontClass,"formats/size":p.SizeClass,"formats/blockquote":l.default,"formats/code-block":S.default,"formats/header":s.default,"formats/list":c.default,"formats/bold":g.default,"formats/code":E.Code,"formats/italic":m.default,"formats/link":v.default,"formats/script":y.default,"formats/strike":b.default,"formats/underline":w.default,"formats/image":x.default,"formats/video":_.default,"formats/list/item":u.ListItem,"modules/formula":C.default,"modules/syntax":O.default,"modules/toolbar":k.default,"themes/bubble":R.default,"themes/snow":I.default,"ui/icons":P.default,"ui/picker":T.default,"ui/icon-picker":N.default,"ui/color-picker":A.default,"ui/tooltip":j.default},!0),t.default=r.default},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.IndentClass=void 0;var r,i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);if(null===o)return;return e(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},a=(r=n(0))&&r.__esModule?r:{default:r},l=new(function(e){function t(){return function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"add",value:function(e,n){if("+1"===n||"-1"===n){var r=this.value(e)||0;n="+1"===n?r+1:r-1}return 0===n?(this.remove(e),!0):o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"add",this).call(this,e,n)}},{key:"canAdd",value:function(e,n){return o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"canAdd",this).call(this,e,n)||o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"canAdd",this).call(this,e,parseInt(n))}},{key:"value",value:function(e){return parseInt(o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"value",this).call(this,e))||void 0}}]),t}(a.default.Attributor.Class))("indent","ql-indent",{scope:a.default.Scope.BLOCK,whitelist:[1,2,3,4,5,6,7,8]});t.IndentClass=l},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r,i=function(e){function t(){return function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(((r=n(4))&&r.__esModule?r:{default:r}).default);i.blotName="blockquote",i.tagName="blockquote",t.default=i},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r,i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function(e){function t(){return function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,null,[{key:"formats",value:function(e){return this.tagName.indexOf(e.tagName)+1}}]),t}(((r=n(4))&&r.__esModule?r:{default:r}).default);o.blotName="header",o.tagName=["H1","H2","H3","H4","H5","H6"],t.default=o},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.ListItem=void 0;var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);if(null===o)return;return e(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},o=s(n(0)),a=s(n(4)),l=s(n(25));function s(e){return e&&e.__esModule?e:{default:e}}function u(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function c(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}function d(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var h=function(e){function t(){return u(this,t),c(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return d(t,e),r(t,[{key:"format",value:function(e,n){e!==f.blotName||n?i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"format",this).call(this,e,n):this.replaceWith(o.default.create(this.statics.scope))}},{key:"remove",value:function(){null==this.prev&&null==this.next?this.parent.remove():i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"remove",this).call(this)}},{key:"replaceWith",value:function(e,n){return(this.parent.isolate(this.offset(this.parent),this.length()),e===this.parent.statics.blotName)?(this.parent.replaceWith(e,n),this):(this.parent.unwrap(),i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"replaceWith",this).call(this,e,n))}}],[{key:"formats",value:function(e){return e.tagName===this.tagName?void 0:i(t.__proto__||Object.getPrototypeOf(t),"formats",this).call(this,e)}}]),t}(a.default);h.blotName="list-item",h.tagName="LI";var f=function(e){function t(e){u(this,t);var n=c(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e)),r=function(t){if(t.target.parentNode===e){var r=n.statics.formats(e),i=o.default.find(t.target);"checked"===r?i.format("list","unchecked"):"unchecked"===r&&i.format("list","checked")}};return e.addEventListener("touchstart",r),e.addEventListener("mousedown",r),n}return d(t,e),r(t,null,[{key:"create",value:function(e){var n=i(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,"ordered"===e?"OL":"UL");return("checked"===e||"unchecked"===e)&&n.setAttribute("data-checked","checked"===e),n}},{key:"formats",value:function(e){return"OL"===e.tagName?"ordered":"UL"===e.tagName?e.hasAttribute("data-checked")?"true"===e.getAttribute("data-checked")?"checked":"unchecked":"bullet":void 0}}]),r(t,[{key:"format",value:function(e,t){this.children.length>0&&this.children.tail.format(e,t)}},{key:"formats",value:function(){var e,t,n;return e={},t=this.statics.blotName,n=this.statics.formats(this.domNode),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},{key:"insertBefore",value:function(e,n){if(e instanceof h)i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertBefore",this).call(this,e,n);else{var r=null==n?this.length():n.offset(this),o=this.split(r);o.parent.insertBefore(e,o)}}},{key:"optimize",value:function(e){i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"optimize",this).call(this,e);var n=this.next;null!=n&&n.prev===this&&n.statics.blotName===this.statics.blotName&&n.domNode.tagName===this.domNode.tagName&&n.domNode.getAttribute("data-checked")===this.domNode.getAttribute("data-checked")&&(n.moveChildren(this),n.remove())}},{key:"replace",value:function(e){if(e.statics.blotName!==this.statics.blotName){var n=o.default.create(this.statics.defaultChild);e.moveChildren(n),this.appendChild(n)}i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"replace",this).call(this,e)}}]),t}(l.default);f.blotName="list",f.scope=o.default.Scope.BLOCK_BLOT,f.tagName=["OL","UL"],f.defaultChild="list-item",f.allowedChildren=[h],t.ListItem=h,t.default=f},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r,i=function(e){function t(){return function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(((r=n(56))&&r.__esModule?r:{default:r}).default);i.blotName="italic",i.tagName=["EM","I"],t.default=i},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r,i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);if(null===o)return;return e(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},a=function(e){function t(){return function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,null,[{key:"create",value:function(e){return"super"===e?document.createElement("sup"):"sub"===e?document.createElement("sub"):o(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,e)}},{key:"formats",value:function(e){return"SUB"===e.tagName?"sub":"SUP"===e.tagName?"super":void 0}}]),t}(((r=n(6))&&r.__esModule?r:{default:r}).default);a.blotName="script",a.tagName=["SUB","SUP"],t.default=a},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r,i=function(e){function t(){return function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(((r=n(6))&&r.__esModule?r:{default:r}).default);i.blotName="strike",i.tagName="S",t.default=i},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r,i=function(e){function t(){return function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(((r=n(6))&&r.__esModule?r:{default:r}).default);i.blotName="underline",i.tagName="U",t.default=i},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r,i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);if(null===o)return;return e(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},a=(r=n(0))&&r.__esModule?r:{default:r},l=n(27),s=["alt","height","width"],u=function(e){function t(){return function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"format",value:function(e,n){s.indexOf(e)>-1?n?this.domNode.setAttribute(e,n):this.domNode.removeAttribute(e):o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"format",this).call(this,e,n)}}],[{key:"create",value:function(e){var n=o(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,e);return"string"==typeof e&&n.setAttribute("src",this.sanitize(e)),n}},{key:"formats",value:function(e){return s.reduce(function(t,n){return e.hasAttribute(n)&&(t[n]=e.getAttribute(n)),t},{})}},{key:"match",value:function(e){return/\.(jpe?g|gif|png)$/.test(e)||/^data:image\/.+;base64/.test(e)}},{key:"sanitize",value:function(e){return(0,l.sanitize)(e,["http","https","data"])?e:"//:0"}},{key:"value",value:function(e){return e.getAttribute("src")}}]),t}(a.default.Embed);u.blotName="image",u.tagName="IMG",t.default=u},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r,i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);if(null===o)return;return e(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},a=n(4),l=(r=n(27))&&r.__esModule?r:{default:r},s=["height","width"],u=function(e){function t(){return function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"format",value:function(e,n){s.indexOf(e)>-1?n?this.domNode.setAttribute(e,n):this.domNode.removeAttribute(e):o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"format",this).call(this,e,n)}}],[{key:"create",value:function(e){var n=o(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,e);return n.setAttribute("frameborder","0"),n.setAttribute("allowfullscreen",!0),n.setAttribute("src",this.sanitize(e)),n}},{key:"formats",value:function(e){return s.reduce(function(t,n){return e.hasAttribute(n)&&(t[n]=e.getAttribute(n)),t},{})}},{key:"sanitize",value:function(e){return l.default.sanitize(e)}},{key:"value",value:function(e){return e.getAttribute("src")}}]),t}(a.BlockEmbed);u.blotName="video",u.className="ql-video",u.tagName="IFRAME",t.default=u},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.FormulaBlot=void 0;var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);if(null===o)return;return e(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},o=s(n(35)),a=s(n(5)),l=s(n(9));function s(e){return e&&e.__esModule?e:{default:e}}function u(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function c(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}function d(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var h=function(e){function t(){return u(this,t),c(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return d(t,e),r(t,null,[{key:"create",value:function(e){var n=i(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,e);return"string"==typeof e&&(window.katex.render(e,n,{throwOnError:!1,errorColor:"#f00"}),n.setAttribute("data-value",e)),n}},{key:"value",value:function(e){return e.getAttribute("data-value")}}]),t}(o.default);h.blotName="formula",h.className="ql-formula",h.tagName="SPAN";var f=function(e){function t(){u(this,t);var e=c(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));if(null==window.katex)throw Error("Formula module requires KaTeX.");return e}return d(t,e),r(t,null,[{key:"register",value:function(){a.default.register(h,!0)}}]),t}(l.default);t.FormulaBlot=h,t.default=f},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.CodeToken=t.CodeBlock=void 0;var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);if(null===o)return;return e(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},o=s(n(0)),a=s(n(5)),l=s(n(9));function s(e){return e&&e.__esModule?e:{default:e}}function u(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function c(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}function d(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var h=function(e){function t(){return u(this,t),c(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return d(t,e),r(t,[{key:"replaceWith",value:function(e){this.domNode.textContent=this.domNode.textContent,this.attach(),i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"replaceWith",this).call(this,e)}},{key:"highlight",value:function(e){var t=this.domNode.textContent;this.cachedText!==t&&((t.trim().length>0||null==this.cachedText)&&(this.domNode.innerHTML=e(t),this.domNode.normalize(),this.attach()),this.cachedText=t)}}]),t}(s(n(13)).default);h.className="ql-syntax";var f=new o.default.Attributor.Class("token","hljs",{scope:o.default.Scope.INLINE}),p=function(e){function t(e,n){u(this,t);var r=c(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));if("function"!=typeof r.options.highlight)throw Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");var i=null;return r.quill.on(a.default.events.SCROLL_OPTIMIZE,function(){clearTimeout(i),i=setTimeout(function(){r.highlight(),i=null},r.options.interval)}),r.highlight(),r}return d(t,e),r(t,null,[{key:"register",value:function(){a.default.register(f,!0),a.default.register(h,!0)}}]),r(t,[{key:"highlight",value:function(){var e=this;if(!this.quill.selection.composing){this.quill.update(a.default.sources.USER);var t=this.quill.getSelection();this.quill.scroll.descendants(h).forEach(function(t){t.highlight(e.options.highlight)}),this.quill.update(a.default.sources.SILENT),null!=t&&this.quill.setSelection(t,a.default.sources.SILENT)}}}]),t}(l.default);p.DEFAULTS={highlight:null==window.hljs?null:function(e){return window.hljs.highlightAuto(e).value},interval:1e3},t.CodeBlock=h,t.CodeToken=f,t.default=p},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=13 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=9 y1=4 y2=4></line> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=14 x2=4 y1=14 y2=14></line> <line class=ql-stroke x1=12 x2=6 y1=4 y2=4></line> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=5 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=9 y1=4 y2=4></line> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=3 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=3 y1=4 y2=4></line> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <g class="ql-fill ql-color-label"> <polygon points="6 6.868 6 6 5 6 5 7 5.942 7 6 6.868"></polygon> <rect height=1 width=1 x=4 y=4></rect> <polygon points="6.817 5 6 5 6 6 6.38 6 6.817 5"></polygon> <rect height=1 width=1 x=2 y=6></rect> <rect height=1 width=1 x=3 y=5></rect> <rect height=1 width=1 x=4 y=7></rect> <polygon points="4 11.439 4 11 3 11 3 12 3.755 12 4 11.439"></polygon> <rect height=1 width=1 x=2 y=12></rect> <rect height=1 width=1 x=2 y=9></rect> <rect height=1 width=1 x=2 y=15></rect> <polygon points="4.63 10 4 10 4 11 4.192 11 4.63 10"></polygon> <rect height=1 width=1 x=3 y=8></rect> <path d=M10.832,4.2L11,4.582V4H10.708A1.948,1.948,0,0,1,10.832,4.2Z></path> <path d=M7,4.582L7.168,4.2A1.929,1.929,0,0,1,7.292,4H7V4.582Z></path> <path d=M8,13H7.683l-0.351.8a1.933,1.933,0,0,1-.124.2H8V13Z></path> <rect height=1 width=1 x=12 y=2></rect> <rect height=1 width=1 x=11 y=3></rect> <path d=M9,3H8V3.282A1.985,1.985,0,0,1,9,3Z></path> <rect height=1 width=1 x=2 y=3></rect> <rect height=1 width=1 x=6 y=2></rect> <rect height=1 width=1 x=3 y=2></rect> <rect height=1 width=1 x=5 y=3></rect> <rect height=1 width=1 x=9 y=2></rect> <rect height=1 width=1 x=15 y=14></rect> <polygon points="13.447 10.174 13.469 10.225 13.472 10.232 13.808 11 14 11 14 10 13.37 10 13.447 10.174"></polygon> <rect height=1 width=1 x=13 y=7></rect> <rect height=1 width=1 x=15 y=5></rect> <rect height=1 width=1 x=14 y=6></rect> <rect height=1 width=1 x=15 y=8></rect> <rect height=1 width=1 x=14 y=9></rect> <path d=M3.775,14H3v1H4V14.314A1.97,1.97,0,0,1,3.775,14Z></path> <rect height=1 width=1 x=14 y=3></rect> <polygon points="12 6.868 12 6 11.62 6 12 6.868"></polygon> <rect height=1 width=1 x=15 y=2></rect> <rect height=1 width=1 x=12 y=5></rect> <rect height=1 width=1 x=13 y=4></rect> <polygon points="12.933 9 13 9 13 8 12.495 8 12.933 9"></polygon> <rect height=1 width=1 x=9 y=14></rect> <rect height=1 width=1 x=8 y=15></rect> <path d=M6,14.926V15H7V14.316A1.993,1.993,0,0,1,6,14.926Z></path> <rect height=1 width=1 x=5 y=15></rect> <path d=M10.668,13.8L10.317,13H10v1h0.792A1.947,1.947,0,0,1,10.668,13.8Z></path> <rect height=1 width=1 x=11 y=15></rect> <path d=M14.332,12.2a1.99,1.99,0,0,1,.166.8H15V12H14.245Z></path> <rect height=1 width=1 x=14 y=15></rect> <rect height=1 width=1 x=15 y=11></rect> </g> <polyline class=ql-stroke points="5.5 13 9 5 12.5 13"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=11 y2=11></line> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <rect class="ql-fill ql-stroke" height=3 width=3 x=4 y=5></rect> <rect class="ql-fill ql-stroke" height=3 width=3 x=11 y=5></rect> <path class="ql-even ql-fill ql-stroke" d=M7,8c0,4.031-3,5-3,5></path> <path class="ql-even ql-fill ql-stroke" d=M14,8c0,4.031-3,5-3,5></path> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <path class=ql-stroke d=M5,4H9.5A2.5,2.5,0,0,1,12,6.5v0A2.5,2.5,0,0,1,9.5,9H5A0,0,0,0,1,5,9V4A0,0,0,0,1,5,4Z></path> <path class=ql-stroke d=M5,9h5.5A2.5,2.5,0,0,1,13,11.5v0A2.5,2.5,0,0,1,10.5,14H5a0,0,0,0,1,0,0V9A0,0,0,0,1,5,9Z></path> </svg>'},function(e,t){e.exports='<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=5 x2=13 y1=3 y2=3></line> <line class=ql-stroke x1=6 x2=9.35 y1=12 y2=3></line> <line class=ql-stroke x1=11 x2=15 y1=11 y2=15></line> <line class=ql-stroke x1=15 x2=11 y1=11 y2=15></line> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=7 x=2 y=14></rect> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class="ql-color-label ql-stroke ql-transparent" x1=3 x2=15 y1=15 y2=15></line> <polyline class=ql-stroke points="5.5 11 9 3 12.5 11"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=9 y2=9></line> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="3 11 5 9 3 7 3 11"></polygon> <line class="ql-stroke ql-fill" x1=15 x2=11 y1=4 y2=4></line> <path class=ql-fill d=M11,3a3,3,0,0,0,0,6h1V3H11Z></path> <rect class=ql-fill height=11 width=1 x=11 y=4></rect> <rect class=ql-fill height=11 width=1 x=13 y=4></rect> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="15 12 13 10 15 8 15 12"></polygon> <line class="ql-stroke ql-fill" x1=9 x2=5 y1=4 y2=4></line> <path class=ql-fill d=M5,3A3,3,0,0,0,5,9H6V3H5Z></path> <rect class=ql-fill height=11 width=1 x=5 y=4></rect> <rect class=ql-fill height=11 width=1 x=7 y=4></rect> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M14,16H4a1,1,0,0,1,0-2H14A1,1,0,0,1,14,16Z /> <path class=ql-fill d=M14,4H4A1,1,0,0,1,4,2H14A1,1,0,0,1,14,4Z /> <rect class=ql-fill x=3 y=6 width=12 height=6 rx=1 ry=1 /> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M13,16H5a1,1,0,0,1,0-2h8A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H5A1,1,0,0,1,5,2h8A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=2 y=6 width=14 height=6 rx=1 ry=1 /> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15,8H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,8Z /> <path class=ql-fill d=M15,12H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,12Z /> <path class=ql-fill d=M15,16H5a1,1,0,0,1,0-2H15A1,1,0,0,1,15,16Z /> <path class=ql-fill d=M15,4H5A1,1,0,0,1,5,2H15A1,1,0,0,1,15,4Z /> <rect class=ql-fill x=2 y=6 width=8 height=6 rx=1 ry=1 /> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M5,8H3A1,1,0,0,1,3,6H5A1,1,0,0,1,5,8Z /> <path class=ql-fill d=M5,12H3a1,1,0,0,1,0-2H5A1,1,0,0,1,5,12Z /> <path class=ql-fill d=M13,16H3a1,1,0,0,1,0-2H13A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H3A1,1,0,0,1,3,2H13A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=8 y=6 width=8 height=6 rx=1 ry=1 transform="translate(24 18) rotate(-180)"/> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M11.759,2.482a2.561,2.561,0,0,0-3.53.607A7.656,7.656,0,0,0,6.8,6.2C6.109,9.188,5.275,14.677,4.15,14.927a1.545,1.545,0,0,0-1.3-.933A0.922,0.922,0,0,0,2,15.036S1.954,16,4.119,16s3.091-2.691,3.7-5.553c0.177-.826.36-1.726,0.554-2.6L8.775,6.2c0.381-1.421.807-2.521,1.306-2.676a1.014,1.014,0,0,0,1.02.56A0.966,0.966,0,0,0,11.759,2.482Z></path> <rect class=ql-fill height=1.6 rx=0.8 ry=0.8 width=5 x=5.15 y=6.2></rect> <path class=ql-fill d=M13.663,12.027a1.662,1.662,0,0,1,.266-0.276q0.193,0.069.456,0.138a2.1,2.1,0,0,0,.535.069,1.075,1.075,0,0,0,.767-0.3,1.044,1.044,0,0,0,.314-0.8,0.84,0.84,0,0,0-.238-0.619,0.8,0.8,0,0,0-.594-0.239,1.154,1.154,0,0,0-.781.3,4.607,4.607,0,0,0-.781,1q-0.091.15-.218,0.346l-0.246.38c-0.068-.288-0.137-0.582-0.212-0.885-0.459-1.847-2.494-.984-2.941-0.8-0.482.2-.353,0.647-0.094,0.529a0.869,0.869,0,0,1,1.281.585c0.217,0.751.377,1.436,0.527,2.038a5.688,5.688,0,0,1-.362.467,2.69,2.69,0,0,1-.264.271q-0.221-.08-0.471-0.147a2.029,2.029,0,0,0-.522-0.066,1.079,1.079,0,0,0-.768.3A1.058,1.058,0,0,0,9,15.131a0.82,0.82,0,0,0,.832.852,1.134,1.134,0,0,0,.787-0.3,5.11,5.11,0,0,0,.776-0.993q0.141-.219.215-0.34c0.046-.076.122-0.194,0.223-0.346a2.786,2.786,0,0,0,.918,1.726,2.582,2.582,0,0,0,2.376-.185c0.317-.181.212-0.565,0-0.494A0.807,0.807,0,0,1,14.176,15a5.159,5.159,0,0,1-.913-2.446l0,0Q13.487,12.24,13.663,12.027Z></path> </svg>'},function(e,t){e.exports='<svg viewBox="0 0 18 18"> <path class=ql-fill d=M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm6.06787,9.209H14.98975V7.59863a.54085.54085,0,0,0-.605-.60547h-.62744a1.01119,1.01119,0,0,0-.748.29688L11.645,8.56641a.5435.5435,0,0,0-.022.8584l.28613.30762a.53861.53861,0,0,0,.84717.0332l.09912-.08789a1.2137,1.2137,0,0,0,.2417-.35254h.02246s-.01123.30859-.01123.60547V13.209H12.041a.54085.54085,0,0,0-.605.60547v.43945a.54085.54085,0,0,0,.605.60547h4.02686a.54085.54085,0,0,0,.605-.60547v-.43945A.54085.54085,0,0,0,16.06787,13.209Z /> </svg>'},function(e,t){e.exports='<svg viewBox="0 0 18 18"> <path class=ql-fill d=M16.73975,13.81445v.43945a.54085.54085,0,0,1-.605.60547H11.855a.58392.58392,0,0,1-.64893-.60547V14.0127c0-2.90527,3.39941-3.42187,3.39941-4.55469a.77675.77675,0,0,0-.84717-.78125,1.17684,1.17684,0,0,0-.83594.38477c-.2749.26367-.561.374-.85791.13184l-.4292-.34082c-.30811-.24219-.38525-.51758-.1543-.81445a2.97155,2.97155,0,0,1,2.45361-1.17676,2.45393,2.45393,0,0,1,2.68408,2.40918c0,2.45312-3.1792,2.92676-3.27832,3.93848h2.79443A.54085.54085,0,0,1,16.73975,13.81445ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z /> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=13 y1=4 y2=4></line> <line class=ql-stroke x1=5 x2=11 y1=14 y2=14></line> <line class=ql-stroke x1=8 x2=10 y1=14 y2=4></line> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=10 width=12 x=3 y=4></rect> <circle class=ql-fill cx=6 cy=7 r=1></circle> <polyline class="ql-even ql-fill" points="5 12 5 11 7 9 8 10 11 7 13 9 13 12 5 12"></polyline> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class="ql-fill ql-stroke" points="3 7 3 11 5 9 3 7"></polyline> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points="5 7 5 11 3 9 5 7"></polyline> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=11 y1=7 y2=11></line> <path class="ql-even ql-stroke" d=M8.9,4.577a3.476,3.476,0,0,1,.36,4.679A3.476,3.476,0,0,1,4.577,8.9C3.185,7.5,2.035,6.4,4.217,4.217S7.5,3.185,8.9,4.577Z></path> <path class="ql-even ql-stroke" d=M13.423,9.1a3.476,3.476,0,0,0-4.679-.36,3.476,3.476,0,0,0,.36,4.679c1.392,1.392,2.5,2.542,4.679.36S14.815,10.5,13.423,9.1Z></path> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=7 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=7 x2=15 y1=14 y2=14></line> <line class="ql-stroke ql-thin" x1=2.5 x2=4.5 y1=5.5 y2=5.5></line> <path class=ql-fill d=M3.5,6A0.5,0.5,0,0,1,3,5.5V3.085l-0.276.138A0.5,0.5,0,0,1,2.053,3c-0.124-.247-0.023-0.324.224-0.447l1-.5A0.5,0.5,0,0,1,4,2.5v3A0.5,0.5,0,0,1,3.5,6Z></path> <path class="ql-stroke ql-thin" d=M4.5,10.5h-2c0-.234,1.85-1.076,1.85-2.234A0.959,0.959,0,0,0,2.5,8.156></path> <path class="ql-stroke ql-thin" d=M2.5,14.846a0.959,0.959,0,0,0,1.85-.109A0.7,0.7,0,0,0,3.75,14a0.688,0.688,0,0,0,.6-0.736,0.959,0.959,0,0,0-1.85-.109></path> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=6 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=6 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=6 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=3 y1=4 y2=4></line> <line class=ql-stroke x1=3 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=3 y1=14 y2=14></line> </svg>'},function(e,t){e.exports='<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=9 x2=15 y1=4 y2=4></line> <polyline class=ql-stroke points="3 4 4 5 6 3"></polyline> <line class=ql-stroke x1=9 x2=15 y1=14 y2=14></line> <polyline class=ql-stroke points="3 14 4 15 6 13"></polyline> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points="3 9 4 10 6 8"></polyline> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15.5,15H13.861a3.858,3.858,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.921,1.921,0,0,0,12.021,11.7a0.50013,0.50013,0,1,0,.957.291h0a0.914,0.914,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.076-1.16971,1.86982-1.93971,2.43082A1.45639,1.45639,0,0,0,12,15.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,15Z /> <path class=ql-fill d=M9.65,5.241a1,1,0,0,0-1.409.108L6,7.964,3.759,5.349A1,1,0,0,0,2.192,6.59178Q2.21541,6.6213,2.241,6.649L4.684,9.5,2.241,12.35A1,1,0,0,0,3.71,13.70722q0.02557-.02768.049-0.05722L6,11.036,8.241,13.65a1,1,0,1,0,1.567-1.24277Q9.78459,12.3777,9.759,12.35L7.316,9.5,9.759,6.651A1,1,0,0,0,9.65,5.241Z /> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15.5,7H13.861a4.015,4.015,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.922,1.922,0,0,0,12.021,3.7a0.5,0.5,0,1,0,.957.291,0.917,0.917,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.077-1.164,1.925-1.934,2.486A1.423,1.423,0,0,0,12,7.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,7Z /> <path class=ql-fill d=M9.651,5.241a1,1,0,0,0-1.41.108L6,7.964,3.759,5.349a1,1,0,1,0-1.519,1.3L4.683,9.5,2.241,12.35a1,1,0,1,0,1.519,1.3L6,11.036,8.241,13.65a1,1,0,0,0,1.519-1.3L7.317,9.5,9.759,6.651A1,1,0,0,0,9.651,5.241Z /> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class="ql-stroke ql-thin" x1=15.5 x2=2.5 y1=8.5 y2=9.5></line> <path class=ql-fill d=M9.007,8C6.542,7.791,6,7.519,6,6.5,6,5.792,7.283,5,9,5c1.571,0,2.765.679,2.969,1.309a1,1,0,0,0,1.9-.617C13.356,4.106,11.354,3,9,3,6.2,3,4,4.538,4,6.5a3.2,3.2,0,0,0,.5,1.843Z></path> <path class=ql-fill d=M8.984,10C11.457,10.208,12,10.479,12,11.5c0,0.708-1.283,1.5-3,1.5-1.571,0-2.765-.679-2.969-1.309a1,1,0,1,0-1.9.617C4.644,13.894,6.646,15,9,15c2.8,0,5-1.538,5-3.5a3.2,3.2,0,0,0-.5-1.843Z></path> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <path class=ql-stroke d=M5,3V9a4.012,4.012,0,0,0,4,4H9a4.012,4.012,0,0,0,4-4V3></path> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=12 x=3 y=15></rect> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=12 width=12 x=3 y=3></rect> <rect class=ql-fill height=12 width=1 x=5 y=3></rect> <rect class=ql-fill height=12 width=1 x=12 y=3></rect> <rect class=ql-fill height=2 width=8 x=5 y=8></rect> <rect class=ql-fill height=1 width=3 x=3 y=5></rect> <rect class=ql-fill height=1 width=3 x=3 y=7></rect> <rect class=ql-fill height=1 width=3 x=3 y=10></rect> <rect class=ql-fill height=1 width=3 x=3 y=12></rect> <rect class=ql-fill height=1 width=3 x=12 y=5></rect> <rect class=ql-fill height=1 width=3 x=12 y=7></rect> <rect class=ql-fill height=1 width=3 x=12 y=10></rect> <rect class=ql-fill height=1 width=3 x=12 y=12></rect> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <polygon class=ql-stroke points="7 11 9 13 11 11 7 11"></polygon> <polygon class=ql-stroke points="7 7 9 5 11 7 7 7"></polygon> </svg>'},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.BubbleTooltip=void 0;var r=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);if(null===o)return;return e(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=d(n(3)),a=d(n(8)),l=n(43),s=d(l),u=n(15),c=d(n(41));function d(e){return e&&e.__esModule?e:{default:e}}function h(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function f(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}function p(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var g=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]],m=function(e){function t(e,n){h(this,t),null!=n.modules.toolbar&&null==n.modules.toolbar.container&&(n.modules.toolbar.container=g);var r=f(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r.quill.container.classList.add("ql-bubble"),r}return p(t,e),i(t,[{key:"extendToolbar",value:function(e){this.tooltip=new v(this.quill,this.options.bounds),this.tooltip.root.appendChild(e.container),this.buildButtons([].slice.call(e.container.querySelectorAll("button")),c.default),this.buildPickers([].slice.call(e.container.querySelectorAll("select")),c.default)}}]),t}(s.default);m.DEFAULTS=(0,o.default)(!0,{},s.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(e){e?this.quill.theme.tooltip.edit():this.quill.format("link",!1)}}}}});var v=function(e){function t(e,n){h(this,t);var r=f(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r.quill.on(a.default.events.EDITOR_CHANGE,function(e,t,n,i){if(e===a.default.events.SELECTION_CHANGE){if(null!=t&&t.length>0&&i===a.default.sources.USER){r.show(),r.root.style.left="0px",r.root.style.width="",r.root.style.width=r.root.offsetWidth+"px";var o=r.quill.getLines(t.index,t.length);if(1===o.length)r.position(r.quill.getBounds(t));else{var l=o[o.length-1],s=r.quill.getIndex(l),c=Math.min(l.length()-1,t.index+t.length-s),d=r.quill.getBounds(new u.Range(s,c));r.position(d)}}else document.activeElement!==r.textbox&&r.quill.hasFocus()&&r.hide()}}),r}return p(t,e),i(t,[{key:"listen",value:function(){var e=this;r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"listen",this).call(this),this.root.querySelector(".ql-close").addEventListener("click",function(){e.root.classList.remove("ql-editing")}),this.quill.on(a.default.events.SCROLL_OPTIMIZE,function(){setTimeout(function(){if(!e.root.classList.contains("ql-hidden")){var t=e.quill.getSelection();null!=t&&e.position(e.quill.getBounds(t))}},1)})}},{key:"cancel",value:function(){this.show()}},{key:"position",value:function(e){var n=r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"position",this).call(this,e),i=this.root.querySelector(".ql-tooltip-arrow");if(i.style.marginLeft="",0===n)return n;i.style.marginLeft=-1*n-i.offsetWidth/2+"px"}}]),t}(l.BaseTooltip);v.TEMPLATE='<span class="ql-tooltip-arrow"></span><div class="ql-tooltip-editor"><input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL"><a class="ql-close"></a></div>',t.BubbleTooltip=v,t.default=m},function(e,t,n){e.exports=n(63)}]).default;var y=h("2SBKn"),oX={};O9=oX,O7=function(e,t,n,r){var i,o,a,l,s,u,c,d,h,f,p,g,m,v,y,b,w,x,_,E,S,C,O,k,P,T,A,N,j,R,I,L,M,D,F,z,B,U,H,V,q,G,W,$,K,Y,X,Z,Q,J,ee,et=(o=[],(i={}).joinUrl=function(t,n){return t?e.resolve(t,n):n},i.getConstantUniqueIdFor=function(e){return 0>o.indexOf(e)&&o.push(e),o.indexOf(e)},i.clone=function(e){var t,n={};for(t in e)e.hasOwnProperty(t)&&(n[t]=e[t]);return n},i.parseOptionalParameters=function(e){var t,n={canvas:null,options:{}};return null==e[0]||"object"==typeof(t=e[0])&&null!==t&&Object.prototype.toString.apply(t).match(/\[object (Canvas|HTMLCanvasElement)\]/i)?(n.canvas=e[0]||null,n.options=i.clone(e[1])):n.options=i.clone(e[0]),n},i),en=(a={},l=function(e,t,n){var r=e[t];return e[t]=function(){var e=Array.prototype.slice.call(arguments);return n.apply(this,[e,r])},r},a.baseUrlRespectingXhr=function(e,t){return function(){var n=new e;return l(n,"open",function(e,n){var r=e.shift(),i=e.shift(),o=et.joinUrl(t,i);return n.apply(this,[r,o].concat(e))}),n}},a.finishNotifyingXhr=function(e){var t,n=0,r=0,i=!1,o=new Promise(function(e){t=function(){n-r<=0&&i&&e({totalCount:n})}}),a=function(){var i=new e;return l(i,"send",function(e,t){return n+=1,t.apply(this,arguments)}),i.addEventListener("load",function(){r+=1,t()}),i};return a.waitForRequestsToFinish=function(){return i=!0,t(),o},a},a),er=(s={},u=function(e){return Array.prototype.slice.call(e)},s.addClassName=function(e,t){e.className+=" "+t},s.addClassNameRecursively=function(e,t){s.addClassName(e,t),e.parentNode!==e.ownerDocument&&s.addClassNameRecursively(e.parentNode,t)},c=function(e,t){var n=e.parentStyleSheet,r=u(n.cssRules).indexOf(e);n.insertRule(t,r+1),n.deleteRule(r)},d=function(e,t){var n=e.cssText.replace(/^[^\{]+/,"");c(e,t+" "+n)},h=function(e){e.textContent=u(e.sheet.cssRules).reduce(function(e,t){return e+t.cssText},"")},f=function(e){var t=document.implementation.createHTMLDocument(""),n=document.createElement("style");n.textContent=e.textContent,t.body.appendChild(n),e.sheet=n.sheet},p=function(e,t,n){var r="((?:^|[^.#:\\w])|(?=\\W))("+t.join("|")+")(?=\\W|$)";u(e.querySelectorAll("style")).forEach(function(e){void 0===e.sheet&&f(e);var t=u(e.sheet.cssRules).filter(function(e){return e.selectorText&&RegExp(r,"i").test(e.selectorText)});t.length&&(t.forEach(function(e){var t=e.selectorText.replace(RegExp(r,"gi"),function(e,t,r){return t+n(r)});t!==e.selectorText&&d(e,t)}),h(e))})},s.rewriteCssSelectorWith=function(e,t,n){p(e,[t],function(){return n})},s.lowercaseCssTypeSelectors=function(e,t){p(e,t,function(e){return e.toLowerCase()})},s.findHtmlOnlyNodeNames=function(e){var t,n=e.ownerDocument.createTreeWalker(e,NodeFilter.SHOW_ELEMENT),r={},i={};do t=n.currentNode.tagName.toLowerCase(),"http://www.w3.org/1999/xhtml"===n.currentNode.namespaceURI?r[t]=!0:i[t]=!0;while(n.nextNode())return Object.keys(r).filter(function(e){return!i[e]})},g={},m=function(e){return Array.prototype.slice.call(e)},v={active:!0,hover:!0,focus:!1,target:!1},g.fakeUserAction=function(e,t,n){var r=e.querySelector(t),i="rasterizehtml"+n;r&&(v[n]?s.addClassNameRecursively(r,i):s.addClassName(r,i),s.rewriteCssSelectorWith(e,":"+n,"."+i))},g.persistInputValues=function(e){var t=e.querySelectorAll("input"),n=e.querySelectorAll("textarea"),r=function(e){return"checkbox"===e.type||"radio"===e.type};m(t).filter(r).forEach(function(e){e.checked?e.setAttribute("checked",""):e.removeAttribute("checked")}),m(t).filter(function(e){return!r(e)}).forEach(function(e){e.setAttribute("value",e.value)}),m(n).forEach(function(e){e.textContent=e.value})},g.rewriteTagNameSelectorsToLowerCase=function(e){s.lowercaseCssTypeSelectors(e,s.findHtmlOnlyNodeNames(e))},g),ei=(y=window,b={},w=function(e,t,n,r){var i=e.createElement(t);return i.style.visibility="hidden",i.style.width=n+"px",i.style.height=r+"px",i.style.position="absolute",i.style.top=-1e4-r+"px",i.style.left=-1e4-n+"px",e.getElementsByTagName("body")[0].appendChild(i),i},b.executeJavascript=function(e,t){return new Promise(function(n){var r=w(y.document,"iframe",t.width,t.height),i=e.outerHTML,o=[],a=t.executeJsTimeout||0,l=function(){y.document.getElementsByTagName("body")[0].removeChild(r)},s=function(){n({document:r.contentDocument,errors:o,cleanUp:l})},u=r.contentWindow.XMLHttpRequest,c=en.finishNotifyingXhr(u),d=en.baseUrlRespectingXhr(c,t.baseUrl);r.onload=function(){(a>0?new Promise(function(e){setTimeout(e,a)}):Promise.resolve()).then(c.waitForRequestsToFinish).then(s)},r.contentDocument.open(),r.contentWindow.XMLHttpRequest=d,r.contentWindow.onerror=function(e){o.push({resourceType:"scriptExecution",msg:e})},r.contentDocument.write("<!DOCTYPE html>"),r.contentDocument.write(i),r.contentDocument.close()})},x=function(e,t,n){var r=e.createElement("iframe");return r.style.width=t+"px",r.style.height=n+"px",r.style.visibility="hidden",r.style.position="absolute",r.style.top=-1e4-n+"px",r.style.left=-1e4-t+"px",r.style.borderWidth=0,r.sandbox="allow-same-origin",r.scrolling="no",r},_=function(e,t,n){var r=Math.floor(e/n),i=Math.floor(t/n);return x(y.document,r,i)},E=function(e,t){var n=e.querySelector(t);if(n)return n;if(e.ownerDocument.querySelector(t)===e)return e;throw{message:"Clipping selector not found"}},S=function(e,t,n,r,i){var o,a,l,s,u,c,d,h,f=Math.max(e.scrollWidth,e.clientWidth),p=Math.max(e.scrollHeight,e.clientHeight);return t?(a=(d=E(e,t).getBoundingClientRect()).top,l=d.left,s=d.width,u=d.height):(a=0,l=0,s=f,u=p),h={width:Math.max((o={width:s,height:u}).width*i,n),height:Math.max(o.height*i,r)},c=y.getComputedStyle(e.ownerDocument.documentElement).fontSize,{left:l,top:a,width:h.width,height:h.height,viewportWidth:f,viewportHeight:p,rootFontSize:c}},C=function(e,t){var n=e.tagName;return t.querySelector(n)},O=function(e){var t=e.tagName.toLowerCase();return"html"===t||"body"===t?e.outerHTML:'<body style="margin: 0;">'+e.outerHTML+"</body>"},b.calculateDocumentContentSize=function(e,t){return new Promise(function(n,r){var i,o=t.zoom||1;i=_(t.width,t.height,o),y.document.getElementsByTagName("body")[0].appendChild(i),i.onload=function(){var a,l=i.contentDocument;try{a=S(C(e,l),t.clip,t.width,t.height,o),n(a)}catch(e){r(e)}finally{y.document.getElementsByTagName("body")[0].removeChild(i)}},i.contentDocument.open(),i.contentDocument.write("<!DOCTYPE html>"),i.contentDocument.write(O(e)),i.contentDocument.close()})},b.parseHtmlFragment=function(e){var t=y.document.implementation.createHTMLDocument("");t.documentElement.innerHTML=e;var n=t.querySelector("body").firstChild;if(!n)throw"Invalid source";return n},k=function(e,t){var n,r,i,o,a=/<html((?:\s+[^>]*)?)>/im.exec(t),l=y.document.implementation.createHTMLDocument("");if(a)for(r=0,n="<div"+a[1]+"></div>",l.documentElement.innerHTML=n,i=l.querySelector("div");r<i.attributes.length;r++)o=i.attributes[r],e.documentElement.setAttribute(o.name,o.value)},b.parseHTML=function(e){var t=y.document.implementation.createHTMLDocument("");return t.documentElement.innerHTML=e,k(t,e),t},P=function(e){try{return n.failOnParseError(e)}catch(e){throw{message:"Invalid source",originalError:e}}},b.validateXHTML=function(e){P(new DOMParser().parseFromString(e,"application/xml"))},T=null,b.loadDocument=function(e,t){return new Promise(function(n,r){var i,o,a=new window.XMLHttpRequest,l=(i=et.joinUrl(t.baseUrl,e),"none"===(o=t.cache)||"repeated"===o?((null===T||"repeated"!==o)&&(T=Date.now()),i+"?_="+T):i),s=function(e){r({message:"Unable to load page",originalError:e})};a.addEventListener("load",function(){200===a.status||0===a.status?n(a.responseXML):s(a.statusText)},!1),a.addEventListener("error",function(e){s(e)},!1);try{a.open("GET",l,!0),a.responseType="document",a.send(null)}catch(e){s(e)}}).then(function(e){return P(e)})},b),eo=(A=window,j={},R=function(e,t){return t?URL.createObjectURL(new Blob([e],{type:"image/svg+xml"})):"data:image/svg+xml;charset=utf-8,"+encodeURIComponent(e)},I=function(e){e instanceof Blob&&URL.revokeObjectURL(e)},L='<svg xmlns="http://www.w3.org/2000/svg" width="1" height="1"><foreignObject></foreignObject></svg>',M=function(e){return new Promise(function(t,n){var r=document.createElement("canvas"),i=new Image;i.onload=function(){var e=r.getContext("2d");try{e.drawImage(i,0,0),r.toDataURL("image/png"),t(!0)}catch(e){t(!1)}},i.onerror=n,i.src=e})},D=function(){var e=R(L,!0);return M(e).then(function(t){return I(e),!t&&M(R(L,!1)).then(function(e){return e})},function(){return!1})},F=function(){if(A.Blob)try{return new Blob(["<b></b>"],{type:"text/xml"}),!0}catch(e){}return!1},j.renderSvg=function(e){return new Promise(function(t,n){var r,i,o=function(){i.onload=null,i.onerror=null},a=function(){r&&I(r)};(i=new Image).onload=function(){o(),a(),t(i)},i.onerror=function(){a(),n()},(void 0===N&&(N=new Promise(function(e,t){F()&&A.URL?D().then(function(t){e(!t)},function(){t()}):e(!1)})),N).then(function(t){return R(e,t)}).then(function(e){r=e,i.src=r},n)})},j),ea=(z={},B=function(e,t){var n=t||1,r={width:e.width,height:e.height,"font-size":e.rootFontSize};return 1!==n&&(r.style="transform:scale("+n+"); transform-origin: 0 0;"),r},U=function(e){var t,n;return t=Math.round(e.viewportWidth),n=Math.round(e.viewportHeight),{x:-e.left,y:-e.top,width:t,height:n}},H=function(e){var t=e.style||"";e.style=t+"float: left;"},V=function(e){e.externalResourcesRequired=!0},q=function(e){var t=Object.keys(e);return t.length?" "+t.map(function(t){return t+'="'+e[t]+'"'}).join(" "):""},G=function(e,n,r){var i=t.serializeToString(e);ei.validateXHTML(i);var o=U(n);return H(o),V(o),'<svg xmlns="http://www.w3.org/2000/svg"'+q(B(n,r))+'><style scoped="">html::-webkit-scrollbar { display: none; }</style><foreignObject'+q(o)+">"+i+"</foreignObject></svg>"},z.getSvgForDocument=function(e,t,n){return er.rewriteTagNameSelectorsToLowerCase(e),G(e,t,n)},z.drawDocumentAsSvg=function(e,t){return["hover","active","focus","target"].forEach(function(n){t[n]&&er.fakeUserAction(e,t[n],n)}),ei.calculateDocumentContentSize(e,t).then(function(n){return z.getSvgForDocument(e,n,t.zoom)})},z),el=(W={},$=function(e){return{message:"Error rendering page",originalError:e}},K=function(e){return eo.renderSvg(e).then(function(t){return{image:t,svg:e}},function(e){throw $(e)})},Y=function(e,t){try{t.getContext("2d").drawImage(e,0,0)}catch(e){throw $(e)}},W.rasterize=function(e,t,n){var i;return(i=et.clone(n)).inlineScripts=!0===n.executeJs,r.inlineReferences(e,i).then(function(t){return n.executeJs?ei.executeJavascript(e,n).then(function(e){var t=e.document;return er.persistInputValues(t),{document:t,errors:e.errors,cleanUp:e.cleanUp}}).then(function(e){return{element:e.document.documentElement,errors:t.concat(e.errors),cleanUp:e.cleanUp}}):{element:e,errors:t,cleanUp:function(){}}}).then(function(e){var r;return(r=e.element,ea.drawDocumentAsSvg(r,n).then(K).then(function(e){return t&&Y(e.image,t),e})).then(function(t){return e.cleanUp(),{image:t.image,svg:t.svg,errors:e.errors}})})},W);return X={},Z=function(e,t){var n=e?e.width:300,r=e?e.height:200;return{width:void 0!==t.width?t.width:n,height:void 0!==t.height?t.height:r}},Q=function(e){var t,n=Z(e.canvas,e.options);return(t=et.clone(e.options)).width=n.width,t.height=n.height,t},X.drawDocument=function(){var e=arguments[0],t=Array.prototype.slice.call(arguments,1),n=et.parseOptionalParameters(t),r=e.documentElement?e.documentElement:e;return el.rasterize(r,n.canvas,Q(n))},J=function(e,t,n){var r=ei.parseHTML(e);return X.drawDocument(r,t,n)},X.drawHTML=function(){var e=arguments[0],t=Array.prototype.slice.call(arguments,1),n=et.parseOptionalParameters(t);return J(e,n.canvas,n.options)},ee=function(e,t,n){var r=document.implementation.createHTMLDocument("");r.replaceChild(e.documentElement,r.documentElement);var i=n?et.clone(n):{};return n.baseUrl||(i.baseUrl=t),{document:r,options:i}},X.drawURL=function(){var e,t,n=arguments[0],r=Array.prototype.slice.call(arguments,1),i=et.parseOptionalParameters(r);return e=i.canvas,t=i.options,ei.loadDocument(n,t).then(function(r){var i=ee(r,n,t);return X.drawDocument(i.document,e,i.options)})},X},void 0===O9&&void 0!==window&&(O9=window),"function"==typeof define&&define.amd?define(["url","xmlserializer","sane-domparser-error","inlineresources"],function(e,t,n,r){return O9.rasterizeHTML=O7(e,t,n,r)}):oX?oX=O7(h("kRFNf"),h("l4MZj"),h("lDFX4"),h("6cJtK")):O9.rasterizeHTML=O7(O9.url,O9.xmlserializer,O9.sanedomparsererror,O9.inlineresources);let oZ=`
|
|
42
|
+
`;iL.innerHTML="",iL.appendChild(document.createTextNode(n)),JSON.stringify(e)!==JSON.stringify(o)&&a(e)});let u=l(v).useRef(null);l(v).useEffect(()=>{let e=setTimeout(()=>{let e=u.current;if(!e)return;u.current?.focus();let t=i||e.value.length;e.selectionStart=e.selectionEnd=t,r&&(e?.select(),document.execCommand("selectAll",!1,null))});return()=>{clearTimeout(e)}},[]),l(v).useEffect(()=>{window.addEventListener("blur",n);let e=e=>{u.current?.contains(e.target)||n()};return window.addEventListener("touchstart",e),()=>{window.removeEventListener("blur",n),window.removeEventListener("touchstart",e)}},[]);let c=0,d=s.textArr.length*s.lineHeight()*s.fontSize();"middle"===t.verticalAlign&&(c=(t.a.height-d)/2),"bottom"===t.verticalAlign&&(c=t.a.height-d);let h=iP(t.text);return(0,p.jsx)(r3,{children:(0,p.jsx)("textarea",{className:"polotno-input",ref:u,dir:iD(h),style:{...iM,...o,paddingTop:c+"px"},value:h,onChange:e=>{t.set({text:e.target.value})},placeholder:t.placeholder,onBlur:n})})}),iz=e=>{let[t,n]=l(v).useState(!1),r=l(v).useRef(!1);return l(v).useEffect(()=>{var t=!0;return setTimeout(()=>{t&&(e._editModeEnabled&&(r.current=!0),n(!0),setTimeout(()=>{r.current=!1},50))},50),()=>{t=!1}},[]),{editorEnabled:t&&e._editModeEnabled,selectAll:r.current}},iB=(e,t)=>{let[n,r]=l(v).useReducer(e=>e+1,0),i=l(v).useRef(iE(t));return l(v).useLayoutEffect(()=>{if(i.current=iE(t),i.current)return;let n=!0;return(async()=>{i.current=!1,r();let o=id(`text ${t}`);await e.loadFont(t),l(A).Util.requestAnimFrame(o),n&&(i.current=!0,r())})(),()=>{n=!1}},[t]),[i.current]},iU=({fontLoaded:e,fontFamily:t,fontSize:n,lineHeight:r})=>l(v).useMemo(()=>{if("number"==typeof r)return r;let e=document.createElement("div");e.style.fontFamily=t,e.style.fontSize=n+"px",e.style.lineHeight=r,e.innerText="Test text",document.body.appendChild(e);let i=e.offsetHeight;return document.body.removeChild(e),i/n},[e,t,n,r]);function iH(e){let t=l(v).useRef(e),n=l(v).useRef(e);return l(v).useMemo(()=>{n.current=t.current,t.current=e},[e]),n.current}let iV=P(({element:e,store:t})=>{let n=l(v).useRef(null),r=l(v).useRef(null),{editorEnabled:i,selectAll:o}=iz(e),[a,s]=l(v).useState(!1),[u,c]=l(v).useState(!1),d=l(v).useRef(e.a.height),h=t.selectedElements.indexOf(e)>=0,{textVerticalResizeEnabled:f}=ik,g=iH(e.fontFamily),[m,b]=l(v).useState([]);l(v).useEffect(()=>{let e=n.current?.textArr??[];JSON.stringify(e)!==JSON.stringify(m)&&b(e)}),l(v).useEffect(()=>{if(e.a.width)return;let t=n.current;t.width(600),e.set({width:1.4*t.getTextWidth()})},[]),l(v).useLayoutEffect(()=>(0,y.autorun)(()=>{iT(n.current,e)}));let[w]=iB(t,e.fontFamily),x=iP(e.text),_=()=>{let e=n.current.clone({height:void 0}),t=Math.ceil(e.fontSize()*e.lineHeight()*e.textArr.length+1);return e.destroy(),t};l(v).useLayoutEffect(()=>{if(!w)return;let{textOverflow:r}=ik;if(!e.a.height){let n=_();t.history.ignore(()=>{e.set({height:n})},!1,!0);return}if("change-font-size"!==r||u||t.isPlaying){if("resize"===r){let r=_();f&&e.a.height<r&&t.history.ignore(()=>{e.set({height:r}),n.current.height(r)},!1,!0),f||e.a.height===r||t.history.ignore(()=>{e.set({height:r}),n.current.height(r)},!1,!0)}}else{let r=function(e,t){let n=e.fontSize(),r=e.height(),i=iP(t.text),o=t.a.fontSize;e.height(void 0);let a=Math.round(2*t.a.fontSize)-1;for(let n=1;n<a;n++){let n=t.a.height&&e.height()>t.a.height,r=i.split("\n").join(" ").split(/[\s-]+/),a=e.textArr.map(e=>e.text).join(";"),l=r.find(e=>!a.includes(e)||(a=a.replace(e,""),!1));if(!(n||l))break;o-=.5,e.fontSize(o)}return e.fontSize(n),e.height(r),o}(n.current,e);if(r!==e.a.fontSize){t.history.ignore(()=>{e.set({fontSize:r})},!1,!0);return}let i=_();e.a.height===i||f||t.history.ignore(()=>{e.set({height:i})},!1,!0)}}),l(v).useLayoutEffect(()=>{let t=n.current;t&&(t.width(t.width()+1e-8),t._setTextData(),iT(t,e))},[w]);let E=l(v).useRef(null),S=l(v).useRef(0),C=n=>{n.evt.preventDefault(),t.selectedShapes.find(t=>t===e)&&e.contentEditable&&(S.current=function(e){var t,n;let r=e.target,i=((t=r.getAbsoluteTransform().copy()).invert(),n=r.getStage().getPointerPosition(),t.point(n)),o=r.textArr,a=Math.floor(i.y/(r.fontSize()*r.lineHeight())),l=o.slice(0,a).reduce((e,t)=>e+t.text.length,a),s=o[a]??o[0],u=0;return"right"===r.align()?u=r.width()-s.width:"center"===r.align()&&(u=r.width()/2-s.width/2),l+Math.round((i.x-u)/s.width*s.text.length)}(n),e.toggleEditMode())},O=!x&&e.placeholder?.6:e.a.opacity;is(n,O);let k=iU({fontLoaded:w,fontFamily:e.fontFamily,fontSize:e.a.fontSize,lineHeight:e.lineHeight}),P=e.selectable||"admin"===t.role,T=ia(e),A=l(v).useMemo(()=>e.backgroundEnabled?function({lines:e,lineHeight:t,width:n,align:r="left",padding:i=0,cornerRadius:o=0}){let a,l;e.forEach((e,t)=>{e.cx=n/2,"right"===r?e.cx=n-e.width/2:"left"===r&&(e.cx=e.width/2),"justify"!==r||e.lastInParagraph||(e.width=n),"justify"===r&&(e.cx=e.width/2)});let s=`M ${e[0]?.cx} ${-i}`;e.forEach((n,r)=>{let{cx:o}=n,a=e[r-1];a&&a.width>n.width?s+=` L ${o+n.width/2+i} ${r*t+i}`:s+=` L ${o+n.width/2+i} ${r*t-i}`;let l=e[r+1];l&&l.width>n.width?s+=` L ${o+n.width/2+i} ${(r+1)*t-i}`:s+=` L ${o+n.width/2+i} ${(r+1)*t+i}`});for(var u,c,d=e.length-1;d>=0;d--){let n=e[d],{cx:r}=n,o=e[d+1];o&&o.width>n.width?s+=` L ${r-n.width/2-i} ${(d+1)*t-i}`:s+=` L ${r-n.width/2-i} ${(d+1)*t+i}`;let a=e[d-1];a&&a.width>n.width?s+=` L ${r-n.width/2-i} ${d*t+i}`:s+=` L ${r-n.width/2-i} ${d*t-i}`}return(u=function(e){let t=/-?[0-9]*\.?\d+/g;return[...e.matchAll(/[MmLlSsQqLlHhVvCcSsQqTtAaZz]/g)].map(e=>({marker:e[0],index:e.index})).reduceRight((t,n)=>{let r=e.substring(n.index,t.length?t[t.length-1].index:e.length);return t.concat([{marker:n.marker,index:n.index,chunk:r.length>0?r.substr(1,r.length-1):r}])},[]).reverse().flatMap(e=>{let n=e.chunk.match(t),r=n?n.map(parseFloat):[];return function(e,t){let n=[];switch(e.toUpperCase()){case"M":for(let r=0;r<t.length;r+=2){let i;i=e===e.toUpperCase()?0===r?"M":"L":0===r?"m":"l",n.push({marker:i,values:{x:t[r],y:t[r+1]}})}break;case"L":for(let r=0;r<t.length;r+=2)n.push({marker:e,values:{x:t[r],y:t[r+1]}});break;case"H":for(let r=0;r<t.length;r++)n.push({marker:e,values:{x:t[r],y:0}});break;case"V":for(let r=0;r<t.length;r++)n.push({marker:e,values:{x:0,y:t[r]}});break;case"C":for(let r=0;r<t.length;r+=6)n.push({marker:e,values:{x1:t[r],y1:t[r+1],x2:t[r+2],y2:t[r+3],x:t[r+4],y:t[r+5]}});break;case"S":for(let r=0;r<t.length;r+=4)n.push({marker:e,values:{x2:t[r],y2:t[r+1],x:t[r+2],y:t[r+3]}});break;case"Q":for(let r=0;r<t.length;r+=4)n.push({marker:e,values:{x1:t[r],y1:t[r+1],x:t[r+2],y:t[r+3]}});break;case"T":for(let r=0;r<t.length;r+=2)n.push({marker:e,values:{x:t[r],y:t[r+1]}});break;case"A":for(let r=0;r<t.length;r+=7)n.push({marker:e,values:{radiusX:t[r],radiusY:t[r+1],rotation:t[r+2],largeArc:t[r+3],sweep:t[r+4],x:t[r+5],y:t[r+6]}});break;case"Z":n.push({marker:e,values:{x:0,y:0}})}return n}(e.marker,r)}).map(r6)}(s+=" Z"),a=[],l=[],c&&u.forEach(e=>(Object.keys(e.values).forEach(t=>e.values[t]=e.values[t]&&parseFloat(e.values[t].toFixed(c))),e)),u.forEach(e=>{"M"===e.marker&&a.push([]),a[a.length-1].push(e)}),a.forEach(e=>{e.map(r4),function e(t,n){let r=["x","y"].every(e=>0===Math.round(Math.abs(t[n].values[e]-t[0].values[e])));"L"===t[n].marker&&r&&(t[n].overlap=!0,e(t,n-1)),"Z"===t[n].marker&&e(t,n-1)}(e,e.length-1);let t="Z"==e[e.length-1].marker;e.filter(e=>!e.overlap).map((e,n,r)=>{let i,a,s;let u=function e(t,n,r){var i;let o=n-1,a=r[(o%(i=r.length)+i)%i];return"Z"!==a.marker?a:e(t,o,r)}(e,n,r),c=function e(t,n,r){var i;let o=n+1,a=r[(o%(i=r.length)+i)%i];return"Z"===a.marker?e(t,o,r):a}(e,n,r),d=r8(e.values,u.values),h=r8(e.values,c.values),f=h-d,p=180/Math.PI*f,g=Math.min(o,Math.abs(function(e,t,n){let r=r9(e.values,n.values);return Math.min(r9(t.values,e.values),r)}(e,u,c)/2*Math.tan(f/2))),m=(a=0,(s=180/Math.PI*f)<0&&s>=-180||s>180&&s<360?i=r7(f/2,-g):(i=r7(f/2,g),a=1,i===1/0&&(i=g)),{offset:i,sweepFlag:a}),v=m.offset,y=m.sweepFlag,b=(0==n||n==r.length-1)&&!t;switch(e.marker){case"M":case"L":let w=[e.values.x+Math.sin(d)*v,e.values.y+Math.cos(d)*v],x=[e.values.x+Math.sin(h)*v,e.values.y+Math.cos(h)*v];b?l.push({marker:e.marker,values:e.values}):l.push({marker:e.marker,values:{x:parseFloat(w[0].toFixed(3)),y:parseFloat(w[1].toFixed(3))}}),b||"L"!==c.marker&&"M"!==c.marker||l.push({marker:"A",radius:g,values:{radiusX:g,radiusY:g,rotation:p,largeArc:0,sweep:y,x:parseFloat(x[0].toFixed(3)),y:parseFloat(x[1].toFixed(3))}});break;case"C":case"S":case"Q":case"T":case"A":case"Z":l.push({marker:e.marker,values:e.values})}})}),{path:function(e){let t=["radiusX","radiusY","rotation","largeArc","sweep","x1","y1","x2","y2","x","y"];return e.map(e=>{let n="";if("Z"!==e.marker){let r=Object.keys(e.values);n=t.filter(e=>-1!==r.indexOf(e)).map(t=>e.values[t]).join()}return`${e.marker}${n}`}).join("").trim()}(l),commands:l}).path}({lines:JSON.parse(JSON.stringify(m)),cornerRadius:e.backgroundCornerRadius*(e.a.fontSize*k*.5),lineHeight:k*e.a.fontSize,padding:e.backgroundPadding*(e.a.fontSize*k*.5),width:e.a.width,align:e.align}):"",[e.backgroundEnabled,e.backgroundCornerRadius,e.a.fontSize,k,e.backgroundPadding,e.a.width,e.align,m]),N=iI(),j=0;return"middle"===e.verticalAlign?j=(e.a.height-m.length*k*e.a.fontSize)/2:"bottom"===e.verticalAlign&&(j=e.a.height-m.length*k*e.a.fontSize),(0,p.jsxs)(l(v).Fragment,{children:[(0,p.jsx)(rX,{ref:r,x:e.a.x,y:e.a.y,rotation:e.a.rotation,hideInExport:!e.showInExport||!x,listening:!1,visible:e.backgroundEnabled,opacity:e.backgroundOpacity,data:A,fill:e.backgroundColor,offsetY:-j}),(0,p.jsx)(rY,{ref:n,id:e.id,name:"element",hideInExport:!e.showInExport||!x,editModeEnabled:e._editModeEnabled,x:e.a.x,y:e.a.y,rotation:e.a.rotation,width:e.a.width,height:e.a.height,text:x||e.placeholder,...T,stroke:e.stroke,lineJoin:"round",strokeWidth:e.strokeWidth,fillAfterStrokeEnabled:!0,fontSize:e.a.fontSize,fontFamily:`"${e.fontFamily}", "${g}"`,fontStyle:e.fontStyle+" "+e.fontWeight,textDecoration:e.textDecoration,align:e.align,verticalAlign:e.verticalAlign,draggable:N?e.draggable&&h:e.draggable,preventDefault:!N||h,opacity:O,visible:!e._editModeEnabled,ellipsis:"ellipsis"===ik.textOverflow,shadowEnabled:e.shadowEnabled,shadowBlur:e.shadowBlur,shadowOffsetX:e.shadowOffsetX,shadowOffsetY:e.shadowOffsetY,shadowColor:e.shadowColor,shadowOpacity:e.shadowOpacity,lineHeight:k,letterSpacing:e.letterSpacing*e.a.fontSize,listening:P,onDragMove:t=>{e.set({x:t.target.x(),y:t.target.y()})},onDragEnd:t=>{e.set({x:t.target.x(),y:t.target.y()})},onMouseEnter:()=>{s(!0)},onMouseLeave:()=>{s(!1)},onClick:C,onTap:C,onTransformStart:()=>{c(!0),d.current=n.current.height()},onTransform:t=>{let n=t.target;r.current?.setAttrs({x:n.x(),y:n.y(),rotation:n.rotation(),scale:n.scale()});let i=(n.getStage()?.findOne("Transformer")).getActiveAnchor();if("middle-left"===i||"middle-right"===i){let t=n.scaleX(),r=n.width()*t,i=e.a.fontSize,o=r;r<i&&(o=i,E.current&&n.position(E.current)),n.width(o),n.scaleX(1),n.scaleY(1);let a=_();if("ellipsis"!==ik.textOverflow){let t=Math.max(a,d.current);n.height(t),e.set({height:n.height()})}e.set({x:n.x(),y:n.y(),width:n.width(),rotation:n.rotation()}),iT(n,e)}if("top-center"===i||"bottom-center"===i){let n="resize"===ik.textOverflow?_():k*e.a.fontSize;t.target.height(Math.max(n,t.target.height()*t.target.scaleY())),t.target.scaleY(1)}t.target.strokeWidth(e.strokeWidth/t.target.scaleX()),E.current=t.target.position()},onTransformEnd:t=>{let n=t.target.scaleX();t.target.scaleX(1),t.target.scaleY(1),t.target.strokeWidth(e.strokeWidth),e.set({fontSize:Math.round(e.a.fontSize*n),width:Math.ceil(t.target.width()*n),x:t.target.x(),y:t.target.y(),rotation:t.target.rotation(),height:t.target.height()*n}),r.current?.setAttrs({scaleX:1,scaleY:1}),c(!1)}}),i&&(0,p.jsx)(rq,{x:e.a.x,y:e.a.y,rotation:e.a.rotation,children:(0,p.jsx)(iF,{textNodeRef:n,element:e,selectAll:o,cursorPosition:S.current,onBlur:()=>{e.toggleEditMode(!1)}})}),!u&&(a||h)&&(0,p.jsx)(iN,{element:e})]})});var v=h("8NFma"),y=h("2SBKn"),v=h("8NFma");function iq(e){let t={fill:"",stroke:""};return e.getAttribute("fill")&&"none"!==e.getAttribute("fill")&&(t.fill=e.getAttribute("fill")),!t.fill&&e.style.fill&&"none"!==e.style.fill&&(t.fill=e.style.fill),e.getAttribute("stroke")&&(t.stroke=e.getAttribute("stroke")),!t.stroke&&e.style.stroke&&(t.stroke=e.style.stroke),t.stroke||t.fill||(t.fill="black"),t}let iG=["path","rect","circle"];function iW(e){for(var t=[],n=e.getElementsByTagName("*"),r=0,i=n.length;r<i;r++){let e=n[r];!function(e){for(;e.parentNode;){if("defs"===e.nodeName)return!0;e=e.parentNode}return!1}(e)&&(null!==e.getAttribute("fill")&&t.push(e),null!==e.getAttribute("stroke")?t.push(e):e.style&&e.style.fill?t.push(e):iG.indexOf(e.nodeName)>=0&&t.push(e))}return t}async function i$(e){let t=await fetch(e);return iY(await t.text())}async function iK(e){let t=await fetch(e,{mode:"cors"});return await t.text()}function iY(e){return"data:image/svg+xml;base64,"+window.btoa(unescape(encodeURIComponent(e)))}async function iX(e){let t=await iK(e),n=new DOMParser().parseFromString(t,"image/svg+xml").documentElement.getAttribute("viewBox"),[r,i,o,a]=n?.split(" ")||[];return{width:parseFloat(o),height:parseFloat(a)}}function iZ(e){var t=new DOMParser().parseFromString(e,"image/svg+xml");let n=t.documentElement.getAttribute("viewBox"),[r,i,o,a]=n?.split(" ")||[],l=t.documentElement.getAttribute("width");l||t.documentElement.setAttribute("width",o+"px");let s=t.documentElement.getAttribute("height");if((!s||s.indexOf("%")>=0)&&t.documentElement.setAttribute("height",a+"px"),l&&l.indexOf("%")>=0&&s&&-1===s.indexOf("%")){let e=parseFloat(s)/parseFloat(a);t.documentElement.setAttribute("width",e*parseFloat(o)+"px")}if(s&&s.indexOf("%")>=0&&l&&-1===l.indexOf("%")){let e=parseFloat(l)/parseFloat(o);t.documentElement.setAttribute("height",e*parseFloat(a)+"px")}return new XMLSerializer().serializeToString(t)}let iQ=(e,t)=>{if(!e||!t)return!1;let n=l(A).Util.colorToRGBA(e),r=l(A).Util.colorToRGBA(t);if(n&&r)return n.r===r.r&&n.g===r.g&&n.b===r.b&&n.a===r.a};function iJ(e,t){var n=new DOMParser().parseFromString(e,"image/svg+xml");let r=iW(n),i=Array.from(t.keys());return r.forEach(e=>{let{fill:r,stroke:o}=iq(e);[{prop:"fill",color:r},{prop:"stroke",color:o}].forEach(({prop:r,color:o})=>{let a=i.find(e=>iQ(e,o));if(a){let i=t.get(a);if(ir(i)){let{rotation:t,stops:o}=io(i),a=o.map(e=>({offset:100*e.offset+"%","stop-color":e.color})),s="color"+Math.round(1e8*Math.random());(function(e,t,n,r){var i=e.namespaceURI,o=document.createElementNS(i,"linearGradient");let a=l(A).Util.degToRad(n+90),s=(Math.cos(a)+1)/2,u=(Math.sin(a)+1)/2,c=(Math.cos(a+Math.PI)+1)/2,d=(Math.sin(a+Math.PI)+1)/2;o.setAttribute("x1",100*s+"%"),o.setAttribute("y1",100*u+"%"),o.setAttribute("x2",100*c+"%"),o.setAttribute("y2",100*d+"%"),o.setAttribute("gradientUnits","userSpaceOnUse"),o.setAttribute("id",t);for(var h=0;h<r.length;h++){var f=r[h],p=document.createElementNS(i,"stop");for(var g in f)f.hasOwnProperty(g)&&p.setAttribute(g,f[g]);o.appendChild(p)}(e.querySelector("defs")||e.insertBefore(document.createElementNS(i,"defs"),e.firstChild)).appendChild(o)})(n.children[0],s,t,a),e.style[r]=null,e.setAttribute(r,`url('#${s}')`)}else e.style[r]=t.get(a)}})}),iY(new XMLSerializer().serializeToString(n))}let i0=e=>{let[t,n]=l(v).useState([]);return l(v).useEffect(()=>{let t=!1;return(async()=>{n([]);let r=function(e){let t=iW(new DOMParser().parseFromString(e,"image/svg+xml")),n=[];return t.forEach(e=>{let{fill:t,stroke:r}=iq(e);[t,r].forEach(e=>{e&&l(A).Util.colorToRGBA(e)&&-1===n.indexOf(e)&&n.push(e)})}),n}(await iK(e));t||n(r)})(),()=>{t=!0}},[e]),t};function i1(){return document.createElement("canvas")}async function i2(e){return e.indexOf("data:image/svg+xml")>=0||e.indexOf(".svg")>=0?iY(iZ(await iK(e))):e}let i3=e=>{let[t,n]=l(v).useState(e);return l(v).useEffect(()=>{(async()=>{let r=await i2(e);r!==t&&n(r)})()},[e]),t};function i5(e,t){return{x:(e.x+t.x)/2,y:(e.y+t.y)/2}}let i6=(e,t,n)=>{let r=l(v).useMemo(()=>{let{flipX:r,flipY:i}=e,o="svg"===e.type||e.src.indexOf("data:image/svg+xml")>=0||e.src.indexOf(".svg")>=0,a=navigator.userAgent.toLowerCase().indexOf("firefox")>-1&&o||e.maskSrc;if(!r&&!i&&!a)return t;if(!t||!t.width||!t.height)return null;let l=i1(),s=1;"svg"===e.type&&(s=Math.max(e.a.width/t.width*n,e.a.height/t.height*n)),l.width=Math.max(t.width*s,1),l.height=Math.max(t.height*s,1);let u=r?-l.width:0,c=i?-l.height:0;return l.getContext("2d")?.scale(r?-1:1,i?-1:1),l.getContext("2d")?.drawImage(t,u,c,l.width,l.height),l},[e.maskSrc,e.flipX,e.flipY,t,e.a.width,e.a.height,n]);return l(v).useEffect(()=>()=>{r&&"CANVAS"===r.nodeName&&l(A).Util.releaseCanvas(r)},[r]),r},i4=(e,t)=>{let[n,r]=on(e.maskSrc,"anonymous");return or(e.maskSrc?r:"loaded",e.id+"-mask"),l(v).useMemo(()=>{if(!n||!t||!t.width||!t.height)return t;let r=i1();r.width=Math.max(t.width,1),r.height=Math.max(t.height,1);let i=r.getContext("2d");if(!i)return t;i.drawImage(t,0,0),i.globalCompositeOperation="source-in";let o=function(e,t){let n,r;let i=t.width/t.height;return i>=e.width/e.height?(n=e.width,r=e.width/i):(n=e.height*i,r=e.height),{x:(e.width-n)/2,y:(e.height-r)/2,width:n,height:r}}(n,e);return i.drawImage(n,o.x,o.y,o.width,o.height,0,0,t.width,t.height),r},[t,n,e.a.width,e.a.height])},i8=(e,t,n,r,i=0,o=!1)=>{let a=Math.floor(Math.max(e.a.width*r,1)),s=Math.floor(Math.max(e.a.height*r,1)),u=Math.min(i*r,a/2,s/2),c=Math.max(e.a.width/n.width,e.a.height/n.height)*r,d=e.page._exporting&&ik.imageDownScalingEnabled&&c<1&&!o,h=0===n.x&&0===n.y&&n.width===t?.width&&n.height===t?.height,f=l(v).useMemo(()=>{if(!t||!t.width||!t.height)return;let e=0===u,n=!d;if(!h||!e||!n)return i1()},[t,u,d,h]);return l(v).useLayoutEffect(()=>{if(!f||!t)return;f.width=a,f.height=s;let e=f.getContext("2d");if(!e)return;u&&(e.beginPath(),e.moveTo(u,0),e.lineTo(a-u,0),e.arc(a-u,u,u,3*Math.PI/2,0,!1),e.lineTo(a,s-u),e.arc(a-u,s-u,u,0,Math.PI/2,!1),e.lineTo(u,s),e.arc(u,s-u,u,Math.PI/2,Math.PI,!1),e.lineTo(0,u),e.arc(u,u,u,Math.PI,3*Math.PI/2,!1),e.clip());let r=d?function(e,t){let n=i1();n.width=e.width,n.height=e.height,n.getContext("2d")?.drawImage(e,0,0,n.width,n.height);let r=function(e,t,n,r,i,o,a){for(var l=new ImageData(t,n),s=new Int32Array(e.data.buffer),u=e.width,c=new Int32Array(l.data.buffer),d=l.width,h=t/o,f=n/a,p=Math.round(1/h),g=Math.round(1/f),m=p*g,v=0;v<l.height;v++)for(var y=0;y<d;y++){for(var b=0+Math.round(y/h)+(0+Math.round(v/f))*u,w=0,x=0,_=0,E=0,S=0;S<g;S++)for(var C=0;C<p;C++){var O=s[b+C+S*u];w+=O<<24>>>24,x+=O<<16>>>24,_+=O<<8>>>24,E+=O>>>24}w=Math.round(w/m),x=Math.round(x/m),_=Math.round(_/m),E=Math.round(E/m),c[y+v*d]=E<<24|_<<16|x<<8|w}return l}(n.getContext("2d").getImageData(0,0,n.width,n.height),Math.floor(n.width*t),Math.floor(n.height*t),0,0,n.width,n.height);return n.width=Math.floor(n.width*t),n.height=Math.floor(n.height*t),n.getContext("2d")?.putImageData(r,0,0),n}(t,c):t,i=d?{x:Math.floor(n.x*c),y:Math.floor(n.y*c),width:Math.floor(n.width*c),height:Math.floor(n.height*c)}:n;e.drawImage(r,i.x,i.y,i.width,i.height,0,0,f.width,f.height)},[f,e.a.width,e.a.height,n.x,n.y,n.width,n.height,i,r,o,e.page._exporting,d]),l(v).useEffect(()=>()=>{f&&"CANVAS"===f.nodeName&&l(A).Util.releaseCanvas(f)},[f]),f||t},i9=(e,t,n,r)=>{let[i,o]=on(i3(e.clipSrc||""),"anonymous");or(e.clipSrc?o:"loaded",e.id+"-clip");let a=l(v).useMemo(()=>{if(t&&i)return i1()},[t,i]);return l(v).useLayoutEffect(()=>{if(!i||!t||!t.width||!t.height||!i||!i.width||!i.height||!a)return;let r=i1(),o=Math.max(e.a.width/i.width*n,e.a.height/i.height*n);r.width=i.width*o,r.height=i.height*o,r.getContext("2d")?.drawImage(i,0,0,r.width,r.height),a.width=Math.max(t.width,1),a.height=Math.max(t.height,1);let s=a.getContext("2d");s&&(s.save(),s.drawImage(r,0,0,t.width,t.height),l(A).Util.releaseCanvas(r),s.globalCompositeOperation="source-in",s.drawImage(t,0,0,a.width,a.height),s.restore())},[a,t,i,e.a.width,e.a.height,n,...r]),e.clipSrc&&i?a:t},i7=i1(),oe=P(({element:e})=>{let t=Math.min(30,e.a.width/4,e.a.height/4),n=l(v).useRef(null);return l(v).useEffect(()=>{let e=n.current;if(!e)return;let t=new(l(A)).Animation(t=>{e.rotate((t?.timeDiff||0)/2)},e.getLayer());return t.start(),()=>{t.stop()}}),(0,p.jsxs)(rq,{x:e.x,y:e.y,rotation:e.rotation,listening:!1,opacity:e.a.opacity,hideInExport:!e.showInExport,children:[(0,p.jsx)(rW,{width:e.a.width,height:e.a.height,fill:"rgba(124, 173, 212, 0.8)"}),(0,p.jsx)("Arc",{ref:n,x:e.a.width/2,y:e.a.height/2,fill:"white",outerRadius:Math.abs(t),innerRadius:Math.max(1,t-5),angle:270})]})}),ot=P(({element:e})=>{let t="Can not load the image...",n=Math.max(10,Math.min(30,e.a.width/t.length));return(0,p.jsxs)(rq,{x:e.x,y:e.y,rotation:e.rotation,listening:!1,opacity:e.a.opacity,hideInExport:!e.showInExport,children:[(0,p.jsx)(rW,{width:e.a.width,height:e.a.height,fill:"rgba(223, 102, 102, 0.8)"}),(0,p.jsx)(rY,{text:t,fontSize:n,width:e.a.width,height:e.a.height,align:"center",fill:"white",verticalAlign:"middle",padding:5})]})}),on=l(r0),or=(e,t)=>{let n=l(v).useRef(),r=()=>{n.current?.(),n.current=void 0};l(v).useEffect(()=>r,[]),l(v).useLayoutEffect(()=>{"loading"!==e||n.current||(n.current=id(`image ${t}`)),"loading"!==e&&r(),"failed"===e&&ig(`image ${t}`)},[e])},oi=({image:e,status:t,type:n})=>{let r=l(v).useRef();return l(v).useEffect(()=>{r.current=e||r.current},[e]),"failed"!==t||"failed"!==t&&"svg"===n?r.current:void 0},oo=e=>{let[t,n]=l(v).useReducer(e=>e+1,0),r=l(v).useRef("loading"),i=l(v).useRef(e.src),o=l(v).useRef(e.src);return(o.current!==e.src&&(o.current=e.src,r.current="loading"),l(v).useEffect(()=>{if("svg"!==e.type||!e.src)return;let t=!1;return(async()=>{r.current="loading",n();let o=iJ(iZ(await iK(e.src)),e.colorsReplace);t||(i.current=o,r.current="loaded",n())})(),()=>{t=!0}},[e.src,JSON.stringify(e.colorsReplace)]),"svg"!==e.type)?[e.src,"loaded"]:[i.current,r.current]},oa=P(({element:e,store:t})=>{let n,r;let[i,o]=l(v).useState(!1),a=l(v).useRef(null),s=l(v).useRef(null),[u,c]=l(v).useState(!1),d=t.selectedElements.indexOf(e)>=0,[h,f]=oo(e),[g,m]=on(h,"anonymous");or("svg"!==e.type||"loaded"===f?m:"loading",e.id);let b=oi({image:g,status:m,type:e.type}),w=i4(e,i6(e,g||b,t._elementsPixelRatio))||i7,{cropX:x,cropY:_,cropWidth:E,cropHeight:S}=e;"loaded"!==m&&(x=_=0,E=S=1);let C=w.width*E,O=w.height*S,k=e.a.width/e.a.height,P=C/O,T="svg"===e.type;T?(n=C,r=O):k>=P?(n=C,r=C/k):(n=O*k,r=O);let N={x:w.width*x,y:w.height*_,width:n,height:r},j=e.cornerRadius??0,R=e.page._exporting?1:Math.min(2,t.scale),I=t._elementsPixelRatio*R,L=i9(e,i8(e,w,N,I,j,i||e._cropModeEnabled||"svg"===e.type),I,[N,j,I]),M=Math.max(e.a.width/n,e.a.height/r);l(v).useEffect(()=>{if(!e._cropModeEnabled)return;let t=a.current?.getStage();function n(t){e._cropModeEnabled&&t.target!==s.current&&e.toggleCropMode(!1)}function r(n){e._cropModeEnabled&&n.target.parentNode!==t.content&&e.toggleCropMode(!1)}return document.body.addEventListener("click",r),t?.on("click",n),t?.on("tap",n),()=>{document.body.removeEventListener("click",r),document.body.removeEventListener("touchstart",r),t?.off("click",n),t?.off("click",n)}},[e._cropModeEnabled]),l(v).useLayoutEffect(()=>{if(!i&&!e._cropModeEnabled)return iT(a.current,e),(0,y.autorun)(()=>{iT(a.current,e)},{delay:100})},[w,i,E,S,e._cropModeEnabled]),l(v).useLayoutEffect(()=>{i||e._cropModeEnabled?a.current?.clearCache():iT(a.current,e)},[i,e.a.width,e.a.height,e._cropModeEnabled]),l(v).useEffect(()=>{iT(a.current,e)},[e.shadowEnabled,e.shadowBlur,e.cornerRadius,e.shadowColor,e.shadowOffsetX,e.shadowOffsetY,e.shadowOpacity]);let D=l(v).useRef(null),F=l(v).useRef(null),z=l(v).useRef(null);l(v).useLayoutEffect(()=>{e._cropModeEnabled&&(F.current.nodes([D.current]),z.current.nodes([s.current]))},[e._cropModeEnabled]);var B=l(v).useRef(null),U=l(v).useRef(0),H=l(v).useRef(!1);let V=t=>{t.evt.touches?.length>2&&t.target.stopDrag(),Math.round(t.target.x())>0&&(t.target.x(0),t.target.scaleX(1)),Math.round(t.target.y())>0&&(t.target.y(0),t.target.scaleY(1));let i=t.target.width()*t.target.scaleX(),o=t.target.height()*t.target.scaleY(),a=Math.min(1,n/i),l=Math.min(1,r/o),s=Math.min(1-a,Math.max(0,Math.round(-t.target.x())/i)),u=Math.min(1-l,Math.max(0,Math.round(-t.target.y())/o));t.target.setAttrs({x:-s*w.width,y:-u*w.height,scaleX:1,scaleY:1}),e.set({cropX:s,cropY:u,cropWidth:a,cropHeight:l})},q=()=>{"image"===e.type&&e.contentEditable&&setTimeout(()=>{e.toggleCropMode(!0)})},G="svg"===e.type&&b,W="loading"===m&&!G,$="failed"===m,K=!W&&!$,Y=l(v).useRef({cropX:0,cropY:0,cropWidth:0,cropHeight:0}),X=K?e.a.opacity:0;is(a,X);let Z=e.selectable||"admin"===t.role,Q=iI();return(0,p.jsxs)(l(v).Fragment,{children:[W&&(0,p.jsx)(oe,{element:e}),$&&(0,p.jsx)(ot,{element:e}),(0,p.jsx)(rK,{ref:a,name:"element",id:e.id,image:L,x:e.a.x,y:e.a.y,width:e.a.width||1,height:e.a.height||1,rotation:e.rotation,opacity:X,shadowEnabled:e.shadowEnabled,shadowBlur:e.shadowBlur,shadowOffsetX:e.shadowOffsetX,shadowOffsetY:e.shadowOffsetY,shadowColor:e.shadowColor,shadowOpacity:e.shadowOpacity,customCrop:N,listening:Z,draggable:Q?e.draggable&&d:e.draggable,preventDefault:!Q||d,hideInExport:!e.showInExport,onMouseEnter:()=>{c(!0)},onMouseLeave:()=>{c(!1)},onDragMove:t=>{e.set({x:t.target.x(),y:t.target.y()})},onDragEnd:t=>{e.set({x:t.target.x(),y:t.target.y()})},onDblClick:q,onDblTap:q,onTransformStart:()=>{o(!0),Y.current={cropX:e.cropX,cropY:e.cropY,cropWidth:e.cropWidth,cropHeight:e.cropHeight}},onTransform:t=>{let i=t.currentTarget,o=1e-7>Math.abs(i.scaleX()-1)?1:i.scaleX(),a=1e-7>Math.abs(i.scaleY()-1)?1:i.scaleY();i.scaleX(1),i.scaleY(1);let l=t.target.getStage()?.findOne("Transformer"),s=Math.min(1-n/w.width,Math.max(0,e.cropX)),u=Math.min(1-r/w.height,Math.max(0,e.cropY)),c=l.getActiveAnchor(),d=!(c.indexOf("middle")>=0||c.indexOf("center")>=0),h=!d&&o<1&&Y.current.cropHeight>r/w.height,f=d?e.cropWidth:e.cropWidth*o;h&&(f=e.cropWidth);let p=!d&&a<1&&Y.current.cropWidth>n/w.width,g=d?e.cropHeight:e.cropHeight*a;p&&(g=e.cropHeight),T&&(f=e.cropWidth,g=e.cropHeight),e.set({cropX:s,cropY:u,x:i.x(),y:i.y(),width:i.width()*o,height:i.height()*a,rotation:t.target.rotation(),cropWidth:Math.min(f,1-s),cropHeight:Math.min(g,1-u)})},onTransformEnd:t=>{let i=t.currentTarget;e.set({width:i.width(),height:i.height(),x:i.x(),y:i.y(),rotation:t.target.rotation(),cropWidth:n/w.width,cropHeight:r/w.height}),o(!1)}}),(0,p.jsx)(rW,{x:e.x,y:e.y,width:Math.max(e.a.width-e.borderSize,0),height:Math.max(e.a.height-e.borderSize,0),opacity:X,offsetX:-e.borderSize/2,offsetY:-e.borderSize/2,stroke:e.borderColor,strokeWidth:e.borderSize,listening:!1,visible:!!e.borderSize,rotation:e.rotation,cornerRadius:Math.max(0,j-e.borderSize),hideInExport:!e.showInExport}),e._cropModeEnabled&&(0,p.jsxs)(r5,{selector:".page-abs-container",enabled:!0,children:[(0,p.jsx)(rW,{x:-window.innerWidth/t.scale,y:-window.innerWidth/t.scale,width:window.innerWidth/t.scale*3,height:window.innerWidth/t.scale*3,fill:"rgba(0,0,0,0.3)"}),(0,p.jsx)(rK,{listening:!1,image:L,x:e.x,y:e.y,width:e.a.width,height:e.a.height,rotation:e.rotation,shadowEnabled:e.shadowEnabled,shadowBlur:e.shadowBlur}),(0,p.jsxs)(rq,{x:e.x,y:e.y,rotation:e.rotation,scaleX:M,scaleY:M,children:[(0,p.jsx)(rK,{image:w,ref:s,opacity:.4,draggable:!0,x:-e.cropX*w.width,y:-e.cropY*w.height,onDragMove:V,onTransform:V,onTouchMove:e=>{e.evt.preventDefault();let t=e.target.getStage().getPointersPositions();var n=t[0],r=t[1];let i=e.target;if(n&&!r&&!i.isDragging()&&H.current&&(i.startDrag(),H.current=!1),n&&r){l(A).hitOnDragEnabled=!0,i.isDragging()&&(H.current=!0,i.stopDrag());let t=e.target.getAbsoluteTransform().copy();t.invert();var o={x:n.x,y:n.y},a={x:r.x,y:r.y};if(!B.current){B.current=i5(o,a);return}var s=i5(o,a),u=Math.sqrt(Math.pow(a.x-o.x,2)+Math.pow(a.y-o.y,2));U.current||(U.current=u);let g=i.position();var c={x:s.x-g.x,y:s.y-g.y},d=u/U.current;i.scaleX(d),i.scaleY(d);let m=t.point(s),v=t.point(B.current);var h=m.x-v.x,f=m.y-v.y,p={x:Math.min(0,s.x-c.x*d+h),y:Math.min(0,s.y-c.y*d+f)};i.position(p),U.current=u,B.current=s,V(e)}},onTouchEnd:e=>{U.current=0,B.current=null,l(A).hitOnDragEnabled=!1}}),(0,p.jsx)(rZ,{ref:z,anchorSize:20,enabledAnchors:["top-left","top-right","bottom-left","bottom-right"],boundBoxFunc:(e,t)=>t.width<5||t.height<5?e:t,rotateEnabled:!1,borderEnabled:!1,anchorCornerRadius:10,anchorStrokeWidth:2,borderStrokeWidth:2}),(0,p.jsx)(rW,{width:n,height:r,ref:D,listening:!1,onTransform:t=>{t.target.x()<-e.cropX*w.width-1e-9&&(t.target.x(-e.cropX*w.width),t.target.scaleX(1)),t.target.y()<-e.cropY*w.height-1e-9&&(t.target.y(-e.cropY*w.height),t.target.scaleY(1));let n=Math.min(1,Math.max(0,e.cropX+t.target.x()/w.width)),r=Math.min(1,Math.max(0,t.target.y()/w.height+e.cropY)),i=t.target.width()*t.target.scaleX(),o=t.target.height()*t.target.scaleY(),a=Math.min(1-n,i/w.width),l=Math.min(1-r,o/w.height),s=t.target.getAbsolutePosition(t.target.getParent().getParent());t.target.scale({x:1,y:1}),t.target.position({x:0,y:0}),e.set({x:s.x,y:s.y,cropX:n,cropY:r,cropWidth:a,cropHeight:l,width:Math.min(i*M,w.width*(1-n)*M),height:Math.min(o*M,w.height*(1-r)*M)})}}),(0,p.jsx)(rZ,{ref:F,enabledAnchors:["top-left","top-right","bottom-left","bottom-right"],boundBoxFunc:(e,t)=>t.width<5||t.height<5?e:t,visible:e.resizable,keepRatio:!1,rotateEnabled:!1,anchorFill:"rgb(240, 240, 240)",anchorStrokeWidth:2,borderStrokeWidth:2})]})]}),(u||d)&&(0,p.jsx)(iN,{element:e})]})});var v=h("8NFma"),ol={};kA=function(e){for(var t,n=e.length,r=n%3,i=[],o=0,a=n-r;o<a;o+=16383)i.push(function(e,t,n){for(var r,i=[],o=t;o<n;o+=3)i.push(os[(r=(e[o]<<16&16711680)+(e[o+1]<<8&65280)+(255&e[o+2]))>>18&63]+os[r>>12&63]+os[r>>6&63]+os[63&r]);return i.join("")}(e,o,o+16383>a?a:o+16383));return 1===r?i.push(os[(t=e[n-1])>>2]+os[t<<4&63]+"=="):2===r&&i.push(os[(t=(e[n-2]<<8)+e[n-1])>>10]+os[t>>4&63]+os[t<<2&63]+"="),i.join("")};for(var os=[],ou=[],oc="undefined"!=typeof Uint8Array?Uint8Array:Array,od="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",oh=0,of=od.length;oh<of;++oh)os[oh]=od[oh],ou[od.charCodeAt(oh)]=oh;ou["-".charCodeAt(0)]=62,ou["_".charCodeAt(0)]=63,kN=function(e,t,n,r,i){var o,a,l=8*i-r-1,s=(1<<l)-1,u=s>>1,c=-7,d=n?i-1:0,h=n?-1:1,f=e[t+d];for(d+=h,o=f&(1<<-c)-1,f>>=-c,c+=l;c>0;o=256*o+e[t+d],d+=h,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=r;c>0;a=256*a+e[t+d],d+=h,c-=8);if(0===o)o=1-u;else{if(o===s)return a?NaN:1/0*(f?-1:1);a+=Math.pow(2,r),o-=u}return(f?-1:1)*a*Math.pow(2,o-r)},kj=function(e,t,n,r,i,o){var a,l,s,u=8*o-i-1,c=(1<<u)-1,d=c>>1,h=23===i?5960464477539062e-23:0,f=r?0:o-1,p=r?1:-1,g=t<0||0===t&&1/t<0?1:0;for(isNaN(t=Math.abs(t))||t===1/0?(l=isNaN(t)?1:0,a=c):(a=Math.floor(Math.log(t)/Math.LN2),t*(s=Math.pow(2,-a))<1&&(a--,s*=2),a+d>=1?t+=h/s:t+=h*Math.pow(2,1-d),t*s>=2&&(a++,s/=2),a+d>=c?(l=0,a=c):a+d>=1?(l=(t*s-1)*Math.pow(2,i),a+=d):(l=t*Math.pow(2,d-1)*Math.pow(2,i),a=0));i>=8;e[n+f]=255&l,f+=p,l/=256,i-=8);for(a=a<<i|l,u+=i;u>0;e[n+f]=255&a,f+=p,a/=256,u-=8);e[n+f-p]|=128*g};let op="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;function og(e){if(e>2147483647)throw RangeError('The value "'+e+'" is invalid for option "size"');let t=new Uint8Array(e);return Object.setPrototypeOf(t,om.prototype),t}function om(e,t,n){if("number"==typeof e){if("string"==typeof t)throw TypeError('The "string" argument must be of type string. Received type number');return ob(e)}return ov(e,t,n)}function ov(e,t,n){if("string"==typeof e)return function(e,t){if(("string"!=typeof t||""===t)&&(t="utf8"),!om.isEncoding(t))throw TypeError("Unknown encoding: "+t);let n=0|oE(e,t),r=og(n),i=r.write(e,t);return i!==n&&(r=r.slice(0,i)),r}(e,t);if(ArrayBuffer.isView(e))return function(e){if(oW(e,Uint8Array)){let t=new Uint8Array(e);return ox(t.buffer,t.byteOffset,t.byteLength)}return ow(e)}(e);if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(oW(e,ArrayBuffer)||e&&oW(e.buffer,ArrayBuffer)||"undefined"!=typeof SharedArrayBuffer&&(oW(e,SharedArrayBuffer)||e&&oW(e.buffer,SharedArrayBuffer)))return ox(e,t,n);if("number"==typeof e)throw TypeError('The "value" argument must not be of type number. Received type number');let r=e.valueOf&&e.valueOf();if(null!=r&&r!==e)return om.from(r,t,n);let i=function(e){var t;if(om.isBuffer(e)){let t=0|o_(e.length),n=og(t);return 0===n.length||e.copy(n,0,0,t),n}return void 0!==e.length?"number"!=typeof e.length||(t=e.length)!=t?og(0):ow(e):"Buffer"===e.type&&Array.isArray(e.data)?ow(e.data):void 0}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return om.from(e[Symbol.toPrimitive]("string"),t,n);throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function oy(e){if("number"!=typeof e)throw TypeError('"size" argument must be of type number');if(e<0)throw RangeError('The value "'+e+'" is invalid for option "size"')}function ob(e){return oy(e),og(e<0?0:0|o_(e))}function ow(e){let t=e.length<0?0:0|o_(e.length),n=og(t);for(let r=0;r<t;r+=1)n[r]=255&e[r];return n}function ox(e,t,n){let r;if(t<0||e.byteLength<t)throw RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(n||0))throw RangeError('"length" is outside of buffer bounds');return Object.setPrototypeOf(r=void 0===t&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,t):new Uint8Array(e,t,n),om.prototype),r}function o_(e){if(e>=2147483647)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|e}function oE(e,t){if(om.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||oW(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);let n=e.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return oV(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return oq(e).length;default:if(i)return r?-1:oV(e).length;t=(""+t).toLowerCase(),i=!0}}function oS(e,t,n){let r=!1;if((void 0===t||t<0)&&(t=0),t>this.length||((void 0===n||n>this.length)&&(n=this.length),n<=0||(n>>>=0)<=(t>>>=0)))return"";for(e||(e="utf8");;)switch(e){case"hex":return function(e,t,n){let r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);let i="";for(let r=t;r<n;++r)i+=o$[e[r]];return i}(this,t,n);case"utf8":case"utf-8":return oP(this,t,n);case"ascii":return function(e,t,n){let r="";n=Math.min(e.length,n);for(let i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}(this,t,n);case"latin1":case"binary":return function(e,t,n){let r="";n=Math.min(e.length,n);for(let i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}(this,t,n);case"base64":var i,o;return i=t,o=n,0===i&&o===this.length?kA(this):kA(this.slice(i,o));case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return function(e,t,n){let r=e.slice(t,n),i="";for(let e=0;e<r.length-1;e+=2)i+=String.fromCharCode(r[e]+256*r[e+1]);return i}(this,t,n);default:if(r)throw TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function oC(e,t,n){let r=e[t];e[t]=e[n],e[n]=r}function oO(e,t,n,r,i){var o;if(0===e.length)return -1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),(o=n=+n)!=o&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return -1;n=e.length-1}else if(n<0){if(!i)return -1;n=0}if("string"==typeof t&&(t=om.from(t,r)),om.isBuffer(t))return 0===t.length?-1:ok(e,t,n,r,i);if("number"==typeof t)return(t&=255,"function"==typeof Uint8Array.prototype.indexOf)?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):ok(e,[t],n,r,i);throw TypeError("val must be string, number or Buffer")}function ok(e,t,n,r,i){let o,a=1,l=e.length,s=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return -1;a=2,l/=2,s/=2,n/=2}function u(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){let r=-1;for(o=n;o<l;o++)if(u(e,o)===u(t,-1===r?0:o-r)){if(-1===r&&(r=o),o-r+1===s)return r*a}else -1!==r&&(o-=o-r),r=-1}else for(n+s>l&&(n=l-s),o=n;o>=0;o--){let n=!0;for(let r=0;r<s;r++)if(u(e,o+r)!==u(t,r)){n=!1;break}if(n)return o}return -1}function oP(e,t,n){n=Math.min(e.length,n);let r=[],i=t;for(;i<n;){let t=e[i],o=null,a=t>239?4:t>223?3:t>191?2:1;if(i+a<=n){let n,r,l,s;switch(a){case 1:t<128&&(o=t);break;case 2:(192&(n=e[i+1]))==128&&(s=(31&t)<<6|63&n)>127&&(o=s);break;case 3:n=e[i+1],r=e[i+2],(192&n)==128&&(192&r)==128&&(s=(15&t)<<12|(63&n)<<6|63&r)>2047&&(s<55296||s>57343)&&(o=s);break;case 4:n=e[i+1],r=e[i+2],l=e[i+3],(192&n)==128&&(192&r)==128&&(192&l)==128&&(s=(15&t)<<18|(63&n)<<12|(63&r)<<6|63&l)>65535&&s<1114112&&(o=s)}}null===o?(o=65533,a=1):o>65535&&(o-=65536,r.push(o>>>10&1023|55296),o=56320|1023&o),r.push(o),i+=a}return function(e){let t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);let n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=4096));return n}(r)}function oT(e,t,n){if(e%1!=0||e<0)throw RangeError("offset is not uint");if(e+t>n)throw RangeError("Trying to access beyond buffer length")}function oA(e,t,n,r,i,o){if(!om.isBuffer(e))throw TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw RangeError('"value" argument is out of bounds');if(n+r>e.length)throw RangeError("Index out of range")}function oN(e,t,n,r,i){oz(t,r,i,e,n,7);let o=Number(t&BigInt(4294967295));e[n++]=o,o>>=8,e[n++]=o,o>>=8,e[n++]=o,o>>=8,e[n++]=o;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a,n}function oj(e,t,n,r,i){oz(t,r,i,e,n,7);let o=Number(t&BigInt(4294967295));e[n+7]=o,o>>=8,e[n+6]=o,o>>=8,e[n+5]=o,o>>=8,e[n+4]=o;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[n+3]=a,a>>=8,e[n+2]=a,a>>=8,e[n+1]=a,a>>=8,e[n]=a,n+8}function oR(e,t,n,r,i,o){if(n+r>e.length||n<0)throw RangeError("Index out of range")}function oI(e,t,n,r,i){return t=+t,n>>>=0,i||oR(e,t,n,4,34028234663852886e22,-34028234663852886e22),kj(e,t,n,r,23,4),n+4}function oL(e,t,n,r,i){return t=+t,n>>>=0,i||oR(e,t,n,8,17976931348623157e292,-17976931348623157e292),kj(e,t,n,r,52,8),n+8}om.TYPED_ARRAY_SUPPORT=function(){try{let e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),om.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(om.prototype,"parent",{enumerable:!0,get:function(){if(om.isBuffer(this))return this.buffer}}),Object.defineProperty(om.prototype,"offset",{enumerable:!0,get:function(){if(om.isBuffer(this))return this.byteOffset}}),om.poolSize=8192,om.from=function(e,t,n){return ov(e,t,n)},Object.setPrototypeOf(om.prototype,Uint8Array.prototype),Object.setPrototypeOf(om,Uint8Array),om.alloc=function(e,t,n){return(oy(e),e<=0)?og(e):void 0!==t?"string"==typeof n?og(e).fill(t,n):og(e).fill(t):og(e)},om.allocUnsafe=function(e){return ob(e)},om.allocUnsafeSlow=function(e){return ob(e)},om.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==om.prototype},om.compare=function(e,t){if(oW(e,Uint8Array)&&(e=om.from(e,e.offset,e.byteLength)),oW(t,Uint8Array)&&(t=om.from(t,t.offset,t.byteLength)),!om.isBuffer(e)||!om.isBuffer(t))throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let n=e.length,r=t.length;for(let i=0,o=Math.min(n,r);i<o;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0},om.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},om.concat=function(e,t){let n;if(!Array.isArray(e))throw TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return om.alloc(0);if(void 0===t)for(n=0,t=0;n<e.length;++n)t+=e[n].length;let r=om.allocUnsafe(t),i=0;for(n=0;n<e.length;++n){let t=e[n];if(oW(t,Uint8Array))i+t.length>r.length?(om.isBuffer(t)||(t=om.from(t)),t.copy(r,i)):Uint8Array.prototype.set.call(r,t,i);else if(om.isBuffer(t))t.copy(r,i);else throw TypeError('"list" argument must be an Array of Buffers');i+=t.length}return r},om.byteLength=oE,om.prototype._isBuffer=!0,om.prototype.swap16=function(){let e=this.length;if(e%2!=0)throw RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)oC(this,t,t+1);return this},om.prototype.swap32=function(){let e=this.length;if(e%4!=0)throw RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)oC(this,t,t+3),oC(this,t+1,t+2);return this},om.prototype.swap64=function(){let e=this.length;if(e%8!=0)throw RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)oC(this,t,t+7),oC(this,t+1,t+6),oC(this,t+2,t+5),oC(this,t+3,t+4);return this},om.prototype.toString=function(){let e=this.length;return 0===e?"":0==arguments.length?oP(this,0,e):oS.apply(this,arguments)},om.prototype.toLocaleString=om.prototype.toString,om.prototype.equals=function(e){if(!om.isBuffer(e))throw TypeError("Argument must be a Buffer");return this===e||0===om.compare(this,e)},om.prototype.inspect=function(){let e="";return e=this.toString("hex",0,50).replace(/(.{2})/g,"$1 ").trim(),this.length>50&&(e+=" ... "),"<Buffer "+e+">"},op&&(om.prototype[op]=om.prototype.inspect),om.prototype.compare=function(e,t,n,r,i){if(oW(e,Uint8Array)&&(e=om.from(e,e.offset,e.byteLength)),!om.isBuffer(e))throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return -1;if(t>=n)return 1;if(t>>>=0,n>>>=0,r>>>=0,i>>>=0,this===e)return 0;let o=i-r,a=n-t,l=Math.min(o,a),s=this.slice(r,i),u=e.slice(t,n);for(let e=0;e<l;++e)if(s[e]!==u[e]){o=s[e],a=u[e];break}return o<a?-1:a<o?1:0},om.prototype.includes=function(e,t,n){return -1!==this.indexOf(e,t,n)},om.prototype.indexOf=function(e,t,n){return oO(this,e,t,n,!0)},om.prototype.lastIndexOf=function(e,t,n){return oO(this,e,t,n,!1)},om.prototype.write=function(e,t,n,r){var i,o,a,l,s,u,c,d;if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else if(isFinite(t))t>>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0);else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let h=this.length-t;if((void 0===n||n>h)&&(n=h),e.length>0&&(n<0||t<0)||t>this.length)throw RangeError("Attempt to write outside buffer bounds");r||(r="utf8");let f=!1;for(;;)switch(r){case"hex":return function(e,t,n,r){let i;n=Number(n)||0;let o=e.length-n;r?(r=Number(r))>o&&(r=o):r=o;let a=t.length;for(r>a/2&&(r=a/2),i=0;i<r;++i){let r=parseInt(t.substr(2*i,2),16);if(r!=r)break;e[n+i]=r}return i}(this,e,t,n);case"utf8":case"utf-8":return i=t,o=n,oG(oV(e,this.length-i),this,i,o);case"ascii":case"latin1":case"binary":return a=t,l=n,oG(function(e){let t=[];for(let n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(e),this,a,l);case"base64":return s=t,u=n,oG(oq(e),this,s,u);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return c=t,d=n,oG(function(e,t){let n,r;let i=[];for(let o=0;o<e.length&&!((t-=2)<0);++o)r=(n=e.charCodeAt(o))>>8,i.push(n%256),i.push(r);return i}(e,this.length-c),this,c,d);default:if(f)throw TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),f=!0}},om.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},om.prototype.slice=function(e,t){let n=this.length;e=~~e,t=void 0===t?n:~~t,e<0?(e+=n)<0&&(e=0):e>n&&(e=n),t<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e);let r=this.subarray(e,t);return Object.setPrototypeOf(r,om.prototype),r},om.prototype.readUintLE=om.prototype.readUIntLE=function(e,t,n){e>>>=0,t>>>=0,n||oT(e,t,this.length);let r=this[e],i=1,o=0;for(;++o<t&&(i*=256);)r+=this[e+o]*i;return r},om.prototype.readUintBE=om.prototype.readUIntBE=function(e,t,n){e>>>=0,t>>>=0,n||oT(e,t,this.length);let r=this[e+--t],i=1;for(;t>0&&(i*=256);)r+=this[e+--t]*i;return r},om.prototype.readUint8=om.prototype.readUInt8=function(e,t){return e>>>=0,t||oT(e,1,this.length),this[e]},om.prototype.readUint16LE=om.prototype.readUInt16LE=function(e,t){return e>>>=0,t||oT(e,2,this.length),this[e]|this[e+1]<<8},om.prototype.readUint16BE=om.prototype.readUInt16BE=function(e,t){return e>>>=0,t||oT(e,2,this.length),this[e]<<8|this[e+1]},om.prototype.readUint32LE=om.prototype.readUInt32LE=function(e,t){return e>>>=0,t||oT(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},om.prototype.readUint32BE=om.prototype.readUInt32BE=function(e,t){return e>>>=0,t||oT(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},om.prototype.readBigUInt64LE=oK(function(e){oB(e>>>=0,"offset");let t=this[e],n=this[e+7];(void 0===t||void 0===n)&&oU(e,this.length-8);let r=t+256*this[++e]+65536*this[++e]+16777216*this[++e],i=this[++e]+256*this[++e]+65536*this[++e]+16777216*n;return BigInt(r)+(BigInt(i)<<BigInt(32))}),om.prototype.readBigUInt64BE=oK(function(e){oB(e>>>=0,"offset");let t=this[e],n=this[e+7];(void 0===t||void 0===n)&&oU(e,this.length-8);let r=16777216*t+65536*this[++e]+256*this[++e]+this[++e],i=16777216*this[++e]+65536*this[++e]+256*this[++e]+n;return(BigInt(r)<<BigInt(32))+BigInt(i)}),om.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||oT(e,t,this.length);let r=this[e],i=1,o=0;for(;++o<t&&(i*=256);)r+=this[e+o]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*t)),r},om.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||oT(e,t,this.length);let r=t,i=1,o=this[e+--r];for(;r>0&&(i*=256);)o+=this[e+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},om.prototype.readInt8=function(e,t){return(e>>>=0,t||oT(e,1,this.length),128&this[e])?-((255-this[e]+1)*1):this[e]},om.prototype.readInt16LE=function(e,t){e>>>=0,t||oT(e,2,this.length);let n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},om.prototype.readInt16BE=function(e,t){e>>>=0,t||oT(e,2,this.length);let n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},om.prototype.readInt32LE=function(e,t){return e>>>=0,t||oT(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},om.prototype.readInt32BE=function(e,t){return e>>>=0,t||oT(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},om.prototype.readBigInt64LE=oK(function(e){oB(e>>>=0,"offset");let t=this[e],n=this[e+7];return(void 0===t||void 0===n)&&oU(e,this.length-8),(BigInt(this[e+4]+256*this[e+5]+65536*this[e+6]+(n<<24))<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+16777216*this[++e])}),om.prototype.readBigInt64BE=oK(function(e){oB(e>>>=0,"offset");let t=this[e],n=this[e+7];return(void 0===t||void 0===n)&&oU(e,this.length-8),(BigInt((t<<24)+65536*this[++e]+256*this[++e]+this[++e])<<BigInt(32))+BigInt(16777216*this[++e]+65536*this[++e]+256*this[++e]+n)}),om.prototype.readFloatLE=function(e,t){return e>>>=0,t||oT(e,4,this.length),kN(this,e,!0,23,4)},om.prototype.readFloatBE=function(e,t){return e>>>=0,t||oT(e,4,this.length),kN(this,e,!1,23,4)},om.prototype.readDoubleLE=function(e,t){return e>>>=0,t||oT(e,8,this.length),kN(this,e,!0,52,8)},om.prototype.readDoubleBE=function(e,t){return e>>>=0,t||oT(e,8,this.length),kN(this,e,!1,52,8)},om.prototype.writeUintLE=om.prototype.writeUIntLE=function(e,t,n,r){if(e=+e,t>>>=0,n>>>=0,!r){let r=Math.pow(2,8*n)-1;oA(this,e,t,n,r,0)}let i=1,o=0;for(this[t]=255&e;++o<n&&(i*=256);)this[t+o]=e/i&255;return t+n},om.prototype.writeUintBE=om.prototype.writeUIntBE=function(e,t,n,r){if(e=+e,t>>>=0,n>>>=0,!r){let r=Math.pow(2,8*n)-1;oA(this,e,t,n,r,0)}let i=n-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+n},om.prototype.writeUint8=om.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||oA(this,e,t,1,255,0),this[t]=255&e,t+1},om.prototype.writeUint16LE=om.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||oA(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},om.prototype.writeUint16BE=om.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||oA(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},om.prototype.writeUint32LE=om.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||oA(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},om.prototype.writeUint32BE=om.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||oA(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},om.prototype.writeBigUInt64LE=oK(function(e,t=0){return oN(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),om.prototype.writeBigUInt64BE=oK(function(e,t=0){return oj(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),om.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){let r=Math.pow(2,8*n-1);oA(this,e,t,n,r-1,-r)}let i=0,o=1,a=0;for(this[t]=255&e;++i<n&&(o*=256);)e<0&&0===a&&0!==this[t+i-1]&&(a=1),this[t+i]=(e/o>>0)-a&255;return t+n},om.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){let r=Math.pow(2,8*n-1);oA(this,e,t,n,r-1,-r)}let i=n-1,o=1,a=0;for(this[t+i]=255&e;--i>=0&&(o*=256);)e<0&&0===a&&0!==this[t+i+1]&&(a=1),this[t+i]=(e/o>>0)-a&255;return t+n},om.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||oA(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},om.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||oA(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},om.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||oA(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},om.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||oA(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},om.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||oA(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},om.prototype.writeBigInt64LE=oK(function(e,t=0){return oN(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),om.prototype.writeBigInt64BE=oK(function(e,t=0){return oj(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),om.prototype.writeFloatLE=function(e,t,n){return oI(this,e,t,!0,n)},om.prototype.writeFloatBE=function(e,t,n){return oI(this,e,t,!1,n)},om.prototype.writeDoubleLE=function(e,t,n){return oL(this,e,t,!0,n)},om.prototype.writeDoubleBE=function(e,t,n){return oL(this,e,t,!1,n)},om.prototype.copy=function(e,t,n,r){if(!om.isBuffer(e))throw TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n||0===e.length||0===this.length)return 0;if(t<0)throw RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw RangeError("Index out of range");if(r<0)throw RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);let i=r-n;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,n,r):Uint8Array.prototype.set.call(e,this.subarray(n,r),t),i},om.prototype.fill=function(e,t,n,r){let i;if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),void 0!==r&&"string"!=typeof r)throw TypeError("encoding must be a string");if("string"==typeof r&&!om.isEncoding(r))throw TypeError("Unknown encoding: "+r);if(1===e.length){let t=e.charCodeAt(0);("utf8"===r&&t<128||"latin1"===r)&&(e=t)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<n)throw RangeError("Out of range index");if(n<=t)return this;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(i=t;i<n;++i)this[i]=e;else{let o=om.isBuffer(e)?e:om.from(e,r),a=o.length;if(0===a)throw TypeError('The value "'+e+'" is invalid for argument "value"');for(i=0;i<n-t;++i)this[i+t]=o[i%a]}return this};let oM={};function oD(e,t,n){oM[e]=class extends n{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function oF(e){let t="",n=e.length,r="-"===e[0]?1:0;for(;n>=r+4;n-=3)t=`_${e.slice(n-3,n)}${t}`;return`${e.slice(0,n)}${t}`}function oz(e,t,n,r,i,o){if(e>n||e<t){let r;let i="bigint"==typeof t?"n":"";throw r=o>3?0===t||t===BigInt(0)?`>= 0${i} and < 2${i} ** ${(o+1)*8}${i}`:`>= -(2${i} ** ${(o+1)*8-1}${i}) and < 2 ** ${(o+1)*8-1}${i}`:`>= ${t}${i} and <= ${n}${i}`,new oM.ERR_OUT_OF_RANGE("value",r,e)}oB(i,"offset"),(void 0===r[i]||void 0===r[i+o])&&oU(i,r.length-(o+1))}function oB(e,t){if("number"!=typeof e)throw new oM.ERR_INVALID_ARG_TYPE(t,"number",e)}function oU(e,t,n){if(Math.floor(e)!==e)throw oB(e,n),new oM.ERR_OUT_OF_RANGE(n||"offset","an integer",e);if(t<0)throw new oM.ERR_BUFFER_OUT_OF_BOUNDS;throw new oM.ERR_OUT_OF_RANGE(n||"offset",`>= ${n?1:0} and <= ${t}`,e)}oD("ERR_BUFFER_OUT_OF_BOUNDS",function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),oD("ERR_INVALID_ARG_TYPE",function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`},TypeError),oD("ERR_OUT_OF_RANGE",function(e,t,n){let r=`The value of "${e}" is out of range.`,i=n;return Number.isInteger(n)&&Math.abs(n)>4294967296?i=oF(String(n)):"bigint"==typeof n&&(i=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(i=oF(i)),i+="n"),r+=` It must be ${t}. Received ${i}`},RangeError);let oH=/[^+/0-9A-Za-z-_]/g;function oV(e,t){let n;t=t||1/0;let r=e.length,i=null,o=[];for(let a=0;a<r;++a){if((n=e.charCodeAt(a))>55295&&n<57344){if(!i){if(n>56319||a+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=(i-55296<<10|n-56320)+65536}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else if(n<1114112){if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}else throw Error("Invalid code point")}return o}function oq(e){return function(e){var t,n,r=function(e){var t=e.length;if(t%4>0)throw Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");-1===n&&(n=t);var r=n===t?0:4-n%4;return[n,r]}(e),i=r[0],o=r[1],a=new oc((i+o)*3/4-o),l=0,s=o>0?i-4:i;for(n=0;n<s;n+=4)t=ou[e.charCodeAt(n)]<<18|ou[e.charCodeAt(n+1)]<<12|ou[e.charCodeAt(n+2)]<<6|ou[e.charCodeAt(n+3)],a[l++]=t>>16&255,a[l++]=t>>8&255,a[l++]=255&t;return 2===o&&(t=ou[e.charCodeAt(n)]<<2|ou[e.charCodeAt(n+1)]>>4,a[l++]=255&t),1===o&&(t=ou[e.charCodeAt(n)]<<10|ou[e.charCodeAt(n+1)]<<4|ou[e.charCodeAt(n+2)]>>2,a[l++]=t>>8&255,a[l++]=255&t),a}(function(e){if((e=(e=e.split("=")[0]).trim().replace(oH,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function oG(e,t,n,r){let i;for(i=0;i<r&&!(i+n>=t.length)&&!(i>=e.length);++i)t[i+n]=e[i];return i}function oW(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}let o$=function(){let e="0123456789abcdef",t=Array(256);for(let n=0;n<16;++n){let r=16*n;for(let i=0;i<16;++i)t[r+i]=e[n]+e[i]}return t}();function oK(e){return"undefined"==typeof BigInt?oY:e}function oY(){throw Error("BigInt not supported")}"undefined"!=typeof self&&self,ol=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=109)}([function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=n(17),i=n(18),o=n(19),a=n(45),l=n(46),s=n(47),u=n(48),c=n(49),d=n(12),h=n(32),f=n(33),p=n(31),g=n(1),m={Scope:g.Scope,create:g.create,find:g.find,query:g.query,register:g.register,Container:r.default,Format:i.default,Leaf:o.default,Embed:u.default,Scroll:a.default,Block:s.default,Inline:l.default,Text:c.default,Attributor:{Attribute:d.default,Class:h.default,Style:f.default,Store:p.default}};t.default=m},function(e,t,n){var r,i,o,a=this&&this.__extends||(i=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var l=function(e){function t(t){var n=this;return t="[Parchment] "+t,(n=e.call(this,t)||this).message=t,n.name=n.constructor.name,n}return a(t,e),t}(Error);t.ParchmentError=l;var s={},u={},c={},d={};function h(e,t){if(void 0===t&&(t=o.ANY),"string"==typeof e)n=d[e]||s[e];else if(e instanceof Text||e.nodeType===Node.TEXT_NODE)n=d.text;else if("number"==typeof e)e&o.LEVEL&o.BLOCK?n=d.block:e&o.LEVEL&o.INLINE&&(n=d.inline);else if(e instanceof HTMLElement){var n,r=(e.getAttribute("class")||"").split(/\s+/);for(var i in r)if(n=u[r[i]])break;n=n||c[e.tagName]}return null==n?null:t&o.LEVEL&n.scope&&t&o.TYPE&n.scope?n:null}t.DATA_KEY="__blot",(r=o=t.Scope||(t.Scope={}))[r.TYPE=3]="TYPE",r[r.LEVEL=12]="LEVEL",r[r.ATTRIBUTE=13]="ATTRIBUTE",r[r.BLOT=14]="BLOT",r[r.INLINE=7]="INLINE",r[r.BLOCK=11]="BLOCK",r[r.BLOCK_BLOT=10]="BLOCK_BLOT",r[r.INLINE_BLOT=6]="INLINE_BLOT",r[r.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",r[r.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",r[r.ANY=15]="ANY",t.create=function(e,t){var n=h(e);if(null==n)throw new l("Unable to create "+e+" blot");var r=e instanceof Node||e.nodeType===Node.TEXT_NODE?e:n.create(t);return new n(r,t)},t.find=function e(n,r){return(void 0===r&&(r=!1),null==n)?null:null!=n[t.DATA_KEY]?n[t.DATA_KEY].blot:r?e(n.parentNode,r):null},t.query=h,t.register=function e(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(t.length>1)return t.map(function(t){return e(t)});var r=t[0];if("string"!=typeof r.blotName&&"string"!=typeof r.attrName)throw new l("Invalid definition");if("abstract"===r.blotName)throw new l("Cannot register abstract class");return d[r.blotName||r.attrName]=r,"string"==typeof r.keyName?s[r.keyName]=r:(null!=r.className&&(u[r.className]=r),null!=r.tagName&&(Array.isArray(r.tagName)?r.tagName=r.tagName.map(function(e){return e.toUpperCase()}):r.tagName=r.tagName.toUpperCase(),(Array.isArray(r.tagName)?r.tagName:[r.tagName]).forEach(function(e){(null==c[e]||null==r.className)&&(c[e]=r)}))),r}},function(e,t,n){var r=n(51),i=n(11),o=n(3),a=n(20),l=function(e){Array.isArray(e)?this.ops=e:null!=e&&Array.isArray(e.ops)?this.ops=e.ops:this.ops=[]};l.prototype.insert=function(e,t){var n={};return 0===e.length?this:(n.insert=e,null!=t&&"object"==typeof t&&Object.keys(t).length>0&&(n.attributes=t),this.push(n))},l.prototype.delete=function(e){return e<=0?this:this.push({delete:e})},l.prototype.retain=function(e,t){if(e<=0)return this;var n={retain:e};return null!=t&&"object"==typeof t&&Object.keys(t).length>0&&(n.attributes=t),this.push(n)},l.prototype.push=function(e){var t=this.ops.length,n=this.ops[t-1];if(e=o(!0,{},e),"object"==typeof n){if("number"==typeof e.delete&&"number"==typeof n.delete)return this.ops[t-1]={delete:n.delete+e.delete},this;if("number"==typeof n.delete&&null!=e.insert&&(t-=1,"object"!=typeof(n=this.ops[t-1])))return this.ops.unshift(e),this;if(i(e.attributes,n.attributes)){if("string"==typeof e.insert&&"string"==typeof n.insert)return this.ops[t-1]={insert:n.insert+e.insert},"object"==typeof e.attributes&&(this.ops[t-1].attributes=e.attributes),this;if("number"==typeof e.retain&&"number"==typeof n.retain)return this.ops[t-1]={retain:n.retain+e.retain},"object"==typeof e.attributes&&(this.ops[t-1].attributes=e.attributes),this}}return t===this.ops.length?this.ops.push(e):this.ops.splice(t,0,e),this},l.prototype.chop=function(){var e=this.ops[this.ops.length-1];return e&&e.retain&&!e.attributes&&this.ops.pop(),this},l.prototype.filter=function(e){return this.ops.filter(e)},l.prototype.forEach=function(e){this.ops.forEach(e)},l.prototype.map=function(e){return this.ops.map(e)},l.prototype.partition=function(e){var t=[],n=[];return this.forEach(function(r){(e(r)?t:n).push(r)}),[t,n]},l.prototype.reduce=function(e,t){return this.ops.reduce(e,t)},l.prototype.changeLength=function(){return this.reduce(function(e,t){return t.insert?e+a.length(t):t.delete?e-t.delete:e},0)},l.prototype.length=function(){return this.reduce(function(e,t){return e+a.length(t)},0)},l.prototype.slice=function(e,t){e=e||0,"number"!=typeof t&&(t=1/0);for(var n,r=[],i=a.iterator(this.ops),o=0;o<t&&i.hasNext();)o<e?n=i.next(e-o):(n=i.next(t-o),r.push(n)),o+=a.length(n);return new l(r)},l.prototype.compose=function(e){var t=a.iterator(this.ops),n=a.iterator(e.ops),r=[],o=n.peek();if(null!=o&&"number"==typeof o.retain&&null==o.attributes){for(var s=o.retain;"insert"===t.peekType()&&t.peekLength()<=s;)s-=t.peekLength(),r.push(t.next());o.retain-s>0&&n.next(o.retain-s)}for(var u=new l(r);t.hasNext()||n.hasNext();)if("insert"===n.peekType())u.push(n.next());else if("delete"===t.peekType())u.push(t.next());else{var c=Math.min(t.peekLength(),n.peekLength()),d=t.next(c),h=n.next(c);if("number"==typeof h.retain){var f={};"number"==typeof d.retain?f.retain=c:f.insert=d.insert;var p=a.attributes.compose(d.attributes,h.attributes,"number"==typeof d.retain);if(p&&(f.attributes=p),u.push(f),!n.hasNext()&&i(u.ops[u.ops.length-1],f)){var g=new l(t.rest());return u.concat(g).chop()}}else"number"==typeof h.delete&&"number"==typeof d.retain&&u.push(h)}return u.chop()},l.prototype.concat=function(e){var t=new l(this.ops.slice());return e.ops.length>0&&(t.push(e.ops[0]),t.ops=t.ops.concat(e.ops.slice(1))),t},l.prototype.diff=function(e,t){if(this.ops===e.ops)return new l;var n=[this,e].map(function(t){return t.map(function(n){if(null!=n.insert)return"string"==typeof n.insert?n.insert:"\x00";throw Error("diff() called "+(t===e?"on":"with")+" non-document")}).join("")}),o=new l,s=r(n[0],n[1],t),u=a.iterator(this.ops),c=a.iterator(e.ops);return s.forEach(function(e){for(var t=e[1].length;t>0;){var n=0;switch(e[0]){case r.INSERT:n=Math.min(c.peekLength(),t),o.push(c.next(n));break;case r.DELETE:n=Math.min(t,u.peekLength()),u.next(n),o.delete(n);break;case r.EQUAL:n=Math.min(u.peekLength(),c.peekLength(),t);var l=u.next(n),s=c.next(n);i(l.insert,s.insert)?o.retain(n,a.attributes.diff(l.attributes,s.attributes)):o.push(s).delete(n)}t-=n}}),o.chop()},l.prototype.eachLine=function(e,t){t=t||"\n";for(var n=a.iterator(this.ops),r=new l,i=0;n.hasNext();){if("insert"!==n.peekType())return;var o=n.peek(),s=a.length(o)-n.peekLength(),u="string"==typeof o.insert?o.insert.indexOf(t,s)-s:-1;if(u<0)r.push(n.next());else if(u>0)r.push(n.next(u));else{if(!1===e(r,n.next(1).attributes||{},i))return;i+=1,r=new l}}r.length()>0&&e(r,{},i)},l.prototype.transform=function(e,t){if(t=!!t,"number"==typeof e)return this.transformPosition(e,t);for(var n=a.iterator(this.ops),r=a.iterator(e.ops),i=new l;n.hasNext()||r.hasNext();)if("insert"===n.peekType()&&(t||"insert"!==r.peekType()))i.retain(a.length(n.next()));else if("insert"===r.peekType())i.push(r.next());else{var o=Math.min(n.peekLength(),r.peekLength()),s=n.next(o),u=r.next(o);if(s.delete)continue;u.delete?i.push(u):i.retain(o,a.attributes.transform(s.attributes,u.attributes,t))}return i.chop()},l.prototype.transformPosition=function(e,t){t=!!t;for(var n=a.iterator(this.ops),r=0;n.hasNext()&&r<=e;){var i=n.peekLength(),o=n.peekType();if(n.next(),"delete"===o){e-=Math.min(i,e-r);continue}"insert"===o&&(r<e||!t)&&(e+=i),r+=i}return e},e.exports=l},function(e,t){var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,o=Object.getOwnPropertyDescriptor,a=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===r.call(e)},l=function(e){if(!e||"[object Object]"!==r.call(e))return!1;var t,i=n.call(e,"constructor"),o=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!i&&!o)return!1;for(t in e);return void 0===t||n.call(e,t)},s=function(e,t){i&&"__proto__"===t.name?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},u=function(e,t){if("__proto__"===t){if(!n.call(e,t))return;if(o)return o(e,t).value}return e[t]};e.exports=function e(){var t,n,r,i,o,c,d=arguments[0],h=1,f=arguments.length,p=!1;for("boolean"==typeof d&&(p=d,d=arguments[1]||{},h=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});h<f;++h)if(t=arguments[h],null!=t)for(n in t)r=u(d,n),d!==(i=u(t,n))&&(p&&i&&(l(i)||(o=a(i)))?(o?(o=!1,c=r&&a(r)?r:[]):c=r&&l(r)?r:{},s(d,{name:n,newValue:e(p,c,i)})):void 0!==i&&s(d,{name:n,newValue:i}));return d}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.BlockEmbed=t.bubbleFormats=void 0;var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);if(null===o)return;return e(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},o=d(n(3)),a=d(n(2)),l=d(n(0)),s=d(n(16)),u=d(n(6)),c=d(n(7));function d(e){return e&&e.__esModule?e:{default:e}}function h(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function f(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}function p(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var g=function(e){function t(){return h(this,t),f(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return p(t,e),r(t,[{key:"attach",value:function(){i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"attach",this).call(this),this.attributes=new l.default.Attributor.Store(this.domNode)}},{key:"delta",value:function(){return new a.default().insert(this.value(),(0,o.default)(this.formats(),this.attributes.values()))}},{key:"format",value:function(e,t){var n=l.default.query(e,l.default.Scope.BLOCK_ATTRIBUTE);null!=n&&this.attributes.attribute(n,t)}},{key:"formatAt",value:function(e,t,n,r){this.format(n,r)}},{key:"insertAt",value:function(e,n,r){if("string"==typeof n&&n.endsWith("\n")){var o=l.default.create(m.blotName);this.parent.insertBefore(o,0===e?this:this.next),o.insertAt(0,n.slice(0,-1))}else i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertAt",this).call(this,e,n,r)}}]),t}(l.default.Embed);g.scope=l.default.Scope.BLOCK_BLOT;var m=function(e){function t(e){h(this,t);var n=f(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.cache={},n}return p(t,e),r(t,[{key:"delta",value:function(){return null==this.cache.delta&&(this.cache.delta=this.descendants(l.default.Leaf).reduce(function(e,t){return 0===t.length()?e:e.insert(t.value(),v(t))},new a.default).insert("\n",v(this))),this.cache.delta}},{key:"deleteAt",value:function(e,n){i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"deleteAt",this).call(this,e,n),this.cache={}}},{key:"formatAt",value:function(e,n,r,o){n<=0||(l.default.query(r,l.default.Scope.BLOCK)?e+n===this.length()&&this.format(r,o):i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"formatAt",this).call(this,e,Math.min(n,this.length()-e-1),r,o),this.cache={})}},{key:"insertAt",value:function(e,n,r){if(null!=r)return i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertAt",this).call(this,e,n,r);if(0!==n.length){var o=n.split("\n"),a=o.shift();a.length>0&&(e<this.length()-1||null==this.children.tail?i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertAt",this).call(this,Math.min(e,this.length()-1),a):this.children.tail.insertAt(this.children.tail.length(),a),this.cache={});var l=this;o.reduce(function(e,t){return(l=l.split(e,!0)).insertAt(0,t),t.length},e+a.length)}}},{key:"insertBefore",value:function(e,n){var r=this.children.head;i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertBefore",this).call(this,e,n),r instanceof s.default&&r.remove(),this.cache={}}},{key:"length",value:function(){return null==this.cache.length&&(this.cache.length=i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"length",this).call(this)+1),this.cache.length}},{key:"moveChildren",value:function(e,n){i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"moveChildren",this).call(this,e,n),this.cache={}}},{key:"optimize",value:function(e){i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"optimize",this).call(this,e),this.cache={}}},{key:"path",value:function(e){return i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"path",this).call(this,e,!0)}},{key:"removeChild",value:function(e){i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"removeChild",this).call(this,e),this.cache={}}},{key:"split",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(n&&(0===e||e>=this.length()-1)){var r=this.clone();return 0===e?(this.parent.insertBefore(r,this),this):(this.parent.insertBefore(r,this.next),r)}var o=i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"split",this).call(this,e,n);return this.cache={},o}}]),t}(l.default.Block);function v(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return null==e?t:("function"==typeof e.formats&&(t=(0,o.default)(t,e.formats())),null==e.parent||"scroll"==e.parent.blotName||e.parent.statics.scope!==e.statics.scope)?t:v(e.parent,t)}m.blotName="block",m.tagName="P",m.defaultChild="break",m.allowedChildren=[u.default,l.default.Embed,c.default],t.bubbleFormats=v,t.BlockEmbed=g,t.default=m},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.overload=t.expandConfig=void 0;var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,l=e[Symbol.iterator]();!(r=(a=l.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&l.return&&l.return()}finally{if(i)throw o}}return n}(e,t);throw TypeError("Invalid attempt to destructure non-iterable instance")},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();n(50);var a=m(n(2)),l=m(n(14)),s=m(n(8)),u=m(n(9)),c=m(n(0)),d=n(15),h=m(d),f=m(n(3)),p=m(n(10)),g=m(n(34));function m(e){return e&&e.__esModule?e:{default:e}}function v(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var y=(0,p.default)("quill"),b=function(){function e(t){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,e),this.options=w(t,r),this.container=this.options.container,null==this.container)return y.error("Invalid Quill container",t);this.options.debug&&e.debug(this.options.debug);var i=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",this.container.__quill=this,this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.root.setAttribute("data-gramm",!1),this.scrollingContainer=this.options.scrollingContainer||this.root,this.emitter=new s.default,this.scroll=c.default.create(this.root,{emitter:this.emitter,whitelist:this.options.formats}),this.editor=new l.default(this.scroll),this.selection=new h.default(this.scroll,this.emitter),this.theme=new this.options.theme(this,this.options),this.keyboard=this.theme.addModule("keyboard"),this.clipboard=this.theme.addModule("clipboard"),this.history=this.theme.addModule("history"),this.theme.init(),this.emitter.on(s.default.events.EDITOR_CHANGE,function(e){e===s.default.events.TEXT_CHANGE&&n.root.classList.toggle("ql-blank",n.editor.isBlank())}),this.emitter.on(s.default.events.SCROLL_UPDATE,function(e,t){var r=n.selection.lastRange,i=r&&0===r.length?r.index:void 0;x.call(n,function(){return n.editor.update(null,t,i)},e)});var o=this.clipboard.convert("<div class='ql-editor' style=\"white-space: normal;\">"+i+"<p><br></p></div>");this.setContents(o),this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable()}return o(e,null,[{key:"debug",value:function(e){!0===e&&(e="log"),p.default.level(e)}},{key:"find",value:function(e){return e.__quill||c.default.find(e)}},{key:"import",value:function(e){return null==this.imports[e]&&y.error("Cannot import "+e+". Are you sure it was registered?"),this.imports[e]}},{key:"register",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if("string"!=typeof e){var i=e.attrName||e.blotName;"string"==typeof i?this.register("formats/"+i,e,t):Object.keys(e).forEach(function(r){n.register(r,e[r],t)})}else null==this.imports[e]||r||y.warn("Overwriting "+e+" with",t),this.imports[e]=t,(e.startsWith("blots/")||e.startsWith("formats/"))&&"abstract"!==t.blotName?c.default.register(t):e.startsWith("modules")&&"function"==typeof t.register&&t.register()}}]),o(e,[{key:"addContainer",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if("string"==typeof e){var n=e;(e=document.createElement("div")).classList.add(n)}return this.container.insertBefore(e,t),e}},{key:"blur",value:function(){this.selection.setRange(null)}},{key:"deleteText",value:function(e,t,n){var r=this,o=i(_(e,t,n),4);return e=o[0],t=o[1],x.call(this,function(){return r.editor.deleteText(e,t)},n=o[3],e,-1*t)}},{key:"disable",value:function(){this.enable(!1)}},{key:"enable",value:function(){var e=!(arguments.length>0)||void 0===arguments[0]||arguments[0];this.scroll.enable(e),this.container.classList.toggle("ql-disabled",!e)}},{key:"focus",value:function(){var e=this.scrollingContainer.scrollTop;this.selection.focus(),this.scrollingContainer.scrollTop=e,this.scrollIntoView()}},{key:"format",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:s.default.sources.API;return x.call(this,function(){var r=n.getSelection(!0),i=new a.default;if(null==r)return i;if(c.default.query(e,c.default.Scope.BLOCK))i=n.editor.formatLine(r.index,r.length,v({},e,t));else{if(0===r.length)return n.selection.format(e,t),i;i=n.editor.formatText(r.index,r.length,v({},e,t))}return n.setSelection(r,s.default.sources.SILENT),i},r)}},{key:"formatLine",value:function(e,t,n,r,o){var a=this,l=void 0,s=i(_(e,t,n,r,o),4);return e=s[0],t=s[1],l=s[2],x.call(this,function(){return a.editor.formatLine(e,t,l)},o=s[3],e,0)}},{key:"formatText",value:function(e,t,n,r,o){var a=this,l=void 0,s=i(_(e,t,n,r,o),4);return e=s[0],t=s[1],l=s[2],x.call(this,function(){return a.editor.formatText(e,t,l)},o=s[3],e,0)}},{key:"getBounds",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=void 0;n="number"==typeof e?this.selection.getBounds(e,t):this.selection.getBounds(e.index,e.length);var r=this.container.getBoundingClientRect();return{bottom:n.bottom-r.top,height:n.height,left:n.left-r.left,right:n.right-r.left,top:n.top-r.top,width:n.width}}},{key:"getContents",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getLength()-e,n=i(_(e,t),2);return e=n[0],t=n[1],this.editor.getContents(e,t)}},{key:"getFormat",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getSelection(!0),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return"number"==typeof e?this.editor.getFormat(e,t):this.editor.getFormat(e.index,e.length)}},{key:"getIndex",value:function(e){return e.offset(this.scroll)}},{key:"getLength",value:function(){return this.scroll.length()}},{key:"getLeaf",value:function(e){return this.scroll.leaf(e)}},{key:"getLine",value:function(e){return this.scroll.line(e)}},{key:"getLines",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE;return"number"!=typeof e?this.scroll.lines(e.index,e.length):this.scroll.lines(e,t)}},{key:"getModule",value:function(e){return this.theme.modules[e]}},{key:"getSelection",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return e&&this.focus(),this.update(),this.selection.getRange()[0]}},{key:"getText",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getLength()-e,n=i(_(e,t),2);return e=n[0],t=n[1],this.editor.getText(e,t)}},{key:"hasFocus",value:function(){return this.selection.hasFocus()}},{key:"insertEmbed",value:function(t,n,r){var i=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e.sources.API;return x.call(this,function(){return i.editor.insertEmbed(t,n,r)},o,t)}},{key:"insertText",value:function(e,t,n,r,o){var a=this,l=void 0,s=i(_(e,0,n,r,o),4);return e=s[0],l=s[2],x.call(this,function(){return a.editor.insertText(e,t,l)},o=s[3],e,t.length)}},{key:"isEnabled",value:function(){return!this.container.classList.contains("ql-disabled")}},{key:"off",value:function(){return this.emitter.off.apply(this.emitter,arguments)}},{key:"on",value:function(){return this.emitter.on.apply(this.emitter,arguments)}},{key:"once",value:function(){return this.emitter.once.apply(this.emitter,arguments)}},{key:"pasteHTML",value:function(e,t,n){this.clipboard.dangerouslyPasteHTML(e,t,n)}},{key:"removeFormat",value:function(e,t,n){var r=this,o=i(_(e,t,n),4);return e=o[0],t=o[1],x.call(this,function(){return r.editor.removeFormat(e,t)},n=o[3],e)}},{key:"scrollIntoView",value:function(){this.selection.scrollIntoView(this.scrollingContainer)}},{key:"setContents",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.sources.API;return x.call(this,function(){e=new a.default(e);var n=t.getLength(),r=t.editor.deleteText(0,n),i=t.editor.applyDelta(e),o=i.ops[i.ops.length-1];return null!=o&&"string"==typeof o.insert&&"\n"===o.insert[o.insert.length-1]&&(t.editor.deleteText(t.getLength()-1,1),i.delete(1)),r.compose(i)},n)}},{key:"setSelection",value:function(t,n,r){if(null==t)this.selection.setRange(null,n||e.sources.API);else{var o=i(_(t,n,r),4);t=o[0],n=o[1],r=o[3],this.selection.setRange(new d.Range(t,n),r),r!==s.default.sources.SILENT&&this.selection.scrollIntoView(this.scrollingContainer)}}},{key:"setText",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.sources.API,n=new a.default().insert(e);return this.setContents(n,t)}},{key:"update",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s.default.sources.USER,t=this.scroll.update(e);return this.selection.update(e),t}},{key:"updateContents",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.sources.API;return x.call(this,function(){return e=new a.default(e),t.editor.applyDelta(e,n)},n,!0)}}]),e}();function w(e,t){if((t=(0,f.default)(!0,{container:e,modules:{clipboard:!0,keyboard:!0,history:!0}},t)).theme&&t.theme!==b.DEFAULTS.theme){if(t.theme=b.import("themes/"+t.theme),null==t.theme)throw Error("Invalid theme "+t.theme+". Did you register it?")}else t.theme=g.default;var n=(0,f.default)(!0,{},t.theme.DEFAULTS);[n,t].forEach(function(e){e.modules=e.modules||{},Object.keys(e.modules).forEach(function(t){!0===e.modules[t]&&(e.modules[t]={})})});var r=Object.keys(n.modules).concat(Object.keys(t.modules)).reduce(function(e,t){var n=b.import("modules/"+t);return null==n?y.error("Cannot load "+t+" module. Are you sure you registered it?"):e[t]=n.DEFAULTS||{},e},{});return null!=t.modules&&t.modules.toolbar&&t.modules.toolbar.constructor!==Object&&(t.modules.toolbar={container:t.modules.toolbar}),t=(0,f.default)(!0,{},b.DEFAULTS,{modules:r},n,t),["bounds","container","scrollingContainer"].forEach(function(e){"string"==typeof t[e]&&(t[e]=document.querySelector(t[e]))}),t.modules=Object.keys(t.modules).reduce(function(e,n){return t.modules[n]&&(e[n]=t.modules[n]),e},{}),t}function x(e,t,n,r){if(this.options.strict&&!this.isEnabled()&&t===s.default.sources.USER)return new a.default;var i=null==n?null:this.getSelection(),o=this.editor.delta,l=e();if(null!=i&&(!0===n&&(n=i.index),null==r?i=E(i,l,t):0!==r&&(i=E(i,n,r,t)),this.setSelection(i,s.default.sources.SILENT)),l.length()>0){var u,c,d=[s.default.events.TEXT_CHANGE,l,o,t];(u=this.emitter).emit.apply(u,[s.default.events.EDITOR_CHANGE].concat(d)),t!==s.default.sources.SILENT&&(c=this.emitter).emit.apply(c,d)}return l}function _(e,t,n,i,o){var a={};return"number"==typeof e.index&&"number"==typeof e.length?("number"!=typeof t&&(o=i,i=n,n=t),t=e.length,e=e.index):"number"!=typeof t&&(o=i,i=n,n=t,t=0),(void 0===n?"undefined":r(n))==="object"?(a=n,o=i):"string"==typeof n&&(null!=i?a[n]=i:o=n),[e,t,a,o=o||s.default.sources.API]}function E(e,t,n,r){if(null==e)return null;var o=void 0,l=void 0;if(t instanceof a.default){var u=i([e.index,e.index+e.length].map(function(e){return t.transformPosition(e,r!==s.default.sources.USER)}),2);o=u[0],l=u[1]}else{var c=i([e.index,e.index+e.length].map(function(e){return e<t||e===t&&r===s.default.sources.USER?e:n>=0?e+n:Math.max(t,e+n)}),2);o=c[0],l=c[1]}return new d.Range(o,l-o)}b.DEFAULTS={bounds:null,formats:null,modules:{},placeholder:"",readOnly:!1,scrollingContainer:null,strict:!0,theme:"default"},b.events=s.default.events,b.sources=s.default.sources,b.version="1.3.7",b.imports={delta:a.default,parchment:c.default,"core/module":u.default,"core/theme":g.default},t.expandConfig=w,t.overload=_,t.default=b},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);if(null===o)return;return e(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},o=l(n(7)),a=l(n(0));function l(e){return e&&e.__esModule?e:{default:e}}var s=function(e){function t(){return function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"formatAt",value:function(e,n,r,o){if(0>t.compare(this.statics.blotName,r)&&a.default.query(r,a.default.Scope.BLOT)){var l=this.isolate(e,n);o&&l.wrap(r,o)}else i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"formatAt",this).call(this,e,n,r,o)}},{key:"optimize",value:function(e){if(i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"optimize",this).call(this,e),this.parent instanceof t&&t.compare(this.statics.blotName,this.parent.statics.blotName)>0){var n=this.parent.isolate(this.offset(),this.length());this.moveChildren(n),n.wrap(this)}}}],[{key:"compare",value:function(e,n){var r=t.order.indexOf(e),i=t.order.indexOf(n);return r>=0||i>=0?r-i:e===n?0:e<n?-1:1}}]),t}(a.default.Inline);s.allowedChildren=[s,a.default.Embed,o.default],s.order=["cursor","inline","underline","strike","italic","bold","script","link","code"],t.default=s},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r,i=function(e){function t(){return function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(((r=n(0))&&r.__esModule?r:{default:r}).default.Text);t.default=i},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);if(null===o)return;return e(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},o=a(n(54));function a(e){return e&&e.__esModule?e:{default:e}}var l=(0,a(n(10)).default)("quill:events");["selectionchange","mousedown","mouseup","click"].forEach(function(e){document.addEventListener(e,function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];[].slice.call(document.querySelectorAll(".ql-container")).forEach(function(e){if(e.__quill&&e.__quill.emitter){var n;(n=e.__quill.emitter).handleDOM.apply(n,t)}})})});var s=function(e){function t(){!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,t);var e=function(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.listeners={},e.on("error",l.error),e}return function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"emit",value:function(){l.log.apply(l,arguments),i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"emit",this).apply(this,arguments)}},{key:"handleDOM",value:function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];(this.listeners[e.type]||[]).forEach(function(t){var r=t.node,i=t.handler;(e.target===r||r.contains(e.target))&&i.apply(void 0,[e].concat(n))})}},{key:"listenDOM",value:function(e,t,n){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push({node:t,handler:n})}}]),t}(o.default);s.events={EDITOR_CHANGE:"editor-change",SCROLL_BEFORE_UPDATE:"scroll-before-update",SCROLL_OPTIMIZE:"scroll-optimize",SCROLL_UPDATE:"scroll-update",SELECTION_CHANGE:"selection-change",TEXT_CHANGE:"text-change"},s.sources={API:"api",SILENT:"silent",USER:"user"},t.default=s},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")})(this,e),this.quill=t,this.options=n};r.DEFAULTS={},t.default=r},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=["error","warn","log","info"],i="warn";function o(e){if(r.indexOf(e)<=r.indexOf(i)){for(var t,n=arguments.length,o=Array(n>1?n-1:0),a=1;a<n;a++)o[a-1]=arguments[a];(t=console)[e].apply(t,o)}}function a(e){return r.reduce(function(t,n){return t[n]=o.bind(console,n,e),t},{})}o.level=a.level=function(e){i=e},t.default=a},function(e,t,n){var r=Array.prototype.slice,i=n(52),o=n(53),a=e.exports=function(e,t,n){return n||(n={}),e===t||(e instanceof Date&&t instanceof Date?e.getTime()===t.getTime():e&&t&&("object"==typeof e||"object"==typeof t)?function(e,t,n){if(null==e||null==t||e.prototype!==t.prototype)return!1;if(o(e))return!!o(t)&&a(e=r.call(e),t=r.call(t),n);if(l(e)){if(!l(t)||e.length!==t.length)return!1;for(s=0;s<e.length;s++)if(e[s]!==t[s])return!1;return!0}try{var s,u,c=i(e),d=i(t)}catch(e){return!1}if(c.length!=d.length)return!1;for(c.sort(),d.sort(),s=c.length-1;s>=0;s--)if(c[s]!=d[s])return!1;for(s=c.length-1;s>=0;s--)if(!a(e[u=c[s]],t[u],n))return!1;return typeof e==typeof t}(e,t,n):n.strict?e===t:e==t)};function l(e){return!!e&&"object"==typeof e&&"number"==typeof e.length&&"function"==typeof e.copy&&"function"==typeof e.slice&&(!(e.length>0)||"number"==typeof e[0])}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),i=function(){function e(e,t,n){void 0===n&&(n={}),this.attrName=e,this.keyName=t;var i=r.Scope.TYPE&r.Scope.ATTRIBUTE;null!=n.scope?this.scope=n.scope&r.Scope.LEVEL|i:this.scope=r.Scope.ATTRIBUTE,null!=n.whitelist&&(this.whitelist=n.whitelist)}return e.keys=function(e){return[].map.call(e.attributes,function(e){return e.name})},e.prototype.add=function(e,t){return!!this.canAdd(e,t)&&(e.setAttribute(this.keyName,t),!0)},e.prototype.canAdd=function(e,t){return null!=r.query(e,r.Scope.BLOT&(this.scope|r.Scope.TYPE))&&(null==this.whitelist||("string"==typeof t?this.whitelist.indexOf(t.replace(/["']/g,""))>-1:this.whitelist.indexOf(t)>-1))},e.prototype.remove=function(e){e.removeAttribute(this.keyName)},e.prototype.value=function(e){var t=e.getAttribute(this.keyName);return this.canAdd(e,t)&&t?t:""},e}();t.default=i},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Code=void 0;var r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,l=e[Symbol.iterator]();!(r=(a=l.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&l.return&&l.return()}finally{if(i)throw o}}return n}(e,t);throw TypeError("Invalid attempt to destructure non-iterable instance")},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);if(null===o)return;return e(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},a=d(n(2)),l=d(n(0)),s=d(n(4)),u=d(n(6)),c=d(n(7));function d(e){return e&&e.__esModule?e:{default:e}}function h(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function f(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}function p(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var g=function(e){function t(){return h(this,t),f(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return p(t,e),t}(u.default);g.blotName="code",g.tagName="CODE";var m=function(e){function t(){return h(this,t),f(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return p(t,e),i(t,[{key:"delta",value:function(){var e=this,t=this.domNode.textContent;return t.endsWith("\n")&&(t=t.slice(0,-1)),t.split("\n").reduce(function(t,n){return t.insert(n).insert("\n",e.formats())},new a.default)}},{key:"format",value:function(e,n){if(e!==this.statics.blotName||!n){var i=r(this.descendant(c.default,this.length()-1),1)[0];null!=i&&i.deleteAt(i.length()-1,1),o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"format",this).call(this,e,n)}}},{key:"formatAt",value:function(e,n,r,i){if(0!==n&&null!=l.default.query(r,l.default.Scope.BLOCK)&&(r!==this.statics.blotName||i!==this.statics.formats(this.domNode))){var o=this.newlineIndex(e);if(!(o<0)&&!(o>=e+n)){var a=this.newlineIndex(e,!0)+1,s=o-a+1,u=this.isolate(a,s),c=u.next;u.format(r,i),c instanceof t&&c.formatAt(0,e-a+n-s,r,i)}}}},{key:"insertAt",value:function(e,t,n){if(null==n){var i=r(this.descendant(c.default,e),2),o=i[0],a=i[1];o.insertAt(a,t)}}},{key:"length",value:function(){var e=this.domNode.textContent.length;return this.domNode.textContent.endsWith("\n")?e:e+1}},{key:"newlineIndex",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(t)return this.domNode.textContent.slice(0,e).lastIndexOf("\n");var n=this.domNode.textContent.slice(e).indexOf("\n");return n>-1?e+n:-1}},{key:"optimize",value:function(e){this.domNode.textContent.endsWith("\n")||this.appendChild(l.default.create("text","\n")),o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"optimize",this).call(this,e);var n=this.next;null!=n&&n.prev===this&&n.statics.blotName===this.statics.blotName&&this.statics.formats(this.domNode)===n.statics.formats(n.domNode)&&(n.optimize(e),n.moveChildren(this),n.remove())}},{key:"replace",value:function(e){o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"replace",this).call(this,e),[].slice.call(this.domNode.querySelectorAll("*")).forEach(function(e){var t=l.default.find(e);null==t?e.parentNode.removeChild(e):t instanceof l.default.Embed?t.remove():t.unwrap()})}}],[{key:"create",value:function(e){var n=o(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,e);return n.setAttribute("spellcheck",!1),n}},{key:"formats",value:function(){return!0}}]),t}(s.default);m.blotName="code-block",m.tagName="PRE",m.TAB=" ",t.Code=g,t.default=m},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,l=e[Symbol.iterator]();!(r=(a=l.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&l.return&&l.return()}finally{if(i)throw o}}return n}(e,t);throw TypeError("Invalid attempt to destructure non-iterable instance")},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=v(n(2)),l=v(n(20)),s=v(n(0)),u=v(n(13)),c=v(n(24)),d=n(4),h=v(d),f=v(n(16)),p=v(n(21)),g=v(n(11)),m=v(n(3));function v(e){return e&&e.__esModule?e:{default:e}}var y=/^[ -~]*$/,b=function(){function e(t){(function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")})(this,e),this.scroll=t,this.delta=this.getDelta()}return o(e,[{key:"applyDelta",value:function(e){var t=this,n=!1;this.scroll.update();var o=this.scroll.length();return this.scroll.batchStart(),(e=e.reduce(function(e,t){if(1===t.insert){var n=(0,p.default)(t.attributes);return delete n.image,e.insert({image:t.attributes.image},n)}if(null!=t.attributes&&(!0===t.attributes.list||!0===t.attributes.bullet)&&((t=(0,p.default)(t)).attributes.list?t.attributes.list="ordered":(t.attributes.list="bullet",delete t.attributes.bullet)),"string"==typeof t.insert){var r=t.insert.replace(/\r\n/g,"\n").replace(/\r/g,"\n");return e.insert(r,t.attributes)}return e.push(t)},new a.default)).reduce(function(e,a){var u=a.retain||a.delete||a.insert.length||1,c=a.attributes||{};if(null!=a.insert){if("string"==typeof a.insert){var f=a.insert;f.endsWith("\n")&&n&&(n=!1,f=f.slice(0,-1)),e>=o&&!f.endsWith("\n")&&(n=!0),t.scroll.insertAt(e,f);var p=i(t.scroll.line(e),2),g=p[0],v=p[1],y=(0,m.default)({},(0,d.bubbleFormats)(g));if(g instanceof h.default){var b=i(g.descendant(s.default.Leaf,v),1)[0];y=(0,m.default)(y,(0,d.bubbleFormats)(b))}c=l.default.attributes.diff(y,c)||{}}else if("object"===r(a.insert)){var w=Object.keys(a.insert)[0];if(null==w)return e;t.scroll.insertAt(e,w,a.insert[w])}o+=u}return Object.keys(c).forEach(function(n){t.scroll.formatAt(e,u,n,c[n])}),e+u},0),e.reduce(function(e,n){return"number"==typeof n.delete?(t.scroll.deleteAt(e,n.delete),e):e+(n.retain||n.insert.length||1)},0),this.scroll.batchEnd(),this.update(e)}},{key:"deleteText",value:function(e,t){return this.scroll.deleteAt(e,t),this.update(new a.default().retain(e).delete(t))}},{key:"formatLine",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.scroll.update(),Object.keys(r).forEach(function(i){if(null==n.scroll.whitelist||n.scroll.whitelist[i]){var o=n.scroll.lines(e,Math.max(t,1)),a=t;o.forEach(function(t){var o=t.length();if(t instanceof u.default){var l=e-t.offset(n.scroll),s=t.newlineIndex(l+a)-l+1;t.formatAt(l,s,i,r[i])}else t.format(i,r[i]);a-=o})}}),this.scroll.optimize(),this.update(new a.default().retain(e).retain(t,(0,p.default)(r)))}},{key:"formatText",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Object.keys(r).forEach(function(i){n.scroll.formatAt(e,t,i,r[i])}),this.update(new a.default().retain(e).retain(t,(0,p.default)(r)))}},{key:"getContents",value:function(e,t){return this.delta.slice(e,e+t)}},{key:"getDelta",value:function(){return this.scroll.lines().reduce(function(e,t){return e.concat(t.delta())},new a.default)}},{key:"getFormat",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=[],r=[];0===t?this.scroll.path(e).forEach(function(e){var t=i(e,1)[0];t instanceof h.default?n.push(t):t instanceof s.default.Leaf&&r.push(t)}):(n=this.scroll.lines(e,t),r=this.scroll.descendants(s.default.Leaf,e,t));var o=[n,r].map(function(e){if(0===e.length)return{};for(var t=(0,d.bubbleFormats)(e.shift());Object.keys(t).length>0;){var n=e.shift();if(null==n)break;t=function(e,t){return Object.keys(t).reduce(function(n,r){return null==e[r]||(t[r]===e[r]?n[r]=t[r]:Array.isArray(t[r])?0>t[r].indexOf(e[r])&&(n[r]=t[r].concat([e[r]])):n[r]=[t[r],e[r]]),n},{})}((0,d.bubbleFormats)(n),t)}return t});return m.default.apply(m.default,o)}},{key:"getText",value:function(e,t){return this.getContents(e,t).filter(function(e){return"string"==typeof e.insert}).map(function(e){return e.insert}).join("")}},{key:"insertEmbed",value:function(e,t,n){var r;return this.scroll.insertAt(e,t,n),this.update(new a.default().retain(e).insert((t in(r={})?Object.defineProperty(r,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):r[t]=n,r)))}},{key:"insertText",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return t=t.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),this.scroll.insertAt(e,t),Object.keys(r).forEach(function(i){n.scroll.formatAt(e,t.length,i,r[i])}),this.update(new a.default().retain(e).insert(t,(0,p.default)(r)))}},{key:"isBlank",value:function(){if(0==this.scroll.children.length)return!0;if(this.scroll.children.length>1)return!1;var e=this.scroll.children.head;return e.statics.blotName===h.default.blotName&&!(e.children.length>1)&&e.children.head instanceof f.default}},{key:"removeFormat",value:function(e,t){var n=this.getText(e,t),r=i(this.scroll.line(e+t),2),o=r[0],l=r[1],s=0,c=new a.default;null!=o&&(s=o instanceof u.default?o.newlineIndex(l)-l+1:o.length()-l,c=o.delta().slice(l,l+s-1).insert("\n"));var d=this.getContents(e,t+s).diff(new a.default().insert(n).concat(c)),h=new a.default().retain(e).concat(d);return this.applyDelta(h)}},{key:"update",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,r=this.delta;if(1===t.length&&"characterData"===t[0].type&&t[0].target.data.match(y)&&s.default.find(t[0].target)){var i=s.default.find(t[0].target),o=(0,d.bubbleFormats)(i),l=i.offset(this.scroll),u=t[0].oldValue.replace(c.default.CONTENTS,""),h=new a.default().insert(u),f=new a.default().insert(i.value());e=new a.default().retain(l).concat(h.diff(f,n)).reduce(function(e,t){return t.insert?e.insert(t.insert,o):e.push(t)},new a.default),this.delta=r.compose(e)}else this.delta=this.getDelta(),e&&(0,g.default)(r.compose(e),this.delta)||(e=r.diff(this.delta,n));return e}}]),e}();t.default=b},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Range=void 0;var r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,l=e[Symbol.iterator]();!(r=(a=l.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&l.return&&l.return()}finally{if(i)throw o}}return n}(e,t);throw TypeError("Invalid attempt to destructure non-iterable instance")},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=u(n(0)),a=u(n(21)),l=u(n(11)),s=u(n(8));function u(e){return e&&e.__esModule?e:{default:e}}function c(e){if(!Array.isArray(e))return Array.from(e);for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}function d(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}var h=(0,u(n(10)).default)("quill:selection"),f=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;d(this,e),this.index=t,this.length=n},p=function(){function e(t,n){var r=this;d(this,e),this.emitter=n,this.scroll=t,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=o.default.create("cursor",this),this.lastRange=this.savedRange=new f(0,0),this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,function(){r.mouseDown||setTimeout(r.update.bind(r,s.default.sources.USER),1)}),this.emitter.on(s.default.events.EDITOR_CHANGE,function(e,t){e===s.default.events.TEXT_CHANGE&&t.length()>0&&r.update(s.default.sources.SILENT)}),this.emitter.on(s.default.events.SCROLL_BEFORE_UPDATE,function(){if(r.hasFocus()){var e=r.getNativeRange();null!=e&&e.start.node!==r.cursor.textNode&&r.emitter.once(s.default.events.SCROLL_UPDATE,function(){try{r.setNativeRange(e.start.node,e.start.offset,e.end.node,e.end.offset)}catch(e){}})}}),this.emitter.on(s.default.events.SCROLL_OPTIMIZE,function(e,t){if(t.range){var n=t.range,i=n.startNode,o=n.startOffset,a=n.endNode,l=n.endOffset;r.setNativeRange(i,o,a,l)}}),this.update(s.default.sources.SILENT)}return i(e,[{key:"handleComposition",value:function(){var e=this;this.root.addEventListener("compositionstart",function(){e.composing=!0}),this.root.addEventListener("compositionend",function(){if(e.composing=!1,e.cursor.parent){var t=e.cursor.restore();t&&setTimeout(function(){e.setNativeRange(t.startNode,t.startOffset,t.endNode,t.endOffset)},1)}})}},{key:"handleDragging",value:function(){var e=this;this.emitter.listenDOM("mousedown",document.body,function(){e.mouseDown=!0}),this.emitter.listenDOM("mouseup",document.body,function(){e.mouseDown=!1,e.update(s.default.sources.USER)})}},{key:"focus",value:function(){this.hasFocus()||(this.root.focus(),this.setRange(this.savedRange))}},{key:"format",value:function(e,t){if(null==this.scroll.whitelist||this.scroll.whitelist[e]){this.scroll.update();var n=this.getNativeRange();if(!(null==n||!n.native.collapsed||o.default.query(e,o.default.Scope.BLOCK))){if(n.start.node!==this.cursor.textNode){var r=o.default.find(n.start.node,!1);if(null==r)return;if(r instanceof o.default.Leaf){var i=r.split(n.start.offset);r.parent.insertBefore(this.cursor,i)}else r.insertBefore(this.cursor,n.start.node);this.cursor.attach()}this.cursor.format(e,t),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}}},{key:"getBounds",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.scroll.length();t=Math.min((e=Math.min(e,n-1))+t,n-1)-e;var i=void 0,o=r(this.scroll.leaf(e),2),a=o[0],l=o[1];if(null==a)return null;var s=r(a.position(l,!0),2);i=s[0],l=s[1];var u=document.createRange();if(t>0){u.setStart(i,l);var c=r(this.scroll.leaf(e+t),2);if(a=c[0],l=c[1],null==a)return null;var d=r(a.position(l,!0),2);return i=d[0],l=d[1],u.setEnd(i,l),u.getBoundingClientRect()}var h="left",f=void 0;return i instanceof Text?(l<i.data.length?(u.setStart(i,l),u.setEnd(i,l+1)):(u.setStart(i,l-1),u.setEnd(i,l),h="right"),f=u.getBoundingClientRect()):(f=a.domNode.getBoundingClientRect(),l>0&&(h="right")),{bottom:f.top+f.height,height:f.height,left:f[h],right:f[h],top:f.top,width:0}}},{key:"getNativeRange",value:function(){var e=document.getSelection();if(null==e||e.rangeCount<=0)return null;var t=e.getRangeAt(0);if(null==t)return null;var n=this.normalizeNative(t);return h.info("getNativeRange",n),n}},{key:"getRange",value:function(){var e=this.getNativeRange();return null==e?[null,null]:[this.normalizedToRange(e),e]}},{key:"hasFocus",value:function(){return document.activeElement===this.root}},{key:"normalizedToRange",value:function(e){var t=this,n=[[e.start.node,e.start.offset]];e.native.collapsed||n.push([e.end.node,e.end.offset]);var i=n.map(function(e){var n=r(e,2),i=n[0],a=n[1],l=o.default.find(i,!0),s=l.offset(t.scroll);return 0===a?s:l instanceof o.default.Container?s+l.length():s+l.index(i,a)}),a=Math.min(Math.max.apply(Math,c(i)),this.scroll.length()-1),l=Math.min.apply(Math,[a].concat(c(i)));return new f(l,a-l)}},{key:"normalizeNative",value:function(e){if(!g(this.root,e.startContainer)||!e.collapsed&&!g(this.root,e.endContainer))return null;var t={start:{node:e.startContainer,offset:e.startOffset},end:{node:e.endContainer,offset:e.endOffset},native:e};return[t.start,t.end].forEach(function(e){for(var t=e.node,n=e.offset;!(t instanceof Text)&&t.childNodes.length>0;)if(t.childNodes.length>n)t=t.childNodes[n],n=0;else if(t.childNodes.length===n)n=(t=t.lastChild)instanceof Text?t.data.length:t.childNodes.length+1;else break;e.node=t,e.offset=n}),t}},{key:"rangeToNative",value:function(e){var t=this,n=e.collapsed?[e.index]:[e.index,e.index+e.length],i=[],o=this.scroll.length();return n.forEach(function(e,n){e=Math.min(o-1,e);var a=void 0,l=r(t.scroll.leaf(e),2),s=l[0],u=l[1],c=r(s.position(u,0!==n),2);a=c[0],u=c[1],i.push(a,u)}),i.length<2&&(i=i.concat(i)),i}},{key:"scrollIntoView",value:function(e){var t=this.lastRange;if(null!=t){var n=this.getBounds(t.index,t.length);if(null!=n){var i=this.scroll.length()-1,o=r(this.scroll.line(Math.min(t.index,i)),1)[0],a=o;if(t.length>0&&(a=r(this.scroll.line(Math.min(t.index+t.length,i)),1)[0]),null!=o&&null!=a){var l=e.getBoundingClientRect();n.top<l.top?e.scrollTop-=l.top-n.top:n.bottom>l.bottom&&(e.scrollTop+=n.bottom-l.bottom)}}}}},{key:"setNativeRange",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t,i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(h.info("setNativeRange",e,t,n,r),null==e||null!=this.root.parentNode&&null!=e.parentNode&&null!=n.parentNode){var o=document.getSelection();if(null!=o){if(null!=e){this.hasFocus()||this.root.focus();var a=(this.getNativeRange()||{}).native;if(null==a||i||e!==a.startContainer||t!==a.startOffset||n!==a.endContainer||r!==a.endOffset){"BR"==e.tagName&&(t=[].indexOf.call(e.parentNode.childNodes,e),e=e.parentNode),"BR"==n.tagName&&(r=[].indexOf.call(n.parentNode.childNodes,n),n=n.parentNode);var l=document.createRange();l.setStart(e,t),l.setEnd(n,r),o.removeAllRanges(),o.addRange(l)}}else o.removeAllRanges(),this.root.blur(),document.body.focus()}}}},{key:"setRange",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:s.default.sources.API;if("string"==typeof t&&(n=t,t=!1),h.info("setRange",e),null!=e){var r=this.rangeToNative(e);this.setNativeRange.apply(this,c(r).concat([t]))}else this.setNativeRange(null);this.update(n)}},{key:"update",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s.default.sources.USER,t=this.lastRange,n=r(this.getRange(),2),i=n[0],o=n[1];if(this.lastRange=i,null!=this.lastRange&&(this.savedRange=this.lastRange),!(0,l.default)(t,this.lastRange)){!this.composing&&null!=o&&o.native.collapsed&&o.start.node!==this.cursor.textNode&&this.cursor.restore();var u,c,d=[s.default.events.SELECTION_CHANGE,(0,a.default)(this.lastRange),(0,a.default)(t),e];(u=this.emitter).emit.apply(u,[s.default.events.EDITOR_CHANGE].concat(d)),e!==s.default.sources.SILENT&&(c=this.emitter).emit.apply(c,d)}}}]),e}();function g(e,t){try{t.parentNode}catch(e){return!1}return t instanceof Text&&(t=t.parentNode),e.contains(t)}t.Range=f,t.default=p},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r,i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);if(null===o)return;return e(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},a=function(e){function t(){return function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"insertInto",value:function(e,n){0===e.children.length?o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertInto",this).call(this,e,n):this.remove()}},{key:"length",value:function(){return 0}},{key:"value",value:function(){return""}}],[{key:"value",value:function(){}}]),t}(((r=n(0))&&r.__esModule?r:{default:r}).default.Embed);a.blotName="break",a.tagName="BR",t.default=a},function(e,t,n){var r,i=this&&this.__extends||(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(44),a=n(30),l=n(1),s=function(e){function t(t){var n=e.call(this,t)||this;return n.build(),n}return i(t,e),t.prototype.appendChild=function(e){this.insertBefore(e)},t.prototype.attach=function(){e.prototype.attach.call(this),this.children.forEach(function(e){e.attach()})},t.prototype.build=function(){var e=this;this.children=new o.default,[].slice.call(this.domNode.childNodes).reverse().forEach(function(t){try{var n=u(t);e.insertBefore(n,e.children.head||void 0)}catch(e){if(e instanceof l.ParchmentError)return;throw e}})},t.prototype.deleteAt=function(e,t){if(0===e&&t===this.length())return this.remove();this.children.forEachAt(e,t,function(e,t,n){e.deleteAt(t,n)})},t.prototype.descendant=function(e,n){var r=this.children.find(n),i=r[0],o=r[1];return null==e.blotName&&e(i)||null!=e.blotName&&i instanceof e?[i,o]:i instanceof t?i.descendant(e,o):[null,-1]},t.prototype.descendants=function(e,n,r){void 0===n&&(n=0),void 0===r&&(r=Number.MAX_VALUE);var i=[],o=r;return this.children.forEachAt(n,r,function(n,r,a){(null==e.blotName&&e(n)||null!=e.blotName&&n instanceof e)&&i.push(n),n instanceof t&&(i=i.concat(n.descendants(e,r,o))),o-=a}),i},t.prototype.detach=function(){this.children.forEach(function(e){e.detach()}),e.prototype.detach.call(this)},t.prototype.formatAt=function(e,t,n,r){this.children.forEachAt(e,t,function(e,t,i){e.formatAt(t,i,n,r)})},t.prototype.insertAt=function(e,t,n){var r=this.children.find(e),i=r[0],o=r[1];if(i)i.insertAt(o,t,n);else{var a=null==n?l.create("text",t):l.create(t,n);this.appendChild(a)}},t.prototype.insertBefore=function(e,t){if(null!=this.statics.allowedChildren&&!this.statics.allowedChildren.some(function(t){return e instanceof t}))throw new l.ParchmentError("Cannot insert "+e.statics.blotName+" into "+this.statics.blotName);e.insertInto(this,t)},t.prototype.length=function(){return this.children.reduce(function(e,t){return e+t.length()},0)},t.prototype.moveChildren=function(e,t){this.children.forEach(function(n){e.insertBefore(n,t)})},t.prototype.optimize=function(t){if(e.prototype.optimize.call(this,t),0===this.children.length){if(null!=this.statics.defaultChild){var n=l.create(this.statics.defaultChild);this.appendChild(n),n.optimize(t)}else this.remove()}},t.prototype.path=function(e,n){void 0===n&&(n=!1);var r=this.children.find(e,n),i=r[0],o=r[1],a=[[this,e]];return i instanceof t?a.concat(i.path(o,n)):(null!=i&&a.push([i,o]),a)},t.prototype.removeChild=function(e){this.children.remove(e)},t.prototype.replace=function(n){n instanceof t&&n.moveChildren(this),e.prototype.replace.call(this,n)},t.prototype.split=function(e,t){if(void 0===t&&(t=!1),!t){if(0===e)return this;if(e===this.length())return this.next}var n=this.clone();return this.parent.insertBefore(n,this.next),this.children.forEachAt(e,this.length(),function(e,r,i){e=e.split(r,t),n.appendChild(e)}),n},t.prototype.unwrap=function(){this.moveChildren(this.parent,this.next),this.remove()},t.prototype.update=function(e,t){var n=this,r=[],i=[];e.forEach(function(e){e.target===n.domNode&&"childList"===e.type&&(r.push.apply(r,e.addedNodes),i.push.apply(i,e.removedNodes))}),i.forEach(function(e){if(!(null!=e.parentNode&&"IFRAME"!==e.tagName&&document.body.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY)){var t=l.find(e);null!=t&&(null==t.domNode.parentNode||t.domNode.parentNode===n.domNode)&&t.detach()}}),r.filter(function(e){return e.parentNode==n.domNode}).sort(function(e,t){return e===t?0:e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1}).forEach(function(e){var t=null;null!=e.nextSibling&&(t=l.find(e.nextSibling));var r=u(e);(r.next!=t||null==r.next)&&(null!=r.parent&&r.parent.removeChild(n),n.insertBefore(r,t||void 0))})},t}(a.default);function u(e){var t=l.find(e);if(null==t)try{t=l.create(e)}catch(n){t=l.create(l.Scope.INLINE),[].slice.call(e.childNodes).forEach(function(e){t.domNode.appendChild(e)}),e.parentNode&&e.parentNode.replaceChild(t.domNode,e),t.attach()}return t}t.default=s},function(e,t,n){var r,i=this&&this.__extends||(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(12),a=n(31),l=n(17),s=n(1),u=function(e){function t(t){var n=e.call(this,t)||this;return n.attributes=new a.default(n.domNode),n}return i(t,e),t.formats=function(e){return"string"==typeof this.tagName||(Array.isArray(this.tagName)?e.tagName.toLowerCase():void 0)},t.prototype.format=function(e,t){var n=s.query(e);n instanceof o.default?this.attributes.attribute(n,t):t&&null!=n&&(e!==this.statics.blotName||this.formats()[e]!==t)&&this.replaceWith(e,t)},t.prototype.formats=function(){var e=this.attributes.values(),t=this.statics.formats(this.domNode);return null!=t&&(e[this.statics.blotName]=t),e},t.prototype.replaceWith=function(t,n){var r=e.prototype.replaceWith.call(this,t,n);return this.attributes.copy(r),r},t.prototype.update=function(t,n){var r=this;e.prototype.update.call(this,t,n),t.some(function(e){return e.target===r.domNode&&"attributes"===e.type})&&this.attributes.build()},t.prototype.wrap=function(n,r){var i=e.prototype.wrap.call(this,n,r);return i instanceof t&&i.statics.scope===this.statics.scope&&this.attributes.move(i),i},t}(l.default);t.default=u},function(e,t,n){var r,i=this&&this.__extends||(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(30),a=n(1),l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.value=function(e){return!0},t.prototype.index=function(e,t){return this.domNode===e||this.domNode.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(t,1):-1},t.prototype.position=function(e,t){var n=[].indexOf.call(this.parent.domNode.childNodes,this.domNode);return e>0&&(n+=1),[this.parent.domNode,n]},t.prototype.value=function(){var e;return(e={})[this.statics.blotName]=this.statics.value(this.domNode)||!0,e},t.scope=a.Scope.INLINE_BLOT,t}(o.default);t.default=l},function(e,t,n){var r=n(11),i=n(3),o={attributes:{compose:function(e,t,n){"object"!=typeof e&&(e={}),"object"!=typeof t&&(t={});var r=i(!0,{},t);for(var o in n||(r=Object.keys(r).reduce(function(e,t){return null!=r[t]&&(e[t]=r[t]),e},{})),e)void 0!==e[o]&&void 0===t[o]&&(r[o]=e[o]);return Object.keys(r).length>0?r:void 0},diff:function(e,t){"object"!=typeof e&&(e={}),"object"!=typeof t&&(t={});var n=Object.keys(e).concat(Object.keys(t)).reduce(function(n,i){return r(e[i],t[i])||(n[i]=void 0===t[i]?null:t[i]),n},{});return Object.keys(n).length>0?n:void 0},transform:function(e,t,n){if("object"!=typeof e)return t;if("object"==typeof t){if(!n)return t;var r=Object.keys(t).reduce(function(n,r){return void 0===e[r]&&(n[r]=t[r]),n},{});return Object.keys(r).length>0?r:void 0}}},iterator:function(e){return new a(e)},length:function(e){return"number"==typeof e.delete?e.delete:"number"==typeof e.retain?e.retain:"string"==typeof e.insert?e.insert.length:1}};function a(e){this.ops=e,this.index=0,this.offset=0}a.prototype.hasNext=function(){return this.peekLength()<1/0},a.prototype.next=function(e){e||(e=1/0);var t=this.ops[this.index];if(!t)return{retain:1/0};var n=this.offset,r=o.length(t);if(e>=r-n?(e=r-n,this.index+=1,this.offset=0):this.offset+=e,"number"==typeof t.delete)return{delete:e};var i={};return t.attributes&&(i.attributes=t.attributes),"number"==typeof t.retain?i.retain=e:"string"==typeof t.insert?i.insert=t.insert.substr(n,e):i.insert=t.insert,i},a.prototype.peek=function(){return this.ops[this.index]},a.prototype.peekLength=function(){return this.ops[this.index]?o.length(this.ops[this.index])-this.offset:1/0},a.prototype.peekType=function(){if(this.ops[this.index]){if("number"==typeof this.ops[this.index].delete)return"delete";if("number"!=typeof this.ops[this.index].retain)return"insert"}return"retain"},a.prototype.rest=function(){if(!this.hasNext())return[];if(0===this.offset)return this.ops.slice(this.index);var e=this.offset,t=this.index,n=this.next(),r=this.ops.slice(this.index);return this.offset=e,this.index=t,[n].concat(r)},e.exports=o},function(e,t){var n=function(){var e,t,n;function r(e,t){return null!=t&&e instanceof t}try{e=Map}catch(t){e=function(){}}try{t=Set}catch(e){t=function(){}}try{n=Promise}catch(e){n=function(){}}function i(o,l,s,u,c){"object"==typeof l&&(s=l.depth,u=l.prototype,c=l.includeNonEnumerable,l=l.circular);var d=[],h=[];return void 0===l&&(l=!0),void 0===s&&(s=1/0),function o(s,f){if(null===s)return null;if(0===f||"object"!=typeof s)return s;if(r(s,e))p=new e;else if(r(s,t))p=new t;else if(r(s,n))p=new n(function(e,t){s.then(function(t){e(o(t,f-1))},function(e){t(o(e,f-1))})});else if(i.__isArray(s))p=[];else if(i.__isRegExp(s))p=new RegExp(s.source,a(s)),s.lastIndex&&(p.lastIndex=s.lastIndex);else if(i.__isDate(s))p=new Date(s.getTime());else{if(om.isBuffer(s))return p=om.allocUnsafe?om.allocUnsafe(s.length):new om(s.length),s.copy(p),p;r(s,Error)?p=Object.create(s):void 0===u?p=Object.create(g=Object.getPrototypeOf(s)):(p=Object.create(u),g=u)}if(l){var p,g,m,v=d.indexOf(s);if(-1!=v)return h[v];d.push(s),h.push(p)}for(var y in r(s,e)&&s.forEach(function(e,t){var n=o(t,f-1),r=o(e,f-1);p.set(n,r)}),r(s,t)&&s.forEach(function(e){var t=o(e,f-1);p.add(t)}),s)g&&(m=Object.getOwnPropertyDescriptor(g,y)),m&&null==m.set||(p[y]=o(s[y],f-1));if(Object.getOwnPropertySymbols)for(var b=Object.getOwnPropertySymbols(s),y=0;y<b.length;y++){var w=b[y],x=Object.getOwnPropertyDescriptor(s,w);(!x||x.enumerable||c)&&(p[w]=o(s[w],f-1),x.enumerable||Object.defineProperty(p,w,{enumerable:!1}))}if(c)for(var _=Object.getOwnPropertyNames(s),y=0;y<_.length;y++){var E=_[y],x=Object.getOwnPropertyDescriptor(s,E);x&&x.enumerable||(p[E]=o(s[E],f-1),Object.defineProperty(p,E,{enumerable:!1}))}return p}(o,s)}function o(e){return Object.prototype.toString.call(e)}function a(e){var t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),t}return i.clonePrototype=function(e){if(null===e)return null;var t=function(){};return t.prototype=e,new t},i.__objToStr=o,i.__isDate=function(e){return"object"==typeof e&&"[object Date]"===o(e)},i.__isArray=function(e){return"object"==typeof e&&"[object Array]"===o(e)},i.__isRegExp=function(e){return"object"==typeof e&&"[object RegExp]"===o(e)},i.__getRegExpFlags=a,i}();"object"==typeof e&&e.exports&&(e.exports=n)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,l=e[Symbol.iterator]();!(r=(a=l.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&l.return&&l.return()}finally{if(i)throw o}}return n}(e,t);throw TypeError("Invalid attempt to destructure non-iterable instance")},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);if(null===o)return;return e(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},a=f(n(0)),l=f(n(8)),s=n(4),u=f(s),c=f(n(16)),d=f(n(13)),h=f(n(25));function f(e){return e&&e.__esModule?e:{default:e}}function p(e){return e instanceof u.default||e instanceof s.BlockEmbed}var g=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r.emitter=n.emitter,Array.isArray(n.whitelist)&&(r.whitelist=n.whitelist.reduce(function(e,t){return e[t]=!0,e},{})),r.domNode.addEventListener("DOMNodeInserted",function(){}),r.optimize(),r.enable(),r}return function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"batchStart",value:function(){this.batch=!0}},{key:"batchEnd",value:function(){this.batch=!1,this.optimize()}},{key:"deleteAt",value:function(e,n){var i=r(this.line(e),2),a=i[0],l=i[1],u=r(this.line(e+n),1)[0];if(o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"deleteAt",this).call(this,e,n),null!=u&&a!==u&&l>0){if(a instanceof s.BlockEmbed||u instanceof s.BlockEmbed){this.optimize();return}if(a instanceof d.default){var h=a.newlineIndex(a.length(),!0);if(h>-1&&(a=a.split(h+1))===u){this.optimize();return}}else if(u instanceof d.default){var f=u.newlineIndex(0);f>-1&&u.split(f+1)}var p=u.children.head instanceof c.default?null:u.children.head;a.moveChildren(u,p),a.remove()}this.optimize()}},{key:"enable",value:function(){var e=!(arguments.length>0)||void 0===arguments[0]||arguments[0];this.domNode.setAttribute("contenteditable",e)}},{key:"formatAt",value:function(e,n,r,i){(null==this.whitelist||this.whitelist[r])&&(o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"formatAt",this).call(this,e,n,r,i),this.optimize())}},{key:"insertAt",value:function(e,n,r){if(null==r||null==this.whitelist||this.whitelist[n]){if(e>=this.length()){if(null==r||null==a.default.query(n,a.default.Scope.BLOCK)){var i=a.default.create(this.statics.defaultChild);this.appendChild(i),null==r&&n.endsWith("\n")&&(n=n.slice(0,-1)),i.insertAt(0,n,r)}else{var l=a.default.create(n,r);this.appendChild(l)}}else o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertAt",this).call(this,e,n,r);this.optimize()}}},{key:"insertBefore",value:function(e,n){if(e.statics.scope===a.default.Scope.INLINE_BLOT){var r=a.default.create(this.statics.defaultChild);r.appendChild(e),e=r}o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertBefore",this).call(this,e,n)}},{key:"leaf",value:function(e){return this.path(e).pop()||[null,-1]}},{key:"line",value:function(e){return e===this.length()?this.line(e-1):this.descendant(p,e)}},{key:"lines",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE;return function e(t,n,r){var i=[],o=r;return t.children.forEachAt(n,r,function(t,n,r){p(t)?i.push(t):t instanceof a.default.Container&&(i=i.concat(e(t,n,o))),o-=r}),i}(this,e,t)}},{key:"optimize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!0!==this.batch&&(o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"optimize",this).call(this,e,n),e.length>0&&this.emitter.emit(l.default.events.SCROLL_OPTIMIZE,e,n))}},{key:"path",value:function(e){return o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"path",this).call(this,e).slice(1)}},{key:"update",value:function(e){if(!0!==this.batch){var n=l.default.sources.USER;"string"==typeof e&&(n=e),Array.isArray(e)||(e=this.observer.takeRecords()),e.length>0&&this.emitter.emit(l.default.events.SCROLL_BEFORE_UPDATE,n,e),o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"update",this).call(this,e.concat([])),e.length>0&&this.emitter.emit(l.default.events.SCROLL_UPDATE,n,e)}}}]),t}(a.default.Scroll);g.blotName="scroll",g.className="ql-editor",g.tagName="DIV",g.defaultChild="block",g.allowedChildren=[u.default,s.BlockEmbed,h.default],t.default=g},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.SHORTKEY=t.default=void 0;var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,l=e[Symbol.iterator]();!(r=(a=l.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&l.return&&l.return()}finally{if(i)throw o}}return n}(e,t);throw TypeError("Invalid attempt to destructure non-iterable instance")},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=g(n(21)),l=g(n(11)),s=g(n(3)),u=g(n(2)),c=g(n(20)),d=g(n(0)),h=g(n(5)),f=g(n(10)),p=g(n(9));function g(e){return e&&e.__esModule?e:{default:e}}function m(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var v=(0,f.default)("quill:keyboard"),y=/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey",b=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r.bindings={},Object.keys(r.options.bindings).forEach(function(t){("list autofill"!==t||null==e.scroll.whitelist||e.scroll.whitelist.list)&&r.options.bindings[t]&&r.addBinding(r.options.bindings[t])}),r.addBinding({key:t.keys.ENTER,shiftKey:null},S),r.addBinding({key:t.keys.ENTER,metaKey:null,ctrlKey:null,altKey:null},function(){}),/Firefox/i.test(navigator.userAgent)?(r.addBinding({key:t.keys.BACKSPACE},{collapsed:!0},x),r.addBinding({key:t.keys.DELETE},{collapsed:!0},_)):(r.addBinding({key:t.keys.BACKSPACE},{collapsed:!0,prefix:/^.?$/},x),r.addBinding({key:t.keys.DELETE},{collapsed:!0,suffix:/^.?$/},_)),r.addBinding({key:t.keys.BACKSPACE},{collapsed:!1},E),r.addBinding({key:t.keys.DELETE},{collapsed:!1},E),r.addBinding({key:t.keys.BACKSPACE,altKey:null,ctrlKey:null,metaKey:null,shiftKey:null},{collapsed:!0,offset:0},x),r.listen(),r}return function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,null,[{key:"match",value:function(e,t){return t=k(t),!["altKey","ctrlKey","metaKey","shiftKey"].some(function(n){return!!t[n]!==e[n]&&null!==t[n]})&&t.key===(e.which||e.keyCode)}}]),o(t,[{key:"addBinding",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=k(e);if(null==r||null==r.key)return v.warn("Attempted to add invalid keyboard binding",r);"function"==typeof t&&(t={handler:t}),"function"==typeof n&&(n={handler:n}),r=(0,s.default)(r,t,n),this.bindings[r.key]=this.bindings[r.key]||[],this.bindings[r.key].push(r)}},{key:"listen",value:function(){var e=this;this.quill.root.addEventListener("keydown",function(n){if(!n.defaultPrevented){var o=n.which||n.keyCode,a=(e.bindings[o]||[]).filter(function(e){return t.match(n,e)});if(0!==a.length){var s=e.quill.getSelection();if(null!=s&&e.quill.hasFocus()){var u=i(e.quill.getLine(s.index),2),c=u[0],h=u[1],f=i(e.quill.getLeaf(s.index),2),p=f[0],g=f[1],m=i(0===s.length?[p,g]:e.quill.getLeaf(s.index+s.length),2),v=m[0],y=m[1],b=p instanceof d.default.Text?p.value().slice(0,g):"",w=v instanceof d.default.Text?v.value().slice(y):"",x={collapsed:0===s.length,empty:0===s.length&&1>=c.length(),format:e.quill.getFormat(s),offset:h,prefix:b,suffix:w};a.some(function(t){if(null!=t.collapsed&&t.collapsed!==x.collapsed||null!=t.empty&&t.empty!==x.empty||null!=t.offset&&t.offset!==x.offset)return!1;if(Array.isArray(t.format)){if(t.format.every(function(e){return null==x.format[e]}))return!1}else if("object"===r(t.format)&&!Object.keys(t.format).every(function(e){return!0===t.format[e]?null!=x.format[e]:!1===t.format[e]?null==x.format[e]:(0,l.default)(t.format[e],x.format[e])}))return!1;return!!((null==t.prefix||t.prefix.test(x.prefix))&&(null==t.suffix||t.suffix.test(x.suffix)))&&!0!==t.handler.call(e,s,x)})&&n.preventDefault()}}}})}}]),t}(p.default);function w(e,t){var n,r=e===b.keys.LEFT?"prefix":"suffix";return m(n={key:e,shiftKey:t,altKey:null},r,/^$/),m(n,"handler",function(n){var r=n.index;return e===b.keys.RIGHT&&(r+=n.length+1),!(i(this.quill.getLeaf(r),1)[0]instanceof d.default.Embed)||(e===b.keys.LEFT?t?this.quill.setSelection(n.index-1,n.length+1,h.default.sources.USER):this.quill.setSelection(n.index-1,h.default.sources.USER):t?this.quill.setSelection(n.index,n.length+1,h.default.sources.USER):this.quill.setSelection(n.index+n.length+1,h.default.sources.USER),!1)}),n}function x(e,t){if(!(0===e.index||1>=this.quill.getLength())){var n=i(this.quill.getLine(e.index),1)[0],r={};if(0===t.offset){var o=i(this.quill.getLine(e.index-1),1)[0];if(null!=o&&o.length()>1){var a=n.formats(),l=this.quill.getFormat(e.index-1,1);r=c.default.attributes.diff(a,l)||{}}}var s=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(t.prefix)?2:1;this.quill.deleteText(e.index-s,s,h.default.sources.USER),Object.keys(r).length>0&&this.quill.formatLine(e.index-s,s,r,h.default.sources.USER),this.quill.focus()}}function _(e,t){var n=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(t.suffix)?2:1;if(!(e.index>=this.quill.getLength()-n)){var r={},o=0,a=i(this.quill.getLine(e.index),1)[0];if(t.offset>=a.length()-1){var l=i(this.quill.getLine(e.index+1),1)[0];if(l){var s=a.formats(),u=this.quill.getFormat(e.index,1);r=c.default.attributes.diff(s,u)||{},o=l.length()}}this.quill.deleteText(e.index,n,h.default.sources.USER),Object.keys(r).length>0&&this.quill.formatLine(e.index+o-1,n,r,h.default.sources.USER)}}function E(e){var t=this.quill.getLines(e),n={};if(t.length>1){var r=t[0].formats(),i=t[t.length-1].formats();n=c.default.attributes.diff(i,r)||{}}this.quill.deleteText(e,h.default.sources.USER),Object.keys(n).length>0&&this.quill.formatLine(e.index,1,n,h.default.sources.USER),this.quill.setSelection(e.index,h.default.sources.SILENT),this.quill.focus()}function S(e,t){var n=this;e.length>0&&this.quill.scroll.deleteAt(e.index,e.length);var r=Object.keys(t.format).reduce(function(e,n){return d.default.query(n,d.default.Scope.BLOCK)&&!Array.isArray(t.format[n])&&(e[n]=t.format[n]),e},{});this.quill.insertText(e.index,"\n",r,h.default.sources.USER),this.quill.setSelection(e.index+1,h.default.sources.SILENT),this.quill.focus(),Object.keys(t.format).forEach(function(e){null!=r[e]||Array.isArray(t.format[e])||"link"===e||n.quill.format(e,t.format[e],h.default.sources.USER)})}function C(e){return{key:b.keys.TAB,shiftKey:!e,format:{"code-block":!0},handler:function(t){var n=d.default.query("code-block"),r=t.index,o=t.length,a=i(this.quill.scroll.descendant(n,r),2),l=a[0],s=a[1];if(null!=l){var u=this.quill.getIndex(l),c=l.newlineIndex(s,!0)+1,f=l.newlineIndex(u+s+o),p=l.domNode.textContent.slice(c,f).split("\n");s=0,p.forEach(function(t,i){e?(l.insertAt(c+s,n.TAB),s+=n.TAB.length,0===i?r+=n.TAB.length:o+=n.TAB.length):t.startsWith(n.TAB)&&(l.deleteAt(c+s,n.TAB.length),s-=n.TAB.length,0===i?r-=n.TAB.length:o-=n.TAB.length),s+=t.length+1}),this.quill.update(h.default.sources.USER),this.quill.setSelection(r,o,h.default.sources.SILENT)}}}}function O(e){return{key:e[0].toUpperCase(),shortKey:!0,handler:function(t,n){this.quill.format(e,!n.format[e],h.default.sources.USER)}}}function k(e){if("string"==typeof e||"number"==typeof e)return k({key:e});if((void 0===e?"undefined":r(e))==="object"&&(e=(0,a.default)(e,!1)),"string"==typeof e.key){if(null!=b.keys[e.key.toUpperCase()])e.key=b.keys[e.key.toUpperCase()];else{if(1!==e.key.length)return null;e.key=e.key.toUpperCase().charCodeAt(0)}}return e.shortKey&&(e[y]=e.shortKey,delete e.shortKey),e}b.keys={BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},b.DEFAULTS={bindings:{bold:O("bold"),italic:O("italic"),underline:O("underline"),indent:{key:b.keys.TAB,format:["blockquote","indent","list"],handler:function(e,t){if(t.collapsed&&0!==t.offset)return!0;this.quill.format("indent","+1",h.default.sources.USER)}},outdent:{key:b.keys.TAB,shiftKey:!0,format:["blockquote","indent","list"],handler:function(e,t){if(t.collapsed&&0!==t.offset)return!0;this.quill.format("indent","-1",h.default.sources.USER)}},"outdent backspace":{key:b.keys.BACKSPACE,collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler:function(e,t){null!=t.format.indent?this.quill.format("indent","-1",h.default.sources.USER):null!=t.format.list&&this.quill.format("list",!1,h.default.sources.USER)}},"indent code-block":C(!0),"outdent code-block":C(!1),"remove tab":{key:b.keys.TAB,shiftKey:!0,collapsed:!0,prefix:/\t$/,handler:function(e){this.quill.deleteText(e.index-1,1,h.default.sources.USER)}},tab:{key:b.keys.TAB,handler:function(e){this.quill.history.cutoff();var t=new u.default().retain(e.index).delete(e.length).insert(" ");this.quill.updateContents(t,h.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(e.index+1,h.default.sources.SILENT)}},"list empty enter":{key:b.keys.ENTER,collapsed:!0,format:["list"],empty:!0,handler:function(e,t){this.quill.format("list",!1,h.default.sources.USER),t.format.indent&&this.quill.format("indent",!1,h.default.sources.USER)}},"checklist enter":{key:b.keys.ENTER,collapsed:!0,format:{list:"checked"},handler:function(e){var t=i(this.quill.getLine(e.index),2),n=t[0],r=t[1],o=(0,s.default)({},n.formats(),{list:"checked"}),a=new u.default().retain(e.index).insert("\n",o).retain(n.length()-r-1).retain(1,{list:"unchecked"});this.quill.updateContents(a,h.default.sources.USER),this.quill.setSelection(e.index+1,h.default.sources.SILENT),this.quill.scrollIntoView()}},"header enter":{key:b.keys.ENTER,collapsed:!0,format:["header"],suffix:/^$/,handler:function(e,t){var n=i(this.quill.getLine(e.index),2),r=n[0],o=n[1],a=new u.default().retain(e.index).insert("\n",t.format).retain(r.length()-o-1).retain(1,{header:null});this.quill.updateContents(a,h.default.sources.USER),this.quill.setSelection(e.index+1,h.default.sources.SILENT),this.quill.scrollIntoView()}},"list autofill":{key:" ",collapsed:!0,format:{list:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler:function(e,t){var n=t.prefix.length,r=i(this.quill.getLine(e.index),2),o=r[0],a=r[1];if(a>n)return!0;var l=void 0;switch(t.prefix.trim()){case"[]":case"[ ]":l="unchecked";break;case"[x]":l="checked";break;case"-":case"*":l="bullet";break;default:l="ordered"}this.quill.insertText(e.index," ",h.default.sources.USER),this.quill.history.cutoff();var s=new u.default().retain(e.index-a).delete(n+1).retain(o.length()-2-a).retain(1,{list:l});this.quill.updateContents(s,h.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(e.index-n,h.default.sources.SILENT)}},"code exit":{key:b.keys.ENTER,collapsed:!0,format:["code-block"],prefix:/\n\n$/,suffix:/^\s+$/,handler:function(e){var t=i(this.quill.getLine(e.index),2),n=t[0],r=t[1],o=new u.default().retain(e.index+n.length()-r-2).retain(1,{"code-block":null}).delete(1);this.quill.updateContents(o,h.default.sources.USER)}},"embed left":w(b.keys.LEFT,!1),"embed left shift":w(b.keys.LEFT,!0),"embed right":w(b.keys.RIGHT,!1),"embed right shift":w(b.keys.RIGHT,!0)}},t.default=b,t.SHORTKEY=y},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,l=e[Symbol.iterator]();!(r=(a=l.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&l.return&&l.return()}finally{if(i)throw o}}return n}(e,t);throw TypeError("Invalid attempt to destructure non-iterable instance")},i=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);if(null===o)return;return e(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=s(n(0)),l=s(n(7));function s(e){return e&&e.__esModule?e:{default:e}}var u=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r.selection=n,r.textNode=document.createTextNode(t.CONTENTS),r.domNode.appendChild(r.textNode),r._length=0,r}return function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,null,[{key:"value",value:function(){}}]),o(t,[{key:"detach",value:function(){null!=this.parent&&this.parent.removeChild(this)}},{key:"format",value:function(e,n){if(0!==this._length)return i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"format",this).call(this,e,n);for(var r=this,o=0;null!=r&&r.statics.scope!==a.default.Scope.BLOCK_BLOT;)o+=r.offset(r.parent),r=r.parent;null!=r&&(this._length=t.CONTENTS.length,r.optimize(),r.formatAt(o,t.CONTENTS.length,e,n),this._length=0)}},{key:"index",value:function(e,n){return e===this.textNode?0:i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"index",this).call(this,e,n)}},{key:"length",value:function(){return this._length}},{key:"position",value:function(){return[this.textNode,this.textNode.data.length]}},{key:"remove",value:function(){i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"remove",this).call(this),this.parent=null}},{key:"restore",value:function(){if(!this.selection.composing&&null!=this.parent){var e=this.textNode,n=this.selection.getNativeRange(),i=void 0,o=void 0,s=void 0;if(null!=n&&n.start.node===e&&n.end.node===e){var u=[e,n.start.offset,n.end.offset];i=u[0],o=u[1],s=u[2]}for(;null!=this.domNode.lastChild&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode);if(this.textNode.data!==t.CONTENTS){var c=this.textNode.data.split(t.CONTENTS).join("");this.next instanceof l.default?(i=this.next.domNode,this.next.insertAt(0,c),this.textNode.data=t.CONTENTS):(this.textNode.data=c,this.parent.insertBefore(a.default.create(this.textNode),this),this.textNode=document.createTextNode(t.CONTENTS),this.domNode.appendChild(this.textNode))}if(this.remove(),null!=o){var d=r([o,s].map(function(e){return Math.max(0,Math.min(i.data.length,e-1))}),2);return o=d[0],s=d[1],{startNode:i,startOffset:o,endNode:i,endOffset:s}}}}},{key:"update",value:function(e,t){var n=this;if(e.some(function(e){return"characterData"===e.type&&e.target===n.textNode})){var r=this.restore();r&&(t.range=r)}}},{key:"value",value:function(){return""}}]),t}(a.default.Embed);u.blotName="cursor",u.className="ql-cursor",u.tagName="span",u.CONTENTS="\uFEFF",t.default=u},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=a(n(0)),i=n(4),o=a(i);function a(e){return e&&e.__esModule?e:{default:e}}var l=function(e){function t(){return function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(r.default.Container);l.allowedChildren=[o.default,i.BlockEmbed,l],t.default=l},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.ColorStyle=t.ColorClass=t.ColorAttributor=void 0;var r,i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);if(null===o)return;return e(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},a=(r=n(0))&&r.__esModule?r:{default:r},l=function(e){function t(){return function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"value",value:function(e){var n=o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"value",this).call(this,e);return n.startsWith("rgb(")?"#"+(n=n.replace(/^[^\d]+/,"").replace(/[^\d]+$/,"")).split(",").map(function(e){return("00"+parseInt(e).toString(16)).slice(-2)}).join(""):n}}]),t}(a.default.Attributor.Style),s=new a.default.Attributor.Class("color","ql-color",{scope:a.default.Scope.INLINE}),u=new l("color","color",{scope:a.default.Scope.INLINE});t.ColorAttributor=l,t.ColorClass=s,t.ColorStyle=u},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.sanitize=t.default=void 0;var r,i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);if(null===o)return;return e(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},a=function(e){function t(){return function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"format",value:function(e,n){if(e!==this.statics.blotName||!n)return o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"format",this).call(this,e,n);n=this.constructor.sanitize(n),this.domNode.setAttribute("href",n)}}],[{key:"create",value:function(e){var n=o(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,e);return e=this.sanitize(e),n.setAttribute("href",e),n.setAttribute("rel","noopener noreferrer"),n.setAttribute("target","_blank"),n}},{key:"formats",value:function(e){return e.getAttribute("href")}},{key:"sanitize",value:function(e){return l(e,this.PROTOCOL_WHITELIST)?e:this.SANITIZED_URL}}]),t}(((r=n(6))&&r.__esModule?r:{default:r}).default);function l(e,t){var n=document.createElement("a");n.href=e;var r=n.href.slice(0,n.href.indexOf(":"));return t.indexOf(r)>-1}a.blotName="link",a.tagName="A",a.SANITIZED_URL="about:blank",a.PROTOCOL_WHITELIST=["http","https","mailto","tel"],t.default=a,t.sanitize=l},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=l(n(23)),a=l(n(107));function l(e){return e&&e.__esModule?e:{default:e}}var s=0;function u(e,t){e.setAttribute(t,"true"!==e.getAttribute(t))}var c=function(){function e(t){var n=this;(function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")})(this,e),this.select=t,this.container=document.createElement("span"),this.buildPicker(),this.select.style.display="none",this.select.parentNode.insertBefore(this.container,this.select),this.label.addEventListener("mousedown",function(){n.togglePicker()}),this.label.addEventListener("keydown",function(e){switch(e.keyCode){case o.default.keys.ENTER:n.togglePicker();break;case o.default.keys.ESCAPE:n.escape(),e.preventDefault()}}),this.select.addEventListener("change",this.update.bind(this))}return i(e,[{key:"togglePicker",value:function(){this.container.classList.toggle("ql-expanded"),u(this.label,"aria-expanded"),u(this.options,"aria-hidden")}},{key:"buildItem",value:function(e){var t=this,n=document.createElement("span");return n.tabIndex="0",n.setAttribute("role","button"),n.classList.add("ql-picker-item"),e.hasAttribute("value")&&n.setAttribute("data-value",e.getAttribute("value")),e.textContent&&n.setAttribute("data-label",e.textContent),n.addEventListener("click",function(){t.selectItem(n,!0)}),n.addEventListener("keydown",function(e){switch(e.keyCode){case o.default.keys.ENTER:t.selectItem(n,!0),e.preventDefault();break;case o.default.keys.ESCAPE:t.escape(),e.preventDefault()}}),n}},{key:"buildLabel",value:function(){var e=document.createElement("span");return e.classList.add("ql-picker-label"),e.innerHTML=a.default,e.tabIndex="0",e.setAttribute("role","button"),e.setAttribute("aria-expanded","false"),this.container.appendChild(e),e}},{key:"buildOptions",value:function(){var e=this,t=document.createElement("span");t.classList.add("ql-picker-options"),t.setAttribute("aria-hidden","true"),t.tabIndex="-1",t.id="ql-picker-options-"+s,s+=1,this.label.setAttribute("aria-controls",t.id),this.options=t,[].slice.call(this.select.options).forEach(function(n){var r=e.buildItem(n);t.appendChild(r),!0===n.selected&&e.selectItem(r)}),this.container.appendChild(t)}},{key:"buildPicker",value:function(){var e=this;[].slice.call(this.select.attributes).forEach(function(t){e.container.setAttribute(t.name,t.value)}),this.container.classList.add("ql-picker"),this.label=this.buildLabel(),this.buildOptions()}},{key:"escape",value:function(){var e=this;this.close(),setTimeout(function(){return e.label.focus()},1)}},{key:"close",value:function(){this.container.classList.remove("ql-expanded"),this.label.setAttribute("aria-expanded","false"),this.options.setAttribute("aria-hidden","true")}},{key:"selectItem",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.container.querySelector(".ql-selected");if(e!==n&&(null!=n&&n.classList.remove("ql-selected"),null!=e&&(e.classList.add("ql-selected"),this.select.selectedIndex=[].indexOf.call(e.parentNode.children,e),e.hasAttribute("data-value")?this.label.setAttribute("data-value",e.getAttribute("data-value")):this.label.removeAttribute("data-value"),e.hasAttribute("data-label")?this.label.setAttribute("data-label",e.getAttribute("data-label")):this.label.removeAttribute("data-label"),t))){if("function"==typeof Event)this.select.dispatchEvent(new Event("change"));else if(("undefined"==typeof Event?"undefined":r(Event))==="object"){var i=document.createEvent("Event");i.initEvent("change",!0,!0),this.select.dispatchEvent(i)}this.close()}}},{key:"update",value:function(){var e=void 0;if(this.select.selectedIndex>-1){var t=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];e=this.select.options[this.select.selectedIndex],this.selectItem(t)}else this.selectItem(null);var n=null!=e&&e!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",n)}}]),e}();t.default=c},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=v(n(0)),i=v(n(5)),o=n(4),a=v(o),l=v(n(16)),s=v(n(25)),u=v(n(24)),c=v(n(35)),d=v(n(6)),h=v(n(22)),f=v(n(7)),p=v(n(55)),g=v(n(42)),m=v(n(23));function v(e){return e&&e.__esModule?e:{default:e}}i.default.register({"blots/block":a.default,"blots/block/embed":o.BlockEmbed,"blots/break":l.default,"blots/container":s.default,"blots/cursor":u.default,"blots/embed":c.default,"blots/inline":d.default,"blots/scroll":h.default,"blots/text":f.default,"modules/clipboard":p.default,"modules/history":g.default,"modules/keyboard":m.default}),r.default.register(a.default,l.default,u.default,d.default,h.default,f.default),t.default=i.default},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),i=function(){function e(e){this.domNode=e,this.domNode[r.DATA_KEY]={blot:this}}return Object.defineProperty(e.prototype,"statics",{get:function(){return this.constructor},enumerable:!0,configurable:!0}),e.create=function(e){var t;if(null==this.tagName)throw new r.ParchmentError("Blot definition missing tagName");return Array.isArray(this.tagName)?("string"==typeof e&&parseInt(e=e.toUpperCase()).toString()===e&&(e=parseInt(e)),t="number"==typeof e?document.createElement(this.tagName[e-1]):this.tagName.indexOf(e)>-1?document.createElement(e):document.createElement(this.tagName[0])):t=document.createElement(this.tagName),this.className&&t.classList.add(this.className),t},e.prototype.attach=function(){null!=this.parent&&(this.scroll=this.parent.scroll)},e.prototype.clone=function(){var e=this.domNode.cloneNode(!1);return r.create(e)},e.prototype.detach=function(){null!=this.parent&&this.parent.removeChild(this),delete this.domNode[r.DATA_KEY]},e.prototype.deleteAt=function(e,t){this.isolate(e,t).remove()},e.prototype.formatAt=function(e,t,n,i){var o=this.isolate(e,t);if(null!=r.query(n,r.Scope.BLOT)&&i)o.wrap(n,i);else if(null!=r.query(n,r.Scope.ATTRIBUTE)){var a=r.create(this.statics.scope);o.wrap(a),a.format(n,i)}},e.prototype.insertAt=function(e,t,n){var i=null==n?r.create("text",t):r.create(t,n),o=this.split(e);this.parent.insertBefore(i,o)},e.prototype.insertInto=function(e,t){void 0===t&&(t=null),null!=this.parent&&this.parent.children.remove(this);var n=null;e.children.insertBefore(this,t),null!=t&&(n=t.domNode),(this.domNode.parentNode!=e.domNode||this.domNode.nextSibling!=n)&&e.domNode.insertBefore(this.domNode,n),this.parent=e,this.attach()},e.prototype.isolate=function(e,t){var n=this.split(e);return n.split(t),n},e.prototype.length=function(){return 1},e.prototype.offset=function(e){return(void 0===e&&(e=this.parent),null==this.parent||this==e)?0:this.parent.children.offset(this)+this.parent.offset(e)},e.prototype.optimize=function(e){null!=this.domNode[r.DATA_KEY]&&delete this.domNode[r.DATA_KEY].mutations},e.prototype.remove=function(){null!=this.domNode.parentNode&&this.domNode.parentNode.removeChild(this.domNode),this.detach()},e.prototype.replace=function(e){null!=e.parent&&(e.parent.insertBefore(this,e.next),e.remove())},e.prototype.replaceWith=function(e,t){var n="string"==typeof e?r.create(e,t):e;return n.replace(this),n},e.prototype.split=function(e,t){return 0===e?this:this.next},e.prototype.update=function(e,t){},e.prototype.wrap=function(e,t){var n="string"==typeof e?r.create(e,t):e;return null!=this.parent&&this.parent.insertBefore(n,this.next),n.appendChild(this),n},e.blotName="abstract",e}();t.default=i},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=n(12),i=n(32),o=n(33),a=n(1),l=function(){function e(e){this.attributes={},this.domNode=e,this.build()}return e.prototype.attribute=function(e,t){t?e.add(this.domNode,t)&&(null!=e.value(this.domNode)?this.attributes[e.attrName]=e:delete this.attributes[e.attrName]):(e.remove(this.domNode),delete this.attributes[e.attrName])},e.prototype.build=function(){var e=this;this.attributes={};var t=r.default.keys(this.domNode),n=i.default.keys(this.domNode),l=o.default.keys(this.domNode);t.concat(n).concat(l).forEach(function(t){var n=a.query(t,a.Scope.ATTRIBUTE);n instanceof r.default&&(e.attributes[n.attrName]=n)})},e.prototype.copy=function(e){var t=this;Object.keys(this.attributes).forEach(function(n){var r=t.attributes[n].value(t.domNode);e.format(n,r)})},e.prototype.move=function(e){var t=this;this.copy(e),Object.keys(this.attributes).forEach(function(e){t.attributes[e].remove(t.domNode)}),this.attributes={}},e.prototype.values=function(){var e=this;return Object.keys(this.attributes).reduce(function(t,n){return t[n]=e.attributes[n].value(e.domNode),t},{})},e}();t.default=l},function(e,t,n){var r,i=this&&this.__extends||(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});function o(e,t){return(e.getAttribute("class")||"").split(/\s+/).filter(function(e){return 0===e.indexOf(t+"-")})}Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.keys=function(e){return(e.getAttribute("class")||"").split(/\s+/).map(function(e){return e.split("-").slice(0,-1).join("-")})},t.prototype.add=function(e,t){return!!this.canAdd(e,t)&&(this.remove(e),e.classList.add(this.keyName+"-"+t),!0)},t.prototype.remove=function(e){o(e,this.keyName).forEach(function(t){e.classList.remove(t)}),0===e.classList.length&&e.removeAttribute("class")},t.prototype.value=function(e){var t=(o(e,this.keyName)[0]||"").slice(this.keyName.length+1);return this.canAdd(e,t)?t:""},t}(n(12).default);t.default=a},function(e,t,n){var r,i=this&&this.__extends||(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});function o(e){var t=e.split("-"),n=t.slice(1).map(function(e){return e[0].toUpperCase()+e.slice(1)}).join("");return t[0]+n}Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.keys=function(e){return(e.getAttribute("style")||"").split(";").map(function(e){return e.split(":")[0].trim()})},t.prototype.add=function(e,t){return!!this.canAdd(e,t)&&(e.style[o(this.keyName)]=t,!0)},t.prototype.remove=function(e){e.style[o(this.keyName)]="",e.getAttribute("style")||e.removeAttribute("style")},t.prototype.value=function(e){var t=e.style[o(this.keyName)];return this.canAdd(e,t)?t:""},t}(n(12).default);t.default=a},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function(){function e(t,n){(function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")})(this,e),this.quill=t,this.options=n,this.modules={}}return r(e,[{key:"init",value:function(){var e=this;Object.keys(this.options.modules).forEach(function(t){null==e.modules[t]&&e.addModule(t)})}},{key:"addModule",value:function(e){var t=this.quill.constructor.import("modules/"+e);return this.modules[e]=new t(this.quill,this.options.modules[e]||{}),this.modules[e]}}]),e}();i.DEFAULTS={modules:{}},i.themes={default:i},t.default=i},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);if(null===o)return;return e(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},o=l(n(0)),a=l(n(7));function l(e){return e&&e.__esModule?e:{default:e}}var s=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.contentNode=document.createElement("span"),n.contentNode.setAttribute("contenteditable",!1),[].slice.call(n.domNode.childNodes).forEach(function(e){n.contentNode.appendChild(e)}),n.leftGuard=document.createTextNode("\uFEFF"),n.rightGuard=document.createTextNode("\uFEFF"),n.domNode.appendChild(n.leftGuard),n.domNode.appendChild(n.contentNode),n.domNode.appendChild(n.rightGuard),n}return function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"index",value:function(e,n){return e===this.leftGuard?0:e===this.rightGuard?1:i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"index",this).call(this,e,n)}},{key:"restore",value:function(e){var t=void 0,n=void 0,r=e.data.split("\uFEFF").join("");if(e===this.leftGuard){if(this.prev instanceof a.default){var i=this.prev.length();this.prev.insertAt(i,r),t={startNode:this.prev.domNode,startOffset:i+r.length}}else n=document.createTextNode(r),this.parent.insertBefore(o.default.create(n),this),t={startNode:n,startOffset:r.length}}else e===this.rightGuard&&(this.next instanceof a.default?(this.next.insertAt(0,r),t={startNode:this.next.domNode,startOffset:r.length}):(n=document.createTextNode(r),this.parent.insertBefore(o.default.create(n),this.next),t={startNode:n,startOffset:r.length}));return e.data="\uFEFF",t}},{key:"update",value:function(e,t){var n=this;e.forEach(function(e){if("characterData"===e.type&&(e.target===n.leftGuard||e.target===n.rightGuard)){var r=n.restore(e.target);r&&(t.range=r)}})}}]),t}(o.default.Embed);t.default=s},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.AlignStyle=t.AlignClass=t.AlignAttribute=void 0;var r,i=(r=n(0))&&r.__esModule?r:{default:r},o={scope:i.default.Scope.BLOCK,whitelist:["right","center","justify"]},a=new i.default.Attributor.Attribute("align","align",o),l=new i.default.Attributor.Class("align","ql-align",o),s=new i.default.Attributor.Style("align","text-align",o);t.AlignAttribute=a,t.AlignClass=l,t.AlignStyle=s},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.BackgroundStyle=t.BackgroundClass=void 0;var r,i=(r=n(0))&&r.__esModule?r:{default:r},o=n(26),a=new i.default.Attributor.Class("background","ql-bg",{scope:i.default.Scope.INLINE}),l=new o.ColorAttributor("background","background-color",{scope:i.default.Scope.INLINE});t.BackgroundClass=a,t.BackgroundStyle=l},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.DirectionStyle=t.DirectionClass=t.DirectionAttribute=void 0;var r,i=(r=n(0))&&r.__esModule?r:{default:r},o={scope:i.default.Scope.BLOCK,whitelist:["rtl"]},a=new i.default.Attributor.Attribute("direction","dir",o),l=new i.default.Attributor.Class("direction","ql-direction",o),s=new i.default.Attributor.Style("direction","direction",o);t.DirectionAttribute=a,t.DirectionClass=l,t.DirectionStyle=s},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.FontClass=t.FontStyle=void 0;var r,i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);if(null===o)return;return e(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},a=(r=n(0))&&r.__esModule?r:{default:r},l={scope:a.default.Scope.INLINE,whitelist:["serif","monospace"]},s=new a.default.Attributor.Class("font","ql-font",l),u=new(function(e){function t(){return function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"value",value:function(e){return o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"value",this).call(this,e).replace(/["']/g,"")}}]),t}(a.default.Attributor.Style))("font","font-family",l);t.FontStyle=u,t.FontClass=s},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.SizeStyle=t.SizeClass=void 0;var r,i=(r=n(0))&&r.__esModule?r:{default:r},o=new i.default.Attributor.Class("size","ql-size",{scope:i.default.Scope.INLINE,whitelist:["small","large","huge"]}),a=new i.default.Attributor.Style("size","font-size",{scope:i.default.Scope.INLINE,whitelist:["10px","18px","32px"]});t.SizeClass=o,t.SizeStyle=a},function(e,t,n){e.exports={align:{"":n(76),center:n(77),right:n(78),justify:n(79)},background:n(80),blockquote:n(81),bold:n(82),clean:n(83),code:n(58),"code-block":n(58),color:n(84),direction:{"":n(85),rtl:n(86)},float:{center:n(87),full:n(88),left:n(89),right:n(90)},formula:n(91),header:{1:n(92),2:n(93)},italic:n(94),image:n(95),indent:{"+1":n(96),"-1":n(97)},link:n(98),list:{ordered:n(99),bullet:n(100),check:n(101)},script:{sub:n(102),super:n(103)},strike:n(104),underline:n(105),video:n(106)}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.getLastChangeIndex=t.default=void 0;var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=a(n(0)),o=a(n(5));function a(e){return e&&e.__esModule?e:{default:e}}var l=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r.lastRecorded=0,r.ignoreChange=!1,r.clear(),r.quill.on(o.default.events.EDITOR_CHANGE,function(e,t,n,i){e!==o.default.events.TEXT_CHANGE||r.ignoreChange||(r.options.userOnly&&i!==o.default.sources.USER?r.transform(t):r.record(t,n))}),r.quill.keyboard.addBinding({key:"Z",shortKey:!0},r.undo.bind(r)),r.quill.keyboard.addBinding({key:"Z",shortKey:!0,shiftKey:!0},r.redo.bind(r)),/Win/i.test(navigator.platform)&&r.quill.keyboard.addBinding({key:"Y",shortKey:!0},r.redo.bind(r)),r}return function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"change",value:function(e,t){if(0!==this.stack[e].length){var n=this.stack[e].pop();this.stack[t].push(n),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(n[e],o.default.sources.USER),this.ignoreChange=!1;var r=s(n[e]);this.quill.setSelection(r)}}},{key:"clear",value:function(){this.stack={undo:[],redo:[]}}},{key:"cutoff",value:function(){this.lastRecorded=0}},{key:"record",value:function(e,t){if(0!==e.ops.length){this.stack.redo=[];var n=this.quill.getContents().diff(t),r=Date.now();if(this.lastRecorded+this.options.delay>r&&this.stack.undo.length>0){var i=this.stack.undo.pop();n=n.compose(i.undo),e=i.redo.compose(e)}else this.lastRecorded=r;this.stack.undo.push({redo:e,undo:n}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift()}}},{key:"redo",value:function(){this.change("redo","undo")}},{key:"transform",value:function(e){this.stack.undo.forEach(function(t){t.undo=e.transform(t.undo,!0),t.redo=e.transform(t.redo,!0)}),this.stack.redo.forEach(function(t){t.undo=e.transform(t.undo,!0),t.redo=e.transform(t.redo,!0)})}},{key:"undo",value:function(){this.change("undo","redo")}}]),t}(a(n(9)).default);function s(e){var t,n=e.reduce(function(e,t){return e+(t.delete||0)},0),r=e.length()-n;return null!=(t=e.ops[e.ops.length-1])&&(null!=t.insert?"string"==typeof t.insert&&t.insert.endsWith("\n"):null!=t.attributes&&Object.keys(t.attributes).some(function(e){return null!=i.default.query(e,i.default.Scope.BLOCK)}))&&(r-=1),r}l.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1},t.default=l,t.getLastChangeIndex=s},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.BaseTooltip=void 0;var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);if(null===o)return;return e(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},o=p(n(3)),a=p(n(2)),l=p(n(8)),s=p(n(23)),u=p(n(34)),c=p(n(59)),d=p(n(60)),h=p(n(28)),f=p(n(61));function p(e){return e&&e.__esModule?e:{default:e}}function g(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function m(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}function v(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var y=[!1,"center","right","justify"],b=["#000000","#e60000","#ff9900","#ffff00","#008a00","#0066cc","#9933ff","#ffffff","#facccc","#ffebcc","#ffffcc","#cce8cc","#cce0f5","#ebd6ff","#bbbbbb","#f06666","#ffc266","#ffff66","#66b966","#66a3e0","#c285ff","#888888","#a10000","#b26b00","#b2b200","#006100","#0047b2","#6b24b2","#444444","#5c0000","#663d00","#666600","#003700","#002966","#3d1466"],w=[!1,"serif","monospace"],x=["1","2","3",!1],_=["small",!1,"large","huge"],E=function(e){function t(e,n){g(this,t);var r=m(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return e.emitter.listenDOM("click",document.body,function t(n){if(!document.body.contains(e.root))return document.body.removeEventListener("click",t);null==r.tooltip||r.tooltip.root.contains(n.target)||document.activeElement===r.tooltip.textbox||r.quill.hasFocus()||r.tooltip.hide(),null!=r.pickers&&r.pickers.forEach(function(e){e.container.contains(n.target)||e.close()})}),r}return v(t,e),r(t,[{key:"addModule",value:function(e){var n=i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"addModule",this).call(this,e);return"toolbar"===e&&this.extendToolbar(n),n}},{key:"buildButtons",value:function(e,t){e.forEach(function(e){(e.getAttribute("class")||"").split(/\s+/).forEach(function(n){if(n.startsWith("ql-")&&null!=t[n=n.slice(3)]){if("direction"===n)e.innerHTML=t[n][""]+t[n].rtl;else if("string"==typeof t[n])e.innerHTML=t[n];else{var r=e.value||"";null!=r&&t[n][r]&&(e.innerHTML=t[n][r])}}})})}},{key:"buildPickers",value:function(e,t){var n=this;this.pickers=e.map(function(e){if(e.classList.contains("ql-align"))return null==e.querySelector("option")&&C(e,y),new d.default(e,t.align);if(!(e.classList.contains("ql-background")||e.classList.contains("ql-color")))return null==e.querySelector("option")&&(e.classList.contains("ql-font")?C(e,w):e.classList.contains("ql-header")?C(e,x):e.classList.contains("ql-size")&&C(e,_)),new h.default(e);var n=e.classList.contains("ql-background")?"background":"color";return null==e.querySelector("option")&&C(e,b,"background"===n?"#ffffff":"#000000"),new c.default(e,t[n])}),this.quill.on(l.default.events.EDITOR_CHANGE,function(){n.pickers.forEach(function(e){e.update()})})}}]),t}(u.default);E.DEFAULTS=(0,o.default)(!0,{},u.default.DEFAULTS,{modules:{toolbar:{handlers:{formula:function(){this.quill.theme.tooltip.edit("formula")},image:function(){var e=this,t=this.container.querySelector("input.ql-image[type=file]");null==t&&((t=document.createElement("input")).setAttribute("type","file"),t.setAttribute("accept","image/png, image/gif, image/jpeg, image/bmp, image/x-icon"),t.classList.add("ql-image"),t.addEventListener("change",function(){if(null!=t.files&&null!=t.files[0]){var n=new FileReader;n.onload=function(n){var r=e.quill.getSelection(!0);e.quill.updateContents(new a.default().retain(r.index).delete(r.length).insert({image:n.target.result}),l.default.sources.USER),e.quill.setSelection(r.index+1,l.default.sources.SILENT),t.value=""},n.readAsDataURL(t.files[0])}}),this.container.appendChild(t)),t.click()},video:function(){this.quill.theme.tooltip.edit("video")}}}}});var S=function(e){function t(e,n){g(this,t);var r=m(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r.textbox=r.root.querySelector('input[type="text"]'),r.listen(),r}return v(t,e),r(t,[{key:"listen",value:function(){var e=this;this.textbox.addEventListener("keydown",function(t){s.default.match(t,"enter")?(e.save(),t.preventDefault()):s.default.match(t,"escape")&&(e.cancel(),t.preventDefault())})}},{key:"cancel",value:function(){this.hide()}},{key:"edit",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"link",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),null!=t?this.textbox.value=t:e!==this.root.getAttribute("data-mode")&&(this.textbox.value=""),this.position(this.quill.getBounds(this.quill.selection.savedRange)),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute("data-"+e)||""),this.root.setAttribute("data-mode",e)}},{key:"restoreFocus",value:function(){var e=this.quill.scrollingContainer.scrollTop;this.quill.focus(),this.quill.scrollingContainer.scrollTop=e}},{key:"save",value:function(){var e,t,n=this.textbox.value;switch(this.root.getAttribute("data-mode")){case"link":var r=this.quill.root.scrollTop;this.linkRange?(this.quill.formatText(this.linkRange,"link",n,l.default.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",n,l.default.sources.USER)),this.quill.root.scrollTop=r;break;case"video":n=(t=(e=n).match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||e.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/))?(t[1]||"https")+"://www.youtube.com/embed/"+t[2]+"?showinfo=0":(t=e.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?(t[1]||"https")+"://player.vimeo.com/video/"+t[2]+"/":e;case"formula":if(!n)break;var i=this.quill.getSelection(!0);if(null!=i){var o=i.index+i.length;this.quill.insertEmbed(o,this.root.getAttribute("data-mode"),n,l.default.sources.USER),"formula"===this.root.getAttribute("data-mode")&&this.quill.insertText(o+1," ",l.default.sources.USER),this.quill.setSelection(o+2,l.default.sources.USER)}}this.textbox.value="",this.hide()}}]),t}(f.default);function C(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];t.forEach(function(t){var r=document.createElement("option");t===n?r.setAttribute("selected","selected"):r.setAttribute("value",t),e.appendChild(r)})}t.BaseTooltip=S,t.default=E},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(){this.head=this.tail=null,this.length=0}return e.prototype.append=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.insertBefore(e[0],null),e.length>1&&this.append.apply(this,e.slice(1))},e.prototype.contains=function(e){for(var t,n=this.iterator();t=n();)if(t===e)return!0;return!1},e.prototype.insertBefore=function(e,t){e&&(e.next=t,null!=t?(e.prev=t.prev,null!=t.prev&&(t.prev.next=e),t.prev=e,t===this.head&&(this.head=e)):null!=this.tail?(this.tail.next=e,e.prev=this.tail,this.tail=e):(e.prev=null,this.head=this.tail=e),this.length+=1)},e.prototype.offset=function(e){for(var t=0,n=this.head;null!=n;){if(n===e)return t;t+=n.length(),n=n.next}return -1},e.prototype.remove=function(e){this.contains(e)&&(null!=e.prev&&(e.prev.next=e.next),null!=e.next&&(e.next.prev=e.prev),e===this.head&&(this.head=e.next),e===this.tail&&(this.tail=e.prev),this.length-=1)},e.prototype.iterator=function(e){return void 0===e&&(e=this.head),function(){var t=e;return null!=e&&(e=e.next),t}},e.prototype.find=function(e,t){void 0===t&&(t=!1);for(var n,r=this.iterator();n=r();){var i=n.length();if(e<i||t&&e===i&&(null==n.next||0!==n.next.length()))return[n,e];e-=i}return[null,0]},e.prototype.forEach=function(e){for(var t,n=this.iterator();t=n();)e(t)},e.prototype.forEachAt=function(e,t,n){if(!(t<=0))for(var r,i=this.find(e),o=i[0],a=e-i[1],l=this.iterator(o);(r=l())&&a<e+t;){var s=r.length();e>a?n(r,e-a,Math.min(t,a+s-e)):n(r,0,Math.min(s,e+t-a)),a+=s}},e.prototype.map=function(e){return this.reduce(function(t,n){return t.push(e(n)),t},[])},e.prototype.reduce=function(e,t){for(var n,r=this.iterator();n=r();)t=e(t,n);return t},e}();t.default=r},function(e,t,n){var r,i=this&&this.__extends||(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(17),a=n(1),l={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},s=function(e){function t(t){var n=e.call(this,t)||this;return n.scroll=n,n.observer=new MutationObserver(function(e){n.update(e)}),n.observer.observe(n.domNode,l),n.attach(),n}return i(t,e),t.prototype.detach=function(){e.prototype.detach.call(this),this.observer.disconnect()},t.prototype.deleteAt=function(t,n){this.update(),0===t&&n===this.length()?this.children.forEach(function(e){e.remove()}):e.prototype.deleteAt.call(this,t,n)},t.prototype.formatAt=function(t,n,r,i){this.update(),e.prototype.formatAt.call(this,t,n,r,i)},t.prototype.insertAt=function(t,n,r){this.update(),e.prototype.insertAt.call(this,t,n,r)},t.prototype.optimize=function(t,n){var r=this;void 0===t&&(t=[]),void 0===n&&(n={}),e.prototype.optimize.call(this,n);for(var i=[].slice.call(this.observer.takeRecords());i.length>0;)t.push(i.pop());for(var l=function(e,t){void 0===t&&(t=!0),null!=e&&e!==r&&null!=e.domNode.parentNode&&(null==e.domNode[a.DATA_KEY].mutations&&(e.domNode[a.DATA_KEY].mutations=[]),t&&l(e.parent))},s=function(e){null!=e.domNode[a.DATA_KEY]&&null!=e.domNode[a.DATA_KEY].mutations&&(e instanceof o.default&&e.children.forEach(s),e.optimize(n))},u=t,c=0;u.length>0;c+=1){if(c>=100)throw Error("[Parchment] Maximum optimize iterations reached");for(u.forEach(function(e){var t=a.find(e.target,!0);null!=t&&(t.domNode===e.target&&("childList"===e.type?(l(a.find(e.previousSibling,!1)),[].forEach.call(e.addedNodes,function(e){var t=a.find(e,!1);l(t,!1),t instanceof o.default&&t.children.forEach(function(e){l(e,!1)})})):"attributes"===e.type&&l(t.prev)),l(t))}),this.children.forEach(s),i=(u=[].slice.call(this.observer.takeRecords())).slice();i.length>0;)t.push(i.pop())}},t.prototype.update=function(t,n){var r=this;void 0===n&&(n={}),(t=t||this.observer.takeRecords()).map(function(e){var t=a.find(e.target,!0);return null==t?null:null==t.domNode[a.DATA_KEY].mutations?(t.domNode[a.DATA_KEY].mutations=[e],t):(t.domNode[a.DATA_KEY].mutations.push(e),null)}).forEach(function(e){null!=e&&e!==r&&null!=e.domNode[a.DATA_KEY]&&e.update(e.domNode[a.DATA_KEY].mutations||[],n)}),null!=this.domNode[a.DATA_KEY].mutations&&e.prototype.update.call(this,this.domNode[a.DATA_KEY].mutations,n),this.optimize(t,n)},t.blotName="scroll",t.defaultChild="block",t.scope=a.Scope.BLOCK_BLOT,t.tagName="DIV",t}(o.default);t.default=s},function(e,t,n){var r,i=this&&this.__extends||(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(18),a=n(1),l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.formats=function(n){if(n.tagName!==t.tagName)return e.formats.call(this,n)},t.prototype.format=function(n,r){var i=this;n!==this.statics.blotName||r?e.prototype.format.call(this,n,r):(this.children.forEach(function(e){e instanceof o.default||(e=e.wrap(t.blotName,!0)),i.attributes.copy(e)}),this.unwrap())},t.prototype.formatAt=function(t,n,r,i){null!=this.formats()[r]||a.query(r,a.Scope.ATTRIBUTE)?this.isolate(t,n).format(r,i):e.prototype.formatAt.call(this,t,n,r,i)},t.prototype.optimize=function(n){e.prototype.optimize.call(this,n);var r=this.formats();if(0===Object.keys(r).length)return this.unwrap();var i=this.next;i instanceof t&&i.prev===this&&function(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(e[n]!==t[n])return!1;return!0}(r,i.formats())&&(i.moveChildren(this),i.remove())},t.blotName="inline",t.scope=a.Scope.INLINE_BLOT,t.tagName="SPAN",t}(o.default);t.default=l},function(e,t,n){var r,i=this&&this.__extends||(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(18),a=n(1),l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.formats=function(n){var r=a.query(t.blotName).tagName;if(n.tagName!==r)return e.formats.call(this,n)},t.prototype.format=function(n,r){null!=a.query(n,a.Scope.BLOCK)&&(n!==this.statics.blotName||r?e.prototype.format.call(this,n,r):this.replaceWith(t.blotName))},t.prototype.formatAt=function(t,n,r,i){null!=a.query(r,a.Scope.BLOCK)?this.format(r,i):e.prototype.formatAt.call(this,t,n,r,i)},t.prototype.insertAt=function(t,n,r){if(null==r||null!=a.query(n,a.Scope.INLINE))e.prototype.insertAt.call(this,t,n,r);else{var i=this.split(t),o=a.create(n,r);i.parent.insertBefore(o,i)}},t.prototype.update=function(t,n){navigator.userAgent.match(/Trident/)?this.build():e.prototype.update.call(this,t,n)},t.blotName="block",t.scope=a.Scope.BLOCK_BLOT,t.tagName="P",t}(o.default);t.default=l},function(e,t,n){var r,i=this&&this.__extends||(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.formats=function(e){},t.prototype.format=function(t,n){e.prototype.formatAt.call(this,0,this.length(),t,n)},t.prototype.formatAt=function(t,n,r,i){0===t&&n===this.length()?this.format(r,i):e.prototype.formatAt.call(this,t,n,r,i)},t.prototype.formats=function(){return this.statics.formats(this.domNode)},t}(n(19).default);t.default=o},function(e,t,n){var r,i=this&&this.__extends||(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(19),a=n(1),l=function(e){function t(t){var n=e.call(this,t)||this;return n.text=n.statics.value(n.domNode),n}return i(t,e),t.create=function(e){return document.createTextNode(e)},t.value=function(e){var t=e.data;return t.normalize&&(t=t.normalize()),t},t.prototype.deleteAt=function(e,t){this.domNode.data=this.text=this.text.slice(0,e)+this.text.slice(e+t)},t.prototype.index=function(e,t){return this.domNode===e?t:-1},t.prototype.insertAt=function(t,n,r){null==r?(this.text=this.text.slice(0,t)+n+this.text.slice(t),this.domNode.data=this.text):e.prototype.insertAt.call(this,t,n,r)},t.prototype.length=function(){return this.text.length},t.prototype.optimize=function(n){e.prototype.optimize.call(this,n),this.text=this.statics.value(this.domNode),0===this.text.length?this.remove():this.next instanceof t&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())},t.prototype.position=function(e,t){return void 0===t&&(t=!1),[this.domNode,e]},t.prototype.split=function(e,t){if(void 0===t&&(t=!1),!t){if(0===e)return this;if(e===this.length())return this.next}var n=a.create(this.domNode.splitText(e));return this.parent.insertBefore(n,this.next),this.text=this.statics.value(this.domNode),n},t.prototype.update=function(e,t){var n=this;e.some(function(e){return"characterData"===e.type&&e.target===n.domNode})&&(this.text=this.statics.value(this.domNode))},t.prototype.value=function(){return this.text},t.blotName="text",t.scope=a.Scope.INLINE_BLOT,t}(o.default);t.default=l},function(e,t,n){var r=document.createElement("div");if(r.classList.toggle("test-class",!1),r.classList.contains("test-class")){var i=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(e,t){return arguments.length>1&&!this.contains(e)==!t?t:i.call(this,e)}}String.prototype.startsWith||(String.prototype.startsWith=function(e,t){return t=t||0,this.substr(t,e.length)===e}),String.prototype.endsWith||(String.prototype.endsWith=function(e,t){var n=this.toString();("number"!=typeof t||!isFinite(t)||Math.floor(t)!==t||t>n.length)&&(t=n.length),t-=e.length;var r=n.indexOf(e,t);return -1!==r&&r===t}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(e){if(this===null)throw TypeError("Array.prototype.find called on null or undefined");if("function"!=typeof e)throw TypeError("predicate must be a function");for(var t,n=Object(this),r=n.length>>>0,i=arguments[1],o=0;o<r;o++)if(t=n[o],e.call(i,t,o,n))return t}}),document.addEventListener("DOMContentLoaded",function(){document.execCommand("enableObjectResizing",!1,!1),document.execCommand("autoUrlDetect",!1,!1)})},function(e,t){function n(e,t,l){if(e==t)return e?[[0,e]]:[];(l<0||e.length<l)&&(l=null);var s=i(e,t),u=e.substring(0,s);s=o(e=e.substring(s),t=t.substring(s));var c=e.substring(e.length-s),d=function(e,t){if(!e)return[[1,t]];if(!t)return[[-1,e]];var a,l=e.length>t.length?e:t,s=e.length>t.length?t:e,u=l.indexOf(s);if(-1!=u)return a=[[1,l.substring(0,u)],[0,s],[1,l.substring(u+s.length)]],e.length>t.length&&(a[0][0]=a[2][0]=-1),a;if(1==s.length)return[[-1,e],[1,t]];var c=function(e,t){var n,r,a,l,s,u=e.length>t.length?e:t,c=e.length>t.length?t:e;if(u.length<4||2*c.length<u.length)return null;function d(e,t,n){for(var r,a,l,s,u=e.substring(n,n+Math.floor(e.length/4)),c=-1,d="";-1!=(c=t.indexOf(u,c+1));){var h=i(e.substring(n),t.substring(c)),f=o(e.substring(0,n),t.substring(0,c));d.length<f+h&&(d=t.substring(c-f,c)+t.substring(c,c+h),r=e.substring(0,n-f),a=e.substring(n+h),l=t.substring(0,c-f),s=t.substring(c+h))}return 2*d.length>=e.length?[r,a,l,s,d]:null}var h=d(u,c,Math.ceil(u.length/4)),f=d(u,c,Math.ceil(u.length/2));return h||f?(n=f?h&&h[4].length>f[4].length?h:f:h,e.length>t.length?(r=n[0],a=n[1],l=n[2],s=n[3]):(l=n[0],s=n[1],r=n[2],a=n[3]),[r,a,l,s,n[4]]):null}(e,t);if(c){var d=c[0],h=c[1],f=c[2],p=c[3],g=c[4],m=n(d,f),v=n(h,p);return m.concat([[0,g]],v)}return function(e,t){for(var n=e.length,i=t.length,o=Math.ceil((n+i)/2),a=2*o,l=Array(a),s=Array(a),u=0;u<a;u++)l[u]=-1,s[u]=-1;l[o+1]=0,s[o+1]=0;for(var c=n-i,d=c%2!=0,h=0,f=0,p=0,g=0,m=0;m<o;m++){for(var v=-m+h;v<=m-f;v+=2){for(var y,b=o+v,w=(y=v==-m||v!=m&&l[b-1]<l[b+1]?l[b+1]:l[b-1]+1)-v;y<n&&w<i&&e.charAt(y)==t.charAt(w);)y++,w++;if(l[b]=y,y>n)f+=2;else if(w>i)h+=2;else if(d){var x=o+c-v;if(x>=0&&x<a&&-1!=s[x]){var _=n-s[x];if(y>=_)return r(e,t,y,w)}}}for(var E=-m+p;E<=m-g;E+=2){for(var _,x=o+E,S=(_=E==-m||E!=m&&s[x-1]<s[x+1]?s[x+1]:s[x-1]+1)-E;_<n&&S<i&&e.charAt(n-_-1)==t.charAt(i-S-1);)_++,S++;if(s[x]=_,_>n)g+=2;else if(S>i)p+=2;else if(!d){var b=o+c-E;if(b>=0&&b<a&&-1!=l[b]){var y=l[b],w=o+y-b;if(y>=(_=n-_))return r(e,t,y,w)}}}}return[[-1,e],[1,t]]}(e,t)}(e=e.substring(0,e.length-s),t=t.substring(0,t.length-s));return u&&d.unshift([0,u]),c&&d.push([0,c]),function e(t){t.push([0,""]);for(var n,r=0,a=0,l=0,s="",u="";r<t.length;)switch(t[r][0]){case 1:l++,u+=t[r][1],r++;break;case -1:a++,s+=t[r][1],r++;break;case 0:a+l>1?(0!==a&&0!==l&&(0!==(n=i(u,s))&&(r-a-l>0&&0==t[r-a-l-1][0]?t[r-a-l-1][1]+=u.substring(0,n):(t.splice(0,0,[0,u.substring(0,n)]),r++),u=u.substring(n),s=s.substring(n)),0!==(n=o(u,s))&&(t[r][1]=u.substring(u.length-n)+t[r][1],u=u.substring(0,u.length-n),s=s.substring(0,s.length-n))),0===a?t.splice(r-l,a+l,[1,u]):0===l?t.splice(r-a,a+l,[-1,s]):t.splice(r-a-l,a+l,[-1,s],[1,u]),r=r-a-l+(a?1:0)+(l?1:0)+1):0!==r&&0==t[r-1][0]?(t[r-1][1]+=t[r][1],t.splice(r,1)):r++,l=0,a=0,s="",u=""}""===t[t.length-1][1]&&t.pop();var c=!1;for(r=1;r<t.length-1;)0==t[r-1][0]&&0==t[r+1][0]&&(t[r][1].substring(t[r][1].length-t[r-1][1].length)==t[r-1][1]?(t[r][1]=t[r-1][1]+t[r][1].substring(0,t[r][1].length-t[r-1][1].length),t[r+1][1]=t[r-1][1]+t[r+1][1],t.splice(r-1,1),c=!0):t[r][1].substring(0,t[r+1][1].length)==t[r+1][1]&&(t[r-1][1]+=t[r+1][1],t[r][1]=t[r][1].substring(t[r+1][1].length)+t[r+1][1],t.splice(r+1,1),c=!0)),r++;c&&e(t)}(d),null!=l&&(d=function(e,t){var n=function(e,t){if(0===t)return[0,e];for(var n=0,r=0;r<e.length;r++){var i=e[r];if(-1===i[0]||0===i[0]){var o=n+i[1].length;if(t===o)return[r+1,e];if(t<o){e=e.slice();var a=t-n,l=[i[0],i[1].slice(0,a)],s=[i[0],i[1].slice(a)];return e.splice(r,1,l,s),[r+1,e]}n=o}}throw Error("cursor_pos is out of bounds!")}(e,t),r=n[1],i=n[0],o=r[i],l=r[i+1];if(null==o||0!==o[0])return e;if(null!=l&&o[1]+l[1]===l[1]+o[1])return r.splice(i,2,l,o),a(r,i,2);if(null==l||0!==l[1].indexOf(o[1]))return e;r.splice(i,2,[l[0],o[1]],[0,o[1]]);var s=l[1].slice(o[1].length);return s.length>0&&r.splice(i+2,0,[l[0],s]),a(r,i,3)}(d,l)),d=function(e){for(var t,n=!1,r=function(e){return e.charCodeAt(0)>=56320&&57343>=e.charCodeAt(0)},i=2;i<e.length;i+=1)0===e[i-2][0]&&(t=e[i-2][1]).charCodeAt(t.length-1)>=55296&&56319>=t.charCodeAt(t.length-1)&&-1===e[i-1][0]&&r(e[i-1][1])&&1===e[i][0]&&r(e[i][1])&&(n=!0,e[i-1][1]=e[i-2][1].slice(-1)+e[i-1][1],e[i][1]=e[i-2][1].slice(-1)+e[i][1],e[i-2][1]=e[i-2][1].slice(0,-1));if(!n)return e;for(var o=[],i=0;i<e.length;i+=1)e[i][1].length>0&&o.push(e[i]);return o}(d)}function r(e,t,r,i){var o=e.substring(0,r),a=t.substring(0,i),l=e.substring(r),s=t.substring(i),u=n(o,a),c=n(l,s);return u.concat(c)}function i(e,t){if(!e||!t||e.charAt(0)!=t.charAt(0))return 0;for(var n=0,r=Math.min(e.length,t.length),i=r,o=0;n<i;)e.substring(o,i)==t.substring(o,i)?o=n=i:r=i,i=Math.floor((r-n)/2+n);return i}function o(e,t){if(!e||!t||e.charAt(e.length-1)!=t.charAt(t.length-1))return 0;for(var n=0,r=Math.min(e.length,t.length),i=r,o=0;n<i;)e.substring(e.length-i,e.length-o)==t.substring(t.length-i,t.length-o)?o=n=i:r=i,i=Math.floor((r-n)/2+n);return i}function a(e,t,n){for(var r=t+n-1;r>=0&&r>=t-1;r--)if(r+1<e.length){var i=e[r],o=e[r+1];i[0]===o[1]&&e.splice(r,2,[i[0],i[1]+o[1]])}return e}n.INSERT=1,n.DELETE=-1,n.EQUAL=0,e.exports=n},function(e,t){(e.exports="function"==typeof Object.keys?Object.keys:n).shim=n;function n(e){var t=[];for(var n in e)t.push(n);return t}},function(e,t){var n="[object Arguments]"==function(){return Object.prototype.toString.call(arguments)}();function r(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function i(e){return e&&"object"==typeof e&&"number"==typeof e.length&&Object.prototype.hasOwnProperty.call(e,"callee")&&!Object.prototype.propertyIsEnumerable.call(e,"callee")||!1}(t=e.exports=n?r:i).supported=r,t.unsupported=i},function(e,t){var n=Object.prototype.hasOwnProperty,r="~";function i(){}function o(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function a(){this._events=new i,this._eventsCount=0}Object.create&&(i.prototype=Object.create(null),new i().__proto__||(r=!1)),a.prototype.eventNames=function(){var e,t,i=[];if(0===this._eventsCount)return i;for(t in e=this._events)n.call(e,t)&&i.push(r?t.slice(1):t);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(e)):i},a.prototype.listeners=function(e,t){var n=r?r+e:e,i=this._events[n];if(t)return!!i;if(!i)return[];if(i.fn)return[i.fn];for(var o=0,a=i.length,l=Array(a);o<a;o++)l[o]=i[o].fn;return l},a.prototype.emit=function(e,t,n,i,o,a){var l=r?r+e:e;if(!this._events[l])return!1;var s,u,c=this._events[l],d=arguments.length;if(c.fn){switch(c.once&&this.removeListener(e,c.fn,void 0,!0),d){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,t),!0;case 3:return c.fn.call(c.context,t,n),!0;case 4:return c.fn.call(c.context,t,n,i),!0;case 5:return c.fn.call(c.context,t,n,i,o),!0;case 6:return c.fn.call(c.context,t,n,i,o,a),!0}for(u=1,s=Array(d-1);u<d;u++)s[u-1]=arguments[u];c.fn.apply(c.context,s)}else{var h,f=c.length;for(u=0;u<f;u++)switch(c[u].once&&this.removeListener(e,c[u].fn,void 0,!0),d){case 1:c[u].fn.call(c[u].context);break;case 2:c[u].fn.call(c[u].context,t);break;case 3:c[u].fn.call(c[u].context,t,n);break;case 4:c[u].fn.call(c[u].context,t,n,i);break;default:if(!s)for(h=1,s=Array(d-1);h<d;h++)s[h-1]=arguments[h];c[u].fn.apply(c[u].context,s)}}return!0},a.prototype.on=function(e,t,n){var i=new o(t,n||this),a=r?r+e:e;return this._events[a]?this._events[a].fn?this._events[a]=[this._events[a],i]:this._events[a].push(i):(this._events[a]=i,this._eventsCount++),this},a.prototype.once=function(e,t,n){var i=new o(t,n||this,!0),a=r?r+e:e;return this._events[a]?this._events[a].fn?this._events[a]=[this._events[a],i]:this._events[a].push(i):(this._events[a]=i,this._eventsCount++),this},a.prototype.removeListener=function(e,t,n,o){var a=r?r+e:e;if(!this._events[a])return this;if(!t)return 0==--this._eventsCount?this._events=new i:delete this._events[a],this;var l=this._events[a];if(l.fn)l.fn!==t||o&&!l.once||n&&l.context!==n||(0==--this._eventsCount?this._events=new i:delete this._events[a]);else{for(var s=0,u=[],c=l.length;s<c;s++)(l[s].fn!==t||o&&!l[s].once||n&&l[s].context!==n)&&u.push(l[s]);u.length?this._events[a]=1===u.length?u[0]:u:0==--this._eventsCount?this._events=new i:delete this._events[a]}return this},a.prototype.removeAllListeners=function(e){var t;return e?(t=r?r+e:e,this._events[t]&&(0==--this._eventsCount?this._events=new i:delete this._events[t])):(this._events=new i,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prototype.setMaxListeners=function(){return this},a.prefixed=r,a.EventEmitter=a,void 0!==e&&(e.exports=a)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.matchText=t.matchSpacing=t.matchNewline=t.matchBlot=t.matchAttributor=t.default=void 0;var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,l=e[Symbol.iterator]();!(r=(a=l.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&l.return&&l.return()}finally{if(i)throw o}}return n}(e,t);throw TypeError("Invalid attempt to destructure non-iterable instance")},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=b(n(3)),l=b(n(2)),s=b(n(0)),u=b(n(5)),c=b(n(10)),d=b(n(9)),h=n(36),f=n(37),p=b(n(13)),g=n(26),m=n(38),v=n(39),y=n(40);function b(e){return e&&e.__esModule?e:{default:e}}function w(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var x=(0,c.default)("quill:clipboard"),_="__ql-matcher",E=[[Node.TEXT_NODE,M],[Node.TEXT_NODE,I],["br",function(e,t){return T(t,"\n")||t.insert("\n"),t}],[Node.ELEMENT_NODE,I],[Node.ELEMENT_NODE,R],[Node.ELEMENT_NODE,L],[Node.ELEMENT_NODE,j],[Node.ELEMENT_NODE,function(e,t){var n={},r=e.style||{};return r.fontStyle&&"italic"===P(e).fontStyle&&(n.italic=!0),r.fontWeight&&(P(e).fontWeight.startsWith("bold")||parseInt(P(e).fontWeight)>=700)&&(n.bold=!0),Object.keys(n).length>0&&(t=k(t,n)),parseFloat(r.textIndent||0)>0&&(t=new l.default().insert(" ").concat(t)),t}],["li",function(e,t){var n=s.default.query(e);if(null==n||"list-item"!==n.blotName||!T(t,"\n"))return t;for(var r=-1,i=e.parentNode;!i.classList.contains("ql-clipboard");)"list"===(s.default.query(i)||{}).blotName&&(r+=1),i=i.parentNode;return r<=0?t:t.compose(new l.default().retain(t.length()-1).retain(1,{indent:r}))}],["b",N.bind(N,"bold")],["i",N.bind(N,"italic")],["style",function(){return new l.default}]],S=[h.AlignAttribute,m.DirectionAttribute].reduce(function(e,t){return e[t.keyName]=t,e},{}),C=[h.AlignStyle,f.BackgroundStyle,g.ColorStyle,m.DirectionStyle,v.FontStyle,y.SizeStyle].reduce(function(e,t){return e[t.keyName]=t,e},{}),O=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r.quill.root.addEventListener("paste",r.onPaste.bind(r)),r.container=r.quill.addContainer("ql-clipboard"),r.container.setAttribute("contenteditable",!0),r.container.setAttribute("tabindex",-1),r.matchers=[],E.concat(r.options.matchers).forEach(function(e){var t=i(e,2),o=t[0],a=t[1];(n.matchVisual||a!==L)&&r.addMatcher(o,a)}),r}return function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"addMatcher",value:function(e,t){this.matchers.push([e,t])}},{key:"convert",value:function(e){if("string"==typeof e)return this.container.innerHTML=e.replace(/\>\r?\n +\</g,"><"),this.convert();var t=this.quill.getFormat(this.quill.selection.savedRange.index);if(t[p.default.blotName]){var n=this.container.innerText;return this.container.innerHTML="",new l.default().insert(n,w({},p.default.blotName,t[p.default.blotName]))}var r=i(this.prepareMatching(),2),o=r[0],a=r[1],s=function e(t,n,r){return t.nodeType===t.TEXT_NODE?r.reduce(function(e,n){return n(t,e)},new l.default):t.nodeType===t.ELEMENT_NODE?[].reduce.call(t.childNodes||[],function(i,o){var a=e(o,n,r);return o.nodeType===t.ELEMENT_NODE&&(a=n.reduce(function(e,t){return t(o,e)},a),a=(o[_]||[]).reduce(function(e,t){return t(o,e)},a)),i.concat(a)},new l.default):new l.default}(this.container,o,a);return T(s,"\n")&&null==s.ops[s.ops.length-1].attributes&&(s=s.compose(new l.default().retain(s.length()-1).delete(1))),x.log("convert",this.container.innerHTML,s),this.container.innerHTML="",s}},{key:"dangerouslyPasteHTML",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:u.default.sources.API;if("string"==typeof e)this.quill.setContents(this.convert(e),t),this.quill.setSelection(0,u.default.sources.SILENT);else{var r=this.convert(t);this.quill.updateContents(new l.default().retain(e).concat(r),n),this.quill.setSelection(e+r.length(),u.default.sources.SILENT)}}},{key:"onPaste",value:function(e){var t=this;if(!e.defaultPrevented&&this.quill.isEnabled()){var n=this.quill.getSelection(),r=new l.default().retain(n.index),i=this.quill.scrollingContainer.scrollTop;this.container.focus(),this.quill.selection.update(u.default.sources.SILENT),setTimeout(function(){r=r.concat(t.convert()).delete(n.length),t.quill.updateContents(r,u.default.sources.USER),t.quill.setSelection(r.length()-n.length,u.default.sources.SILENT),t.quill.scrollingContainer.scrollTop=i,t.quill.focus()},1)}}},{key:"prepareMatching",value:function(){var e=this,t=[],n=[];return this.matchers.forEach(function(r){var o=i(r,2),a=o[0],l=o[1];switch(a){case Node.TEXT_NODE:n.push(l);break;case Node.ELEMENT_NODE:t.push(l);break;default:[].forEach.call(e.container.querySelectorAll(a),function(e){e[_]=e[_]||[],e[_].push(l)})}}),[t,n]}}]),t}(d.default);function k(e,t,n){return(void 0===t?"undefined":r(t))==="object"?Object.keys(t).reduce(function(e,n){return k(e,n,t[n])},e):e.reduce(function(e,r){return r.attributes&&r.attributes[t]?e.push(r):e.insert(r.insert,(0,a.default)({},w({},t,n),r.attributes))},new l.default)}function P(e){if(e.nodeType!==Node.ELEMENT_NODE)return{};var t="__ql-computed-style";return e[t]||(e[t]=window.getComputedStyle(e))}function T(e,t){for(var n="",r=e.ops.length-1;r>=0&&n.length<t.length;--r){var i=e.ops[r];if("string"!=typeof i.insert)break;n=i.insert+n}return n.slice(-1*t.length)===t}function A(e){return 0!==e.childNodes.length&&["block","list-item"].indexOf(P(e).display)>-1}function N(e,t,n){return k(n,e,!0)}function j(e,t){var n=s.default.Attributor.Attribute.keys(e),r=s.default.Attributor.Class.keys(e),i=s.default.Attributor.Style.keys(e),o={};return n.concat(r).concat(i).forEach(function(t){var n=s.default.query(t,s.default.Scope.ATTRIBUTE);null!=n&&(o[n.attrName]=n.value(e),o[n.attrName])||(null!=(n=S[t])&&(n.attrName===t||n.keyName===t)&&(o[n.attrName]=n.value(e)||void 0),null!=(n=C[t])&&(n.attrName===t||n.keyName===t)&&(o[(n=C[t]).attrName]=n.value(e)||void 0))}),Object.keys(o).length>0&&(t=k(t,o)),t}function R(e,t){var n=s.default.query(e);if(null==n)return t;if(n.prototype instanceof s.default.Embed){var r={},i=n.value(e);null!=i&&(r[n.blotName]=i,t=new l.default().insert(r,n.formats(e)))}else"function"==typeof n.formats&&(t=k(t,n.blotName,n.formats(e)));return t}function I(e,t){return!T(t,"\n")&&(A(e)||t.length()>0&&e.nextSibling&&A(e.nextSibling))&&t.insert("\n"),t}function L(e,t){if(A(e)&&null!=e.nextElementSibling&&!T(t,"\n\n")){var n=e.offsetHeight+parseFloat(P(e).marginTop)+parseFloat(P(e).marginBottom);e.nextElementSibling.offsetTop>e.offsetTop+1.5*n&&t.insert("\n")}return t}function M(e,t){var n=e.data;if("O:P"===e.parentNode.tagName)return t.insert(n.trim());if(0===n.trim().length&&e.parentNode.classList.contains("ql-clipboard"))return t;if(!P(e.parentNode).whiteSpace.startsWith("pre")){var r=function(e,t){return(t=t.replace(/[^\u00a0]/g,"")).length<1&&e?" ":t};n=(n=n.replace(/\r\n/g," ").replace(/\n/g," ")).replace(/\s\s+/g,r.bind(r,!0)),(null==e.previousSibling&&A(e.parentNode)||null!=e.previousSibling&&A(e.previousSibling))&&(n=n.replace(/^\s+/,r.bind(r,!1))),(null==e.nextSibling&&A(e.parentNode)||null!=e.nextSibling&&A(e.nextSibling))&&(n=n.replace(/\s+$/,r.bind(r,!1)))}return t.insert(n)}O.DEFAULTS={matchers:[],matchVisual:!0},t.default=O,t.matchAttributor=j,t.matchBlot=R,t.matchNewline=I,t.matchSpacing=L,t.matchText=M},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r,i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);if(null===o)return;return e(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},a=function(e){function t(){return function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"optimize",value:function(e){o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"optimize",this).call(this,e),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}}],[{key:"create",value:function(){return o(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this)}},{key:"formats",value:function(){return!0}}]),t}(((r=n(6))&&r.__esModule?r:{default:r}).default);a.blotName="bold",a.tagName=["STRONG","B"],t.default=a},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.addControls=t.default=void 0;var r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,l=e[Symbol.iterator]();!(r=(a=l.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&l.return&&l.return()}finally{if(i)throw o}}return n}(e,t);throw TypeError("Invalid attempt to destructure non-iterable instance")},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=c(n(2)),a=c(n(0)),l=c(n(5)),s=c(n(10)),u=c(n(9));function c(e){return e&&e.__esModule?e:{default:e}}function d(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}var h=(0,s.default)("quill:toolbar"),f=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,t);var i,o=d(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));if(Array.isArray(o.options.container)){var a=document.createElement("div");g(a,o.options.container),e.container.parentNode.insertBefore(a,e.container),o.container=a}else"string"==typeof o.options.container?o.container=document.querySelector(o.options.container):o.container=o.options.container;return o.container instanceof HTMLElement?(o.container.classList.add("ql-toolbar"),o.controls=[],o.handlers={},Object.keys(o.options.handlers).forEach(function(e){o.addHandler(e,o.options.handlers[e])}),[].forEach.call(o.container.querySelectorAll("button, select"),function(e){o.attach(e)}),o.quill.on(l.default.events.EDITOR_CHANGE,function(e,t){e===l.default.events.SELECTION_CHANGE&&o.update(t)}),o.quill.on(l.default.events.SCROLL_OPTIMIZE,function(){var e=r(o.quill.selection.getRange(),1)[0];o.update(e)}),o):(i=h.error("Container required for toolbar",o.options),d(o,i))}return function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"addHandler",value:function(e,t){this.handlers[e]=t}},{key:"attach",value:function(e){var t=this,n=[].find.call(e.classList,function(e){return 0===e.indexOf("ql-")});if(n){if(n=n.slice(3),"BUTTON"===e.tagName&&e.setAttribute("type","button"),null==this.handlers[n]){if(null!=this.quill.scroll.whitelist&&null==this.quill.scroll.whitelist[n]){h.warn("ignoring attaching to disabled format",n,e);return}if(null==a.default.query(n)){h.warn("ignoring attaching to nonexistent format",n,e);return}}var i="SELECT"===e.tagName?"change":"click";e.addEventListener(i,function(i){var s,u,c,d=void 0;if("SELECT"===e.tagName){if(e.selectedIndex<0)return;var h=e.options[e.selectedIndex];d=!h.hasAttribute("selected")&&(h.value||!1)}else d=!e.classList.contains("ql-active")&&(e.value||!e.hasAttribute("value")),i.preventDefault();t.quill.focus();var f=r(t.quill.selection.getRange(),1)[0];if(null!=t.handlers[n])t.handlers[n].call(t,d);else if(a.default.query(n).prototype instanceof a.default.Embed){if(!(d=prompt("Enter "+n)))return;t.quill.updateContents(new o.default().retain(f.index).delete(f.length).insert((s={},u=n,c=d,u in s?Object.defineProperty(s,u,{value:c,enumerable:!0,configurable:!0,writable:!0}):s[u]=c,s)),l.default.sources.USER)}else t.quill.format(n,d,l.default.sources.USER);t.update(f)}),this.controls.push([n,e])}}},{key:"update",value:function(e){var t=null==e?{}:this.quill.getFormat(e);this.controls.forEach(function(n){var i=r(n,2),o=i[0],a=i[1];if("SELECT"===a.tagName){var l=void 0;if(null==e)l=null;else if(null==t[o])l=a.querySelector("option[selected]");else if(!Array.isArray(t[o])){var s=t[o];"string"==typeof s&&(s=s.replace(/\"/g,'\\"')),l=a.querySelector('option[value="'+s+'"]')}null==l?(a.value="",a.selectedIndex=-1):l.selected=!0}else if(null==e)a.classList.remove("ql-active");else if(a.hasAttribute("value")){var u=t[o]===a.getAttribute("value")||null!=t[o]&&t[o].toString()===a.getAttribute("value")||null==t[o]&&!a.getAttribute("value");a.classList.toggle("ql-active",u)}else a.classList.toggle("ql-active",null!=t[o])})}}]),t}(u.default);function p(e,t,n){var r=document.createElement("button");r.setAttribute("type","button"),r.classList.add("ql-"+t),null!=n&&(r.value=n),e.appendChild(r)}function g(e,t){Array.isArray(t[0])||(t=[t]),t.forEach(function(t){var n=document.createElement("span");n.classList.add("ql-formats"),t.forEach(function(e){if("string"==typeof e)p(n,e);else{var t,r=Object.keys(e)[0],i=e[r];Array.isArray(i)?((t=document.createElement("select")).classList.add("ql-"+r),i.forEach(function(e){var n=document.createElement("option");!1!==e?n.setAttribute("value",e):n.setAttribute("selected","selected"),t.appendChild(n)}),n.appendChild(t)):p(n,r,i)}}),e.appendChild(n)})}f.DEFAULTS={},f.DEFAULTS={container:null,handlers:{clean:function(){var e=this,t=this.quill.getSelection();null!=t&&(0==t.length?Object.keys(this.quill.getFormat()).forEach(function(t){null!=a.default.query(t,a.default.Scope.INLINE)&&e.quill.format(t,!1)}):this.quill.removeFormat(t,l.default.sources.USER))},direction:function(e){var t=this.quill.getFormat().align;"rtl"===e&&null==t?this.quill.format("align","right",l.default.sources.USER):e||"right"!==t||this.quill.format("align",!1,l.default.sources.USER),this.quill.format("direction",e,l.default.sources.USER)},indent:function(e){var t=this.quill.getSelection(),n=this.quill.getFormat(t),r=parseInt(n.indent||0);if("+1"===e||"-1"===e){var i="+1"===e?1:-1;"rtl"===n.direction&&(i*=-1),this.quill.format("indent",r+i,l.default.sources.USER)}},link:function(e){!0===e&&(e=prompt("Enter link URL:")),this.quill.format("link",e,l.default.sources.USER)},list:function(e){var t=this.quill.getSelection(),n=this.quill.getFormat(t);"check"===e?"checked"===n.list||"unchecked"===n.list?this.quill.format("list",!1,l.default.sources.USER):this.quill.format("list","unchecked",l.default.sources.USER):this.quill.format("list",e,l.default.sources.USER)}}},t.default=f,t.addControls=g},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <polyline class="ql-even ql-stroke" points="5 7 3 9 5 11"></polyline> <polyline class="ql-even ql-stroke" points="13 7 15 9 13 11"></polyline> <line class=ql-stroke x1=10 x2=8 y1=5 y2=13></line> </svg>'},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r,i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);if(null===o)return;return e(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},a=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r.label.innerHTML=n,r.container.classList.add("ql-color-picker"),[].slice.call(r.container.querySelectorAll(".ql-picker-item"),0,7).forEach(function(e){e.classList.add("ql-primary")}),r}return function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"buildItem",value:function(e){var n=o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"buildItem",this).call(this,e);return n.style.backgroundColor=e.getAttribute("value")||"",n}},{key:"selectItem",value:function(e,n){o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"selectItem",this).call(this,e,n);var r=this.label.querySelector(".ql-color-label"),i=e&&e.getAttribute("data-value")||"";r&&("line"===r.tagName?r.style.stroke=i:r.style.fill=i)}}]),t}(((r=n(28))&&r.__esModule?r:{default:r}).default);t.default=a},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r,i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);if(null===o)return;return e(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},a=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r.container.classList.add("ql-icon-picker"),[].forEach.call(r.container.querySelectorAll(".ql-picker-item"),function(e){e.innerHTML=n[e.getAttribute("data-value")||""]}),r.defaultItem=r.container.querySelector(".ql-selected"),r.selectItem(r.defaultItem),r}return function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"selectItem",value:function(e,n){o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"selectItem",this).call(this,e,n),e=e||this.defaultItem,this.label.innerHTML=e.innerHTML}}]),t}(((r=n(28))&&r.__esModule?r:{default:r}).default);t.default=a},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function(){function e(t,n){var r=this;(function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")})(this,e),this.quill=t,this.boundsContainer=n||document.body,this.root=t.addContainer("ql-tooltip"),this.root.innerHTML=this.constructor.TEMPLATE,this.quill.root===this.quill.scrollingContainer&&this.quill.root.addEventListener("scroll",function(){r.root.style.marginTop=-1*r.quill.root.scrollTop+"px"}),this.hide()}return r(e,[{key:"hide",value:function(){this.root.classList.add("ql-hidden")}},{key:"position",value:function(e){var t=e.left+e.width/2-this.root.offsetWidth/2,n=e.bottom+this.quill.root.scrollTop;this.root.style.left=t+"px",this.root.style.top=n+"px",this.root.classList.remove("ql-flip");var r=this.boundsContainer.getBoundingClientRect(),i=this.root.getBoundingClientRect(),o=0;if(i.right>r.right&&(o=r.right-i.right,this.root.style.left=t+o+"px"),i.left<r.left&&(o=r.left-i.left,this.root.style.left=t+o+"px"),i.bottom>r.bottom){var a=i.bottom-i.top,l=e.bottom-e.top+a;this.root.style.top=n-l+"px",this.root.classList.add("ql-flip")}return o}},{key:"show",value:function(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}]),e}();t.default=i},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,l=e[Symbol.iterator]();!(r=(a=l.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&l.return&&l.return()}finally{if(i)throw o}}return n}(e,t);throw TypeError("Invalid attempt to destructure non-iterable instance")},i=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);if(null===o)return;return e(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=f(n(3)),l=f(n(8)),s=n(43),u=f(s),c=f(n(27)),d=n(15),h=f(n(41));function f(e){return e&&e.__esModule?e:{default:e}}function p(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function g(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}function m(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var v=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]],y=function(e){function t(e,n){p(this,t),null!=n.modules.toolbar&&null==n.modules.toolbar.container&&(n.modules.toolbar.container=v);var r=g(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r.quill.container.classList.add("ql-snow"),r}return m(t,e),o(t,[{key:"extendToolbar",value:function(e){e.container.classList.add("ql-snow"),this.buildButtons([].slice.call(e.container.querySelectorAll("button")),h.default),this.buildPickers([].slice.call(e.container.querySelectorAll("select")),h.default),this.tooltip=new b(this.quill,this.options.bounds),e.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"K",shortKey:!0},function(t,n){e.handlers.link.call(e,!n.format.link)})}}]),t}(u.default);y.DEFAULTS=(0,a.default)(!0,{},u.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(e){if(e){var t=this.quill.getSelection();if(null!=t&&0!=t.length){var n=this.quill.getText(t);/^\S+@\S+\.\S+$/.test(n)&&0!==n.indexOf("mailto:")&&(n="mailto:"+n),this.quill.theme.tooltip.edit("link",n)}}else this.quill.format("link",!1)}}}}});var b=function(e){function t(e,n){p(this,t);var r=g(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r.preview=r.root.querySelector("a.ql-preview"),r}return m(t,e),o(t,[{key:"listen",value:function(){var e=this;i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"listen",this).call(this),this.root.querySelector("a.ql-action").addEventListener("click",function(t){e.root.classList.contains("ql-editing")?e.save():e.edit("link",e.preview.textContent),t.preventDefault()}),this.root.querySelector("a.ql-remove").addEventListener("click",function(t){if(null!=e.linkRange){var n=e.linkRange;e.restoreFocus(),e.quill.formatText(n,"link",!1,l.default.sources.USER),delete e.linkRange}t.preventDefault(),e.hide()}),this.quill.on(l.default.events.SELECTION_CHANGE,function(t,n,i){if(null!=t){if(0===t.length&&i===l.default.sources.USER){var o=r(e.quill.scroll.descendant(c.default,t.index),2),a=o[0],s=o[1];if(null!=a){e.linkRange=new d.Range(t.index-s,a.length());var u=c.default.formats(a.domNode);e.preview.textContent=u,e.preview.setAttribute("href",u),e.show(),e.position(e.quill.getBounds(e.linkRange));return}}else delete e.linkRange;e.hide()}})}},{key:"show",value:function(){i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"show",this).call(this),this.root.removeAttribute("data-mode")}}]),t}(s.BaseTooltip);b.TEMPLATE='<a class="ql-preview" rel="noopener noreferrer" target="_blank" href="about:blank"></a><input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL"><a class="ql-action"></a><a class="ql-remove"></a>',t.default=y},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=L(n(29)),i=n(36),o=n(38),a=n(64),l=L(n(65)),s=L(n(66)),u=n(67),c=L(u),d=n(37),h=n(26),f=n(39),p=n(40),g=L(n(56)),m=L(n(68)),v=L(n(27)),y=L(n(69)),b=L(n(70)),w=L(n(71)),x=L(n(72)),_=L(n(73)),E=n(13),S=L(E),C=L(n(74)),O=L(n(75)),k=L(n(57)),P=L(n(41)),T=L(n(28)),A=L(n(59)),N=L(n(60)),j=L(n(61)),R=L(n(108)),I=L(n(62));function L(e){return e&&e.__esModule?e:{default:e}}r.default.register({"attributors/attribute/direction":o.DirectionAttribute,"attributors/class/align":i.AlignClass,"attributors/class/background":d.BackgroundClass,"attributors/class/color":h.ColorClass,"attributors/class/direction":o.DirectionClass,"attributors/class/font":f.FontClass,"attributors/class/size":p.SizeClass,"attributors/style/align":i.AlignStyle,"attributors/style/background":d.BackgroundStyle,"attributors/style/color":h.ColorStyle,"attributors/style/direction":o.DirectionStyle,"attributors/style/font":f.FontStyle,"attributors/style/size":p.SizeStyle},!0),r.default.register({"formats/align":i.AlignClass,"formats/direction":o.DirectionClass,"formats/indent":a.IndentClass,"formats/background":d.BackgroundStyle,"formats/color":h.ColorStyle,"formats/font":f.FontClass,"formats/size":p.SizeClass,"formats/blockquote":l.default,"formats/code-block":S.default,"formats/header":s.default,"formats/list":c.default,"formats/bold":g.default,"formats/code":E.Code,"formats/italic":m.default,"formats/link":v.default,"formats/script":y.default,"formats/strike":b.default,"formats/underline":w.default,"formats/image":x.default,"formats/video":_.default,"formats/list/item":u.ListItem,"modules/formula":C.default,"modules/syntax":O.default,"modules/toolbar":k.default,"themes/bubble":R.default,"themes/snow":I.default,"ui/icons":P.default,"ui/picker":T.default,"ui/icon-picker":N.default,"ui/color-picker":A.default,"ui/tooltip":j.default},!0),t.default=r.default},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.IndentClass=void 0;var r,i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);if(null===o)return;return e(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},a=(r=n(0))&&r.__esModule?r:{default:r},l=new(function(e){function t(){return function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"add",value:function(e,n){if("+1"===n||"-1"===n){var r=this.value(e)||0;n="+1"===n?r+1:r-1}return 0===n?(this.remove(e),!0):o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"add",this).call(this,e,n)}},{key:"canAdd",value:function(e,n){return o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"canAdd",this).call(this,e,n)||o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"canAdd",this).call(this,e,parseInt(n))}},{key:"value",value:function(e){return parseInt(o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"value",this).call(this,e))||void 0}}]),t}(a.default.Attributor.Class))("indent","ql-indent",{scope:a.default.Scope.BLOCK,whitelist:[1,2,3,4,5,6,7,8]});t.IndentClass=l},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r,i=function(e){function t(){return function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(((r=n(4))&&r.__esModule?r:{default:r}).default);i.blotName="blockquote",i.tagName="blockquote",t.default=i},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r,i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function(e){function t(){return function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,null,[{key:"formats",value:function(e){return this.tagName.indexOf(e.tagName)+1}}]),t}(((r=n(4))&&r.__esModule?r:{default:r}).default);o.blotName="header",o.tagName=["H1","H2","H3","H4","H5","H6"],t.default=o},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.ListItem=void 0;var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);if(null===o)return;return e(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},o=s(n(0)),a=s(n(4)),l=s(n(25));function s(e){return e&&e.__esModule?e:{default:e}}function u(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function c(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}function d(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var h=function(e){function t(){return u(this,t),c(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return d(t,e),r(t,[{key:"format",value:function(e,n){e!==f.blotName||n?i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"format",this).call(this,e,n):this.replaceWith(o.default.create(this.statics.scope))}},{key:"remove",value:function(){null==this.prev&&null==this.next?this.parent.remove():i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"remove",this).call(this)}},{key:"replaceWith",value:function(e,n){return(this.parent.isolate(this.offset(this.parent),this.length()),e===this.parent.statics.blotName)?(this.parent.replaceWith(e,n),this):(this.parent.unwrap(),i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"replaceWith",this).call(this,e,n))}}],[{key:"formats",value:function(e){return e.tagName===this.tagName?void 0:i(t.__proto__||Object.getPrototypeOf(t),"formats",this).call(this,e)}}]),t}(a.default);h.blotName="list-item",h.tagName="LI";var f=function(e){function t(e){u(this,t);var n=c(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e)),r=function(t){if(t.target.parentNode===e){var r=n.statics.formats(e),i=o.default.find(t.target);"checked"===r?i.format("list","unchecked"):"unchecked"===r&&i.format("list","checked")}};return e.addEventListener("touchstart",r),e.addEventListener("mousedown",r),n}return d(t,e),r(t,null,[{key:"create",value:function(e){var n=i(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,"ordered"===e?"OL":"UL");return("checked"===e||"unchecked"===e)&&n.setAttribute("data-checked","checked"===e),n}},{key:"formats",value:function(e){return"OL"===e.tagName?"ordered":"UL"===e.tagName?e.hasAttribute("data-checked")?"true"===e.getAttribute("data-checked")?"checked":"unchecked":"bullet":void 0}}]),r(t,[{key:"format",value:function(e,t){this.children.length>0&&this.children.tail.format(e,t)}},{key:"formats",value:function(){var e,t,n;return e={},t=this.statics.blotName,n=this.statics.formats(this.domNode),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},{key:"insertBefore",value:function(e,n){if(e instanceof h)i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"insertBefore",this).call(this,e,n);else{var r=null==n?this.length():n.offset(this),o=this.split(r);o.parent.insertBefore(e,o)}}},{key:"optimize",value:function(e){i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"optimize",this).call(this,e);var n=this.next;null!=n&&n.prev===this&&n.statics.blotName===this.statics.blotName&&n.domNode.tagName===this.domNode.tagName&&n.domNode.getAttribute("data-checked")===this.domNode.getAttribute("data-checked")&&(n.moveChildren(this),n.remove())}},{key:"replace",value:function(e){if(e.statics.blotName!==this.statics.blotName){var n=o.default.create(this.statics.defaultChild);e.moveChildren(n),this.appendChild(n)}i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"replace",this).call(this,e)}}]),t}(l.default);f.blotName="list",f.scope=o.default.Scope.BLOCK_BLOT,f.tagName=["OL","UL"],f.defaultChild="list-item",f.allowedChildren=[h],t.ListItem=h,t.default=f},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r,i=function(e){function t(){return function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(((r=n(56))&&r.__esModule?r:{default:r}).default);i.blotName="italic",i.tagName=["EM","I"],t.default=i},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r,i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);if(null===o)return;return e(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},a=function(e){function t(){return function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,null,[{key:"create",value:function(e){return"super"===e?document.createElement("sup"):"sub"===e?document.createElement("sub"):o(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,e)}},{key:"formats",value:function(e){return"SUB"===e.tagName?"sub":"SUP"===e.tagName?"super":void 0}}]),t}(((r=n(6))&&r.__esModule?r:{default:r}).default);a.blotName="script",a.tagName=["SUB","SUP"],t.default=a},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r,i=function(e){function t(){return function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(((r=n(6))&&r.__esModule?r:{default:r}).default);i.blotName="strike",i.tagName="S",t.default=i},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r,i=function(e){function t(){return function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(((r=n(6))&&r.__esModule?r:{default:r}).default);i.blotName="underline",i.tagName="U",t.default=i},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r,i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);if(null===o)return;return e(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},a=(r=n(0))&&r.__esModule?r:{default:r},l=n(27),s=["alt","height","width"],u=function(e){function t(){return function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"format",value:function(e,n){s.indexOf(e)>-1?n?this.domNode.setAttribute(e,n):this.domNode.removeAttribute(e):o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"format",this).call(this,e,n)}}],[{key:"create",value:function(e){var n=o(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,e);return"string"==typeof e&&n.setAttribute("src",this.sanitize(e)),n}},{key:"formats",value:function(e){return s.reduce(function(t,n){return e.hasAttribute(n)&&(t[n]=e.getAttribute(n)),t},{})}},{key:"match",value:function(e){return/\.(jpe?g|gif|png)$/.test(e)||/^data:image\/.+;base64/.test(e)}},{key:"sanitize",value:function(e){return(0,l.sanitize)(e,["http","https","data"])?e:"//:0"}},{key:"value",value:function(e){return e.getAttribute("src")}}]),t}(a.default.Embed);u.blotName="image",u.tagName="IMG",t.default=u},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r,i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);if(null===o)return;return e(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},a=n(4),l=(r=n(27))&&r.__esModule?r:{default:r},s=["height","width"],u=function(e){function t(){return function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"format",value:function(e,n){s.indexOf(e)>-1?n?this.domNode.setAttribute(e,n):this.domNode.removeAttribute(e):o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"format",this).call(this,e,n)}}],[{key:"create",value:function(e){var n=o(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,e);return n.setAttribute("frameborder","0"),n.setAttribute("allowfullscreen",!0),n.setAttribute("src",this.sanitize(e)),n}},{key:"formats",value:function(e){return s.reduce(function(t,n){return e.hasAttribute(n)&&(t[n]=e.getAttribute(n)),t},{})}},{key:"sanitize",value:function(e){return l.default.sanitize(e)}},{key:"value",value:function(e){return e.getAttribute("src")}}]),t}(a.BlockEmbed);u.blotName="video",u.className="ql-video",u.tagName="IFRAME",t.default=u},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.FormulaBlot=void 0;var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);if(null===o)return;return e(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},o=s(n(35)),a=s(n(5)),l=s(n(9));function s(e){return e&&e.__esModule?e:{default:e}}function u(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function c(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}function d(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var h=function(e){function t(){return u(this,t),c(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return d(t,e),r(t,null,[{key:"create",value:function(e){var n=i(t.__proto__||Object.getPrototypeOf(t),"create",this).call(this,e);return"string"==typeof e&&(window.katex.render(e,n,{throwOnError:!1,errorColor:"#f00"}),n.setAttribute("data-value",e)),n}},{key:"value",value:function(e){return e.getAttribute("data-value")}}]),t}(o.default);h.blotName="formula",h.className="ql-formula",h.tagName="SPAN";var f=function(e){function t(){u(this,t);var e=c(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));if(null==window.katex)throw Error("Formula module requires KaTeX.");return e}return d(t,e),r(t,null,[{key:"register",value:function(){a.default.register(h,!0)}}]),t}(l.default);t.FormulaBlot=h,t.default=f},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.CodeToken=t.CodeBlock=void 0;var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);if(null===o)return;return e(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},o=s(n(0)),a=s(n(5)),l=s(n(9));function s(e){return e&&e.__esModule?e:{default:e}}function u(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function c(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}function d(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var h=function(e){function t(){return u(this,t),c(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return d(t,e),r(t,[{key:"replaceWith",value:function(e){this.domNode.textContent=this.domNode.textContent,this.attach(),i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"replaceWith",this).call(this,e)}},{key:"highlight",value:function(e){var t=this.domNode.textContent;this.cachedText!==t&&((t.trim().length>0||null==this.cachedText)&&(this.domNode.innerHTML=e(t),this.domNode.normalize(),this.attach()),this.cachedText=t)}}]),t}(s(n(13)).default);h.className="ql-syntax";var f=new o.default.Attributor.Class("token","hljs",{scope:o.default.Scope.INLINE}),p=function(e){function t(e,n){u(this,t);var r=c(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));if("function"!=typeof r.options.highlight)throw Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");var i=null;return r.quill.on(a.default.events.SCROLL_OPTIMIZE,function(){clearTimeout(i),i=setTimeout(function(){r.highlight(),i=null},r.options.interval)}),r.highlight(),r}return d(t,e),r(t,null,[{key:"register",value:function(){a.default.register(f,!0),a.default.register(h,!0)}}]),r(t,[{key:"highlight",value:function(){var e=this;if(!this.quill.selection.composing){this.quill.update(a.default.sources.USER);var t=this.quill.getSelection();this.quill.scroll.descendants(h).forEach(function(t){t.highlight(e.options.highlight)}),this.quill.update(a.default.sources.SILENT),null!=t&&this.quill.setSelection(t,a.default.sources.SILENT)}}}]),t}(l.default);p.DEFAULTS={highlight:null==window.hljs?null:function(e){return window.hljs.highlightAuto(e).value},interval:1e3},t.CodeBlock=h,t.CodeToken=f,t.default=p},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=13 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=9 y1=4 y2=4></line> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=14 x2=4 y1=14 y2=14></line> <line class=ql-stroke x1=12 x2=6 y1=4 y2=4></line> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=5 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=9 y1=4 y2=4></line> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=3 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=3 y1=4 y2=4></line> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <g class="ql-fill ql-color-label"> <polygon points="6 6.868 6 6 5 6 5 7 5.942 7 6 6.868"></polygon> <rect height=1 width=1 x=4 y=4></rect> <polygon points="6.817 5 6 5 6 6 6.38 6 6.817 5"></polygon> <rect height=1 width=1 x=2 y=6></rect> <rect height=1 width=1 x=3 y=5></rect> <rect height=1 width=1 x=4 y=7></rect> <polygon points="4 11.439 4 11 3 11 3 12 3.755 12 4 11.439"></polygon> <rect height=1 width=1 x=2 y=12></rect> <rect height=1 width=1 x=2 y=9></rect> <rect height=1 width=1 x=2 y=15></rect> <polygon points="4.63 10 4 10 4 11 4.192 11 4.63 10"></polygon> <rect height=1 width=1 x=3 y=8></rect> <path d=M10.832,4.2L11,4.582V4H10.708A1.948,1.948,0,0,1,10.832,4.2Z></path> <path d=M7,4.582L7.168,4.2A1.929,1.929,0,0,1,7.292,4H7V4.582Z></path> <path d=M8,13H7.683l-0.351.8a1.933,1.933,0,0,1-.124.2H8V13Z></path> <rect height=1 width=1 x=12 y=2></rect> <rect height=1 width=1 x=11 y=3></rect> <path d=M9,3H8V3.282A1.985,1.985,0,0,1,9,3Z></path> <rect height=1 width=1 x=2 y=3></rect> <rect height=1 width=1 x=6 y=2></rect> <rect height=1 width=1 x=3 y=2></rect> <rect height=1 width=1 x=5 y=3></rect> <rect height=1 width=1 x=9 y=2></rect> <rect height=1 width=1 x=15 y=14></rect> <polygon points="13.447 10.174 13.469 10.225 13.472 10.232 13.808 11 14 11 14 10 13.37 10 13.447 10.174"></polygon> <rect height=1 width=1 x=13 y=7></rect> <rect height=1 width=1 x=15 y=5></rect> <rect height=1 width=1 x=14 y=6></rect> <rect height=1 width=1 x=15 y=8></rect> <rect height=1 width=1 x=14 y=9></rect> <path d=M3.775,14H3v1H4V14.314A1.97,1.97,0,0,1,3.775,14Z></path> <rect height=1 width=1 x=14 y=3></rect> <polygon points="12 6.868 12 6 11.62 6 12 6.868"></polygon> <rect height=1 width=1 x=15 y=2></rect> <rect height=1 width=1 x=12 y=5></rect> <rect height=1 width=1 x=13 y=4></rect> <polygon points="12.933 9 13 9 13 8 12.495 8 12.933 9"></polygon> <rect height=1 width=1 x=9 y=14></rect> <rect height=1 width=1 x=8 y=15></rect> <path d=M6,14.926V15H7V14.316A1.993,1.993,0,0,1,6,14.926Z></path> <rect height=1 width=1 x=5 y=15></rect> <path d=M10.668,13.8L10.317,13H10v1h0.792A1.947,1.947,0,0,1,10.668,13.8Z></path> <rect height=1 width=1 x=11 y=15></rect> <path d=M14.332,12.2a1.99,1.99,0,0,1,.166.8H15V12H14.245Z></path> <rect height=1 width=1 x=14 y=15></rect> <rect height=1 width=1 x=15 y=11></rect> </g> <polyline class=ql-stroke points="5.5 13 9 5 12.5 13"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=11 y2=11></line> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <rect class="ql-fill ql-stroke" height=3 width=3 x=4 y=5></rect> <rect class="ql-fill ql-stroke" height=3 width=3 x=11 y=5></rect> <path class="ql-even ql-fill ql-stroke" d=M7,8c0,4.031-3,5-3,5></path> <path class="ql-even ql-fill ql-stroke" d=M14,8c0,4.031-3,5-3,5></path> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <path class=ql-stroke d=M5,4H9.5A2.5,2.5,0,0,1,12,6.5v0A2.5,2.5,0,0,1,9.5,9H5A0,0,0,0,1,5,9V4A0,0,0,0,1,5,4Z></path> <path class=ql-stroke d=M5,9h5.5A2.5,2.5,0,0,1,13,11.5v0A2.5,2.5,0,0,1,10.5,14H5a0,0,0,0,1,0,0V9A0,0,0,0,1,5,9Z></path> </svg>'},function(e,t){e.exports='<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=5 x2=13 y1=3 y2=3></line> <line class=ql-stroke x1=6 x2=9.35 y1=12 y2=3></line> <line class=ql-stroke x1=11 x2=15 y1=11 y2=15></line> <line class=ql-stroke x1=15 x2=11 y1=11 y2=15></line> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=7 x=2 y=14></rect> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class="ql-color-label ql-stroke ql-transparent" x1=3 x2=15 y1=15 y2=15></line> <polyline class=ql-stroke points="5.5 11 9 3 12.5 11"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=9 y2=9></line> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="3 11 5 9 3 7 3 11"></polygon> <line class="ql-stroke ql-fill" x1=15 x2=11 y1=4 y2=4></line> <path class=ql-fill d=M11,3a3,3,0,0,0,0,6h1V3H11Z></path> <rect class=ql-fill height=11 width=1 x=11 y=4></rect> <rect class=ql-fill height=11 width=1 x=13 y=4></rect> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="15 12 13 10 15 8 15 12"></polygon> <line class="ql-stroke ql-fill" x1=9 x2=5 y1=4 y2=4></line> <path class=ql-fill d=M5,3A3,3,0,0,0,5,9H6V3H5Z></path> <rect class=ql-fill height=11 width=1 x=5 y=4></rect> <rect class=ql-fill height=11 width=1 x=7 y=4></rect> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M14,16H4a1,1,0,0,1,0-2H14A1,1,0,0,1,14,16Z /> <path class=ql-fill d=M14,4H4A1,1,0,0,1,4,2H14A1,1,0,0,1,14,4Z /> <rect class=ql-fill x=3 y=6 width=12 height=6 rx=1 ry=1 /> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M13,16H5a1,1,0,0,1,0-2h8A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H5A1,1,0,0,1,5,2h8A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=2 y=6 width=14 height=6 rx=1 ry=1 /> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15,8H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,8Z /> <path class=ql-fill d=M15,12H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,12Z /> <path class=ql-fill d=M15,16H5a1,1,0,0,1,0-2H15A1,1,0,0,1,15,16Z /> <path class=ql-fill d=M15,4H5A1,1,0,0,1,5,2H15A1,1,0,0,1,15,4Z /> <rect class=ql-fill x=2 y=6 width=8 height=6 rx=1 ry=1 /> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M5,8H3A1,1,0,0,1,3,6H5A1,1,0,0,1,5,8Z /> <path class=ql-fill d=M5,12H3a1,1,0,0,1,0-2H5A1,1,0,0,1,5,12Z /> <path class=ql-fill d=M13,16H3a1,1,0,0,1,0-2H13A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H3A1,1,0,0,1,3,2H13A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=8 y=6 width=8 height=6 rx=1 ry=1 transform="translate(24 18) rotate(-180)"/> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M11.759,2.482a2.561,2.561,0,0,0-3.53.607A7.656,7.656,0,0,0,6.8,6.2C6.109,9.188,5.275,14.677,4.15,14.927a1.545,1.545,0,0,0-1.3-.933A0.922,0.922,0,0,0,2,15.036S1.954,16,4.119,16s3.091-2.691,3.7-5.553c0.177-.826.36-1.726,0.554-2.6L8.775,6.2c0.381-1.421.807-2.521,1.306-2.676a1.014,1.014,0,0,0,1.02.56A0.966,0.966,0,0,0,11.759,2.482Z></path> <rect class=ql-fill height=1.6 rx=0.8 ry=0.8 width=5 x=5.15 y=6.2></rect> <path class=ql-fill d=M13.663,12.027a1.662,1.662,0,0,1,.266-0.276q0.193,0.069.456,0.138a2.1,2.1,0,0,0,.535.069,1.075,1.075,0,0,0,.767-0.3,1.044,1.044,0,0,0,.314-0.8,0.84,0.84,0,0,0-.238-0.619,0.8,0.8,0,0,0-.594-0.239,1.154,1.154,0,0,0-.781.3,4.607,4.607,0,0,0-.781,1q-0.091.15-.218,0.346l-0.246.38c-0.068-.288-0.137-0.582-0.212-0.885-0.459-1.847-2.494-.984-2.941-0.8-0.482.2-.353,0.647-0.094,0.529a0.869,0.869,0,0,1,1.281.585c0.217,0.751.377,1.436,0.527,2.038a5.688,5.688,0,0,1-.362.467,2.69,2.69,0,0,1-.264.271q-0.221-.08-0.471-0.147a2.029,2.029,0,0,0-.522-0.066,1.079,1.079,0,0,0-.768.3A1.058,1.058,0,0,0,9,15.131a0.82,0.82,0,0,0,.832.852,1.134,1.134,0,0,0,.787-0.3,5.11,5.11,0,0,0,.776-0.993q0.141-.219.215-0.34c0.046-.076.122-0.194,0.223-0.346a2.786,2.786,0,0,0,.918,1.726,2.582,2.582,0,0,0,2.376-.185c0.317-.181.212-0.565,0-0.494A0.807,0.807,0,0,1,14.176,15a5.159,5.159,0,0,1-.913-2.446l0,0Q13.487,12.24,13.663,12.027Z></path> </svg>'},function(e,t){e.exports='<svg viewBox="0 0 18 18"> <path class=ql-fill d=M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm6.06787,9.209H14.98975V7.59863a.54085.54085,0,0,0-.605-.60547h-.62744a1.01119,1.01119,0,0,0-.748.29688L11.645,8.56641a.5435.5435,0,0,0-.022.8584l.28613.30762a.53861.53861,0,0,0,.84717.0332l.09912-.08789a1.2137,1.2137,0,0,0,.2417-.35254h.02246s-.01123.30859-.01123.60547V13.209H12.041a.54085.54085,0,0,0-.605.60547v.43945a.54085.54085,0,0,0,.605.60547h4.02686a.54085.54085,0,0,0,.605-.60547v-.43945A.54085.54085,0,0,0,16.06787,13.209Z /> </svg>'},function(e,t){e.exports='<svg viewBox="0 0 18 18"> <path class=ql-fill d=M16.73975,13.81445v.43945a.54085.54085,0,0,1-.605.60547H11.855a.58392.58392,0,0,1-.64893-.60547V14.0127c0-2.90527,3.39941-3.42187,3.39941-4.55469a.77675.77675,0,0,0-.84717-.78125,1.17684,1.17684,0,0,0-.83594.38477c-.2749.26367-.561.374-.85791.13184l-.4292-.34082c-.30811-.24219-.38525-.51758-.1543-.81445a2.97155,2.97155,0,0,1,2.45361-1.17676,2.45393,2.45393,0,0,1,2.68408,2.40918c0,2.45312-3.1792,2.92676-3.27832,3.93848h2.79443A.54085.54085,0,0,1,16.73975,13.81445ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z /> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=13 y1=4 y2=4></line> <line class=ql-stroke x1=5 x2=11 y1=14 y2=14></line> <line class=ql-stroke x1=8 x2=10 y1=14 y2=4></line> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=10 width=12 x=3 y=4></rect> <circle class=ql-fill cx=6 cy=7 r=1></circle> <polyline class="ql-even ql-fill" points="5 12 5 11 7 9 8 10 11 7 13 9 13 12 5 12"></polyline> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class="ql-fill ql-stroke" points="3 7 3 11 5 9 3 7"></polyline> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points="5 7 5 11 3 9 5 7"></polyline> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=11 y1=7 y2=11></line> <path class="ql-even ql-stroke" d=M8.9,4.577a3.476,3.476,0,0,1,.36,4.679A3.476,3.476,0,0,1,4.577,8.9C3.185,7.5,2.035,6.4,4.217,4.217S7.5,3.185,8.9,4.577Z></path> <path class="ql-even ql-stroke" d=M13.423,9.1a3.476,3.476,0,0,0-4.679-.36,3.476,3.476,0,0,0,.36,4.679c1.392,1.392,2.5,2.542,4.679.36S14.815,10.5,13.423,9.1Z></path> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=7 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=7 x2=15 y1=14 y2=14></line> <line class="ql-stroke ql-thin" x1=2.5 x2=4.5 y1=5.5 y2=5.5></line> <path class=ql-fill d=M3.5,6A0.5,0.5,0,0,1,3,5.5V3.085l-0.276.138A0.5,0.5,0,0,1,2.053,3c-0.124-.247-0.023-0.324.224-0.447l1-.5A0.5,0.5,0,0,1,4,2.5v3A0.5,0.5,0,0,1,3.5,6Z></path> <path class="ql-stroke ql-thin" d=M4.5,10.5h-2c0-.234,1.85-1.076,1.85-2.234A0.959,0.959,0,0,0,2.5,8.156></path> <path class="ql-stroke ql-thin" d=M2.5,14.846a0.959,0.959,0,0,0,1.85-.109A0.7,0.7,0,0,0,3.75,14a0.688,0.688,0,0,0,.6-0.736,0.959,0.959,0,0,0-1.85-.109></path> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=6 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=6 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=6 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=3 y1=4 y2=4></line> <line class=ql-stroke x1=3 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=3 y1=14 y2=14></line> </svg>'},function(e,t){e.exports='<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=9 x2=15 y1=4 y2=4></line> <polyline class=ql-stroke points="3 4 4 5 6 3"></polyline> <line class=ql-stroke x1=9 x2=15 y1=14 y2=14></line> <polyline class=ql-stroke points="3 14 4 15 6 13"></polyline> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points="3 9 4 10 6 8"></polyline> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15.5,15H13.861a3.858,3.858,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.921,1.921,0,0,0,12.021,11.7a0.50013,0.50013,0,1,0,.957.291h0a0.914,0.914,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.076-1.16971,1.86982-1.93971,2.43082A1.45639,1.45639,0,0,0,12,15.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,15Z /> <path class=ql-fill d=M9.65,5.241a1,1,0,0,0-1.409.108L6,7.964,3.759,5.349A1,1,0,0,0,2.192,6.59178Q2.21541,6.6213,2.241,6.649L4.684,9.5,2.241,12.35A1,1,0,0,0,3.71,13.70722q0.02557-.02768.049-0.05722L6,11.036,8.241,13.65a1,1,0,1,0,1.567-1.24277Q9.78459,12.3777,9.759,12.35L7.316,9.5,9.759,6.651A1,1,0,0,0,9.65,5.241Z /> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15.5,7H13.861a4.015,4.015,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.922,1.922,0,0,0,12.021,3.7a0.5,0.5,0,1,0,.957.291,0.917,0.917,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.077-1.164,1.925-1.934,2.486A1.423,1.423,0,0,0,12,7.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,7Z /> <path class=ql-fill d=M9.651,5.241a1,1,0,0,0-1.41.108L6,7.964,3.759,5.349a1,1,0,1,0-1.519,1.3L4.683,9.5,2.241,12.35a1,1,0,1,0,1.519,1.3L6,11.036,8.241,13.65a1,1,0,0,0,1.519-1.3L7.317,9.5,9.759,6.651A1,1,0,0,0,9.651,5.241Z /> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <line class="ql-stroke ql-thin" x1=15.5 x2=2.5 y1=8.5 y2=9.5></line> <path class=ql-fill d=M9.007,8C6.542,7.791,6,7.519,6,6.5,6,5.792,7.283,5,9,5c1.571,0,2.765.679,2.969,1.309a1,1,0,0,0,1.9-.617C13.356,4.106,11.354,3,9,3,6.2,3,4,4.538,4,6.5a3.2,3.2,0,0,0,.5,1.843Z></path> <path class=ql-fill d=M8.984,10C11.457,10.208,12,10.479,12,11.5c0,0.708-1.283,1.5-3,1.5-1.571,0-2.765-.679-2.969-1.309a1,1,0,1,0-1.9.617C4.644,13.894,6.646,15,9,15c2.8,0,5-1.538,5-3.5a3.2,3.2,0,0,0-.5-1.843Z></path> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <path class=ql-stroke d=M5,3V9a4.012,4.012,0,0,0,4,4H9a4.012,4.012,0,0,0,4-4V3></path> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=12 x=3 y=15></rect> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=12 width=12 x=3 y=3></rect> <rect class=ql-fill height=12 width=1 x=5 y=3></rect> <rect class=ql-fill height=12 width=1 x=12 y=3></rect> <rect class=ql-fill height=2 width=8 x=5 y=8></rect> <rect class=ql-fill height=1 width=3 x=3 y=5></rect> <rect class=ql-fill height=1 width=3 x=3 y=7></rect> <rect class=ql-fill height=1 width=3 x=3 y=10></rect> <rect class=ql-fill height=1 width=3 x=3 y=12></rect> <rect class=ql-fill height=1 width=3 x=12 y=5></rect> <rect class=ql-fill height=1 width=3 x=12 y=7></rect> <rect class=ql-fill height=1 width=3 x=12 y=10></rect> <rect class=ql-fill height=1 width=3 x=12 y=12></rect> </svg>'},function(e,t){e.exports='<svg viewbox="0 0 18 18"> <polygon class=ql-stroke points="7 11 9 13 11 11 7 11"></polygon> <polygon class=ql-stroke points="7 7 9 5 11 7 7 7"></polygon> </svg>'},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.BubbleTooltip=void 0;var r=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);if(null===o)return;return e(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=d(n(3)),a=d(n(8)),l=n(43),s=d(l),u=n(15),c=d(n(41));function d(e){return e&&e.__esModule?e:{default:e}}function h(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function f(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}function p(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var g=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]],m=function(e){function t(e,n){h(this,t),null!=n.modules.toolbar&&null==n.modules.toolbar.container&&(n.modules.toolbar.container=g);var r=f(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r.quill.container.classList.add("ql-bubble"),r}return p(t,e),i(t,[{key:"extendToolbar",value:function(e){this.tooltip=new v(this.quill,this.options.bounds),this.tooltip.root.appendChild(e.container),this.buildButtons([].slice.call(e.container.querySelectorAll("button")),c.default),this.buildPickers([].slice.call(e.container.querySelectorAll("select")),c.default)}}]),t}(s.default);m.DEFAULTS=(0,o.default)(!0,{},s.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(e){e?this.quill.theme.tooltip.edit():this.quill.format("link",!1)}}}}});var v=function(e){function t(e,n){h(this,t);var r=f(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r.quill.on(a.default.events.EDITOR_CHANGE,function(e,t,n,i){if(e===a.default.events.SELECTION_CHANGE){if(null!=t&&t.length>0&&i===a.default.sources.USER){r.show(),r.root.style.left="0px",r.root.style.width="",r.root.style.width=r.root.offsetWidth+"px";var o=r.quill.getLines(t.index,t.length);if(1===o.length)r.position(r.quill.getBounds(t));else{var l=o[o.length-1],s=r.quill.getIndex(l),c=Math.min(l.length()-1,t.index+t.length-s),d=r.quill.getBounds(new u.Range(s,c));r.position(d)}}else document.activeElement!==r.textbox&&r.quill.hasFocus()&&r.hide()}}),r}return p(t,e),i(t,[{key:"listen",value:function(){var e=this;r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"listen",this).call(this),this.root.querySelector(".ql-close").addEventListener("click",function(){e.root.classList.remove("ql-editing")}),this.quill.on(a.default.events.SCROLL_OPTIMIZE,function(){setTimeout(function(){if(!e.root.classList.contains("ql-hidden")){var t=e.quill.getSelection();null!=t&&e.position(e.quill.getBounds(t))}},1)})}},{key:"cancel",value:function(){this.show()}},{key:"position",value:function(e){var n=r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"position",this).call(this,e),i=this.root.querySelector(".ql-tooltip-arrow");if(i.style.marginLeft="",0===n)return n;i.style.marginLeft=-1*n-i.offsetWidth/2+"px"}}]),t}(l.BaseTooltip);v.TEMPLATE='<span class="ql-tooltip-arrow"></span><div class="ql-tooltip-editor"><input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL"><a class="ql-close"></a></div>',t.BubbleTooltip=v,t.default=m},function(e,t,n){e.exports=n(63)}]).default;var y=h("2SBKn"),oX={};O9=oX,O7=function(e,t,n,r){var i,o,a,l,s,u,c,d,h,f,p,g,m,v,y,b,w,x,_,E,S,C,O,k,P,T,A,N,j,R,I,L,M,D,F,z,B,U,H,V,q,G,W,$,K,Y,X,Z,Q,J,ee,et=(o=[],(i={}).joinUrl=function(t,n){return t?e.resolve(t,n):n},i.getConstantUniqueIdFor=function(e){return 0>o.indexOf(e)&&o.push(e),o.indexOf(e)},i.clone=function(e){var t,n={};for(t in e)e.hasOwnProperty(t)&&(n[t]=e[t]);return n},i.parseOptionalParameters=function(e){var t,n={canvas:null,options:{}};return null==e[0]||"object"==typeof(t=e[0])&&null!==t&&Object.prototype.toString.apply(t).match(/\[object (Canvas|HTMLCanvasElement)\]/i)?(n.canvas=e[0]||null,n.options=i.clone(e[1])):n.options=i.clone(e[0]),n},i),en=(a={},l=function(e,t,n){var r=e[t];return e[t]=function(){var e=Array.prototype.slice.call(arguments);return n.apply(this,[e,r])},r},a.baseUrlRespectingXhr=function(e,t){return function(){var n=new e;return l(n,"open",function(e,n){var r=e.shift(),i=e.shift(),o=et.joinUrl(t,i);return n.apply(this,[r,o].concat(e))}),n}},a.finishNotifyingXhr=function(e){var t,n=0,r=0,i=!1,o=new Promise(function(e){t=function(){n-r<=0&&i&&e({totalCount:n})}}),a=function(){var i=new e;return l(i,"send",function(e,t){return n+=1,t.apply(this,arguments)}),i.addEventListener("load",function(){r+=1,t()}),i};return a.waitForRequestsToFinish=function(){return i=!0,t(),o},a},a),er=(s={},u=function(e){return Array.prototype.slice.call(e)},s.addClassName=function(e,t){e.className+=" "+t},s.addClassNameRecursively=function(e,t){s.addClassName(e,t),e.parentNode!==e.ownerDocument&&s.addClassNameRecursively(e.parentNode,t)},c=function(e,t){var n=e.parentStyleSheet,r=u(n.cssRules).indexOf(e);n.insertRule(t,r+1),n.deleteRule(r)},d=function(e,t){var n=e.cssText.replace(/^[^\{]+/,"");c(e,t+" "+n)},h=function(e){e.textContent=u(e.sheet.cssRules).reduce(function(e,t){return e+t.cssText},"")},f=function(e){var t=document.implementation.createHTMLDocument(""),n=document.createElement("style");n.textContent=e.textContent,t.body.appendChild(n),e.sheet=n.sheet},p=function(e,t,n){var r="((?:^|[^.#:\\w])|(?=\\W))("+t.join("|")+")(?=\\W|$)";u(e.querySelectorAll("style")).forEach(function(e){void 0===e.sheet&&f(e);var t=u(e.sheet.cssRules).filter(function(e){return e.selectorText&&RegExp(r,"i").test(e.selectorText)});t.length&&(t.forEach(function(e){var t=e.selectorText.replace(RegExp(r,"gi"),function(e,t,r){return t+n(r)});t!==e.selectorText&&d(e,t)}),h(e))})},s.rewriteCssSelectorWith=function(e,t,n){p(e,[t],function(){return n})},s.lowercaseCssTypeSelectors=function(e,t){p(e,t,function(e){return e.toLowerCase()})},s.findHtmlOnlyNodeNames=function(e){var t,n=e.ownerDocument.createTreeWalker(e,NodeFilter.SHOW_ELEMENT),r={},i={};do t=n.currentNode.tagName.toLowerCase(),"http://www.w3.org/1999/xhtml"===n.currentNode.namespaceURI?r[t]=!0:i[t]=!0;while(n.nextNode())return Object.keys(r).filter(function(e){return!i[e]})},g={},m=function(e){return Array.prototype.slice.call(e)},v={active:!0,hover:!0,focus:!1,target:!1},g.fakeUserAction=function(e,t,n){var r=e.querySelector(t),i="rasterizehtml"+n;r&&(v[n]?s.addClassNameRecursively(r,i):s.addClassName(r,i),s.rewriteCssSelectorWith(e,":"+n,"."+i))},g.persistInputValues=function(e){var t=e.querySelectorAll("input"),n=e.querySelectorAll("textarea"),r=function(e){return"checkbox"===e.type||"radio"===e.type};m(t).filter(r).forEach(function(e){e.checked?e.setAttribute("checked",""):e.removeAttribute("checked")}),m(t).filter(function(e){return!r(e)}).forEach(function(e){e.setAttribute("value",e.value)}),m(n).forEach(function(e){e.textContent=e.value})},g.rewriteTagNameSelectorsToLowerCase=function(e){s.lowercaseCssTypeSelectors(e,s.findHtmlOnlyNodeNames(e))},g),ei=(y=window,b={},w=function(e,t,n,r){var i=e.createElement(t);return i.style.visibility="hidden",i.style.width=n+"px",i.style.height=r+"px",i.style.position="absolute",i.style.top=-1e4-r+"px",i.style.left=-1e4-n+"px",e.getElementsByTagName("body")[0].appendChild(i),i},b.executeJavascript=function(e,t){return new Promise(function(n){var r=w(y.document,"iframe",t.width,t.height),i=e.outerHTML,o=[],a=t.executeJsTimeout||0,l=function(){y.document.getElementsByTagName("body")[0].removeChild(r)},s=function(){n({document:r.contentDocument,errors:o,cleanUp:l})},u=r.contentWindow.XMLHttpRequest,c=en.finishNotifyingXhr(u),d=en.baseUrlRespectingXhr(c,t.baseUrl);r.onload=function(){(a>0?new Promise(function(e){setTimeout(e,a)}):Promise.resolve()).then(c.waitForRequestsToFinish).then(s)},r.contentDocument.open(),r.contentWindow.XMLHttpRequest=d,r.contentWindow.onerror=function(e){o.push({resourceType:"scriptExecution",msg:e})},r.contentDocument.write("<!DOCTYPE html>"),r.contentDocument.write(i),r.contentDocument.close()})},x=function(e,t,n){var r=e.createElement("iframe");return r.style.width=t+"px",r.style.height=n+"px",r.style.visibility="hidden",r.style.position="absolute",r.style.top=-1e4-n+"px",r.style.left=-1e4-t+"px",r.style.borderWidth=0,r.sandbox="allow-same-origin",r.scrolling="no",r},_=function(e,t,n){var r=Math.floor(e/n),i=Math.floor(t/n);return x(y.document,r,i)},E=function(e,t){var n=e.querySelector(t);if(n)return n;if(e.ownerDocument.querySelector(t)===e)return e;throw{message:"Clipping selector not found"}},S=function(e,t,n,r,i){var o,a,l,s,u,c,d,h,f=Math.max(e.scrollWidth,e.clientWidth),p=Math.max(e.scrollHeight,e.clientHeight);return t?(a=(d=E(e,t).getBoundingClientRect()).top,l=d.left,s=d.width,u=d.height):(a=0,l=0,s=f,u=p),h={width:Math.max((o={width:s,height:u}).width*i,n),height:Math.max(o.height*i,r)},c=y.getComputedStyle(e.ownerDocument.documentElement).fontSize,{left:l,top:a,width:h.width,height:h.height,viewportWidth:f,viewportHeight:p,rootFontSize:c}},C=function(e,t){var n=e.tagName;return t.querySelector(n)},O=function(e){var t=e.tagName.toLowerCase();return"html"===t||"body"===t?e.outerHTML:'<body style="margin: 0;">'+e.outerHTML+"</body>"},b.calculateDocumentContentSize=function(e,t){return new Promise(function(n,r){var i,o=t.zoom||1;i=_(t.width,t.height,o),y.document.getElementsByTagName("body")[0].appendChild(i),i.onload=function(){var a,l=i.contentDocument;try{a=S(C(e,l),t.clip,t.width,t.height,o),n(a)}catch(e){r(e)}finally{y.document.getElementsByTagName("body")[0].removeChild(i)}},i.contentDocument.open(),i.contentDocument.write("<!DOCTYPE html>"),i.contentDocument.write(O(e)),i.contentDocument.close()})},b.parseHtmlFragment=function(e){var t=y.document.implementation.createHTMLDocument("");t.documentElement.innerHTML=e;var n=t.querySelector("body").firstChild;if(!n)throw"Invalid source";return n},k=function(e,t){var n,r,i,o,a=/<html((?:\s+[^>]*)?)>/im.exec(t),l=y.document.implementation.createHTMLDocument("");if(a)for(r=0,n="<div"+a[1]+"></div>",l.documentElement.innerHTML=n,i=l.querySelector("div");r<i.attributes.length;r++)o=i.attributes[r],e.documentElement.setAttribute(o.name,o.value)},b.parseHTML=function(e){var t=y.document.implementation.createHTMLDocument("");return t.documentElement.innerHTML=e,k(t,e),t},P=function(e){try{return n.failOnParseError(e)}catch(e){throw{message:"Invalid source",originalError:e}}},b.validateXHTML=function(e){P(new DOMParser().parseFromString(e,"application/xml"))},T=null,b.loadDocument=function(e,t){return new Promise(function(n,r){var i,o,a=new window.XMLHttpRequest,l=(i=et.joinUrl(t.baseUrl,e),"none"===(o=t.cache)||"repeated"===o?((null===T||"repeated"!==o)&&(T=Date.now()),i+"?_="+T):i),s=function(e){r({message:"Unable to load page",originalError:e})};a.addEventListener("load",function(){200===a.status||0===a.status?n(a.responseXML):s(a.statusText)},!1),a.addEventListener("error",function(e){s(e)},!1);try{a.open("GET",l,!0),a.responseType="document",a.send(null)}catch(e){s(e)}}).then(function(e){return P(e)})},b),eo=(A=window,j={},R=function(e,t){return t?URL.createObjectURL(new Blob([e],{type:"image/svg+xml"})):"data:image/svg+xml;charset=utf-8,"+encodeURIComponent(e)},I=function(e){e instanceof Blob&&URL.revokeObjectURL(e)},L='<svg xmlns="http://www.w3.org/2000/svg" width="1" height="1"><foreignObject></foreignObject></svg>',M=function(e){return new Promise(function(t,n){var r=document.createElement("canvas"),i=new Image;i.onload=function(){var e=r.getContext("2d");try{e.drawImage(i,0,0),r.toDataURL("image/png"),t(!0)}catch(e){t(!1)}},i.onerror=n,i.src=e})},D=function(){var e=R(L,!0);return M(e).then(function(t){return I(e),!t&&M(R(L,!1)).then(function(e){return e})},function(){return!1})},F=function(){if(A.Blob)try{return new Blob(["<b></b>"],{type:"text/xml"}),!0}catch(e){}return!1},j.renderSvg=function(e){return new Promise(function(t,n){var r,i,o=function(){i.onload=null,i.onerror=null},a=function(){r&&I(r)};(i=new Image).onload=function(){o(),a(),t(i)},i.onerror=function(){a(),n()},(void 0===N&&(N=new Promise(function(e,t){F()&&A.URL?D().then(function(t){e(!t)},function(){t()}):e(!1)})),N).then(function(t){return R(e,t)}).then(function(e){r=e,i.src=r},n)})},j),ea=(z={},B=function(e,t){var n=t||1,r={width:e.width,height:e.height,"font-size":e.rootFontSize};return 1!==n&&(r.style="transform:scale("+n+"); transform-origin: 0 0;"),r},U=function(e){var t,n;return t=Math.round(e.viewportWidth),n=Math.round(e.viewportHeight),{x:-e.left,y:-e.top,width:t,height:n}},H=function(e){var t=e.style||"";e.style=t+"float: left;"},V=function(e){e.externalResourcesRequired=!0},q=function(e){var t=Object.keys(e);return t.length?" "+t.map(function(t){return t+'="'+e[t]+'"'}).join(" "):""},G=function(e,n,r){var i=t.serializeToString(e);ei.validateXHTML(i);var o=U(n);return H(o),V(o),'<svg xmlns="http://www.w3.org/2000/svg"'+q(B(n,r))+'><style scoped="">html::-webkit-scrollbar { display: none; }</style><foreignObject'+q(o)+">"+i+"</foreignObject></svg>"},z.getSvgForDocument=function(e,t,n){return er.rewriteTagNameSelectorsToLowerCase(e),G(e,t,n)},z.drawDocumentAsSvg=function(e,t){return["hover","active","focus","target"].forEach(function(n){t[n]&&er.fakeUserAction(e,t[n],n)}),ei.calculateDocumentContentSize(e,t).then(function(n){return z.getSvgForDocument(e,n,t.zoom)})},z),el=(W={},$=function(e){return{message:"Error rendering page",originalError:e}},K=function(e){return eo.renderSvg(e).then(function(t){return{image:t,svg:e}},function(e){throw $(e)})},Y=function(e,t){try{t.getContext("2d").drawImage(e,0,0)}catch(e){throw $(e)}},W.rasterize=function(e,t,n){var i;return(i=et.clone(n)).inlineScripts=!0===n.executeJs,r.inlineReferences(e,i).then(function(t){return n.executeJs?ei.executeJavascript(e,n).then(function(e){var t=e.document;return er.persistInputValues(t),{document:t,errors:e.errors,cleanUp:e.cleanUp}}).then(function(e){return{element:e.document.documentElement,errors:t.concat(e.errors),cleanUp:e.cleanUp}}):{element:e,errors:t,cleanUp:function(){}}}).then(function(e){var r;return(r=e.element,ea.drawDocumentAsSvg(r,n).then(K).then(function(e){return t&&Y(e.image,t),e})).then(function(t){return e.cleanUp(),{image:t.image,svg:t.svg,errors:e.errors}})})},W);return X={},Z=function(e,t){var n=e?e.width:300,r=e?e.height:200;return{width:void 0!==t.width?t.width:n,height:void 0!==t.height?t.height:r}},Q=function(e){var t,n=Z(e.canvas,e.options);return(t=et.clone(e.options)).width=n.width,t.height=n.height,t},X.drawDocument=function(){var e=arguments[0],t=Array.prototype.slice.call(arguments,1),n=et.parseOptionalParameters(t),r=e.documentElement?e.documentElement:e;return el.rasterize(r,n.canvas,Q(n))},J=function(e,t,n){var r=ei.parseHTML(e);return X.drawDocument(r,t,n)},X.drawHTML=function(){var e=arguments[0],t=Array.prototype.slice.call(arguments,1),n=et.parseOptionalParameters(t);return J(e,n.canvas,n.options)},ee=function(e,t,n){var r=document.implementation.createHTMLDocument("");r.replaceChild(e.documentElement,r.documentElement);var i=n?et.clone(n):{};return n.baseUrl||(i.baseUrl=t),{document:r,options:i}},X.drawURL=function(){var e,t,n=arguments[0],r=Array.prototype.slice.call(arguments,1),i=et.parseOptionalParameters(r);return e=i.canvas,t=i.options,ei.loadDocument(n,t).then(function(r){var i=ee(r,n,t);return X.drawDocument(i.document,e,i.options)})},X},void 0===O9&&void 0!==window&&(O9=window),"function"==typeof define&&define.amd?define(["url","xmlserializer","sane-domparser-error","inlineresources"],function(e,t,n,r){return O9.rasterizeHTML=O7(e,t,n,r)}):oX?oX=O7(h("kRFNf"),h("l4MZj"),h("lDFX4"),h("6cJtK")):O9.rasterizeHTML=O7(O9.url,O9.xmlserializer,O9.sanedomparsererror,O9.inlineresources);let oZ=`
|
|
43
43
|
<style>
|
|
44
44
|
html, body {
|
|
45
45
|
padding: 0;
|
|
@@ -81,7 +81,7 @@ For more info see: https://github.com/konvajs/react-konva/issues/194
|
|
|
81
81
|
.ql-direction-rtl {
|
|
82
82
|
direction: rtl;
|
|
83
83
|
}
|
|
84
|
-
`,ai=({html:e,onBlur:t,onChange:n,element:r})=>{let i=l(v).useRef(null);l(v).useEffect(()=>{if(!i.current)return;let e=new(l(ol))(i.current,{toolbar:!1,keyboard:!1,clipboard:{matchVisual:!1},formats:["background","bold","color","font","italic","size","strike","underline","indent","align","direction"]});return an.editor.instance=e,window.__polotnoQuill=e,e.on("text-change",()=>{e.getSelection()&&(an.currentFormat=e.getFormat()),setTimeout(()=>{n(i.current?.childNodes[0].innerHTML)},10)}),e.setSelection(0,0,"api"),e.on("selection-change",n=>{n||t(),n&&(an.currentFormat=e.getFormat())}),i.current.childNodes[0].addEventListener("blur",e=>{e.relatedTarget?.classList.contains("ql-clipboard")||t()}),()=>{an.editor.instance=null,an.currentFormat={},delete window.__polotnoQuill}},[]),l(v).useEffect(()=>{let t=an.editor.instance;if(!t)return;let n=t.getSelection();if(i.current?.childNodes[0].innerHTML!==r.text){var o=t.clipboard.convert("<div class='ql-editor' style='outline: none;'>"+e+"<p><br></p></div>");t.setContents(o),t.history.clear(),n&&(t.setSelection(n.index,n.length),an.currentFormat=t.getFormat())}},[r.text]);let o=iH(r).fill;return(0,p.jsx)(ar,{ref:i,style:{fontSize:r.fontSize,color:o,width:r.width,fontFamily:r.fontFamily,lineHeight:r.lineHeight,letterSpacing:r.letterSpacing+"rem",textAlign:r.align},dir:iM(i_(r.text))})};function ao(e,{fontFamily:t="",color:n="black"}={}){let r=`color: ${n||e.fill}`;return`<div style="white-space: unset; width: ${Math.round(e.width||100)}px; ${r}; font-size: ${e.fontSize}px; font-family: '${t}'; text-decoration: ${e.textDecoration}; text-align: ${e.align}; line-height: ${e.lineHeight}; letter-spacing: ${e.letterSpacing}rem; font-style: ${e.fontStyle}; font-weight: ${e.fontWeight}; -webkit-text-stroke: ${e.strokeWidth}px ${e.stroke};" contentEditable dir="${iM(i_(e.text))}">${e.text}</div>`}let aa=e=>{let t=e.fontSize;for(let n=1;n<50;n++){let{height:n}=oJ(ao({...e.toJSON(),fontSize:t},{fontFamily:e.fontFamily}));if(!(e.height&&n>e.height))break;t-=.5}return t},al=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),as=P(({element:e,store:t})=>{let n=l(v).useRef(null),[r,i]=l(v).useState(),[o,a]=l(v).useState(!1),[s,u]=l(v).useState(!0),[c,d]=l(v).useState(!1),[h,f]=l(v).useState(!1),g=l(v).useRef(e.height),m=t.selectedElements.indexOf(e)>=0,b=e.fontSize/3,{textVerticalResizeEnabled:w}=ix,x=iU(e.fontFamily),[_]=iz(t,e.fontFamily);it(n);let E=_?e.fontFamily:x!==e.fontFamily?x:"Arial",S=iH(e).fill,C=ao(e,{fontFamily:E,color:S}),{width:O,height:k}=l(v).useMemo(()=>oJ(C),[C,e.width,_]);l(v).useEffect(()=>{if(!_)return;if(!e.height){e.set({height:k});return}let{textOverflow:n}=ix;if("change-font-size"!==n||o)"resize"!==n||(w&&e.height<k&&t.history.ignore(()=>{e.set({height:k})}),w||e.height===k||t.history.ignore(()=>{e.set({height:k})}));else{let n=aa(e);n!==e.fontSize?t.history.ignore(()=>{e.set({fontSize:n})}):e.height===k||(w&&e.height<k?t.history.ignore(()=>{e.set({height:k})}):w||t.history.ignore(()=>{e.set({height:k})}))}});let P=l(v).useRef(0),T=async()=>{P.current++;let n=P.current,r=io(`text ${e.id}`);u(!0);let o=null,a=al?5:1;for(let i=0;i<a;i++){if(o=await o0({html:C,width:e.width||1,height:e.height||k||1,fontFamily:E,padding:b,pixelRatio:t._elementsPixelRatio,font:t.fonts.find(e=>e.fontFamily===E)||ih.find(e=>e.fontFamily===E)}),n!==P.current){r();return}if(!function(e){let t=e.getContext("2d").getImageData(0,0,e.width,e.height).data;for(let e=0;e<t.length;e+=4)if(0!==t[e+3])return!0;return!1}(o)&&al){await new Promise(e=>setTimeout(e,50*(i+1)));continue}}if(!o){r();return}i(o),u(!1),l(A).Util.requestAnimFrame(r)};l(v).useEffect(()=>{o||c||T()},[C,o,k,c,E,e.height,t._elementsPixelRatio]);let N=o||s;l(v).useEffect(()=>y.autorun(()=>{iP(n.current,e)}),[r,N,e.shadowColor,e.shadowOffsetX,e.shadowOffsetY,e.shadowOpacity]);let j=0;"middle"===e.verticalAlign&&(j=(e.height-k)/2),"bottom"===e.verticalAlign&&(j=e.height-k);let R=iB({fontLoaded:_,fontFamily:e.fontFamily,fontSize:e.fontSize,lineHeight:e.lineHeight}),I=iR();return(0,p.jsxs)(l(v).Fragment,{children:[(0,p.jsx)(rW,{x:e.x,y:e.y,offsetX:e.backgroundPadding*(e.fontSize*R*.5),offsetY:e.backgroundPadding*(e.fontSize*R*.5),rotation:e.rotation,hideInExport:!e.showInExport||!e.text,listening:!1,visible:e.backgroundEnabled,opacity:e.backgroundOpacity,fill:e.backgroundColor,width:e.width+e.backgroundPadding*(e.fontSize*R),height:e.height+e.backgroundPadding*(e.fontSize*R),cornerRadius:e.backgroundCornerRadius*(e.fontSize*R*.5)}),(0,p.jsx)(rW,{ref:n,name:"element",x:e.x,y:e.y,listening:e.selectable,rotation:e.rotation,width:e.width,height:e.height,visible:!N,draggable:I?e.draggable&&m:e.draggable,preventDefault:!I||m,opacity:c?0:e.opacity,hideInExport:!e.showInExport,onMouseEnter:()=>{f(!0)},onMouseLeave:()=>{f(!1)},onDragMove:t=>{e.set({x:t.target.x(),y:t.target.y()})},onDragEnd:t=>{e.set({x:t.target.x(),y:t.target.y()})},id:e.id,onDblClick:()=>{e.contentEditable&&d(!0)},onDblTap:()=>{e.contentEditable&&d(!0)},onTransformStart:t=>{a(!0),g.current=e.height},onTransform:t=>{let n=t.target,r=(n.getStage()?.findOne("Transformer")).getActiveAnchor(),i=n.scaleX();if("middle-left"===r||"middle-right"===r){let t=n.scaleX(),r=Math.max(n.width()*t,e.fontSize);if(n.width(r),n.scaleX(1),ix.textVerticalResizeEnabled){let t=Math.max(k,g.current);e.set({height:t})}e.set({width:r,x:n.x(),y:n.y()})}else if("top-center"===r||"bottom-center"===r){let r=Math.max("resize"===ix.textOverflow?k:e.lineHeight*e.fontSize,t.target.height()*t.target.scaleY());n.scaleY(1),e.set({x:n.x(),y:n.y(),height:r,rotation:n.rotation()})}else n.scaleX(1),n.scaleY(1),e.set({fontSize:e.fontSize*i,width:n.width()*i,x:n.x(),y:n.y(),rotation:n.rotation(),height:n.height()*i})},onTransformEnd:t=>{a(!1),u(!0);let n=t.target.scaleX();t.target.scaleX(1),t.target.scaleY(1),e.set({fontSize:e.fontSize*n,width:t.target.width()*n,x:t.target.x(),y:t.target.y(),rotation:t.target.rotation()})}}),(0,p.jsx)(rK,{ref:n,image:r,x:e.x,y:e.y,offsetX:b,offsetY:b-j,listening:!1,rotation:e.rotation,width:e.width+2*b,height:e.height+2*b,visible:!N,opacity:c?0:e.opacity,shadowEnabled:e.shadowEnabled,shadowBlur:e.shadowBlur,shadowOffsetX:e.shadowOffsetX,shadowOffsetY:e.shadowOffsetY,shadowColor:e.shadowColor,shadowOpacity:e.shadowOpacity,hideInExport:!e.showInExport}),N&&(0,p.jsx)(rq,{x:e.x,y:e.y,rotation:e.rotation,offsetY:-j,children:(0,p.jsx)(r3,{divProps:{style:{pointerEvents:"none"}},children:(0,p.jsx)(ar,{dangerouslySetInnerHTML:{__html:C},style:{pointerEvents:"none",display:"inline-block"}})})}),c&&(0,p.jsx)(rq,{x:e.x,y:e.y,rotation:e.rotation,offsetY:-j,children:(0,p.jsx)(r3,{children:(0,p.jsx)(ai,{html:C,element:e,onChange:t=>{e.set({text:t})},onBlur:e=>{d(!1)}})})}),(m||h)&&(0,p.jsx)(iA,{element:e})]})});var v=(h("8NFma"),h("8NFma"));function au(e,t,n,r,i){let o=Math.sqrt(n*n+r*r);return{x:e+o*Math.cos(i+=Math.atan2(r,n)),y:t+o*Math.sin(i)}}function ac(e){let{x:t,y:n,width:r,height:i}=e,o=l(A).Util.degToRad(e.rotation),a=au(t,n,0,0,o),s=au(t,n,r,0,o),u=au(t,n,r,i,o),c=au(t,n,0,i,o),d=Math.min(a.x,s.x,u.x,c.x),h=Math.min(a.y,s.y,u.y,c.y),f=Math.max(a.x,s.x,u.x,c.x),p=Math.max(a.y,s.y,u.y,c.y);return{x:d,y:h,width:f-d,height:p-h,minX:d,minY:h,maxX:f,maxY:p}}function ad(e){let t=e.map(e=>ac(e)),n=Math.min(...t.map(e=>e.minX)),r=Math.min(...t.map(e=>e.minY)),i=Math.max(...t.map(e=>e.maxX)),o=Math.max(...t.map(e=>e.maxY));return{x:n,y:r,width:i-n,height:o-r,minX:n,minY:r,maxX:i,maxY:o}}function ah(e,t){var n=[],r=[];e.vertical.forEach(e=>{t.vertical.forEach(t=>{var r=Math.abs(e-t.guide);r<5&&n.push({lineGuide:e,diff:r,snap:t.snap,offset:t.offset})})}),e.horizontal.forEach(e=>{t.horizontal.forEach(t=>{var n=Math.abs(e-t.guide);n<5&&r.push({lineGuide:e,diff:n,snap:t.snap,offset:t.offset})})});var i=[];let o=n.sort((e,t)=>e.diff-t.diff),a=r.sort((e,t)=>e.diff-t.diff);var l=o[0],s=a[0];return l&&o.filter(e=>.1>Math.abs(e.diff-l.diff)).forEach(e=>{i.push({orientation:"V",...e})}),s&&a.filter(e=>.1>Math.abs(e.diff-s.diff)).forEach(e=>{i.push({orientation:"H",...e})}),i}function af(e,t,n){let r=e=>e.hasName("element")||e.hasName("line-anchor")||e.hasName("page-background")||e.hasName("elements-area"),i=n=>{n.target.getLayer().children.find(e=>"line-guides"===e.name()).destroyChildren();var i,o=ah(function(t){let n=e.current?.getStage();var i=[],o=[];return n.find(r).forEach(e=>{if(!(t.indexOf(e)>=0)){var n=e.getClientRect({skipShadow:!0,skipStroke:!0});e.hasName("line-anchor")&&(n={x:e.absolutePosition().x,y:e.absolutePosition().y,width:0,height:0}),i.push(n.x,n.x+n.width,n.x+n.width/2),o.push(n.y,n.y+n.height,n.y+n.height/2)}}),{vertical:i,horizontal:o}}([n.target,...t.map(e=>e.current)]),{vertical:[{guide:(i=n.target).absolutePosition().x,offset:0,snap:"center"}],horizontal:[{guide:i.absolutePosition().y,offset:0,snap:"center"}]});if(!o.length)return;!function(t){let n=e.current?.getLayer(),r=n?.children.find(e=>"line-guides"===e.name());t.forEach(e=>{if("H"===e.orientation){var t=new(l(A)).Line({points:[-6e3,e.lineGuide,6e3,e.lineGuide],stroke:"rgb(0, 161, 255)",strokeWidth:1,name:"guid-line",dash:[4,6]});r?.add(t),n.batchDraw()}else if("V"===e.orientation){var t=new(l(A)).Line({points:[e.lineGuide,-6e3,e.lineGuide,6e3],stroke:"rgb(0, 161, 255)",strokeWidth:1,name:"guid-line",dash:[4,6]});r?.add(t)}})}(o);let a=n.target.getAbsolutePosition(),s={...a};o.forEach(e=>{switch(e.snap){case"start":case"center":case"end":switch(e.orientation){case"V":s.x=e.lineGuide+e.offset;break;case"H":s.y=e.lineGuide+e.offset}}});let u=s.x-a.x,c=s.y-a.y;if(!(n.evt.ctrlKey||n.evt.metaKey)){let e=n.target.getAbsolutePosition();n.target.absolutePosition({x:e.x+u,y:e.y+c})}},o=e=>{if(!e.target)return;let t=e.target.getLayer();t.children.find(e=>"line-guides"===e.name()).destroyChildren(),t.batchDraw()};l(v).useEffect(()=>{e.current&&(e.current.on("dragmove",i),e.current.on("dragend",o))},n)}function ap(e){let{x:t,y:n,width:r,height:i,rotation:o}=e.a,a=o*Math.PI/180,l={x:t+i/2*Math.cos(a+Math.PI/2),y:n+i/2*Math.sin(a+Math.PI/2)},s={x:l.x+r*Math.cos(a),y:l.y+r*Math.sin(a)};return{middleLeft:l,middleRight:s}}function ag(e,t,n){let r=Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2)),i=Math.atan2(t.y-e.y,t.x-e.x),o=180*i/Math.PI;return{x:e.x+Math.cos(i-Math.PI/2)*n/2,y:e.y+Math.sin(i-Math.PI/2)*n/2,width:r,height:n,rotation:o}}let am=(e,t)=>({offsetX:5/e,offsetY:5/e,width:10/e,height:10/e,fill:"white",stroke:"rgb(0, 161, 255)",strokeWidth:2,strokeScaleEnabled:!1,draggable:!0,dragDistance:0,onMouseEnter:e=>{e.target.getStage().container().style.cursor="crosshair"},onMouseLeave:e=>{e.target.getStage().container().style.cursor=""},onDragStart:e=>{t.history.startTransaction()},onDragEnd:e=>{t.history.endTransaction()}}),av=P(({element:e,type:t})=>{let n={strokeWidth:e.height,stroke:e.a.color,lineCap:"round",lineJoin:"round",fill:e.a.color,opacity:e.a.opacity,hideInExport:!e.showInExport};return(0,p.jsxs)(p.Fragment,{children:["arrow"===t&&(0,p.jsx)(r$,{points:[3*e.height,-(2*e.height),0,0,3*e.height,2*e.height],...n}),"triangle"===t&&(0,p.jsx)(r$,{points:[3*e.height,-(2*e.height),0,0,3*e.height,2*e.height],closed:!0,...n}),"bar"===t&&(0,p.jsx)(r$,{points:[0,-(2*e.height),0,2*e.height],closed:!0,...n}),"square"===t&&(0,p.jsx)(r$,{points:[0,-(2*e.height),4*e.height,-(2*e.height),4*e.height,2*e.height,0,2*e.height],closed:!0,...n}),"circle"===t&&(0,p.jsx)("Circle",{x:2*e.height,y:0,radius:2*e.height,...n})]})}),ay=P(({element:e,store:t})=>{let n=l(v).useRef(null),r=l(v).useRef(null),i=l(v).useRef(null),o=e.selectable||"admin"===t.role,a=iR(),[s,u]=l(v).useState(!1),c=t.selectedElements.indexOf(e)>=0&&1===t.selectedElements.length,{middleLeft:d,middleRight:h}=ap(e);return af(r,[n],[c]),af(i,[n],[c]),(0,p.jsxs)(l(v).Fragment,{children:[(0,p.jsx)(r$,{ref:n,name:"element",id:e.id,x:e.a.x,y:e.a.y,points:[0,0,e.a.width,0],offsetY:-e.a.height/2,strokeWidth:e.a.height,hitStrokeWidth:Math.max(e.a.height,20),dash:e.dash.map(t=>t*e.a.height),stroke:e.a.color,rotation:e.a.rotation,opacity:e.animated("opacity"),shadowEnabled:e.shadowEnabled,shadowBlur:e.shadowBlur,shadowOffsetX:e.shadowOffsetX,shadowOffsetY:e.shadowOffsetY,shadowColor:e.shadowColor,shadowOpacity:e.shadowOpacity,listening:o,draggable:a?e.draggable&&c:e.draggable,preventDefault:!a||c,hideInExport:!e.showInExport,onMouseEnter:()=>{u(!0)},onMouseLeave:()=>{u(!1)},onDragMove:t=>{e.set({x:t.target.x(),y:t.target.y()})},onDragEnd:t=>{e.set({x:t.target.x(),y:t.target.y()})},onTransform:t=>{let n=t.target.scaleX();t.target.scaleX(1),t.target.scaleY(1),e.set({height:e.height*n,width:e.width*n,x:t.target.x(),y:t.target.y(),rotation:t.target.rotation()})}}),(0,p.jsx)(rq,{x:d.x,y:d.y,rotation:e.rotation,hideInExport:!e.showInExport,children:(0,p.jsx)(av,{element:e,type:e.startHead})}),(0,p.jsx)(rq,{x:h.x,y:h.y,rotation:e.rotation+180,children:(0,p.jsx)(av,{element:e,type:e.endHead})}),s&&!c&&(0,p.jsx)(iA,{element:e}),c&&e.resizable&&(0,p.jsx)(r5,{selector:".page-abs-container",enabled:!0,children:(0,p.jsxs)(rq,{visible:c,children:[(0,p.jsx)(rW,{x:d.x,y:d.y,ref:r,name:"line-anchor",...am(t.scale,t),onDragMove:t=>{let n=ag(t.target.position(),h,e.height);e.set({x:n.x,y:n.y,width:n.width,rotation:n.rotation})}}),(0,p.jsx)(rW,{x:h.x,y:h.y,ref:i,name:"line-anchor",...am(t.scale,t),onDragMove:t=>{let n=ag(d,t.target.position(),e.height);e.set({x:n.x,y:n.y,width:n.width,rotation:n.rotation})}})]})})]})});var v=h("8NFma"),y=h("2SBKn");function ab(){return document.createElement("canvas")}async function aw(e){return e.indexOf("data:image/svg+xml")>=0||e.indexOf(".svg")>=0?iY(iZ(await iK(e))):e}let ax=e=>{let[t,n]=l(v).useState(e);return l(v).useEffect(()=>{(async()=>{let r=await aw(e);r!==t&&n(r)})()},[e]),t},a_=new window.Image;a_.src=iY(`
|
|
84
|
+
`,ai=({html:e,onBlur:t,onChange:n,element:r})=>{let i=l(v).useRef(null);l(v).useEffect(()=>{if(!i.current)return;let e=new(l(ol))(i.current,{toolbar:!1,keyboard:!1,clipboard:{matchVisual:!1},formats:["background","bold","color","font","italic","size","strike","underline","indent","align","direction"]});return an.editor.instance=e,window.__polotnoQuill=e,e.on("text-change",()=>{e.getSelection()&&(an.currentFormat=e.getFormat()),setTimeout(()=>{n(i.current?.childNodes[0].innerHTML)},10)}),e.setSelection(0,0,"api"),e.on("selection-change",n=>{n||t(),n&&(an.currentFormat=e.getFormat())}),i.current.childNodes[0].addEventListener("blur",e=>{e.relatedTarget?.classList.contains("ql-clipboard")||t()}),()=>{an.editor.instance=null,an.currentFormat={},delete window.__polotnoQuill}},[]),l(v).useEffect(()=>{let t=an.editor.instance;if(!t)return;let n=t.getSelection();if(i.current?.childNodes[0].innerHTML!==r.text){var o=t.clipboard.convert("<div class='ql-editor' style='outline: none;'>"+e+"<p><br></p></div>");t.setContents(o),t.history.clear(),n&&(t.setSelection(n.index,n.length),an.currentFormat=t.getFormat())}},[r.text]);let o=ia(r).fill;return(0,p.jsx)(ar,{ref:i,style:{fontSize:r.fontSize,color:o,width:r.width,fontFamily:r.fontFamily,lineHeight:r.lineHeight,letterSpacing:r.letterSpacing+"rem",textAlign:r.align},dir:iD(iP(r.text))})};function ao(e,{fontFamily:t="",color:n="black"}={}){let r=`color: ${n||e.fill}`;return`<div style="white-space: unset; width: ${Math.round(e.width||100)}px; ${r}; font-size: ${e.fontSize}px; font-family: '${t}'; text-decoration: ${e.textDecoration}; text-align: ${e.align}; line-height: ${e.lineHeight}; letter-spacing: ${e.letterSpacing}rem; font-style: ${e.fontStyle}; font-weight: ${e.fontWeight}; -webkit-text-stroke: ${e.strokeWidth}px ${e.stroke};" contentEditable dir="${iD(iP(e.text))}">${e.text}</div>`}let aa=e=>{let t=e.fontSize;for(let n=1;n<50;n++){let{height:n}=oJ(ao({...e.toJSON(),fontSize:t},{fontFamily:e.fontFamily}));if(!(e.height&&n>e.height))break;t-=.5}return t},al=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),as=P(({element:e,store:t})=>{let n=l(v).useRef(null),[r,i]=l(v).useState(),[o,a]=l(v).useState(!1),[s,u]=l(v).useState(!0),[c,d]=l(v).useState(!1),[h,f]=l(v).useState(!1),g=l(v).useRef(e.height),m=t.selectedElements.indexOf(e)>=0,b=e.fontSize/3,{textVerticalResizeEnabled:w}=ik,x=iH(e.fontFamily),[_]=iB(t,e.fontFamily);is(n);let E=_?e.fontFamily:x!==e.fontFamily?x:"Arial",S=ia(e).fill,C=ao(e,{fontFamily:E,color:S}),{width:O,height:k}=l(v).useMemo(()=>oJ(C),[C,e.width,_]);l(v).useEffect(()=>{if(!_)return;if(!e.height){e.set({height:k});return}let{textOverflow:n}=ik;if("change-font-size"!==n||o)"resize"!==n||(w&&e.height<k&&t.history.ignore(()=>{e.set({height:k})}),w||e.height===k||t.history.ignore(()=>{e.set({height:k})}));else{let n=aa(e);n!==e.fontSize?t.history.ignore(()=>{e.set({fontSize:n})}):e.height===k||(w&&e.height<k?t.history.ignore(()=>{e.set({height:k})}):w||t.history.ignore(()=>{e.set({height:k})}))}});let P=l(v).useRef(0),T=async()=>{P.current++;let n=P.current,r=id(`text ${e.id}`);u(!0);let o=null,a=al?5:1;for(let i=0;i<a;i++){if(o=await o0({html:C,width:e.width||1,height:e.height||k||1,fontFamily:E,padding:b,pixelRatio:t._elementsPixelRatio,font:t.fonts.find(e=>e.fontFamily===E)||ib.find(e=>e.fontFamily===E)}),n!==P.current){r();return}if(!function(e){let t=e.getContext("2d").getImageData(0,0,e.width,e.height).data;for(let e=0;e<t.length;e+=4)if(0!==t[e+3])return!0;return!1}(o)&&al){await new Promise(e=>setTimeout(e,50*(i+1)));continue}}if(!o){r();return}i(o),u(!1),l(A).Util.requestAnimFrame(r)};l(v).useEffect(()=>{o||c||T()},[C,o,k,c,E,e.height,t._elementsPixelRatio]);let N=o||s;l(v).useEffect(()=>y.autorun(()=>{iT(n.current,e)}),[r,N,e.shadowColor,e.shadowOffsetX,e.shadowOffsetY,e.shadowOpacity]);let j=0;"middle"===e.verticalAlign&&(j=(e.height-k)/2),"bottom"===e.verticalAlign&&(j=e.height-k);let R=iU({fontLoaded:_,fontFamily:e.fontFamily,fontSize:e.fontSize,lineHeight:e.lineHeight}),I=iI();return(0,p.jsxs)(l(v).Fragment,{children:[(0,p.jsx)(rW,{x:e.x,y:e.y,offsetX:e.backgroundPadding*(e.fontSize*R*.5),offsetY:e.backgroundPadding*(e.fontSize*R*.5),rotation:e.rotation,hideInExport:!e.showInExport||!e.text,listening:!1,visible:e.backgroundEnabled,opacity:e.backgroundOpacity,fill:e.backgroundColor,width:e.width+e.backgroundPadding*(e.fontSize*R),height:e.height+e.backgroundPadding*(e.fontSize*R),cornerRadius:e.backgroundCornerRadius*(e.fontSize*R*.5)}),(0,p.jsx)(rW,{ref:n,name:"element",x:e.x,y:e.y,listening:e.selectable,rotation:e.rotation,width:e.width,height:e.height,visible:!N,draggable:I?e.draggable&&m:e.draggable,preventDefault:!I||m,opacity:c?0:e.opacity,hideInExport:!e.showInExport,onMouseEnter:()=>{f(!0)},onMouseLeave:()=>{f(!1)},onDragMove:t=>{e.set({x:t.target.x(),y:t.target.y()})},onDragEnd:t=>{e.set({x:t.target.x(),y:t.target.y()})},id:e.id,onDblClick:()=>{e.contentEditable&&d(!0)},onDblTap:()=>{e.contentEditable&&d(!0)},onTransformStart:t=>{a(!0),g.current=e.height},onTransform:t=>{let n=t.target,r=(n.getStage()?.findOne("Transformer")).getActiveAnchor(),i=n.scaleX();if("middle-left"===r||"middle-right"===r){let t=n.scaleX(),r=Math.max(n.width()*t,e.fontSize);if(n.width(r),n.scaleX(1),ik.textVerticalResizeEnabled){let t=Math.max(k,g.current);e.set({height:t})}e.set({width:r,x:n.x(),y:n.y()})}else if("top-center"===r||"bottom-center"===r){let r=Math.max("resize"===ik.textOverflow?k:e.lineHeight*e.fontSize,t.target.height()*t.target.scaleY());n.scaleY(1),e.set({x:n.x(),y:n.y(),height:r,rotation:n.rotation()})}else n.scaleX(1),n.scaleY(1),e.set({fontSize:e.fontSize*i,width:n.width()*i,x:n.x(),y:n.y(),rotation:n.rotation(),height:n.height()*i})},onTransformEnd:t=>{a(!1),u(!0);let n=t.target.scaleX();t.target.scaleX(1),t.target.scaleY(1),e.set({fontSize:e.fontSize*n,width:t.target.width()*n,x:t.target.x(),y:t.target.y(),rotation:t.target.rotation()})}}),(0,p.jsx)(rK,{ref:n,image:r,x:e.x,y:e.y,offsetX:b,offsetY:b-j,listening:!1,rotation:e.rotation,width:e.width+2*b,height:e.height+2*b,visible:!N,opacity:c?0:e.opacity,shadowEnabled:e.shadowEnabled,shadowBlur:e.shadowBlur,shadowOffsetX:e.shadowOffsetX,shadowOffsetY:e.shadowOffsetY,shadowColor:e.shadowColor,shadowOpacity:e.shadowOpacity,hideInExport:!e.showInExport}),N&&(0,p.jsx)(rq,{x:e.x,y:e.y,rotation:e.rotation,offsetY:-j,children:(0,p.jsx)(r3,{divProps:{style:{pointerEvents:"none"}},children:(0,p.jsx)(ar,{dangerouslySetInnerHTML:{__html:C},style:{pointerEvents:"none",display:"inline-block"}})})}),c&&(0,p.jsx)(rq,{x:e.x,y:e.y,rotation:e.rotation,offsetY:-j,children:(0,p.jsx)(r3,{children:(0,p.jsx)(ai,{html:C,element:e,onChange:t=>{e.set({text:t})},onBlur:e=>{d(!1)}})})}),(m||h)&&(0,p.jsx)(iN,{element:e})]})});var v=(h("8NFma"),h("8NFma"));function au(e,t,n,r,i){let o=Math.sqrt(n*n+r*r);return{x:e+o*Math.cos(i+=Math.atan2(r,n)),y:t+o*Math.sin(i)}}function ac(e){let{x:t,y:n,width:r,height:i}=e,o=l(A).Util.degToRad(e.rotation),a=au(t,n,0,0,o),s=au(t,n,r,0,o),u=au(t,n,r,i,o),c=au(t,n,0,i,o),d=Math.min(a.x,s.x,u.x,c.x),h=Math.min(a.y,s.y,u.y,c.y),f=Math.max(a.x,s.x,u.x,c.x),p=Math.max(a.y,s.y,u.y,c.y);return{x:d,y:h,width:f-d,height:p-h,minX:d,minY:h,maxX:f,maxY:p}}function ad(e){let t=e.map(e=>ac(e)),n=Math.min(...t.map(e=>e.minX)),r=Math.min(...t.map(e=>e.minY)),i=Math.max(...t.map(e=>e.maxX)),o=Math.max(...t.map(e=>e.maxY));return{x:n,y:r,width:i-n,height:o-r,minX:n,minY:r,maxX:i,maxY:o}}function ah(e,t){var n=[],r=[];e.vertical.forEach(e=>{t.vertical.forEach(t=>{var r=Math.abs(e-t.guide);r<5&&n.push({lineGuide:e,diff:r,snap:t.snap,offset:t.offset})})}),e.horizontal.forEach(e=>{t.horizontal.forEach(t=>{var n=Math.abs(e-t.guide);n<5&&r.push({lineGuide:e,diff:n,snap:t.snap,offset:t.offset})})});var i=[];let o=n.sort((e,t)=>e.diff-t.diff),a=r.sort((e,t)=>e.diff-t.diff);var l=o[0],s=a[0];return l&&o.filter(e=>.1>Math.abs(e.diff-l.diff)).forEach(e=>{i.push({orientation:"V",...e})}),s&&a.filter(e=>.1>Math.abs(e.diff-s.diff)).forEach(e=>{i.push({orientation:"H",...e})}),i}function af(e,t,n){let r=e=>e.hasName("element")||e.hasName("line-anchor")||e.hasName("page-background")||e.hasName("elements-area"),i=n=>{n.target.getLayer().children.find(e=>"line-guides"===e.name()).destroyChildren();var i,o=ah(function(t){let n=e.current?.getStage();var i=[],o=[];return n.find(r).forEach(e=>{if(!(t.indexOf(e)>=0)){var n=e.getClientRect({skipShadow:!0,skipStroke:!0});e.hasName("line-anchor")&&(n={x:e.absolutePosition().x,y:e.absolutePosition().y,width:0,height:0}),i.push(n.x,n.x+n.width,n.x+n.width/2),o.push(n.y,n.y+n.height,n.y+n.height/2)}}),{vertical:i,horizontal:o}}([n.target,...t.map(e=>e.current)]),{vertical:[{guide:(i=n.target).absolutePosition().x,offset:0,snap:"center"}],horizontal:[{guide:i.absolutePosition().y,offset:0,snap:"center"}]});if(!o.length)return;!function(t){let n=e.current?.getLayer(),r=n?.children.find(e=>"line-guides"===e.name());t.forEach(e=>{if("H"===e.orientation){var t=new(l(A)).Line({points:[-6e3,e.lineGuide,6e3,e.lineGuide],stroke:"rgb(0, 161, 255)",strokeWidth:1,name:"guid-line",dash:[4,6]});r?.add(t),n.batchDraw()}else if("V"===e.orientation){var t=new(l(A)).Line({points:[e.lineGuide,-6e3,e.lineGuide,6e3],stroke:"rgb(0, 161, 255)",strokeWidth:1,name:"guid-line",dash:[4,6]});r?.add(t)}})}(o);let a=n.target.getAbsolutePosition(),s={...a};o.forEach(e=>{switch(e.snap){case"start":case"center":case"end":switch(e.orientation){case"V":s.x=e.lineGuide+e.offset;break;case"H":s.y=e.lineGuide+e.offset}}});let u=s.x-a.x,c=s.y-a.y;if(!(n.evt.ctrlKey||n.evt.metaKey)){let e=n.target.getAbsolutePosition();n.target.absolutePosition({x:e.x+u,y:e.y+c})}},o=e=>{if(!e.target)return;let t=e.target.getLayer();t.children.find(e=>"line-guides"===e.name()).destroyChildren(),t.batchDraw()};l(v).useEffect(()=>{e.current&&(e.current.on("dragmove",i),e.current.on("dragend",o))},n)}function ap(e){let{x:t,y:n,width:r,height:i,rotation:o}=e.a,a=o*Math.PI/180,l={x:t+i/2*Math.cos(a+Math.PI/2),y:n+i/2*Math.sin(a+Math.PI/2)},s={x:l.x+r*Math.cos(a),y:l.y+r*Math.sin(a)};return{middleLeft:l,middleRight:s}}function ag(e,t,n){let r=Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2)),i=Math.atan2(t.y-e.y,t.x-e.x),o=180*i/Math.PI;return{x:e.x+Math.cos(i-Math.PI/2)*n/2,y:e.y+Math.sin(i-Math.PI/2)*n/2,width:r,height:n,rotation:o}}let am=(e,t)=>({offsetX:5/e,offsetY:5/e,width:10/e,height:10/e,fill:"white",stroke:"rgb(0, 161, 255)",strokeWidth:2,strokeScaleEnabled:!1,draggable:!0,dragDistance:0,onMouseEnter:e=>{e.target.getStage().container().style.cursor="crosshair"},onMouseLeave:e=>{e.target.getStage().container().style.cursor=""},onDragStart:e=>{t.history.startTransaction()},onDragEnd:e=>{t.history.endTransaction()}}),av=P(({element:e,type:t})=>{let n=ia(e,e.a.color,"fill"),r=ia(e,e.a.color,"stroke"),i={strokeWidth:e.height,lineCap:"round",lineJoin:"round",...r,...n,opacity:e.a.opacity,hideInExport:!e.showInExport};return(0,p.jsxs)(p.Fragment,{children:["arrow"===t&&(0,p.jsx)(r$,{points:[3*e.height,-(2*e.height),0,0,3*e.height,2*e.height],...i}),"triangle"===t&&(0,p.jsx)(r$,{points:[3*e.height,-(2*e.height),0,0,3*e.height,2*e.height],closed:!0,...i}),"bar"===t&&(0,p.jsx)(r$,{points:[0,-(2*e.height),0,2*e.height],closed:!0,...i}),"square"===t&&(0,p.jsx)(r$,{points:[0,-(2*e.height),4*e.height,-(2*e.height),4*e.height,2*e.height,0,2*e.height],closed:!0,...i}),"circle"===t&&(0,p.jsx)("Circle",{x:2*e.height,y:0,radius:2*e.height,...i})]})}),ay=P(({element:e,store:t})=>{let n=l(v).useRef(null),r=l(v).useRef(null),i=l(v).useRef(null),o=e.selectable||"admin"===t.role,a=iI(),[s,u]=l(v).useState(!1),c=t.selectedElements.indexOf(e)>=0&&1===t.selectedElements.length,{middleLeft:d,middleRight:h}=ap(e);af(r,[n],[c]),af(i,[n],[c]);let f=ia(e,e.a.color,"stroke");return(0,p.jsxs)(l(v).Fragment,{children:[(0,p.jsx)(r$,{ref:n,name:"element",id:e.id,x:e.a.x,y:e.a.y,points:[0,0,e.a.width,0],offsetY:-e.a.height/2,strokeWidth:e.a.height,hitStrokeWidth:Math.max(e.a.height,20),dash:e.dash.map(t=>t*e.a.height),...f,rotation:e.a.rotation,opacity:e.animated("opacity"),shadowEnabled:e.shadowEnabled,shadowBlur:e.shadowBlur,shadowOffsetX:e.shadowOffsetX,shadowOffsetY:e.shadowOffsetY,shadowColor:e.shadowColor,shadowOpacity:e.shadowOpacity,listening:o,draggable:a?e.draggable&&c:e.draggable,preventDefault:!a||c,hideInExport:!e.showInExport,onMouseEnter:()=>{u(!0)},onMouseLeave:()=>{u(!1)},onDragMove:t=>{e.set({x:t.target.x(),y:t.target.y()})},onDragEnd:t=>{e.set({x:t.target.x(),y:t.target.y()})},onTransform:t=>{let n=t.target.scaleX();t.target.scaleX(1),t.target.scaleY(1),e.set({height:e.height*n,width:e.width*n,x:t.target.x(),y:t.target.y(),rotation:t.target.rotation()})}}),(0,p.jsx)(rq,{x:d.x,y:d.y,rotation:e.rotation,hideInExport:!e.showInExport,children:(0,p.jsx)(av,{element:e,type:e.startHead})}),(0,p.jsx)(rq,{x:h.x,y:h.y,rotation:e.rotation+180,children:(0,p.jsx)(av,{element:e,type:e.endHead})}),s&&!c&&(0,p.jsx)(iN,{element:e}),c&&e.resizable&&(0,p.jsx)(r5,{selector:".page-abs-container",enabled:!0,children:(0,p.jsxs)(rq,{visible:c,children:[(0,p.jsx)(rW,{x:d.x,y:d.y,ref:r,name:"line-anchor",...am(t.scale,t),onDragMove:t=>{let n=ag(t.target.position(),h,e.height);e.set({x:n.x,y:n.y,width:n.width,rotation:n.rotation})}}),(0,p.jsx)(rW,{x:h.x,y:h.y,ref:i,name:"line-anchor",...am(t.scale,t),onDragMove:t=>{let n=ag(d,t.target.position(),e.height);e.set({x:n.x,y:n.y,width:n.width,rotation:n.rotation})}})]})})]})});var v=h("8NFma"),y=h("2SBKn");function ab(){return document.createElement("canvas")}async function aw(e){return e.indexOf("data:image/svg+xml")>=0||e.indexOf(".svg")>=0?iY(iZ(await iK(e))):e}let ax=e=>{let[t,n]=l(v).useState(e);return l(v).useEffect(()=>{(async()=>{let r=await aw(e);r!==t&&n(r)})()},[e]),t},a_=new window.Image;a_.src=iY(`
|
|
85
85
|
<svg width="800px" height="800px" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
86
86
|
<path opacity="0.6" d="M4 5.49683V18.5032C4 20.05 5.68077 21.0113 7.01404 20.227L18.0694 13.7239C19.384 12.9506 19.384 11.0494 18.0694 10.2761L7.01404 3.77296C5.68077 2.98869 4 3.95 4 5.49683Z" fill="white"/>
|
|
87
87
|
<path d="M4 5.49683V18.5032C4 20.05 5.68077 21.0113 7.01404 20.227L18.0694 13.7239C19.384 12.9506 19.384 11.0494 18.0694 10.2761L7.01404 3.77296C5.68077 2.98869 4 3.95 4 5.49683Z" stroke="#323232" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
@@ -93,7 +93,7 @@ For more info see: https://github.com/konvajs/react-konva/issues/194
|
|
|
93
93
|
<path d="M14 19L14 5C14 3.89543 14.8954 3 16 3L17 3C18.1046 3 19 3.89543 19 5L19 19C19 20.1046 18.1046 21 17 21L16 21C14.8954 21 14 20.1046 14 19Z" stroke="#323232" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
94
94
|
<path d="M10 19L10 5C10 3.89543 9.10457 3 8 3L7 3C5.89543 3 5 3.89543 5 5L5 19C5 20.1046 5.89543 21 7 21L8 21C9.10457 21 10 20.1046 10 19Z" stroke="#323232" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
95
95
|
</svg>
|
|
96
|
-
`);let aS=(e,t,n,r,i=0,o=!1)=>{let a=Math.floor(Math.max(e.width*r,1)),s=Math.floor(Math.max(e.height*r,1)),u=Math.min(i*r,a/2,s/2),c=Math.max(e.width/n.width,e.height/n.height)*r,d=e.page._exporting&&ix.imageDownScalingEnabled&&c<1&&!o,h=0===n.x&&0===n.y&&n.width===t?.width&&n.height===t?.height,f=l(v).useMemo(()=>{if(!t||!t.width||!t.height)return;let e=0===u,n=!d;if(!h||!e||!n)return ab()},[t,u,d,h]);return l(v).useLayoutEffect(()=>{if(!f||!t)return;f.width=a,f.height=s;let e=f.getContext("2d");if(!e)return;u&&(e.beginPath(),e.moveTo(u,0),e.lineTo(a-u,0),e.arc(a-u,u,u,3*Math.PI/2,0,!1),e.lineTo(a,s-u),e.arc(a-u,s-u,u,0,Math.PI/2,!1),e.lineTo(u,s),e.arc(u,s-u,u,Math.PI/2,Math.PI,!1),e.lineTo(0,u),e.arc(u,u,u,Math.PI,3*Math.PI/2,!1),e.clip());let r=d?function(e,t){let n=ab();n.width=e.width,n.height=e.height,n.getContext("2d")?.drawImage(e,0,0,n.width,n.height);let r=function(e,t,n,r,i,o,a){for(var l=new ImageData(t,n),s=new Int32Array(e.data.buffer),u=e.width,c=new Int32Array(l.data.buffer),d=l.width,h=t/o,f=n/a,p=Math.round(1/h),g=Math.round(1/f),m=p*g,v=0;v<l.height;v++)for(var y=0;y<d;y++){for(var b=0+Math.round(y/h)+(0+Math.round(v/f))*u,w=0,x=0,_=0,E=0,S=0;S<g;S++)for(var C=0;C<p;C++){var O=s[b+C+S*u];w+=O<<24>>>24,x+=O<<16>>>24,_+=O<<8>>>24,E+=O>>>24}w=Math.round(w/m),x=Math.round(x/m),_=Math.round(_/m),E=Math.round(E/m),c[y+v*d]=E<<24|_<<16|x<<8|w}return l}(n.getContext("2d").getImageData(0,0,n.width,n.height),Math.floor(n.width*t),Math.floor(n.height*t),0,0,n.width,n.height);return n.width=Math.floor(n.width*t),n.height=Math.floor(n.height*t),n.getContext("2d")?.putImageData(r,0,0),n}(t,c):t,i=d?{x:Math.floor(n.x*c),y:Math.floor(n.y*c),width:Math.floor(n.width*c),height:Math.floor(n.height*c)}:n;e.drawImage(r,i.x,i.y,i.width,i.height,0,0,f.width,f.height)},[f,e.width,e.height,n.x,n.y,n.width,n.height,i,r,o,e.page._exporting,d]),l(v).useEffect(()=>()=>{f&&"CANVAS"===f.nodeName&&l(A).Util.releaseCanvas(f)},[f]),f||t},aC=(e,t,n,r)=>{let[i,o]=aT(ax(e.clipSrc||""),"anonymous");aA(e.clipSrc?o:"loaded",e.id+"-clip");let a=l(v).useMemo(()=>{if(t&&i)return ab()},[t,i]);return l(v).useLayoutEffect(()=>{if(!i||!t||!t.width||!t.height||!i||!i.width||!i.height||!a)return;let r=ab(),o=Math.max(e.width/i.width*n,e.height/i.height*n);r.width=i.width*o,r.height=i.height*o,r.getContext("2d")?.drawImage(i,0,0,r.width,r.height),a.width=Math.max(t.width,1),a.height=Math.max(t.height,1);let s=a.getContext("2d");s&&(s.save(),s.drawImage(r,0,0,t.width,t.height),l(A).Util.releaseCanvas(r),s.globalCompositeOperation="source-in",s.drawImage(t,0,0,a.width,a.height),s.restore())},[a,t,i,e.width,e.height,n,...r]),e.clipSrc&&i?a:t},aO=ab(),ak=P(({element:e})=>{let t=Math.min(30,e.width/4,e.height/4),n=l(v).useRef(null);return l(v).useEffect(()=>{let e=n.current;if(!e)return;let t=new(l(A)).Animation(t=>{e.rotate((t?.timeDiff||0)/2)},e.getLayer());return t.start(),()=>{t.stop()}}),(0,p.jsxs)(rq,{x:e.x,y:e.y,rotation:e.rotation,listening:!1,opacity:e.a.opacity,hideInExport:!e.showInExport,children:[(0,p.jsx)(rW,{width:e.width,height:e.height,fill:"rgba(124, 173, 212, 0.8)"}),(0,p.jsx)("Arc",{ref:n,x:e.width/2,y:e.height/2,fill:"white",outerRadius:Math.abs(t),innerRadius:Math.max(1,t-5),angle:270})]})}),aP=P(({element:e})=>{let t="Can not load the video...",n=Math.max(10,Math.min(30,e.width/t.length));return(0,p.jsxs)(rq,{x:e.x,y:e.y,rotation:e.rotation,listening:!1,opacity:e.a.opacity,hideInExport:!e.showInExport,children:[(0,p.jsx)(rW,{width:e.width,height:e.height,fill:"rgba(223, 102, 102, 0.8)"}),(0,p.jsx)(rY,{text:t,fontSize:n,width:e.width,height:e.height,align:"center",fill:"white",verticalAlign:"middle",padding:5})]})}),aT=l(r0),aA=(e,t)=>{let n=l(v).useRef(),r=()=>{n.current?.(),n.current=void 0};l(v).useEffect(()=>r,[]),l(v).useLayoutEffect(()=>{"loading"!==e||n.current||(n.current=io(`video ${t}`)),"loading"!==e&&r(),"failed"===e&&is(`video ${t}`)},[e])},aN=P(({element:e,store:t})=>{let n,r;let[i,o]=l(v).useState(!1),a=l(v).useRef(null),s=l(v).useRef(null),[u,c]=l(v).useState(!1),d=t.selectedElements.indexOf(e)>=0,[h,f]=l(v).useState(!1),[g,m]=function(e,t,n){let r=l(v).useRef("loading"),i=l(v).useRef(),[o,a]=l(v).useState(0),s=l(v).useRef(),u=l(v).useRef(),c=l(v).useRef();return(s.current!==e||u.current!==t||c.current!==n)&&(r.current="loading",i.current=void 0,s.current=e,u.current=t,c.current=n),l(v).useLayoutEffect(function(){if(e){var o=document.createElement("video");return o.addEventListener("canplay",l),o.addEventListener("error",s),t&&(o.crossOrigin=t),n&&(o.referrerpolicy=n),o.src=e,function(){o.removeEventListener("canplay",l),o.removeEventListener("error",s)}}function l(){r.current="loaded",i.current=o,a(Math.random())}function s(e){r.current="failed",i.current=void 0,a(Math.random())}},[e,t,n]),[i.current,r.current]}(e.src,"anonymous");aA(m,e.id+"-video"),g&&(g.muted=!0,g.width=g.videoWidth,g.height=g.videoHeight);let b=g||aO;l(v).useEffect(()=>{g&&t.history.ignore(()=>{e.set({duration:1e3*g.duration})})},[g]),l(v).useEffect(()=>{if(!g)return;let n=t.isPlaying||h;if(!n){g.pause();return}n&&(g.currentTime=e.startTime*g.duration,g.play());let r=new(l(A)).Animation(()=>{},a.current?.getLayer());r.start();let i=()=>{f(!1),g.currentTime=e.startTime*g.duration},o=()=>{g.currentTime>=e.endTime*g.duration&&(g.pause(),g.currentTime=e.startTime*g.duration,f(!1))};return g.addEventListener("ended",i),g.addEventListener("timeupdate",o),()=>{r.stop(),g.removeEventListener("ended",i),g.removeEventListener("timeupdate",o)}},[g,h,t.isPlaying]),l(v).useEffect(()=>(0,y.autorun)(()=>{if(g){let n=(t.currentTime-e.page.startTime)%e.duration;g.currentTime=n/1e3,a.current?.getLayer()?.batchDraw()}}),[t,g]),l(v).useEffect(()=>{if(!g)return;let t=null,n=()=>{!function(e,t){for(var n=e.buffered,r=0;r<n.length;r++)if(t>=n.start(r)&&t<=n.end(r))return!0;return!1}(g,g.currentTime)&&(t&&console.error("finish already exists"),t=io(`video ${e.id}`))},r=()=>{t&&(t(),t=null)};return g.addEventListener("timeupdate",n),g.addEventListener("canplay",r),()=>{g.removeEventListener("timeupdate",n),g.removeEventListener("canplay",r)}},[g,e.id,io]);let{cropX:w,cropY:x,cropWidth:_,cropHeight:E}=e;"loaded"!==m&&(w=x=0,_=E=1);let S=b.width*_,C=b.height*E,O=e.width/e.height,k=S/C,P="svg"===e.type;P?(n=S,r=C):O>=k?(n=S,r=S/O):(n=C*O,r=C);let T={x:b.width*w,y:b.height*x,width:n,height:r},N=e.cornerRadius??0,j=aC(e,aS(e,b,T,t._elementsPixelRatio,N,i||e._cropModeEnabled||"svg"===e.type),t._elementsPixelRatio,[T,N,t._elementsPixelRatio]),R=Math.max(e.width/n,e.height/r);l(v).useEffect(()=>{if(!e._cropModeEnabled)return;let t=a.current?.getStage();function n(t){e._cropModeEnabled&&t.target!==s.current&&e.toggleCropMode(!1)}function r(n){e._cropModeEnabled&&n.target.parentNode!==t.content&&e.toggleCropMode(!1)}return document.body.addEventListener("click",r),t?.on("click",n),t?.on("tap",n),()=>{document.body.removeEventListener("click",r),document.body.removeEventListener("touchstart",r),t?.off("click",n),t?.off("click",n)}},[e._cropModeEnabled]),l(v).useLayoutEffect(()=>{if(!i&&!e._cropModeEnabled)return iP(a.current,e),(0,y.autorun)(()=>{iP(a.current,e)},{delay:100})},[b,i,_,E,e._cropModeEnabled]),l(v).useLayoutEffect(()=>{i||e._cropModeEnabled?a.current?.clearCache():iP(a.current,e)},[i,e.width,e.height,e._cropModeEnabled]),l(v).useEffect(()=>{iP(a.current,e)},[e.shadowEnabled,e.shadowBlur,e.cornerRadius,e.shadowColor,e.shadowOffsetX,e.shadowOffsetY,e.shadowOpacity]);let I=l(v).useRef(null),L=l(v).useRef(null),M=l(v).useRef(null);l(v).useLayoutEffect(()=>{e._cropModeEnabled&&(L.current.nodes([I.current]),M.current.nodes([s.current]))},[e._cropModeEnabled]);let D=t=>{Math.round(t.target.x())>0&&(t.target.x(0),t.target.scaleX(1)),Math.round(t.target.y())>0&&(t.target.y(0),t.target.scaleY(1));let i=t.target.width()*t.target.scaleX(),o=t.target.height()*t.target.scaleY(),a=Math.min(1,n/i),l=Math.min(1,r/o),s=Math.min(1-a,Math.max(0,Math.round(-t.target.x())/i)),u=Math.min(1-l,Math.max(0,Math.round(-t.target.y())/o));t.target.setAttrs({x:-s*b.width,y:-u*b.height,scaleX:1,scaleY:1}),e.set({cropX:s,cropY:u,cropWidth:a,cropHeight:l})},F=()=>{"svg"!==e.type&&e.contentEditable&&setTimeout(()=>{e.toggleCropMode(!0)})},z="loading"===m,B="failed"===m,U=!z&&!B,H=l(v).useRef({cropX:0,cropY:0,cropWidth:0,cropHeight:0}),V=U?e.a.opacity:0;it(a,V);let q=e.selectable||"admin"===t.role,G=iR();return(0,p.jsxs)(l(v).Fragment,{children:[z&&(0,p.jsx)(ak,{element:e}),B&&(0,p.jsx)(aP,{element:e}),(0,p.jsx)(rK,{ref:a,name:"element",id:e.id,image:b,x:e.x,y:e.y,width:e.width||1,height:e.height||1,rotation:e.rotation,opacity:V,shadowEnabled:e.shadowEnabled,shadowBlur:e.shadowBlur,shadowOffsetX:e.shadowOffsetX,shadowOffsetY:e.shadowOffsetY,shadowColor:e.shadowColor,shadowOpacity:e.shadowOpacity,customCrop:T,listening:q,cropX:T.x,cropY:T.y,cropWidth:T.width,cropHeight:T.height,draggable:G?e.draggable&&d:e.draggable,preventDefault:!G||d,hideInExport:!e.showInExport,onMouseEnter:()=>{c(!0)},onMouseLeave:()=>{c(!1)},onDragMove:t=>{e.set({x:t.target.x(),y:t.target.y()})},onDragEnd:t=>{e.set({x:t.target.x(),y:t.target.y()})},onDblClick:F,onDblTap:F,onTransformStart:()=>{o(!0),H.current={cropX:e.cropX,cropY:e.cropY,cropWidth:e.cropWidth,cropHeight:e.cropHeight}},onTransform:t=>{let i=t.currentTarget,o=1e-7>Math.abs(i.scaleX()-1)?1:i.scaleX(),a=1e-7>Math.abs(i.scaleY()-1)?1:i.scaleY();i.scaleX(1),i.scaleY(1);let l=t.target.getStage()?.findOne("Transformer"),s=Math.min(1-n/b.width,Math.max(0,e.cropX)),u=Math.min(1-r/b.height,Math.max(0,e.cropY)),c=l.getActiveAnchor(),d=!(c.indexOf("middle")>=0||c.indexOf("center")>=0),h=!d&&o<1&&H.current.cropHeight>r/b.height,f=d?e.cropWidth:e.cropWidth*o;h&&(f=e.cropWidth);let p=!d&&a<1&&H.current.cropWidth>n/b.width,g=d?e.cropHeight:e.cropHeight*a;p&&(g=e.cropHeight),P&&(f=e.cropWidth,g=e.cropHeight),e.set({cropX:s,cropY:u,x:i.x(),y:i.y(),width:i.width()*o,height:i.height()*a,rotation:t.target.rotation(),cropWidth:Math.min(f,1-s),cropHeight:Math.min(g,1-u)})},onTransformEnd:t=>{let i=t.currentTarget;e.set({width:i.width(),height:i.height(),x:i.x(),y:i.y(),rotation:t.target.rotation(),cropWidth:n/b.width,cropHeight:r/b.height}),o(!1)}}),(0,p.jsx)(rW,{x:e.x,y:e.y,width:Math.max(e.width-e.borderSize,0),height:Math.max(e.height-e.borderSize,0),opacity:V,offsetX:-e.borderSize/2,offsetY:-e.borderSize/2,stroke:e.borderColor,strokeWidth:e.borderSize,listening:!1,visible:!!e.borderSize,rotation:e.rotation,cornerRadius:Math.max(0,N-e.borderSize),hideInExport:!e.showInExport}),!h&&(0,p.jsx)(rK,{image:a_,x:e.x+e.width/2-15/t.scale,y:e.y+e.height/2-15/t.scale,width:30/t.scale,height:30/t.scale,hideInExport:!0,onClick:()=>{f(!0)}}),h&&(0,p.jsx)(rK,{image:aE,x:e.x+e.width/2-15/t.scale,y:e.y+e.height/2-15/t.scale,width:30/t.scale,height:30/t.scale,hideInExport:!0,onClick:()=>{f(!1)}}),e._cropModeEnabled&&(0,p.jsxs)(r5,{selector:".page-abs-container",enabled:!0,children:[(0,p.jsx)(rW,{x:-window.innerWidth/t.scale,y:-window.innerWidth/t.scale,width:window.innerWidth/t.scale*3,height:window.innerWidth/t.scale*3,fill:"rgba(0,0,0,0.3)"}),(0,p.jsx)(rK,{listening:!1,image:j,x:e.x,y:e.y,width:e.width,height:e.height,rotation:e.rotation,shadowEnabled:e.shadowEnabled,shadowBlur:e.shadowBlur}),(0,p.jsxs)(rq,{x:e.x,y:e.y,rotation:e.rotation,scaleX:R,scaleY:R,children:[(0,p.jsx)(rK,{image:b,ref:s,opacity:.4,draggable:!0,x:-e.cropX*b.width,y:-e.cropY*b.height,onDragMove:D,onTransform:D}),(0,p.jsx)(rZ,{ref:M,anchorSize:20,enabledAnchors:["top-left","top-right","bottom-left","bottom-right"],boundBoxFunc:(e,t)=>t.width<5||t.height<5?e:t,rotateEnabled:!1,borderEnabled:!1,anchorCornerRadius:10,anchorStrokeWidth:2,borderStrokeWidth:2}),(0,p.jsx)(rW,{width:n,height:r,ref:I,listening:!1,onTransform:t=>{t.target.x()<-e.cropX*b.width-1e-9&&(t.target.x(-e.cropX*b.width),t.target.scaleX(1)),t.target.y()<-e.cropY*b.height-1e-9&&(t.target.y(-e.cropY*b.height),t.target.scaleY(1));let n=Math.min(1,Math.max(0,e.cropX+t.target.x()/b.width)),r=Math.min(1,Math.max(0,t.target.y()/b.height+e.cropY)),i=t.target.width()*t.target.scaleX(),o=t.target.height()*t.target.scaleY(),a=Math.min(1-n,i/b.width),l=Math.min(1-r,o/b.height),s=t.target.getAbsolutePosition(t.target.getParent().getParent());t.target.scale({x:1,y:1}),t.target.position({x:0,y:0}),e.set({x:s.x,y:s.y,cropX:n,cropY:r,cropWidth:a,cropHeight:l,width:Math.min(i*R,b.width*(1-n)*R),height:Math.min(o*R,b.height*(1-r)*R)})}}),(0,p.jsx)(rZ,{ref:L,enabledAnchors:["top-left","top-right","bottom-left","bottom-right"],boundBoxFunc:(e,t)=>t.width<5||t.height<5?e:t,keepRatio:!1,rotateEnabled:!1,anchorFill:"rgb(240, 240, 240)",anchorStrokeWidth:2,borderStrokeWidth:2})]})]}),(u||d)&&(0,p.jsx)(iA,{element:e})]})});var v=h("8NFma");let aj=({width:e,height:t,cornerRadius:n})=>{if(n>0){let r=Math.min(n,e/2,t/2);return`M 0 ${r} A ${r} ${r} 0 0 1 ${r} 0 L ${e-r} 0 A ${r} ${r} 0 0 1 ${e} ${r} L ${e} ${t-r} A ${r} ${r} 0 0 1 ${e-r} ${t} L ${r} ${t} A ${r} ${r} 0 0 1 0 ${t-r} Z`}return`M 0 0 L ${e} 0 L ${e} ${t} L 0 ${t} Z`};function aR({path:e,aspectRatio:t,width:n,height:r}){return{path:e,scaleX:n/t.width,scaleY:r/t.height}}let aI={rect:aj,circle:({width:e,height:t})=>`M ${e/2} ${t/2} m -${e/2}, 0 a ${e/2},${t/2} 0 1,0 ${e},0 a ${e/2},${t/2} 0 1,0 -${e},0`,star:function({width:e,height:t}){let n=e/2,r=t/2,i=e/2,o=t/2,a=i/2,l=o/2,s="",u=Math.PI/5;for(let e=0;e<10;e++){let t=e%2==0?i:a,c=e%2==0?o:l,d=n+t*Math.sin(e*u),h=r-c*Math.cos(e*u);0===e?s=`M ${d} ${h}`:s+=` L ${d} ${h}`}return s+" Z"},triangle:({width:e,height:t})=>`M ${e/2} 0 L ${e} ${t} L 0 ${t} Z`,rightTriangle:({width:e,height:t})=>`M 0 0 L ${e} 0 L 0 ${t} Z`,diamond:function({width:e,height:t}){let n=e/2,r=t/2;return`M ${n} 0 L ${e} ${r} L ${n} ${t} L 0 ${r} Z`},pentagon:function({width:e,height:t}){let n=e/2,r=t/2,i=e/2,o=t/2,a="",l=2*Math.PI/5;for(let e=0;e<5;e++){let t=n+i*Math.sin(e*l),s=r-o*Math.cos(e*l);0===e?a=`M ${t} ${s}`:a+=` L ${t} ${s}`}return a+" Z"},hexagon:function({width:e,height:t}){let n=e/2,r=t/2,i=e/2,o=t/2,a="",l=2*Math.PI/6;for(let e=0;e<6;e++){let t=n+i*Math.sin(e*l),s=r-o*Math.cos(e*l);0===e?a=`M ${t} ${s}`:a+=` L ${t} ${s}`}return a+" Z"},speechBubble:function({width:e,height:t}){let n=.1*Math.min(e,t),r=.2*e,i=.2*t,o=.5*e;return`M ${n},0 H ${e-n} A ${n},${n} 0 0 1 ${e},${n} V ${t-n-i} A ${n},${n} 0 0 1 ${e-n},${t-i} H ${o+r/2} L ${o},${t} L ${o-r/2},${t-i} H ${n} A ${n},${n} 0 0 1 0,${t-n-i} V ${n} A ${n},${n} 0 0 1 ${n},0 Z`},cross:function({width:e,height:t}){let n=.3*e,r=.3*t,i=e/2,o=t/2,a=i-n/2,l=i+n/2,s=o-r/2,u=o+r/2;return`M ${a},0 H ${l} V ${s} H ${e} V ${u} H ${l} V ${t} H ${a} V ${u} H 0 V ${s} H ${a} V 0 Z`},arc:({width:e,height:t})=>aR({path:"M234 117C234 85.97 221.673 56.21 199.731 34.269C177.79 12.327 148.03 0 117 0C85.97 0 56.2103 12.327 34.2685 34.268C12.3268 56.21 0 85.97 0 117H117H234Z",aspectRatio:{width:234,height:117},width:e,height:t}),cloud:({width:e,height:t})=>aR({path:"M216.41 57.006C216.961 54.084 217.249 51.069 217.249 47.986C217.249 21.4841 195.972 0 169.725 0C153.666 0 139.467 8.043 130.865 20.3575C122.606 13.3566 111.954 9.1402 100.327 9.1402C74.3322 9.1402 53.2123 30.2136 52.8094 56.364H52.8035C23.6407 56.364 0 80.235 0 109.682C0 139.129 23.6407 163 52.8035 163H208.197C237.359 163 261 139.129 261 109.682C261 83.056 241.672 60.99 216.41 57.006Z",aspectRatio:{width:261,height:163},width:e,height:t}),rightArrow:({width:e,height:t})=>{let n=.6*e;return`M 0 ${t/4} L ${n} ${t/4} L ${n} 0 L ${e} ${t/2} L ${n} ${t} L ${n} ${.75*t} L 0 ${.75*t} Z`},leftArrow:({width:e,height:t})=>{let n=.4*e;return`M ${e} ${t/4} L ${n} ${t/4} L ${n} 0 L 0 ${t/2} L ${n} ${t} L ${n} ${.75*t} L ${e} ${.75*t} Z`},downArrow:({width:e,height:t})=>{let n=.6*t;return`M ${e/4} 0 L ${e/4} ${n} L 0 ${n} L ${e/2} ${t} L ${e} ${n} L ${.75*e} ${n} L ${.75*e} 0 Z`},upArrow:({width:e,height:t})=>{let n=.4*t;return`M ${e/4} ${t} L ${e/4} ${n} L 0 ${n} L ${e/2} 0 L ${e} ${n} L ${.75*e} ${n} L ${.75*e} ${t} Z`},asterisk1:({width:e,height:t})=>aR({path:"M45.5265 218.498C51.5466 222.87 58.5359 224.98 65.4742 224.98C75.916 224.98 86.221 220.2 92.853 211.217C92.872 211.198 92.89 211.178 92.907 211.157C92.923 211.136 92.939 211.115 92.954 211.094L92.977 211.061C92.993 211.039 93.008 211.017 93.023 210.996L116.491 178.725L139.959 210.996C139.982 211.031 140.006 211.058 140.029 211.088C140.04 211.102 140.05 211.116 140.061 211.132C151.115 226.188 172.355 229.505 187.473 218.515C202.608 207.526 205.992 186.278 195.074 171.104L195.05 171.066C195.03 171.034 195.014 171.01 194.989 170.985L171.572 138.696L209.512 126.346C227.334 120.545 237.129 101.305 231.33 83.476C225.532 65.648 206.315 55.8493 188.476 61.6334L150.537 73.933L150.52 34.0064C150.502 15.2594 135.248 0 116.508 0C97.768 0 82.514 15.2594 82.497 34.0234L82.463 73.916L44.5233 61.6163C44.5083 61.6163 44.49 61.613 44.4716 61.6078C44.4477 61.6014 44.4232 61.5918 44.4041 61.5823C26.5992 55.8664 7.45076 65.665 1.66886 83.46C-4.11314 101.254 5.61427 120.426 23.3511 126.278C23.3675 126.283 23.3822 126.289 23.3963 126.295L23.4588 126.319L23.4873 126.329L61.4098 138.679L37.9929 170.968C37.9844 170.985 37.9718 171.002 37.9591 171.019C37.9462 171.036 37.9336 171.053 37.9251 171.07C26.9903 186.244 30.3915 207.509 45.5265 218.498Z",aspectRatio:{width:233,height:225},width:e,height:t}),asterisk2:({width:e,height:t})=>aR({path:"M46.0556 112L0 85.388L33.9456 26.6121L80.028 53.1781L80.054 0H147.946L147.972 53.1781L194.054 26.6121L228 85.388L181.944 112L228 138.612L194.054 197.388L147.972 170.822L147.946 224H80.054L80.028 170.822L33.9456 197.388L0 138.612L46.0556 112Z",aspectRatio:{width:228,height:224},width:e,height:t}),bookmark:({width:e,height:t})=>aR({path:"M0 0H199V238L99.5 142.8L0 238V0Z",aspectRatio:{width:199,height:238},width:e,height:t}),butterfly:({width:e,height:t})=>aR({path:"M94.5 100.713C91.935 150.916 50.703 190.909 0 191.493V0C50.703 0.5845 91.935 40.5767 94.5 90.78C97.031 41.2385 137.217 1.6407 187 0.0438004V191.45C137.217 189.853 97.031 150.255 94.5 100.713Z",aspectRatio:{width:187,height:192},width:e,height:t}),cylinder:({width:e,height:t})=>aR({path:"M169 36.8497V218.15C169 238.502 131.168 255 84.5 255C37.832 255 0 238.502 0 218.15V36.8497C0 16.4982 37.832 0 84.5 0C131.168 0 169 16.4982 169 36.8497Z",aspectRatio:{width:169,height:255},width:e,height:t}),diamond2:({width:e,height:t})=>aR({path:"M0 55.5L124 185L248 55.5L189.307 0H58.6933L0 55.5Z",aspectRatio:{width:248,height:185},width:e,height:t}),door:({width:e,height:t})=>aR({path:"M140 69.697C140 31.2044 108.66 0 70 0C31.34 0 0 31.2044 0 69.697V207H140V69.697Z",aspectRatio:{width:140,height:207},width:e,height:t}),drop1:({width:e,height:t})=>aR({path:"M167 150.687C167 196.328 129.407 234 83.139 234C37.593 234 0 196.328 0 150.687C0 100.7 51.329 36.9474 83.139 0C114.948 39.1207 167 98.526 167 150.687Z",aspectRatio:{width:167,height:234},width:e,height:t}),drop2:({width:e,height:t})=>aR({path:"M73 239C53.64 239 35.071 231.315 21.3812 217.634C7.691 203.954 0 185.4 0 166.054C0 136.091 13.8696 113.633 30.768 86.27C43.912 64.9877 58.888 40.7377 70.597 7.6816C71.281 5.7496 72.989 0 72.989 0C72.989 0 72.993 0.0124998 73 0.0363998C73.007 0.0124998 73.011 0 73.011 0C73.011 0 74.719 5.7496 75.403 7.6816C87.112 40.7377 102.088 64.9877 115.232 86.27C132.13 113.633 146 136.091 146 166.054C146 185.4 138.309 203.954 124.619 217.634C111.025 231.218 92.225 239 73 239Z",aspectRatio:{width:146,height:239},width:e,height:t}),explosion:({width:e,height:t})=>aR({path:"M165.802 184.465L118.997 260L125.343 182.079L34.9058 219.45L99.164 159.817L0 163.792L78.538 134.373L0 74.7401L86.471 89.052V0L118.997 89.052L165.802 10.3364L149.143 97.798L217.368 29.419L165.802 112.905L245.927 81.101L165.802 143.914H261L165.802 184.465Z",aspectRatio:{width:261,height:260},width:e,height:t}),flag:({width:e,height:t})=>aR({path:"M0 142.161C0 142.161 51.9956 118.626 103 137.469C159.992 158.525 206 141.31 206 141.31V11.1373C206 11.1373 160 28.3218 103.016 7.28273C52 -11.553 0 12.0974 0 12.0974V142.161Z",aspectRatio:{width:206,height:148},width:e,height:t}),flower:({width:e,height:t})=>aR({path:"M135.351 66.1893C196.683 -5.00591 256.536 100.304 164.908 117.361C256.536 135.16 195.944 239.728 135.351 168.532C166.386 257.526 45.9394 256.785 76.975 168.532C15.643 239.728 -44.2109 135.16 47.4173 117.361C-44.9498 100.304 15.643 -4.26431 76.975 66.1893C45.2005 -22.0631 166.386 -22.0631 135.351 66.1893ZM105.793 104.012C113.183 104.012 119.833 109.945 119.833 117.361C119.833 124.777 113.183 131.452 105.793 131.452C98.404 131.452 92.492 124.777 92.492 117.361C92.492 109.945 98.404 104.012 105.793 104.012Z",aspectRatio:{width:212,height:235},width:e,height:t}),frame:({width:e,height:t})=>aR({path:"M0 0H240L200 88L240 176H0L40 88L0 0Z",aspectRatio:{width:240,height:176},width:e,height:t}),heart1:({width:e,height:t})=>aR({path:"M215.886 56.157C215.886 24.729 191.112 0 160.584 0C135.933 0 115.08 16.983 107.937 39.93C100.788 16.986 79.935 0.591 55.284 0.591C24.75 0.591 0 24.615 0 56.055C0 71.919 6.321 83.127 16.494 95.121L107.988 189.447L199.377 95.121C209.559 83.127 215.886 72.009 215.886 56.157Z",aspectRatio:{width:216,height:190},width:e,height:t}),home:({width:e,height:t})=>aR({path:"M0 62.143L95.5 0L191 62.143V195H0V62.143Z",aspectRatio:{width:191,height:195},width:e,height:t}),home2:({width:e,height:t})=>aR({path:"M206 94.076L103 0L0 94.076H31.2377V189H175.607V94.076H206Z",aspectRatio:{width:206,height:189},width:e,height:t}),hourglass:({width:e,height:t})=>aR({path:"M0.392782 0H187.607C193.014 43.3688 140.804 53.797 140.804 97.5C140.804 141.203 193.014 151.631 187.607 195H0.392782C-5.01452 151.631 47.196 141.203 47.196 97.5C47.196 53.797 -5.01452 43.3688 0.392782 0Z",aspectRatio:{width:188,height:195},width:e,height:t}),house:({width:e,height:t})=>aR({path:"M0 92.367L95 0L190 92.367V223H0V92.367Z",aspectRatio:{width:190,height:223},width:e,height:t}),keyhole:({width:e,height:t})=>aR({path:"M115 57.0494C115 25.5387 89.416 0 57.863 0C26.311 0 0.726898 25.5414 0.726898 57.0494C0.726898 78.652 12.759 97.451 30.505 107.136L0 219H114.845L84.448 107.524C102.608 97.962 115 78.959 115 57.0494Z",aspectRatio:{width:115,height:219},width:e,height:t}),kiss:({width:e,height:t})=>aR({path:"M124.5 17.1468C80.036 -36.5162 0 52.9218 0 52.9218C0 52.9218 44.4643 120 124.5 120C204.536 120 249 52.9218 249 52.9218C249 52.9218 168.964 -36.5162 124.5 17.1468Z",aspectRatio:{width:249,height:120},width:e,height:t}),leaf:({width:e,height:t})=>aR({path:"M204.414 0.0151567C204.414 0.0151567 206.837 93.9509 150.394 150.394C93.9507 206.837 0.0151569 204.413 0.0151569 204.413C0.0151569 204.413 -2.40835 110.478 54.0347 54.0349C110.478 -2.40834 204.414 0.0151567 204.414 0.0151567Z",aspectRatio:{width:205,height:205},width:e,height:t}),lightning1:({width:e,height:t})=>aR({path:"M111.5 0L0 142H51.433L31.5 253L143 111H91.567L111.5 0Z",aspectRatio:{width:143,height:253},width:e,height:t}),lightning2:({width:e,height:t})=>aR({path:"M126 0H43L0 120.531H36L6 227L110 80.354H73L126 0Z",aspectRatio:{width:126,height:227},width:e,height:t}),magnet:({width:e,height:t})=>aR({path:"M88.402 0H0V67.669H88.402C105.271 67.669 118.957 81.308 118.957 98C118.957 114.689 105.271 128.331 88.402 128.331H0V196H88.402C142.747 196 187 152.072 187 98C187 43.9279 142.747 0 88.402 0Z",aspectRatio:{width:187,height:196},width:e,height:t}),mithosis:({width:e,height:t})=>aR({path:"M150.996 136.45C137.141 128.926 117.559 128.7 103.532 135.896C93.843 140.867 82.875 143.67 71.2577 143.67C31.9033 143.67 0 111.508 0 71.835C0 32.161 31.9033 0 71.2577 0C83.467 0 94.959 3.0955 105.004 8.5504C118.859 16.0745 138.441 16.3 152.467 9.1038C162.157 4.1328 173.125 1.3303 184.742 1.3303C224.097 1.3303 256 33.492 256 73.165C256 112.839 224.097 145 184.742 145C172.533 145 161.041 141.905 150.996 136.45Z",aspectRatio:{width:256,height:145},width:e,height:t}),orangeRicky:({width:e,height:t})=>aR({path:"M69 0H0V69V138V207H69H138V138H69V69V0Z",aspectRatio:{width:138,height:207},width:e,height:t}),party:({width:e,height:t})=>aR({path:"M134.622 0L144.682 68.2539L174.415 5.9977L163.91 74.1846L210.671 23.4578L180.535 85.519L240.169 50.8289L193.079 101.25L260.29 85.679L200.43 119.98L269.245 124.911L201.934 140.044L266.237 165.04L197.456 159.661L251.535 202.5L187.396 177.086L226.445 233.962L172.646 190.771L193.197 256.631L154.518 199.501L154.743 268.492L134.622 202.5L114.501 268.492L114.727 199.501L76.0482 256.631L96.5985 190.771L42.7992 233.962L81.8489 177.086L17.7091 202.5L71.7885 159.661L3.0072 165.04L67.3112 140.044L0 124.911L68.8149 119.98L8.9545 85.679L76.1658 101.25L29.0753 50.8289L88.7105 85.519L58.5743 23.4578L105.335 74.1846L94.8305 5.9977L124.562 68.2539L134.622 0Z",aspectRatio:{width:270,height:269},width:e,height:t}),pillow:({width:e,height:t})=>aR({path:"M176 0.00169945C157.812 16.9062 125.203 28.174 88.001 28.174C50.798 28.174 18.1881 16.9054 0 0V258.421C18.1882 241.516 50.798 230.248 88 230.248C125.202 230.248 157.812 241.516 176 258.421V0.00169945Z",aspectRatio:{width:176,height:259},width:e,height:t}),polygon:({width:e,height:t})=>aR({path:"M110 0L219.119 63V189L110 252L0.880798 189V63L110 0Z",aspectRatio:{width:220,height:252},width:e,height:t}),rainbow:({width:e,height:t})=>aR({path:"M186.907 141H282C282 63.128 218.872 0 141 0C63.1278 0 0 63.128 0 141H95.093C95.093 115.646 115.646 95.093 141 95.093C166.354 95.093 186.907 115.646 186.907 141Z",aspectRatio:{width:282,height:141},width:e,height:t}),rhodeIsland:({width:e,height:t})=>aR({path:"M69 0H0V69V138H69V207H138V138V69H69V0Z",aspectRatio:{width:138,height:207},width:e,height:t}),shell:({width:e,height:t})=>aR({path:"M109 0C169.199 0 218 48.743 218 108.87C185.392 108.87 158.958 135.273 158.958 167.842C158.958 179.736 158.958 191 158.958 191H59.042C59.042 191 59.042 179.736 59.042 167.842C59.042 135.273 32.6077 108.87 0 108.87C0 48.743 48.8007 0 109 0Z",aspectRatio:{width:218,height:191},width:e,height:t}),shield1:({width:e,height:t})=>aR({path:"M203.184 30.7277C142.457 30.7277 102.853 0 102.853 0C102.853 0 63.249 30.7277 3.05098 30.7277C3.05098 30.7277 -3.81372 128.209 3.05098 162.115C9.38758 193.902 102.853 249 102.853 249C102.853 249 196.319 193.902 203.184 162.115C209.52 128.738 203.184 30.7277 203.184 30.7277Z",aspectRatio:{width:206,height:249},width:e,height:t}),shield2:({width:e,height:t})=>aR({path:"M0 12.9585C64.624 -4.3195 136.376 -4.3195 201 12.9585C201 51.0564 201 89.154 201 127.252C201 184.396 100.498 240 100.498 240C100.498 240 0 184.406 0 127.252C0 89.154 0 51.0564 0 12.9585Z",aspectRatio:{width:201,height:240},width:e,height:t}),skewedRectangle:({width:e,height:t})=>aR({path:"M85.9799 0H290L204.02 141H0L85.9799 0Z",aspectRatio:{width:290,height:141},width:e,height:t}),softFlower:({width:e,height:t})=>aR({path:"M109 0C80.073 0 56.6234 23.4498 56.6234 52.3766C56.6234 54.722 54.722 56.6234 52.3766 56.6234C23.4498 56.6234 0 80.073 0 109C0 137.927 23.4498 161.377 52.3766 161.377C54.722 161.377 56.6234 163.278 56.6234 165.623C56.6234 194.55 80.073 218 109 218C137.927 218 161.377 194.55 161.377 165.623C161.377 163.278 163.278 161.377 165.623 161.377C194.55 161.377 218 137.927 218 109C218 80.073 194.55 56.6234 165.623 56.6234C163.278 56.6234 161.377 54.722 161.377 52.3766C161.377 23.4498 137.927 0 109 0Z",aspectRatio:{width:218,height:218},width:e,height:t}),softStar:({width:e,height:t})=>aR({path:"M130.424 3.17662C130.927 -1.05888 137.073 -1.05888 137.576 3.17662L141.792 38.7086C147.236 84.59 183.41 120.764 229.291 126.208L264.823 130.424C269.059 130.927 269.059 137.073 264.823 137.576L229.291 141.792C183.41 147.236 147.236 183.41 141.792 229.291L137.576 264.823C137.073 269.059 130.927 269.059 130.424 264.823L126.208 229.291C120.764 183.41 84.59 147.236 38.7086 141.792L3.17662 137.576C-1.05888 137.073 -1.05888 130.927 3.17662 130.424L38.7086 126.208C84.59 120.764 120.764 84.59 126.208 38.7086L130.424 3.17662Z",aspectRatio:{width:268,height:268},width:e,height:t}),stairs1:({width:e,height:t})=>aR({path:"M0 0H67.667V67.667H135.333V135.333H203V203H0V0Z",aspectRatio:{width:203,height:203},width:e,height:t}),stairs2:({width:e,height:t})=>aR({path:"M50 0H0V200H200V150H150V100H100V50H50V0Z",aspectRatio:{width:200,height:200},width:e,height:t}),teewee:({width:e,height:t})=>aR({path:"M69 0H138V69H207V138H138H69H0V69H69V0Z",aspectRatio:{width:207,height:138},width:e,height:t}),blob1:({width:e,height:t})=>aR({path:"M172.979 19.611C191.285 33.0858 204.505 54.442 210.861 78.5949C217.471 103.002 217.471 130.46 205.776 151.816C194.335 173.427 171.454 189.444 147.047 196.054C122.639 202.919 96.7069 200.631 75.3506 190.715C54.2486 180.546 37.7229 163.003 23.4855 142.155C9.5022 121.307 -2.19289 97.4087 0.349524 74.7813C3.14617 52.1538 19.9261 30.7976 40.2654 17.8313C60.6046 4.61077 84.5033 -0.474048 108.148 0.0344341C131.538 0.542916 154.928 6.13621 172.979 19.611Z",aspectRatio:{width:216,height:200},width:e,height:t}),blob10:({width:e,height:t})=>aR({path:"M188.684 8.95173C205.601 24.3309 200.988 63.0866 191.453 99.3816C182.225 135.677 168.076 169.511 146.238 175.355C124.399 181.507 94.871 159.668 66.5733 143.059C37.9679 126.449 10.5929 115.068 2.59569 95.0754C-5.4015 75.0824 5.97912 46.1694 24.4342 30.4826C42.8893 14.7958 68.4188 12.0276 100.715 6.79864C132.704 1.5697 171.767 -6.42749 188.684 8.95173Z",aspectRatio:{width:200,height:177},width:e,height:t}),blob11:({width:e,height:t})=>aR({path:"M137.368 29.4923C148.97 46.7605 146.542 72.1231 148.161 99.1046C149.779 126.086 155.715 154.956 144.113 174.383C132.781 193.81 103.911 203.793 80.4369 198.666C56.963 193.27 38.6156 173.034 28.3626 153.607C17.8398 134.181 15.4115 115.833 9.47555 91.5498C3.53961 67.2664 -5.63411 37.3169 4.61887 20.0488C15.1417 2.51078 45.0911 -1.80626 72.8821 0.622074C100.673 2.78059 126.036 12.2241 137.368 29.4923Z",aspectRatio:{width:152,height:200},width:e,height:t}),blob12:({width:e,height:t})=>aR({path:"M158.391 17.923C172.491 28.5703 180.261 48.1384 187.743 70.5842C194.937 93.3177 202.419 118.641 194.649 138.785C187.167 158.928 164.146 173.317 138.535 184.54C112.923 196.05 84.4347 204.108 58.8235 197.777C33.2123 191.446 10.191 170.439 2.99688 146.267C-4.48504 121.807 3.57241 94.181 10.4788 68.282C17.0974 42.0953 22.565 17.6352 37.8166 7.27563C53.0682 -3.37171 78.1038 0.081487 100.837 2.67138C123.859 5.26127 144.29 7.27563 158.391 17.923Z",aspectRatio:{width:198,height:200},width:e,height:t}),blob13:({width:e,height:t})=>aR({path:"M149.668 1.37595C170.663 5.22017 193.728 17.3442 198.755 34.7911C204.078 52.2379 191.363 75.3032 178.943 93.9329C166.819 112.563 154.99 126.757 140.501 145.386C126.011 164.312 108.86 187.673 92.5957 186.194C76.3317 185.011 60.9549 159.285 45.8737 140.655C30.4968 122.321 15.7114 110.788 7.43151 95.1157C-0.848339 79.4432 -2.32688 59.0392 3.5873 41.5924C9.50148 23.8498 23.1041 8.76868 38.7767 3.44592C54.745 -1.87685 73.3746 2.55879 91.7086 2.26308C110.338 2.26308 128.968 -2.17256 149.668 1.37595Z",aspectRatio:{width:200,height:187},width:e,height:t}),blob14:({width:e,height:t})=>aR({path:"M137.838 28.6426C150.711 40.5617 165.014 46.5213 178.363 58.2021C191.474 69.8828 203.87 87.0464 198.864 99.6807C193.858 112.315 171.689 120.42 157.862 135.676C144.275 151.171 139.269 173.579 126.873 182.161C114.477 190.505 94.9294 185.022 76.8123 178.109C58.4568 171.196 41.5316 163.091 28.1822 150.456C14.5943 137.822 4.58225 120.42 1.24488 101.826C-2.09248 83.2322 1.00651 62.9697 13.8792 52.4809C26.7519 41.992 49.1598 41.0385 65.6083 30.788C82.0567 20.5376 92.0688 0.990158 103.034 0.0366268C113.762 -0.916905 125.204 16.9618 137.838 28.6426Z",aspectRatio:{width:200,height:187},width:e,height:t}),blob15:({width:e,height:t})=>aR({path:"M185.203 1.52939C197.679 7.62217 200 32.2835 200 51.7223C200 71.1612 197.389 85.3777 197.679 100.175C198.259 114.681 201.741 129.768 198.259 143.114C194.778 156.46 184.623 168.356 171.567 173.868C158.801 179.671 143.134 179.091 130.368 174.739C117.312 170.387 106.867 162.263 86.8482 160.812C66.539 159.362 36.9454 164.294 18.9572 155.3C0.968966 146.306 -5.41395 123.095 5.03083 105.977C15.4756 88.5692 42.4579 77.5442 55.5139 59.5559C68.2798 41.8578 67.1192 17.4867 76.9837 9.6531C86.5581 2.10965 107.158 11.3939 128.627 9.6531C150.097 8.20244 172.728 -4.27327 185.203 1.52939Z",aspectRatio:{width:200,height:179},width:e,height:t}),blob16:({width:e,height:t})=>aR({path:"M158.441 55.3221C167.253 80.2399 160.264 105.462 147.501 134.938C134.738 164.717 116.81 199.055 97.0576 199.967C77.3057 201.182 55.7305 168.668 34.4592 133.722C13.1879 99.0802 -7.77953 62.3112 2.85612 36.4818C13.4918 10.6523 56.0344 -3.93369 90.0685 0.928322C123.799 6.09421 149.324 30.7081 158.441 55.3221Z",aspectRatio:{width:163,height:200},width:e,height:t}),blob17:({width:e,height:t})=>aR({path:"M168.917 36.7587C178.871 53.2457 175.138 76.5764 172.961 106.129C170.472 135.37 169.85 170.832 150.563 187.63C131.276 204.739 93.3252 203.495 65.0173 187.63C36.7095 172.077 18.0449 142.213 7.77943 107.373C-2.79714 72.2213 -4.35252 32.7147 14.312 14.0502C32.9765 -4.3033 72.1721 -1.50361 103.591 4.7179C135.32 10.6283 158.962 20.2717 168.917 36.7587Z",aspectRatio:{width:176,height:200},width:e,height:t}),blob18:({width:e,height:t})=>aR({path:"M178.188 21.1464C193.012 36.3069 196.381 62.9219 198.739 88.1893C200.76 113.12 201.771 136.366 190.316 149.168C178.862 162.307 155.279 164.665 135.065 167.697C115.188 170.73 99.0168 174.098 72.4018 177.131C46.1237 180.163 9.40176 182.521 1.65309 168.371C-6.09559 154.221 15.4659 123.564 23.5515 92.9059C31.6371 62.2481 26.2467 31.2534 38.3751 15.4192C50.1665 -0.0781831 79.8136 -1.08888 107.776 0.595609C136.076 1.9432 163.028 5.64909 178.188 21.1464Z",aspectRatio:{width:200,height:180},width:e,height:t}),blob19:({width:e,height:t})=>aR({path:"M148.621 13.3857C171.945 24.3818 194.937 41.3756 192.938 60.702C190.605 80.3615 163.282 101.687 149.953 123.346C136.958 145.005 137.958 166.664 128.295 174.661C118.631 182.325 98.3054 175.994 73.6476 181.991C48.9899 187.989 20.0004 205.983 11.0036 197.986C1.67366 189.989 12.6697 156.001 12.3365 131.343C12.0033 106.685 0.340809 91.0243 0.00759636 75.0301C-0.325616 59.0359 10.3372 42.3753 25.3318 28.7135C39.9931 15.0518 58.9863 4.05578 80.3119 1.05687C101.638 -2.27526 124.962 2.38972 148.621 13.3857Z",aspectRatio:{width:194,height:200},width:e,height:t}),blob2:({width:e,height:t})=>aR({path:"M140.464 18.6393C156.081 28.3718 169.887 39.9149 178.714 54.853C187.541 69.5649 191.389 87.6717 189.578 104.421C187.768 121.396 180.525 137.239 172.377 153.535C164.455 169.832 155.854 186.58 142.048 194.276C128.241 201.971 109.456 200.613 92.4804 197.671C75.2789 194.502 60.1144 189.749 45.1762 182.733C30.4644 175.716 16.2052 166.21 8.28346 153.083C0.361703 139.729 -1.44898 122.527 1.04072 106.91C3.30408 91.2931 9.64147 76.8076 15.9789 60.5114C22.0899 44.2153 28.201 26.1084 40.6495 14.7916C53.0979 3.24849 71.8838 -1.27823 89.7643 0.306124C107.871 1.66414 124.846 9.13322 140.464 18.6393Z",aspectRatio:{width:191,height:200},width:e,height:t}),blob20:({width:e,height:t})=>aR({path:"M150.035 13.2464C157.376 24.9386 153.026 48.323 157.92 65.7254C163.087 83.1277 177.498 94.2761 182.392 108.415C187.287 122.555 182.392 139.957 173.147 156.272C163.63 172.587 149.763 187.814 132.089 195.155C114.414 202.225 93.2053 201.137 73.6276 194.611C54.3219 188.357 36.9196 176.937 25.7712 161.438C14.8947 145.667 10.5441 126.09 5.92163 105.696C1.57105 85.0311 -3.05145 63.5501 2.65869 45.0601C8.64075 26.5701 24.6835 11.0711 43.1735 4.54524C61.6635 -1.98064 82.6007 0.194657 102.722 1.01039C122.844 1.82613 142.421 1.55421 150.035 13.2464Z",aspectRatio:{width:185,height:200},width:e,height:t}),blob21:({width:e,height:t})=>aR({path:"M152.611 0.184799C172.596 -0.723643 197.73 1.39606 199.85 13.8114C201.969 26.2268 181.075 48.9379 174.716 68.0151C168.357 87.0924 176.533 102.536 174.11 114.649C171.991 127.064 159.575 136.148 146.252 139.782C132.928 143.719 118.696 141.902 105.977 139.176C93.562 136.451 82.6606 132.212 63.2805 131.909C43.9004 131.606 16.0416 135.24 5.44306 125.853C-5.15543 116.465 1.50648 94.0572 10.2881 76.4939C18.7669 59.2335 29.6682 46.8182 38.7526 35.3112C48.1398 23.5015 56.3158 12.903 66.9143 8.36078C77.5128 4.12138 91.1394 6.24108 104.766 5.63546C118.696 4.72701 132.928 1.09324 152.611 0.184799Z",aspectRatio:{width:200,height:143},width:e,height:t}),blob22:({width:e,height:t})=>aR({path:"M195.507 15.5715C206.818 33.1668 193.622 69.3001 190.166 101.663C186.71 134.34 193.308 163.561 181.996 178.014C170.685 192.153 141.464 191.525 114.443 189.326C87.1072 187.44 62.2852 183.67 40.6052 169.531C19.2395 155.077 1.6441 130.255 0.0730908 103.862C-1.18372 77.4694 13.898 49.5054 35.2638 31.91C56.6296 14.0004 84.5936 6.45958 116.328 2.37494C148.063 -1.70969 184.196 -2.3381 195.507 15.5715Z",aspectRatio:{width:200,height:191},width:e,height:t}),blob23:({width:e,height:t})=>aR({path:"M135.742 9.14189C157.815 19.2326 179.258 38.4681 176.105 56.7576C172.951 74.7317 145.202 92.0751 127.858 109.734C110.83 127.077 104.523 145.052 87.4953 164.918C70.4672 184.468 42.7177 206.227 27.5816 198.343C12.4455 190.46 9.60747 153.566 6.45411 126.762C2.98542 100.274 -0.798607 84.1917 0.147399 67.1636C0.77807 50.4508 6.76944 32.4767 19.0675 20.8093C31.0503 9.14189 49.6551 3.78119 70.4672 1.2585C90.964 -1.26418 113.668 -0.633508 135.742 9.14189Z",aspectRatio:{width:177,height:200},width:e,height:t}),blob24:({width:e,height:t})=>aR({path:"M165.663 24.3715C171.555 44.4059 158.003 76.2254 151.816 96.2598C145.923 116.294 147.691 124.544 148.28 135.445C148.575 146.346 147.396 159.309 140.62 170.8C133.549 181.996 120.88 191.424 104.381 196.432C87.8821 201.441 67.553 202.03 54.8841 192.602C41.9207 183.469 36.6174 164.023 25.1271 143.105C13.3421 122.187 -4.33535 99.7953 0.967891 85.0641C6.27113 70.6275 34.2604 63.8511 56.0626 48.5307C77.5702 33.5048 92.8907 9.93489 113.22 2.56928C133.843 -4.79633 159.77 4.04241 165.663 24.3715Z",aspectRatio:{width:168,height:200},width:e,height:t}),blob25:({width:e,height:t})=>aR({path:"M180.115 1.256C192.651 2.1962 189.83 34.163 190.771 58.2947C191.711 82.4265 196.098 98.4099 198.606 117.214C201.113 136.018 201.426 157.642 189.204 165.791C177.294 173.626 153.163 167.671 135.299 163.91C117.749 159.836 106.466 157.956 85.7818 162.97C65.0974 168.298 35.3244 180.521 18.7143 174.253C1.79068 167.985 -1.97012 142.913 0.850478 120.975C3.67107 99.0367 13.0731 79.6059 18.4009 54.8473C23.7287 30.0888 24.9823 -0.310996 40.0254 0.00240332C54.7552 0.00240332 82.9612 31.029 111.167 31.029C139.373 31.029 167.579 0.315802 180.115 1.256Z",aspectRatio:{width:200,height:176},width:e,height:t}),blob26:({width:e,height:t})=>aR({path:"M142.571 0.586925C159.976 3.39414 176.258 15.1844 184.96 30.9048C193.662 46.6253 194.224 66.8372 189.171 83.6805C183.837 100.805 172.327 114.56 163.064 129.157C153.8 143.755 146.501 158.914 134.43 173.231C122.359 187.828 105.516 201.303 89.5146 199.899C73.2327 198.776 58.0738 182.775 42.9148 169.862C28.0366 157.23 13.7198 147.685 6.42103 134.491C-0.877729 121.297 -1.15845 103.892 1.64876 88.4528C4.45598 72.7324 10.0704 58.6963 18.4921 47.4674C27.1944 36.2386 38.4233 27.8169 50.4943 22.2025C62.846 16.3073 75.7592 13.5001 91.1989 8.72785C106.919 4.23631 125.166 -1.93957 142.571 0.586925Z",aspectRatio:{width:193,height:200},width:e,height:t}),blob27:({width:e,height:t})=>aR({path:"M112.602 54.9337C129.225 71.8646 155.391 78.9448 158.777 89.719C162.471 100.493 143.693 114.654 127.07 135.586C110.447 156.519 96.2866 184.224 71.0442 194.998C46.1096 205.465 10.4008 199.308 2.0893 178.375C-6.22223 157.443 12.5557 121.734 18.4045 92.1817C24.5612 62.6296 17.7889 38.9263 26.4082 21.9954C34.7197 5.06454 58.423 -5.40183 73.5069 2.9097C88.8986 10.9134 95.9788 38.0028 112.602 54.9337Z",aspectRatio:{width:160,height:200},width:e,height:t}),blob28:({width:e,height:t})=>aR({path:"M125.281 68.5835C142.15 82.9923 165.344 90.021 181.862 108.998C198.028 127.624 207.516 158.902 192.405 166.634C177.293 174.716 137.581 159.605 112.629 156.442C87.326 152.928 77.1344 161.713 59.9142 165.579C43.0453 169.445 19.1478 168.391 11.7677 157.496C4.73907 146.25 14.2278 124.813 11.4163 94.2382C8.2534 63.6634 -6.85825 23.9514 3.68476 8.48836C14.2278 -7.32615 50.4254 1.10826 73.9715 16.2199C97.5175 31.683 108.412 54.1747 125.281 68.5835Z",aspectRatio:{width:200,height:169},width:e,height:t}),blob29:({width:e,height:t})=>aR({path:"M162.987 10.2348C169.16 25.1809 154.864 58.6471 147.066 79.4417C139.268 100.236 138.293 108.359 134.719 114.532C131.47 120.706 125.297 124.93 119.448 143.45C113.6 161.97 107.426 194.461 98.004 199.335C88.5814 204.209 75.5849 181.14 55.7651 167.494C35.6203 153.522 8.65241 148.648 1.8292 135.327C-4.994 122.33 8.65241 100.561 20.0244 82.041C31.3964 63.5208 40.1691 48.2498 53.4906 35.5782C66.8122 22.9065 84.0326 13.159 106.452 6.33584C128.871 -0.812285 156.489 -4.71127 162.987 10.2348Z",aspectRatio:{width:165,height:200},width:e,height:t}),blob3:({width:e,height:t})=>aR({path:"M158.095 64.2637C176.543 95.19 192.277 129.1 181.697 155.686C171.117 182.001 133.951 201.533 99.4982 199.905C64.7739 198.549 33.0338 176.032 15.4004 145.377C-2.23296 114.994 -5.75963 76.2002 10.2461 46.6303C26.2518 17.0605 61.5185 -3.557 89.732 0.512241C118.217 4.58149 139.377 33.0662 158.095 64.2637Z",aspectRatio:{width:186,height:200},width:e,height:t}),blob30:({width:e,height:t})=>aR({path:"M146.076 34.4585C157.052 54.582 155.833 80.1936 164.675 100.622C173.212 121.355 191.201 136.905 189.372 149.711C187.542 162.212 165.285 171.969 146.99 175.018C129.001 178.372 114.671 174.713 103.39 175.018C92.1083 175.018 83.876 178.982 66.8015 186.299C49.7271 193.617 23.8105 204.288 14.3586 198.19C4.90665 191.787 11.6145 168.615 10.3949 147.882C8.87037 127.148 -0.581561 108.549 0.0282404 89.3407C0.638042 70.1319 11.6145 50.6182 28.384 32.934C44.8487 15.5546 67.4113 0.309578 89.974 0.00467694C112.537 -0.300224 135.099 14.335 146.076 34.4585Z",aspectRatio:{width:190,height:200},width:e,height:t}),blob31:({width:e,height:t})=>aR({path:"M134.218 44.0392C153.568 36.4264 184.97 26.9105 195.755 33.2544C206.222 39.9156 195.755 62.1194 181.481 76.3933C166.89 90.35 148.175 96.0596 145.638 116.36C143.1 136.661 156.74 171.235 151.664 183.923C146.589 196.928 123.434 187.413 105.036 178.531C86.6388 169.967 73.3165 161.72 52.0643 158.548C30.812 155.058 1.62986 156.644 0.0438693 145.225C-1.22492 133.806 25.4197 109.382 29.2261 86.8609C32.7152 64.3398 13.6834 44.0392 11.7802 26.9105C9.877 9.46461 24.7853 -4.80928 42.5484 1.53467C59.9942 7.87863 79.9777 34.5232 93.6172 45.308C107.257 56.4099 114.869 51.3347 134.218 44.0392Z",aspectRatio:{width:200,height:191},width:e,height:t}),blob32:({width:e,height:t})=>aR({path:"M200 100.339C200 149.831 145.763 197.966 95.5932 197.966C45.7627 197.966 0 149.831 0 100.339C0 50.8475 45.7627 0 95.5932 0C145.763 0 200 50.8475 200 100.339Z",aspectRatio:{width:200,height:198},width:e,height:t}),blob4:({width:e,height:t})=>aR({path:"M183.427 38.712C198.21 63.2519 196.141 95.1833 189.341 126.523C182.836 157.863 171.305 188.908 150.609 197.482C130.208 205.76 100.642 192.16 69.8936 177.968C39.4405 164.072 7.80478 150.176 1.30024 128.593C-5.2043 107.01 13.718 77.7393 35.3012 51.7211C56.5888 25.9986 81.1287 3.23272 108.921 0.276112C137.009 -2.38484 168.349 14.4678 183.427 38.712Z",aspectRatio:{width:195,height:200},width:e,height:t}),blob5:({width:e,height:t})=>aR({path:"M166.251 30.6913C183.816 48.5185 195.875 71.8512 199.021 98.8542C202.429 125.595 197.186 155.744 179.359 169.115C161.794 182.223 131.645 178.815 103.331 176.979C75.0171 175.144 48.8006 174.882 29.6625 161.512C10.7866 148.141 -0.748681 121.925 0.0378149 96.2326C0.824311 70.8025 14.1947 46.159 33.0706 28.3318C52.2087 10.5045 76.8522 -0.5064 100.971 0.0179307C125.091 0.804426 148.423 12.864 166.251 30.6913Z",aspectRatio:{width:200,height:179},width:e,height:t}),blob6:({width:e,height:t})=>aR({path:"M149.146 50.5452C161.911 68.0278 171.901 81.9028 176.619 97.9979C181.336 114.37 180.781 133.241 173.011 149.891C165.519 166.541 151.366 180.693 133.051 189.851C114.736 199.008 92.2586 202.893 71.446 197.621C50.6334 192.348 30.9308 177.918 18.1658 158.216C5.12323 138.791 -0.981801 113.815 0.128204 87.7304C1.51571 61.6453 10.6733 34.1726 29.2658 17.5226C48.1359 1.14999 76.996 -4.40004 98.9186 3.6475C120.841 11.695 136.381 32.7851 149.146 50.5452Z",aspectRatio:{width:180,height:200},width:e,height:t}),blob7:({width:e,height:t})=>aR({path:"M158.662 41.8295C178.593 57.8305 204.138 64.5677 213.402 79.7266C222.666 94.6047 215.367 118.466 203.015 135.028C190.383 151.871 172.698 161.977 156.416 168.434C140.134 174.89 124.975 177.697 104.483 185.277C83.9903 192.856 58.1642 205.208 44.9704 197.629C31.4959 190.33 31.2152 163.1 21.9514 138.116C12.9684 112.851 -4.71688 90.1132 1.17822 75.5158C7.35404 61.1991 36.8295 55.5847 58.7256 40.1452C80.9024 24.7056 95.4998 -0.278374 109.816 0.00234533C124.414 0.283064 138.45 25.8285 158.662 41.8295Z",aspectRatio:{width:218,height:200},width:e,height:t}),blob8:({width:e,height:t})=>aR({path:"M153.53 11.0108C168.179 18.1858 181.931 29.5461 192.993 44.4939C203.755 59.4417 212.425 78.2759 210.631 96.5122C209.136 114.748 197.477 132.088 182.529 142.252C167.581 152.716 148.747 156.004 128.717 168.262C108.687 180.22 87.1622 201.147 69.8228 199.951C52.7823 198.456 39.6283 174.54 32.4533 153.015C25.2784 131.49 24.0826 112.357 16.6087 91.131C9.13477 70.2041 -4.31825 46.8855 1.36191 31.9377C7.04207 16.691 31.8554 9.51607 52.7823 5.33069C73.4103 0.846349 90.4507 -0.648433 106.594 0.248435C123.037 1.1453 138.882 4.13486 153.53 11.0108Z",aspectRatio:{width:211,height:200},width:e,height:t}),blob9:({width:e,height:t})=>aR({path:"M140.289 20.2182C156.96 27.7956 176.661 32.0895 189.29 43.9608C201.667 55.5796 206.718 75.0283 202.424 91.6987C198.131 108.622 184.491 122.766 175.651 140.952C166.81 158.885 162.769 180.607 150.393 191.216C138.016 201.824 117.052 201.572 98.866 197.025C80.6802 192.479 65.2727 183.891 48.3497 175.808C31.4268 167.726 13.2409 160.148 5.1583 146.761C-2.67172 133.122 -0.398493 113.673 4.14797 96.7504C8.69444 80.08 15.5141 65.6828 23.3442 52.296C31.4268 38.6566 40.5197 25.775 52.6436 15.6717C65.0201 5.82101 80.6802 -1.50385 95.3299 0.264221C109.98 1.77971 123.619 12.6407 140.289 20.2182Z",aspectRatio:{width:204,height:200},width:e,height:t})};function aL(e){let{subType:t}=e,n=aI[t]||aj;return n?function(e,t){let{width:n,height:r,fill:i,stroke:o,strokeWidth:a,dash:l}=e,s=(l||[]).map(e=>e*a),u=t(e),c=1,d=1;"string"!=typeof u&&(c=u.scaleX,d=u.scaleY,u=u.path);let h=`clip-${Math.random()}`;return`
|
|
96
|
+
`);let aS=(e,t,n,r,i=0,o=!1)=>{let a=Math.floor(Math.max(e.width*r,1)),s=Math.floor(Math.max(e.height*r,1)),u=Math.min(i*r,a/2,s/2),c=Math.max(e.width/n.width,e.height/n.height)*r,d=e.page._exporting&&ik.imageDownScalingEnabled&&c<1&&!o,h=0===n.x&&0===n.y&&n.width===t?.width&&n.height===t?.height,f=l(v).useMemo(()=>{if(!t||!t.width||!t.height)return;let e=0===u,n=!d;if(!h||!e||!n)return ab()},[t,u,d,h]);return l(v).useLayoutEffect(()=>{if(!f||!t)return;f.width=a,f.height=s;let e=f.getContext("2d");if(!e)return;u&&(e.beginPath(),e.moveTo(u,0),e.lineTo(a-u,0),e.arc(a-u,u,u,3*Math.PI/2,0,!1),e.lineTo(a,s-u),e.arc(a-u,s-u,u,0,Math.PI/2,!1),e.lineTo(u,s),e.arc(u,s-u,u,Math.PI/2,Math.PI,!1),e.lineTo(0,u),e.arc(u,u,u,Math.PI,3*Math.PI/2,!1),e.clip());let r=d?function(e,t){let n=ab();n.width=e.width,n.height=e.height,n.getContext("2d")?.drawImage(e,0,0,n.width,n.height);let r=function(e,t,n,r,i,o,a){for(var l=new ImageData(t,n),s=new Int32Array(e.data.buffer),u=e.width,c=new Int32Array(l.data.buffer),d=l.width,h=t/o,f=n/a,p=Math.round(1/h),g=Math.round(1/f),m=p*g,v=0;v<l.height;v++)for(var y=0;y<d;y++){for(var b=0+Math.round(y/h)+(0+Math.round(v/f))*u,w=0,x=0,_=0,E=0,S=0;S<g;S++)for(var C=0;C<p;C++){var O=s[b+C+S*u];w+=O<<24>>>24,x+=O<<16>>>24,_+=O<<8>>>24,E+=O>>>24}w=Math.round(w/m),x=Math.round(x/m),_=Math.round(_/m),E=Math.round(E/m),c[y+v*d]=E<<24|_<<16|x<<8|w}return l}(n.getContext("2d").getImageData(0,0,n.width,n.height),Math.floor(n.width*t),Math.floor(n.height*t),0,0,n.width,n.height);return n.width=Math.floor(n.width*t),n.height=Math.floor(n.height*t),n.getContext("2d")?.putImageData(r,0,0),n}(t,c):t,i=d?{x:Math.floor(n.x*c),y:Math.floor(n.y*c),width:Math.floor(n.width*c),height:Math.floor(n.height*c)}:n;e.drawImage(r,i.x,i.y,i.width,i.height,0,0,f.width,f.height)},[f,e.width,e.height,n.x,n.y,n.width,n.height,i,r,o,e.page._exporting,d]),l(v).useEffect(()=>()=>{f&&"CANVAS"===f.nodeName&&l(A).Util.releaseCanvas(f)},[f]),f||t},aC=(e,t,n,r)=>{let[i,o]=aT(ax(e.clipSrc||""),"anonymous");aA(e.clipSrc?o:"loaded",e.id+"-clip");let a=l(v).useMemo(()=>{if(t&&i)return ab()},[t,i]);return l(v).useLayoutEffect(()=>{if(!i||!t||!t.width||!t.height||!i||!i.width||!i.height||!a)return;let r=ab(),o=Math.max(e.width/i.width*n,e.height/i.height*n);r.width=i.width*o,r.height=i.height*o,r.getContext("2d")?.drawImage(i,0,0,r.width,r.height),a.width=Math.max(t.width,1),a.height=Math.max(t.height,1);let s=a.getContext("2d");s&&(s.save(),s.drawImage(r,0,0,t.width,t.height),l(A).Util.releaseCanvas(r),s.globalCompositeOperation="source-in",s.drawImage(t,0,0,a.width,a.height),s.restore())},[a,t,i,e.width,e.height,n,...r]),e.clipSrc&&i?a:t},aO=ab(),ak=P(({element:e})=>{let t=Math.min(30,e.width/4,e.height/4),n=l(v).useRef(null);return l(v).useEffect(()=>{let e=n.current;if(!e)return;let t=new(l(A)).Animation(t=>{e.rotate((t?.timeDiff||0)/2)},e.getLayer());return t.start(),()=>{t.stop()}}),(0,p.jsxs)(rq,{x:e.x,y:e.y,rotation:e.rotation,listening:!1,opacity:e.a.opacity,hideInExport:!e.showInExport,children:[(0,p.jsx)(rW,{width:e.width,height:e.height,fill:"rgba(124, 173, 212, 0.8)"}),(0,p.jsx)("Arc",{ref:n,x:e.width/2,y:e.height/2,fill:"white",outerRadius:Math.abs(t),innerRadius:Math.max(1,t-5),angle:270})]})}),aP=P(({element:e})=>{let t="Can not load the video...",n=Math.max(10,Math.min(30,e.width/t.length));return(0,p.jsxs)(rq,{x:e.x,y:e.y,rotation:e.rotation,listening:!1,opacity:e.a.opacity,hideInExport:!e.showInExport,children:[(0,p.jsx)(rW,{width:e.width,height:e.height,fill:"rgba(223, 102, 102, 0.8)"}),(0,p.jsx)(rY,{text:t,fontSize:n,width:e.width,height:e.height,align:"center",fill:"white",verticalAlign:"middle",padding:5})]})}),aT=l(r0),aA=(e,t)=>{let n=l(v).useRef(),r=()=>{n.current?.(),n.current=void 0};l(v).useEffect(()=>r,[]),l(v).useLayoutEffect(()=>{"loading"!==e||n.current||(n.current=id(`video ${t}`)),"loading"!==e&&r(),"failed"===e&&ig(`video ${t}`)},[e])},aN=P(({element:e,store:t})=>{let n,r;let[i,o]=l(v).useState(!1),a=l(v).useRef(null),s=l(v).useRef(null),[u,c]=l(v).useState(!1),d=t.selectedElements.indexOf(e)>=0,[h,f]=l(v).useState(!1),[g,m]=function(e,t,n){let r=l(v).useRef("loading"),i=l(v).useRef(),[o,a]=l(v).useState(0),s=l(v).useRef(),u=l(v).useRef(),c=l(v).useRef();return(s.current!==e||u.current!==t||c.current!==n)&&(r.current="loading",i.current=void 0,s.current=e,u.current=t,c.current=n),l(v).useLayoutEffect(function(){if(e){var o=document.createElement("video");return o.addEventListener("canplay",l),o.addEventListener("error",s),t&&(o.crossOrigin=t),n&&(o.referrerpolicy=n),o.src=e,function(){o.removeEventListener("canplay",l),o.removeEventListener("error",s)}}function l(){r.current="loaded",i.current=o,i.current.currentTime=0,a(Math.random()),i.current.removeEventListener("canplay",l)}function s(e){r.current="failed",i.current=void 0,a(Math.random())}},[e,t,n]),[i.current,r.current]}(e.src,"anonymous");aA(m,e.id+"-video"),g&&(g.muted=!0,g.width=g.videoWidth,g.height=g.videoHeight);let b=g||aO;l(v).useEffect(()=>{g&&t.history.ignore(()=>{e.set({duration:1e3*g.duration})})},[g]),l(v).useEffect(()=>{if(!g)return;let n=t.isPlaying||h;if(!n){g.pause();return}n&&(g.currentTime=e.startTime*g.duration,g.play());let r=new(l(A)).Animation(()=>{},a.current?.getLayer());r.start();let i=()=>{f(!1),g.currentTime=e.startTime*g.duration},o=()=>{g.currentTime>=e.endTime*g.duration&&(g.pause(),g.currentTime=e.startTime*g.duration,f(!1))};return g.addEventListener("ended",i),g.addEventListener("timeupdate",o),()=>{r.stop(),g.removeEventListener("ended",i),g.removeEventListener("timeupdate",o)}},[g,h,t.isPlaying]);let w=l(v).useRef();l(v).useEffect(()=>(0,y.autorun)(()=>{if(g){let n=(t.currentTime-e.page.startTime)%e.duration;!(Math.abs(1e3*g.currentTime-n)>500)&&t.isPlaying||(g.currentTime=n/1e3,t.isPlaying||0===g.currentTime||(w.current=id(`video ${e.id}`))),a.current?.getLayer()?.batchDraw()}}),[t,g]),l(v).useEffect(()=>{if(!g)return;let t=null,n=()=>{w.current&&(a.current?.getLayer()?.batchDraw(),w.current(),w.current=null),!function(e,t){for(var n=e.buffered,r=0;r<n.length;r++)if(t>=n.start(r)&&t<=n.end(r))return!0;return!1}(g,g.currentTime)&&(t&&console.error("finish already exists"),t=id(`video ${e.id}`))},r=()=>{t&&(t(),t=null)};return g.addEventListener("timeupdate",n),g.addEventListener("canplay",r),()=>{g.removeEventListener("timeupdate",n),g.removeEventListener("canplay",r)}},[g,e.id,id]);let{cropX:x,cropY:_,cropWidth:E,cropHeight:S}=e;"loaded"!==m&&(x=_=0,E=S=1);let C=b.width*E,O=b.height*S,k=e.width/e.height,P=C/O,T="svg"===e.type;T?(n=C,r=O):k>=P?(n=C,r=C/k):(n=O*k,r=O);let N={x:b.width*x,y:b.height*_,width:n,height:r},j=e.cornerRadius??0,R=aC(e,aS(e,b,N,t._elementsPixelRatio,j,i||e._cropModeEnabled||"svg"===e.type),t._elementsPixelRatio,[N,j,t._elementsPixelRatio]),I=Math.max(e.width/n,e.height/r);l(v).useEffect(()=>{if(!e._cropModeEnabled)return;let t=a.current?.getStage();function n(t){e._cropModeEnabled&&t.target!==s.current&&e.toggleCropMode(!1)}function r(n){e._cropModeEnabled&&n.target.parentNode!==t.content&&e.toggleCropMode(!1)}return document.body.addEventListener("click",r),t?.on("click",n),t?.on("tap",n),()=>{document.body.removeEventListener("click",r),document.body.removeEventListener("touchstart",r),t?.off("click",n),t?.off("click",n)}},[e._cropModeEnabled]),l(v).useLayoutEffect(()=>{if(!i&&!e._cropModeEnabled)return iT(a.current,e),(0,y.autorun)(()=>{iT(a.current,e)},{delay:100})},[b,i,E,S,e._cropModeEnabled]),l(v).useLayoutEffect(()=>{i||e._cropModeEnabled?a.current?.clearCache():iT(a.current,e)},[i,e.width,e.height,e._cropModeEnabled]),l(v).useEffect(()=>{iT(a.current,e)},[e.shadowEnabled,e.shadowBlur,e.cornerRadius,e.shadowColor,e.shadowOffsetX,e.shadowOffsetY,e.shadowOpacity]);let L=l(v).useRef(null),M=l(v).useRef(null),D=l(v).useRef(null);l(v).useLayoutEffect(()=>{e._cropModeEnabled&&(M.current.nodes([L.current]),D.current.nodes([s.current]))},[e._cropModeEnabled]);let F=t=>{Math.round(t.target.x())>0&&(t.target.x(0),t.target.scaleX(1)),Math.round(t.target.y())>0&&(t.target.y(0),t.target.scaleY(1));let i=t.target.width()*t.target.scaleX(),o=t.target.height()*t.target.scaleY(),a=Math.min(1,n/i),l=Math.min(1,r/o),s=Math.min(1-a,Math.max(0,Math.round(-t.target.x())/i)),u=Math.min(1-l,Math.max(0,Math.round(-t.target.y())/o));t.target.setAttrs({x:-s*b.width,y:-u*b.height,scaleX:1,scaleY:1}),e.set({cropX:s,cropY:u,cropWidth:a,cropHeight:l})},z=()=>{"svg"!==e.type&&e.contentEditable&&setTimeout(()=>{e.toggleCropMode(!0)})},B="loading"===m,U="failed"===m,H=!B&&!U,V=l(v).useRef({cropX:0,cropY:0,cropWidth:0,cropHeight:0}),q=H?e.a.opacity:0;is(a,q);let G=e.selectable||"admin"===t.role,W=iI();return(0,p.jsxs)(l(v).Fragment,{children:[B&&(0,p.jsx)(ak,{element:e}),U&&(0,p.jsx)(aP,{element:e}),(0,p.jsx)(rK,{ref:a,name:"element",id:e.id,image:b,x:e.x,y:e.y,width:e.width||1,height:e.height||1,rotation:e.rotation,opacity:q,shadowEnabled:e.shadowEnabled,shadowBlur:e.shadowBlur,shadowOffsetX:e.shadowOffsetX,shadowOffsetY:e.shadowOffsetY,shadowColor:e.shadowColor,shadowOpacity:e.shadowOpacity,customCrop:N,listening:G,cropX:N.x,cropY:N.y,cropWidth:N.width,cropHeight:N.height,draggable:W?e.draggable&&d:e.draggable,preventDefault:!W||d,hideInExport:!e.showInExport,onMouseEnter:()=>{c(!0)},onMouseLeave:()=>{c(!1)},onDragMove:t=>{e.set({x:t.target.x(),y:t.target.y()})},onDragEnd:t=>{e.set({x:t.target.x(),y:t.target.y()})},onDblClick:z,onDblTap:z,onTransformStart:()=>{o(!0),V.current={cropX:e.cropX,cropY:e.cropY,cropWidth:e.cropWidth,cropHeight:e.cropHeight}},onTransform:t=>{let i=t.currentTarget,o=1e-7>Math.abs(i.scaleX()-1)?1:i.scaleX(),a=1e-7>Math.abs(i.scaleY()-1)?1:i.scaleY();i.scaleX(1),i.scaleY(1);let l=t.target.getStage()?.findOne("Transformer"),s=Math.min(1-n/b.width,Math.max(0,e.cropX)),u=Math.min(1-r/b.height,Math.max(0,e.cropY)),c=l.getActiveAnchor(),d=!(c.indexOf("middle")>=0||c.indexOf("center")>=0),h=!d&&o<1&&V.current.cropHeight>r/b.height,f=d?e.cropWidth:e.cropWidth*o;h&&(f=e.cropWidth);let p=!d&&a<1&&V.current.cropWidth>n/b.width,g=d?e.cropHeight:e.cropHeight*a;p&&(g=e.cropHeight),T&&(f=e.cropWidth,g=e.cropHeight),e.set({cropX:s,cropY:u,x:i.x(),y:i.y(),width:i.width()*o,height:i.height()*a,rotation:t.target.rotation(),cropWidth:Math.min(f,1-s),cropHeight:Math.min(g,1-u)})},onTransformEnd:t=>{let i=t.currentTarget;e.set({width:i.width(),height:i.height(),x:i.x(),y:i.y(),rotation:t.target.rotation(),cropWidth:n/b.width,cropHeight:r/b.height}),o(!1)}}),(0,p.jsx)(rW,{x:e.x,y:e.y,width:Math.max(e.width-e.borderSize,0),height:Math.max(e.height-e.borderSize,0),opacity:q,offsetX:-e.borderSize/2,offsetY:-e.borderSize/2,stroke:e.borderColor,strokeWidth:e.borderSize,listening:!1,visible:!!e.borderSize,rotation:e.rotation,cornerRadius:Math.max(0,j-e.borderSize),hideInExport:!e.showInExport}),!h&&(0,p.jsx)(rK,{image:a_,x:e.x+e.width/2-15/t.scale,y:e.y+e.height/2-15/t.scale,width:30/t.scale,height:30/t.scale,hideInExport:!0,onClick:()=>{f(!0)}}),h&&(0,p.jsx)(rK,{image:aE,x:e.x+e.width/2-15/t.scale,y:e.y+e.height/2-15/t.scale,width:30/t.scale,height:30/t.scale,hideInExport:!0,onClick:()=>{f(!1)}}),e._cropModeEnabled&&(0,p.jsxs)(r5,{selector:".page-abs-container",enabled:!0,children:[(0,p.jsx)(rW,{x:-window.innerWidth/t.scale,y:-window.innerWidth/t.scale,width:window.innerWidth/t.scale*3,height:window.innerWidth/t.scale*3,fill:"rgba(0,0,0,0.3)"}),(0,p.jsx)(rK,{listening:!1,image:R,x:e.x,y:e.y,width:e.width,height:e.height,rotation:e.rotation,shadowEnabled:e.shadowEnabled,shadowBlur:e.shadowBlur}),(0,p.jsxs)(rq,{x:e.x,y:e.y,rotation:e.rotation,scaleX:I,scaleY:I,children:[(0,p.jsx)(rK,{image:b,ref:s,opacity:.4,draggable:!0,x:-e.cropX*b.width,y:-e.cropY*b.height,onDragMove:F,onTransform:F}),(0,p.jsx)(rZ,{ref:D,anchorSize:20,enabledAnchors:["top-left","top-right","bottom-left","bottom-right"],boundBoxFunc:(e,t)=>t.width<5||t.height<5?e:t,rotateEnabled:!1,borderEnabled:!1,anchorCornerRadius:10,anchorStrokeWidth:2,borderStrokeWidth:2}),(0,p.jsx)(rW,{width:n,height:r,ref:L,listening:!1,onTransform:t=>{t.target.x()<-e.cropX*b.width-1e-9&&(t.target.x(-e.cropX*b.width),t.target.scaleX(1)),t.target.y()<-e.cropY*b.height-1e-9&&(t.target.y(-e.cropY*b.height),t.target.scaleY(1));let n=Math.min(1,Math.max(0,e.cropX+t.target.x()/b.width)),r=Math.min(1,Math.max(0,t.target.y()/b.height+e.cropY)),i=t.target.width()*t.target.scaleX(),o=t.target.height()*t.target.scaleY(),a=Math.min(1-n,i/b.width),l=Math.min(1-r,o/b.height),s=t.target.getAbsolutePosition(t.target.getParent().getParent());t.target.scale({x:1,y:1}),t.target.position({x:0,y:0}),e.set({x:s.x,y:s.y,cropX:n,cropY:r,cropWidth:a,cropHeight:l,width:Math.min(i*I,b.width*(1-n)*I),height:Math.min(o*I,b.height*(1-r)*I)})}}),(0,p.jsx)(rZ,{ref:M,enabledAnchors:["top-left","top-right","bottom-left","bottom-right"],boundBoxFunc:(e,t)=>t.width<5||t.height<5?e:t,keepRatio:!1,rotateEnabled:!1,anchorFill:"rgb(240, 240, 240)",anchorStrokeWidth:2,borderStrokeWidth:2})]})]}),(u||d)&&(0,p.jsx)(iN,{element:e})]})});var v=h("8NFma");let aj=({width:e,height:t,cornerRadius:n})=>{if(n>0){let r=Math.min(n,e/2,t/2);return`M 0 ${r} A ${r} ${r} 0 0 1 ${r} 0 L ${e-r} 0 A ${r} ${r} 0 0 1 ${e} ${r} L ${e} ${t-r} A ${r} ${r} 0 0 1 ${e-r} ${t} L ${r} ${t} A ${r} ${r} 0 0 1 0 ${t-r} Z`}return`M 0 0 L ${e} 0 L ${e} ${t} L 0 ${t} Z`};function aR({path:e,aspectRatio:t,width:n,height:r}){return{path:e,scaleX:n/t.width,scaleY:r/t.height}}let aI={rect:aj,circle:({width:e,height:t})=>`M ${e/2} ${t/2} m -${e/2}, 0 a ${e/2},${t/2} 0 1,0 ${e},0 a ${e/2},${t/2} 0 1,0 -${e},0`,star:function({width:e,height:t}){let n=e/2,r=t/2,i=e/2,o=t/2,a=i/2,l=o/2,s="",u=Math.PI/5;for(let e=0;e<10;e++){let t=e%2==0?i:a,c=e%2==0?o:l,d=n+t*Math.sin(e*u),h=r-c*Math.cos(e*u);0===e?s=`M ${d} ${h}`:s+=` L ${d} ${h}`}return s+" Z"},triangle:({width:e,height:t})=>`M ${e/2} 0 L ${e} ${t} L 0 ${t} Z`,rightTriangle:({width:e,height:t})=>`M 0 0 L ${e} 0 L 0 ${t} Z`,diamond:function({width:e,height:t}){let n=e/2,r=t/2;return`M ${n} 0 L ${e} ${r} L ${n} ${t} L 0 ${r} Z`},pentagon:function({width:e,height:t}){let n=e/2,r=t/2,i=e/2,o=t/2,a="",l=2*Math.PI/5;for(let e=0;e<5;e++){let t=n+i*Math.sin(e*l),s=r-o*Math.cos(e*l);0===e?a=`M ${t} ${s}`:a+=` L ${t} ${s}`}return a+" Z"},hexagon:function({width:e,height:t}){let n=e/2,r=t/2,i=e/2,o=t/2,a="",l=2*Math.PI/6;for(let e=0;e<6;e++){let t=n+i*Math.sin(e*l),s=r-o*Math.cos(e*l);0===e?a=`M ${t} ${s}`:a+=` L ${t} ${s}`}return a+" Z"},speechBubble:function({width:e,height:t}){let n=.1*Math.min(e,t),r=.2*e,i=.2*t,o=.5*e;return`M ${n},0 H ${e-n} A ${n},${n} 0 0 1 ${e},${n} V ${t-n-i} A ${n},${n} 0 0 1 ${e-n},${t-i} H ${o+r/2} L ${o},${t} L ${o-r/2},${t-i} H ${n} A ${n},${n} 0 0 1 0,${t-n-i} V ${n} A ${n},${n} 0 0 1 ${n},0 Z`},cross:function({width:e,height:t}){let n=.3*e,r=.3*t,i=e/2,o=t/2,a=i-n/2,l=i+n/2,s=o-r/2,u=o+r/2;return`M ${a},0 H ${l} V ${s} H ${e} V ${u} H ${l} V ${t} H ${a} V ${u} H 0 V ${s} H ${a} V 0 Z`},arc:({width:e,height:t})=>aR({path:"M234 117C234 85.97 221.673 56.21 199.731 34.269C177.79 12.327 148.03 0 117 0C85.97 0 56.2103 12.327 34.2685 34.268C12.3268 56.21 0 85.97 0 117H117H234Z",aspectRatio:{width:234,height:117},width:e,height:t}),cloud:({width:e,height:t})=>aR({path:"M216.41 57.006C216.961 54.084 217.249 51.069 217.249 47.986C217.249 21.4841 195.972 0 169.725 0C153.666 0 139.467 8.043 130.865 20.3575C122.606 13.3566 111.954 9.1402 100.327 9.1402C74.3322 9.1402 53.2123 30.2136 52.8094 56.364H52.8035C23.6407 56.364 0 80.235 0 109.682C0 139.129 23.6407 163 52.8035 163H208.197C237.359 163 261 139.129 261 109.682C261 83.056 241.672 60.99 216.41 57.006Z",aspectRatio:{width:261,height:163},width:e,height:t}),rightArrow:({width:e,height:t})=>{let n=.6*e;return`M 0 ${t/4} L ${n} ${t/4} L ${n} 0 L ${e} ${t/2} L ${n} ${t} L ${n} ${.75*t} L 0 ${.75*t} Z`},leftArrow:({width:e,height:t})=>{let n=.4*e;return`M ${e} ${t/4} L ${n} ${t/4} L ${n} 0 L 0 ${t/2} L ${n} ${t} L ${n} ${.75*t} L ${e} ${.75*t} Z`},downArrow:({width:e,height:t})=>{let n=.6*t;return`M ${e/4} 0 L ${e/4} ${n} L 0 ${n} L ${e/2} ${t} L ${e} ${n} L ${.75*e} ${n} L ${.75*e} 0 Z`},upArrow:({width:e,height:t})=>{let n=.4*t;return`M ${e/4} ${t} L ${e/4} ${n} L 0 ${n} L ${e/2} 0 L ${e} ${n} L ${.75*e} ${n} L ${.75*e} ${t} Z`},asterisk1:({width:e,height:t})=>aR({path:"M45.5265 218.498C51.5466 222.87 58.5359 224.98 65.4742 224.98C75.916 224.98 86.221 220.2 92.853 211.217C92.872 211.198 92.89 211.178 92.907 211.157C92.923 211.136 92.939 211.115 92.954 211.094L92.977 211.061C92.993 211.039 93.008 211.017 93.023 210.996L116.491 178.725L139.959 210.996C139.982 211.031 140.006 211.058 140.029 211.088C140.04 211.102 140.05 211.116 140.061 211.132C151.115 226.188 172.355 229.505 187.473 218.515C202.608 207.526 205.992 186.278 195.074 171.104L195.05 171.066C195.03 171.034 195.014 171.01 194.989 170.985L171.572 138.696L209.512 126.346C227.334 120.545 237.129 101.305 231.33 83.476C225.532 65.648 206.315 55.8493 188.476 61.6334L150.537 73.933L150.52 34.0064C150.502 15.2594 135.248 0 116.508 0C97.768 0 82.514 15.2594 82.497 34.0234L82.463 73.916L44.5233 61.6163C44.5083 61.6163 44.49 61.613 44.4716 61.6078C44.4477 61.6014 44.4232 61.5918 44.4041 61.5823C26.5992 55.8664 7.45076 65.665 1.66886 83.46C-4.11314 101.254 5.61427 120.426 23.3511 126.278C23.3675 126.283 23.3822 126.289 23.3963 126.295L23.4588 126.319L23.4873 126.329L61.4098 138.679L37.9929 170.968C37.9844 170.985 37.9718 171.002 37.9591 171.019C37.9462 171.036 37.9336 171.053 37.9251 171.07C26.9903 186.244 30.3915 207.509 45.5265 218.498Z",aspectRatio:{width:233,height:225},width:e,height:t}),asterisk2:({width:e,height:t})=>aR({path:"M46.0556 112L0 85.388L33.9456 26.6121L80.028 53.1781L80.054 0H147.946L147.972 53.1781L194.054 26.6121L228 85.388L181.944 112L228 138.612L194.054 197.388L147.972 170.822L147.946 224H80.054L80.028 170.822L33.9456 197.388L0 138.612L46.0556 112Z",aspectRatio:{width:228,height:224},width:e,height:t}),bookmark:({width:e,height:t})=>aR({path:"M0 0H199V238L99.5 142.8L0 238V0Z",aspectRatio:{width:199,height:238},width:e,height:t}),butterfly:({width:e,height:t})=>aR({path:"M94.5 100.713C91.935 150.916 50.703 190.909 0 191.493V0C50.703 0.5845 91.935 40.5767 94.5 90.78C97.031 41.2385 137.217 1.6407 187 0.0438004V191.45C137.217 189.853 97.031 150.255 94.5 100.713Z",aspectRatio:{width:187,height:192},width:e,height:t}),cylinder:({width:e,height:t})=>aR({path:"M169 36.8497V218.15C169 238.502 131.168 255 84.5 255C37.832 255 0 238.502 0 218.15V36.8497C0 16.4982 37.832 0 84.5 0C131.168 0 169 16.4982 169 36.8497Z",aspectRatio:{width:169,height:255},width:e,height:t}),diamond2:({width:e,height:t})=>aR({path:"M0 55.5L124 185L248 55.5L189.307 0H58.6933L0 55.5Z",aspectRatio:{width:248,height:185},width:e,height:t}),door:({width:e,height:t})=>aR({path:"M140 69.697C140 31.2044 108.66 0 70 0C31.34 0 0 31.2044 0 69.697V207H140V69.697Z",aspectRatio:{width:140,height:207},width:e,height:t}),drop1:({width:e,height:t})=>aR({path:"M167 150.687C167 196.328 129.407 234 83.139 234C37.593 234 0 196.328 0 150.687C0 100.7 51.329 36.9474 83.139 0C114.948 39.1207 167 98.526 167 150.687Z",aspectRatio:{width:167,height:234},width:e,height:t}),drop2:({width:e,height:t})=>aR({path:"M73 239C53.64 239 35.071 231.315 21.3812 217.634C7.691 203.954 0 185.4 0 166.054C0 136.091 13.8696 113.633 30.768 86.27C43.912 64.9877 58.888 40.7377 70.597 7.6816C71.281 5.7496 72.989 0 72.989 0C72.989 0 72.993 0.0124998 73 0.0363998C73.007 0.0124998 73.011 0 73.011 0C73.011 0 74.719 5.7496 75.403 7.6816C87.112 40.7377 102.088 64.9877 115.232 86.27C132.13 113.633 146 136.091 146 166.054C146 185.4 138.309 203.954 124.619 217.634C111.025 231.218 92.225 239 73 239Z",aspectRatio:{width:146,height:239},width:e,height:t}),explosion:({width:e,height:t})=>aR({path:"M165.802 184.465L118.997 260L125.343 182.079L34.9058 219.45L99.164 159.817L0 163.792L78.538 134.373L0 74.7401L86.471 89.052V0L118.997 89.052L165.802 10.3364L149.143 97.798L217.368 29.419L165.802 112.905L245.927 81.101L165.802 143.914H261L165.802 184.465Z",aspectRatio:{width:261,height:260},width:e,height:t}),flag:({width:e,height:t})=>aR({path:"M0 142.161C0 142.161 51.9956 118.626 103 137.469C159.992 158.525 206 141.31 206 141.31V11.1373C206 11.1373 160 28.3218 103.016 7.28273C52 -11.553 0 12.0974 0 12.0974V142.161Z",aspectRatio:{width:206,height:148},width:e,height:t}),flower:({width:e,height:t})=>aR({path:"M135.351 66.1893C196.683 -5.00591 256.536 100.304 164.908 117.361C256.536 135.16 195.944 239.728 135.351 168.532C166.386 257.526 45.9394 256.785 76.975 168.532C15.643 239.728 -44.2109 135.16 47.4173 117.361C-44.9498 100.304 15.643 -4.26431 76.975 66.1893C45.2005 -22.0631 166.386 -22.0631 135.351 66.1893ZM105.793 104.012C113.183 104.012 119.833 109.945 119.833 117.361C119.833 124.777 113.183 131.452 105.793 131.452C98.404 131.452 92.492 124.777 92.492 117.361C92.492 109.945 98.404 104.012 105.793 104.012Z",aspectRatio:{width:212,height:235},width:e,height:t}),frame:({width:e,height:t})=>aR({path:"M0 0H240L200 88L240 176H0L40 88L0 0Z",aspectRatio:{width:240,height:176},width:e,height:t}),heart1:({width:e,height:t})=>aR({path:"M215.886 56.157C215.886 24.729 191.112 0 160.584 0C135.933 0 115.08 16.983 107.937 39.93C100.788 16.986 79.935 0.591 55.284 0.591C24.75 0.591 0 24.615 0 56.055C0 71.919 6.321 83.127 16.494 95.121L107.988 189.447L199.377 95.121C209.559 83.127 215.886 72.009 215.886 56.157Z",aspectRatio:{width:216,height:190},width:e,height:t}),home:({width:e,height:t})=>aR({path:"M0 62.143L95.5 0L191 62.143V195H0V62.143Z",aspectRatio:{width:191,height:195},width:e,height:t}),home2:({width:e,height:t})=>aR({path:"M206 94.076L103 0L0 94.076H31.2377V189H175.607V94.076H206Z",aspectRatio:{width:206,height:189},width:e,height:t}),hourglass:({width:e,height:t})=>aR({path:"M0.392782 0H187.607C193.014 43.3688 140.804 53.797 140.804 97.5C140.804 141.203 193.014 151.631 187.607 195H0.392782C-5.01452 151.631 47.196 141.203 47.196 97.5C47.196 53.797 -5.01452 43.3688 0.392782 0Z",aspectRatio:{width:188,height:195},width:e,height:t}),house:({width:e,height:t})=>aR({path:"M0 92.367L95 0L190 92.367V223H0V92.367Z",aspectRatio:{width:190,height:223},width:e,height:t}),keyhole:({width:e,height:t})=>aR({path:"M115 57.0494C115 25.5387 89.416 0 57.863 0C26.311 0 0.726898 25.5414 0.726898 57.0494C0.726898 78.652 12.759 97.451 30.505 107.136L0 219H114.845L84.448 107.524C102.608 97.962 115 78.959 115 57.0494Z",aspectRatio:{width:115,height:219},width:e,height:t}),kiss:({width:e,height:t})=>aR({path:"M124.5 17.1468C80.036 -36.5162 0 52.9218 0 52.9218C0 52.9218 44.4643 120 124.5 120C204.536 120 249 52.9218 249 52.9218C249 52.9218 168.964 -36.5162 124.5 17.1468Z",aspectRatio:{width:249,height:120},width:e,height:t}),leaf:({width:e,height:t})=>aR({path:"M204.414 0.0151567C204.414 0.0151567 206.837 93.9509 150.394 150.394C93.9507 206.837 0.0151569 204.413 0.0151569 204.413C0.0151569 204.413 -2.40835 110.478 54.0347 54.0349C110.478 -2.40834 204.414 0.0151567 204.414 0.0151567Z",aspectRatio:{width:205,height:205},width:e,height:t}),lightning1:({width:e,height:t})=>aR({path:"M111.5 0L0 142H51.433L31.5 253L143 111H91.567L111.5 0Z",aspectRatio:{width:143,height:253},width:e,height:t}),lightning2:({width:e,height:t})=>aR({path:"M126 0H43L0 120.531H36L6 227L110 80.354H73L126 0Z",aspectRatio:{width:126,height:227},width:e,height:t}),magnet:({width:e,height:t})=>aR({path:"M88.402 0H0V67.669H88.402C105.271 67.669 118.957 81.308 118.957 98C118.957 114.689 105.271 128.331 88.402 128.331H0V196H88.402C142.747 196 187 152.072 187 98C187 43.9279 142.747 0 88.402 0Z",aspectRatio:{width:187,height:196},width:e,height:t}),mithosis:({width:e,height:t})=>aR({path:"M150.996 136.45C137.141 128.926 117.559 128.7 103.532 135.896C93.843 140.867 82.875 143.67 71.2577 143.67C31.9033 143.67 0 111.508 0 71.835C0 32.161 31.9033 0 71.2577 0C83.467 0 94.959 3.0955 105.004 8.5504C118.859 16.0745 138.441 16.3 152.467 9.1038C162.157 4.1328 173.125 1.3303 184.742 1.3303C224.097 1.3303 256 33.492 256 73.165C256 112.839 224.097 145 184.742 145C172.533 145 161.041 141.905 150.996 136.45Z",aspectRatio:{width:256,height:145},width:e,height:t}),orangeRicky:({width:e,height:t})=>aR({path:"M69 0H0V69V138V207H69H138V138H69V69V0Z",aspectRatio:{width:138,height:207},width:e,height:t}),party:({width:e,height:t})=>aR({path:"M134.622 0L144.682 68.2539L174.415 5.9977L163.91 74.1846L210.671 23.4578L180.535 85.519L240.169 50.8289L193.079 101.25L260.29 85.679L200.43 119.98L269.245 124.911L201.934 140.044L266.237 165.04L197.456 159.661L251.535 202.5L187.396 177.086L226.445 233.962L172.646 190.771L193.197 256.631L154.518 199.501L154.743 268.492L134.622 202.5L114.501 268.492L114.727 199.501L76.0482 256.631L96.5985 190.771L42.7992 233.962L81.8489 177.086L17.7091 202.5L71.7885 159.661L3.0072 165.04L67.3112 140.044L0 124.911L68.8149 119.98L8.9545 85.679L76.1658 101.25L29.0753 50.8289L88.7105 85.519L58.5743 23.4578L105.335 74.1846L94.8305 5.9977L124.562 68.2539L134.622 0Z",aspectRatio:{width:270,height:269},width:e,height:t}),pillow:({width:e,height:t})=>aR({path:"M176 0.00169945C157.812 16.9062 125.203 28.174 88.001 28.174C50.798 28.174 18.1881 16.9054 0 0V258.421C18.1882 241.516 50.798 230.248 88 230.248C125.202 230.248 157.812 241.516 176 258.421V0.00169945Z",aspectRatio:{width:176,height:259},width:e,height:t}),polygon:({width:e,height:t})=>aR({path:"M110 0L219.119 63V189L110 252L0.880798 189V63L110 0Z",aspectRatio:{width:220,height:252},width:e,height:t}),rainbow:({width:e,height:t})=>aR({path:"M186.907 141H282C282 63.128 218.872 0 141 0C63.1278 0 0 63.128 0 141H95.093C95.093 115.646 115.646 95.093 141 95.093C166.354 95.093 186.907 115.646 186.907 141Z",aspectRatio:{width:282,height:141},width:e,height:t}),rhodeIsland:({width:e,height:t})=>aR({path:"M69 0H0V69V138H69V207H138V138V69H69V0Z",aspectRatio:{width:138,height:207},width:e,height:t}),shell:({width:e,height:t})=>aR({path:"M109 0C169.199 0 218 48.743 218 108.87C185.392 108.87 158.958 135.273 158.958 167.842C158.958 179.736 158.958 191 158.958 191H59.042C59.042 191 59.042 179.736 59.042 167.842C59.042 135.273 32.6077 108.87 0 108.87C0 48.743 48.8007 0 109 0Z",aspectRatio:{width:218,height:191},width:e,height:t}),shield1:({width:e,height:t})=>aR({path:"M203.184 30.7277C142.457 30.7277 102.853 0 102.853 0C102.853 0 63.249 30.7277 3.05098 30.7277C3.05098 30.7277 -3.81372 128.209 3.05098 162.115C9.38758 193.902 102.853 249 102.853 249C102.853 249 196.319 193.902 203.184 162.115C209.52 128.738 203.184 30.7277 203.184 30.7277Z",aspectRatio:{width:206,height:249},width:e,height:t}),shield2:({width:e,height:t})=>aR({path:"M0 12.9585C64.624 -4.3195 136.376 -4.3195 201 12.9585C201 51.0564 201 89.154 201 127.252C201 184.396 100.498 240 100.498 240C100.498 240 0 184.406 0 127.252C0 89.154 0 51.0564 0 12.9585Z",aspectRatio:{width:201,height:240},width:e,height:t}),skewedRectangle:({width:e,height:t})=>aR({path:"M85.9799 0H290L204.02 141H0L85.9799 0Z",aspectRatio:{width:290,height:141},width:e,height:t}),softFlower:({width:e,height:t})=>aR({path:"M109 0C80.073 0 56.6234 23.4498 56.6234 52.3766C56.6234 54.722 54.722 56.6234 52.3766 56.6234C23.4498 56.6234 0 80.073 0 109C0 137.927 23.4498 161.377 52.3766 161.377C54.722 161.377 56.6234 163.278 56.6234 165.623C56.6234 194.55 80.073 218 109 218C137.927 218 161.377 194.55 161.377 165.623C161.377 163.278 163.278 161.377 165.623 161.377C194.55 161.377 218 137.927 218 109C218 80.073 194.55 56.6234 165.623 56.6234C163.278 56.6234 161.377 54.722 161.377 52.3766C161.377 23.4498 137.927 0 109 0Z",aspectRatio:{width:218,height:218},width:e,height:t}),softStar:({width:e,height:t})=>aR({path:"M130.424 3.17662C130.927 -1.05888 137.073 -1.05888 137.576 3.17662L141.792 38.7086C147.236 84.59 183.41 120.764 229.291 126.208L264.823 130.424C269.059 130.927 269.059 137.073 264.823 137.576L229.291 141.792C183.41 147.236 147.236 183.41 141.792 229.291L137.576 264.823C137.073 269.059 130.927 269.059 130.424 264.823L126.208 229.291C120.764 183.41 84.59 147.236 38.7086 141.792L3.17662 137.576C-1.05888 137.073 -1.05888 130.927 3.17662 130.424L38.7086 126.208C84.59 120.764 120.764 84.59 126.208 38.7086L130.424 3.17662Z",aspectRatio:{width:268,height:268},width:e,height:t}),stairs1:({width:e,height:t})=>aR({path:"M0 0H67.667V67.667H135.333V135.333H203V203H0V0Z",aspectRatio:{width:203,height:203},width:e,height:t}),stairs2:({width:e,height:t})=>aR({path:"M50 0H0V200H200V150H150V100H100V50H50V0Z",aspectRatio:{width:200,height:200},width:e,height:t}),teewee:({width:e,height:t})=>aR({path:"M69 0H138V69H207V138H138H69H0V69H69V0Z",aspectRatio:{width:207,height:138},width:e,height:t}),blob1:({width:e,height:t})=>aR({path:"M172.979 19.611C191.285 33.0858 204.505 54.442 210.861 78.5949C217.471 103.002 217.471 130.46 205.776 151.816C194.335 173.427 171.454 189.444 147.047 196.054C122.639 202.919 96.7069 200.631 75.3506 190.715C54.2486 180.546 37.7229 163.003 23.4855 142.155C9.5022 121.307 -2.19289 97.4087 0.349524 74.7813C3.14617 52.1538 19.9261 30.7976 40.2654 17.8313C60.6046 4.61077 84.5033 -0.474048 108.148 0.0344341C131.538 0.542916 154.928 6.13621 172.979 19.611Z",aspectRatio:{width:216,height:200},width:e,height:t}),blob10:({width:e,height:t})=>aR({path:"M188.684 8.95173C205.601 24.3309 200.988 63.0866 191.453 99.3816C182.225 135.677 168.076 169.511 146.238 175.355C124.399 181.507 94.871 159.668 66.5733 143.059C37.9679 126.449 10.5929 115.068 2.59569 95.0754C-5.4015 75.0824 5.97912 46.1694 24.4342 30.4826C42.8893 14.7958 68.4188 12.0276 100.715 6.79864C132.704 1.5697 171.767 -6.42749 188.684 8.95173Z",aspectRatio:{width:200,height:177},width:e,height:t}),blob11:({width:e,height:t})=>aR({path:"M137.368 29.4923C148.97 46.7605 146.542 72.1231 148.161 99.1046C149.779 126.086 155.715 154.956 144.113 174.383C132.781 193.81 103.911 203.793 80.4369 198.666C56.963 193.27 38.6156 173.034 28.3626 153.607C17.8398 134.181 15.4115 115.833 9.47555 91.5498C3.53961 67.2664 -5.63411 37.3169 4.61887 20.0488C15.1417 2.51078 45.0911 -1.80626 72.8821 0.622074C100.673 2.78059 126.036 12.2241 137.368 29.4923Z",aspectRatio:{width:152,height:200},width:e,height:t}),blob12:({width:e,height:t})=>aR({path:"M158.391 17.923C172.491 28.5703 180.261 48.1384 187.743 70.5842C194.937 93.3177 202.419 118.641 194.649 138.785C187.167 158.928 164.146 173.317 138.535 184.54C112.923 196.05 84.4347 204.108 58.8235 197.777C33.2123 191.446 10.191 170.439 2.99688 146.267C-4.48504 121.807 3.57241 94.181 10.4788 68.282C17.0974 42.0953 22.565 17.6352 37.8166 7.27563C53.0682 -3.37171 78.1038 0.081487 100.837 2.67138C123.859 5.26127 144.29 7.27563 158.391 17.923Z",aspectRatio:{width:198,height:200},width:e,height:t}),blob13:({width:e,height:t})=>aR({path:"M149.668 1.37595C170.663 5.22017 193.728 17.3442 198.755 34.7911C204.078 52.2379 191.363 75.3032 178.943 93.9329C166.819 112.563 154.99 126.757 140.501 145.386C126.011 164.312 108.86 187.673 92.5957 186.194C76.3317 185.011 60.9549 159.285 45.8737 140.655C30.4968 122.321 15.7114 110.788 7.43151 95.1157C-0.848339 79.4432 -2.32688 59.0392 3.5873 41.5924C9.50148 23.8498 23.1041 8.76868 38.7767 3.44592C54.745 -1.87685 73.3746 2.55879 91.7086 2.26308C110.338 2.26308 128.968 -2.17256 149.668 1.37595Z",aspectRatio:{width:200,height:187},width:e,height:t}),blob14:({width:e,height:t})=>aR({path:"M137.838 28.6426C150.711 40.5617 165.014 46.5213 178.363 58.2021C191.474 69.8828 203.87 87.0464 198.864 99.6807C193.858 112.315 171.689 120.42 157.862 135.676C144.275 151.171 139.269 173.579 126.873 182.161C114.477 190.505 94.9294 185.022 76.8123 178.109C58.4568 171.196 41.5316 163.091 28.1822 150.456C14.5943 137.822 4.58225 120.42 1.24488 101.826C-2.09248 83.2322 1.00651 62.9697 13.8792 52.4809C26.7519 41.992 49.1598 41.0385 65.6083 30.788C82.0567 20.5376 92.0688 0.990158 103.034 0.0366268C113.762 -0.916905 125.204 16.9618 137.838 28.6426Z",aspectRatio:{width:200,height:187},width:e,height:t}),blob15:({width:e,height:t})=>aR({path:"M185.203 1.52939C197.679 7.62217 200 32.2835 200 51.7223C200 71.1612 197.389 85.3777 197.679 100.175C198.259 114.681 201.741 129.768 198.259 143.114C194.778 156.46 184.623 168.356 171.567 173.868C158.801 179.671 143.134 179.091 130.368 174.739C117.312 170.387 106.867 162.263 86.8482 160.812C66.539 159.362 36.9454 164.294 18.9572 155.3C0.968966 146.306 -5.41395 123.095 5.03083 105.977C15.4756 88.5692 42.4579 77.5442 55.5139 59.5559C68.2798 41.8578 67.1192 17.4867 76.9837 9.6531C86.5581 2.10965 107.158 11.3939 128.627 9.6531C150.097 8.20244 172.728 -4.27327 185.203 1.52939Z",aspectRatio:{width:200,height:179},width:e,height:t}),blob16:({width:e,height:t})=>aR({path:"M158.441 55.3221C167.253 80.2399 160.264 105.462 147.501 134.938C134.738 164.717 116.81 199.055 97.0576 199.967C77.3057 201.182 55.7305 168.668 34.4592 133.722C13.1879 99.0802 -7.77953 62.3112 2.85612 36.4818C13.4918 10.6523 56.0344 -3.93369 90.0685 0.928322C123.799 6.09421 149.324 30.7081 158.441 55.3221Z",aspectRatio:{width:163,height:200},width:e,height:t}),blob17:({width:e,height:t})=>aR({path:"M168.917 36.7587C178.871 53.2457 175.138 76.5764 172.961 106.129C170.472 135.37 169.85 170.832 150.563 187.63C131.276 204.739 93.3252 203.495 65.0173 187.63C36.7095 172.077 18.0449 142.213 7.77943 107.373C-2.79714 72.2213 -4.35252 32.7147 14.312 14.0502C32.9765 -4.3033 72.1721 -1.50361 103.591 4.7179C135.32 10.6283 158.962 20.2717 168.917 36.7587Z",aspectRatio:{width:176,height:200},width:e,height:t}),blob18:({width:e,height:t})=>aR({path:"M178.188 21.1464C193.012 36.3069 196.381 62.9219 198.739 88.1893C200.76 113.12 201.771 136.366 190.316 149.168C178.862 162.307 155.279 164.665 135.065 167.697C115.188 170.73 99.0168 174.098 72.4018 177.131C46.1237 180.163 9.40176 182.521 1.65309 168.371C-6.09559 154.221 15.4659 123.564 23.5515 92.9059C31.6371 62.2481 26.2467 31.2534 38.3751 15.4192C50.1665 -0.0781831 79.8136 -1.08888 107.776 0.595609C136.076 1.9432 163.028 5.64909 178.188 21.1464Z",aspectRatio:{width:200,height:180},width:e,height:t}),blob19:({width:e,height:t})=>aR({path:"M148.621 13.3857C171.945 24.3818 194.937 41.3756 192.938 60.702C190.605 80.3615 163.282 101.687 149.953 123.346C136.958 145.005 137.958 166.664 128.295 174.661C118.631 182.325 98.3054 175.994 73.6476 181.991C48.9899 187.989 20.0004 205.983 11.0036 197.986C1.67366 189.989 12.6697 156.001 12.3365 131.343C12.0033 106.685 0.340809 91.0243 0.00759636 75.0301C-0.325616 59.0359 10.3372 42.3753 25.3318 28.7135C39.9931 15.0518 58.9863 4.05578 80.3119 1.05687C101.638 -2.27526 124.962 2.38972 148.621 13.3857Z",aspectRatio:{width:194,height:200},width:e,height:t}),blob2:({width:e,height:t})=>aR({path:"M140.464 18.6393C156.081 28.3718 169.887 39.9149 178.714 54.853C187.541 69.5649 191.389 87.6717 189.578 104.421C187.768 121.396 180.525 137.239 172.377 153.535C164.455 169.832 155.854 186.58 142.048 194.276C128.241 201.971 109.456 200.613 92.4804 197.671C75.2789 194.502 60.1144 189.749 45.1762 182.733C30.4644 175.716 16.2052 166.21 8.28346 153.083C0.361703 139.729 -1.44898 122.527 1.04072 106.91C3.30408 91.2931 9.64147 76.8076 15.9789 60.5114C22.0899 44.2153 28.201 26.1084 40.6495 14.7916C53.0979 3.24849 71.8838 -1.27823 89.7643 0.306124C107.871 1.66414 124.846 9.13322 140.464 18.6393Z",aspectRatio:{width:191,height:200},width:e,height:t}),blob20:({width:e,height:t})=>aR({path:"M150.035 13.2464C157.376 24.9386 153.026 48.323 157.92 65.7254C163.087 83.1277 177.498 94.2761 182.392 108.415C187.287 122.555 182.392 139.957 173.147 156.272C163.63 172.587 149.763 187.814 132.089 195.155C114.414 202.225 93.2053 201.137 73.6276 194.611C54.3219 188.357 36.9196 176.937 25.7712 161.438C14.8947 145.667 10.5441 126.09 5.92163 105.696C1.57105 85.0311 -3.05145 63.5501 2.65869 45.0601C8.64075 26.5701 24.6835 11.0711 43.1735 4.54524C61.6635 -1.98064 82.6007 0.194657 102.722 1.01039C122.844 1.82613 142.421 1.55421 150.035 13.2464Z",aspectRatio:{width:185,height:200},width:e,height:t}),blob21:({width:e,height:t})=>aR({path:"M152.611 0.184799C172.596 -0.723643 197.73 1.39606 199.85 13.8114C201.969 26.2268 181.075 48.9379 174.716 68.0151C168.357 87.0924 176.533 102.536 174.11 114.649C171.991 127.064 159.575 136.148 146.252 139.782C132.928 143.719 118.696 141.902 105.977 139.176C93.562 136.451 82.6606 132.212 63.2805 131.909C43.9004 131.606 16.0416 135.24 5.44306 125.853C-5.15543 116.465 1.50648 94.0572 10.2881 76.4939C18.7669 59.2335 29.6682 46.8182 38.7526 35.3112C48.1398 23.5015 56.3158 12.903 66.9143 8.36078C77.5128 4.12138 91.1394 6.24108 104.766 5.63546C118.696 4.72701 132.928 1.09324 152.611 0.184799Z",aspectRatio:{width:200,height:143},width:e,height:t}),blob22:({width:e,height:t})=>aR({path:"M195.507 15.5715C206.818 33.1668 193.622 69.3001 190.166 101.663C186.71 134.34 193.308 163.561 181.996 178.014C170.685 192.153 141.464 191.525 114.443 189.326C87.1072 187.44 62.2852 183.67 40.6052 169.531C19.2395 155.077 1.6441 130.255 0.0730908 103.862C-1.18372 77.4694 13.898 49.5054 35.2638 31.91C56.6296 14.0004 84.5936 6.45958 116.328 2.37494C148.063 -1.70969 184.196 -2.3381 195.507 15.5715Z",aspectRatio:{width:200,height:191},width:e,height:t}),blob23:({width:e,height:t})=>aR({path:"M135.742 9.14189C157.815 19.2326 179.258 38.4681 176.105 56.7576C172.951 74.7317 145.202 92.0751 127.858 109.734C110.83 127.077 104.523 145.052 87.4953 164.918C70.4672 184.468 42.7177 206.227 27.5816 198.343C12.4455 190.46 9.60747 153.566 6.45411 126.762C2.98542 100.274 -0.798607 84.1917 0.147399 67.1636C0.77807 50.4508 6.76944 32.4767 19.0675 20.8093C31.0503 9.14189 49.6551 3.78119 70.4672 1.2585C90.964 -1.26418 113.668 -0.633508 135.742 9.14189Z",aspectRatio:{width:177,height:200},width:e,height:t}),blob24:({width:e,height:t})=>aR({path:"M165.663 24.3715C171.555 44.4059 158.003 76.2254 151.816 96.2598C145.923 116.294 147.691 124.544 148.28 135.445C148.575 146.346 147.396 159.309 140.62 170.8C133.549 181.996 120.88 191.424 104.381 196.432C87.8821 201.441 67.553 202.03 54.8841 192.602C41.9207 183.469 36.6174 164.023 25.1271 143.105C13.3421 122.187 -4.33535 99.7953 0.967891 85.0641C6.27113 70.6275 34.2604 63.8511 56.0626 48.5307C77.5702 33.5048 92.8907 9.93489 113.22 2.56928C133.843 -4.79633 159.77 4.04241 165.663 24.3715Z",aspectRatio:{width:168,height:200},width:e,height:t}),blob25:({width:e,height:t})=>aR({path:"M180.115 1.256C192.651 2.1962 189.83 34.163 190.771 58.2947C191.711 82.4265 196.098 98.4099 198.606 117.214C201.113 136.018 201.426 157.642 189.204 165.791C177.294 173.626 153.163 167.671 135.299 163.91C117.749 159.836 106.466 157.956 85.7818 162.97C65.0974 168.298 35.3244 180.521 18.7143 174.253C1.79068 167.985 -1.97012 142.913 0.850478 120.975C3.67107 99.0367 13.0731 79.6059 18.4009 54.8473C23.7287 30.0888 24.9823 -0.310996 40.0254 0.00240332C54.7552 0.00240332 82.9612 31.029 111.167 31.029C139.373 31.029 167.579 0.315802 180.115 1.256Z",aspectRatio:{width:200,height:176},width:e,height:t}),blob26:({width:e,height:t})=>aR({path:"M142.571 0.586925C159.976 3.39414 176.258 15.1844 184.96 30.9048C193.662 46.6253 194.224 66.8372 189.171 83.6805C183.837 100.805 172.327 114.56 163.064 129.157C153.8 143.755 146.501 158.914 134.43 173.231C122.359 187.828 105.516 201.303 89.5146 199.899C73.2327 198.776 58.0738 182.775 42.9148 169.862C28.0366 157.23 13.7198 147.685 6.42103 134.491C-0.877729 121.297 -1.15845 103.892 1.64876 88.4528C4.45598 72.7324 10.0704 58.6963 18.4921 47.4674C27.1944 36.2386 38.4233 27.8169 50.4943 22.2025C62.846 16.3073 75.7592 13.5001 91.1989 8.72785C106.919 4.23631 125.166 -1.93957 142.571 0.586925Z",aspectRatio:{width:193,height:200},width:e,height:t}),blob27:({width:e,height:t})=>aR({path:"M112.602 54.9337C129.225 71.8646 155.391 78.9448 158.777 89.719C162.471 100.493 143.693 114.654 127.07 135.586C110.447 156.519 96.2866 184.224 71.0442 194.998C46.1096 205.465 10.4008 199.308 2.0893 178.375C-6.22223 157.443 12.5557 121.734 18.4045 92.1817C24.5612 62.6296 17.7889 38.9263 26.4082 21.9954C34.7197 5.06454 58.423 -5.40183 73.5069 2.9097C88.8986 10.9134 95.9788 38.0028 112.602 54.9337Z",aspectRatio:{width:160,height:200},width:e,height:t}),blob28:({width:e,height:t})=>aR({path:"M125.281 68.5835C142.15 82.9923 165.344 90.021 181.862 108.998C198.028 127.624 207.516 158.902 192.405 166.634C177.293 174.716 137.581 159.605 112.629 156.442C87.326 152.928 77.1344 161.713 59.9142 165.579C43.0453 169.445 19.1478 168.391 11.7677 157.496C4.73907 146.25 14.2278 124.813 11.4163 94.2382C8.2534 63.6634 -6.85825 23.9514 3.68476 8.48836C14.2278 -7.32615 50.4254 1.10826 73.9715 16.2199C97.5175 31.683 108.412 54.1747 125.281 68.5835Z",aspectRatio:{width:200,height:169},width:e,height:t}),blob29:({width:e,height:t})=>aR({path:"M162.987 10.2348C169.16 25.1809 154.864 58.6471 147.066 79.4417C139.268 100.236 138.293 108.359 134.719 114.532C131.47 120.706 125.297 124.93 119.448 143.45C113.6 161.97 107.426 194.461 98.004 199.335C88.5814 204.209 75.5849 181.14 55.7651 167.494C35.6203 153.522 8.65241 148.648 1.8292 135.327C-4.994 122.33 8.65241 100.561 20.0244 82.041C31.3964 63.5208 40.1691 48.2498 53.4906 35.5782C66.8122 22.9065 84.0326 13.159 106.452 6.33584C128.871 -0.812285 156.489 -4.71127 162.987 10.2348Z",aspectRatio:{width:165,height:200},width:e,height:t}),blob3:({width:e,height:t})=>aR({path:"M158.095 64.2637C176.543 95.19 192.277 129.1 181.697 155.686C171.117 182.001 133.951 201.533 99.4982 199.905C64.7739 198.549 33.0338 176.032 15.4004 145.377C-2.23296 114.994 -5.75963 76.2002 10.2461 46.6303C26.2518 17.0605 61.5185 -3.557 89.732 0.512241C118.217 4.58149 139.377 33.0662 158.095 64.2637Z",aspectRatio:{width:186,height:200},width:e,height:t}),blob30:({width:e,height:t})=>aR({path:"M146.076 34.4585C157.052 54.582 155.833 80.1936 164.675 100.622C173.212 121.355 191.201 136.905 189.372 149.711C187.542 162.212 165.285 171.969 146.99 175.018C129.001 178.372 114.671 174.713 103.39 175.018C92.1083 175.018 83.876 178.982 66.8015 186.299C49.7271 193.617 23.8105 204.288 14.3586 198.19C4.90665 191.787 11.6145 168.615 10.3949 147.882C8.87037 127.148 -0.581561 108.549 0.0282404 89.3407C0.638042 70.1319 11.6145 50.6182 28.384 32.934C44.8487 15.5546 67.4113 0.309578 89.974 0.00467694C112.537 -0.300224 135.099 14.335 146.076 34.4585Z",aspectRatio:{width:190,height:200},width:e,height:t}),blob31:({width:e,height:t})=>aR({path:"M134.218 44.0392C153.568 36.4264 184.97 26.9105 195.755 33.2544C206.222 39.9156 195.755 62.1194 181.481 76.3933C166.89 90.35 148.175 96.0596 145.638 116.36C143.1 136.661 156.74 171.235 151.664 183.923C146.589 196.928 123.434 187.413 105.036 178.531C86.6388 169.967 73.3165 161.72 52.0643 158.548C30.812 155.058 1.62986 156.644 0.0438693 145.225C-1.22492 133.806 25.4197 109.382 29.2261 86.8609C32.7152 64.3398 13.6834 44.0392 11.7802 26.9105C9.877 9.46461 24.7853 -4.80928 42.5484 1.53467C59.9942 7.87863 79.9777 34.5232 93.6172 45.308C107.257 56.4099 114.869 51.3347 134.218 44.0392Z",aspectRatio:{width:200,height:191},width:e,height:t}),blob32:({width:e,height:t})=>aR({path:"M200 100.339C200 149.831 145.763 197.966 95.5932 197.966C45.7627 197.966 0 149.831 0 100.339C0 50.8475 45.7627 0 95.5932 0C145.763 0 200 50.8475 200 100.339Z",aspectRatio:{width:200,height:198},width:e,height:t}),blob4:({width:e,height:t})=>aR({path:"M183.427 38.712C198.21 63.2519 196.141 95.1833 189.341 126.523C182.836 157.863 171.305 188.908 150.609 197.482C130.208 205.76 100.642 192.16 69.8936 177.968C39.4405 164.072 7.80478 150.176 1.30024 128.593C-5.2043 107.01 13.718 77.7393 35.3012 51.7211C56.5888 25.9986 81.1287 3.23272 108.921 0.276112C137.009 -2.38484 168.349 14.4678 183.427 38.712Z",aspectRatio:{width:195,height:200},width:e,height:t}),blob5:({width:e,height:t})=>aR({path:"M166.251 30.6913C183.816 48.5185 195.875 71.8512 199.021 98.8542C202.429 125.595 197.186 155.744 179.359 169.115C161.794 182.223 131.645 178.815 103.331 176.979C75.0171 175.144 48.8006 174.882 29.6625 161.512C10.7866 148.141 -0.748681 121.925 0.0378149 96.2326C0.824311 70.8025 14.1947 46.159 33.0706 28.3318C52.2087 10.5045 76.8522 -0.5064 100.971 0.0179307C125.091 0.804426 148.423 12.864 166.251 30.6913Z",aspectRatio:{width:200,height:179},width:e,height:t}),blob6:({width:e,height:t})=>aR({path:"M149.146 50.5452C161.911 68.0278 171.901 81.9028 176.619 97.9979C181.336 114.37 180.781 133.241 173.011 149.891C165.519 166.541 151.366 180.693 133.051 189.851C114.736 199.008 92.2586 202.893 71.446 197.621C50.6334 192.348 30.9308 177.918 18.1658 158.216C5.12323 138.791 -0.981801 113.815 0.128204 87.7304C1.51571 61.6453 10.6733 34.1726 29.2658 17.5226C48.1359 1.14999 76.996 -4.40004 98.9186 3.6475C120.841 11.695 136.381 32.7851 149.146 50.5452Z",aspectRatio:{width:180,height:200},width:e,height:t}),blob7:({width:e,height:t})=>aR({path:"M158.662 41.8295C178.593 57.8305 204.138 64.5677 213.402 79.7266C222.666 94.6047 215.367 118.466 203.015 135.028C190.383 151.871 172.698 161.977 156.416 168.434C140.134 174.89 124.975 177.697 104.483 185.277C83.9903 192.856 58.1642 205.208 44.9704 197.629C31.4959 190.33 31.2152 163.1 21.9514 138.116C12.9684 112.851 -4.71688 90.1132 1.17822 75.5158C7.35404 61.1991 36.8295 55.5847 58.7256 40.1452C80.9024 24.7056 95.4998 -0.278374 109.816 0.00234533C124.414 0.283064 138.45 25.8285 158.662 41.8295Z",aspectRatio:{width:218,height:200},width:e,height:t}),blob8:({width:e,height:t})=>aR({path:"M153.53 11.0108C168.179 18.1858 181.931 29.5461 192.993 44.4939C203.755 59.4417 212.425 78.2759 210.631 96.5122C209.136 114.748 197.477 132.088 182.529 142.252C167.581 152.716 148.747 156.004 128.717 168.262C108.687 180.22 87.1622 201.147 69.8228 199.951C52.7823 198.456 39.6283 174.54 32.4533 153.015C25.2784 131.49 24.0826 112.357 16.6087 91.131C9.13477 70.2041 -4.31825 46.8855 1.36191 31.9377C7.04207 16.691 31.8554 9.51607 52.7823 5.33069C73.4103 0.846349 90.4507 -0.648433 106.594 0.248435C123.037 1.1453 138.882 4.13486 153.53 11.0108Z",aspectRatio:{width:211,height:200},width:e,height:t}),blob9:({width:e,height:t})=>aR({path:"M140.289 20.2182C156.96 27.7956 176.661 32.0895 189.29 43.9608C201.667 55.5796 206.718 75.0283 202.424 91.6987C198.131 108.622 184.491 122.766 175.651 140.952C166.81 158.885 162.769 180.607 150.393 191.216C138.016 201.824 117.052 201.572 98.866 197.025C80.6802 192.479 65.2727 183.891 48.3497 175.808C31.4268 167.726 13.2409 160.148 5.1583 146.761C-2.67172 133.122 -0.398493 113.673 4.14797 96.7504C8.69444 80.08 15.5141 65.6828 23.3442 52.296C31.4268 38.6566 40.5197 25.775 52.6436 15.6717C65.0201 5.82101 80.6802 -1.50385 95.3299 0.264221C109.98 1.77971 123.619 12.6407 140.289 20.2182Z",aspectRatio:{width:204,height:200},width:e,height:t})};function aL(e){let{subType:t}=e,n=aI[t]||aj;return n?function(e,t){let{width:n,height:r,fill:i,stroke:o,strokeWidth:a,dash:l}=e,s=(l||[]).map(e=>e*a),u=t(e),c=1,d=1;"string"!=typeof u&&(c=u.scaleX,d=u.scaleY,u=u.path);let h=`clip-${Math.random()}`;return`
|
|
97
97
|
<svg xmlns="http://www.w3.org/2000/svg" width="${n}" height="${r}">
|
|
98
98
|
<defs>
|
|
99
99
|
<clipPath id="${h}">
|
|
@@ -107,10 +107,10 @@ For more info see: https://github.com/konvajs/react-konva/issues/194
|
|
|
107
107
|
<!-- Path for the stroke, clipped by the star path -->
|
|
108
108
|
<path d="${u}" fill="none" stroke="${o}" stroke-width="${2*a}" clip-path="url(#${h})" transform="scale(${c}, ${d})" stroke-dasharray="${s.join(" ")}"/>
|
|
109
109
|
</svg>
|
|
110
|
-
`}(e,n):(console.error(`Polotno error: Can not convert ${e.subType} figure to svg.`),aj(e))}let aM=e=>P(({element:t,fillProps:n,strokeProps:r})=>{let i=e({width:t.a.width,height:t.a.height,cornerRadius:t.cornerRadius}),o=1,a=1;"string"!=typeof i&&(o=i.scaleX,a=i.scaleY,i=i.path);let s=l(v).useRef(null);return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(rW,{width:t.width,height:t.height,fill:"transparent"}),(0,p.jsx)(rX,{...n,ref:s,data:i,scaleX:o,scaleY:a}),(0,p.jsx)(rq,{clipFunc:e=>{let t=s.current;if(t){var n=t.dataArray;e.beginPath();for(var r=0;r<n.length;r++){var i=n[r].command,o=n[r].points;switch(i){case"L":e.lineTo(o[0],o[1]);break;case"M":e.moveTo(o[0],o[1]);break;case"C":e.bezierCurveTo(o[0],o[1],o[2],o[3],o[4],o[5]);break;case"Q":e.quadraticCurveTo(o[0],o[1],o[2],o[3]);break;case"A":var a=o[0],l=o[1],u=o[2],c=o[3],d=o[4],h=o[5],f=o[6],p=o[7],g=u>c?u:c,m=u>c?1:u/c,v=u>c?c/u:1;e.translate(a,l),e.rotate(f),e.scale(m,v),e.arc(0,0,g,d,d+h,1-p),e.scale(1/m,1/v),e.rotate(-f),e.translate(-a,-l);break;case"z":e.closePath()}}}},scaleX:o,scaleY:a,children:(0,p.jsx)(rX,{...r,x:0,y:0,data:i,strokeWidth:2*r.strokeWidth
|
|
110
|
+
`}(e,n):(console.error(`Polotno error: Can not convert ${e.subType} figure to svg.`),aj(e))}let aM=e=>P(({element:t,fillProps:n,strokeProps:r})=>{let i=e({width:t.a.width,height:t.a.height,cornerRadius:t.cornerRadius}),o=1,a=1;"string"!=typeof i&&(o=i.scaleX,a=i.scaleY,i=i.path);let s=l(v).useRef(null);return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(rW,{width:t.width,height:t.height,fill:"transparent"}),(0,p.jsx)(rX,{...n,ref:s,data:i,scaleX:o,scaleY:a}),(0,p.jsx)(rq,{clipFunc:e=>{let t=s.current;if(t){var n=t.dataArray;e.beginPath();for(var r=0;r<n.length;r++){var i=n[r].command,o=n[r].points;switch(i){case"L":e.lineTo(o[0],o[1]);break;case"M":e.moveTo(o[0],o[1]);break;case"C":e.bezierCurveTo(o[0],o[1],o[2],o[3],o[4],o[5]);break;case"Q":e.quadraticCurveTo(o[0],o[1],o[2],o[3]);break;case"A":var a=o[0],l=o[1],u=o[2],c=o[3],d=o[4],h=o[5],f=o[6],p=o[7],g=u>c?u:c,m=u>c?1:u/c,v=u>c?c/u:1;e.translate(a,l),e.rotate(f),e.scale(m,v),e.arc(0,0,g,d,d+h,1-p),e.scale(1/m,1/v),e.rotate(-f),e.translate(-a,-l);break;case"z":e.closePath()}}}},scaleX:o,scaleY:a,children:(0,p.jsx)(rX,{...r,x:0,y:0,data:i,strokeWidth:2*r.strokeWidth,dash:r.dash.map(e=>e)})})]})}),aD={},aF=e=>(aD[e]||(aD[e]=aM(aI[e]||aj)),aD[e]),az={text:iV,image:oa,svg:oa,line:ay,video:aN,figure:P(({element:e,store:t})=>{let n=e.selectable||"admin"===t.role,r=iI(),[i,o]=l(v).useState(!1),a=t.selectedElements.indexOf(e)>=0&&1===t.selectedElements.length,s=Math.min(e.strokeWidth,e.width/2,e.height/2),u=Math.max(0,Math.min(e.width/2,e.height/2,e.cornerRadius)),c=ia(e,e.a.fill,"fill"),d={width:e.a.width,height:e.a.height,...c,cornerRadius:u,opacity:e.animated("opacity"),shadowEnabled:e.shadowEnabled,shadowBlur:e.shadowBlur,shadowOffsetX:e.shadowOffsetX,shadowOffsetY:e.shadowOffsetY,shadowColor:e.shadowColor,shadowOpacity:e.shadowOpacity,listening:n,preventDefault:!r||a,hideInExport:!e.showInExport},h=ia(e,e.stroke,"stroke"),f={visible:s>0,x:s/2,y:s/2,width:e.a.width-s,height:e.a.height-s,...h,strokeWidth:s,cornerRadius:Math.max(0,u-s),dash:e.dash.map(e=>e*s),opacity:e.animated("opacity"),hideInExport:!e.showInExport,listening:!1},g=aF(e.subType)||rq;return(0,p.jsxs)(l(v).Fragment,{children:[(0,p.jsx)(rq,{id:e.id,x:e.a.x,y:e.a.y,rotation:e.a.rotation,opacity:e.a.opacity,draggable:r?e.draggable&&a:e.draggable,name:"element",onMouseEnter:()=>{o(!0)},onMouseLeave:()=>{o(!1)},onDragMove:t=>{e.set({x:t.target.x(),y:t.target.y()})},onDragEnd:t=>{e.set({x:t.target.x(),y:t.target.y()})},onTransform:t=>{let n=t.target.scale();t.target.scaleX(1),t.target.scaleY(1),e.set({width:e.width*n.x,height:e.height*n.y,x:t.target.x(),y:t.target.y(),rotation:t.target.rotation()})},children:(0,p.jsx)(g,{element:e,fillProps:d,strokeProps:f})}),i&&!a&&(0,p.jsx)(iN,{element:e})]})}),group:P(e=>{let{element:t,store:n}=e,{children:r}=t,i=t.selectable||"admin"===n.role;return(0,p.jsx)(rq,{opacity:t.opacity,listening:i,children:r.map(t=>(0,v.createElement)(aB,{...e,key:t.id,store:n,element:t}))})})},aB=P(e=>{let t=az[e.element.type];return("text"===e.element.type&&ik.htmlRenderEnabled&&(t=as),e.element.visible)?t?(0,p.jsx)(t,{...e}):(console.error("Can not find component for "+e.element.type),null):null});var y=h("2SBKn");let aU="https://api.polotno.com/api",aH={},aV=(e,t)=>{aH[e]||(aH[e]=!0,console.error(t))},aq=(e,t,n)=>e.replace(RegExp(t,"g"),n),aG=`API for iconscout is provided as a demonstration.
|
|
111
111
|
For production usage you have to use your own API endpoint.
|
|
112
112
|
https://iconscout.com/developers, https://iconscout.com/legal/api-license-development-agreement
|
|
113
|
-
https://polotno.com/docs/server-api`,aW={unsplashList:({query:e,page:t=1})=>`${aU}/get-unsplash?query=${e}&per_page=20&page=${t}&KEY=${a3()}`,unsplashDownload:e=>`${aU}/download-unsplash?id=${e}&KEY=${a3()}`,svgapiList:({query:e,page:t=0})=>`${aU}/get-svgapi?query=${e}&page=${t}&per_page=20&KEY=${a3()}`,svgapiDownload:e=>`${aU}/download-svgapi?path=${e}&KEY=${a3()}`,iconscoutList:({query:e,page:t=1})=>(aV("iconscout",aG),`${aU}/get-iconscout?query=${e}&page=${t}&KEY=${a3()}`),iconscoutDownload:e=>(aV("iconscout",aG),`${aU}/download-iconscout?uuid=${e}&KEY=${a3()}`),templateList:({query:e,page:t=1,sizeQuery:n})=>`${aU}/get-templates?${n}&query=${e}&per_page=30&page=${t}&KEY=${a3()}`},a$=()=>`${aU}/get-google-fonts?KEY=${a3()}`,aK=e=>`https://api.polotno.com/google-fonts-previews/black/${aq(e," ","-")}.png`,aY=()=>`${aU}/remove-image-background?KEY=${a3()}`,aX=e=>aW.templateList(e),aZ=()=>`${aU}/get-text-templates?KEY=${a3()}`,aQ=e=>aW.unsplashList(e),aJ=e=>aW.unsplashDownload(e),a0=y.observable({value:!1}),a1=y.action(()=>{a0.value=!0}),a2="",a3=()=>a2||"",a5=window.location.origin,a6=navigator.userAgent.indexOf("Headless")>-1,a4=navigator.userAgent.indexOf("Electron")>-1;"file://"===a5&&a6&&(a5="headless"),"file://"===a5&&a4&&(a5="electron");let a8=`%cPolotno error! Current domain is not allowed. It may lead to unexpected behavior and stop working. Please add "${a5}" here: https://polotno.com/cabinet`;async function a9(e){for(let n=0;n<5;n++)try{var t;let n=await fetch(aU+"/validate-key",{method:"POST",body:JSON.stringify({key:e,site:location.host})});if(!e)return console.warn("Polotno API is initialized without API key. It may lead to unexpected behavior and stop working. Please create API key here: https://polotno.com/cabinet"),!1;if(200!==n.status){await new Promise(e=>setTimeout(e,3e3));continue}let r=await n.json();return r.is_valid||console.warn("Polotno API key is not valid. Please get new API key here: https://polotno.com/cabinet"),r.is_paid||console.log("%cPolotno Free Version. Development or non-commercial usage only. https://polotno.com/","background: rgb(0, 161, 255); color: white; padding: 5px; margin: 5px;"),r.is_domain_valid||console.log(a8,"background: rgba(247, 101, 68, 1); color: white; padding: 5px; margin: 5px;"),t=r.remove_background_enabled,ix.removeBackgroundEnabled=t,r.is_paid||!1}catch(e){await new Promise(e=>setTimeout(e,3e3))}return console.error("Can not validate Polotno API key. Please report to anton@polotno.com immediately."),!0}async function a7(e,t){a2=e,(!await a9(e)||t)&&a1()}let le=({px:e,unit:t="px",dpi:n})=>{switch(t){case"pt":default:return e;case"mm":return e/(n/25.4);case"cm":return e/(n/2.54);case"in":return e/n}},lt=({px:e,precious:t=2,dpi:n=72,unit:r="px"})=>parseFloat(le({px:e,dpi:n,unit:r}).toFixed(t)),ln=({unitVal:e,dpi:t,unit:n})=>e/le({px:1,unit:n,dpi:t}),lr=e=>{let t=parseFloat(le(e).toFixed(1));switch(e.unit){case"pt":return`${Math.round(t)}pt`;case"mm":return`${t}mm`;case"cm":return`${t}cm`;case"in":return`${t}in`;default:return`${Math.round(t)}px`}},li=new(l(A)).Group;li.add(new(l(A)).Rect({width:20,height:20,fill:"white"})),li.add(new(l(A)).Path({scaleX:20/24,scaleY:20/24,data:"M4.98313549,11.0001422 C5.49589839,10.9914935 5.92501998,11.3703506 5.99116425,11.8666444 L5.99985778,11.9831355 L6.00348884,12.2068855 C6.11245031,15.4321748 8.76323537,17.9999971 11.9999971,17.9999971 C12.1869612,17.9999971 12.3726725,17.9914753 12.5567465,17.9745765 L12.2928932,17.7071068 C11.9023689,17.3165825 11.9023689,16.6834175 12.2928932,16.2928932 C12.6834175,15.9023689 13.3165825,15.9023689 13.7071068,16.2928932 L15.7071068,18.2928932 C16.0976311,18.6834175 16.0976311,19.3165825 15.7071068,19.7071068 L13.7071068,21.7071068 C13.3165825,22.0976311 12.6834175,22.0976311 12.2928932,21.7071068 C11.9023689,21.3165825 11.9023689,20.6834175 12.2928932,20.2928932 L12.6111505,19.9769552 C12.4086045,19.9922816 12.2047796,19.9999971 11.9999971,19.9999971 C7.7687005,19.9999971 4.28886152,16.7094374 4.01666425,12.5105203 L4.00420123,12.2575143 L4.00014222,12.0168645 C3.9908282,11.4646583 4.43092928,11.0094562 4.98313549,11.0001422 Z M11.7071068,2.29289322 C12.0675907,2.65337718 12.0953203,3.22060824 11.7902954,3.61289944 L11.7071068,3.70710678 L11.3891629,4.0230186 C11.5916051,4.00770767 11.7953244,4 12,4 C16.418278,4 20,7.581722 20,12 C20,12.5522847 19.5522847,13 19,13 C18.4477153,13 18,12.5522847 18,12 C18,8.6862915 15.3137085,6 12,6 C11.8129339,6 11.6271216,6.00853145 11.4429483,6.02544919 L11.7071068,6.29289322 C12.0976311,6.68341751 12.0976311,7.31658249 11.7071068,7.70710678 C11.3466228,8.06759074 10.7793918,8.09532028 10.3871006,7.79029539 L10.2928932,7.70710678 L8.29289322,5.70710678 C7.93240926,5.34662282 7.90467972,4.77939176 8.20970461,4.38710056 L8.29289322,4.29289322 L10.2928932,2.29289322 C10.6834175,1.90236893 11.3165825,1.90236893 11.7071068,2.29289322 Z",fill:"black"}));let lo=li.toCanvas({pixelRatio:2,width:20,height:20}),la={enabledAnchors:["top-left","top-center","top-right","middle-left","bottom-left","bottom-right","bottom-center","middle-right"],borderEnabled:!0,rotateEnabled:!0,rotationSnaps:[0,45,90,135,180,225,270,315],ignoreStroke:!0,flipEnabled:!1,anchorStrokeWidth:2,borderStrokeWidth:2,rotateAnchorOffset:30,anchorStyleFunc:e=>{e.hasName("rotater")&&e.setAttrs({width:20,height:20,cornerRadius:10,offsetX:10,offsetY:10,fillPatternImage:lo,fillPatternScaleX:.5,fillPatternScaleY:.5,fillPriority:"pattern",fillPatternRepeat:"no-repeat"})}},ll={text:{enabledAnchors:["top-left","top-right","middle-left","bottom-left","bottom-right","middle-right"]},svg:{enabledAnchors:["top-left","top-right","bottom-left","bottom-right"]},line:{enabledAnchors:[],borderEnabled:!1,rotateEnabled:!1},image:{enabledAnchors:["top-left","top-right","bottom-left","bottom-right"]},many:{enabledAnchors:["top-left","top-right","bottom-left","bottom-right"]},group:{enabledAnchors:["top-left","top-right","bottom-left","bottom-right"]}},ls=e=>(0,p.jsx)(rW,{...e,preventDefault:!1}),lu=({url:e,...t})=>{let[n,r]=l(r0)(e,"anonymous"),i=n?function(e,t,n="scale"){let r,i;let o=t.width/t.height;o>=e.width/e.height?(r=e.width,i=e.width/o):(r=e.height*o,i=e.height);let a=0,l=0;return"left-top"===n?(a=0,l=0):"left-middle"===n?(a=0,l=(e.height-i)/2):"left-bottom"===n?(a=0,l=e.height-i):"center-top"===n?(a=(e.width-r)/2,l=0):"center-middle"===n?(a=(e.width-r)/2,l=(e.height-i)/2):"center-bottom"===n?(a=(e.width-r)/2,l=e.height-i):"right-top"===n?(a=e.width-r,l=0):"right-middle"===n?(a=e.width-r,l=(e.height-i)/2):"right-bottom"===n?(a=e.width-r,l=e.height-i):"scale"===n?(a=0,l=0,r=e.width,i=e.height):console.error(Error("Unknown clip position property - "+n)),{cropX:a,cropY:l,cropWidth:r,cropHeight:i}}(n,{width:t.width,height:t.height},"center-middle"):{};return or(r,"background"),(0,p.jsx)(rK,{image:n,...t,...i})},lc=e=>(0,p.jsx)(rW,{...e}),ld=e=>{let{background:t,scale:n,borderColor:r,...i}=e,o=l(v).useMemo(()=>!!l(A).Util.colorToRGBA(t),[t]),a=l(v).useMemo(()=>{let e=document.createElement("canvas");e.width=60,e.height=60;let t=e.getContext("2d");return t&&(t.fillStyle="black",t.fillRect(30,0,30,30),t.fillRect(0,30,30,30)),e},[]);return(0,p.jsxs)(l(v).Fragment,{children:[(0,p.jsx)(rW,{fillPatternImage:a,...i,opacity:.1,hideInExport:!0}),o?(0,p.jsx)(lc,{fill:t,...i}):(0,p.jsx)(lu,{url:t,...i})]})},lh=P(({selection:e})=>e.visible?(0,p.jsx)(rW,{name:"selection",x:Math.min(e.x1,e.x2),y:Math.min(e.y1,e.y2),width:Math.abs(e.x1-e.x2),height:Math.abs(e.y1-e.y2),fill:"rgba(0, 161, 255, 0.3)"}):null),lf=P(({x:e,y:t,width:n,height:r,rotation:i,anchor:o,store:a})=>{let s=ac({x:e,y:t,width:n,height:r,rotation:l(A).Util.radToDeg(i)});if(void 0===o)return null;let u=(r/2+70)*Math.cos(i-Math.PI/2),c=(r/2+70)*Math.sin(i-Math.PI/2),d=lt({unit:a.unit,dpi:a.dpi,px:n/a.scale,precious:"px"===a.unit?0:1})+" x "+lt({unit:a.unit,dpi:a.dpi,px:r/a.scale,precious:"px"===a.unit?0:1})+("px"===a.unit?"":" "+a.unit);return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)(rG,{x:(s.minX+s.maxX)/2+u,y:(s.minY+s.maxY)/2+c,offsetX:14,offsetY:14,visible:"rotater"===o,children:[(0,p.jsx)("Tag",{cornerRadius:5,fill:"rgb(0, 161, 255)"}),(0,p.jsx)(rY,{align:"center",verticalAlign:"middle",fill:"white",padding:8,text:Math.round(l(A).Util.radToDeg(i)).toString()+"°"})]}),(0,p.jsxs)(rG,{x:(s.minX+s.maxX)/2,y:s.maxY+20,visible:"rotater"!==o,children:[(0,p.jsx)("Tag",{cornerRadius:5,fill:"rgb(0, 161, 255)",pointerDirection:"up",pointerHeight:0,pointerWidth:0}),(0,p.jsx)(rY,{align:"center",verticalAlign:"middle",fill:"white",padding:8,text:d})]})]})}),lp=P(({elements:e,store:t})=>{let n=e.filter(e=>e.alwaysOnTop),r=e.filter(e=>!e.alwaysOnTop).concat(n);return(0,p.jsx)(l(v).Fragment,{children:r.map(e=>(0,p.jsx)(aB,{store:t,element:e,onClick:()=>{console.warn("Polotno warning: onClick callback is deprecated. Just stop using it. Polotno will do selection automatically.")}},e.id))})}),lg=null,lm=e=>{lg=e};var lv=P(({store:e,page:t,width:n,height:r,pageControlsEnabled:i,backColor:o,pageBorderColor:a,activePageBorderColor:s,components:u,bleedColor:c})=>{var d;let h=e.bleedVisible?t.bleed:0,f=t.computedWidth+2*h,g=t.computedHeight+2*h,m=(n-f*e.scale)/2,b=(r-g*e.scale)/2,w=l(v).useRef(null),x=l(v).useRef(null),_=l(v).useRef(null),[E,S]=l(v).useState(null),[C,O]=l(v).useState({}),k=e.selectedElements.find(e=>e._cropModeEnabled),P=e.selectedShapes.filter(e=>!e.resizable).length>0,T=e.selectedShapes.filter(e=>!e.draggable).length>0,N=e.selectedElements.filter(e=>!e.visible).length>0;l(v).useLayoutEffect(()=>{if(!w.current)return;let t=w.current.getStage(),n=e.selectedShapes.map(e=>e._cropModeEnabled?null:t.findOne("#"+e.id)).filter(e=>e),r=1===e.selectedElements.length&&e.selectedElements[0]?.type||"many";ll[r]?(w.current.setAttrs({...la,...ll[r]}),"svg"!==r&&"image"!==r||e.selectedElements[0].keepRatio||w.current.setAttrs({enabledAnchors:la.enabledAnchors}),"text"===r&&ix.textVerticalResizeEnabled&&w.current.setAttrs({enabledAnchors:ll.text.enabledAnchors?.concat(["bottom-center"])})):w.current.setAttrs(la),P&&w.current.enabledAnchors([]),T&&w.current.rotateEnabled(!1),n.find(e=>e?.isDragging())&&n.forEach(e=>{e.isDragging()||e?.startDrag()}),w.current.nodes(n),w.current.getLayer()?.batchDraw()},[e.selectedElements,k,P,N,T]);let j=(d=()=>({visible:!1,x1:0,y1:0,x2:0,y2:0}),(0,v.useState)(function(){return(0,y.observable)(d(),void 0,{autoBind:!0})})[0]),R=l(v).useRef(!1),I=iR(),L=(0,y.action)(e=>{if(I)return;R.current=!1;let t=e.target.findAncestor(".elements-container"),n=e.target.findAncestor("Transformer"),r=e.target.findAncestor(".page-abs-container");if(t||n||r)return;let i=e.target.getStage()?.getPointerPosition();i&&(j.visible=!0,j.x1=i.x,j.y1=i.y,j.x2=i.x,j.y2=i.y,e.target.getStage()?.getPointersPositions().length>=2&&(j.visible=!1))});l(v).useEffect(()=>{let t=(0,y.action)(e=>{if(!j.visible)return;x.current?.setPointersPositions(e);let t=x.current?.getPointerPosition()||{x:j.x2,y:j.y2};j.x2=t.x,j.y2=t.y}),n=(0,y.action)(()=>{if(!j.visible||!x.current)return;let t=x.current.findOne(".selection"),n=t?t.getClientRect():{width:0,height:0,x:0,y:0};if(n.width&&n.height){let t=[];x.current.find(".element").forEach(r=>{let i=r.getClientRect(),o=e.getElementById(r.id()),a=o?.draggable,s=o?.selectable;l(A).Util.haveIntersection(n,i)&&a&&s&&t.push(o.top.id)});let r=[...new Set(t)];e.selectElements(r)}j.visible=!1,R.current=!0});return window.addEventListener("mousemove",t),window.addEventListener("touchmove",t),window.addEventListener("mouseup",n),window.addEventListener("touchend",n),()=>{window.removeEventListener("mousemove",t),window.removeEventListener("touchmove",t),window.removeEventListener("mouseup",n),window.removeEventListener("touchend",n)}},[]);let M=n=>{if(e.activePage!==t&&t.select(),R.current)return;let r=n.evt.ctrlKey||n.evt.metaKey||n.evt.shiftKey,i=n.target.findAncestor(".elements-container"),o=n.target.findAncestor(".page-abs-container"),a=n.target.findAncestor("Transformer");if(!r&&!i&&!a&&!o){e.selectElements([]);return}let l=n.target.findAncestor(".element",!0),s=e.getElementById(l?.id()),u=s?.top,c=u?.id,d=e.selectedElementsIds.indexOf(c)>=0;c&&r&&!d?e.selectElements(e.selectedElementsIds.concat([c])):c&&r&&d?e.selectElements(e.selectedElementsIds.filter(e=>e!==c)):!c||r||d||e.selectElements([c])};!function(e){let t=e=>e.hasName("element")||e.hasName("page-background")||e.hasName("elements-area");function n(n){let r=e.current?.getStage();var i=[],o=[];return r.find(t).forEach(e=>{if(!(n.indexOf(e)>=0)){var t=e.getClientRect({skipShadow:!0,skipStroke:!0});i.push(t.x,t.x+t.width,t.x+t.width/2),o.push(t.y,t.y+t.height,t.y+t.height/2)}}),{vertical:i,horizontal:o}}function r(t){let n=e.current?.getLayer(),r=n?.children.find(e=>"line-guides"===e.name());t.forEach(e=>{if("H"===e.orientation){var t=new(l(A)).Line({points:[-6e3,e.lineGuide,6e3,e.lineGuide],stroke:"rgb(0, 161, 255)",strokeWidth:1,name:"guid-line",dash:[4,6]});r?.add(t),n.batchDraw()}else if("V"===e.orientation){var t=new(l(A)).Line({points:[e.lineGuide,-6e3,e.lineGuide,6e3],stroke:"rgb(0, 161, 255)",strokeWidth:1,name:"guid-line",dash:[4,6]});r?.add(t)}})}let i=e=>{e.target.getLayer().children.find(e=>"line-guides"===e.name()).destroyChildren();var t=ah(n(e.target.nodes()),function(e){let t=e.__getNodeRect(),n=ac({...t,rotation:l(A).Util.radToDeg(t.rotation)}),r=e.getAbsolutePosition();return{vertical:[{guide:n.x,offset:r.x-n.x,snap:"start"},{guide:n.x+n.width/2,offset:r.x-n.x-n.width/2,snap:"center"},{guide:n.x+n.width,offset:r.x-n.x-n.width,snap:"end"}],horizontal:[{guide:n.y,offset:r.y-n.y,snap:"start"},{guide:n.y+n.height/2,offset:r.y-n.y-n.height/2,snap:"center"},{guide:n.y+n.height,offset:r.y-n.y-n.height,snap:"end"}]}}(e.target));if(!t.length)return;r(t);let i=e.target.getAbsolutePosition(),o={...i};t.forEach(e=>{switch(e.snap){case"start":case"center":case"end":switch(e.orientation){case"V":o.x=e.lineGuide+e.offset;break;case"H":o.y=e.lineGuide+e.offset}}});let a=o.x-i.x,s=o.y-i.y;e.evt.ctrlKey||e.evt.metaKey||e.target.nodes().forEach(e=>{let t=e.getAbsolutePosition();e.setAbsolutePosition({x:t.x+a,y:t.y+s})})},o=(t,i,o)=>{let a=e.current,l=a.getLayer();if(l.children.find(e=>"line-guides"===e.name()).destroyChildren(),"rotater"===a.getActiveAnchor()||Math.sqrt(Math.pow(i.x-t.x,2)+Math.pow(i.y-t.y,2))>50||!l)return i;var s=ah(n(a.nodes()),{vertical:[{guide:i.x,offset:0,snap:"start"}],horizontal:[{guide:i.y,offset:0,snap:"start"}]});if(!s.length||(r(s),o.ctrlKey||o.metaKey))return i;let u=i.x,c=i.x;s.forEach(e=>{switch(e.orientation){case"V":u=e.lineGuide;break;case"H":c=e.lineGuide}});let d=Math.abs(i.x-u),h=Math.abs(i.y-c),f=d<10,p=h<10;return f&&!p?{x:u,y:t.y}:p&&!f?{x:t.x,y:c}:f&&p?{x:u,y:c}:i},a=e=>{if(!e.target)return;let t=e.target.getLayer();t.children.find(e=>"line-guides"===e.name()).destroyChildren(),t.batchDraw()};l(v).useEffect(()=>{e.current&&(e.current.anchorDragBoundFunc(o),e.current.on("dragstart",()=>{setTimeout(()=>{let e=[...l(A).DD._dragElements.entries()];e.reverse(),l(A).DD._dragElements.clear(),e.forEach(([e,t])=>{l(A).DD._dragElements.set(e,t)})})}),e.current.on("dragmove",i),e.current.on("dragend",a),e.current.on("transformend",a),e.current.on("transform",t=>{t.evt.ctrlKey||t.evt.metaKey?e.current?.rotationSnapTolerance(0):e.current?.rotationSnapTolerance(5)}))},[])}(w);let D=e.activePage===t,F=u?.PageControls,z=u?.Tooltip,B=1/e.scale,U=0/e.scale;return(0,p.jsxs)("div",{ref:_,onDragOver:e=>e.preventDefault(),onDrop:n=>{if(n.preventDefault(),!x.current)return;x.current.setPointersPositions(n);let r=x.current.findOne(".elements-container").getRelativePointerPosition(),i=x.current.getPointerPosition(),o=x.current.getAllIntersections(i).map(e=>e.findAncestor(".element",!0)).filter(Boolean),a=[...new Set(o.reverse())].map(t=>e.getElementById(t.id())),l=a[0];lg&&(lg(r,l,{elements:a,page:t}),lg=null)},style:{position:"relative",width:n+"px"},className:"polotno-page-container"+(D?" active-page":""),children:[(0,p.jsx)(rJ,{ref:x,width:Math.min(n,4*window.innerWidth),height:Math.min(r,4*window.innerHeight),onClick:M,onTap:M,onMouseDown:L,onMouseMove:n=>{if(!n.evt.altKey&&E){S(null);return}if(!n.evt.altKey)return;let r=n.target.findAncestor(".element",!0),i=r?.id();if(!e.selectedElements[0]||e.selectedElementsIds.includes(i))return;let o=ad(e.selectedElements),a=ac(i?e.getElementById(i):{x:0,y:0,width:t.computedWidth,height:t.computedHeight,rotation:0}),l=[];o.minX>a.maxX&&l.push({distance:o.minX-a.maxX,box1:o,box2:a,points:[{x:o.minX,y:o.minY+o.height/2},{x:a.maxX,y:o.minY+o.height/2},{x:a.maxX,y:a.minY+a.height/2}]}),o.maxX<a.minX&&l.push({distance:a.minX-o.maxX,box1:o,box2:a,points:[{x:o.maxX,y:o.minY+o.height/2},{x:a.minX,y:o.minY+o.height/2},{x:a.minX,y:a.minY+a.height/2}]}),o.minY>a.maxY&&l.push({box1:o,box2:a,distance:o.minY-a.maxY,points:[{x:o.minX+o.width/2,y:o.minY},{x:o.minX+o.width/2,y:a.maxY},{x:a.minX+a.width/2,y:a.maxY}]}),o.maxY<a.minY&&l.push({box1:o,box2:a,distance:a.minY-o.maxY,points:[{x:o.minX+o.width/2,y:o.maxY},{x:o.minX+o.width/2,y:a.minY},{x:a.minX+a.width/2,y:a.minY}]}),o.minX>=a.minX&&o.maxX<=a.maxX&&o.minY>=a.minY&&o.maxY<=a.maxY&&(l.push({distance:o.minX-a.minX,box1:o,box2:a,points:[{x:o.minX,y:o.minY+o.height/2},{x:a.minX,y:o.minY+o.height/2},{x:a.minX,y:a.minY+a.height/2}]}),l.push({distance:a.maxX-o.maxX,box1:o,box2:a,points:[{x:o.maxX,y:o.minY+o.height/2},{x:a.maxX,y:o.minY+o.height/2},{x:a.maxX,y:a.minY+a.height/2}]}),l.push({box1:o,box2:a,distance:o.minY-a.minY,points:[{x:o.minX+o.width/2,y:o.minY},{x:o.minX+o.width/2,y:a.minY},{x:a.minX+a.width/2,y:a.minY}]}),l.push({box1:o,box2:a,distance:a.maxY-o.maxY,points:[{x:o.minX+o.width/2,y:o.maxY},{x:o.minX+o.width/2,y:a.maxY},{x:a.minX+a.width/2,y:a.maxY}]})),JSON.stringify(E)!==JSON.stringify(l)&&S(l)},onTouchStart:L,onDragStart:t=>{let n=t.target.findAncestor(".element",!0);if(n){let r=e.getElementById(n?.id()),i=r?.top,o=i?.id;!(e.selectedElementsIds.indexOf(o)>=0)&&o&&(e.selectElements([o]),t.target.stopDrag(),t.target.startDrag(t),w.current?.startDrag(t))}E&&S(null)},pageId:t.id,style:{position:"relative"},children:(0,p.jsxs)("Layer",{children:[(0,p.jsx)(ls,{width:n,height:r,fill:o}),(0,p.jsx)(rq,{x:m,y:b,scaleX:e.scale,scaleY:e.scale,name:"page-container",children:(0,p.jsxs)(rq,{name:"page-container-2",children:[(0,p.jsx)(rq,{name:"page-background-group",x:h,y:h,children:(0,p.jsx)(ld,{x:-t.bleed,y:-t.bleed,width:t.computedWidth+2*t.bleed,height:t.computedHeight+2*t.bleed,background:t.background,shadowBlur:10,shadowColor:"lightgrey",name:"page-background",preventDefault:!1,scale:e.scale})}),(0,p.jsxs)(rq,{x:h,y:h,name:"elements-container",listening:!e.isPlaying,children:[(0,p.jsx)(rW,{name:"elements-area",width:t.computedWidth,height:t.computedHeight,listening:!1}),(0,p.jsx)(lp,{elements:t.children,store:e})]}),(0,p.jsx)(rW,{stroke:c,name:"bleed",strokeWidth:t.bleed,x:t.bleed/2,y:t.bleed/2,width:t.computedWidth+t.bleed,height:t.computedHeight+t.bleed,listening:!1,visible:t.bleed>0&&e.bleedVisible,hideInExport:!0})]})}),(0,p.jsx)(r$,{name:"workspace-background",points:[0,0,n,0,n,r,0,r,0,0,m,b,m,r-b,n-m,r-b,n-m,b,m,b],listening:!1,closed:!0,fill:o}),(0,p.jsx)(rq,{x:m,y:b,scaleX:e.scale,scaleY:e.scale,children:(0,p.jsx)(rW,{name:"page-highlight",hideInExport:!0,x:-B/2-U,y:-B/2-U,width:f+B+2*U,height:g+B+2*U,stroke:D&&e.pages.length>1?s:a,strokeWidth:2,listening:!1,strokeScaleEnabled:!1})}),(0,p.jsxs)(rq,{x:m+h*e.scale,y:b+h*e.scale,scaleX:e.scale,scaleY:e.scale,name:"page-abs-container",children:[(0,p.jsx)(rZ,{ref:w,onDragStart:n=>{n.evt?.altKey&&e.selectedElements.forEach(e=>{let n=e.clone({},{skipSelect:!0}),r=t.children.indexOf(e);t.setElementZIndex(n.id,r)}),e.history.startTransaction()},onDragEnd:()=>{e.history.endTransaction()},onTransformStart:()=>{e.history.startTransaction()},boundBoxFunc:(e,t)=>{let n=1>Math.abs(t.width)||1>Math.abs(t.height),r=1>Math.abs(e.width)||1>Math.abs(e.height);return n&&!r?e:t},onTransform:e=>{let t=w.current?.__getNodeRect();O({anchor:w.current?.getActiveAnchor(),x:t.x,y:t.y,rotation:t.rotation,width:t.width,height:t.height})},onTransformEnd:t=>{O({}),e.history.endTransaction()},visible:!e.isPlaying}),E&&E.map(({points:t,distance:n,box1:r,box2:i},o)=>(0,p.jsxs)(rq,{name:"distances-container",hideInExport:!0,listening:!1,children:[(0,p.jsx)(rW,{...r,stroke:"rgb(0, 161, 255)",strokeWidth:1,strokeScaleEnabled:!1}),(0,p.jsx)(rW,{...i,stroke:"rgb(0, 161, 255)",strokeWidth:1,strokeScaleEnabled:!1}),(0,p.jsx)(r$,{points:[t[0].x,t[0].y,t[1].x,t[1].y],stroke:"rgb(0, 161, 255)",strokeWidth:1,strokeScaleEnabled:!1}),(0,p.jsx)(r$,{points:[t[1].x,t[1].y,t[2].x,t[2].y],stroke:"rgb(0, 161, 255)",strokeWidth:1,strokeScaleEnabled:!1}),(0,p.jsxs)(rG,{x:(t[0].x+t[1].x)/2,y:(t[0].y+t[1].y)/2,offsetY:-10,scaleX:1/e.scale,scaleY:1/e.scale,children:[(0,p.jsx)("Tag",{cornerRadius:5,fill:"rgb(0, 161, 255)",pointerDirection:"down"}),(0,p.jsx)(rY,{align:"center",verticalAlign:"middle",fill:"white",padding:5,text:lr({unit:e.unit,dpi:e.dpi,px:n})})]})]},o)),t._rendering&&(0,p.jsxs)(rq,{children:[(0,p.jsx)(rW,{width:f,height:g,fill:"rgba(255,255,255,0.9)"}),(0,p.jsx)(rY,{text:"Rendering...",fontSize:60,width:f,height:g,align:"center",verticalAlign:"middle"})]}),z&&(0,p.jsx)(z,{components:u,store:e,page:t,stageRef:x})]}),(0,p.jsx)(lf,{...C,store:e}),(0,p.jsx)(lh,{selection:j}),a0.value&&(0,p.jsx)(rY,{text:"Powered by polotno.com",fontSize:14,fill:"rgba(0,0,0,0.6)",x:n-170,y:r-18,onMouseEnter:e=>{e.target.getStage().container().style.cursor="pointer"},onMouseLeave:e=>{e.target.getStage().container().style.cursor=""},onTouchStart:e=>{e.cancelBubble=!0},onMouseDown:e=>{e.cancelBubble=!0},onClick:()=>{window.open("https://polotno.com")},onTap:()=>{window.open("https://polotno.com")}}),(0,p.jsx)(rq,{name:"line-guides"})]})}),(i??!0)&&D&&F&&(0,p.jsx)(F,{store:e,page:t,xPadding:m,yPadding:b})]})}),v=h("8NFma");let ly=[.1,.2,.5,1,2,5,10,20,25,50,100,200,500,1e3,2e3,5e3,1e4],lb=e=>ly.find(t=>e(t)>30)||1e4,lw=P(({store:e,width:t,height:n})=>{let r=l(v).useRef(null);if(!e.activePage)return null;let i=e.activePage;e.bleedVisible&&i.bleed;let o=i.computedWidth*e.scale,a=i.computedHeight*e.scale,s=(t-o)/2,u=lb(t=>ln({unitVal:t,dpi:e.dpi,unit:e.unit})*e.scale),c=ln({unitVal:u,dpi:e.dpi,unit:e.unit})*e.scale,d=Math.round(o/c)+1,h=Math.round(a/c)+1,f=ad(e.selectedShapes);return(0,p.jsxs)("div",{style:{position:"absolute",top:0,left:0,pointerEvents:"none"},ref:r,children:[(0,p.jsxs)("div",{style:{width:t+"px",height:"14px",position:"sticky",fontSize:"8px",lineHeight:"14px",top:"0px",left:"0px",color:"grey",borderBottom:"1px solid grey",backgroundColor:"#e8e8e8",overflow:"hidden"},children:[[...Array(d)].map((t,n)=>(0,p.jsx)("div",{style:{position:"absolute",left:s+n*c+"px",borderLeft:"1px solid grey",paddingLeft:"2px",width:c+"px"},children:"px"===e.unit||u>=1?Math.round(u*n):(u*n).toFixed(1)},n)),!!e.selectedShapes.length&&(0,p.jsx)("div",{style:{position:"absolute",left:s+f.x*e.scale+"px",height:"14px",width:f.width*e.scale,backgroundColor:"rgba(0,0,0,0.15)"}})]}),e.pages.map((t,r)=>{let i=(n-t.computedHeight*e.scale)/2;return(0,p.jsxs)("div",{style:{left:"0px",width:"14px",height:n+"px",position:"sticky",fontSize:"8px",lineHeight:"14px",color:"grey",borderRight:"1px solid grey",backgroundColor:"#e8e8e8",overflow:"hidden"},children:[[...Array(h)].map((t,n)=>(0,p.jsx)("div",{style:{position:"absolute",left:"14px",top:i+n*c-14+"px",borderLeft:"1px solid grey",paddingLeft:"2px",transform:"rotate(90deg)",transformOrigin:"left top",width:c+"px",overflow:"hidden"},children:"px"===e.unit||u>=1?Math.round(u*n):(u*n).toFixed(1)},n)),e.selectedShapes[0]?.page===t&&(0,p.jsx)("div",{style:{position:"absolute",top:i+f.y*e.scale-14+"px",width:"14px",height:f.height*e.scale,backgroundColor:"rgba(0,0,0,0.15)"}})]},t.id)})]})}),lx=[],l_="",lE="polotno_clipboard",lS=e=>{lx=e;try{localStorage.setItem(lE,JSON.stringify(e))}catch(e){}},lC=()=>{try{let e=localStorage.getItem(lE);if(e)return JSON.parse(e)}catch(e){}return lx};var y=h("2SBKn");let lO=(0,y.observable)({toolbar:{duration:"Duration",opacity:"Opacity",effects:"Effects",blur:"Blur",textBackground:"Background",backgroundCornerRadius:"Corner radius",backgroundOpacity:"Opacity",backgroundPadding:"Padding",brightness:"Brightness",sepia:"Sepia",grayscale:"Grayscale",textStroke:"Text Stroke",shadow:"Shadow",border:"Border",cornerRadius:"Corner Radius",position:"Position",layering:"Layering",toForward:"To forward",up:"Up",down:"Down",toBottom:"To bottom",alignLeft:"Align left",alignCenter:"Align center",alignRight:"Align right",alignTop:"Align top",alignMiddle:"Align middle",alignBottom:"Align bottom",flip:"Flip",flipHorizontally:"Flip horizontally",flipVertically:"Flip vertically",fitToBackground:"Fit to page",removeBackground:"Remove background",removeBackgroundTitle:"Remove background from image",cancelRemoveBackground:"Cancel",confirmRemoveBackground:"Confirm",crop:"Crop",cropDone:"Done",cropCancel:"Cancel",removeClip:"Remove clip",removeMask:"Remove mask",transparency:"Transparency",lockedDescription:"Object is locked. Unlock it to allow changes from canvas.",unlockedDescription:"Object is unlocked. Lock it to prevent changes from canvas.",removeElements:"Remove elements",duplicateElements:"Duplicate elements",download:"Download",saveAsImage:"Save as image",saveAsPDF:"Save as PDF",lineHeight:"Line height",letterSpacing:"Letter spacing",offsetX:"Offset X",offsetY:"Offset Y",color:"Color",selectable:"Selectable",draggable:"Draggable",removable:"Removable",resizable:"Resizable",contentEditable:"Can change content",styleEditable:"Can change style",alwaysOnTop:"Always on top",showInExport:"Show in export",ungroupElements:"Ungroup",groupElements:"Group",lineSize:"Line size",fade:"Fade",move:"Move",zoom:"Zoom",animate:"Animate",spaceEvenly:"Space evenly",horizontalDistribution:"Horizontally",verticalDistribution:"Vertically",strokeWidth:"Stroke Width"},workspace:{noPages:"There are no pages yet...",addPage:"Add page",removePage:"Remove page",duplicatePage:"Duplicate page",moveUp:"Move up",moveDown:"Move down"},scale:{reset:"Reset"},error:{removeBackground:"Ops! Something went wrong. Background can not be removed."},sidePanel:{templates:"Templates",searchTemplatesWithSameSize:"Show templates with the same size",searchPlaceholder:"Search...",otherFormats:"Other formats",noResults:"No results",error:"Loading is failed...",text:"Text",uploadFont:"Upload font",myFonts:"My fonts",photos:"Photos",elements:"Elements",shapes:"Shapes",lines:"Lines",upload:"Upload",uploadImage:"Upload Image",uploadTip:"Do you want to upload your own images?",background:"Background",resize:"Resize",layers:"Layers",layerTypes:{image:"Image",text:"Text",svg:"SVG",line:"Line",figure:"Figure",group:"Group"},layersTip:"Elements on your active page:",noLayers:"No elements on the page...",namePlaceholder:"Type element name...",useMagicResize:"Use magic resize",width:"Width",height:"Height",magicResizeDescription:"Magic resize will automatically resize and move all elements on the canvas",headerText:"Header",createHeader:"Create header",subHeaderText:"Sub Header",createSubHeader:"Create sub header",bodyText:"Body text",createBody:"Create body text"}}),lk=e=>e&&"object"==typeof e;(0,y.action)(e=>{!function e(t,n){Object.keys(n).forEach(r=>{let i=t[r],o=n[r];lk(o)&&lk(i)?e(i,o):t[r]=o})}(lO,e)});let lP={},lT=e=>{let t=function(e,t){var n,r=t.split("."),i=e;for(n=0;n<r.length;++n){if(void 0==i[r[n]])return;i=i[r[n]]}return i}(lO,e);if(void 0!==t)return t;lP[e]||(lP[e]=!0,console.warn(`Missing translation '${e}'`));let n=e.split("."),r=n[n.length-1]||" ";return r.charAt(0).toUpperCase()+r.slice(1)},lA=(e,t,n)=>Math.max(t,Math.min(n,e)),lN=`Polotno warning: <Workspace /> component can not automatically detect its size.
|
|
113
|
+
https://polotno.com/docs/server-api`,aW={unsplashList:({query:e,page:t=1})=>`${aU}/get-unsplash?query=${e}&per_page=20&page=${t}&KEY=${a3()}`,unsplashDownload:e=>`${aU}/download-unsplash?id=${e}&KEY=${a3()}`,svgapiList:({query:e,page:t=0})=>`${aU}/get-svgapi?query=${e}&page=${t}&per_page=20&KEY=${a3()}`,svgapiDownload:e=>`${aU}/download-svgapi?path=${e}&KEY=${a3()}`,iconscoutList:({query:e,page:t=1})=>(aV("iconscout",aG),`${aU}/get-iconscout?query=${e}&page=${t}&KEY=${a3()}`),iconscoutDownload:e=>(aV("iconscout",aG),`${aU}/download-iconscout?uuid=${e}&KEY=${a3()}`),templateList:({query:e,page:t=1,sizeQuery:n})=>`${aU}/get-templates?${n}&query=${e}&per_page=30&page=${t}&KEY=${a3()}`},a$=()=>`${aU}/get-google-fonts?KEY=${a3()}`,aK=e=>`https://api.polotno.com/google-fonts-previews/black/${aq(e," ","-")}.png`,aY=()=>`${aU}/remove-image-background?KEY=${a3()}`,aX=e=>aW.templateList(e),aZ=()=>`${aU}/get-text-templates?KEY=${a3()}`,aQ=e=>aW.unsplashList(e),aJ=e=>aW.unsplashDownload(e),a0=y.observable({value:!1}),a1=y.action(()=>{a0.value=!0}),a2="",a3=()=>a2||"",a5=window.location.origin,a6=navigator.userAgent.indexOf("Headless")>-1,a4=navigator.userAgent.indexOf("Electron")>-1;"file://"===a5&&a6&&(a5="headless"),"file://"===a5&&a4&&(a5="electron");let a8=`%cPolotno error! Current domain is not allowed. It may lead to unexpected behavior and stop working. Please add "${a5}" here: https://polotno.com/cabinet`;async function a9(e){for(let n=0;n<5;n++)try{var t;let n=await fetch(aU+"/validate-key",{method:"POST",body:JSON.stringify({key:e,site:location.host})});if(!e)return console.warn("Polotno API is initialized without API key. It may lead to unexpected behavior and stop working. Please create API key here: https://polotno.com/cabinet"),!1;if(200!==n.status){await new Promise(e=>setTimeout(e,3e3));continue}let r=await n.json();return r.is_valid||console.warn("Polotno API key is not valid. Please get new API key here: https://polotno.com/cabinet"),r.is_paid||console.log("%cPolotno Free Version. Development or non-commercial usage only. https://polotno.com/","background: rgb(0, 161, 255); color: white; padding: 5px; margin: 5px;"),r.is_domain_valid||console.log(a8,"background: rgba(247, 101, 68, 1); color: white; padding: 5px; margin: 5px;"),t=r.remove_background_enabled,ik.removeBackgroundEnabled=t,r.is_paid||!1}catch(e){await new Promise(e=>setTimeout(e,3e3))}return console.error("Can not validate Polotno API key. Please report to anton@polotno.com immediately."),!0}async function a7(e,t){a2=e,(!await a9(e)||t)&&a1()}let le=({px:e,unit:t="px",dpi:n})=>{switch(t){case"pt":default:return e;case"mm":return e/(n/25.4);case"cm":return e/(n/2.54);case"in":return e/n}},lt=({px:e,precious:t=2,dpi:n=72,unit:r="px"})=>parseFloat(le({px:e,dpi:n,unit:r}).toFixed(t)),ln=({unitVal:e,dpi:t,unit:n})=>e/le({px:1,unit:n,dpi:t}),lr=e=>{let t=parseFloat(le(e).toFixed(1));switch(e.unit){case"pt":return`${Math.round(t)}pt`;case"mm":return`${t}mm`;case"cm":return`${t}cm`;case"in":return`${t}in`;default:return`${Math.round(t)}px`}},li=new(l(A)).Group;li.add(new(l(A)).Rect({width:20,height:20,fill:"white"})),li.add(new(l(A)).Path({scaleX:20/24,scaleY:20/24,data:"M4.98313549,11.0001422 C5.49589839,10.9914935 5.92501998,11.3703506 5.99116425,11.8666444 L5.99985778,11.9831355 L6.00348884,12.2068855 C6.11245031,15.4321748 8.76323537,17.9999971 11.9999971,17.9999971 C12.1869612,17.9999971 12.3726725,17.9914753 12.5567465,17.9745765 L12.2928932,17.7071068 C11.9023689,17.3165825 11.9023689,16.6834175 12.2928932,16.2928932 C12.6834175,15.9023689 13.3165825,15.9023689 13.7071068,16.2928932 L15.7071068,18.2928932 C16.0976311,18.6834175 16.0976311,19.3165825 15.7071068,19.7071068 L13.7071068,21.7071068 C13.3165825,22.0976311 12.6834175,22.0976311 12.2928932,21.7071068 C11.9023689,21.3165825 11.9023689,20.6834175 12.2928932,20.2928932 L12.6111505,19.9769552 C12.4086045,19.9922816 12.2047796,19.9999971 11.9999971,19.9999971 C7.7687005,19.9999971 4.28886152,16.7094374 4.01666425,12.5105203 L4.00420123,12.2575143 L4.00014222,12.0168645 C3.9908282,11.4646583 4.43092928,11.0094562 4.98313549,11.0001422 Z M11.7071068,2.29289322 C12.0675907,2.65337718 12.0953203,3.22060824 11.7902954,3.61289944 L11.7071068,3.70710678 L11.3891629,4.0230186 C11.5916051,4.00770767 11.7953244,4 12,4 C16.418278,4 20,7.581722 20,12 C20,12.5522847 19.5522847,13 19,13 C18.4477153,13 18,12.5522847 18,12 C18,8.6862915 15.3137085,6 12,6 C11.8129339,6 11.6271216,6.00853145 11.4429483,6.02544919 L11.7071068,6.29289322 C12.0976311,6.68341751 12.0976311,7.31658249 11.7071068,7.70710678 C11.3466228,8.06759074 10.7793918,8.09532028 10.3871006,7.79029539 L10.2928932,7.70710678 L8.29289322,5.70710678 C7.93240926,5.34662282 7.90467972,4.77939176 8.20970461,4.38710056 L8.29289322,4.29289322 L10.2928932,2.29289322 C10.6834175,1.90236893 11.3165825,1.90236893 11.7071068,2.29289322 Z",fill:"black"}));let lo=li.toCanvas({pixelRatio:2,width:20,height:20}),la={enabledAnchors:["top-left","top-center","top-right","middle-left","bottom-left","bottom-right","bottom-center","middle-right"],borderEnabled:!0,rotateEnabled:!0,rotationSnaps:[0,45,90,135,180,225,270,315],ignoreStroke:!0,flipEnabled:!1,anchorStrokeWidth:2,borderStrokeWidth:2,rotateAnchorOffset:30,anchorStyleFunc:e=>{e.hasName("rotater")&&e.setAttrs({width:20,height:20,cornerRadius:10,offsetX:10,offsetY:10,fillPatternImage:lo,fillPatternScaleX:.5,fillPatternScaleY:.5,fillPriority:"pattern",fillPatternRepeat:"no-repeat"})}},ll={text:{enabledAnchors:["top-left","top-right","middle-left","bottom-left","bottom-right","middle-right"]},svg:{enabledAnchors:["top-left","top-right","bottom-left","bottom-right"]},line:{enabledAnchors:[],borderEnabled:!1,rotateEnabled:!1},image:{enabledAnchors:["top-left","top-right","bottom-left","bottom-right"]},many:{enabledAnchors:["top-left","top-right","bottom-left","bottom-right"]},group:{enabledAnchors:["top-left","top-right","bottom-left","bottom-right"]}},ls=e=>(0,p.jsx)(rW,{...e,preventDefault:!1}),lu=({url:e,...t})=>{let[n,r]=l(r0)(e,"anonymous"),i=n?function(e,t,n="scale"){let r,i;let o=t.width/t.height;o>=e.width/e.height?(r=e.width,i=e.width/o):(r=e.height*o,i=e.height);let a=0,l=0;return"left-top"===n?(a=0,l=0):"left-middle"===n?(a=0,l=(e.height-i)/2):"left-bottom"===n?(a=0,l=e.height-i):"center-top"===n?(a=(e.width-r)/2,l=0):"center-middle"===n?(a=(e.width-r)/2,l=(e.height-i)/2):"center-bottom"===n?(a=(e.width-r)/2,l=e.height-i):"right-top"===n?(a=e.width-r,l=0):"right-middle"===n?(a=e.width-r,l=(e.height-i)/2):"right-bottom"===n?(a=e.width-r,l=e.height-i):"scale"===n?(a=0,l=0,r=e.width,i=e.height):console.error(Error("Unknown clip position property - "+n)),{cropX:a,cropY:l,cropWidth:r,cropHeight:i}}(n,{width:t.width,height:t.height},"center-middle"):{};return or(r,"background"),(0,p.jsx)(rK,{image:n,...t,...i})},lc=e=>(0,p.jsx)(rW,{...e}),ld=e=>{let{background:t,scale:n,borderColor:r,...i}=e,o=l(v).useMemo(()=>!!l(A).Util.colorToRGBA(t),[t]),a=l(v).useMemo(()=>{let e=document.createElement("canvas");e.width=60,e.height=60;let t=e.getContext("2d");return t&&(t.fillStyle="black",t.fillRect(30,0,30,30),t.fillRect(0,30,30,30)),e},[]);return(0,p.jsxs)(l(v).Fragment,{children:[(0,p.jsx)(rW,{fillPatternImage:a,...i,opacity:.1,hideInExport:!0}),o?(0,p.jsx)(lc,{fill:t,...i}):(0,p.jsx)(lu,{url:t,...i})]})},lh=P(({selection:e})=>e.visible?(0,p.jsx)(rW,{name:"selection",x:Math.min(e.x1,e.x2),y:Math.min(e.y1,e.y2),width:Math.abs(e.x1-e.x2),height:Math.abs(e.y1-e.y2),fill:"rgba(0, 161, 255, 0.3)"}):null),lf=P(({x:e,y:t,width:n,height:r,rotation:i,anchor:o,store:a})=>{let s=ac({x:e,y:t,width:n,height:r,rotation:l(A).Util.radToDeg(i)});if(void 0===o)return null;let u=(r/2+70)*Math.cos(i-Math.PI/2),c=(r/2+70)*Math.sin(i-Math.PI/2),d=lt({unit:a.unit,dpi:a.dpi,px:n/a.scale,precious:"px"===a.unit?0:1})+" x "+lt({unit:a.unit,dpi:a.dpi,px:r/a.scale,precious:"px"===a.unit?0:1})+("px"===a.unit?"":" "+a.unit);return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)(rG,{x:(s.minX+s.maxX)/2+u,y:(s.minY+s.maxY)/2+c,offsetX:14,offsetY:14,visible:"rotater"===o,children:[(0,p.jsx)("Tag",{cornerRadius:5,fill:"rgb(0, 161, 255)"}),(0,p.jsx)(rY,{align:"center",verticalAlign:"middle",fill:"white",padding:8,text:Math.round(l(A).Util.radToDeg(i)).toString()+"°"})]}),(0,p.jsxs)(rG,{x:(s.minX+s.maxX)/2,y:s.maxY+20,visible:"rotater"!==o,children:[(0,p.jsx)("Tag",{cornerRadius:5,fill:"rgb(0, 161, 255)",pointerDirection:"up",pointerHeight:0,pointerWidth:0}),(0,p.jsx)(rY,{align:"center",verticalAlign:"middle",fill:"white",padding:8,text:d})]})]})}),lp=P(({elements:e,store:t})=>{let n=e.filter(e=>e.alwaysOnTop),r=e.filter(e=>!e.alwaysOnTop).concat(n);return(0,p.jsx)(l(v).Fragment,{children:r.map(e=>(0,p.jsx)(aB,{store:t,element:e,onClick:()=>{console.warn("Polotno warning: onClick callback is deprecated. Just stop using it. Polotno will do selection automatically.")}},e.id))})}),lg=null,lm=e=>{lg=e};var lv=P(({store:e,page:t,width:n,height:r,pageControlsEnabled:i,backColor:o,pageBorderColor:a,activePageBorderColor:s,components:u,bleedColor:c})=>{var d;let h=e.bleedVisible?t.bleed:0,f=t.computedWidth+2*h,g=t.computedHeight+2*h,m=(n-f*e.scale)/2,b=(r-g*e.scale)/2,w=l(v).useRef(null),x=l(v).useRef(null),_=l(v).useRef(null),[E,S]=l(v).useState(null),[C,O]=l(v).useState({}),k=e.selectedElements.find(e=>e._cropModeEnabled),P=e.selectedShapes.filter(e=>!e.resizable).length>0,T=e.selectedShapes.filter(e=>!e.draggable).length>0,N=e.selectedElements.filter(e=>!e.visible).length>0;l(v).useLayoutEffect(()=>{if(!w.current)return;let t=w.current.getStage(),n=e.selectedShapes.map(e=>e._cropModeEnabled?null:t.findOne("#"+e.id)).filter(e=>e),r=1===e.selectedElements.length&&e.selectedElements[0]?.type||"many";ll[r]?(w.current.setAttrs({...la,...ll[r]}),"svg"!==r&&"image"!==r||e.selectedElements[0].keepRatio||w.current.setAttrs({enabledAnchors:la.enabledAnchors}),"text"===r&&ik.textVerticalResizeEnabled&&w.current.setAttrs({enabledAnchors:ll.text.enabledAnchors?.concat(["bottom-center"])})):w.current.setAttrs(la),P&&w.current.enabledAnchors([]),T&&w.current.rotateEnabled(!1),n.find(e=>e?.isDragging())&&n.forEach(e=>{e.isDragging()||e?.startDrag()}),w.current.nodes(n),w.current.getLayer()?.batchDraw()},[e.selectedElements,k,P,N,T]);let j=(d=()=>({visible:!1,x1:0,y1:0,x2:0,y2:0}),(0,v.useState)(function(){return(0,y.observable)(d(),void 0,{autoBind:!0})})[0]),R=l(v).useRef(!1),I=iI(),L=(0,y.action)(e=>{if(I)return;R.current=!1;let t=e.target.findAncestor(".elements-container"),n=e.target.findAncestor("Transformer"),r=e.target.findAncestor(".page-abs-container");if(t||n||r)return;let i=e.target.getStage()?.getPointerPosition();i&&(j.visible=!0,j.x1=i.x,j.y1=i.y,j.x2=i.x,j.y2=i.y,e.target.getStage()?.getPointersPositions().length>=2&&(j.visible=!1))});l(v).useEffect(()=>{let t=(0,y.action)(e=>{if(!j.visible)return;x.current?.setPointersPositions(e);let t=x.current?.getPointerPosition()||{x:j.x2,y:j.y2};j.x2=t.x,j.y2=t.y}),n=(0,y.action)(()=>{if(!j.visible||!x.current)return;let t=x.current.findOne(".selection"),n=t?t.getClientRect():{width:0,height:0,x:0,y:0};if(n.width&&n.height){let t=[];x.current.find(".element").forEach(r=>{let i=r.getClientRect(),o=e.getElementById(r.id()),a=o?.draggable,s=o?.selectable;l(A).Util.haveIntersection(n,i)&&a&&s&&t.push(o.top.id)});let r=[...new Set(t)];e.selectElements(r)}j.visible=!1,R.current=!0});return window.addEventListener("mousemove",t),window.addEventListener("touchmove",t),window.addEventListener("mouseup",n),window.addEventListener("touchend",n),()=>{window.removeEventListener("mousemove",t),window.removeEventListener("touchmove",t),window.removeEventListener("mouseup",n),window.removeEventListener("touchend",n)}},[]);let M=n=>{if(e.activePage!==t&&t.select(),R.current)return;let r=n.evt.ctrlKey||n.evt.metaKey||n.evt.shiftKey,i=n.target.findAncestor(".elements-container"),o=n.target.findAncestor(".page-abs-container"),a=n.target.findAncestor("Transformer");if(!r&&!i&&!a&&!o){e.selectElements([]);return}let l=n.target.findAncestor(".element",!0),s=e.getElementById(l?.id()),u=s?.top,c=u?.id,d=e.selectedElementsIds.indexOf(c)>=0;c&&r&&!d?e.selectElements(e.selectedElementsIds.concat([c])):c&&r&&d?e.selectElements(e.selectedElementsIds.filter(e=>e!==c)):!c||r||d||e.selectElements([c])};!function(e){let t=e=>e.hasName("element")||e.hasName("page-background")||e.hasName("elements-area");function n(n){let r=e.current?.getStage();var i=[],o=[];return r.find(t).forEach(e=>{if(!(n.indexOf(e)>=0)){var t=e.getClientRect({skipShadow:!0,skipStroke:!0});i.push(t.x,t.x+t.width,t.x+t.width/2),o.push(t.y,t.y+t.height,t.y+t.height/2)}}),{vertical:i,horizontal:o}}function r(t){let n=e.current?.getLayer(),r=n?.children.find(e=>"line-guides"===e.name());t.forEach(e=>{if("H"===e.orientation){var t=new(l(A)).Line({points:[-6e3,e.lineGuide,6e3,e.lineGuide],stroke:"rgb(0, 161, 255)",strokeWidth:1,name:"guid-line",dash:[4,6]});r?.add(t),n.batchDraw()}else if("V"===e.orientation){var t=new(l(A)).Line({points:[e.lineGuide,-6e3,e.lineGuide,6e3],stroke:"rgb(0, 161, 255)",strokeWidth:1,name:"guid-line",dash:[4,6]});r?.add(t)}})}let i=e=>{e.target.getLayer().children.find(e=>"line-guides"===e.name()).destroyChildren();var t=ah(n(e.target.nodes()),function(e){let t=e.__getNodeRect(),n=ac({...t,rotation:l(A).Util.radToDeg(t.rotation)}),r=e.getAbsolutePosition();return{vertical:[{guide:n.x,offset:r.x-n.x,snap:"start"},{guide:n.x+n.width/2,offset:r.x-n.x-n.width/2,snap:"center"},{guide:n.x+n.width,offset:r.x-n.x-n.width,snap:"end"}],horizontal:[{guide:n.y,offset:r.y-n.y,snap:"start"},{guide:n.y+n.height/2,offset:r.y-n.y-n.height/2,snap:"center"},{guide:n.y+n.height,offset:r.y-n.y-n.height,snap:"end"}]}}(e.target));if(!t.length)return;r(t);let i=e.target.getAbsolutePosition(),o={...i};t.forEach(e=>{switch(e.snap){case"start":case"center":case"end":switch(e.orientation){case"V":o.x=e.lineGuide+e.offset;break;case"H":o.y=e.lineGuide+e.offset}}});let a=o.x-i.x,s=o.y-i.y;e.evt.ctrlKey||e.evt.metaKey||e.target.nodes().forEach(e=>{let t=e.getAbsolutePosition();e.setAbsolutePosition({x:t.x+a,y:t.y+s})})},o=(t,i,o)=>{let a=e.current,l=a.getLayer();if(l.children.find(e=>"line-guides"===e.name()).destroyChildren(),"rotater"===a.getActiveAnchor()||Math.sqrt(Math.pow(i.x-t.x,2)+Math.pow(i.y-t.y,2))>50||!l)return i;var s=ah(n(a.nodes()),{vertical:[{guide:i.x,offset:0,snap:"start"}],horizontal:[{guide:i.y,offset:0,snap:"start"}]});if(!s.length||(r(s),o.ctrlKey||o.metaKey))return i;let u=i.x,c=i.x;s.forEach(e=>{switch(e.orientation){case"V":u=e.lineGuide;break;case"H":c=e.lineGuide}});let d=Math.abs(i.x-u),h=Math.abs(i.y-c),f=d<10,p=h<10;return f&&!p?{x:u,y:t.y}:p&&!f?{x:t.x,y:c}:f&&p?{x:u,y:c}:i},a=e=>{if(!e.target)return;let t=e.target.getLayer();t.children.find(e=>"line-guides"===e.name()).destroyChildren(),t.batchDraw()};l(v).useEffect(()=>{e.current&&(e.current.anchorDragBoundFunc(o),e.current.on("dragstart",()=>{setTimeout(()=>{let e=[...l(A).DD._dragElements.entries()];e.reverse(),l(A).DD._dragElements.clear(),e.forEach(([e,t])=>{l(A).DD._dragElements.set(e,t)})})}),e.current.on("dragmove",i),e.current.on("dragend",a),e.current.on("transformend",a),e.current.on("transform",t=>{t.evt.ctrlKey||t.evt.metaKey?e.current?.rotationSnapTolerance(0):e.current?.rotationSnapTolerance(5)}))},[])}(w);let D=e.activePage===t,F=u?.PageControls,z=u?.Tooltip,B=1/e.scale,U=0/e.scale;return(0,p.jsxs)("div",{ref:_,onDragOver:e=>e.preventDefault(),onDrop:n=>{if(n.preventDefault(),!x.current)return;x.current.setPointersPositions(n);let r=x.current.findOne(".elements-container").getRelativePointerPosition(),i=x.current.getPointerPosition(),o=x.current.getAllIntersections(i).map(e=>e.findAncestor(".element",!0)).filter(Boolean),a=[...new Set(o.reverse())].map(t=>e.getElementById(t.id())),l=a[0];lg&&(lg(r,l,{elements:a,page:t}),lg=null)},style:{position:"relative",width:n+"px"},className:"polotno-page-container"+(D?" active-page":""),children:[(0,p.jsx)(rJ,{ref:x,width:Math.min(n,4*window.innerWidth),height:Math.min(r,4*window.innerHeight),onClick:M,onTap:M,onMouseDown:L,onMouseMove:n=>{if(!n.evt.altKey&&E){S(null);return}if(!n.evt.altKey)return;let r=n.target.findAncestor(".element",!0),i=r?.id();if(!e.selectedElements[0]||e.selectedElementsIds.includes(i))return;let o=ad(e.selectedElements),a=ac(i?e.getElementById(i):{x:0,y:0,width:t.computedWidth,height:t.computedHeight,rotation:0}),l=[];o.minX>a.maxX&&l.push({distance:o.minX-a.maxX,box1:o,box2:a,points:[{x:o.minX,y:o.minY+o.height/2},{x:a.maxX,y:o.minY+o.height/2},{x:a.maxX,y:a.minY+a.height/2}]}),o.maxX<a.minX&&l.push({distance:a.minX-o.maxX,box1:o,box2:a,points:[{x:o.maxX,y:o.minY+o.height/2},{x:a.minX,y:o.minY+o.height/2},{x:a.minX,y:a.minY+a.height/2}]}),o.minY>a.maxY&&l.push({box1:o,box2:a,distance:o.minY-a.maxY,points:[{x:o.minX+o.width/2,y:o.minY},{x:o.minX+o.width/2,y:a.maxY},{x:a.minX+a.width/2,y:a.maxY}]}),o.maxY<a.minY&&l.push({box1:o,box2:a,distance:a.minY-o.maxY,points:[{x:o.minX+o.width/2,y:o.maxY},{x:o.minX+o.width/2,y:a.minY},{x:a.minX+a.width/2,y:a.minY}]}),o.minX>=a.minX&&o.maxX<=a.maxX&&o.minY>=a.minY&&o.maxY<=a.maxY&&(l.push({distance:o.minX-a.minX,box1:o,box2:a,points:[{x:o.minX,y:o.minY+o.height/2},{x:a.minX,y:o.minY+o.height/2},{x:a.minX,y:a.minY+a.height/2}]}),l.push({distance:a.maxX-o.maxX,box1:o,box2:a,points:[{x:o.maxX,y:o.minY+o.height/2},{x:a.maxX,y:o.minY+o.height/2},{x:a.maxX,y:a.minY+a.height/2}]}),l.push({box1:o,box2:a,distance:o.minY-a.minY,points:[{x:o.minX+o.width/2,y:o.minY},{x:o.minX+o.width/2,y:a.minY},{x:a.minX+a.width/2,y:a.minY}]}),l.push({box1:o,box2:a,distance:a.maxY-o.maxY,points:[{x:o.minX+o.width/2,y:o.maxY},{x:o.minX+o.width/2,y:a.maxY},{x:a.minX+a.width/2,y:a.maxY}]})),JSON.stringify(E)!==JSON.stringify(l)&&S(l)},onTouchStart:L,onDragStart:t=>{let n=t.target.findAncestor(".element",!0);if(n){let r=e.getElementById(n?.id()),i=r?.top,o=i?.id;!(e.selectedElementsIds.indexOf(o)>=0)&&o&&(e.selectElements([o]),t.target.stopDrag(),t.target.startDrag(t),w.current?.startDrag(t))}E&&S(null)},pageId:t.id,style:{position:"relative"},children:(0,p.jsxs)("Layer",{children:[(0,p.jsx)(ls,{width:n,height:r,fill:o}),(0,p.jsx)(rq,{x:m,y:b,scaleX:e.scale,scaleY:e.scale,name:"page-container",children:(0,p.jsxs)(rq,{name:"page-container-2",children:[(0,p.jsx)(rq,{name:"page-background-group",x:h,y:h,children:(0,p.jsx)(ld,{x:-t.bleed,y:-t.bleed,width:t.computedWidth+2*t.bleed,height:t.computedHeight+2*t.bleed,background:t.background,shadowBlur:10,shadowColor:"lightgrey",name:"page-background",preventDefault:!1,scale:e.scale})}),(0,p.jsxs)(rq,{x:h,y:h,name:"elements-container",listening:!e.isPlaying,children:[(0,p.jsx)(rW,{name:"elements-area",width:t.computedWidth,height:t.computedHeight,listening:!1}),(0,p.jsx)(lp,{elements:t.children,store:e})]}),(0,p.jsx)(rW,{stroke:c,name:"bleed",strokeWidth:t.bleed,x:t.bleed/2,y:t.bleed/2,width:t.computedWidth+t.bleed,height:t.computedHeight+t.bleed,listening:!1,visible:t.bleed>0&&e.bleedVisible,hideInExport:!0})]})}),(0,p.jsx)(r$,{name:"workspace-background",points:[0,0,n,0,n,r,0,r,0,0,m,b,m,r-b,n-m,r-b,n-m,b,m,b],listening:!1,closed:!0,fill:o}),(0,p.jsx)(rq,{x:m,y:b,scaleX:e.scale,scaleY:e.scale,children:(0,p.jsx)(rW,{name:"page-highlight",hideInExport:!0,x:-B/2-U,y:-B/2-U,width:f+B+2*U,height:g+B+2*U,stroke:D&&e.pages.length>1?s:a,strokeWidth:2,listening:!1,strokeScaleEnabled:!1})}),(0,p.jsxs)(rq,{x:m+h*e.scale,y:b+h*e.scale,scaleX:e.scale,scaleY:e.scale,name:"page-abs-container",children:[(0,p.jsx)(rZ,{ref:w,onDragStart:n=>{n.evt?.altKey&&e.selectedElements.forEach(e=>{let n=e.clone({},{skipSelect:!0}),r=t.children.indexOf(e);t.setElementZIndex(n.id,r)}),e.history.startTransaction()},onDragEnd:()=>{e.history.endTransaction()},onTransformStart:()=>{e.history.startTransaction()},boundBoxFunc:(e,t)=>{let n=1>Math.abs(t.width)||1>Math.abs(t.height),r=1>Math.abs(e.width)||1>Math.abs(e.height);return n&&!r?e:t},onTransform:e=>{let t=w.current?.__getNodeRect();O({anchor:w.current?.getActiveAnchor(),x:t.x,y:t.y,rotation:t.rotation,width:t.width,height:t.height})},onTransformEnd:t=>{O({}),e.history.endTransaction()},visible:!e.isPlaying}),E&&E.map(({points:t,distance:n,box1:r,box2:i},o)=>(0,p.jsxs)(rq,{name:"distances-container",hideInExport:!0,listening:!1,children:[(0,p.jsx)(rW,{...r,stroke:"rgb(0, 161, 255)",strokeWidth:1,strokeScaleEnabled:!1}),(0,p.jsx)(rW,{...i,stroke:"rgb(0, 161, 255)",strokeWidth:1,strokeScaleEnabled:!1}),(0,p.jsx)(r$,{points:[t[0].x,t[0].y,t[1].x,t[1].y],stroke:"rgb(0, 161, 255)",strokeWidth:1,strokeScaleEnabled:!1}),(0,p.jsx)(r$,{points:[t[1].x,t[1].y,t[2].x,t[2].y],stroke:"rgb(0, 161, 255)",strokeWidth:1,strokeScaleEnabled:!1}),(0,p.jsxs)(rG,{x:(t[0].x+t[1].x)/2,y:(t[0].y+t[1].y)/2,offsetY:-10,scaleX:1/e.scale,scaleY:1/e.scale,children:[(0,p.jsx)("Tag",{cornerRadius:5,fill:"rgb(0, 161, 255)",pointerDirection:"down"}),(0,p.jsx)(rY,{align:"center",verticalAlign:"middle",fill:"white",padding:5,text:lr({unit:e.unit,dpi:e.dpi,px:n})})]})]},o)),t._rendering&&(0,p.jsxs)(rq,{children:[(0,p.jsx)(rW,{width:f,height:g,fill:"rgba(255,255,255,0.9)"}),(0,p.jsx)(rY,{text:"Rendering...",fontSize:60,width:f,height:g,align:"center",verticalAlign:"middle"})]}),z&&(0,p.jsx)(z,{components:u,store:e,page:t,stageRef:x})]}),(0,p.jsx)(lf,{...C,store:e}),(0,p.jsx)(lh,{selection:j}),a0.value&&(0,p.jsx)(rY,{text:"Powered by polotno.com",fontSize:14,fill:"rgba(0,0,0,0.6)",x:n-170,y:r-18,onMouseEnter:e=>{e.target.getStage().container().style.cursor="pointer"},onMouseLeave:e=>{e.target.getStage().container().style.cursor=""},onTouchStart:e=>{e.cancelBubble=!0},onMouseDown:e=>{e.cancelBubble=!0},onClick:()=>{window.open("https://polotno.com")},onTap:()=>{window.open("https://polotno.com")}}),(0,p.jsx)(rq,{name:"line-guides"})]})}),(i??!0)&&D&&F&&(0,p.jsx)(F,{store:e,page:t,xPadding:m,yPadding:b})]})}),v=h("8NFma");let ly=[.1,.2,.5,1,2,5,10,20,25,50,100,200,500,1e3,2e3,5e3,1e4],lb=e=>ly.find(t=>e(t)>30)||1e4,lw=P(({store:e,width:t,height:n})=>{let r=l(v).useRef(null);if(!e.activePage)return null;let i=e.activePage;e.bleedVisible&&i.bleed;let o=i.computedWidth*e.scale,a=i.computedHeight*e.scale,s=(t-o)/2,u=lb(t=>ln({unitVal:t,dpi:e.dpi,unit:e.unit})*e.scale),c=ln({unitVal:u,dpi:e.dpi,unit:e.unit})*e.scale,d=Math.round(o/c)+1,h=Math.round(a/c)+1,f=ad(e.selectedShapes);return(0,p.jsxs)("div",{style:{position:"absolute",top:0,left:0,pointerEvents:"none"},ref:r,children:[(0,p.jsxs)("div",{style:{width:t+"px",height:"14px",position:"sticky",fontSize:"8px",lineHeight:"14px",top:"0px",left:"0px",color:"grey",borderBottom:"1px solid grey",backgroundColor:"#e8e8e8",overflow:"hidden"},children:[[...Array(d)].map((t,n)=>(0,p.jsx)("div",{style:{position:"absolute",left:s+n*c+"px",borderLeft:"1px solid grey",paddingLeft:"2px",width:c+"px"},children:"px"===e.unit||u>=1?Math.round(u*n):(u*n).toFixed(1)},n)),!!e.selectedShapes.length&&(0,p.jsx)("div",{style:{position:"absolute",left:s+f.x*e.scale+"px",height:"14px",width:f.width*e.scale,backgroundColor:"rgba(0,0,0,0.15)"}})]}),e.pages.map((t,r)=>{let i=(n-t.computedHeight*e.scale)/2;return(0,p.jsxs)("div",{style:{left:"0px",width:"14px",height:n+"px",position:"sticky",fontSize:"8px",lineHeight:"14px",color:"grey",borderRight:"1px solid grey",backgroundColor:"#e8e8e8",overflow:"hidden"},children:[[...Array(h)].map((t,n)=>(0,p.jsx)("div",{style:{position:"absolute",left:"14px",top:i+n*c-14+"px",borderLeft:"1px solid grey",paddingLeft:"2px",transform:"rotate(90deg)",transformOrigin:"left top",width:c+"px",overflow:"hidden"},children:"px"===e.unit||u>=1?Math.round(u*n):(u*n).toFixed(1)},n)),e.selectedShapes[0]?.page===t&&(0,p.jsx)("div",{style:{position:"absolute",top:i+f.y*e.scale-14+"px",width:"14px",height:f.height*e.scale,backgroundColor:"rgba(0,0,0,0.15)"}})]},t.id)})]})}),lx=[],l_="",lE="polotno_clipboard",lS=e=>{lx=e;try{localStorage.setItem(lE,JSON.stringify(e))}catch(e){}},lC=()=>{try{let e=localStorage.getItem(lE);if(e)return JSON.parse(e)}catch(e){}return lx};var y=h("2SBKn");let lO=(0,y.observable)({toolbar:{duration:"Duration",opacity:"Opacity",effects:"Effects",blur:"Blur",textBackground:"Background",backgroundCornerRadius:"Corner radius",backgroundOpacity:"Opacity",backgroundPadding:"Padding",brightness:"Brightness",sepia:"Sepia",grayscale:"Grayscale",textStroke:"Text Stroke",shadow:"Shadow",border:"Border",cornerRadius:"Corner Radius",position:"Position",layering:"Layering",toForward:"To forward",up:"Up",down:"Down",toBottom:"To bottom",alignLeft:"Align left",alignCenter:"Align center",alignRight:"Align right",alignTop:"Align top",alignMiddle:"Align middle",alignBottom:"Align bottom",flip:"Flip",flipHorizontally:"Flip horizontally",flipVertically:"Flip vertically",fitToBackground:"Fit to page",removeBackground:"Remove background",removeBackgroundTitle:"Remove background from image",cancelRemoveBackground:"Cancel",confirmRemoveBackground:"Confirm",crop:"Crop",cropDone:"Done",cropCancel:"Cancel",removeClip:"Remove clip",removeMask:"Remove mask",transparency:"Transparency",lockedDescription:"Object is locked. Unlock it to allow changes from canvas.",unlockedDescription:"Object is unlocked. Lock it to prevent changes from canvas.",removeElements:"Remove elements",duplicateElements:"Duplicate elements",download:"Download",saveAsImage:"Save as image",saveAsPDF:"Save as PDF",lineHeight:"Line height",letterSpacing:"Letter spacing",offsetX:"Offset X",offsetY:"Offset Y",color:"Color",selectable:"Selectable",draggable:"Draggable",removable:"Removable",resizable:"Resizable",contentEditable:"Can change content",styleEditable:"Can change style",alwaysOnTop:"Always on top",showInExport:"Show in export",ungroupElements:"Ungroup",groupElements:"Group",lineSize:"Line size",fade:"Fade",move:"Move",zoom:"Zoom",animate:"Animate",spaceEvenly:"Space evenly",horizontalDistribution:"Horizontally",verticalDistribution:"Vertically",strokeWidth:"Stroke Width"},workspace:{noPages:"There are no pages yet...",addPage:"Add page",removePage:"Remove page",duplicatePage:"Duplicate page",moveUp:"Move up",moveDown:"Move down"},scale:{reset:"Reset"},error:{removeBackground:"Ops! Something went wrong. Background can not be removed."},sidePanel:{templates:"Templates",searchTemplatesWithSameSize:"Show templates with the same size",searchPlaceholder:"Search...",otherFormats:"Other formats",noResults:"No results",error:"Loading is failed...",text:"Text",uploadFont:"Upload font",myFonts:"My fonts",photos:"Photos",elements:"Elements",shapes:"Shapes",lines:"Lines",upload:"Upload",uploadImage:"Upload Image",uploadTip:"Do you want to upload your own images?",background:"Background",resize:"Resize",layers:"Layers",layerTypes:{image:"Image",text:"Text",svg:"SVG",line:"Line",figure:"Figure",group:"Group"},layersTip:"Elements on your active page:",noLayers:"No elements on the page...",namePlaceholder:"Type element name...",useMagicResize:"Use magic resize",width:"Width",height:"Height",magicResizeDescription:"Magic resize will automatically resize and move all elements on the canvas",headerText:"Header",createHeader:"Create header",subHeaderText:"Sub Header",createSubHeader:"Create sub header",bodyText:"Body text",createBody:"Create body text"}}),lk=e=>e&&"object"==typeof e;(0,y.action)(e=>{!function e(t,n){Object.keys(n).forEach(r=>{let i=t[r],o=n[r];lk(o)&&lk(i)?e(i,o):t[r]=o})}(lO,e)});let lP={},lT=e=>{let t=function(e,t){var n,r=t.split("."),i=e;for(n=0;n<r.length;++n){if(void 0==i[r[n]])return;i=i[r[n]]}return i}(lO,e);if(void 0!==t)return t;lP[e]||(lP[e]=!0,console.warn(`Missing translation '${e}'`));let n=e.split("."),r=n[n.length-1]||" ";return r.charAt(0).toUpperCase()+r.slice(1)},lA=(e,t,n)=>Math.max(t,Math.min(n,e)),lN=`Polotno warning: <Workspace /> component can not automatically detect its size.
|
|
114
114
|
Width or height of parent elements is equal 0.
|
|
115
115
|
Please make sure it has non-zero size. You may need to adjust it with your styles. <Workspace /> will automatically fit into parent container.
|
|
116
116
|
For simpler debugging here is the log of the parent element:`,lj=(e,t,n,r,i,o)=>{let a=l(v).useRef({width:t,height:n}),s=l(v).useRef({top:0,left:0}),u=l(v).useRef(!1),c=l(v).useRef(i.pages.length);u.current=c.current!==i.pages.length,c.current=i.pages.length,l(v).useEffect(()=>{let t=e.current,n=e=>{s.current={top:t.scrollTop,left:t.scrollLeft}};return t.addEventListener("scroll",n),()=>{t.removeEventListener("scroll",n)}},[]),l(v).useLayoutEffect(()=>{if(!e.current||u.current)return;let r=e.current,i=(s.current.left+r.offsetWidth/2)/a.current.width,l=(s.current.top+r.offsetHeight/2)/a.current.height;o.current=!0,r.scrollLeft=i*t-r.offsetWidth/2,r.scrollTop=l*n-r.offsetHeight/2,a.current={width:t,height:n}},[r,t,n])},lR=(e,t,n,r,i)=>{let o=l(v).useRef(!1),a=l(v).useRef(null);l(v).useEffect(()=>{let t=e.current,n=()=>{if(i.current)return};return t.addEventListener("scroll",n),()=>{t.removeEventListener("scroll",n)}},[]);let s=n.pages.indexOf(n.activePage);return l(v).useLayoutEffect(()=>{if(!n.activePage||!e.current||o.current)return;let r=e.current,a=n.pages.indexOf(n.activePage)*t;Math.abs(a-r.scrollTop)>.5*t&&(i.current=!0,r.scrollTop=a)},[n.activePage,s]),{handleScroll:e=>{if(i.current){i.current=!1;return}o.current=!0,clearTimeout(a.current),a.current=setTimeout(()=>{o.current=!1},300);let t=e.currentTarget.childNodes[0].offsetHeight,l=Math.floor((e.currentTarget.scrollTop+r.height/3)/t),s=n.pages[l];s&&s.select()}}},lI=({store:e})=>(0,p.jsxs)("div",{style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",textAlign:"center"},children:[(0,p.jsx)("p",{children:lT("workspace.noPages")}),(0,p.jsx)("button",{onClick:()=>{e.addPage()},children:lT("workspace.addPage")})]}),lL=({width:e,height:t,xPadding:n,yPadding:r,backgroundColor:i})=>(0,p.jsx)("div",{style:{width:e+"px",height:t+"px",backgroundColor:i,paddingLeft:n+"px",paddingRight:n+"px",paddingTop:r+"px",paddingBottom:r+"px"},children:(0,p.jsx)("div",{style:{width:" 100%",height:"100%",backgroundColor:"white"}})}),lM=P(({store:e,pageControlsEnabled:t,backgroundColor:n,pageBorderColor:r,activePageBorderColor:i,bleedColor:o,components:a,onKeyDown:s,paddingX:u,paddingY:c})=>{let d=u??20,h=c??55,[f,g]=l(v).useState({width:100,height:100}),m=l(v).useRef(f),y=l(v).useRef(null),b=l(v).useRef(null),w=e.bleedVisible?Math.max(0,...e.pages.map(e=>e.bleed)):0,x=Math.max(...e.pages.map(e=>e.computedWidth)),_=Math.max(...e.pages.map(e=>e.computedHeight)),E=x+2*w,S=_+2*w,C=async()=>{if(await new Promise(e=>setTimeout(e,50)),null===y.current)return;let t=y.current.getBoundingClientRect();(0===t.width||0===t.height)&&(console.warn(lN),console.log(y.current));let n=b.current.clientWidth||t.width,r={width:n,height:t.height};(m.current.width!==r.width||m.current.height!==r.height)&&(g(r),m.current=r);let i=Math.max(Math.min((n-2*d)/E,(t.height-2*h)/S),.01);e.scaleToFit!==i&&(e.setScale(i),e._setScaleToFit(i))};l(v).useEffect(()=>{C()},[E,S]),l(v).useEffect(()=>{let e=y.current;if(window.ResizeObserver){let t=new ResizeObserver(C);return t.observe(e),()=>t.unobserve(e)}{let e=setInterval(C,100);return()=>clearInterval(e)}},[E,S]);let O=Math.max(d,(f.width-E*e.scale)/2),k=S*e.scale*e.pages.length,P=Math.max(h,(f.height-k)/e.pages.length/2);l(v).useEffect(()=>{let t=t=>{(s||function(e,t){if(document.activeElement?.tagName==="INPUT"||document.activeElement?.tagName==="TEXTAREA"||document.activeElement?.contentEditable==="true")return;let n=t.selectedElements.filter(e=>e.removable),r=n.map(e=>e.id);(46===e.keyCode||8===e.keyCode)&&t.deleteElements(r);let i=e.ctrlKey||e.metaKey,o=e.shiftKey;if(i&&!o&&"KeyZ"===e.code&&(e.preventDefault(),t.history.undo()),i&&o&&"KeyZ"===e.code&&(e.preventDefault(),t.history.redo()),i&&"KeyA"===e.code){e.preventDefault();let n=t.activePage?.children.filter(e=>e.selectable),r=n?.map(e=>e.id)||[];t.selectElements(r)}if(i&&"KeyC"===e.code&&(e.preventDefault(),l_=t.activePage?.id,lS(t.selectedElements.map(e=>e.toJSON()))),i&&"KeyX"===e.code&&(e.preventDefault(),l_=t.activePage?.id,lS(t.selectedElements.map(e=>e.toJSON())),t.deleteElements(n)),i&&"KeyV"===e.code){e.preventDefault();let n=0;l_===t.activePage?.id&&(n=t.width/20),l_=t.activePage?.id,t.history.transaction(()=>{let e=[],r=lC();r.forEach(r=>{delete r.id,r.x+=n,r.y+=n;let i=t.activePage?.addElement(r);i&&e.push(i.id)}),lS(r),t.selectElements(e)})}"ArrowDown"===e.code&&(e.preventDefault(),t.selectedElements.forEach(e=>{e.set({y:e.y+1})})),"ArrowUp"===e.code&&(e.preventDefault(),t.selectedElements.forEach(e=>{e.set({y:e.y-1})})),"ArrowLeft"===e.code&&(e.preventDefault(),t.selectedElements.forEach(e=>{e.set({x:e.x-1})})),"ArrowRight"===e.code&&(e.preventDefault(),t.selectedElements.forEach(e=>{e.set({x:e.x+1})}))})(t,e)};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)},[]),l(v).useEffect(()=>{let t=t=>{if(t.ctrlKey||t.metaKey){t.preventDefault();let n=Math.max(3,e.scaleToFit),r=Math.min(.1,e.scaleToFit),i=lA(t.deltaY<0?1.05*e.scale:e.scale/1.05,r,n);e.setScale(i);return}};return b.current?.addEventListener("wheel",t),()=>b.current?.removeEventListener("wheel",t)},[]);let T=l(v).useRef(!1);lj(b,E*e.scale+2*O,S*e.scale+2*P,e.scale,e,T);let{handleScroll:A}=lR(b,S*e.scale+2*P,e,f,T),N=f.width>=E*e.scale+2*O,j=n||"rgba(232, 232, 232, 0.9)",R=e.pages.indexOf(e.activePage),I=a?.NoPages||lI;return(0,p.jsx)("div",{ref:y,style:{width:"100%",height:"100%",position:"relative",outline:"none",flex:1,backgroundColor:j},tabIndex:0,className:"polotno-workspace-container",children:(0,p.jsxs)("div",{ref:b,onScroll:A,style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",overflow:"auto",overflowX:N?"hidden":"auto"},className:"polotno-workspace-inner",children:[e.pages.map((n,l)=>1>=Math.abs(l-R)||n._exporting?(0,p.jsx)(lv,{page:n,xPadding:O,yPadding:P,width:E*e.scale+2*O,height:S*e.scale+2*P,store:e,pageControlsEnabled:t,backColor:j,pageBorderColor:r||"lightgrey",activePageBorderColor:i||"rgb(0, 161, 255)",bleedColor:o||"rgba(255, 0, 0, 0.1)",components:a},n.id):(0,p.jsx)(lL,{width:E*e.scale+2*O,height:S*e.scale+2*P,backgroundColor:j,xPadding:O,yPadding:P},n.id)),e.rulesVisible&&(0,p.jsx)(lw,{store:e,xPadding:O,yPadding:P,width:E*e.scale+2*O,height:S*e.scale+2*P}),0===e.pages.length&&(0,p.jsx)(I,{store:e})]})})});h("8NFma");var lD=h("gztBd"),lF={};!/*!
|
|
@@ -118,10 +118,10 @@ For simpler debugging here is the log of the parent element:`,lj=(e,t,n,r,i,o)=>
|
|
|
118
118
|
Licensed under the MIT License (MIT), see
|
|
119
119
|
http://jedwatson.github.io/classnames
|
|
120
120
|
*/function(){var e={}.hasOwnProperty;function t(){for(var n=[],r=0;r<arguments.length;r++){var i=arguments[r];if(i){var o=typeof i;if("string"===o||"number"===o)n.push(i);else if(Array.isArray(i)){if(i.length){var a=t.apply(null,i);a&&n.push(a)}}else if("object"===o){if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes("[native code]")){n.push(i.toString());continue}for(var l in i)e.call(i,l)&&i[l]&&n.push(l)}}}return n.join(" ")}lF?(t.default=t,lF=t):"function"==typeof define&&"object"==typeof define.amd&&define.amd?define("classnames",[],function(){return t}):window.classNames=t}();var v=h("8NFma"),lz={};i(lz,"ACTIVE",()=>lG),i(lz,"ALIGN_LEFT",()=>lW),i(lz,"ALIGN_RIGHT",()=>l$),i(lz,"COMPACT",()=>lK),i(lz,"DARK",()=>lY),i(lz,"DISABLED",()=>lX),i(lz,"FILL",()=>lZ),i(lz,"FIXED",()=>lQ),i(lz,"FIXED_TOP",()=>lJ),i(lz,"INLINE",()=>l0),i(lz,"INTERACTIVE",()=>l1),i(lz,"LARGE",()=>l2),i(lz,"LOADING",()=>l3),i(lz,"MINIMAL",()=>l5),i(lz,"OUTLINED",()=>l6),i(lz,"PADDED",()=>l4),i(lz,"MULTILINE",()=>l8),i(lz,"READ_ONLY",()=>l9),i(lz,"ROUND",()=>l7),i(lz,"SELECTED",()=>se),i(lz,"SMALL",()=>st),i(lz,"VERTICAL",()=>sn),i(lz,"POSITION_TOP",()=>sr),i(lz,"positionClass",()=>he),i(lz,"POSITION_BOTTOM",()=>si),i(lz,"POSITION_LEFT",()=>so),i(lz,"POSITION_RIGHT",()=>sa),i(lz,"ELEVATION_0",()=>sl),i(lz,"elevationClass",()=>d8),i(lz,"ELEVATION_1",()=>ss),i(lz,"ELEVATION_2",()=>su),i(lz,"ELEVATION_3",()=>sc),i(lz,"ELEVATION_4",()=>sd),i(lz,"INTENT_PRIMARY",()=>sh),i(lz,"intentClass",()=>d7),i(lz,"INTENT_SUCCESS",()=>sf),i(lz,"INTENT_WARNING",()=>sp),i(lz,"INTENT_DANGER",()=>sg),i(lz,"FOCUS_DISABLED",()=>sm),i(lz,"FOCUS_STYLE_MANAGER_IGNORE",()=>sv),i(lz,"UI_TEXT",()=>sy),i(lz,"RUNNING_TEXT",()=>sb),i(lz,"MONOSPACE_TEXT",()=>sw),i(lz,"TEXT_LARGE",()=>sx),i(lz,"TEXT_SMALL",()=>s_),i(lz,"TEXT_MUTED",()=>sE),i(lz,"TEXT_DISABLED",()=>sS),i(lz,"TEXT_OVERFLOW_ELLIPSIS",()=>sC),i(lz,"BLOCKQUOTE",()=>sO),i(lz,"CODE",()=>sk),i(lz,"CODE_BLOCK",()=>sP),i(lz,"HEADING",()=>sT),i(lz,"LIST",()=>sA),i(lz,"LIST_UNSTYLED",()=>sN),i(lz,"RTL",()=>sj),i(lz,"ALERT",()=>sR),i(lz,"ALERT_BODY",()=>sI),i(lz,"ALERT_CONTENTS",()=>sL),i(lz,"ALERT_FOOTER",()=>sM),i(lz,"BREADCRUMB",()=>sD),i(lz,"BREADCRUMB_CURRENT",()=>sF),i(lz,"BREADCRUMBS",()=>sz),i(lz,"BREADCRUMBS_COLLAPSED",()=>sB),i(lz,"BUTTON",()=>sU),i(lz,"BUTTON_GROUP",()=>sH),i(lz,"BUTTON_SPINNER",()=>sV),i(lz,"BUTTON_TEXT",()=>sq),i(lz,"CALLOUT",()=>sG),i(lz,"CALLOUT_HAS_BODY_CONTENT",()=>sW),i(lz,"CALLOUT_ICON",()=>s$),i(lz,"CARD",()=>sK),i(lz,"CONTROL_CARD",()=>sY),i(lz,"CONTROL_CARD_LABEL",()=>sX),i(lz,"SWITCH_CONTROL_CARD",()=>sZ),i(lz,"CHECKBOX_CONTROL_CARD",()=>sQ),i(lz,"RADIO_CONTROL_CARD",()=>sJ),i(lz,"CARD_LIST",()=>s0),i(lz,"CARD_LIST_BORDERED",()=>s1),i(lz,"COLLAPSE",()=>s2),i(lz,"COLLAPSE_BODY",()=>s3),i(lz,"CONTEXT_MENU",()=>s5),i(lz,"CONTEXT_MENU_VIRTUAL_TARGET",()=>s6),i(lz,"CONTEXT_MENU_POPOVER",()=>s4),i(lz,"CONTEXT_MENU_BACKDROP",()=>s8),i(lz,"CONTROL_GROUP",()=>s9),i(lz,"DIALOG",()=>s7),i(lz,"DIALOG_CONTAINER",()=>ue),i(lz,"DIALOG_HEADER",()=>ut),i(lz,"DIALOG_BODY",()=>un),i(lz,"DIALOG_BODY_SCROLL_CONTAINER",()=>ur),i(lz,"DIALOG_CLOSE_BUTTON",()=>ui),i(lz,"DIALOG_FOOTER",()=>uo),i(lz,"DIALOG_FOOTER_FIXED",()=>ua),i(lz,"DIALOG_FOOTER_MAIN_SECTION",()=>ul),i(lz,"DIALOG_FOOTER_ACTIONS",()=>us),i(lz,"DIALOG_STEP",()=>uu),i(lz,"DIALOG_STEP_CONTAINER",()=>uc),i(lz,"DIALOG_STEP_TITLE",()=>ud),i(lz,"DIALOG_STEP_ICON",()=>uh),i(lz,"DIALOG_STEP_VIEWED",()=>uf),i(lz,"DIVIDER",()=>up),i(lz,"DRAWER",()=>ug),i(lz,"DRAWER_BODY",()=>um),i(lz,"DRAWER_FOOTER",()=>uv),i(lz,"DRAWER_HEADER",()=>uy),i(lz,"EDITABLE_TEXT",()=>ub),i(lz,"EDITABLE_TEXT_CONTENT",()=>uw),i(lz,"EDITABLE_TEXT_EDITING",()=>ux),i(lz,"EDITABLE_TEXT_INPUT",()=>u_),i(lz,"EDITABLE_TEXT_PLACEHOLDER",()=>uE),i(lz,"FLEX_EXPANDER",()=>uS),i(lz,"HTML_SELECT",()=>uC),i(lz,"SELECT",()=>uO),i(lz,"HTML_TABLE",()=>uk),i(lz,"HTML_TABLE_BORDERED",()=>uP),i(lz,"HTML_TABLE_STRIPED",()=>uT),i(lz,"INPUT",()=>uA),i(lz,"INPUT_GHOST",()=>uN),i(lz,"INPUT_GROUP",()=>uj),i(lz,"INPUT_LEFT_CONTAINER",()=>uR),i(lz,"INPUT_ACTION",()=>uI),i(lz,"RESIZABLE_INPUT_SPAN",()=>uL),i(lz,"TEXT_AREA",()=>uM),i(lz,"TEXT_AREA_AUTO_RESIZE",()=>uD),i(lz,"CONTROL",()=>uF),i(lz,"CONTROL_INDICATOR",()=>uz),i(lz,"CONTROL_INDICATOR_CHILD",()=>uB),i(lz,"CHECKBOX",()=>uU),i(lz,"RADIO",()=>uH),i(lz,"RADIO_GROUP",()=>uV),i(lz,"SWITCH",()=>uq),i(lz,"SWITCH_INNER_TEXT",()=>uG),i(lz,"FILE_INPUT",()=>uW),i(lz,"FILE_INPUT_HAS_SELECTION",()=>u$),i(lz,"FILE_UPLOAD_INPUT",()=>uK),i(lz,"FILE_UPLOAD_INPUT_CUSTOM_TEXT",()=>uY),i(lz,"KEY",()=>uX),i(lz,"KEY_COMBO",()=>uZ),i(lz,"MODIFIER_KEY",()=>uQ),i(lz,"HOTKEY",()=>uJ),i(lz,"HOTKEY_LABEL",()=>u0),i(lz,"HOTKEY_COLUMN",()=>u1),i(lz,"HOTKEY_DIALOG",()=>u2),i(lz,"LABEL",()=>u3),i(lz,"FORM_GROUP",()=>u5),i(lz,"FORM_CONTENT",()=>u6),i(lz,"FORM_HELPER_TEXT",()=>u4),i(lz,"FORM_GROUP_SUB_LABEL",()=>u8),i(lz,"MENU",()=>u9),i(lz,"MENU_ITEM",()=>u7),i(lz,"MENU_ITEM_IS_SELECTABLE",()=>ce),i(lz,"MENU_ITEM_SELECTED_ICON",()=>ct),i(lz,"MENU_ITEM_ICON",()=>cn),i(lz,"MENU_ITEM_LABEL",()=>cr),i(lz,"MENU_SUBMENU",()=>ci),i(lz,"MENU_SUBMENU_ICON",()=>co),i(lz,"MENU_DIVIDER",()=>ca),i(lz,"MENU_HEADER",()=>cl),i(lz,"MULTISTEP_DIALOG",()=>cs),i(lz,"MULTISTEP_DIALOG_PANELS",()=>cu),i(lz,"MULTISTEP_DIALOG_LEFT_PANEL",()=>cc),i(lz,"MULTISTEP_DIALOG_RIGHT_PANEL",()=>cd),i(lz,"MULTISTEP_DIALOG_NAV_TOP",()=>ch),i(lz,"MULTISTEP_DIALOG_NAV_RIGHT",()=>cf),i(lz,"SECTION",()=>cp),i(lz,"SECTION_COLLAPSED",()=>cg),i(lz,"SECTION_HEADER",()=>cm),i(lz,"SECTION_HEADER_LEFT",()=>cv),i(lz,"SECTION_HEADER_TITLE",()=>cy),i(lz,"SECTION_HEADER_SUB_TITLE",()=>cb),i(lz,"SECTION_HEADER_DIVIDER",()=>cw),i(lz,"SECTION_HEADER_TABS",()=>cx),i(lz,"SECTION_HEADER_RIGHT",()=>c_),i(lz,"SECTION_CARD",()=>cE),i(lz,"NAVBAR",()=>cS),i(lz,"NAVBAR_GROUP",()=>cC),i(lz,"NAVBAR_HEADING",()=>cO),i(lz,"NAVBAR_DIVIDER",()=>ck),i(lz,"NON_IDEAL_STATE",()=>cP),i(lz,"NON_IDEAL_STATE_VISUAL",()=>cT),i(lz,"NON_IDEAL_STATE_TEXT",()=>cA),i(lz,"NUMERIC_INPUT",()=>cN),i(lz,"OVERFLOW_LIST",()=>cj),i(lz,"OVERFLOW_LIST_SPACER",()=>cR),i(lz,"OVERLAY",()=>cI),i(lz,"OVERLAY_BACKDROP",()=>cL),i(lz,"OVERLAY_CONTAINER",()=>cM),i(lz,"OVERLAY_CONTENT",()=>cD),i(lz,"OVERLAY_INLINE",()=>cF),i(lz,"OVERLAY_OPEN",()=>cz),i(lz,"OVERLAY_SCROLL_CONTAINER",()=>cB),i(lz,"OVERLAY_START_FOCUS_TRAP",()=>cU),i(lz,"OVERLAY_END_FOCUS_TRAP",()=>cH),i(lz,"PANEL_STACK",()=>cV),i(lz,"PANEL_STACK_HEADER",()=>cq),i(lz,"PANEL_STACK_HEADER_BACK",()=>cG),i(lz,"PANEL_STACK_VIEW",()=>cW),i(lz,"PANEL_STACK2",()=>c$),i(lz,"PANEL_STACK2_HEADER",()=>cK),i(lz,"PANEL_STACK2_HEADER_BACK",()=>cY),i(lz,"PANEL_STACK2_VIEW",()=>cX),i(lz,"POPOVER",()=>cZ),i(lz,"POPOVER_ARROW",()=>cQ),i(lz,"POPOVER_BACKDROP",()=>cJ),i(lz,"POPOVER_CAPTURING_DISMISS",()=>c0),i(lz,"POPOVER_CONTENT",()=>c1),i(lz,"POPOVER_CONTENT_PLACEMENT",()=>c2),i(lz,"POPOVER_CONTENT_SIZING",()=>c3),i(lz,"POPOVER_DISMISS",()=>c5),i(lz,"POPOVER_DISMISS_OVERRIDE",()=>c6),i(lz,"POPOVER_MATCH_TARGET_WIDTH",()=>c4),i(lz,"POPOVER_OPEN",()=>c8),i(lz,"POPOVER_POPPER_ESCAPED",()=>c9),i(lz,"POPOVER_REFERENCE_HIDDEN",()=>c7),i(lz,"POPOVER_TARGET",()=>de),i(lz,"POPOVER_TRANSITION_CONTAINER",()=>dt),i(lz,"POPOVER_WRAPPER",()=>dn),i(lz,"PROGRESS_BAR",()=>dr),i(lz,"PROGRESS_METER",()=>di),i(lz,"PROGRESS_NO_STRIPES",()=>da),i(lz,"PROGRESS_NO_ANIMATION",()=>dl),i(lz,"PORTAL",()=>ds),i(lz,"SKELETON",()=>du),i(lz,"SLIDER",()=>dc),i(lz,"SLIDER_AXIS",()=>dd),i(lz,"SLIDER_HANDLE",()=>dh),i(lz,"SLIDER_LABEL",()=>df),i(lz,"SLIDER_TRACK",()=>dp),i(lz,"SLIDER_PROGRESS",()=>dg),i(lz,"START",()=>dm),i(lz,"END",()=>dv),i(lz,"SPINNER",()=>dy),i(lz,"SPINNER_ANIMATION",()=>db),i(lz,"SPINNER_HEAD",()=>dw),i(lz,"SPINNER_NO_SPIN",()=>dx),i(lz,"SPINNER_TRACK",()=>d_),i(lz,"SEGMENTED_CONTROL",()=>dE),i(lz,"TAB",()=>dS),i(lz,"TAB_ICON",()=>dC),i(lz,"TAB_TAG",()=>dO),i(lz,"TAB_INDICATOR",()=>dk),i(lz,"TAB_INDICATOR_WRAPPER",()=>dP),i(lz,"TAB_LIST",()=>dT),i(lz,"TAB_PANEL",()=>dA),i(lz,"TABS",()=>dN),i(lz,"TAG",()=>dj),i(lz,"TAG_REMOVE",()=>dR),i(lz,"TAG_INPUT",()=>dI),i(lz,"TAG_INPUT_ICON",()=>dL),i(lz,"TAG_INPUT_VALUES",()=>dM),i(lz,"TOAST",()=>dD),i(lz,"TOAST_CONTAINER",()=>dF),i(lz,"TOAST_MESSAGE",()=>dz),i(lz,"TOOLTIP",()=>dB),i(lz,"TOOLTIP_INDICATOR",()=>dU),i(lz,"TREE",()=>dH),i(lz,"TREE_NODE",()=>dV),i(lz,"TREE_NODE_CARET",()=>dq),i(lz,"TREE_NODE_CARET_CLOSED",()=>dG),i(lz,"TREE_NODE_CARET_NONE",()=>dW),i(lz,"TREE_NODE_CARET_OPEN",()=>d$),i(lz,"TREE_NODE_CONTENT",()=>dK),i(lz,"TREE_NODE_EXPANDED",()=>dY),i(lz,"TREE_NODE_ICON",()=>dX),i(lz,"TREE_NODE_LABEL",()=>dZ),i(lz,"TREE_NODE_LIST",()=>dQ),i(lz,"TREE_NODE_SECONDARY_LABEL",()=>dJ),i(lz,"TREE_NODE_SELECTED",()=>d0),i(lz,"TREE_ROOT",()=>d1),i(lz,"ICON",()=>d2),i(lz,"ICON_STANDARD",()=>d3),i(lz,"ICON_LARGE",()=>d5),i(lz,"getClassNamespace",()=>d6),i(lz,"alignmentClass",()=>d4),i(lz,"iconClass",()=>d9);var lB={LEFT:"left",RIGHT:"right"},lU={ZERO:0,ONE:1,TWO:2,THREE:3,FOUR:4},lH={NONE:"none",PRIMARY:"primary",SUCCESS:"success",WARNING:"warning",DANGER:"danger"},lV={BOTTOM:"bottom",BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",LEFT:"left",LEFT_BOTTOM:"left-bottom",LEFT_TOP:"left-top",RIGHT:"right",RIGHT_BOTTOM:"right-bottom",RIGHT_TOP:"right-top",TOP:"top",TOP_LEFT:"top-left",TOP_RIGHT:"top-right"},lq="bp5";"undefined"!=typeof BLUEPRINT_NAMESPACE?lq=BLUEPRINT_NAMESPACE:"undefined"!=typeof REACT_APP_BLUEPRINT_NAMESPACE&&(lq=REACT_APP_BLUEPRINT_NAMESPACE);var lG="".concat(lq,"-active"),lW="".concat(lq,"-align-left"),l$="".concat(lq,"-align-right"),lK="".concat(lq,"-compact"),lY="".concat(lq,"-dark"),lX="".concat(lq,"-disabled"),lZ="".concat(lq,"-fill"),lQ="".concat(lq,"-fixed"),lJ="".concat(lq,"-fixed-top"),l0="".concat(lq,"-inline"),l1="".concat(lq,"-interactive"),l2="".concat(lq,"-large"),l3="".concat(lq,"-loading"),l5="".concat(lq,"-minimal"),l6="".concat(lq,"-outlined"),l4="".concat(lq,"-padded"),l8="".concat(lq,"-multiline"),l9="".concat(lq,"-read-only"),l7="".concat(lq,"-round"),se="".concat(lq,"-selected"),st="".concat(lq,"-small"),sn="".concat(lq,"-vertical"),sr=he(lV.TOP),si=he(lV.BOTTOM),so=he(lV.LEFT),sa=he(lV.RIGHT),sl=d8(lU.ZERO),ss=d8(lU.ONE),su=d8(lU.TWO),sc=d8(lU.THREE),sd=d8(lU.FOUR),sh=d7(lH.PRIMARY),sf=d7(lH.SUCCESS),sp=d7(lH.WARNING),sg=d7(lH.DANGER),sm="".concat(lq,"-focus-disabled"),sv="".concat(lq,"-focus-style-manager-ignore"),sy="".concat(lq,"-ui-text"),sb="".concat(lq,"-running-text"),sw="".concat(lq,"-monospace-text"),sx="".concat(lq,"-text-large"),s_="".concat(lq,"-text-small"),sE="".concat(lq,"-text-muted"),sS="".concat(lq,"-text-disabled"),sC="".concat(lq,"-text-overflow-ellipsis"),sO="".concat(lq,"-blockquote"),sk="".concat(lq,"-code"),sP="".concat(lq,"-code-block"),sT="".concat(lq,"-heading"),sA="".concat(lq,"-list"),sN="".concat(lq,"-list-unstyled"),sj="".concat(lq,"-rtl"),sR="".concat(lq,"-alert"),sI="".concat(sR,"-body"),sL="".concat(sR,"-contents"),sM="".concat(sR,"-footer"),sD="".concat(lq,"-breadcrumb"),sF="".concat(sD,"-current"),sz="".concat(sD,"s"),sB="".concat(sD,"s-collapsed"),sU="".concat(lq,"-button"),sH="".concat(sU,"-group"),sV="".concat(sU,"-spinner"),sq="".concat(sU,"-text"),sG="".concat(lq,"-callout"),sW="".concat(sG,"-has-body-content"),s$="".concat(sG,"-icon"),sK="".concat(lq,"-card"),sY="".concat(lq,"-control-card"),sX="".concat(sY,"-label"),sZ="".concat(lq,"-switch-control-card"),sQ="".concat(lq,"-checkbox-control-card"),sJ="".concat(lq,"-radio-control-card"),s0="".concat(lq,"-card-list"),s1="".concat(s0,"-bordered"),s2="".concat(lq,"-collapse"),s3="".concat(s2,"-body"),s5="".concat(lq,"-context-menu"),s6="".concat(s5,"-virtual-target"),s4="".concat(s5,"-popover"),s8="".concat(s5,"-backdrop"),s9="".concat(lq,"-control-group"),s7="".concat(lq,"-dialog"),ue="".concat(s7,"-container"),ut="".concat(s7,"-header"),un="".concat(s7,"-body"),ur="".concat(s7,"-body-scroll-container"),ui="".concat(s7,"-close-button"),uo="".concat(s7,"-footer"),ua="".concat(s7,"-footer-fixed"),ul="".concat(s7,"-footer-main-section"),us="".concat(s7,"-footer-actions"),uu="".concat(lq,"-dialog-step"),uc="".concat(uu,"-container"),ud="".concat(uu,"-title"),uh="".concat(uu,"-icon"),uf="".concat(uu,"-viewed"),up="".concat(lq,"-divider"),ug="".concat(lq,"-drawer"),um="".concat(ug,"-body"),uv="".concat(ug,"-footer"),uy="".concat(ug,"-header"),ub="".concat(lq,"-editable-text"),uw="".concat(ub,"-content"),ux="".concat(ub,"-editing"),u_="".concat(ub,"-input"),uE="".concat(ub,"-placeholder"),uS="".concat(lq,"-flex-expander"),uC="".concat(lq,"-html-select"),uO="".concat(lq,"-select"),uk="".concat(lq,"-html-table"),uP="".concat(uk,"-bordered"),uT="".concat(uk,"-striped"),uA="".concat(lq,"-input"),uN="".concat(uA,"-ghost"),uj="".concat(uA,"-group"),uR="".concat(uA,"-left-container"),uI="".concat(uA,"-action"),uL="".concat(lq,"-resizable-input-span"),uM="".concat(lq,"-text-area"),uD="".concat(uM,"-auto-resize"),uF="".concat(lq,"-control"),uz="".concat(uF,"-indicator"),uB="".concat(uz,"-child"),uU="".concat(lq,"-checkbox"),uH="".concat(lq,"-radio"),uV="".concat(lq,"-radio-group"),uq="".concat(lq,"-switch"),uG="".concat(uq,"-inner-text"),uW="".concat(lq,"-file-input"),u$="".concat(lq,"-file-input-has-selection"),uK="".concat(lq,"-file-upload-input"),uY="".concat(lq,"-file-upload-input-custom-text"),uX="".concat(lq,"-key"),uZ="".concat(uX,"-combo"),uQ="".concat(lq,"-modifier-key"),uJ="".concat(lq,"-hotkey"),u0="".concat(uJ,"-label"),u1="".concat(uJ,"-column"),u2="".concat(uJ,"-dialog"),u3="".concat(lq,"-label"),u5="".concat(lq,"-form-group"),u6="".concat(lq,"-form-content"),u4="".concat(lq,"-form-helper-text"),u8="".concat(lq,"-form-group-sub-label"),u9="".concat(lq,"-menu"),u7="".concat(u9,"-item"),ce="".concat(u7,"-is-selectable"),ct="".concat(u7,"-selected-icon"),cn="".concat(u7,"-icon"),cr="".concat(u7,"-label"),ci="".concat(lq,"-submenu"),co="".concat(ci,"-icon"),ca="".concat(u9,"-divider"),cl="".concat(u9,"-header"),cs="".concat(lq,"-multistep-dialog"),cu="".concat(cs,"-panels"),cc="".concat(cs,"-left-panel"),cd="".concat(cs,"-right-panel"),ch="".concat(cs,"-nav-top"),cf="".concat(cs,"-nav-right"),cp="".concat(lq,"-section"),cg="".concat(cp,"-collapsed"),cm="".concat(cp,"-header"),cv="".concat(cm,"-left"),cy="".concat(cm,"-title"),cb="".concat(cm,"-sub-title"),cw="".concat(cm,"-divider"),cx="".concat(cm,"-tabs"),c_="".concat(cm,"-right"),cE="".concat(cp,"-card"),cS="".concat(lq,"-navbar"),cC="".concat(cS,"-group"),cO="".concat(cS,"-heading"),ck="".concat(cS,"-divider"),cP="".concat(lq,"-non-ideal-state"),cT="".concat(cP,"-visual"),cA="".concat(cP,"-text"),cN="".concat(lq,"-numeric-input"),cj="".concat(lq,"-overflow-list"),cR="".concat(cj,"-spacer"),cI="".concat(lq,"-overlay"),cL="".concat(cI,"-backdrop"),cM="".concat(cI,"-container"),cD="".concat(cI,"-content"),cF="".concat(cI,"-inline"),cz="".concat(cI,"-open"),cB="".concat(cI,"-scroll-container"),cU="".concat(cI,"-start-focus-trap"),cH="".concat(cI,"-end-focus-trap"),cV="".concat(lq,"-panel-stack"),cq="".concat(cV,"-header"),cG="".concat(cV,"-header-back"),cW="".concat(cV,"-view"),c$="".concat(lq,"-panel-stack2"),cK="".concat(cV,"-header"),cY="".concat(cV,"-header-back"),cX="".concat(cV,"-view"),cZ="".concat(lq,"-popover"),cQ="".concat(cZ,"-arrow"),cJ="".concat(cZ,"-backdrop"),c0="".concat(cZ,"-capturing-dismiss"),c1="".concat(cZ,"-content"),c2="".concat(cZ,"-placement"),c3="".concat(c1,"-sizing"),c5="".concat(cZ,"-dismiss"),c6="".concat(c5,"-override"),c4="".concat(cZ,"-match-target-width"),c8="".concat(cZ,"-open"),c9="".concat(cZ,"-popper-escaped"),c7="".concat(cZ,"-reference-hidden"),de="".concat(cZ,"-target"),dt="".concat(cZ,"-transition-container"),dn="".concat(cZ,"-wrapper"),dr="".concat(lq,"-progress-bar"),di="".concat(lq,"-progress-meter"),da="".concat(lq,"-no-stripes"),dl="".concat(lq,"-no-animation"),ds="".concat(lq,"-portal"),du="".concat(lq,"-skeleton"),dc="".concat(lq,"-slider"),dd="".concat(dc,"-axis"),dh="".concat(dc,"-handle"),df="".concat(dc,"-label"),dp="".concat(dc,"-track"),dg="".concat(dc,"-progress"),dm="".concat(lq,"-start"),dv="".concat(lq,"-end"),dy="".concat(lq,"-spinner"),db="".concat(dy,"-animation"),dw="".concat(dy,"-head"),dx="".concat(lq,"-no-spin"),d_="".concat(dy,"-track"),dE="".concat(lq,"-segmented-control"),dS="".concat(lq,"-tab"),dC="".concat(dS,"-icon"),dO="".concat(dS,"-tag"),dk="".concat(dS,"-indicator"),dP="".concat(dk,"-wrapper"),dT="".concat(dS,"-list"),dA="".concat(dS,"-panel"),dN="".concat(dS,"s"),dj="".concat(lq,"-tag"),dR="".concat(dj,"-remove"),dI="".concat(lq,"-tag-input"),dL="".concat(dI,"-icon"),dM="".concat(dI,"-values"),dD="".concat(lq,"-toast"),dF="".concat(dD,"-container"),dz="".concat(dD,"-message"),dB="".concat(lq,"-tooltip"),dU="".concat(dB,"-indicator"),dH="".concat(lq,"-tree"),dV="".concat(lq,"-tree-node"),dq="".concat(dV,"-caret"),dG="".concat(dq,"-closed"),dW="".concat(dq,"-none"),d$="".concat(dq,"-open"),dK="".concat(dV,"-content"),dY="".concat(dV,"-expanded"),dX="".concat(dV,"-icon"),dZ="".concat(dV,"-label"),dQ="".concat(dV,"-list"),dJ="".concat(dV,"-secondary-label"),d0="".concat(dV,"-selected"),d1="".concat(lq,"-tree-root"),d2="".concat(lq,"-icon"),d3="".concat(d2,"-standard"),d5="".concat(d2,"-large");function d6(){return lq}function d4(e){switch(e){case lB.LEFT:return lW;case lB.RIGHT:return l$;default:return}}function d8(e){if(void 0!==e)return"".concat(lq,"-elevation-").concat(e)}function d9(e){if(null!=e)return 0===e.indexOf("".concat(lq,"-icon-"))?e:"".concat(lq,"-icon-").concat(e)}function d7(e){if(null!=e&&e!==lH.NONE)return"".concat(lq,"-intent-").concat(e.toLowerCase())}function he(e){if(void 0!==e)return"".concat(lq,"-position-").concat(e)}var ht={};i(ht,"clickElementOnKeyPress",()=>hy),i(ht,"elementIsOrContains",()=>hd),i(ht,"elementIsTextInput",()=>hh),i(ht,"getActiveElement",()=>hf),i(ht,"throttle",()=>hm),i(ht,"throttleEvent",()=>hp),i(ht,"throttleReactEventCallback",()=>hg),i(ht,"isFunction",()=>hb),i(ht,"isArrowKey",()=>ft),i(ht,"isKeyboardClick",()=>fe),i(ht,"isDarkTheme",()=>fn),i(ht,"setRef",()=>fr),i(ht,"getRef",()=>fo);var hn={};function hr(e,t,n){return void 0===n&&(n=function(e,t){return e===t}),null==e&&null==t||null!=e&&null!=t&&e.length===t.length&&e.every(function(e,r){return n(e,t[r])})}function hi(e,t,n){if(null==e&&null==t)return!0;if(null==e||null==t||Array.isArray(e)||Array.isArray(t))return!1;if(null!=n)return hl(e,t,n);var r=Object.keys(e),i=Object.keys(t);return hl(e,t,{include:r})&&hl(e,t,{include:i})}function ho(e,t,n){if(e===t||null==e&&null==t)return!0;if(null==e||null==t)return!1;if(Array.isArray(e)||Array.isArray(t))return hr(e,t,ho);if(hu(e)||hu(t))return e===t;if(null!=n)return hs(e,t,n);if(e.constructor!==t.constructor)return!1;var r=Object.keys(e),i=Object.keys(t);return null!=r&&null!=i&&(0===r.length&&0===i.length||hr(r,i)&&hs(e,t,r))}function ha(e,t,n){void 0===e&&(e={}),void 0===t&&(t={});var r,i,o,a,l,s,u=null==n?(r=e,i=t,o=Object.keys(r),a=Object.keys(i),Object.keys(hc(o.concat(a)))):n;return l=e,s=t,u.filter(function(e){return!ho(l,s,[e])}).map(function(e){return{key:e,valueA:l[e],valueB:s[e]}})}function hl(e,t,n){return(function(e,t,n){if(null!=n&&null!=n.include)return n.include;if(null!=n&&null!=n.exclude){var r=Object.keys(e),i=Object.keys(t),o=hc(r.concat(i));return n.exclude.forEach(function(e){return delete o[e]}),Object.keys(o)}return[]})(e,t,n).every(function(n){return e.hasOwnProperty(n)===t.hasOwnProperty(n)&&e[n]===t[n]})}function hs(e,t,n){return n.every(function(n){return e.hasOwnProperty(n)===t.hasOwnProperty(n)&&ho(e[n],t[n])})}function hu(e){return"number"==typeof e||"string"==typeof e||"boolean"==typeof e}function hc(e){return e.reduce(function(e,t){return e[t]=!0,e},{})}i(hn,"arraysEqual",()=>hr),i(hn,"shallowCompareKeys",()=>hi),i(hn,"deepCompareKeys",()=>ho),i(hn,"getDeepUnequalKeyValues",()=>ha);var lD=h("gztBd");function hd(e,t){return e===t||e.contains(t)}function hh(e){if(null==e||null==e.closest)return!1;var t=e.closest("input, textarea, [contenteditable=true]");if(null==t)return!1;if("input"===t.tagName.toLowerCase()){var n=t.type;if("checkbox"===n||"radio"===n)return!1}return!t.readOnly}function hf(e,t){var n;return null==e?document.activeElement:(null!==(n=e.getRootNode(t))&&void 0!==n?n:document).activeElement}function hp(e,t,n){var r=hv(function(t){e.dispatchEvent(new CustomEvent(n,t))});return e.addEventListener(t,r),r}function hg(e,t){return void 0===t&&(t={}),hv(e,function(e){t.preventDefault&&e.preventDefault()},function(e){return e.persist()})}function hm(e){return hv(e)}function hv(e,t,n){var r=!1;return function(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];null==t||t.apply(void 0,i),r||(r=!0,null==n||n.apply(void 0,i),requestAnimationFrame(function(){e.apply(void 0,i),r=!1}))}}function hy(e){return function(t){return e.some(function(e){return t.key===e})&&t.target.dispatchEvent(new MouseEvent("click",(0,lD.__assign)((0,lD.__assign)({},t),{view:void 0})))}}function hb(e){return"function"==typeof e}var hw={};i(hw,"isNodeEnv",()=>hQ),i(hw,"arrayLengthCompare",()=>hJ),i(hw,"approxEqual",()=>h0),i(hw,"clamp",()=>h1),i(hw,"countDecimalPlaces",()=>h2),i(hw,"uniqueId",()=>h5);var hx="[Blueprint]",h_=hx+" clamp: max cannot be less than min",hE=hx+" <InputGroup> leftElement and leftIcon prop are mutually exclusive, with leftElement taking priority.",hS=hx+" <NumericInput> requires min to be no greater than max if both are defined.",hC=hx+" <NumericInput> requires minorStepSize to be no greater than stepSize.",hO=hx+" <NumericInput> requires stepSize to be no greater than majorStepSize.",hk=hx+" <NumericInput> requires minorStepSize to be strictly greater than zero.",hP=hx+" <NumericInput> requires majorStepSize to be strictly greater than zero.",hT=hx+" <NumericInput> requires stepSize to be strictly greater than zero.",hA=hx+" <NumericInput> controlled value prop does not adhere to stepSize, min, and/or max constraints.",hN=hx+" <OverflowList> does not support changing observeParents after mounting.",hj="".concat(hx," <Popover> requires renderTarget prop or a child element."),hR="".concat(hx,' <Popover hasBackdrop={true}> requires interactionKind="click".'),hI="".concat(hx," <Popover> supports only one child which is rendered as its target; additional children are ignored."),hL=hx+" <Popover> with children ignores renderTarget prop; use either prop or children.",hM=hx+" Disabling <Popover> with empty/whitespace content...",hD=hx+" <Popover usePortal={false}> ignores hasBackdrop",hF=hx+" <Popover> supports either placement or position prop, not both.",hz=hx+" <Popover> onInteraction is ignored when uncontrolled.",hB=hx+" <Popover> targetProps value is ignored when renderTarget API is used.",hU=hx+" <Portal> context blueprintPortalClassName must be string",hH=hx+" setting blueprintPortalClassName via legacy React context API is deprecated, use <PortalProvider> instead.",hV=hx+" <Slider> stepSize must be greater than zero.",hq=hx+" <Slider> labelStepSize must be greater than zero.",hG=hx+" <Slider> min prop must be a finite number.",hW=hx+" <Slider> max prop must be a finite number.",h$=hx+" <MultiSlider> children must be <SliderHandle>s or <SliderTrackStop>s",hK=hx+" <MultiSlider> labelStepSize and labelValues prop are mutually exclusive, with labelStepSize taking priority.",hY=hx+" <Spinner> Classes.SMALL/LARGE are ignored if size prop is set.",hX=hx+" <Dialog> iconName is ignored if title is omitted.",hZ=hx+" <Dialog> isCloseButtonShown prop is ignored if title is omitted.";function hQ(e){return"undefined"!=typeof NODE_ENV&&NODE_ENV===e}function hJ(e,t){return void 0===e&&(e=[]),void 0===t&&(t=[]),e.length-t.length}function h0(e,t,n){return void 0===n&&(n=1e-5),Math.abs(e-t)<=n}function h1(e,t,n){if(null==e)return e;if(n<t)throw Error(h_);return Math.min(Math.max(e,t),n)}function h2(e){if(!isFinite(e))return 0;for(var t=1,n=0;Math.round(e*t)/t!==e;)t*=10,n++;return n}var h3=new Map;function h5(e){var t,n=null!==(t=h3.get(e))&&void 0!==t?t:0;return h3.set(e,n+1),"".concat(e,"-").concat(n)}var h6={};i(h6,"isReactNodeEmpty",()=>h4),i(h6,"isReactChildrenElementOrElements",()=>h8),i(h6,"ensureElement",()=>h9),i(h6,"isElementOfType",()=>h7);var v=h("8NFma");function h4(e,t){return void 0===t&&(t=!1),null==e||""===e||!1===e||!t&&Array.isArray(e)&&(0===e.length||e.every(function(e){return h4(e,!0)}))}function h8(e){return!h4(e,!0)&&!0!==e}function h9(e,t){if(void 0===t&&(t="span"),null!=e&&"boolean"!=typeof e)return"string"==typeof e?e.trim().length>0?v.createElement(t,{},e):void 0:"number"==typeof e||"symbol"==typeof e.type||Array.isArray(e)?v.createElement(t,{},e):"object"==typeof e&&void 0!==e.type&&void 0!==e.props?e:void 0}function h7(e,t){return null!=e&&null!=e.type&&null!=e.type.displayName&&e.type.displayName===t.displayName}function fe(e){return"Enter"===e.key||" "===e.key}function ft(e){return["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"].indexOf(e.key)>=0}function fn(e){return null!=e&&e instanceof Element&&null!=e.closest(".".concat(lY))}function fr(e,t){null!=e&&"function"!=typeof e?e.current=t:"function"==typeof e&&e(t)}function fi(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){e.forEach(function(e){fr(e,t)})}}function fo(e){var t;return null===e?null:null!==(t=e.current)&&void 0!==t?t:e}function fa(e,t,n){return function(r){e[t]=r,fr(n,r)}}s(ht,hn),s(ht,hw),s(ht,h6);var lD=h("gztBd"),fl="Blueprint5",fs=["active","alignText","asyncControl","containerRef","current","elementRef","fill","icon","iconSize","inputClassName","inputRef","intent","inline","large","loading","leftElement","leftIcon","minimal","onRemove","outlined","panel","panelClassName","popoverProps","rightElement","rightIcon","round","size","small","tagName","text","textClassName"];function fu(e,t,n){return void 0===t&&(t=fs),void 0===n&&(n=!1),n&&(t=t.concat(fs)),t.reduce(function(e,t){return -1!==t.indexOf("-")||e.hasOwnProperty(t)&&delete e[t],e},(0,lD.__assign)({},e))}var lD=h("gztBd"),v=h("8NFma"),lD=(h("gztBd"),h("gztBd")),fc=h("704DA"),lD=(h("gztBd"),h("gztBd")),fd=h("bYk83");(kt=kI||(kI={})).AddClip="add-clip",kt.AddColumnLeft="add-column-left",kt.AddColumnRight="add-column-right",kt.AddLocation="add-location",kt.AddRowBottom="add-row-bottom",kt.AddRowTop="add-row-top",kt.AddToArtifact="add-to-artifact",kt.AddToFolder="add-to-folder",kt.Add="add",kt.AimpointsTarget="aimpoints-target",kt.Airplane="airplane",kt.AlignCenter="align-center",kt.AlignJustify="align-justify",kt.AlignLeft="align-left",kt.AlignRight="align-right",kt.AlignmentBottom="alignment-bottom",kt.AlignmentHorizontalCenter="alignment-horizontal-center",kt.AlignmentLeft="alignment-left",kt.AlignmentRight="alignment-right",kt.AlignmentTop="alignment-top",kt.AlignmentVerticalCenter="alignment-vertical-center",kt.Ammunition="ammunition",kt.Anchor="anchor",kt.Annotation="annotation",kt.Antenna="antenna",kt.AppHeader="app-header",kt.Application="application",kt.Applications="applications",kt.Archive="archive",kt.AreaOfInterest="area-of-interest",kt.ArrayBoolean="array-boolean",kt.ArrayDate="array-date",kt.ArrayFloatingPoint="array-floating-point",kt.ArrayNumeric="array-numeric",kt.ArrayString="array-string",kt.ArrayTimestamp="array-timestamp",kt.Array="array",kt.ArrowBottomLeft="arrow-bottom-left",kt.ArrowBottomRight="arrow-bottom-right",kt.ArrowDown="arrow-down",kt.ArrowLeft="arrow-left",kt.ArrowRight="arrow-right",kt.ArrowTopLeft="arrow-top-left",kt.ArrowTopRight="arrow-top-right",kt.ArrowUp="arrow-up",kt.ArrowsHorizontal="arrows-horizontal",kt.ArrowsVertical="arrows-vertical",kt.Asterisk="asterisk",kt.At="at",kt.AutomaticUpdates="automatic-updates",kt.Axle="axle",kt.Backlink="backlink",kt.Badge="badge",kt.BanCircle="ban-circle",kt.BankAccount="bank-account",kt.Barcode="barcode",kt.Blank="blank",kt.BlockedPerson="blocked-person",kt.Bold="bold",kt.Book="book",kt.Bookmark="bookmark",kt.Box="box",kt.Briefcase="briefcase",kt.BringData="bring-data",kt.Bug="bug",kt.Buggy="buggy",kt.Build="build",kt.Calculator="calculator",kt.Calendar="calendar",kt.Camera="camera",kt.CaretDown="caret-down",kt.CaretLeft="caret-left",kt.CaretRight="caret-right",kt.CaretUp="caret-up",kt.CargoShip="cargo-ship",kt.CellTower="cell-tower",kt.Changes="changes",kt.Chart="chart",kt.Chat="chat",kt.ChevronBackward="chevron-backward",kt.ChevronDown="chevron-down",kt.ChevronForward="chevron-forward",kt.ChevronLeft="chevron-left",kt.ChevronRight="chevron-right",kt.ChevronUp="chevron-up",kt.CircleArrowDown="circle-arrow-down",kt.CircleArrowLeft="circle-arrow-left",kt.CircleArrowRight="circle-arrow-right",kt.CircleArrowUp="circle-arrow-up",kt.Circle="circle",kt.Citation="citation",kt.Clean="clean",kt.Clip="clip",kt.Clipboard="clipboard",kt.CloudDownload="cloud-download",kt.CloudUpload="cloud-upload",kt.Cloud="cloud",kt.CodeBlock="code-block",kt.Code="code",kt.Cog="cog",kt.CollapseAll="collapse-all",kt.ColorFill="color-fill",kt.ColumnLayout="column-layout",kt.Comment="comment",kt.Comparison="comparison",kt.Compass="compass",kt.Compressed="compressed",kt.Confirm="confirm",kt.Console="console",kt.Contrast="contrast",kt.Control="control",kt.CreditCard="credit-card",kt.CrossCircle="cross-circle",kt.Cross="cross",kt.Crown="crown",kt.CubeAdd="cube-add",kt.CubeRemove="cube-remove",kt.Cube="cube",kt.CurvedRangeChart="curved-range-chart",kt.Cut="cut",kt.Cycle="cycle",kt.Dashboard="dashboard",kt.DataConnection="data-connection",kt.DataLineage="data-lineage",kt.Database="database",kt.Delete="delete",kt.Delta="delta",kt.DeriveColumn="derive-column",kt.Desktop="desktop",kt.Detection="detection",kt.Diagnosis="diagnosis",kt.DiagramTree="diagram-tree",kt.DirectionLeft="direction-left",kt.DirectionRight="direction-right",kt.Disable="disable",kt.Divide="divide",kt.DocumentOpen="document-open",kt.DocumentShare="document-share",kt.Document="document",kt.Dollar="dollar",kt.Dot="dot",kt.DoubleCaretHorizontal="double-caret-horizontal",kt.DoubleCaretVertical="double-caret-vertical",kt.DoubleChevronDown="double-chevron-down",kt.DoubleChevronLeft="double-chevron-left",kt.DoubleChevronRight="double-chevron-right",kt.DoubleChevronUp="double-chevron-up",kt.DoughnutChart="doughnut-chart",kt.Download="download",kt.DragHandleHorizontal="drag-handle-horizontal",kt.DragHandleVertical="drag-handle-vertical",kt.Draw="draw",kt.DrawerLeftFilled="drawer-left-filled",kt.DrawerLeft="drawer-left",kt.DrawerRightFilled="drawer-right-filled",kt.DrawerRight="drawer-right",kt.DriveTime="drive-time",kt.Duplicate="duplicate",kt.Edit="edit",kt.Eject="eject",kt.Emoji="emoji",kt.Endorsed="endorsed",kt.Envelope="envelope",kt.Equals="equals",kt.Eraser="eraser",kt.Error="error",kt.Euro="euro",kt.Exchange="exchange",kt.ExcludeRow="exclude-row",kt.ExpandAll="expand-all",kt.Explain="explain",kt.Export="export",kt.EyeOff="eye-off",kt.EyeOn="eye-on",kt.EyeOpen="eye-open",kt.FastBackward="fast-backward",kt.FastForward="fast-forward",kt.FeedSubscribed="feed-subscribed",kt.Feed="feed",kt.Film="film",kt.FilterKeep="filter-keep",kt.FilterList="filter-list",kt.FilterOpen="filter-open",kt.FilterRemove="filter-remove",kt.Filter="filter",kt.Flag="flag",kt.Flame="flame",kt.Flash="flash",kt.FloatingPoint="floating-point",kt.FloppyDisk="floppy-disk",kt.FlowBranch="flow-branch",kt.FlowEnd="flow-end",kt.FlowLinear="flow-linear",kt.FlowReviewBranch="flow-review-branch",kt.FlowReview="flow-review",kt.Flows="flows",kt.FolderClose="folder-close",kt.FolderNew="folder-new",kt.FolderOpen="folder-open",kt.FolderSharedOpen="folder-shared-open",kt.FolderShared="folder-shared",kt.Follower="follower",kt.Following="following",kt.Font="font",kt.Fork="fork",kt.Form="form",kt.Fuel="fuel",kt.FullCircle="full-circle",kt.FullStackedChart="full-stacked-chart",kt.Fullscreen="fullscreen",kt.Function="function",kt.GanttChart="gantt-chart",kt.Generate="generate",kt.Geofence="geofence",kt.Geolocation="geolocation",kt.Geosearch="geosearch",kt.Geotime="geotime",kt.GitBranch="git-branch",kt.GitCommit="git-commit",kt.GitMerge="git-merge",kt.GitNewBranch="git-new-branch",kt.GitPull="git-pull",kt.GitPush="git-push",kt.GitRepo="git-repo",kt.Glass="glass",kt.GlobeNetwork="globe-network",kt.Globe="globe",kt.GraphRemove="graph-remove",kt.Graph="graph",kt.GreaterThanOrEqualTo="greater-than-or-equal-to",kt.GreaterThan="greater-than",kt.GridView="grid-view",kt.Grid="grid",kt.GroupItem="group-item",kt.GroupObjects="group-objects",kt.GroupedBarChart="grouped-bar-chart",kt.HandDown="hand-down",kt.HandLeft="hand-left",kt.HandRight="hand-right",kt.HandUp="hand-up",kt.Hand="hand",kt.Hat="hat",kt.HeaderOne="header-one",kt.HeaderThree="header-three",kt.HeaderTwo="header-two",kt.Header="header",kt.Headset="headset",kt.HeartBroken="heart-broken",kt.Heart="heart",kt.HeatGrid="heat-grid",kt.Heatmap="heatmap",kt.Helicopter="helicopter",kt.Help="help",kt.HelperManagement="helper-management",kt.HighPriority="high-priority",kt.HighVoltagePole="high-voltage-pole",kt.Highlight="highlight",kt.History="history",kt.Home="home",kt.HorizontalBarChartAsc="horizontal-bar-chart-asc",kt.HorizontalBarChartDesc="horizontal-bar-chart-desc",kt.HorizontalBarChart="horizontal-bar-chart",kt.HorizontalDistribution="horizontal-distribution",kt.HorizontalInbetween="horizontal-inbetween",kt.Hurricane="hurricane",kt.IdNumber="id-number",kt.ImageRotateLeft="image-rotate-left",kt.ImageRotateRight="image-rotate-right",kt.Import="import",kt.InboxFiltered="inbox-filtered",kt.InboxGeo="inbox-geo",kt.InboxSearch="inbox-search",kt.InboxUpdate="inbox-update",kt.Inbox="inbox",kt.InfoSign="info-sign",kt.Inheritance="inheritance",kt.InheritedGroup="inherited-group",kt.InnerJoin="inner-join",kt.Input="input",kt.Insert="insert",kt.Intelligence="intelligence",kt.Intersection="intersection",kt.IpAddress="ip-address",kt.IssueClosed="issue-closed",kt.IssueNew="issue-new",kt.Issue="issue",kt.Italic="italic",kt.JoinTable="join-table",kt.KeyBackspace="key-backspace",kt.KeyCommand="key-command",kt.KeyControl="key-control",kt.KeyDelete="key-delete",kt.KeyEnter="key-enter",kt.KeyEscape="key-escape",kt.KeyOption="key-option",kt.KeyShift="key-shift",kt.KeyTab="key-tab",kt.Key="key",kt.KnownVehicle="known-vehicle",kt.LabTest="lab-test",kt.Label="label",kt.LayerOutline="layer-outline",kt.Layer="layer",kt.Layers="layers",kt.LayoutAuto="layout-auto",kt.LayoutBalloon="layout-balloon",kt.LayoutCircle="layout-circle",kt.LayoutGrid="layout-grid",kt.LayoutGroupBy="layout-group-by",kt.LayoutHierarchy="layout-hierarchy",kt.LayoutLinear="layout-linear",kt.LayoutSkewGrid="layout-skew-grid",kt.LayoutSortedClusters="layout-sorted-clusters",kt.Layout="layout",kt.Learning="learning",kt.LeftJoin="left-join",kt.LengthenText="lengthen-text",kt.LessThanOrEqualTo="less-than-or-equal-to",kt.LessThan="less-than",kt.Lifesaver="lifesaver",kt.Lightbulb="lightbulb",kt.Lightning="lightning",kt.Link="link",kt.ListColumns="list-columns",kt.ListDetailView="list-detail-view",kt.List="list",kt.Locate="locate",kt.Lock="lock",kt.Locomotive="locomotive",kt.LogIn="log-in",kt.LogOut="log-out",kt.LowVoltagePole="low-voltage-pole",kt.Manual="manual",kt.ManuallyEnteredData="manually-entered-data",kt.ManyToMany="many-to-many",kt.ManyToOne="many-to-one",kt.MapCreate="map-create",kt.MapMarker="map-marker",kt.Map="map",kt.Maximize="maximize",kt.Media="media",kt.MenuClosed="menu-closed",kt.MenuOpen="menu-open",kt.Menu="menu",kt.MergeColumns="merge-columns",kt.MergeLinks="merge-links",kt.Microphone="microphone",kt.Minimize="minimize",kt.Minus="minus",kt.MobilePhone="mobile-phone",kt.MobileVideo="mobile-video",kt.ModalFilled="modal-filled",kt.Modal="modal",kt.Model="model",kt.Moon="moon",kt.More="more",kt.Mountain="mountain",kt.Move="move",kt.Mugshot="mugshot",kt.MultiSelect="multi-select",kt.Music="music",kt.Nest="nest",kt.NewDrawing="new-drawing",kt.NewGridItem="new-grid-item",kt.NewLayer="new-layer",kt.NewLayers="new-layers",kt.NewLink="new-link",kt.NewObject="new-object",kt.NewPerson="new-person",kt.NewPrescription="new-prescription",kt.NewShield="new-shield",kt.NewTextBox="new-text-box",kt.Ninja="ninja",kt.NotEqualTo="not-equal-to",kt.NotificationsSnooze="notifications-snooze",kt.NotificationsUpdated="notifications-updated",kt.Notifications="notifications",kt.NumberedList="numbered-list",kt.Numerical="numerical",kt.Office="office",kt.Offline="offline",kt.OilField="oil-field",kt.OneColumn="one-column",kt.OneToMany="one-to-many",kt.OneToOne="one-to-one",kt.OpenApplication="open-application",kt.Outdated="outdated",kt.PageLayout="page-layout",kt.PanelStats="panel-stats",kt.PanelTable="panel-table",kt.Paperclip="paperclip",kt.Paragraph="paragraph",kt.PasteVariable="paste-variable",kt.PathSearch="path-search",kt.Path="path",kt.Pause="pause",kt.People="people",kt.Percentage="percentage",kt.Person="person",kt.PhoneCall="phone-call",kt.PhoneForward="phone-forward",kt.Phone="phone",kt.PieChart="pie-chart",kt.Pin="pin",kt.PivotTable="pivot-table",kt.Pivot="pivot",kt.Play="play",kt.Playbook="playbook",kt.Plus="plus",kt.PolygonFilter="polygon-filter",kt.Power="power",kt.PredictiveAnalysis="predictive-analysis",kt.Prescription="prescription",kt.Presentation="presentation",kt.Print="print",kt.Projects="projects",kt.Properties="properties",kt.Property="property",kt.PublishFunction="publish-function",kt.Pulse="pulse",kt.Rain="rain",kt.Random="random",kt.Record="record",kt.RectHeight="rect-height",kt.RectWidth="rect-width",kt.Rectangle="rectangle",kt.Redo="redo",kt.Refresh="refresh",kt.Regex="regex",kt.RegressionChart="regression-chart",kt.RemoveColumnLeft="remove-column-left",kt.RemoveColumnRight="remove-column-right",kt.RemoveColumn="remove-column",kt.RemoveRowBottom="remove-row-bottom",kt.RemoveRowTop="remove-row-top",kt.Remove="remove",kt.Repeat="repeat",kt.Reset="reset",kt.Resolve="resolve",kt.Rig="rig",kt.RightJoin="right-join",kt.Ring="ring",kt.RocketSlant="rocket-slant",kt.Rocket="rocket",kt.RotateDocument="rotate-document",kt.RotatePage="rotate-page",kt.Route="route",kt.Satellite="satellite",kt.Saved="saved",kt.ScatterPlot="scatter-plot",kt.SearchAround="search-around",kt.SearchTemplate="search-template",kt.SearchText="search-text",kt.Search="search",kt.SegmentedControl="segmented-control",kt.Select="select",kt.Selection="selection",kt.SendMessage="send-message",kt.SendToGraph="send-to-graph",kt.SendToMap="send-to-map",kt.SendTo="send-to",kt.Sensor="sensor",kt.SeriesAdd="series-add",kt.SeriesConfiguration="series-configuration",kt.SeriesDerived="series-derived",kt.SeriesFiltered="series-filtered",kt.SeriesSearch="series-search",kt.Settings="settings",kt.Shapes="shapes",kt.Share="share",kt.SharedFilter="shared-filter",kt.Shield="shield",kt.Ship="ship",kt.Shop="shop",kt.ShoppingCart="shopping-cart",kt.ShortenText="shorten-text",kt.SignalSearch="signal-search",kt.SimCard="sim-card",kt.Slash="slash",kt.SmallCross="small-cross",kt.SmallInfoSign="small-info-sign",kt.SmallMinus="small-minus",kt.SmallPlus="small-plus",kt.SmallSquare="small-square",kt.SmallTick="small-tick",kt.Snowflake="snowflake",kt.SocialMedia="social-media",kt.SortAlphabeticalDesc="sort-alphabetical-desc",kt.SortAlphabetical="sort-alphabetical",kt.SortAsc="sort-asc",kt.SortDesc="sort-desc",kt.SortNumericalDesc="sort-numerical-desc",kt.SortNumerical="sort-numerical",kt.Sort="sort",kt.SpellCheck="spell-check",kt.SplitColumns="split-columns",kt.Square="square",kt.StackedChart="stacked-chart",kt.StadiumGeometry="stadium-geometry",kt.StarEmpty="star-empty",kt.Star="star",kt.StepBackward="step-backward",kt.StepChart="step-chart",kt.StepForward="step-forward",kt.Stop="stop",kt.Stopwatch="stopwatch",kt.Strikethrough="strikethrough",kt.Style="style",kt.Subscript="subscript",kt.Superscript="superscript",kt.SwapHorizontal="swap-horizontal",kt.SwapVertical="swap-vertical",kt.Switch="switch",kt.SymbolCircle="symbol-circle",kt.SymbolCross="symbol-cross",kt.SymbolDiamond="symbol-diamond",kt.SymbolRectangle="symbol-rectangle",kt.SymbolSquare="symbol-square",kt.SymbolTriangleDown="symbol-triangle-down",kt.SymbolTriangleUp="symbol-triangle-up",kt.Syringe="syringe",kt.Tag="tag",kt.TakeAction="take-action",kt.Tank="tank",kt.Target="target",kt.Taxi="taxi",kt.Temperature="temperature",kt.TextHighlight="text-highlight",kt.ThDerived="th-derived",kt.ThDisconnect="th-disconnect",kt.ThFiltered="th-filtered",kt.ThList="th-list",kt.Th="th",kt.ThirdParty="third-party",kt.ThumbsDown="thumbs-down",kt.ThumbsUp="thumbs-up",kt.TickCircle="tick-circle",kt.Tick="tick",kt.Time="time",kt.TimelineAreaChart="timeline-area-chart",kt.TimelineBarChart="timeline-bar-chart",kt.TimelineEvents="timeline-events",kt.TimelineLineChart="timeline-line-chart",kt.Tint="tint",kt.Torch="torch",kt.Tractor="tractor",kt.Train="train",kt.Translate="translate",kt.Trash="trash",kt.Tree="tree",kt.TrendingDown="trending-down",kt.TrendingUp="trending-up",kt.Truck="truck",kt.TwoColumns="two-columns",kt.Unarchive="unarchive",kt.Underline="underline",kt.Undo="undo",kt.UngroupObjects="ungroup-objects",kt.UnknownVehicle="unknown-vehicle",kt.Unlink="unlink",kt.Unlock="unlock",kt.Unpin="unpin",kt.Unresolve="unresolve",kt.Updated="updated",kt.Upload="upload",kt.User="user",kt.Variable="variable",kt.VerticalBarChartAsc="vertical-bar-chart-asc",kt.VerticalBarChartDesc="vertical-bar-chart-desc",kt.VerticalDistribution="vertical-distribution",kt.VerticalInbetween="vertical-inbetween",kt.Video="video",kt.Virus="virus",kt.VolumeDown="volume-down",kt.VolumeOff="volume-off",kt.VolumeUp="volume-up",kt.Walk="walk",kt.WarningSign="warning-sign",kt.WaterfallChart="waterfall-chart",kt.Waves="waves",kt.WidgetButton="widget-button",kt.WidgetFooter="widget-footer",kt.WidgetHeader="widget-header",kt.Widget="widget",kt.Wind="wind",kt.Wrench="wrench",kt.ZoomIn="zoom-in",kt.ZoomOut="zoom-out",kt.ZoomToFit="zoom-to-fit",(kR={})[kI.AddClip]="61697",kR[kI.AddColumnLeft]="61698",kR[kI.AddColumnRight]="61699",kR[kI.AddLocation]="61700",kR[kI.AddRowBottom]="61701",kR[kI.AddRowTop]="61702",kR[kI.AddToArtifact]="61703",kR[kI.AddToFolder]="61704",kR[kI.Add]="61705",kR[kI.AimpointsTarget]="62261",kR[kI.Airplane]="61706",kR[kI.AlignCenter]="61707",kR[kI.AlignJustify]="61708",kR[kI.AlignLeft]="61709",kR[kI.AlignRight]="61710",kR[kI.AlignmentBottom]="61711",kR[kI.AlignmentHorizontalCenter]="61712",kR[kI.AlignmentLeft]="61713",kR[kI.AlignmentRight]="61714",kR[kI.AlignmentTop]="61715",kR[kI.AlignmentVerticalCenter]="61716",kR[kI.Ammunition]="62274",kR[kI.Anchor]="62256",kR[kI.Annotation]="61717",kR[kI.Antenna]="61718",kR[kI.AppHeader]="61719",kR[kI.Application]="61720",kR[kI.Applications]="61721",kR[kI.Archive]="61722",kR[kI.AreaOfInterest]="61723",kR[kI.ArrayBoolean]="61724",kR[kI.ArrayDate]="61725",kR[kI.ArrayFloatingPoint]="62253",kR[kI.ArrayNumeric]="61726",kR[kI.ArrayString]="61727",kR[kI.ArrayTimestamp]="61728",kR[kI.Array]="61729",kR[kI.ArrowBottomLeft]="61730",kR[kI.ArrowBottomRight]="61731",kR[kI.ArrowDown]="61732",kR[kI.ArrowLeft]="61733",kR[kI.ArrowRight]="61734",kR[kI.ArrowTopLeft]="61735",kR[kI.ArrowTopRight]="61736",kR[kI.ArrowUp]="61737",kR[kI.ArrowsHorizontal]="61738",kR[kI.ArrowsVertical]="61739",kR[kI.Asterisk]="61740",kR[kI.At]="62257",kR[kI.AutomaticUpdates]="61741",kR[kI.Axle]="62264",kR[kI.Backlink]="61742",kR[kI.Badge]="61743",kR[kI.BanCircle]="61744",kR[kI.BankAccount]="61745",kR[kI.Barcode]="61746",kR[kI.Blank]="61747",kR[kI.BlockedPerson]="61748",kR[kI.Bold]="61749",kR[kI.Book]="61750",kR[kI.Bookmark]="61751",kR[kI.Box]="61752",kR[kI.Briefcase]="61753",kR[kI.BringData]="61754",kR[kI.Bug]="62254",kR[kI.Buggy]="61755",kR[kI.Build]="61756",kR[kI.Calculator]="61757",kR[kI.Calendar]="61758",kR[kI.Camera]="61759",kR[kI.CaretDown]="61760",kR[kI.CaretLeft]="61761",kR[kI.CaretRight]="61762",kR[kI.CaretUp]="61763",kR[kI.CargoShip]="61764",kR[kI.CellTower]="61765",kR[kI.Changes]="61766",kR[kI.Chart]="61767",kR[kI.Chat]="61768",kR[kI.ChevronBackward]="61769",kR[kI.ChevronDown]="61770",kR[kI.ChevronForward]="61771",kR[kI.ChevronLeft]="61772",kR[kI.ChevronRight]="61773",kR[kI.ChevronUp]="61774",kR[kI.CircleArrowDown]="61775",kR[kI.CircleArrowLeft]="61776",kR[kI.CircleArrowRight]="61777",kR[kI.CircleArrowUp]="61778",kR[kI.Circle]="61779",kR[kI.Citation]="61780",kR[kI.Clean]="61781",kR[kI.Clip]="61782",kR[kI.Clipboard]="61783",kR[kI.CloudDownload]="61784",kR[kI.CloudUpload]="61785",kR[kI.Cloud]="61786",kR[kI.CodeBlock]="61787",kR[kI.Code]="61788",kR[kI.Cog]="61789",kR[kI.CollapseAll]="61790",kR[kI.ColorFill]="62248",kR[kI.ColumnLayout]="61791",kR[kI.Comment]="61792",kR[kI.Comparison]="61793",kR[kI.Compass]="61794",kR[kI.Compressed]="61795",kR[kI.Confirm]="61796",kR[kI.Console]="61797",kR[kI.Contrast]="61798",kR[kI.Control]="61799",kR[kI.CreditCard]="61800",kR[kI.CrossCircle]="62262",kR[kI.Cross]="61801",kR[kI.Crown]="61802",kR[kI.CubeAdd]="61803",kR[kI.CubeRemove]="61804",kR[kI.Cube]="61805",kR[kI.CurvedRangeChart]="61806",kR[kI.Cut]="61807",kR[kI.Cycle]="61808",kR[kI.Dashboard]="61809",kR[kI.DataConnection]="61810",kR[kI.DataLineage]="61811",kR[kI.Database]="61812",kR[kI.Delete]="61813",kR[kI.Delta]="61814",kR[kI.DeriveColumn]="61815",kR[kI.Desktop]="61816",kR[kI.Detection]="62273",kR[kI.Diagnosis]="61817",kR[kI.DiagramTree]="61818",kR[kI.DirectionLeft]="61819",kR[kI.DirectionRight]="61820",kR[kI.Disable]="61821",kR[kI.Divide]="62247",kR[kI.DocumentOpen]="61822",kR[kI.DocumentShare]="61823",kR[kI.Document]="61824",kR[kI.Dollar]="61825",kR[kI.Dot]="61826",kR[kI.DoubleCaretHorizontal]="61827",kR[kI.DoubleCaretVertical]="61828",kR[kI.DoubleChevronDown]="61829",kR[kI.DoubleChevronLeft]="61830",kR[kI.DoubleChevronRight]="61831",kR[kI.DoubleChevronUp]="61832",kR[kI.DoughnutChart]="61833",kR[kI.Download]="61834",kR[kI.DragHandleHorizontal]="61835",kR[kI.DragHandleVertical]="61836",kR[kI.Draw]="61837",kR[kI.DrawerLeftFilled]="61838",kR[kI.DrawerLeft]="61839",kR[kI.DrawerRightFilled]="61840",kR[kI.DrawerRight]="61841",kR[kI.DriveTime]="61842",kR[kI.Duplicate]="61843",kR[kI.Edit]="61844",kR[kI.Eject]="61845",kR[kI.Emoji]="61846",kR[kI.Endorsed]="61847",kR[kI.Envelope]="61848",kR[kI.Equals]="61849",kR[kI.Eraser]="61850",kR[kI.Error]="61851",kR[kI.Euro]="61852",kR[kI.Exchange]="61853",kR[kI.ExcludeRow]="61854",kR[kI.ExpandAll]="61855",kR[kI.Explain]="62285",kR[kI.Export]="61856",kR[kI.EyeOff]="61857",kR[kI.EyeOn]="61858",kR[kI.EyeOpen]="61859",kR[kI.FastBackward]="61860",kR[kI.FastForward]="61861",kR[kI.FeedSubscribed]="61862",kR[kI.Feed]="61863",kR[kI.Film]="61864",kR[kI.FilterKeep]="61865",kR[kI.FilterList]="61866",kR[kI.FilterOpen]="61867",kR[kI.FilterRemove]="61868",kR[kI.Filter]="61869",kR[kI.Flag]="61870",kR[kI.Flame]="61871",kR[kI.Flash]="61872",kR[kI.FloatingPoint]="62252",kR[kI.FloppyDisk]="61873",kR[kI.FlowBranch]="61874",kR[kI.FlowEnd]="61875",kR[kI.FlowLinear]="61876",kR[kI.FlowReviewBranch]="61877",kR[kI.FlowReview]="61878",kR[kI.Flows]="61879",kR[kI.FolderClose]="61880",kR[kI.FolderNew]="61881",kR[kI.FolderOpen]="61882",kR[kI.FolderSharedOpen]="61883",kR[kI.FolderShared]="61884",kR[kI.Follower]="61885",kR[kI.Following]="61886",kR[kI.Font]="61887",kR[kI.Fork]="61888",kR[kI.Form]="61889",kR[kI.Fuel]="62243",kR[kI.FullCircle]="61890",kR[kI.FullStackedChart]="61891",kR[kI.Fullscreen]="61892",kR[kI.Function]="61893",kR[kI.GanttChart]="61894",kR[kI.Generate]="62284",kR[kI.Geofence]="61895",kR[kI.Geolocation]="61896",kR[kI.Geosearch]="61897",kR[kI.Geotime]="62276",kR[kI.GitBranch]="61898",kR[kI.GitCommit]="61899",kR[kI.GitMerge]="61900",kR[kI.GitNewBranch]="61901",kR[kI.GitPull]="61902",kR[kI.GitPush]="61903",kR[kI.GitRepo]="61904",kR[kI.Glass]="61905",kR[kI.GlobeNetwork]="61906",kR[kI.Globe]="61907",kR[kI.GraphRemove]="61908",kR[kI.Graph]="61909",kR[kI.GreaterThanOrEqualTo]="61910",kR[kI.GreaterThan]="61911",kR[kI.GridView]="61912",kR[kI.Grid]="61913",kR[kI.GroupItem]="62282",kR[kI.GroupObjects]="61914",kR[kI.GroupedBarChart]="61915",kR[kI.HandDown]="61916",kR[kI.HandLeft]="61917",kR[kI.HandRight]="61918",kR[kI.HandUp]="61919",kR[kI.Hand]="61920",kR[kI.Hat]="61921",kR[kI.HeaderOne]="61922",kR[kI.HeaderThree]="61923",kR[kI.HeaderTwo]="61924",kR[kI.Header]="61925",kR[kI.Headset]="61926",kR[kI.HeartBroken]="61927",kR[kI.Heart]="61928",kR[kI.HeatGrid]="61929",kR[kI.Heatmap]="61930",kR[kI.Helicopter]="61931",kR[kI.Help]="61932",kR[kI.HelperManagement]="61933",kR[kI.HighPriority]="61934",kR[kI.HighVoltagePole]="62259",kR[kI.Highlight]="61935",kR[kI.History]="61936",kR[kI.Home]="61937",kR[kI.HorizontalBarChartAsc]="61938",kR[kI.HorizontalBarChartDesc]="61939",kR[kI.HorizontalBarChart]="61940",kR[kI.HorizontalDistribution]="61941",kR[kI.HorizontalInbetween]="62249",kR[kI.Hurricane]="61942",kR[kI.IdNumber]="61943",kR[kI.ImageRotateLeft]="61944",kR[kI.ImageRotateRight]="61945",kR[kI.Import]="61946",kR[kI.InboxFiltered]="61947",kR[kI.InboxGeo]="61948",kR[kI.InboxSearch]="61949",kR[kI.InboxUpdate]="61950",kR[kI.Inbox]="61951",kR[kI.InfoSign]="61952",kR[kI.Inheritance]="61953",kR[kI.InheritedGroup]="61954",kR[kI.InnerJoin]="61955",kR[kI.Input]="62283",kR[kI.Insert]="61956",kR[kI.Intelligence]="62263",kR[kI.Intersection]="61957",kR[kI.IpAddress]="61958",kR[kI.IssueClosed]="61959",kR[kI.IssueNew]="61960",kR[kI.Issue]="61961",kR[kI.Italic]="61962",kR[kI.JoinTable]="61963",kR[kI.KeyBackspace]="61964",kR[kI.KeyCommand]="61965",kR[kI.KeyControl]="61966",kR[kI.KeyDelete]="61967",kR[kI.KeyEnter]="61968",kR[kI.KeyEscape]="61969",kR[kI.KeyOption]="61970",kR[kI.KeyShift]="61971",kR[kI.KeyTab]="61972",kR[kI.Key]="61973",kR[kI.KnownVehicle]="61974",kR[kI.LabTest]="61975",kR[kI.Label]="61976",kR[kI.LayerOutline]="61977",kR[kI.Layer]="61978",kR[kI.Layers]="61979",kR[kI.LayoutAuto]="61980",kR[kI.LayoutBalloon]="61981",kR[kI.LayoutCircle]="61982",kR[kI.LayoutGrid]="61983",kR[kI.LayoutGroupBy]="61984",kR[kI.LayoutHierarchy]="61985",kR[kI.LayoutLinear]="61986",kR[kI.LayoutSkewGrid]="61987",kR[kI.LayoutSortedClusters]="61988",kR[kI.Layout]="61989",kR[kI.Learning]="61990",kR[kI.LeftJoin]="61991",kR[kI.LengthenText]="62270",kR[kI.LessThanOrEqualTo]="61992",kR[kI.LessThan]="61993",kR[kI.Lifesaver]="61994",kR[kI.Lightbulb]="61995",kR[kI.Lightning]="61996",kR[kI.Link]="61997",kR[kI.ListColumns]="61998",kR[kI.ListDetailView]="61999",kR[kI.List]="62000",kR[kI.Locate]="62001",kR[kI.Lock]="62002",kR[kI.Locomotive]="62267",kR[kI.LogIn]="62003",kR[kI.LogOut]="62004",kR[kI.LowVoltagePole]="62258",kR[kI.Manual]="62005",kR[kI.ManuallyEnteredData]="62006",kR[kI.ManyToMany]="62007",kR[kI.ManyToOne]="62008",kR[kI.MapCreate]="62009",kR[kI.MapMarker]="62010",kR[kI.Map]="62011",kR[kI.Maximize]="62012",kR[kI.Media]="62013",kR[kI.MenuClosed]="62014",kR[kI.MenuOpen]="62015",kR[kI.Menu]="62016",kR[kI.MergeColumns]="62017",kR[kI.MergeLinks]="62018",kR[kI.Microphone]="62275",kR[kI.Minimize]="62019",kR[kI.Minus]="62020",kR[kI.MobilePhone]="62021",kR[kI.MobileVideo]="62022",kR[kI.ModalFilled]="62023",kR[kI.Modal]="62024",kR[kI.Model]="62269",kR[kI.Moon]="62025",kR[kI.More]="62026",kR[kI.Mountain]="62027",kR[kI.Move]="62028",kR[kI.Mugshot]="62029",kR[kI.MultiSelect]="62030",kR[kI.Music]="62031",kR[kI.Nest]="62032",kR[kI.NewDrawing]="62033",kR[kI.NewGridItem]="62034",kR[kI.NewLayer]="62035",kR[kI.NewLayers]="62036",kR[kI.NewLink]="62037",kR[kI.NewObject]="62038",kR[kI.NewPerson]="62039",kR[kI.NewPrescription]="62040",kR[kI.NewShield]="62281",kR[kI.NewTextBox]="62041",kR[kI.Ninja]="62042",kR[kI.NotEqualTo]="62043",kR[kI.NotificationsSnooze]="62044",kR[kI.NotificationsUpdated]="62045",kR[kI.Notifications]="62046",kR[kI.NumberedList]="62047",kR[kI.Numerical]="62048",kR[kI.Office]="62049",kR[kI.Offline]="62050",kR[kI.OilField]="62051",kR[kI.OneColumn]="62052",kR[kI.OneToMany]="62053",kR[kI.OneToOne]="62054",kR[kI.OpenApplication]="62251",kR[kI.Outdated]="62055",kR[kI.PageLayout]="62056",kR[kI.PanelStats]="62057",kR[kI.PanelTable]="62058",kR[kI.Paperclip]="62059",kR[kI.Paragraph]="62060",kR[kI.PasteVariable]="62278",kR[kI.PathSearch]="62061",kR[kI.Path]="62062",kR[kI.Pause]="62063",kR[kI.People]="62064",kR[kI.Percentage]="62065",kR[kI.Person]="62066",kR[kI.PhoneCall]="62279",kR[kI.PhoneForward]="62280",kR[kI.Phone]="62067",kR[kI.PieChart]="62068",kR[kI.Pin]="62069",kR[kI.PivotTable]="62070",kR[kI.Pivot]="62071",kR[kI.Play]="62072",kR[kI.Playbook]="62244",kR[kI.Plus]="62073",kR[kI.PolygonFilter]="62074",kR[kI.Power]="62075",kR[kI.PredictiveAnalysis]="62076",kR[kI.Prescription]="62077",kR[kI.Presentation]="62078",kR[kI.Print]="62079",kR[kI.Projects]="62080",kR[kI.Properties]="62081",kR[kI.Property]="62082",kR[kI.PublishFunction]="62083",kR[kI.Pulse]="62084",kR[kI.Rain]="62085",kR[kI.Random]="62086",kR[kI.Record]="62087",kR[kI.RectHeight]="62245",kR[kI.RectWidth]="62246",kR[kI.Rectangle]="62241",kR[kI.Redo]="62088",kR[kI.Refresh]="62089",kR[kI.Regex]="62255",kR[kI.RegressionChart]="62090",kR[kI.RemoveColumnLeft]="62091",kR[kI.RemoveColumnRight]="62092",kR[kI.RemoveColumn]="62093",kR[kI.RemoveRowBottom]="62094",kR[kI.RemoveRowTop]="62095",kR[kI.Remove]="62096",kR[kI.Repeat]="62097",kR[kI.Reset]="62098",kR[kI.Resolve]="62099",kR[kI.Rig]="62100",kR[kI.RightJoin]="62101",kR[kI.Ring]="62102",kR[kI.RocketSlant]="62103",kR[kI.Rocket]="62104",kR[kI.RotateDocument]="62105",kR[kI.RotatePage]="62106",kR[kI.Route]="62107",kR[kI.Satellite]="62108",kR[kI.Saved]="62109",kR[kI.ScatterPlot]="62110",kR[kI.SearchAround]="62111",kR[kI.SearchTemplate]="62112",kR[kI.SearchText]="62113",kR[kI.Search]="62114",kR[kI.SegmentedControl]="62115",kR[kI.Select]="62116",kR[kI.Selection]="62117",kR[kI.SendMessage]="62118",kR[kI.SendToGraph]="62119",kR[kI.SendToMap]="62120",kR[kI.SendTo]="62121",kR[kI.Sensor]="62268",kR[kI.SeriesAdd]="62122",kR[kI.SeriesConfiguration]="62123",kR[kI.SeriesDerived]="62124",kR[kI.SeriesFiltered]="62125",kR[kI.SeriesSearch]="62126",kR[kI.Settings]="62127",kR[kI.Shapes]="62128",kR[kI.Share]="62129",kR[kI.SharedFilter]="62130",kR[kI.Shield]="62131",kR[kI.Ship]="62132",kR[kI.Shop]="62133",kR[kI.ShoppingCart]="62134",kR[kI.ShortenText]="62271",kR[kI.SignalSearch]="62135",kR[kI.SimCard]="62136",kR[kI.Slash]="62137",kR[kI.SmallCross]="62138",kR[kI.SmallInfoSign]="62260",kR[kI.SmallMinus]="62139",kR[kI.SmallPlus]="62140",kR[kI.SmallSquare]="62141",kR[kI.SmallTick]="62142",kR[kI.Snowflake]="62143",kR[kI.SocialMedia]="62144",kR[kI.SortAlphabeticalDesc]="62145",kR[kI.SortAlphabetical]="62146",kR[kI.SortAsc]="62147",kR[kI.SortDesc]="62148",kR[kI.SortNumericalDesc]="62149",kR[kI.SortNumerical]="62150",kR[kI.Sort]="62151",kR[kI.SpellCheck]="62272",kR[kI.SplitColumns]="62152",kR[kI.Square]="62153",kR[kI.StackedChart]="62154",kR[kI.StadiumGeometry]="62155",kR[kI.StarEmpty]="62156",kR[kI.Star]="62157",kR[kI.StepBackward]="62158",kR[kI.StepChart]="62159",kR[kI.StepForward]="62160",kR[kI.Stop]="62161",kR[kI.Stopwatch]="62162",kR[kI.Strikethrough]="62163",kR[kI.Style]="62164",kR[kI.Subscript]="62265",kR[kI.Superscript]="62266",kR[kI.SwapHorizontal]="62165",kR[kI.SwapVertical]="62166",kR[kI.Switch]="62167",kR[kI.SymbolCircle]="62168",kR[kI.SymbolCross]="62169",kR[kI.SymbolDiamond]="62170",kR[kI.SymbolRectangle]="62242",kR[kI.SymbolSquare]="62171",kR[kI.SymbolTriangleDown]="62172",kR[kI.SymbolTriangleUp]="62173",kR[kI.Syringe]="62174",kR[kI.Tag]="62175",kR[kI.TakeAction]="62176",kR[kI.Tank]="62177",kR[kI.Target]="62178",kR[kI.Taxi]="62179",kR[kI.Temperature]="62180",kR[kI.TextHighlight]="62181",kR[kI.ThDerived]="62182",kR[kI.ThDisconnect]="62183",kR[kI.ThFiltered]="62184",kR[kI.ThList]="62185",kR[kI.Th]="62186",kR[kI.ThirdParty]="62187",kR[kI.ThumbsDown]="62188",kR[kI.ThumbsUp]="62189",kR[kI.TickCircle]="62190",kR[kI.Tick]="62191",kR[kI.Time]="62192",kR[kI.TimelineAreaChart]="62193",kR[kI.TimelineBarChart]="62194",kR[kI.TimelineEvents]="62195",kR[kI.TimelineLineChart]="62196",kR[kI.Tint]="62197",kR[kI.Torch]="62198",kR[kI.Tractor]="62199",kR[kI.Train]="62200",kR[kI.Translate]="62201",kR[kI.Trash]="62202",kR[kI.Tree]="62203",kR[kI.TrendingDown]="62204",kR[kI.TrendingUp]="62205",kR[kI.Truck]="62206",kR[kI.TwoColumns]="62207",kR[kI.Unarchive]="62208",kR[kI.Underline]="62209",kR[kI.Undo]="62210",kR[kI.UngroupObjects]="62211",kR[kI.UnknownVehicle]="62212",kR[kI.Unlink]="62277",kR[kI.Unlock]="62213",kR[kI.Unpin]="62214",kR[kI.Unresolve]="62215",kR[kI.Updated]="62216",kR[kI.Upload]="62217",kR[kI.User]="62218",kR[kI.Variable]="62219",kR[kI.VerticalBarChartAsc]="62220",kR[kI.VerticalBarChartDesc]="62221",kR[kI.VerticalDistribution]="62222",kR[kI.VerticalInbetween]="62250",kR[kI.Video]="62223",kR[kI.Virus]="62224",kR[kI.VolumeDown]="62225",kR[kI.VolumeOff]="62226",kR[kI.VolumeUp]="62227",kR[kI.Walk]="62228",kR[kI.WarningSign]="62229",kR[kI.WaterfallChart]="62230",kR[kI.Waves]="62231",kR[kI.WidgetButton]="62232",kR[kI.WidgetFooter]="62233",kR[kI.WidgetHeader]="62234",kR[kI.Widget]="62235",kR[kI.Wind]="62236",kR[kI.Wrench]="62237",kR[kI.ZoomIn]="62238",kR[kI.ZoomOut]="62239",kR[kI.ZoomToFit]="62240";for(var fh={},ff={},fp=0,fg=Object.values(kI);fp<fg.length;fp++){var fm=fg[fp];fh[(0,fc.pascalCase)(fm)]=fm,ff[(function(e,t){var n;return void 0===t&&(t={}),void 0===(n=(0,lD.__assign)({delimiter:"_"},t))&&(n={}),(0,fd.noCase)(e,(0,lD.__assign)({delimiter:"."},n))})(fm).toUpperCase()]=fm}var fv=(0,lD.__assign)((0,lD.__assign)({},fh),ff),fy=new Set(Object.values(fv)),fb=h("leH9B"),lD=h("gztBd"),fw=function(){function e(){this.defaultLoader="split-by-size",this.loadedIconPaths16=new Map,this.loadedIconPaths20=new Map}return e.setLoaderOptions=function(e){void 0!==e.loader&&(fx.defaultLoader=e.loader)},e.load=function(e,t,n){return(0,lD.__awaiter)(this,void 0,void 0,function(){var r=this;return(0,lD.__generator)(this,function(i){switch(i.label){case 0:return Array.isArray(e)||(e=[e]),[4,Promise.all(e.map(function(e){return r.loadImpl(e,t,n)}))];case 1:return i.sent(),[2]}})})},e.loadAll=function(e){return(0,lD.__awaiter)(this,void 0,void 0,function(){var t,n=this;return(0,lD.__generator)(this,function(r){return t=Object.values(fv),function(e,t){(0,lD.__awaiter)(this,void 0,void 0,function(){var n,r,i;return(0,lD.__generator)(this,function(o){switch(o.label){case 0:return(n="undefined"!=typeof NODE_ENV&&"development"===NODE_ENV&&"undefined"!=typeof performance)&&(r=performance.now(),console.info("Started '".concat(e,"'..."))),[4,t()];case 1:return o.sent(),n&&(i=Math.round(performance.now()-r),console.info("Finished '".concat(e,"' in ").concat(i,"ms"))),[2]}})})}("[Blueprint] loading all icons",function(){return(0,lD.__awaiter)(n,void 0,void 0,function(){return(0,lD.__generator)(this,function(n){switch(n.label){case 0:return[4,Promise.all([this.load(t,fb.IconSize.STANDARD,e),this.load(t,fb.IconSize.LARGE,e)])];case 1:return n.sent(),[2]}})})}),[2]})})},e.getPaths=function(e,t){if(this.isValidIconName(e))return(t<fb.IconSize.LARGE?fx.loadedIconPaths16:fx.loadedIconPaths20).get(e)},e.loadImpl=function(e,t,n){return void 0===n&&(n={}),(0,lD.__awaiter)(this,void 0,void 0,function(){var r,i,o,a,l;return(0,lD.__generator)(this,function(s){switch(s.label){case 0:if(!this.isValidIconName(e))return console.error("[Blueprint] Unknown icon '".concat(e,"'")),[2];if((r=t<fb.IconSize.LARGE?fx.loadedIconPaths16:fx.loadedIconPaths20).has(e))return[2];return[4,function(e){return(0,lD.__awaiter)(this,void 0,void 0,function(){var t,n;return(0,lD.__generator)(this,function(r){switch(r.label){case 0:if("function"!=typeof(n=void 0===(t=e.loader)?fx.defaultLoader:t))return[3,1];return[2,n];case 1:if("all"!==n)return[3,3];return[4,h("aymz8")];case 2:return[2,r.sent().allPathsLoader];case 3:return[4,h("bm3dq")];case 4:return[2,r.sent().splitPathsBySizeLoader]}})})}(n)];case 1:i=s.sent(),s.label=2;case 2:return s.trys.push([2,4,,5]),o=t<fb.IconSize.LARGE?fb.IconSize.STANDARD:fb.IconSize.LARGE,[4,i(e,o)];case 3:return a=s.sent(),r.set(e,a),[3,5];case 4:return l=s.sent(),console.error("[Blueprint] Unable to load ".concat(t,"px icon '").concat(e,"'"),l),[3,5];case 5:return[2]}})})},e.isValidIconName=function(e){return fy.has(e)},e}(),fx=new fw,fb=h("leH9B"),lD=h("gztBd"),v=h("8NFma"),f_="".concat("bp5","-icon"),fb=h("leH9B"),fE=new Map,fS=v.forwardRef(function(e,t){var n,r,i,o=e.children,a=e.className,s=e.color,u=e.htmlTitle,c=e.iconName,d=e.size,h=void 0===d?fb.IconSize.STANDARD:d,f=e.svgProps,p=e.tagName,g=void 0===p?"span":p,m=e.title,y=(0,lD.__rest)(e,["children","className","color","htmlTitle","iconName","size","svgProps","tagName","title"]),b=h>=fb.IconSize.LARGE?fb.IconSize.LARGE:fb.IconSize.STANDARD,w="0 0 ".concat(b," ").concat(b),x=(n="iconTitle",i=null!==(r=fE.get(n))&&void 0!==r?r:0,fE.set(n,i+1),"".concat(n,"-").concat(i)),_=(0,lD.__assign)({"data-icon":c,fill:s,height:h,role:"img",viewBox:w,width:h},f);return null===g?v.createElement("svg",(0,lD.__assign)({"aria-labelledby":m?x:void 0,ref:t},_,y),m&&v.createElement("title",{id:x},m),o):v.createElement(g,(0,lD.__assign)((0,lD.__assign)({"aria-hidden":!m||void 0},y),{className:l(lF)(f_,"".concat(f_,"-").concat(c),a),ref:t,title:u}),v.createElement("svg",(0,lD.__assign)({},_),m&&v.createElement("title",null,m),o))});fS.displayName="Blueprint5.SVGIconContainer";var fC=v.forwardRef(function(e,t){var n,r,i=e.autoLoad,o=e.className,a=e.color,s=e.icon,u=e.intent,c=e.tagName,d=e.svgProps,h=e.title,f=e.htmlTitle,p=(0,lD.__rest)(e,["autoLoad","className","color","icon","intent","tagName","svgProps","title","htmlTitle"]),g=null!==(r=null!==(n=e.iconSize)&&void 0!==n?n:e.size)&&void 0!==r?r:fb.IconSize.STANDARD,m=v.useState(function(){return"string"==typeof s?fw.getPaths(s,g):void 0}),y=m[0],b=m[1];if(v.useEffect(function(){var e=!1;if("string"==typeof s){var t=fw.getPaths(s,g);void 0!==t?b(t):i?fw.load(s,g).then(function(){e||b(fw.getPaths(s,g))}).catch(function(e){console.error("[Blueprint] Icon '".concat(s,"' (").concat(g,"px) could not be loaded."),e)}):console.error("[Blueprint] Icon '".concat(s,"' (").concat(g,"px) is not loaded yet and autoLoad={false}, did you call Icons.load('").concat(s,"', ").concat(g,")?"))}return function(){e=!0}},[i,s,g]),null==s||"boolean"==typeof s)return null;if("string"!=typeof s)return s;if(null==y){var w=g===fb.IconSize.STANDARD?lz.ICON_STANDARD:g===fb.IconSize.LARGE?lz.ICON_LARGE:void 0;return v.createElement(c,(0,lD.__assign)((0,lD.__assign)({"aria-hidden":!h||void 0},fu(p)),{className:l(lF)(lz.ICON,w,lz.iconClass(s),lz.intentClass(u),o),"data-icon":s,ref:t,title:f}))}var x=y.map(function(e,t){return v.createElement("path",{d:e,key:t,fillRule:"evenodd"})});return v.createElement(fS,(0,lD.__assign)({children:x,className:l(lF)(lz.intentClass(u),o),color:a,htmlTitle:f,iconName:s,ref:t,size:g,svgProps:d,tagName:c,title:h},fu(p)))});fC.defaultProps={autoLoad:!0,tagName:"span"},fC.displayName="".concat(fl,".Icon");var lD=h("gztBd"),v=h("8NFma"),lD=h("gztBd"),v=h("8NFma"),fO=function(e){function t(t){var n=e.call(this,t)||this;return n.timeoutIds=[],n.requestIds=[],n.clearTimeouts=function(){if(n.timeoutIds.length>0){for(var e=0,t=n.timeoutIds;e<t.length;e++){var r=t[e];window.clearTimeout(r)}n.timeoutIds=[]}},n.cancelAnimationFrames=function(){if(n.requestIds.length>0){for(var e=0,t=n.requestIds;e<t.length;e++){var r=t[e];window.cancelAnimationFrame(r)}n.requestIds=[]}},hQ("production")||n.validateProps(n.props),n}return(0,lD.__extends)(t,e),t.prototype.componentDidUpdate=function(e,t,n){hQ("production")||this.validateProps(this.props)},t.prototype.componentWillUnmount=function(){this.clearTimeouts(),this.cancelAnimationFrames()},t.prototype.requestAnimationFrame=function(e){var t=window.requestAnimationFrame(e);return this.requestIds.push(t),function(){return window.cancelAnimationFrame(t)}},t.prototype.setTimeout=function(e,t){var n=window.setTimeout(e,t);return this.timeoutIds.push(n),function(){return window.clearTimeout(n)}},t.prototype.validateProps=function(e){},t}(v.PureComponent);(kn=kL||(kL={}))[kn.SMALL=20]="SMALL",kn[kn.STANDARD=50]="STANDARD",kn[kn.LARGE=100]="LARGE";var fk="M 50,50 m 0,-".concat(45," a ").concat(45,",").concat(45," 0 1 1 0,").concat(90," a ").concat(45,",").concat(45," 0 1 1 0,-").concat(90),fP=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,lD.__extends)(t,e),t.prototype.componentDidUpdate=function(e){e.value!==this.props.value&&this.forceUpdate()},t.prototype.render=function(){var e,t=this.props,n=t.className,r=t.intent,i=t.value,o=t.tagName,a=void 0===o?"div":o,s=(0,lD.__rest)(t,["className","intent","value","tagName"]),u=this.getSize(),c=l(lF)(lz.SPINNER,lz.intentClass(r),((e={})[lz.SPINNER_NO_SPIN]=null!=i,e),n),d=Math.min(16,4*kL.LARGE/u),h=280-280*(null==i?.25:h1(i,0,1));return v.createElement(a,(0,lD.__assign)({"aria-label":"loading","aria-valuemax":100,"aria-valuemin":0,"aria-valuenow":void 0===i?void 0:100*i,className:c,role:"progressbar"},s),v.createElement(a,{className:lz.SPINNER_ANIMATION},v.createElement("svg",{width:u,height:u,strokeWidth:d.toFixed(2),viewBox:this.getViewBox(d)},v.createElement("path",{className:lz.SPINNER_TRACK,d:fk}),v.createElement("path",{className:lz.SPINNER_HEAD,d:fk,pathLength:280,strokeDasharray:"".concat(280," ").concat(280),strokeDashoffset:h}))))},t.prototype.validateProps=function(e){var t=e.className,n=void 0===t?"":t;null!=e.size&&(n.indexOf(lz.SMALL)>=0||n.indexOf(lz.LARGE)>=0)&&console.warn(hY)},t.prototype.getSize=function(){var e=this.props,t=e.className,n=void 0===t?"":t,r=e.size;return null==r?n.indexOf(lz.SMALL)>=0?kL.SMALL:n.indexOf(lz.LARGE)>=0?kL.LARGE:kL.STANDARD:Math.max(10,r)},t.prototype.getViewBox=function(e){var t=45+e/2,n=(50-t).toFixed(2),r=(2*t).toFixed(2);return"".concat(n," ").concat(n," ").concat(r," ").concat(r)},t.displayName="".concat(fl,".Spinner"),t}(fO),lD=h("gztBd"),v=h("8NFma"),fT=v.forwardRef(function(e,t){var n,r=e.children,i=e.tagName,o=e.title,a=e.className,s=e.ellipsize,u=(0,lD.__rest)(e,["children","tagName","title","className","ellipsize"]),c=v.useRef(),d=v.useMemo(function(){return fi(c,t)},[t]),h=v.useState(""),f=h[0],p=h[1],g=v.useState(),m=g[0],y=g[1];return v.useLayoutEffect(function(){var e;(null===(e=c.current)||void 0===e?void 0:e.textContent)!=null&&(y(s&&c.current.scrollWidth>c.current.clientWidth),p(c.current.textContent))},[c,r,s]),v.createElement(void 0===i?"div":i,(0,lD.__assign)((0,lD.__assign)({},u),{className:l(lF)(((n={})[lz.TEXT_OVERFLOW_ELLIPSIS]=s,n),a),ref:d,title:null!=o?o:m?f:void 0}),r)});fT.defaultProps={ellipsize:!1},fT.displayName="".concat(fl,".Text");var fA=v.forwardRef(function(e,t){var n=fN(e,t);return v.createElement("button",(0,lD.__assign)({type:"button"},fu(e),n),fj(e))});function fN(e,t){var n,r=e.active,i=e.alignText,o=e.fill,a=e.large,s=e.loading,u=void 0!==s&&s,c=e.minimal,d=e.onBlur,h=e.onKeyDown,f=e.onKeyUp,p=e.outlined,g=e.small,m=e.tabIndex,y=e.disabled||u,b=v.useState(),w=b[0],x=b[1],_=v.useState(!1),E=_[0],S=_[1],C=v.useRef(null),O=v.useCallback(function(e){E&&S(!1),null==d||d(e)},[E,d]),k=v.useCallback(function(e){ht.isKeyboardClick(e)&&(e.preventDefault(),e.key!==w&&S(!0)),x(e.key),null==h||h(e)},[w,h]),P=v.useCallback(function(e){var t;ht.isKeyboardClick(e)&&(S(!1),null===(t=C.current)||void 0===t||t.click()),x(void 0),null==f||f(e)},[f]);return{className:l(lF)(lz.BUTTON,((n={})[lz.ACTIVE]=!y&&(void 0!==r&&r||E),n[lz.DISABLED]=y,n[lz.FILL]=o,n[lz.LARGE]=a,n[lz.LOADING]=u,n[lz.MINIMAL]=c,n[lz.OUTLINED]=p,n[lz.SMALL]=g,n),lz.alignmentClass(i),lz.intentClass(e.intent),e.className),disabled:y,onBlur:O,onClick:y?void 0:e.onClick,onFocus:y?void 0:e.onFocus,onKeyDown:k,onKeyUp:P,ref:fi(C,t),tabIndex:y?-1:m}}function fj(e){var t=e.children,n=e.ellipsizeText,r=e.icon,i=e.loading,o=e.rightIcon,a=e.text,s=e.textClassName,u=!ht.isReactNodeEmpty(a)||!ht.isReactNodeEmpty(t);return v.createElement(v.Fragment,null,i&&v.createElement(fP,{key:"loading",className:lz.BUTTON_SPINNER,size:kL.SMALL}),v.createElement(fC,{key:"leftIcon",icon:r}),u&&v.createElement(fT,{key:"text",className:l(lF)(lz.BUTTON_TEXT,s),ellipsize:n,tagName:"span"},a,t),v.createElement(fC,{key:"rightIcon",icon:o}))}fA.displayName="".concat(fl,".Button"),v.forwardRef(function(e,t){var n=e.href,r=e.tabIndex,i=fN(e,t);return v.createElement("a",(0,lD.__assign)({role:"button"},fu(e),i,{"aria-disabled":i.disabled,href:i.disabled?void 0:n,tabIndex:i.disabled?-1:void 0===r?0:r}),fj(e))}).displayName="".concat(fl,".AnchorButton");var lD=h("gztBd"),v=h("8NFma"),lD=h("gztBd"),v=(h("8NFma"),h("8NFma")),fR=v.createContext(),fI=v.createContext();function fL(e){var t=e.children,n=v.useState(null),r=n[0],i=n[1],o=v.useRef(!1);v.useEffect(function(){return function(){o.current=!0}},[]);var a=v.useCallback(function(e){o.current||i(e)},[]);return v.createElement(fR.Provider,{value:r},v.createElement(fI.Provider,{value:a},t))}var v=(h("8NFma"),h("8NFma")),fM=function(e){return Array.isArray(e)?e[0]:e},fD=function(e){if("function"==typeof e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return e.apply(void 0,n)}},fF=function(e,t){if("function"==typeof e)return fD(e,t);null!=e&&(e.current=t)},fz=function(e){return e.reduce(function(e,t){var n=t[0],r=t[1];return e[n]=r,e},{})},fB="undefined"!=typeof window&&window.document&&window.document.createElement?v.useLayoutEffect:v.useEffect,v=h("8NFma");function fU(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function fH(e){var t=fU(e).Element;return e instanceof t||e instanceof Element}function fV(e){var t=fU(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function fq(e){if("undefined"==typeof ShadowRoot)return!1;var t=fU(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}var fG=Math.max,fW=Math.min,f$=Math.round;function fK(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function fY(){return!/^((?!chrome|android).)*safari/i.test(fK())}function fX(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&fV(e)&&(i=e.offsetWidth>0&&f$(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&f$(r.height)/e.offsetHeight||1);var a=(fH(e)?fU(e):window).visualViewport,l=!fY()&&n,s=(r.left+(l&&a?a.offsetLeft:0))/i,u=(r.top+(l&&a?a.offsetTop:0))/o,c=r.width/i,d=r.height/o;return{width:c,height:d,top:u,right:s+c,bottom:u+d,left:s,x:s,y:u}}function fZ(e){var t=fU(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function fQ(e){return e?(e.nodeName||"").toLowerCase():null}function fJ(e){return((fH(e)?e.ownerDocument:e.document)||window.document).documentElement}function f0(e){return fX(fJ(e)).left+fZ(e).scrollLeft}function f1(e){return fU(e).getComputedStyle(e)}function f2(e){var t=f1(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function f3(e){var t=fX(e),n=e.offsetWidth,r=e.offsetHeight;return 1>=Math.abs(t.width-n)&&(n=t.width),1>=Math.abs(t.height-r)&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function f5(e){return"html"===fQ(e)?e:e.assignedSlot||e.parentNode||(fq(e)?e.host:null)||fJ(e)}function f6(e,t){void 0===t&&(t=[]);var n,r=function e(t){return["html","body","#document"].indexOf(fQ(t))>=0?t.ownerDocument.body:fV(t)&&f2(t)?t:e(f5(t))}(e),i=r===(null==(n=e.ownerDocument)?void 0:n.body),o=fU(r),a=i?[o].concat(o.visualViewport||[],f2(r)?r:[]):r,l=t.concat(a);return i?l:l.concat(f6(f5(a)))}function f4(e){return fV(e)&&"fixed"!==f1(e).position?e.offsetParent:null}function f8(e){for(var t=fU(e),n=f4(e);n&&["table","td","th"].indexOf(fQ(n))>=0&&"static"===f1(n).position;)n=f4(n);return n&&("html"===fQ(n)||"body"===fQ(n)&&"static"===f1(n).position)?t:n||function(e){var t=/firefox/i.test(fK());if(/Trident/i.test(fK())&&fV(e)&&"fixed"===f1(e).position)return null;var n=f5(e);for(fq(n)&&(n=n.host);fV(n)&&0>["html","body"].indexOf(fQ(n));){var r=f1(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}var f9="bottom",f7="right",pe="left",pt="auto",pn=["top",f9,f7,pe],pr="start",pi="viewport",po="popper",pa=pn.reduce(function(e,t){return e.concat([t+"-"+pr,t+"-end"])},[]),pl=[].concat(pn,[pt]).reduce(function(e,t){return e.concat([t,t+"-"+pr,t+"-end"])},[]),ps=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"],pu={placement:"bottom",modifiers:[],strategy:"absolute"};function pc(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(e){return!(e&&"function"==typeof e.getBoundingClientRect)})}var pd={passive:!0};function ph(e){return e.split("-")[0]}function pf(e){return e.split("-")[1]}function pp(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function pg(e){var t,n=e.reference,r=e.element,i=e.placement,o=i?ph(i):null,a=i?pf(i):null,l=n.x+n.width/2-r.width/2,s=n.y+n.height/2-r.height/2;switch(o){case"top":t={x:l,y:n.y-r.height};break;case f9:t={x:l,y:n.y+n.height};break;case f7:t={x:n.x+n.width,y:s};break;case pe:t={x:n.x-r.width,y:s};break;default:t={x:n.x,y:n.y}}var u=o?pp(o):null;if(null!=u){var c="y"===u?"height":"width";switch(a){case pr:t[u]=t[u]-(n[c]/2-r[c]/2);break;case"end":t[u]=t[u]+(n[c]/2-r[c]/2)}}return t}var pm={top:"auto",right:"auto",bottom:"auto",left:"auto"};function pv(e){var t,n,r,i,o,a,l,s=e.popper,u=e.popperRect,c=e.placement,d=e.variation,h=e.offsets,f=e.position,p=e.gpuAcceleration,g=e.adaptive,m=e.roundOffsets,v=e.isFixed,y=h.x,b=void 0===y?0:y,w=h.y,x=void 0===w?0:w,_="function"==typeof m?m({x:b,y:x}):{x:b,y:x};b=_.x,x=_.y;var E=h.hasOwnProperty("x"),S=h.hasOwnProperty("y"),C=pe,O="top",k=window;if(g){var P=f8(s),T="clientHeight",A="clientWidth";P===fU(s)&&"static"!==f1(P=fJ(s)).position&&"absolute"===f&&(T="scrollHeight",A="scrollWidth"),("top"===c||(c===pe||c===f7)&&"end"===d)&&(O=f9,x-=(v&&P===k&&k.visualViewport?k.visualViewport.height:P[T])-u.height,x*=p?1:-1),(c===pe||("top"===c||c===f9)&&"end"===d)&&(C=f7,b-=(v&&P===k&&k.visualViewport?k.visualViewport.width:P[A])-u.width,b*=p?1:-1)}var N=Object.assign({position:f},g&&pm),j=!0===m?(t={x:b,y:x},n=fU(s),r=t.x,i=t.y,{x:f$(r*(o=n.devicePixelRatio||1))/o||0,y:f$(i*o)/o||0}):{x:b,y:x};return(b=j.x,x=j.y,p)?Object.assign({},N,((l={})[O]=S?"0":"",l[C]=E?"0":"",l.transform=1>=(k.devicePixelRatio||1)?"translate("+b+"px, "+x+"px)":"translate3d("+b+"px, "+x+"px, 0)",l)):Object.assign({},N,((a={})[O]=S?x+"px":"",a[C]=E?b+"px":"",a.transform="",a))}var py={left:"right",right:"left",bottom:"top",top:"bottom"};function pb(e){return e.replace(/left|right|bottom|top/g,function(e){return py[e]})}var pw={start:"end",end:"start"};function px(e){return e.replace(/start|end/g,function(e){return pw[e]})}function p_(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&fq(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function pE(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function pS(e,t,n){var r,i,o,a,l,s,u,c,d,h;return t===pi?pE(function(e,t){var n=fU(e),r=fJ(e),i=n.visualViewport,o=r.clientWidth,a=r.clientHeight,l=0,s=0;if(i){o=i.width,a=i.height;var u=fY();(u||!u&&"fixed"===t)&&(l=i.offsetLeft,s=i.offsetTop)}return{width:o,height:a,x:l+f0(e),y:s}}(e,n)):fH(t)?((r=fX(t,!1,"fixed"===n)).top=r.top+t.clientTop,r.left=r.left+t.clientLeft,r.bottom=r.top+t.clientHeight,r.right=r.left+t.clientWidth,r.width=t.clientWidth,r.height=t.clientHeight,r.x=r.left,r.y=r.top,r):pE((i=fJ(e),a=fJ(i),l=fZ(i),s=null==(o=i.ownerDocument)?void 0:o.body,u=fG(a.scrollWidth,a.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),c=fG(a.scrollHeight,a.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0),d=-l.scrollLeft+f0(i),h=-l.scrollTop,"rtl"===f1(s||a).direction&&(d+=fG(a.clientWidth,s?s.clientWidth:0)-u),{width:u,height:c,x:d,y:h}))}function pC(){return{top:0,right:0,bottom:0,left:0}}function pO(e){return Object.assign({},pC(),e)}function pk(e,t){return t.reduce(function(t,n){return t[n]=e,t},{})}function pP(e,t){void 0===t&&(t={});var n,r,i,o,a,l,s,u=t,c=u.placement,d=void 0===c?e.placement:c,h=u.strategy,f=void 0===h?e.strategy:h,p=u.boundary,g=u.rootBoundary,m=u.elementContext,v=void 0===m?po:m,y=u.altBoundary,b=u.padding,w=void 0===b?0:b,x=pO("number"!=typeof w?w:pk(w,pn)),_=e.rects.popper,E=e.elements[void 0!==y&&y?v===po?"reference":po:v],S=(n=fH(E)?E:E.contextElement||fJ(e.elements.popper),l=(a=[].concat("clippingParents"===(r=void 0===p?"clippingParents":p)?(i=f6(f5(n)),fH(o=["absolute","fixed"].indexOf(f1(n).position)>=0&&fV(n)?f8(n):n)?i.filter(function(e){return fH(e)&&p_(e,o)&&"body"!==fQ(e)}):[]):[].concat(r),[void 0===g?pi:g]))[0],(s=a.reduce(function(e,t){var r=pS(n,t,f);return e.top=fG(r.top,e.top),e.right=fW(r.right,e.right),e.bottom=fW(r.bottom,e.bottom),e.left=fG(r.left,e.left),e},pS(n,l,f))).width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s),C=fX(e.elements.reference),O=pg({reference:C,element:_,strategy:"absolute",placement:d}),k=pE(Object.assign({},_,O)),P=v===po?k:C,T={top:S.top-P.top+x.top,bottom:P.bottom-S.bottom+x.bottom,left:S.left-P.left+x.left,right:P.right-S.right+x.right},A=e.modifiersData.offset;if(v===po&&A){var N=A[d];Object.keys(T).forEach(function(e){var t=[f7,f9].indexOf(e)>=0?1:-1,n=["top",f9].indexOf(e)>=0?"y":"x";T[e]+=N[n]*t})}return T}function pT(e,t,n){return fG(e,fW(t,n))}function pA(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function pN(e){return["top",f7,f9,pe].some(function(t){return e[t]>=0})}var pj=(ko=void 0===(ki=(kr={defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=void 0===i||i,a=r.resize,l=void 0===a||a,s=fU(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&u.forEach(function(e){e.addEventListener("scroll",n.update,pd)}),l&&s.addEventListener("resize",n.update,pd),function(){o&&u.forEach(function(e){e.removeEventListener("scroll",n.update,pd)}),l&&s.removeEventListener("resize",n.update,pd)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=pg({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=n.adaptive,o=n.roundOffsets,a=void 0===o||o,l={placement:ph(t.placement),variation:pf(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:void 0===r||r,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,pv(Object.assign({},l,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:void 0===i||i,roundOffsets:a})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,pv(Object.assign({},l,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:a})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},{name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach(function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},i=t.elements[e];fV(i)&&fQ(i)&&(Object.assign(i.style,n),Object.keys(r).forEach(function(e){var t=r[e];!1===t?i.removeAttribute(e):i.setAttribute(e,!0===t?"":t)}))})},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(e){var r=t.elements[e],i=t.attributes[e]||{},o=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce(function(e,t){return e[t]="",e},{});fV(r)&&fQ(r)&&(Object.assign(r.style,o),Object.keys(i).forEach(function(e){r.removeAttribute(e)}))})}},requires:["computeStyles"]},{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=void 0===i?[0,0]:i,a=pl.reduce(function(e,n){var r,i,a,l,s,u;return e[n]=(r=t.rects,a=[pe,"top"].indexOf(i=ph(n))>=0?-1:1,s=(l="function"==typeof o?o(Object.assign({},r,{placement:n})):o)[0],u=l[1],s=s||0,u=(u||0)*a,[pe,f7].indexOf(i)>=0?{x:u,y:s}:{x:s,y:u}),e},{}),l=a[t.placement],s=l.x,u=l.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=s,t.modifiersData.popperOffsets.y+=u),t.modifiersData[r]=a}},{name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=void 0===i||i,a=n.altAxis,l=void 0===a||a,s=n.fallbackPlacements,u=n.padding,c=n.boundary,d=n.rootBoundary,h=n.altBoundary,f=n.flipVariations,p=void 0===f||f,g=n.allowedAutoPlacements,m=t.options.placement,v=ph(m)===m,y=s||(v||!p?[pb(m)]:function(e){if(ph(e)===pt)return[];var t=pb(e);return[px(e),t,px(t)]}(m)),b=[m].concat(y).reduce(function(e,n){var r,i,o,a,l,s,h,f,m,v,y,b;return e.concat(ph(n)===pt?(i=(r={placement:n,boundary:c,rootBoundary:d,padding:u,flipVariations:p,allowedAutoPlacements:g}).placement,o=r.boundary,a=r.rootBoundary,l=r.padding,s=r.flipVariations,f=void 0===(h=r.allowedAutoPlacements)?pl:h,0===(y=(v=(m=pf(i))?s?pa:pa.filter(function(e){return pf(e)===m}):pn).filter(function(e){return f.indexOf(e)>=0})).length&&(y=v),Object.keys(b=y.reduce(function(e,n){return e[n]=pP(t,{placement:n,boundary:o,rootBoundary:a,padding:l})[ph(n)],e},{})).sort(function(e,t){return b[e]-b[t]})):n)},[]),w=t.rects.reference,x=t.rects.popper,_=new Map,E=!0,S=b[0],C=0;C<b.length;C++){var O=b[C],k=ph(O),P=pf(O)===pr,T=["top",f9].indexOf(k)>=0,A=T?"width":"height",N=pP(t,{placement:O,boundary:c,rootBoundary:d,altBoundary:h,padding:u}),j=T?P?f7:pe:P?f9:"top";w[A]>x[A]&&(j=pb(j));var R=pb(j),I=[];if(o&&I.push(N[k]<=0),l&&I.push(N[j]<=0,N[R]<=0),I.every(function(e){return e})){S=O,E=!1;break}_.set(O,I)}if(E)for(var L=p?3:1,M=function(e){var t=b.find(function(t){var n=_.get(t);if(n)return n.slice(0,e).every(function(e){return e})});if(t)return S=t,"break"},D=L;D>0&&"break"!==M(D);D--);t.placement!==S&&(t.modifiersData[r]._skip=!0,t.placement=S,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=n.altAxis,a=n.boundary,l=n.rootBoundary,s=n.altBoundary,u=n.padding,c=n.tether,d=void 0===c||c,h=n.tetherOffset,f=void 0===h?0:h,p=pP(t,{boundary:a,rootBoundary:l,padding:u,altBoundary:s}),g=ph(t.placement),m=pf(t.placement),v=!m,y=pp(g),b="x"===y?"y":"x",w=t.modifiersData.popperOffsets,x=t.rects.reference,_=t.rects.popper,E="function"==typeof f?f(Object.assign({},t.rects,{placement:t.placement})):f,S="number"==typeof E?{mainAxis:E,altAxis:E}:Object.assign({mainAxis:0,altAxis:0},E),C=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,O={x:0,y:0};if(w){if(void 0===i||i){var k,P="y"===y?"top":pe,T="y"===y?f9:f7,A="y"===y?"height":"width",N=w[y],j=N+p[P],R=N-p[T],I=d?-_[A]/2:0,L=m===pr?x[A]:_[A],M=m===pr?-_[A]:-x[A],D=t.elements.arrow,F=d&&D?f3(D):{width:0,height:0},z=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:pC(),B=z[P],U=z[T],H=pT(0,x[A],F[A]),V=v?x[A]/2-I-H-B-S.mainAxis:L-H-B-S.mainAxis,q=v?-x[A]/2+I+H+U+S.mainAxis:M+H+U+S.mainAxis,G=t.elements.arrow&&f8(t.elements.arrow),W=G?"y"===y?G.clientTop||0:G.clientLeft||0:0,$=null!=(k=null==C?void 0:C[y])?k:0,K=pT(d?fW(j,N+V-$-W):j,N,d?fG(R,N+q-$):R);w[y]=K,O[y]=K-N}if(void 0!==o&&o){var Y,X,Z="x"===y?"top":pe,Q="x"===y?f9:f7,J=w[b],ee="y"===b?"height":"width",et=J+p[Z],en=J-p[Q],er=-1!==["top",pe].indexOf(g),ei=null!=(X=null==C?void 0:C[b])?X:0,eo=er?et:J-x[ee]-_[ee]-ei+S.altAxis,ea=er?J+x[ee]+_[ee]-ei-S.altAxis:en,el=d&&er?(Y=pT(eo,J,ea))>ea?ea:Y:pT(d?eo:et,J,d?ea:en);w[b]=el,O[b]=el-J}t.modifiersData[r]=O}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,a=n.modifiersData.popperOffsets,l=ph(n.placement),s=pp(l),u=[pe,f7].indexOf(l)>=0?"height":"width";if(o&&a){var c,d=pO("number"!=typeof(c="function"==typeof(c=i.padding)?c(Object.assign({},n.rects,{placement:n.placement})):c)?c:pk(c,pn)),h=f3(o),f="y"===s?"top":pe,p="y"===s?f9:f7,g=n.rects.reference[u]+n.rects.reference[s]-a[s]-n.rects.popper[u],m=a[s]-n.rects.reference[s],v=f8(o),y=v?"y"===s?v.clientHeight||0:v.clientWidth||0:0,b=d[f],w=y-h[u]-d[p],x=y/2-h[u]/2+(g/2-m/2),_=pT(b,x,w);n.modifiersData[r]=((t={})[s]=_,t.centerOffset=_-x,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!=typeof r||(r=t.elements.popper.querySelector(r)))&&p_(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=pP(t,{elementContext:"reference"}),l=pP(t,{altBoundary:!0}),s=pA(a,r),u=pA(l,i,o),c=pN(s),d=pN(u);t.modifiersData[n]={referenceClippingOffsets:s,popperEscapeOffsets:u,isReferenceHidden:c,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":d})}}]}).defaultModifiers)?[]:ki,kl=void 0===(ka=kr.defaultOptions)?pu:ka,function(e,t,n){void 0===n&&(n=kl);var r,i={placement:"bottom",orderedModifiers:[],options:Object.assign({},pu,kl),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},o=[],a=!1,l={state:i,setOptions:function(n){var r,a,u,c,d,h="function"==typeof n?n(i.options):n;s(),i.options=Object.assign({},kl,i.options,h),i.scrollParents={reference:fH(e)?f6(e):e.contextElement?f6(e.contextElement):[],popper:f6(t)};var f=(a=Object.keys(r=[].concat(ko,i.options.modifiers).reduce(function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e},{})).map(function(e){return r[e]}),u=new Map,c=new Set,d=[],a.forEach(function(e){u.set(e.name,e)}),a.forEach(function(e){c.has(e.name)||function e(t){c.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach(function(t){if(!c.has(t)){var n=u.get(t);n&&e(n)}}),d.push(t)}(e)}),ps.reduce(function(e,t){return e.concat(d.filter(function(e){return e.phase===t}))},[]));return i.orderedModifiers=f.filter(function(e){return e.enabled}),i.orderedModifiers.forEach(function(e){var t=e.name,n=e.options,r=e.effect;if("function"==typeof r){var a=r({state:i,name:t,instance:l,options:void 0===n?{}:n});o.push(a||function(){})}}),l.update()},forceUpdate:function(){if(!a){var e=i.elements,t=e.reference,n=e.popper;if(pc(t,n)){i.rects={reference:(o=f8(n),s="fixed"===i.options.strategy,u=fV(o),f=fV(o)&&(d=f$((c=o.getBoundingClientRect()).width)/o.offsetWidth||1,h=f$(c.height)/o.offsetHeight||1,1!==d||1!==h),p=fJ(o),g=fX(t,f,s),m={scrollLeft:0,scrollTop:0},v={x:0,y:0},(u||!u&&!s)&&(("body"!==fQ(o)||f2(p))&&(m=(r=o)!==fU(r)&&fV(r)?{scrollLeft:r.scrollLeft,scrollTop:r.scrollTop}:fZ(r)),fV(o)?(v=fX(o,!0),v.x+=o.clientLeft,v.y+=o.clientTop):p&&(v.x=f0(p))),{x:g.left+m.scrollLeft-v.x,y:g.top+m.scrollTop-v.y,width:g.width,height:g.height}),popper:f3(n)},i.reset=!1,i.placement=i.options.placement,i.orderedModifiers.forEach(function(e){return i.modifiersData[e.name]=Object.assign({},e.data)});for(var r,o,s,u,c,d,h,f,p,g,m,v,y=0;y<i.orderedModifiers.length;y++){if(!0===i.reset){i.reset=!1,y=-1;continue}var b=i.orderedModifiers[y],w=b.fn,x=b.options,_=void 0===x?{}:x,E=b.name;"function"==typeof w&&(i=w({state:i,options:_,name:E,instance:l})||i)}}}},update:function(){return r||(r=new Promise(function(e){Promise.resolve().then(function(){r=void 0,e(new Promise(function(e){l.forceUpdate(),e(i)}))})})),r},destroy:function(){s(),a=!0}};if(!pc(e,t))return l;function s(){o.forEach(function(e){return e()}),o=[]}return l.setOptions(n).then(function(e){!a&&n.onFirstUpdate&&n.onFirstUpdate(e)}),l}),pR={},pI="undefined"!=typeof Element,pL="function"==typeof Map,pM="function"==typeof Set,pD="function"==typeof ArrayBuffer&&!!ArrayBuffer.isView;pR=function(e,t){try{return function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){var r,i,o,a;if(t.constructor!==n.constructor)return!1;if(Array.isArray(t)){if((r=t.length)!=n.length)return!1;for(i=r;0!=i--;)if(!e(t[i],n[i]))return!1;return!0}if(pL&&t instanceof Map&&n instanceof Map){if(t.size!==n.size)return!1;for(a=t.entries();!(i=a.next()).done;)if(!n.has(i.value[0]))return!1;for(a=t.entries();!(i=a.next()).done;)if(!e(i.value[1],n.get(i.value[0])))return!1;return!0}if(pM&&t instanceof Set&&n instanceof Set){if(t.size!==n.size)return!1;for(a=t.entries();!(i=a.next()).done;)if(!n.has(i.value[0]))return!1;return!0}if(pD&&ArrayBuffer.isView(t)&&ArrayBuffer.isView(n)){if((r=t.length)!=n.length)return!1;for(i=r;0!=i--;)if(t[i]!==n[i])return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf&&"function"==typeof t.valueOf&&"function"==typeof n.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString&&"function"==typeof t.toString&&"function"==typeof n.toString)return t.toString()===n.toString();if((r=(o=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(i=r;0!=i--;)if(!Object.prototype.hasOwnProperty.call(n,o[i]))return!1;if(pI&&t instanceof Element)return!1;for(i=r;0!=i--;)if(("_owner"!==o[i]&&"__v"!==o[i]&&"__o"!==o[i]||!t.$$typeof)&&!e(t[o[i]],n[o[i]]))return!1;return!0}return t!=t&&n!=n}(e,t)}catch(e){if((e.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw e}};var pF=[],pz=function(e,t,n){void 0===n&&(n={});var r=v.useRef(null),i={onFirstUpdate:n.onFirstUpdate,placement:n.placement||"bottom",strategy:n.strategy||"absolute",modifiers:n.modifiers||pF},o=v.useState({styles:{popper:{position:i.strategy,left:"0",top:"0"},arrow:{position:"absolute"}},attributes:{}}),a=o[0],s=o[1],u=v.useMemo(function(){return{name:"updateState",enabled:!0,phase:"write",fn:function(e){var t=e.state,n=Object.keys(t.elements);m.flushSync(function(){s({styles:fz(n.map(function(e){return[e,t.styles[e]||{}]})),attributes:fz(n.map(function(e){return[e,t.attributes[e]]}))})})},requires:["computeStyles"]}},[]),c=v.useMemo(function(){var e={onFirstUpdate:i.onFirstUpdate,placement:i.placement,strategy:i.strategy,modifiers:[].concat(i.modifiers,[u,{name:"applyStyles",enabled:!1}])};return l(pR)(r.current,e)?r.current||e:(r.current=e,e)},[i.onFirstUpdate,i.placement,i.strategy,i.modifiers,u]),d=v.useRef();return fB(function(){d.current&&d.current.setOptions(c)},[c]),fB(function(){if(null!=e&&null!=t){var r=(n.createPopper||pj)(e,t,c);return d.current=r,function(){r.destroy(),d.current=null}}},[e,t,n.createPopper]),{state:d.current?d.current.state:null,styles:a.styles,attributes:a.attributes,update:d.current?d.current.update:null,forceUpdate:d.current?d.current.forceUpdate:null}},pB=function(){},pU=function(){return Promise.resolve(null)},pH=[];function pV(e){var t=e.placement,n=void 0===t?"bottom":t,r=e.strategy,i=void 0===r?"absolute":r,o=e.modifiers,a=void 0===o?pH:o,l=e.referenceElement,s=e.onFirstUpdate,u=e.innerRef,c=e.children,d=v.useContext(fR),h=v.useState(null),f=h[0],p=h[1],g=v.useState(null),m=g[0],y=g[1];v.useEffect(function(){fF(u,f)},[u,f]);var b=pz(l||d,f,v.useMemo(function(){return{placement:n,strategy:i,onFirstUpdate:s,modifiers:[].concat(a,[{name:"arrow",enabled:null!=m,options:{element:m}}])}},[n,i,s,a,m])),w=b.state,x=b.styles,_=b.forceUpdate,E=b.update,S=v.useMemo(function(){return{ref:p,style:x.popper,placement:w?w.placement:n,hasPopperEscaped:w&&w.modifiersData.hide?w.modifiersData.hide.hasPopperEscaped:null,isReferenceHidden:w&&w.modifiersData.hide?w.modifiersData.hide.isReferenceHidden:null,arrowProps:{style:x.arrow,ref:y},forceUpdate:_||pB,update:E||pU}},[p,y,n,w,x,E,_]);return fM(c)(S)}var v=h("8NFma"),pq={};function pG(e){var t=e.children,n=e.innerRef,r=v.useContext(fI),i=v.useCallback(function(e){fF(n,e),fD(r,e)},[n,r]);return v.useEffect(function(){return function(){return fF(n,null)}},[]),v.useEffect(function(){l(pq)(!!r,"`Reference` should not be used outside of a `Manager` component.")},[r]),fM(t)({ref:i})}pq=function(){};var lD=h("gztBd");function pW(){return(pW=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function p$(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}function pK(e,t){return(pK=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function pY(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,pK(e,t)}function pX(e,t){return e.replace(RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}var v=(h("8NFma"),h("8NFma"),h("8NFma")),pZ={disabled:!1},v=h("8NFma"),pQ=l(v).createContext(null),pJ=function(e){return e.scrollTop},p0="unmounted",p1="exited",p2="entering",p3="entered",p5="exiting",p6=function(e){function t(t,n){r=e.call(this,t,n)||this;var r,i,o=n&&!n.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?o?(i=p1,r.appearStatus=p2):i=p3:i=t.unmountOnExit||t.mountOnEnter?p0:p1,r.state={status:i},r.nextCallback=null,r}pY(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===p0?{status:p1}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==p2&&n!==p3&&(t=p2):(n===p2||n===p3)&&(t=p5)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!=typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},n.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t){if(this.cancelNextCallback(),t===p2){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:l(m).findDOMNode(this);n&&pJ(n)}this.performEnter(e)}else this.performExit()}else this.props.unmountOnExit&&this.state.status===p1&&this.setState({status:p0})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,i=this.props.nodeRef?[r]:[l(m).findDOMNode(this),r],o=i[0],a=i[1],s=this.getTimeouts(),u=r?s.appear:s.enter;if(!e&&!n||pZ.disabled){this.safeSetState({status:p3},function(){t.props.onEntered(o)});return}this.props.onEnter(o,a),this.safeSetState({status:p2},function(){t.props.onEntering(o,a),t.onTransitionEnd(u,function(){t.safeSetState({status:p3},function(){t.props.onEntered(o,a)})})})},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:l(m).findDOMNode(this);if(!t||pZ.disabled){this.safeSetState({status:p1},function(){e.props.onExited(r)});return}this.props.onExit(r),this.safeSetState({status:p5},function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,function(){e.safeSetState({status:p1},function(){e.props.onExited(r)})})})},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:l(m).findDOMNode(this),r=null==e&&!this.props.addEndListener;if(!n||r){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],o=i[0],a=i[1];this.props.addEndListener(o,a)}null!=e&&setTimeout(this.nextCallback,e)},n.render=function(){var e=this.state.status;if(e===p0)return null;var t=this.props,n=t.children,r=(t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef,p$(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return l(v).createElement(pQ.Provider,{value:null},"function"==typeof n?n(e,r):l(v).cloneElement(l(v).Children.only(n),r))},t}(l(v).Component);function p4(){}p6.contextType=pQ,p6.propTypes={},p6.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:p4,onEntering:p4,onEntered:p4,onExit:p4,onExiting:p4,onExited:p4},p6.UNMOUNTED=p0,p6.EXITED=p1,p6.ENTERING=p2,p6.ENTERED=p3,p6.EXITING=p5;var p8=function(e,t){return e&&t&&t.split(" ").forEach(function(t){e.classList?e.classList.remove(t):"string"==typeof e.className?e.className=pX(e.className,t):e.setAttribute("class",pX(e.className&&e.className.baseVal||"",t))})},p9=function(e){function t(){for(var t,n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this).appliedClasses={appear:{},enter:{},exit:{}},t.onEnter=function(e,n){var r=t.resolveArguments(e,n),i=r[0],o=r[1];t.removeClasses(i,"exit"),t.addClass(i,o?"appear":"enter","base"),t.props.onEnter&&t.props.onEnter(e,n)},t.onEntering=function(e,n){var r=t.resolveArguments(e,n),i=r[0],o=r[1];t.addClass(i,o?"appear":"enter","active"),t.props.onEntering&&t.props.onEntering(e,n)},t.onEntered=function(e,n){var r=t.resolveArguments(e,n),i=r[0],o=r[1]?"appear":"enter";t.removeClasses(i,o),t.addClass(i,o,"done"),t.props.onEntered&&t.props.onEntered(e,n)},t.onExit=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,"appear"),t.removeClasses(n,"enter"),t.addClass(n,"exit","base"),t.props.onExit&&t.props.onExit(e)},t.onExiting=function(e){var n=t.resolveArguments(e)[0];t.addClass(n,"exit","active"),t.props.onExiting&&t.props.onExiting(e)},t.onExited=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,"exit"),t.addClass(n,"exit","done"),t.props.onExited&&t.props.onExited(e)},t.resolveArguments=function(e,n){return t.props.nodeRef?[t.props.nodeRef.current,e]:[e,n]},t.getClassNames=function(e){var n=t.props.classNames,r="string"==typeof n,i=r?(r&&n?n+"-":"")+e:n[e],o=r?i+"-active":n[e+"Active"],a=r?i+"-done":n[e+"Done"];return{baseClassName:i,activeClassName:o,doneClassName:a}},t}pY(t,e);var n=t.prototype;return n.addClass=function(e,t,n){var r,i=this.getClassNames(t)[n+"ClassName"],o=this.getClassNames("enter").doneClassName;"appear"===t&&"done"===n&&o&&(i+=" "+o),"active"===n&&e&&pJ(e),i&&(this.appliedClasses[t][n]=i,r=i,e&&r&&r.split(" ").forEach(function(t){var n,r;return n=e,r=t,void(n.classList?n.classList.add(r):(n.classList?r&&n.classList.contains(r):-1!==(" "+(n.className.baseVal||n.className)+" ").indexOf(" "+r+" "))||("string"==typeof n.className?n.className=n.className+" "+r:n.setAttribute("class",(n.className&&n.className.baseVal||"")+" "+r)))}))},n.removeClasses=function(e,t){var n=this.appliedClasses[t],r=n.base,i=n.active,o=n.done;this.appliedClasses[t]={},r&&p8(e,r),i&&p8(e,i),o&&p8(e,o)},n.render=function(){var e=this.props,t=(e.classNames,p$(e,["classNames"]));return l(v).createElement(p6,pW({},t,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t}(l(v).Component);function p7(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}p9.defaultProps={classNames:""},p9.propTypes={};var v=(h("8NFma"),h("8NFma"));function ge(e,t){var n=Object.create(null);return e&&(0,v.Children).map(e,function(e){return e}).forEach(function(e){n[e.key]=t&&(0,v.isValidElement)(e)?t(e):e}),n}function gt(e,t,n){return null!=n[t]?n[t]:e.props[t]}var gn=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},gr=function(e){function t(t,n){var r,i=(r=e.call(this,t,n)||this).handleExited.bind(p7(r));return r.state={contextValue:{isMounting:!0},handleExited:i,firstRender:!0},r}pY(t,e);var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(e,t){var n,r,i=t.children,o=t.handleExited;return{children:t.firstRender?ge(e.children,function(t){return(0,v.cloneElement)(t,{onExited:o.bind(null,t),in:!0,appear:gt(t,"appear",e),enter:gt(t,"enter",e),exit:gt(t,"exit",e)})}):(Object.keys(r=function(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,i=Object.create(null),o=[];for(var a in e)a in t?o.length&&(i[a]=o,o=[]):o.push(a);var l={};for(var s in t){if(i[s])for(r=0;r<i[s].length;r++){var u=i[s][r];l[i[s][r]]=n(u)}l[s]=n(s)}for(r=0;r<o.length;r++)l[o[r]]=n(o[r]);return l}(i,n=ge(e.children))).forEach(function(t){var a=r[t];if((0,v.isValidElement)(a)){var l=t in i,s=t in n,u=i[t],c=(0,v.isValidElement)(u)&&!u.props.in;s&&(!l||c)?r[t]=(0,v.cloneElement)(a,{onExited:o.bind(null,a),in:!0,exit:gt(a,"exit",e),enter:gt(a,"enter",e)}):s||!l||c?s&&l&&(0,v.isValidElement)(u)&&(r[t]=(0,v.cloneElement)(a,{onExited:o.bind(null,a),in:u.props.in,exit:gt(a,"exit",e),enter:gt(a,"enter",e)})):r[t]=(0,v.cloneElement)(a,{in:!1})}}),r),firstRender:!1}},n.handleExited=function(e,t){var n=ge(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState(function(t){var n=pW({},t.children);return delete n[e.key],{children:n}}))},n.render=function(){var e=this.props,t=e.component,n=e.childFactory,r=p$(e,["component","childFactory"]),i=this.state.contextValue,o=gn(this.state.children).map(n);return(delete r.appear,delete r.enter,delete r.exit,null===t)?l(v).createElement(pQ.Provider,{value:i},o):l(v).createElement(pQ.Provider,{value:i},l(v).createElement(t,r,o))},t}(l(v).Component);gr.propTypes={},gr.defaultProps={component:"div",childFactory:function(e){return e}};var v=(h("8NFma"),h("8NFma")),gi=v.createContext({});function go(e,t){var n,r=e.className,i=e.stopPropagationEvents,o=e.container,a=e.onChildrenMount,l=e.children;void 0===t&&(t={});var s=v.useContext(gi),u=null!==(n=null!=o?o:s.portalContainer)&&void 0!==n?n:"undefined"!=typeof document?document.body:void 0,c=v.useState(),d=c[0],h=c[1],f=v.useCallback(function(){var e=document.createElement("div");e.classList.add(lz.PORTAL),ga(e.classList,r),ga(e.classList,s.portalClassName),gl(e,i);var n=t.blueprintPortalClassName;return null!=n&&""!==n&&(console.error(hH),ga(e.classList,n)),e},[r,s.portalClassName,t.blueprintPortalClassName,i]);return(v.useEffect(function(){if(null!=u){var e=f();return u.appendChild(e),h(e),function(){gs(e,i),e.remove(),h(void 0)}}},[u,f,i]),v.useEffect(function(){null!=d&&(null==a||a())},[d,a]),v.useEffect(function(){if(null!=d)return ga(d.classList,r),function(){var e;return e=d.classList,void(null!=r&&""!==r&&e.remove.apply(e,r.split(" ")))}},[r,d]),v.useEffect(function(){if(null!=d)return gl(d,i),function(){return gs(d,i)}},[d,i]),"undefined"==typeof document||null==d)?null:m.createPortal(l,d)}function ga(e,t){null!=t&&""!==t&&e.add.apply(e,t.split(" "))}function gl(e,t){null==t||t.forEach(function(t){return e.addEventListener(t,gu)})}function gs(e,t){null==t||t.forEach(function(t){return e.removeEventListener(t,gu)})}function gu(e){e.stopPropagation()}go.displayName="".concat(fl,".Portal"),go.contextTypes={blueprintPortalClassName:function(e,t){if(null!=e[t]&&"string"!=typeof e[t])return Error(hU)}};var gc=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.isAutoFocusing=!1,n.state={hasEverOpened:n.props.isOpen},n.containerElement=v.createRef(),n.startFocusTrapElement=v.createRef(),n.endFocusTrapElement=v.createRef(),n.maybeRenderChild=function(e){if(hb(e)&&(e=e()),null==e)return null;var t=n.props.enforceFocus||n.props.autoFocus?0:void 0,r="object"==typeof e?v.cloneElement(e,{className:l(lF)(e.props.className,lz.OVERLAY_CONTENT),tabIndex:t}):v.createElement("span",{className:lz.OVERLAY_CONTENT,tabIndex:t},e),i=n.props,o=i.onOpening,a=i.onOpened,s=i.onClosing,u=i.transitionDuration,c=i.transitionName;return v.createElement(p9,{classNames:c,onEntering:o,onEntered:a,onExiting:s,onExited:n.handleTransitionExited,timeout:u,addEndListener:n.handleTransitionAddEnd},r)},n.handleStartFocusTrapElementFocus=function(e){var t,r;n.props.enforceFocus&&!n.isAutoFocusing&&null!=e.relatedTarget&&(null===(t=n.containerElement.current)||void 0===t?void 0:t.contains(e.relatedTarget))&&e.relatedTarget!==n.endFocusTrapElement.current&&(null===(r=n.endFocusTrapElement.current)||void 0===r||r.focus({preventScroll:!0}))},n.handleStartFocusTrapElementKeyDown=function(e){var t;if(n.props.enforceFocus&&e.shiftKey&&"Tab"===e.key){var r=n.getKeyboardFocusableElements().pop();null!=r?r.focus():null===(t=n.endFocusTrapElement.current)||void 0===t||t.focus({preventScroll:!0})}},n.handleEndFocusTrapElementFocus=function(e){var t,r,i;if(null!=e.relatedTarget&&(null===(t=n.containerElement.current)||void 0===t?void 0:t.contains(e.relatedTarget))&&e.relatedTarget!==n.startFocusTrapElement.current){var o=n.getKeyboardFocusableElements().shift();n.isAutoFocusing||null==o||o===e.relatedTarget?null===(r=n.startFocusTrapElement.current)||void 0===r||r.focus({preventScroll:!0}):o.focus()}else{var a=n.getKeyboardFocusableElements().pop();null!=a?a.focus():null===(i=n.startFocusTrapElement.current)||void 0===i||i.focus({preventScroll:!0})}},n.handleTransitionExited=function(e){var t,r;n.props.shouldReturnFocusOnClose&&n.lastActiveElementBeforeOpened instanceof HTMLElement&&n.lastActiveElementBeforeOpened.focus(),null===(r=(t=n.props).onClosed)||void 0===r||r.call(t,e)},n.handleBackdropMouseDown=function(e){var t,r=n.props,i=r.backdropProps,o=r.canOutsideClickClose,a=r.enforceFocus,l=r.onClose;o&&(null==l||l(e)),a&&n.bringFocusInsideOverlay(),null===(t=null==i?void 0:i.onMouseDown)||void 0===t||t.call(i,e)},n.handleDocumentClick=function(e){var r=n.props,i=r.canOutsideClickClose,o=r.isOpen,a=r.onClose,l=e.composed?e.composedPath()[0]:e.target,s=t.openStack.indexOf(n),u=t.openStack.slice(s).some(function(e){var t,n=e.containerElement;return(null===(t=n.current)||void 0===t?void 0:t.contains(l))&&!n.current.isSameNode(l)});o&&!u&&i&&(null==a||a(e))},n.handleDocumentFocus=function(e){var t=e.composed?e.composedPath()[0]:e.target;n.props.enforceFocus&&null!=n.containerElement.current&&t instanceof Node&&!n.containerElement.current.contains(t)&&(e.preventDefault(),e.stopImmediatePropagation(),n.bringFocusInsideOverlay())},n.handleKeyDown=function(e){var t=n.props,r=t.canEscapeKeyClose,i=t.onClose;"Escape"===e.key&&r&&(null==i||i(e),e.stopPropagation(),e.preventDefault())},n.handleTransitionAddEnd=function(){},n}return(0,lD.__extends)(t,e),t.getDerivedStateFromProps=function(e){var t=e.isOpen;return t?{hasEverOpened:t}:null},t.prototype.render=function(){if(this.props.lazy&&!this.state.hasEverOpened)return null;var e,t,n=this.props,r=n.autoFocus,i=n.children,o=n.className,a=n.enforceFocus,s=n.usePortal,u=n.isOpen,c=u&&null!==(t=v.Children.map(i,this.maybeRenderChild))&&void 0!==t?t:[],d=this.maybeRenderBackdrop();null!==d&&c.unshift(d),u&&(r||a)&&c.length>0&&(c.unshift(this.renderDummyElement("__start",{className:lz.OVERLAY_START_FOCUS_TRAP,onFocus:this.handleStartFocusTrapElementFocus,onKeyDown:this.handleStartFocusTrapElementKeyDown,ref:this.startFocusTrapElement})),a&&c.push(this.renderDummyElement("__end",{className:lz.OVERLAY_END_FOCUS_TRAP,onFocus:this.handleEndFocusTrapElementFocus,ref:this.endFocusTrapElement})));var h=l(lF)(lz.OVERLAY,((e={})[lz.OVERLAY_OPEN]=u,e[lz.OVERLAY_INLINE]=!s,e),o),f=v.createElement("div",{"aria-live":"polite",className:h,onKeyDown:this.handleKeyDown,ref:this.containerElement},v.createElement(gr,{appear:!0,component:null},c));return s?v.createElement(go,{className:this.props.portalClassName,container:this.props.portalContainer,stopPropagationEvents:this.props.portalStopPropagationEvents},f):f},t.prototype.componentDidMount=function(){this.props.isOpen&&this.overlayWillOpen()},t.prototype.componentDidUpdate=function(e){e.isOpen&&!this.props.isOpen?this.overlayWillClose():!e.isOpen&&this.props.isOpen&&this.overlayWillOpen()},t.prototype.componentWillUnmount=function(){this.overlayWillClose()},t.prototype.bringFocusInsideOverlay=function(){var e=this;return this.requestAnimationFrame(function(){var t,n=hf(e.containerElement.current);null!=e.containerElement.current&&null!=n&&e.props.isOpen&&!e.containerElement.current.contains(n)&&(null===(t=e.startFocusTrapElement.current)||void 0===t||t.focus({preventScroll:!0}),e.isAutoFocusing=!1)})},t.prototype.maybeRenderBackdrop=function(){var e=this.props,t=e.backdropClassName,n=e.backdropProps,r=e.hasBackdrop,i=e.isOpen,o=e.transitionDuration,a=e.transitionName;return r&&i?v.createElement(p9,{classNames:a,key:"__backdrop",timeout:o,addEndListener:this.handleTransitionAddEnd},v.createElement("div",(0,lD.__assign)({},n,{className:l(lF)(lz.OVERLAY_BACKDROP,t,null==n?void 0:n.className),onMouseDown:this.handleBackdropMouseDown}))):null},t.prototype.renderDummyElement=function(e,t){var n=this.props,r=n.transitionDuration,i=n.transitionName;return v.createElement(p9,{classNames:i,key:e,addEndListener:this.handleTransitionAddEnd,timeout:r,unmountOnExit:!0},v.createElement("div",(0,lD.__assign)({tabIndex:0},t)))},t.prototype.getKeyboardFocusableElements=function(){return(null!==this.containerElement.current?Array.from(this.containerElement.current.querySelectorAll('a[href]:not([tabindex="-1"]),button:not([disabled]):not([tabindex="-1"]),details:not([tabindex="-1"]),input:not([disabled]):not([tabindex="-1"]),select:not([disabled]):not([tabindex="-1"]),textarea:not([disabled]):not([tabindex="-1"]),[tabindex]:not([tabindex="-1"])')):[]).filter(function(e){return!e.classList.contains(lz.OVERLAY_START_FOCUS_TRAP)&&!e.classList.contains(lz.OVERLAY_END_FOCUS_TRAP)})},t.prototype.overlayWillClose=function(){document.removeEventListener("focus",this.handleDocumentFocus,!0),document.removeEventListener("mousedown",this.handleDocumentClick);var e=t.openStack,n=e.indexOf(this);if(-1!==n){if(e.splice(n,1),e.length>0){var r=t.getLastOpened();r.props.autoFocus&&r.props.enforceFocus&&(r.bringFocusInsideOverlay(),document.addEventListener("focus",r.handleDocumentFocus,!0))}0===e.filter(function(e){return e.props.usePortal&&e.props.hasBackdrop}).length&&document.body.classList.remove(lz.OVERLAY_OPEN)}},t.prototype.overlayWillOpen=function(){var e=t.getLastOpened,n=t.openStack;n.length>0&&document.removeEventListener("focus",e().handleDocumentFocus,!0),n.push(this),this.props.autoFocus&&(this.isAutoFocusing=!0,this.bringFocusInsideOverlay()),this.props.enforceFocus&&document.addEventListener("focus",this.handleDocumentFocus,!0),this.props.canOutsideClickClose&&!this.props.hasBackdrop&&document.addEventListener("mousedown",this.handleDocumentClick),this.props.hasBackdrop&&this.props.usePortal&&document.body.classList.add(lz.OVERLAY_OPEN),this.lastActiveElementBeforeOpened=hf(this.containerElement.current)},t.displayName="".concat(fl,".Overlay"),t.defaultProps={autoFocus:!0,backdropProps:{},canEscapeKeyClose:!0,canOutsideClickClose:!0,enforceFocus:!0,hasBackdrop:!0,isOpen:!1,lazy:!0,shouldReturnFocusOnClose:!0,transitionDuration:300,transitionName:lz.OVERLAY,usePortal:!0},t.openStack=[],t.getLastOpened=function(){return t.openStack[t.openStack.length-1]},t}(fO),lD=h("gztBd"),v=h("8NFma"),gd=function(e){function t(){var t,n=e.apply(this,arguments)||this;return n.targetRef=null!==(t=n.props.targetRef)&&void 0!==t?t:v.createRef(),n.prevElement=void 0,n}return(0,lD.__extends)(t,e),t.prototype.render=function(){var e=v.Children.only(this.props.children);return void 0!==this.props.targetRef?e:v.cloneElement(e,{ref:this.targetRef})},t.prototype.componentDidMount=function(){var e=this;this.observer=null!=globalThis.ResizeObserver?new ResizeObserver(function(t){var n,r;return null===(r=(n=e.props).onResize)||void 0===r?void 0:r.call(n,t)}):void 0,this.observeElement()},t.prototype.componentDidUpdate=function(e){this.observeElement(this.props.observeParents!==e.observeParents)},t.prototype.componentWillUnmount=function(){var e;null===(e=this.observer)||void 0===e||e.disconnect(),this.prevElement=void 0},t.prototype.observeElement=function(e){if(void 0===e&&(e=!1),void 0!==this.observer){if(!(this.targetRef.current instanceof Element)){this.observer.disconnect();return}if((this.targetRef.current!==this.prevElement||e)&&(this.observer.disconnect(),this.prevElement=this.targetRef.current,this.observer.observe(this.targetRef.current),this.props.observeParents))for(var t=this.targetRef.current.parentElement;null!=t;)this.observer.observe(t),t=t.parentElement}},t.displayName="".concat(fl,".ResizeSensor"),t}(fO),gh={enabled:!0,name:"matchReferenceWidth",phase:"beforeWrite",requires:["computeStyles"],fn:function(e){var t=e.state;t.styles.popper.width="".concat(t.rects.reference.width,"px")},effect:function(e){var t=e.state,n=t.elements.reference.getBoundingClientRect().width;t.elements.popper.style.width="".concat(n,"px")}},lD=h("gztBd"),v=h("8NFma");function gf(e){return e.split("-")[0]}function gp(e){return -1!==["left","right"].indexOf(e)}function gg(e){switch(e){case"top":return"bottom";case"left":return"right";case"bottom":return"top";default:return"left"}}function gm(e){switch(e.split("-")[1]){case"start":return"left";case"end":return"right";default:return"center"}}var gv=function(e){var t=e.arrowProps,n=t.ref,r=t.style,i=e.placement;return v.createElement("div",{"aria-hidden":!0,className:lz.POPOVER_ARROW,"data-popper-arrow":!0,ref:n,style:(0,lD.__assign)((0,lD.__assign)({},r),function(e){switch(gf(e)){case"top":return{bottom:-11};case"left":return{right:-11};case"bottom":return{top:-11};default:return{left:-11}}}(i))},v.createElement("svg",{viewBox:"0 0 ".concat(30," ").concat(30),style:{transform:"rotate(".concat(function(e){if(null==e)return 0;switch(gf(e)){case"top":return -90;case"left":return 180;case"bottom":return 90;default:return 0}}(i),"deg)")}},v.createElement("path",{className:lz.POPOVER_ARROW+"-border",d:"M8.11 6.302c1.015-.936 1.887-2.922 1.887-4.297v26c0-1.378-.868-3.357-1.888-4.297L.925 17.09c-1.237-1.14-1.233-3.034 0-4.17L8.11 6.302z"}),v.createElement("path",{className:lz.POPOVER_ARROW+"-fill",d:"M8.787 7.036c1.22-1.125 2.21-3.376 2.21-5.03V0v30-2.005c0-1.654-.983-3.9-2.21-5.03l-7.183-6.616c-.81-.746-.802-1.96 0-2.7l7.183-6.614z"})))};gv.displayName="".concat(fl,".PopoverArrow");var lD=h("gztBd"),gy=(0,lD.__assign)((0,lD.__assign)({},lV),{AUTO:"auto",AUTO_END:"auto-end",AUTO_START:"auto-start"}),gb={CLICK:"click",HOVER:"hover",HOVER_TARGET_ONLY:"hover-target"},gw=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={hasDarkParent:!1,isClosingViaEscapeKeypress:!1,isOpen:t.getIsOpen(t.props)},t.popoverElement=null,t.popoverRef=fa(t,"popoverElement",t.props.popoverRef),t.targetRef=v.createRef(),t.isMouseInTargetOrPopover=!1,t.lostFocusOnSamePage=!0,t.isControlled=function(){return void 0!==t.props.isOpen},t.isArrowEnabled=function(){var e,n;return!t.props.minimal&&(null===(n=null===(e=t.props.modifiers)||void 0===e?void 0:e.arrow)||void 0===n?void 0:n.enabled)!==!1},t.isHoverInteractionKind=function(){return t.props.interactionKind===gb.HOVER||t.props.interactionKind===gb.HOVER_TARGET_ONLY},t.reposition=function(){var e;return null===(e=t.popperScheduleUpdate)||void 0===e?void 0:e.call(t)},t.renderTarget=function(e){var n,r,i,o,a,s=e.ref,u=t.props,c=u.children,d=u.className,h=u.fill,f=u.openOnTargetFocus,p=u.renderTarget,g=t.state.isOpen,m=t.isControlled(),y=t.isHoverInteractionKind(),b=t.props.targetTagName;h&&(b="div");var w=fi(s,t.targetRef),x=y?{onBlur:t.handleTargetBlur,onContextMenu:t.handleTargetContextMenu,onFocus:t.handleTargetFocus,onMouseEnter:t.handleMouseEnter,onMouseLeave:t.handleMouseLeave}:{onClick:t.handleTargetClick,onKeyDown:t.handleKeyDown},_=f&&y?0:void 0,E=(0,lD.__assign)({"aria-expanded":g,"aria-haspopup":null!==(i=t.props.popupKind)&&void 0!==i?i:t.props.interactionKind===gb.HOVER_TARGET_ONLY?void 0:"true",className:l(lF)(d,lz.POPOVER_TARGET,((n={})[lz.POPOVER_OPEN]=g,n[lz.ACTIVE]=g&&!m&&!y,n)),ref:w},x),S=((r={})[lz.ACTIVE]=g&&!m&&!y,r[lz.FILL]=h,r);if(void 0!==p)a=p((0,lD.__assign)((0,lD.__assign)({},E),{className:l(lF)(E.className,S),isOpen:g,tabIndex:_}));else{var C=ht.ensureElement(v.Children.toArray(c)[0]);if(void 0===C)return null;var O=v.cloneElement(C,{className:l(lF)(C.props.className,S),disabled:!!(g&&ht.isElementOfType(C,gC))||C.props.disabled,tabIndex:null!==(o=C.props.tabIndex)&&void 0!==o?o:_});a=v.createElement(b,(0,lD.__assign)((0,lD.__assign)({},E),t.props.targetProps),O)}return v.createElement(gd,{targetRef:t.targetRef,onResize:t.reposition},a)},t.renderPopover=function(e){var n,r,i,o,a=t.props,s=a.autoFocus,u=a.enforceFocus,c=a.backdropProps,d=a.canEscapeKeyClose,h=a.hasBackdrop,f=a.interactionKind,p=a.usePortal,g=t.state,m=g.isClosingViaEscapeKeypress,y=g.isOpen,b=(n=e.placement,r=t.isArrowEnabled()?e.arrowProps.style:void 0,i=gf(n),void 0===r?gp(i)?"".concat(gg(i)," ").concat(gm(i)):"".concat(gm(i)," ").concat(gg(i)):gp(i)?"".concat(gg(i)," ").concat(parseInt(r.top,10)+15,"px"):"".concat(parseInt(r.left,10)+15,"px ").concat(gg(i)));t.popperScheduleUpdate=e.update;var w={onClick:t.handlePopoverClick,onKeyDown:function(e){return ht.isKeyboardClick(e)&&t.handlePopoverClick(e)}};f!==gb.HOVER&&(p||f!==gb.HOVER_TARGET_ONLY)||(w.onMouseEnter=t.handleMouseEnter,w.onMouseLeave=t.handleMouseLeave);var x=gf(e.placement),_=l(lF)(lz.POPOVER,((o={})[lz.DARK]=t.props.inheritDarkTheme&&t.state.hasDarkParent,o[lz.MINIMAL]=t.props.minimal,o[lz.POPOVER_CAPTURING_DISMISS]=t.props.captureDismiss,o[lz.POPOVER_MATCH_TARGET_WIDTH]=t.props.matchTargetWidth,o[lz.POPOVER_REFERENCE_HIDDEN]=!0===e.isReferenceHidden,o[lz.POPOVER_POPPER_ESCAPED]=!0===e.hasPopperEscaped,o),"".concat(lz.POPOVER_CONTENT_PLACEMENT,"-").concat(x),t.props.popoverClassName),E=!t.isHoverInteractionKind()&&void 0,S=!t.isHoverInteractionKind()&&(!!m||t.props.shouldReturnFocusOnClose);return v.createElement(gc,{autoFocus:null!=s?s:E,backdropClassName:lz.POPOVER_BACKDROP,backdropProps:c,canEscapeKeyClose:d,canOutsideClickClose:f===gb.CLICK,enforceFocus:u,hasBackdrop:h,isOpen:y,lazy:t.props.lazy,onClose:t.handleOverlayClose,onClosed:t.props.onClosed,onClosing:t.props.onClosing,onOpened:t.props.onOpened,onOpening:t.props.onOpening,transitionDuration:t.props.transitionDuration,transitionName:lz.POPOVER,usePortal:p,portalClassName:t.props.portalClassName,portalContainer:t.props.portalContainer,portalStopPropagationEvents:t.props.portalStopPropagationEvents,shouldReturnFocusOnClose:S},v.createElement("div",{className:lz.POPOVER_TRANSITION_CONTAINER,ref:e.ref,style:e.style},v.createElement(gd,{onResize:t.reposition},v.createElement("div",(0,lD.__assign)({className:_,style:{transformOrigin:b},ref:t.popoverRef},w),t.isArrowEnabled()&&v.createElement(gv,{arrowProps:e.arrowProps,placement:e.placement}),v.createElement("div",{className:lz.POPOVER_CONTENT},t.props.content)))))},t.handleTargetFocus=function(e){t.props.openOnTargetFocus&&t.isHoverInteractionKind()&&(null!=e.relatedTarget||t.lostFocusOnSamePage)&&t.handleMouseEnter(e)},t.handleTargetBlur=function(e){t.props.openOnTargetFocus&&t.isHoverInteractionKind()&&(null!=e.relatedTarget&&(e.relatedTarget===t.popoverElement||t.isElementInPopover(e.relatedTarget))||t.handleMouseLeave(e)),t.lostFocusOnSamePage=null!=e.relatedTarget},t.handleTargetContextMenu=function(e){e.defaultPrevented&&t.setOpenState(!1,e)},t.handleMouseEnter=function(e){t.isMouseInTargetOrPopover=!0,!t.props.usePortal&&t.isElementInPopover(e.target)&&t.props.interactionKind===gb.HOVER_TARGET_ONLY&&!t.props.openOnTargetFocus?t.handleMouseLeave(e):t.props.disabled||t.setOpenState(!0,e,t.props.hoverOpenDelay)},t.handleMouseLeave=function(e){t.isMouseInTargetOrPopover=!1,t.setTimeout(function(){t.isMouseInTargetOrPopover||t.setOpenState(!1,e,t.props.hoverCloseDelay)})},t.handlePopoverClick=function(e){var n,r,i,o=e.target,a=o.closest(".".concat(lz.POPOVER)),l=o.closest(".".concat(lz.POPOVER)),s=(null!=a?a:l)===t.getPopoverElement(),u=null!==(r=null!==(n=null==a?void 0:a.classList.contains(lz.POPOVER_CAPTURING_DISMISS))&&void 0!==n?n:null==l?void 0:l.classList.contains(lz.POPOVER_CAPTURING_DISMISS))&&void 0!==r&&r,c=o.closest(".".concat(lz.POPOVER_DISMISS,", .").concat(lz.POPOVER_DISMISS_OVERRIDE)),d=null!==(i=null==c?void 0:c.classList.contains(lz.POPOVER_DISMISS))&&void 0!==i&&i,h=null!=o.closest(":disabled, .".concat(lz.DISABLED));d&&!h&&(!u||s)&&t.setOpenState(!1,e)},t.handleOverlayClose=function(e){if(null!=t.targetRef.current&&void 0!==e){var n,r=null!==(n=e.nativeEvent)&&void 0!==n?n:e,i=r.composed?r.composedPath()[0]:r.target;(!ht.elementIsOrContains(t.targetRef.current,i)||e.nativeEvent instanceof KeyboardEvent)&&t.setOpenState(!1,e)}},t.handleKeyDown=function(e){ht.isKeyboardClick(e)&&t.handleTargetClick(e)},t.handleTargetClick=function(e){t.state.isOpen&&t.isSimulatedButtonClick(e)||t.props.disabled||t.isElementInPopover(e.target)||(null==t.props.isOpen?t.setState(function(e){return{isOpen:!e.isOpen}}):t.setOpenState(!t.props.isOpen,e))},t.isSimulatedButtonClick=function(e){return!e.isTrusted&&e.target.matches(".".concat(lz.BUTTON))},t}return(0,lD.__extends)(t,e),t.prototype.getPopoverElement=function(){var e;return null===(e=this.popoverElement)||void 0===e?void 0:e.querySelector(".".concat(lz.POPOVER))},t.prototype.getIsOpen=function(e){var t;return!e.disabled&&(null!==(t=e.isOpen)&&void 0!==t?t:e.defaultIsOpen)},t.prototype.render=function(){var e=this.props,t=e.disabled,n=e.content,r=e.placement,i=e.position,o=e.positioningStrategy,a=this.state.isOpen;return null==n||"string"==typeof n&&""===n.trim()?(t||!1===a||ht.isNodeEnv("production")||console.warn(hM),this.renderTarget({ref:gx})):v.createElement(fL,null,v.createElement(pG,null,this.renderTarget),v.createElement(pV,{innerRef:this.popoverRef,placement:null!=r?r:function(e){switch(e){case gy.TOP_LEFT:return"top-start";case gy.TOP:return"top";case gy.TOP_RIGHT:return"top-end";case gy.RIGHT_TOP:return"right-start";case gy.RIGHT:return"right";case gy.RIGHT_BOTTOM:return"right-end";case gy.BOTTOM_RIGHT:return"bottom-end";case gy.BOTTOM:return"bottom";case gy.BOTTOM_LEFT:return"bottom-start";case gy.LEFT_BOTTOM:return"left-end";case gy.LEFT:return"left";case gy.LEFT_TOP:return"left-start";case"auto":case"auto-start":case"auto-end":return e;default:return function(e){throw Error("Unexpected position: "+e)}(e)}}(void 0===i?"auto":i),strategy:o,modifiers:this.getPopperModifiers()},this.renderPopover))},t.prototype.componentDidMount=function(){this.updateDarkParent()},t.prototype.componentDidUpdate=function(t,n){e.prototype.componentDidUpdate.call(this,t,n),this.updateDarkParent();var r=this.getIsOpen(this.props);null!=this.props.isOpen&&r!==this.state.isOpen?(this.setOpenState(r),this.setState({isOpen:r})):this.props.disabled&&this.state.isOpen&&null==this.props.isOpen&&this.setOpenState(!1)},t.prototype.validateProps=function(e){null==e.isOpen&&null!=e.onInteraction&&console.warn(hz),e.hasBackdrop&&!e.usePortal&&console.warn(hD),e.hasBackdrop&&e.interactionKind!==gb.CLICK&&console.warn(hR),void 0!==e.placement&&void 0!==e.position&&console.warn(hF);var t=v.Children.count(e.children),n=void 0!==e.renderTarget,r=void 0!==e.targetProps;0!==t||n||console.warn(hj),t>1&&console.warn(hI),t>0&&n&&console.warn(hL),n&&r&&console.warn(hB)},t.prototype.getPopperModifiers=function(){var e,t,n,r,i=this.props,o=i.matchTargetWidth,a=i.modifiers,l=i.modifiersCustom,s=[(0,lD.__assign)({enabled:this.isArrowEnabled(),name:"arrow"},null==a?void 0:a.arrow),(0,lD.__assign)((0,lD.__assign)({name:"computeStyles"},null==a?void 0:a.computeStyles),{options:(0,lD.__assign)({adaptive:!0,gpuAcceleration:!1},null===(e=null==a?void 0:a.computeStyles)||void 0===e?void 0:e.options)}),(0,lD.__assign)((0,lD.__assign)({enabled:this.isArrowEnabled(),name:"offset"},null==a?void 0:a.offset),{options:(0,lD.__assign)({offset:[0,15]},null===(t=null==a?void 0:a.offset)||void 0===t?void 0:t.options)}),(0,lD.__assign)((0,lD.__assign)({name:"flip"},null==a?void 0:a.flip),{options:(0,lD.__assign)({boundary:this.props.boundary,rootBoundary:this.props.rootBoundary},null===(n=null==a?void 0:a.flip)||void 0===n?void 0:n.options)}),(0,lD.__assign)((0,lD.__assign)({name:"preventOverflow"},null==a?void 0:a.preventOverflow),{options:(0,lD.__assign)({boundary:this.props.boundary,rootBoundary:this.props.rootBoundary},null===(r=null==a?void 0:a.preventOverflow)||void 0===r?void 0:r.options)})];return o&&s.push(gh),void 0!==l&&s.push.apply(s,l),s},t.prototype.setOpenState=function(e,t,n){var r,i,o,a,l,s,u=this;null===(i=this.cancelOpenTimeout)||void 0===i||i.call(this),void 0!==n&&n>0?this.cancelOpenTimeout=this.setTimeout(function(){return u.setOpenState(e,t)},n):(null==this.props.isOpen?this.setState({isOpen:e}):null===(a=(o=this.props).onInteraction)||void 0===a||a.call(o,e,t),e||(null===(s=(l=this.props).onClose)||void 0===s||s.call(l,t),this.setState({isClosingViaEscapeKeypress:(r=null==t?void 0:t.nativeEvent)instanceof KeyboardEvent&&"Escape"===r.key})))},t.prototype.updateDarkParent=function(){var e;if(this.props.usePortal&&this.state.isOpen){var t=(null===(e=this.targetRef.current)||void 0===e?void 0:e.closest(".".concat(lz.DARK)))!=null;this.setState({hasDarkParent:t})}},t.prototype.isElementInPopover=function(e){var t,n;return null!==(n=null===(t=this.getPopoverElement())||void 0===t?void 0:t.contains(e))&&void 0!==n&&n},t.displayName="".concat(fl,".Popover"),t.defaultProps={boundary:"clippingParents",captureDismiss:!1,defaultIsOpen:!1,disabled:!1,fill:!1,hasBackdrop:!1,hoverCloseDelay:300,hoverOpenDelay:150,inheritDarkTheme:!0,interactionKind:gb.CLICK,matchTargetWidth:!1,minimal:!1,openOnTargetFocus:!0,positioningStrategy:"absolute",renderTarget:void 0,shouldReturnFocusOnClose:!1,targetTagName:"span",transitionDuration:300,usePortal:!0},t}(fO);function gx(){}var v=h("8NFma"),g_=v.createContext([{},function(){return null}]),gE=function(e,t){switch(t.type){case"FORCE_DISABLED_STATE":return{forceDisabled:!0};case"RESET_DISABLED_STATE":return{};default:return e}},gS=function(e){var t=e.children,n=e.forceDisable,r=v.useReducer(gE,{}),i=r[0],o=r[1];return v.useEffect(function(){n?o({type:"FORCE_DISABLED_STATE"}):o({type:"RESET_DISABLED_STATE"})},[n]),v.createElement(g_.Provider,{value:[i,o]},"function"==typeof t?t(i):t)},gC=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.popoverRef=v.createRef(),t.renderPopover=function(e){var n,r,i=t.props,o=i.children,a=i.compact,s=i.disabled,u=i.intent,c=i.popoverClassName,d=(0,lD.__rest)(i,["children","compact","disabled","intent","popoverClassName"]),h=l(lF)(dB,d7(u),c,((n={})[lK]=a,n));return v.createElement(gw,(0,lD.__assign)({modifiers:{arrow:{enabled:!t.props.minimal},offset:{options:{offset:[0,11]}}}},d,{autoFocus:!1,canEscapeKeyClose:!1,disabled:null!==(r=e.forceDisabled)&&void 0!==r?r:s,enforceFocus:!1,lazy:!0,popoverClassName:h,portalContainer:t.props.portalContainer,ref:t.popoverRef}),o)},t}return(0,lD.__extends)(t,e),t.prototype.render=function(){var e=this;return v.createElement(g_.Consumer,null,function(t){var n=t[0];return v.createElement(gS,(0,lD.__assign)({},n),e.renderPopover)})},t.prototype.reposition=function(){var e;null===(e=this.popoverRef.current)||void 0===e||e.reposition()},t.displayName="".concat(fl,".Tooltip"),t.defaultProps={compact:!1,hoverCloseDelay:0,hoverOpenDelay:100,interactionKind:"hover-target",minimal:!1,transitionDuration:100},t}(fO);let gO=P(({store:e,page:t,xPadding:n,yPadding:r})=>{let i=e.pages.length>1,o=e.pages.indexOf(t);return(0,p.jsxs)("div",{style:{position:"absolute",top:r-40+"px",right:n+"px"},children:[i&&(0,p.jsx)(gC,{content:lT("workspace.moveUp"),disabled:0===o,children:(0,p.jsx)(fA,{icon:"chevron-up",minimal:!0,disabled:0===o,onClick:()=>{t.setZIndex(o-1)}})}),i&&(0,p.jsx)(gC,{content:lT("workspace.moveDown"),disabled:o===e.pages.length-1,children:(0,p.jsx)(fA,{icon:"chevron-down",minimal:!0,disabled:o===e.pages.length-1,onClick:()=>{let n=e.pages.indexOf(t);t.setZIndex(n+1)}})}),(0,p.jsx)(gC,{content:lT("workspace.duplicatePage"),children:(0,p.jsx)(fA,{icon:"duplicate",minimal:!0,onClick:()=>{t.clone()}})}),i&&(0,p.jsx)(gC,{content:lT("workspace.removePage"),children:(0,p.jsx)(fA,{icon:"trash",minimal:!0,onClick:()=>{e.deletePages([t.id])}})}),(0,p.jsx)(gC,{content:lT("workspace.addPage"),children:(0,p.jsx)(fA,{icon:"insert",minimal:!0,onClick:()=>{let n=e.addPage({bleed:e.activePage?.bleed||0}),r=e.pages.indexOf(t);n.setZIndex(r+1)}})})]})});var v=h("8NFma"),lD=h("gztBd"),v=h("8NFma"),lD=h("gztBd"),v=h("8NFma"),gk=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,lD.__extends)(t,e),t.prototype.render=function(){var e=this.props,t=e.className,n=(0,lD.__rest)(e,["className"]);return v.createElement("div",(0,lD.__assign)({className:l(lF)(lz.NAVBAR_DIVIDER,t)},n))},t.displayName="".concat(fl,".NavbarDivider"),t}(fO),lD=h("gztBd"),v=h("8NFma"),gP=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,lD.__extends)(t,e),t.prototype.render=function(){var e=this.props,t=e.align,n=e.children,r=e.className,i=(0,lD.__rest)(e,["align","children","className"]),o=l(lF)(lz.NAVBAR_GROUP,lz.alignmentClass(t),r);return v.createElement("div",(0,lD.__assign)({className:o},i),n)},t.displayName="".concat(fl,".NavbarGroup"),t.defaultProps={align:lB.LEFT},t}(fO),lD=h("gztBd"),v=h("8NFma"),gT=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,lD.__extends)(t,e),t.prototype.render=function(){var e=this.props,t=e.children,n=e.className,r=(0,lD.__rest)(e,["children","className"]);return v.createElement("div",(0,lD.__assign)({className:l(lF)(lz.NAVBAR_HEADING,n)},r),t)},t.displayName="".concat(fl,".NavbarHeading"),t}(fO),gA=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,lD.__extends)(t,e),t.prototype.render=function(){var e,t=this.props,n=t.children,r=t.className,i=t.fixedToTop,o=(0,lD.__rest)(t,["children","className","fixedToTop"]),a=l(lF)(lz.NAVBAR,((e={})[lz.FIXED_TOP]=i,e),r);return v.createElement("div",(0,lD.__assign)({className:a},o),n)},t.displayName="".concat(fl,".Navbar"),t.Divider=gk,t.Group=gP,t.Heading=gT,t}(fO),v=h("8NFma"),gN={START:"start",END:"end"},lD=h("gztBd"),v=h("8NFma"),gj=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={chopSize:t.defaultChopSize(),lastChopSize:null,lastOverflowCount:0,overflow:[],repartitioning:!1,visible:t.props.items},t.spacer=null,t.resize=function(){t.repartition()},t}return(0,lD.__extends)(t,e),t.ofType=function(){return t},t.prototype.componentDidMount=function(){this.repartition()},t.prototype.shouldComponentUpdate=function(e,t){return this.props!==e||!(this.state!==t&&hi(this.state,t))},t.prototype.componentDidUpdate=function(e,t){e.observeParents!==this.props.observeParents&&console.warn(hN),(e.collapseFrom!==this.props.collapseFrom||e.items!==this.props.items||e.minVisibleItems!==this.props.minVisibleItems||e.overflowRenderer!==this.props.overflowRenderer||e.alwaysRenderOverflow!==this.props.alwaysRenderOverflow||e.visibleItemRenderer!==this.props.visibleItemRenderer)&&this.setState({chopSize:this.defaultChopSize(),lastChopSize:null,lastOverflowCount:0,overflow:[],repartitioning:!0,visible:this.props.items});var n,r,i=this.state,o=i.repartitioning,a=i.overflow,l=i.lastOverflowCount;!1===o&&!0===t.repartitioning?a.length!==l&&(null===(r=(n=this.props).onOverflow)||void 0===r||r.call(n,a.slice())):hi(t,this.state)||this.repartition()},t.prototype.render=function(){var e=this,t=this.props,n=t.className,r=t.collapseFrom,i=t.observeParents,o=t.style,a=t.tagName,s=t.visibleItemRenderer,u=this.maybeRenderOverflow(),c=v.createElement(void 0===a?"div":a,{className:l(lF)(lz.OVERFLOW_LIST,n),style:o},r===gN.START?u:null,this.state.visible.map(s),r===gN.END?u:null,v.createElement("div",{className:lz.OVERFLOW_LIST_SPACER,ref:function(t){return e.spacer=t}}));return v.createElement(gd,{onResize:this.resize,observeParents:i},c)},t.prototype.maybeRenderOverflow=function(){var e=this.state.overflow;return 0!==e.length||this.props.alwaysRenderOverflow?this.props.overflowRenderer(e.slice()):null},t.prototype.repartition=function(){var e,t=this;if(null!=this.spacer){var n=1===this.state.lastChopSize,r=null!==(e=this.props.minVisibleItems)&&void 0!==e?e:0,i=this.spacer.offsetWidth<.9&&this.state.visible.length>r,o=(this.spacer.offsetWidth>=1||this.state.visible.length<r)&&this.state.overflow.length>0&&!n;i||o?this.setState(function(e){if(t.props.collapseFrom===gN.END){var n,r,o=gI(e.visible,e.overflow,t.state.chopSize*(i?1:-1));n=o[0],r=o[1]}else{var o=gI(e.overflow,e.visible,t.state.chopSize*(i?-1:1));r=o[0],n=o[1]}return{chopSize:gR(e.chopSize),lastChopSize:e.chopSize,lastOverflowCount:t.isFirstPartitionCycle(e.chopSize)?e.overflow.length:e.lastOverflowCount,overflow:r,repartitioning:!0,visible:n}}):this.setState({chopSize:this.defaultChopSize(),lastChopSize:null,repartitioning:!1})}},t.prototype.defaultChopSize=function(){return gR(this.props.items.length)},t.prototype.isFirstPartitionCycle=function(e){return e===this.defaultChopSize()},t.displayName="".concat(fl,".OverflowList"),t.defaultProps={alwaysRenderOverflow:!1,collapseFrom:gN.START,minVisibleItems:0},t}(v.Component);function gR(e){return Math.ceil(e/2)}function gI(e,t,n){var r=e.concat(t),i=e.length-n;if(i<=0)return[[],r];if(i>=r.length)return[r,[]];var o=r.length-i;return[r.slice(0,-o),r.slice(-o)]}let gL=at("div",l(v).forwardRef)`
|
|
121
|
-
${
|
|
121
|
+
${iR(`
|
|
122
122
|
width: auto !important;
|
|
123
123
|
`)}
|
|
124
|
-
`,gM=({type:e,usedItems:t,components:n})=>{let r=[];return Object.keys(n).forEach(n=>{0!==n.toLowerCase().indexOf(e)||t.includes(n)||r.push(n)}),t.filter(e=>!!e).concat(r)},gD=({items:e,itemRender:t})=>{let[n,r]=l(v).useState(0),i=l(v).useRef(null),o=()=>{if(null===i.current)return;let e=i.current.parentElement,t=0;[...i.current.parentElement.children].forEach(e=>{e!==i.current&&(t+=e.offsetWidth)}),r(Math.max(20,e.offsetWidth-t-10))};return l(v).useLayoutEffect(()=>{o()}),l(v).useLayoutEffect(()=>{let e=i.current.parentElement.parentElement;if(window.ResizeObserver){let t=new ResizeObserver(o);return t.observe(e),()=>t.unobserve(e)}{let e=setInterval(o,100);return()=>clearInterval(e)}},[]),(0,p.jsx)(gL,{style:{width:n+"px"},ref:i,className:"bp5-navbar-group bp5-align-left",children:(0,p.jsx)(gj,{items:e,style:{width:"100%"},visibleItemRenderer:t,collapseFrom:gN.END,overflowRenderer:e=>(0,p.jsx)(gw,{content:(0,p.jsx)("div",{style:{padding:"10px",display:"flex"},children:e.map(t)}),position:lV.BOTTOM,children:(0,p.jsx)(fA,{icon:"more",minimal:!0,style:{marginLeft:"10px"}})})})})};h("8NFma");let gF=P(({store:e})=>{let t=e.selectedElements.length>0;return(0,p.jsx)(gC,{content:lT("toolbar.duplicateElements"),disabled:!t,position:"bottom",children:(0,p.jsx)(fA,{icon:"duplicate",minimal:!0,onClick:()=>{let t=[];e.selectedElements.forEach(e=>{let n=e.clone();"group"===e.type?n.children.forEach(e=>{e.set({x:e.x+50,y:e.y+50})}):n.set({x:e.x+50,y:e.y+50}),t.push(n.id)}),e.selectElements(t)},disabled:!t})})});h("8NFma");let gz=P(({store:e})=>{let t=e.selectedElements.filter(e=>e.removable);return(0,p.jsx)(gC,{content:lT("toolbar.removeElements"),disabled:!t.length,position:"bottom",children:(0,p.jsx)(fA,{icon:"trash",minimal:!0,onClick:()=>{e.deleteElements(t.map(e=>e.id))},disabled:!t.length,style:{marginLeft:"auto"}})})});h("8NFma");var lD=h("gztBd"),v=h("8NFma"),gB=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,lD.__extends)(t,e),t.prototype.render=function(){var e,t=this.props,n=t.className,r=t.children,i=t.large,o=t.small,a=t.ulRef,s=(0,lD.__rest)(t,["className","children","large","small","ulRef"]),u=l(lF)(n,lz.MENU,((e={})[lz.LARGE]=i,e[lz.SMALL]=o,e));return v.createElement("ul",(0,lD.__assign)({role:"menu"},s,{className:u,ref:a}),r)},t.displayName="".concat(fl,".Menu"),t}(fO),lD=h("gztBd"),v=h("8NFma"),lD=h("gztBd"),v=h("8NFma");function gU(e,t){return v.forwardRef(function(n,r){var i=n.className,o=n.children,a=(0,lD.__rest)(n,["className","children"]);return v.createElement(e,(0,lD.__assign)((0,lD.__assign)({},a),{className:l(lF)(t,i),ref:r}),o)})}gU("h1",sT),gU("h2",sT),gU("h3",sT),gU("h4",sT),gU("h5",sT);var gH=gU("h6",sT);gU("blockquote",sO),gU("code",sk),gU("pre",sP),gU("label",u3),gU("ol",sA),gU("ul",sA);var gV=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,lD.__extends)(t,e),t.prototype.render=function(){var e=this.props,t=e.className,n=e.title,r=e.titleId;return null==n?v.createElement("li",{className:l(lF)(lz.MENU_DIVIDER,t),role:"separator"}):v.createElement("li",{className:l(lF)(lz.MENU_HEADER,t),role:"separator"},v.createElement(gH,{id:r},n))},t.displayName="".concat(fl,".MenuDivider"),t}(v.Component),lD=h("gztBd"),v=h("8NFma"),lD=h("gztBd"),v=h("8NFma"),fb=h("leH9B"),gq=v.forwardRef(function(e,t){var n=e.size>=fb.IconSize.LARGE,r=n?fb.IconSize.LARGE:fb.IconSize.STANDARD,i="".concat(-1*r/.05/2);return v.createElement(fS,(0,lD.__assign)({iconName:"caret-right",ref:t},e),v.createElement("path",{d:n?"M280 200C280 206.2 277 211.4 272.6 215.2L272.8 215.4L152.8 315.4L152.6 315.2C149.2 318 144.8 320 140 320C129 320 120 311 120 300V100C120 89 129 80 140 80C144.8 80 149.2 82 152.6 84.8L152.8 84.6L272.8 184.6L272.6 184.8C277 188.6 280 193.8 280 200z":"M220 160C220 163 218.6 165.6 216.6 167.4L216.6 167.4L136.6 237.4L136.6 237.4C134.8 239 132.6 240 130 240C124.4 240 120 235.6 120 230V90C120 84.4 124.4 80 130 80C132.6 80 134.8 81 136.6 82.6C136.6 82.6 136.6 82.6 136.6 82.6L216.6 152.6L216.6 152.6C218.6 154.4 220 157 220 160z",fillRule:"evenodd","transform-origin":"center",transform:"scale(0.05, -0.05) translate(".concat(i,", ").concat(i,")")}))});gq.defaultProps={size:fb.IconSize.STANDARD},gq.displayName="Blueprint5.Icon.CaretRight";var lD=h("gztBd"),v=h("8NFma"),fb=h("leH9B"),gG=v.forwardRef(function(e,t){var n=e.size>=fb.IconSize.LARGE,r=n?fb.IconSize.LARGE:fb.IconSize.STANDARD,i="".concat(-1*r/.05/2);return v.createElement(fS,(0,lD.__assign)({iconName:"small-tick",ref:t},e),v.createElement("path",{d:n?"M300 300C294.4000000000001 300 289.4000000000001 297.8 285.8 294.2L160 168.2L114.2 214.2C110.6 217.8 105.6 220 100 220C89 220 80 211 80 200C80 194.4 82.2 189.4 85.8 185.8L145.8 125.8C149.4 122.2 154.4 120 160 120S170.6 122.2 174.2 125.8L314.2000000000001 265.8C317.8 269.4 320 274.4 320 280C320 291 311 300 300 300z":"M240 220C234.4 220 229.4 217.8 225.8 214.2L140 128.2L94.2 174.2C90.6 177.8 85.6 180 80 180C69 180 60 171 60 160C60 154.4 62.2 149.4 65.8 145.8L125.8 85.8C129.4 82.2 134.4 80 140 80S150.6 82.2 154.2 85.8L254.2 185.8C257.8 189.4 260 194.4 260 200C260 211 251 220 240 220z",fillRule:"evenodd","transform-origin":"center",transform:"scale(0.05, -0.05) translate(".concat(i,", ").concat(i,")")}))});gG.defaultProps={size:fb.IconSize.STANDARD},gG.displayName="Blueprint5.Icon.SmallTick";var gW=v.forwardRef(function(e,t){var n,r,i=e.active,o=e.className,a=e.children,s=e.disabled,u=e.icon,c=e.intent,d=e.labelClassName,h=e.labelElement,f=e.multiline,p=e.popoverProps,g=e.roleStructure,m=void 0===g?"menuitem":g,y=e.selected,b=e.shouldDismissPopover,w=e.submenuProps,x=e.text,_=e.textClassName,E=e.tagName,S=e.htmlTitle,C=(0,lD.__rest)(e,["active","className","children","disabled","icon","intent","labelClassName","labelElement","multiline","popoverProps","roleStructure","selected","shouldDismissPopover","submenuProps","text","textClassName","tagName","htmlTitle"]),O="listoption"===m?["option",void 0,!!y]:"menuitem"===m?["none","menuitem",void 0]:"none"===m?["none",void 0,void 0]:[void 0,void 0,void 0],k=O[0],P=O[1],T=O[2],A="listoption"===m,N=A&&y,j=null!=u,R=null!=a,I=lz.intentClass(c),L=l(lF)(lz.MENU_ITEM,I,((n={})[lz.ACTIVE]=i,n[lz.DISABLED]=s,n[lz.POPOVER_DISMISS]=b&&!s&&!R,n[lz.MENU_ITEM_IS_SELECTABLE]=A,n[lz.SELECTED]=N,n),o),M=null==e.label&&null==h?null:v.createElement("span",{className:l(lF)(lz.MENU_ITEM_LABEL,d)},e.label,h),D=v.createElement(void 0===E?"a":E,(0,lD.__assign)((0,lD.__assign)((0,lD.__assign)({onKeyDown:hy(["Enter"," "]),role:R?"none":P,tabIndex:R?-1:0},fu(C)),s?gK:{}),{className:L}),N?v.createElement(gG,{className:lz.MENU_ITEM_SELECTED_ICON}):void 0,j?v.createElement("span",{className:lz.MENU_ITEM_ICON},v.createElement(fC,{icon:u,"aria-hidden":!0,tabIndex:-1})):void 0,v.createElement(fT,{className:l(lF)(lz.FILL,_),ellipsize:!f,title:S},x),M,R?v.createElement(gq,{className:lz.MENU_SUBMENU_ICON,title:"Open sub menu"}):void 0),F=l(lF)(((r={})[lz.MENU_SUBMENU]=R,r));return v.createElement("li",{className:F,ref:t,role:k,"aria-selected":T},null==a?D:v.createElement(gw,(0,lD.__assign)({autoFocus:!1,captureDismiss:!1,disabled:s,enforceFocus:!1,hoverCloseDelay:0,interactionKind:"hover",modifiers:g$,targetProps:{role:P,tabIndex:0},placement:"right-start",usePortal:!1},p,{content:v.createElement(gB,(0,lD.__assign)({},w),a),minimal:!0,popoverClassName:l(lF)(lz.MENU_SUBMENU,null==p?void 0:p.popoverClassName)}),D))});gW.defaultProps={active:!1,disabled:!1,multiline:!1,popoverProps:{},selected:void 0,shouldDismissPopover:!0,text:""},gW.displayName="".concat(fl,".MenuItem");var g$={flip:{options:{rootBoundary:"viewport",padding:20},enabled:!0},offset:{options:{offset:[-5,0]},enabled:!0},preventOverflow:{options:{rootBoundary:"viewport",padding:20},enabled:!0}},gK={"aria-disabled":!0,href:void 0,onClick:void 0,onMouseDown:void 0,onMouseEnter:void 0,onMouseLeave:void 0,tabIndex:-1};let gY=P(({store:e})=>{let t=e.selectedElements.length>0,n=e.selectedElementsIds,r=e.selectedElements.every(e=>e.draggable),i=!e.selectedElements.some(e=>"group"===e.type)&&r;i&&e.selectedElements.length;let o=i&&e.selectedElements.length>1;return(0,p.jsx)(gw,{disabled:!t,content:(0,p.jsxs)(gB,{style:{width:"280px"},children:[(0,p.jsx)(gV,{title:lT("toolbar.layering")}),(0,p.jsxs)("div",{style:{display:"flex"},children:[(0,p.jsxs)("div",{style:{width:"50%"},children:[(0,p.jsx)(gW,{shouldDismissPopover:!1,icon:"chevron-up",text:lT("toolbar.up"),disabled:!e.activePage?.canMoveElementsUp(n),onClick:()=>{e.activePage?.moveElementsUp(n)}}),(0,p.jsx)(gW,{shouldDismissPopover:!1,icon:"double-chevron-up",text:lT("toolbar.toForward"),disabled:!e.activePage?.canMoveElementsTop(n),onClick:()=>{e.activePage?.moveElementsTop(n)}})]}),(0,p.jsxs)("div",{style:{width:"50%"},children:[(0,p.jsx)(gW,{shouldDismissPopover:!1,icon:"chevron-down",text:lT("toolbar.down"),disabled:!e.activePage?.canMoveElementsDown(n),onClick:()=>{e.activePage?.moveElementsDown(n)}}),(0,p.jsx)(gW,{shouldDismissPopover:!1,icon:"double-chevron-down",text:lT("toolbar.toBottom"),disabled:!e.activePage?.canMoveElementsBottom(n),onClick:()=>{e.activePage?.moveElementsBottom(n)}})]})]}),i&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(gV,{title:lT("toolbar.position")}),(0,p.jsxs)("div",{style:{display:"flex"},children:[(0,p.jsxs)("div",{style:{width:"50%"},children:[(0,p.jsx)(gW,{shouldDismissPopover:!1,icon:"alignment-left",text:lT("toolbar.alignLeft"),onClick:()=>{let t=e.activePage?.computedWidth;e.selectedElements.forEach(e=>{t=Math.min(t,ac(e).x)}),1===e.selectedElements.length&&(t=0),e.selectedElements.forEach(e=>{let n=ac(e);e.set({x:e.x-n.x+t})})}}),(0,p.jsx)(gW,{shouldDismissPopover:!1,icon:"alignment-vertical-center",text:lT("toolbar.alignCenter"),onClick:()=>{let t=e.activePage?.computedWidth,n=0;e.selectedElements.forEach(e=>{let r=ac(e);t=Math.min(t,r.x),n=Math.max(n,r.x+r.width)});let r=(n+t)/2;1===e.selectedElements.length&&(r=e.activePage?.computedWidth/2),e.selectedElements.forEach(e=>{let t=ac(e),n=e.x-t.x;e.set({x:r+n-t.width/2})})}}),(0,p.jsx)(gW,{shouldDismissPopover:!1,icon:"alignment-right",text:lT("toolbar.alignRight"),onClick:()=>{let t=0;e.selectedElements.forEach(e=>{let n=ac(e);t=Math.max(t,n.x+n.width)}),1===e.selectedElements.length&&(t=e.activePage?.computedWidth),e.selectedElements.forEach(e=>{let n=ac(e);e.set({x:e.x-n.x+t-n.width})})}})]}),(0,p.jsxs)("div",{style:{width:"50%"},children:[(0,p.jsx)(gW,{shouldDismissPopover:!1,icon:"alignment-top",text:lT("toolbar.alignTop"),onClick:()=>{let t=e.activePage?.computedHeight;e.selectedElements.forEach(e=>{t=Math.min(t,ac(e).y)}),1===e.selectedElements.length&&(t=0),e.selectedElements.forEach(e=>{let n=ac(e);e.set({y:e.y-n.y+t})})}}),(0,p.jsx)(gW,{shouldDismissPopover:!1,icon:"alignment-horizontal-center",text:lT("toolbar.alignMiddle"),onClick:()=>{let t=e.activePage?.computedHeight,n=0;e.selectedElements.forEach(e=>{let r=ac(e);t=Math.min(t,r.y),n=Math.max(n,r.y+r.height)});let r=(n+t)/2;1===e.selectedElements.length&&(r=e.activePage?.computedHeight/2),e.selectedElements.forEach(e=>{let t=ac(e),n=e.y-t.y;e.set({y:r+n-t.height/2})})}}),(0,p.jsx)(gW,{shouldDismissPopover:!1,icon:"alignment-bottom",text:lT("toolbar.alignBottom"),onClick:()=>{let t=0;e.selectedElements.forEach(e=>{let n=ac(e);t=Math.max(t,n.y+n.height)}),1===e.selectedElements.length&&(t=e.activePage?.computedHeight),e.selectedElements.forEach(e=>{let n=ac(e);e.set({y:e.y-n.y+t-n.height})})}})]})]})]}),o&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(gV,{title:lT("toolbar.spaceEvenly")}),(0,p.jsxs)("div",{style:{display:"flex"},children:[(0,p.jsxs)("div",{style:{width:"50%"},children:[" ",(0,p.jsx)(gW,{shouldDismissPopover:!1,icon:"vertical-distribution",text:lT("toolbar.verticalDistribution"),onClick:()=>{let t=e.activePage?.computedHeight,n=0,r=0;e.selectedElements.forEach(e=>{let i=ac(e);t=Math.min(t,i.y),n=Math.max(n,i.y+i.height),r+=i.height});let i=(n-t-r)/(e.selectedElements.length-1),o=e.selectedElements.slice().sort((e,t)=>{let n=ac(e),r=ac(t);return n.y-r.y}),a=0;o.forEach(e=>{let n=ac(e);e.set({y:e.y-n.y+t+a}),a+=n.height+i})}})]}),(0,p.jsx)("div",{style:{width:"50%"},children:(0,p.jsx)(gW,{shouldDismissPopover:!1,icon:"horizontal-distribution",text:lT("toolbar.horizontalDistribution"),onClick:()=>{let t=e.activePage?.computedWidth,n=0,r=0;e.selectedElements.forEach(e=>{let i=ac(e);t=Math.min(t,i.x),n=Math.max(n,i.x+i.width),r+=i.width});let i=(n-t-r)/(e.selectedElements.length-1),o=e.selectedElements.slice().sort((e,t)=>{let n=ac(e),r=ac(t);return n.x-r.x}),a=0;o.forEach(e=>{let n=ac(e);e.set({x:e.x-n.x+t+a}),a+=n.width+i})}})})]})]})]}),children:(0,p.jsx)(fA,{icon:"layers",minimal:!0,text:lT("toolbar.position"),disabled:!t})})});function gX(e,t){return e.classList.contains(t)?e:e.parentElement?gX(e.parentElement,t):null}let gZ=P(({store:e,page:t,components:n,stageRef:r})=>{let i=ad(e.selectedShapes),o=e.selectedShapes.every(e=>e.page===t),a=l(v).useRef(null),[s,u]=l(v).useState(!1),c=e.find(e=>"image"===e.type&&e._cropModeEnabled);l(v).useEffect(()=>{let e=()=>{u(!0)},t=()=>{u(!1)};r?.current?.on("dragstart",e),r?.current?.on("dragend",t);let n=r?.current?.findOne("Transformer");return n?.on("transformstart",e),n?.on("transformend",t),()=>{r?.current?.off("dragstart",e),r?.current?.off("dragend",t),n?.off("transformstart",e),n?.off("transformend",t)}},[]);let[d,h]=l(v).useState({fit:!0,needCalculate:!1,token:Math.random()});if(l(v).useEffect(()=>{0!==e.selectedElements.length&&h({fit:!0,needCalculate:!0,token:Math.random()})},[e.selectedElements,s]),l(v).useEffect(()=>{setTimeout(()=>{if(!a.current||!d.needCalculate)return;let e=gX(a.current,"polotno-workspace-container");if(!e)return;let t=e.getBoundingClientRect(),n=a.current.getBoundingClientRect();n.right,t.left;let r=n.top-t.top;n.left,t.left;let i=n.bottom-t.top;r<20&&d.fit&&h({fit:!1,needCalculate:!1,token:d.token}),i-t.height>-20&&!d.fit&&h({fit:!0,needCalculate:!1,token:d.token})},10)},[d.needCalculate,a.current,d.token]),l(v).useEffect(()=>{let t=gX(r.current.content,"polotno-workspace-inner"),n=()=>{e.selectedElements.length&&h({fit:!0,needCalculate:!0,token:Math.random()})};return t?.addEventListener("scroll",n),()=>{t?.removeEventListener("scroll",n)}},[]),0===e.selectedShapes.length||s||!o||e.activePage!==t||c)return null;let f=n?.Position||gY,g=n?.Duplicate||gF,m=n?.Remove||gz,y=gM({components:n,type:e.selectedElements[0].type,usedItems:[]}),b=r?.current?.findOne("Transformer")?.rotation()||0,w=30;return 5>Math.abs(b)&&d.fit&&(w=80),Math.abs(b)>160&&!d.fit&&(w=80),(0,p.jsx)(r3,{transformFunc:e=>{let t=i.x+i.width/2,n=d.fit?i.y*e.scaleY-w:i.y*e.scaleY+i.height*e.scaleY+w;return{...e,x:e.x+t*e.scaleX,y:e.y+n,scaleX:1,scaleY:1}},divProps:{style:{pointerEvents:"none"}},children:(0,p.jsx)("div",{ref:a,style:{pointerEvents:"none"},children:(0,p.jsx)(gA,{style:{padding:"2px",borderRadius:"5px",height:"34px",transform:"translate(-50%, -50%)",pointerEvents:"auto"},children:(0,p.jsxs)(gP,{style:{height:"30px"},children:[y.map(t=>{let r=n[t];return(0,p.jsx)(r,{elements:e.selectedElements,element:e.selectedElements[0],store:e},t)}),(0,p.jsx)(g,{store:e}),(0,p.jsx)(m,{store:e}),(0,p.jsx)(f,{store:e})]})})})})});var gQ=({components:e,...t})=>((e=e||{}).PageControls=e.PageControls??gO,e.Tooltip=e.Tooltip??gZ,(0,p.jsx)(lM,{...t,components:e})),v=h("8NFma"),lD=h("gztBd"),v=h("8NFma"),gJ=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,lD.__extends)(t,e),t.prototype.render=function(){var e=this.props,t=e.className,n=e.tagName,r=(0,lD.__rest)(e,["className","tagName"]),i=l(lF)(up,t);return v.createElement(void 0===n?"div":n,(0,lD.__assign)((0,lD.__assign)({},r),{className:i}))},t.displayName="".concat(fl,".Divider"),t}(fO);h("8NFma");let g0=P(({store:e})=>(0,p.jsxs)(gA.Group,{align:lB.LEFT,children:[(0,p.jsx)(fA,{icon:"undo",minimal:!0,onClick:()=>{e.history.undo()},disabled:!e.history.canUndo}),(0,p.jsx)(fA,{icon:"redo",minimal:!0,onClick:()=>{e.history.redo()},disabled:!e.history.canRedo})]}));var v=h("8NFma"),lD=h("gztBd"),v=h("8NFma"),g1=v.forwardRef(function(e,t){var n,r=e.alignText,i=e.className,o=e.fill,a=e.minimal,s=e.large,u=e.vertical,c=(0,lD.__rest)(e,["alignText","className","fill","minimal","large","vertical"]),d=l(lF)(lz.BUTTON_GROUP,((n={})[lz.FILL]=o,n[lz.LARGE]=s,n[lz.MINIMAL]=a,n[lz.VERTICAL]=u,n),lz.alignmentClass(r),i);return v.createElement("div",(0,lD.__assign)({},c,{ref:t,className:d}),e.children)});g1.displayName="".concat(fl,".ButtonGroup");var lD=h("gztBd"),v=h("8NFma"),lD=h("gztBd"),v=h("8NFma"),g2=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.state={hasPendingUpdate:!1,isComposing:!1,nextValue:n.props.value,value:n.props.value},n.cancelPendingCompositionEnd=null,n.handleCompositionStart=function(e){var t,r,i;null===(t=n.cancelPendingCompositionEnd)||void 0===t||t.call(n),n.setState({isComposing:!0}),null===(i=(r=n.props).onCompositionStart)||void 0===i||i.call(r,e)},n.handleCompositionEnd=function(e){var r,i;n.cancelPendingCompositionEnd=n.setTimeout(function(){return n.setState({isComposing:!1})},t.COMPOSITION_END_DELAY),null===(i=(r=n.props).onCompositionEnd)||void 0===i||i.call(r,e)},n.handleChange=function(e){var t,r,i=e.target.value;n.setState({nextValue:i}),null===(r=(t=n.props).onChange)||void 0===r||r.call(t,e)},n}return(0,lD.__extends)(t,e),t.getDerivedStateFromProps=function(e,t){return t.isComposing||void 0===e.value?null:t.nextValue!==t.value?e.value===t.nextValue?t.hasPendingUpdate?{value:e.value,hasPendingUpdate:!1}:{value:t.nextValue}:e.value===t.value?{hasPendingUpdate:!0}:{value:e.value,nextValue:e.value,hasPendingUpdate:!1}:{value:e.value,nextValue:e.value,hasPendingUpdate:!1}},t.prototype.render=function(){var e=this.state,t=e.isComposing,n=e.hasPendingUpdate,r=e.value,i=e.nextValue,o=this.props,a=o.inputRef,l=(0,lD.__rest)(o,["inputRef"]);return v.createElement("input",(0,lD.__assign)({},l,{ref:a,value:t||n?i:r,onCompositionStart:this.handleCompositionStart,onCompositionEnd:this.handleCompositionEnd,onChange:this.handleChange}))},t.displayName="".concat(fl,".AsyncControllableInput"),t.COMPOSITION_END_DELAY=10,t}(fO),g3=["onValueChange"],g5=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={},t.leftElement=null,t.rightElement=null,t.refHandlers={leftElement:function(e){return t.leftElement=e},rightElement:function(e){return t.rightElement=e}},t.handleInputChange=function(e){var n,r,i,o,a=e.target.value;null===(r=(n=t.props).onChange)||void 0===r||r.call(n,e),null===(o=(i=t.props).onValueChange)||void 0===o||o.call(i,a,e.target)},t}return(0,lD.__extends)(t,e),t.prototype.render=function(){var e,t=this.props,n=t.asyncControl,r=t.className,i=t.disabled,o=t.fill,a=t.inputClassName,s=t.inputRef,u=t.intent,c=t.large,d=t.readOnly,h=t.round,f=t.small,p=t.tagName,g=l(lF)(lz.INPUT_GROUP,lz.intentClass(u),((e={})[lz.DISABLED]=i,e[lz.READ_ONLY]=d,e[lz.FILL]=o,e[lz.LARGE]=c,e[lz.SMALL]=f,e[lz.ROUND]=h,e),r),m=(0,lD.__assign)((0,lD.__assign)({},this.props.style),{paddingLeft:this.state.leftElementWidth,paddingRight:this.state.rightElementWidth}),y=(0,lD.__assign)((0,lD.__assign)({type:"text"},fu(this.props,g3,!0)),{"aria-disabled":i,className:l(lF)(lz.INPUT,a),onChange:this.handleInputChange,style:m}),b=void 0!==n&&n?v.createElement(g2,(0,lD.__assign)({},y,{inputRef:s})):v.createElement("input",(0,lD.__assign)({},y,{ref:s}));return v.createElement(void 0===p?"div":p,{className:g},this.maybeRenderLeftElement(),b,this.maybeRenderRightElement())},t.prototype.componentDidMount=function(){this.updateInputWidth()},t.prototype.componentDidUpdate=function(e){var t=this.props,n=t.leftElement,r=t.rightElement;(e.leftElement!==n||e.rightElement!==r)&&this.updateInputWidth()},t.prototype.validateProps=function(e){null!=e.leftElement&&null!=e.leftIcon&&console.warn(hE)},t.prototype.maybeRenderLeftElement=function(){var e=this.props,t=e.leftElement,n=e.leftIcon;return null!=t?v.createElement("span",{className:lz.INPUT_LEFT_CONTAINER,ref:this.refHandlers.leftElement},t):null!=n?v.createElement(fC,{icon:n,"aria-hidden":!0,tabIndex:-1}):void 0},t.prototype.maybeRenderRightElement=function(){var e=this.props.rightElement;if(null!=e)return v.createElement("span",{className:lz.INPUT_ACTION,ref:this.refHandlers.rightElement},e)},t.prototype.updateInputWidth=function(){var e=this.state,t=e.leftElementWidth,n=e.rightElementWidth;if(null!=this.leftElement){var r=this.leftElement.clientWidth;(void 0===t||Math.abs(r-t)>2)&&this.setState({leftElementWidth:r})}else this.setState({leftElementWidth:void 0});if(null!=this.rightElement){var r=this.rightElement.clientWidth;(void 0===n||Math.abs(r-n)>2)&&this.setState({rightElementWidth:r})}else this.setState({rightElementWidth:void 0})},t.displayName="".concat(fl,".InputGroup"),t}(fO),lD=h("gztBd"),v=h("8NFma"),lD=h("gztBd"),v=h("8NFma"),fb=h("leH9B"),g6=v.forwardRef(function(e,t){var n=e.size>=fb.IconSize.LARGE,r=n?fb.IconSize.LARGE:fb.IconSize.STANDARD,i="".concat(-1*r/.05/2);return v.createElement(fS,(0,lD.__assign)({iconName:"chevron-down",ref:t},e),v.createElement("path",{d:n?"M320 280C314.4000000000001 280 309.4000000000001 277.8 305.8 274.2L200 168.2L94.2 274.2C90.6 277.8 85.6 280 80 280C69 280 60 271 60 260C60 254.4 62.2 249.4 65.8 245.8L185.8 125.8C189.4 122.2 194.4 120 200 120S210.6 122.2 214.2 125.8L334.2000000000001 245.8C337.8 249.4 340 254.4 340 260C340 271 331 280 320 280z":"M240 220C234.4 220 229.4 217.8 225.8 214.2L160 148.2L94.2 214.2C90.6 217.8 85.6 220 80 220C69 220 60 211 60 200C60 194.4 62.2 189.4 65.8 185.8L145.8 105.8C149.4 102.2 154.4 100 160 100S170.6 102.2 174.2 105.8L254.2 185.8C257.8 189.4 260 194.4 260 200C260 211 251 220 240 220z",fillRule:"evenodd","transform-origin":"center",transform:"scale(0.05, -0.05) translate(".concat(i,", ").concat(i,")")}))});g6.defaultProps={size:fb.IconSize.STANDARD},g6.displayName="Blueprint5.Icon.ChevronDown";var lD=h("gztBd"),v=h("8NFma"),fb=h("leH9B"),g4=v.forwardRef(function(e,t){var n=e.size>=fb.IconSize.LARGE,r=n?fb.IconSize.LARGE:fb.IconSize.STANDARD,i="".concat(-1*r/.05/2);return v.createElement(fS,(0,lD.__assign)({iconName:"chevron-up",ref:t},e),v.createElement("path",{d:n?"M334.2000000000001 154.2L214.2 274.2000000000001C210.6 277.8 205.6 280 200 280S189.4 277.8 185.8 274.2L65.8 154.2C62.2 150.6 60 145.6 60 140C60 129 69 120 80 120C85.6 120 90.6 122.2 94.2 125.8L200 231.8L305.8 126C309.4000000000001 122.2 314.4000000000001 120 320 120C331 120 340 129 340 140C340 145.6 337.8 150.6 334.2000000000001 154.2z":"M254.2 134.2L174.2 214.2C170.6 217.8 165.6 220 160 220S149.4 217.8 145.8 214.2L65.8 134.2C62.2 130.6 60 125.6 60 120C60 109 69 100 80 100C85.6 100 90.6 102.2 94.2 105.8L160 171.8L225.8 106C229.4 102.2 234.4 100 240 100C251 100 260 109 260 120C260 125.6 257.8 130.6 254.2 134.2z",fillRule:"evenodd","transform-origin":"center",transform:"scale(0.05, -0.05) translate(".concat(i,", ").concat(i,")")}))});g4.defaultProps={size:fb.IconSize.STANDARD},g4.displayName="Blueprint5.Icon.ChevronUp";var lD=h("gztBd"),v=h("8NFma"),g8=v.forwardRef(function(e,t){var n,r=e.children,i=e.className,o=e.fill,a=e.vertical,s=(0,lD.__rest)(e,["children","className","fill","vertical"]),u=l(lF)(lz.CONTROL_GROUP,((n={})[lz.FILL]=o,n[lz.VERTICAL]=a,n),i);return v.createElement("div",(0,lD.__assign)({},s,{ref:t,className:u}),r)});function g9(e){var t=1.9.toLocaleString(e),n=1..toLocaleString(e),r=9..toLocaleString(e),i=new RegExp("".concat(n,"(.+)").concat(r)).exec(t);return i&&i[1]||"."}function g7(e,t){return void 0===t&&(t="en-US"),mn(e.toLocaleString(t,{roundingPriority:"morePrecision"}),t)}function me(e,t){var n=""+e;if(parseFloat(n).toString()===e.toString())return e.toString();if(void 0!==t){var r=g9(t);return mn(n,t).split("").map(function(e){var n;return -1!==(n=[0,1,2,3,4,5,6,7,8,9].map(function(e){return e.toLocaleString(t)}).indexOf(e))?n:e}).join("").replace(r,".")}return e.toString()}function mt(e,t){if(void 0===t)return/^[Ee0-9\+\-\.]$/.test(e);var n=g9(t).replace(".","\\.");return RegExp("^[Ee"+[0,1,2,3,4,5,6,7,8,9].map(function(e){return e.toLocaleString(t)}).join("")+"\\+\\-"+n+"]$").test(e)}function mn(e,t){return e.replace(/[\uFF10-\uFF19]/g,function(e){return String.fromCharCode(e.charCodeAt(0)-65248)}).split("").filter(function(e){return mt(e,t)}).join("")}g8.displayName="".concat(fl,".ControlGroup"),(ks=kM||(kM={}))[ks.DOWN=-1]="DOWN",ks[ks.UP=1]="UP";var mr=["allowNumericCharactersOnly","buttonPosition","clampValueOnBlur","className","defaultValue","majorStepSize","minorStepSize","onButtonClick","onValueChange","selectAllOnFocus","selectAllOnIncrement","stepSize"],mi=function(e){function t(){var n,r,i=e.apply(this,arguments)||this;return i.numericInputId=ht.uniqueId("numericInput"),i.state={currentImeInputInvalid:!1,shouldSelectAfterUpdate:!1,stepMaxPrecision:t.getStepMaxPrecision(i.props),value:(void 0===(n=null!==(r=i.props.value)&&void 0!==r?r:i.props.defaultValue)&&(n=""),n.toString())},i.didPasteEventJustOccur=!1,i.delta=0,i.inputElement=null,i.inputRef=fa(i,"inputElement",i.props.inputRef),i.incrementButtonHandlers=i.getButtonEventHandlers(kM.UP),i.decrementButtonHandlers=i.getButtonEventHandlers(kM.DOWN),i.getCurrentValueAsNumber=function(){return Number(me(i.state.value,i.props.locale))},i.handleButtonClick=function(e,t){var n,r,o=i.updateDelta(t,e),a=i.incrementValue(o);null===(r=(n=i.props).onButtonClick)||void 0===r||r.call(n,Number(me(a,i.props.locale)),a)},i.stopContinuousChange=function(){i.delta=0,i.clearTimeouts(),clearInterval(i.intervalId),document.removeEventListener("mouseup",i.stopContinuousChange)},i.handleContinuousChange=function(){if(void 0!==i.props.min||void 0!==i.props.max){var e,t,n,r,o=null!==(e=i.props.min)&&void 0!==e?e:-1/0,a=null!==(t=i.props.max)&&void 0!==t?t:1/0,l=i.getCurrentValueAsNumber();if(l<=o||l>=a){i.stopContinuousChange();return}}var s=i.incrementValue(i.delta);null===(r=(n=i.props).onButtonClick)||void 0===r||r.call(n,Number(me(s,i.props.locale)),s)},i.handleInputFocus=function(e){var t,n;i.setState({shouldSelectAfterUpdate:i.props.selectAllOnFocus}),null===(n=(t=i.props).onFocus)||void 0===n||n.call(t,e)},i.handleInputBlur=function(e){var t,n;if(i.setState({shouldSelectAfterUpdate:!1}),i.props.clampValueOnBlur){var r=e.target.value;i.handleNextValue(i.roundAndClampValue(r))}null===(n=(t=i.props).onBlur)||void 0===n||n.call(t,e)},i.handleInputKeyDown=function(e){if(!i.props.disabled&&!i.props.readOnly){if("ArrowUp"===e.key?r=kM.UP:"ArrowDown"===e.key&&(r=kM.DOWN),void 0!==r){e.preventDefault();var t,n,r,o=i.updateDelta(r,e);i.incrementValue(o)}null===(n=(t=i.props).onKeyDown)||void 0===n||n.call(t,e)}},i.handleCompositionEnd=function(e){i.props.allowNumericCharactersOnly&&(i.handleNextValue(mn(e.data,i.props.locale)),i.setState({currentImeInputInvalid:!1}))},i.handleCompositionUpdate=function(e){if(i.props.allowNumericCharactersOnly){var t=e.data;0===mn(t,i.props.locale).length&&t.length>0?i.setState({currentImeInputInvalid:!0}):i.setState({currentImeInputInvalid:!1})}},i.handleInputKeyPress=function(e){var t,n,r;i.props.allowNumericCharactersOnly&&(r=i.props.locale,!(null==e.key||e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||mt(e.key,r)))&&e.preventDefault(),null===(n=(t=i.props).onKeyPress)||void 0===n||n.call(t,e)},i.handleInputPaste=function(e){var t,n;i.didPasteEventJustOccur=!0,null===(n=(t=i.props).onPaste)||void 0===n||n.call(t,e)},i.handleInputChange=function(e){var t=e;i.props.allowNumericCharactersOnly&&i.didPasteEventJustOccur&&(i.didPasteEventJustOccur=!1,t=mn(e,i.props.locale)),i.handleNextValue(t),i.setState({shouldSelectAfterUpdate:!1})},i}return(0,lD.__extends)(t,e),t.getDerivedStateFromProps=function(e,n){var r,i,o={prevMaxProp:e.max,prevMinProp:e.min},a=e.min!==n.prevMinProp,l=e.max!==n.prevMaxProp,s=null!==(i=null===(r=e.value)||void 0===r?void 0:r.toString())&&void 0!==i?i:n.value,u=t.getStepMaxPrecision(e),c=s!==t.VALUE_EMPTY?t.roundAndClampValue(s,u,e.min,e.max,0,e.locale):t.VALUE_EMPTY;return(a||l)&&c!==n.value?(0,lD.__assign)((0,lD.__assign)({},o),{stepMaxPrecision:u,value:c}):(0,lD.__assign)((0,lD.__assign)({},o),{stepMaxPrecision:u,value:s})},t.getStepMaxPrecision=function(e){return null!=e.minorStepSize?ht.countDecimalPlaces(e.minorStepSize):ht.countDecimalPlaces(e.stepSize)},t.roundAndClampValue=function(e,n,r,i,o,a){var l,s;return(void 0===o&&(o=0),l=me(e,a),null!=e&&l-parseFloat(l)+1>=0)?g7(h1(Math.round((Number(me(e,a))+o)*(s=Math.pow(10,n)))/s,null!=r?r:-1/0,null!=i?i:1/0),a):t.VALUE_EMPTY},t.prototype.render=function(){var e,t=this.props,n=t.buttonPosition,r=t.className,i=t.fill,o=t.large,a=t.small,s=l(lF)(lz.NUMERIC_INPUT,((e={})[lz.LARGE]=o,e[lz.SMALL]=a,e),r),u=this.renderButtons();return v.createElement(g8,{className:s,fill:i},n===lV.LEFT&&u,this.renderInput(),n===lV.RIGHT&&u)},t.prototype.componentDidUpdate=function(n,r){e.prototype.componentDidUpdate.call(this,n,r),n.inputRef!==this.props.inputRef&&(fr(n.inputRef,null),this.inputRef=fa(this,"inputElement",this.props.inputRef),fr(this.props.inputRef,this.inputElement)),this.state.shouldSelectAfterUpdate&&(null===(i=this.inputElement)||void 0===i||i.setSelectionRange(0,this.state.value.length));var i,o,a,l=this.props.min!==n.min,s=this.props.max!==n.max,u=this.props.locale!==n.locale,c=this.state.value!==r.value;if((l||s)&&c||u&&r.value!==t.VALUE_EMPTY){var d=me(u?r.value:this.state.value,n.locale),h=g7(+d,this.props.locale);null===(a=(o=this.props).onValueChange)||void 0===a||a.call(o,+d,h,this.inputElement)}},t.prototype.validateProps=function(e){var n=e.majorStepSize,r=e.max,i=e.min,o=e.minorStepSize,a=e.stepSize,l=e.value;if(null!=i&&null!=r&&i>r&&console.error(hS),a<=0&&console.error(hT),o&&o<=0&&console.error(hk),n&&n<=0&&console.error(hP),o&&o>a&&console.error(hC),n&&n<a&&console.error(hO),null!=l){var s=t.getStepMaxPrecision(e),u=t.roundAndClampValue(l.toString(),s,i,r,0,this.props.locale),c=u!==l.toString(),d=g7(Number(me(l,this.props.locale)),this.props.locale);c&&u!==d&&console.warn(hA)}},t.prototype.renderButtons=function(){var e=this.props,t=e.intent,n=e.max,r=e.min,i=e.locale,o=me(this.state.value,i),a=this.props.disabled||this.props.readOnly;return v.createElement(g1,{className:lz.FIXED,key:"button-group",vertical:!0},v.createElement(fA,(0,lD.__assign)({"aria-label":"increment","aria-controls":this.numericInputId,disabled:a||void 0!==n&&""!==o&&+o>=n,icon:v.createElement(g4,null),intent:t},this.incrementButtonHandlers)),v.createElement(fA,(0,lD.__assign)({"aria-label":"decrement","aria-controls":this.numericInputId,disabled:a||void 0!==r&&""!==o&&+o<=r,icon:v.createElement(g6,null),intent:t},this.decrementButtonHandlers)))},t.prototype.renderInput=function(){var e=fu(this.props,mr,!0),t=this.getCurrentValueAsNumber();return v.createElement(g5,(0,lD.__assign)({asyncControl:this.props.asyncControl,autoComplete:"off",id:this.numericInputId,role:this.props.allowNumericCharactersOnly?"spinbutton":void 0},e,{"aria-valuemax":this.props.max,"aria-valuemin":this.props.min,"aria-valuenow":t,intent:this.state.currentImeInputInvalid?lH.DANGER:this.props.intent,inputClassName:this.props.inputClassName,inputRef:this.inputRef,large:this.props.large,leftElement:this.props.leftElement,leftIcon:this.props.leftIcon,onFocus:this.handleInputFocus,onBlur:this.handleInputBlur,onCompositionEnd:this.handleCompositionEnd,onCompositionUpdate:this.handleCompositionUpdate,onKeyDown:this.handleInputKeyDown,onKeyPress:this.handleInputKeyPress,onPaste:this.handleInputPaste,onValueChange:this.handleInputChange,rightElement:this.props.rightElement,small:this.props.small,value:this.state.value}))},t.prototype.getButtonEventHandlers=function(e){var t=this;return{onKeyDown:function(n){!t.props.disabled&&ht.isKeyboardClick(n)&&t.handleButtonClick(n,e)},onMouseDown:function(n){t.props.disabled||(t.handleButtonClick(n,e),t.startContinuousChange())}}},t.prototype.startContinuousChange=function(){var e=this;document.addEventListener("mouseup",this.stopContinuousChange),this.setTimeout(function(){e.intervalId=window.setInterval(e.handleContinuousChange,t.CONTINUOUS_CHANGE_INTERVAL)},t.CONTINUOUS_CHANGE_DELAY)},t.prototype.handleNextValue=function(e){var t,n;null==this.props.value&&this.setState({value:e}),null===(n=(t=this.props).onValueChange)||void 0===n||n.call(t,Number(me(e,this.props.locale)),e,this.inputElement)},t.prototype.incrementValue=function(e){var n=this.state.value===t.VALUE_EMPTY?t.VALUE_ZERO:this.state.value,r=this.roundAndClampValue(n,e);return r!==this.state.value&&(this.handleNextValue(r),this.setState({shouldSelectAfterUpdate:this.props.selectAllOnIncrement})),r},t.prototype.getIncrementDelta=function(e,t,n){var r=this.props,i=r.majorStepSize,o=r.minorStepSize,a=r.stepSize;return t&&null!=i?e*i:n&&null!=o?e*o:e*a},t.prototype.roundAndClampValue=function(e,n){return void 0===n&&(n=0),t.roundAndClampValue(e,this.state.stepMaxPrecision,this.props.min,this.props.max,n,this.props.locale)},t.prototype.updateDelta=function(e,t){return this.delta=this.getIncrementDelta(e,t.shiftKey,t.altKey),this.delta},t.displayName="".concat(fl,".NumericInput"),t.VALUE_EMPTY="",t.VALUE_ZERO="0",t.defaultProps={allowNumericCharactersOnly:!0,buttonPosition:lV.RIGHT,clampValueOnBlur:!1,defaultValue:t.VALUE_EMPTY,large:!1,majorStepSize:10,minorStepSize:.1,selectAllOnFocus:!1,selectAllOnIncrement:!1,small:!1,stepSize:1},t.CONTINUOUS_CHANGE_DELAY=300,t.CONTINUOUS_CHANGE_INTERVAL=100,t}(fO),lD=h("gztBd"),v=h("8NFma"),lD=h("gztBd"),v=h("8NFma"),lD=h("gztBd"),v=h("8NFma");function mo(e){return"".concat((100*e).toFixed(2),"%")}function ma(e,t,n,r){for(var i=t<n?1:-1,o=t;o!==n+i;o+=i)e[o]=r}var ml=["max","min","stepSize","tickSize","value"],ms=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={isMoving:!1},t.handleElement=null,t.refHandlers={handle:function(e){return t.handleElement=e}},t.beginHandleMovement=function(e){document.addEventListener("mousemove",t.handleHandleMovement),document.addEventListener("mouseup",t.endHandleMovement),t.setState({isMoving:!0}),t.changeValue(t.clientToValue(t.mouseEventClientOffset(e)))},t.beginHandleTouchMovement=function(e){document.addEventListener("touchmove",t.handleHandleTouchMovement),document.addEventListener("touchend",t.endHandleTouchMovement),document.addEventListener("touchcancel",t.endHandleTouchMovement),t.setState({isMoving:!0}),t.changeValue(t.clientToValue(t.touchEventClientOffset(e)))},t.getStyleProperties=function(){if(null==t.handleElement)return{};var e=t.props,n=e.min,r=e.tickSizeRatio,i=e.value,o=e.vertical,a=t.getHandleMidpointAndOffset(t.handleElement,!0).handleMidpoint,l="calc(".concat(mo((i-(void 0===n?0:n))*r)," - ").concat(a,"px)");return o?{bottom:l}:{left:l}},t.endHandleMovement=function(e){t.handleMoveEndedAt(t.mouseEventClientOffset(e))},t.endHandleTouchMovement=function(e){t.handleMoveEndedAt(t.touchEventClientOffset(e))},t.handleMoveEndedAt=function(e){t.removeDocumentEventListeners(),t.setState({isMoving:!1});var n,r,i=t.changeValue(t.clientToValue(e));null===(r=(n=t.props).onRelease)||void 0===r||r.call(n,i)},t.handleHandleMovement=function(e){t.handleMovedTo(t.mouseEventClientOffset(e))},t.handleHandleTouchMovement=function(e){t.handleMovedTo(t.touchEventClientOffset(e))},t.handleMovedTo=function(e){t.state.isMoving&&!t.props.disabled&&t.changeValue(t.clientToValue(e))},t.handleKeyDown=function(e){var n=t.props,r=n.stepSize,i=n.value,o=e.key;"ArrowDown"===o||"ArrowLeft"===o?(t.changeValue(i-r),e.preventDefault()):("ArrowUp"===o||"ArrowRight"===o)&&(t.changeValue(i+r),e.preventDefault())},t.handleKeyUp=function(e){var n,r;ht.isArrowKey(e)&&(null===(r=(n=t.props).onRelease)||void 0===r||r.call(n,t.props.value))},t}return(0,lD.__extends)(t,e),t.prototype.componentDidMount=function(){this.forceUpdate()},t.prototype.render=function(){var e,t=this.props,n=t.className,r=t.disabled,i=t.label,o=t.min,a=t.max,s=t.value,u=t.vertical,c=t.htmlProps,d=this.state.isMoving;return v.createElement("span",(0,lD.__assign)({role:"slider",tabIndex:0},c,{className:l(lF)(lz.SLIDER_HANDLE,((e={})[lz.ACTIVE]=d,e),n),onKeyDown:r?void 0:this.handleKeyDown,onKeyUp:r?void 0:this.handleKeyUp,onMouseDown:r?void 0:this.beginHandleMovement,onTouchStart:r?void 0:this.beginHandleTouchMovement,ref:this.refHandlers.handle,style:this.getStyleProperties(),"aria-valuemin":o,"aria-valuemax":a,"aria-valuenow":s,"aria-disabled":r,"aria-orientation":u?"vertical":"horizontal"}),null==i?null:v.createElement("span",{className:lz.SLIDER_LABEL},i))},t.prototype.componentWillUnmount=function(){this.removeDocumentEventListeners()},t.prototype.clientToValue=function(e){var t=this.props,n=t.stepSize,r=t.tickSize,i=t.value,o=t.vertical;if(null==this.handleElement)return i;var a=(o?window.innerHeight-e:e)-this.getHandleElementCenterPixel(this.handleElement);return isNaN(a)?i:i+Math.round(a/(r*n))*n},t.prototype.mouseEventClientOffset=function(e){return this.props.vertical?e.clientY:e.clientX},t.prototype.touchEventClientOffset=function(e){var t=e.changedTouches[0];return this.props.vertical?t.clientY:t.clientX},t.prototype.validateProps=function(e){for(var t=0;t<ml.length;t++){var n=ml[t];if("number"!=typeof e[n])throw Error("[Blueprint] <Handle> requires number value for ".concat(n," prop"))}},t.prototype.changeValue=function(e,t){return void 0===t&&(t=this.props.onChange),isNaN(e=this.clamp(e))||this.props.value===e||null==t||t(e),e},t.prototype.clamp=function(e){return h1(e,this.props.min,this.props.max)},t.prototype.getHandleElementCenterPixel=function(e){var t=this.getHandleMidpointAndOffset(e),n=t.handleMidpoint;return t.handleOffset+n},t.prototype.getHandleMidpointAndOffset=function(e,t){if(void 0===t&&(t=!1),null==e)return{handleMidpoint:0,handleOffset:0};var n=this.props.vertical,r=e.getBoundingClientRect();r.width=e.offsetWidth,r.height=e.offsetHeight;var i=n?t?"width":"height":t?"height":"width",o=n?window.innerHeight-(r.top+r[i]):r.left;return{handleMidpoint:r[i]/2,handleOffset:o}},t.prototype.removeDocumentEventListeners=function(){document.removeEventListener("mousemove",this.handleHandleMovement),document.removeEventListener("mouseup",this.endHandleMovement),document.removeEventListener("touchmove",this.handleHandleTouchMovement),document.removeEventListener("touchend",this.endHandleTouchMovement),document.removeEventListener("touchcancel",this.endHandleTouchMovement)},t.displayName="".concat(fl,".SliderHandle"),t}(fO),mu={START:"start",END:"end"},mc={PUSH:"push",NONE:"none"},md=function(){return null};md.displayName="".concat(fl,".MultiSliderHandle");var mh=function(e){function t(){var t,n,r,i,o=null!==e&&e.apply(this,arguments)||this;return o.state={labelPrecision:(n=(t=o.props).labelPrecision,i=void 0===(r=t.stepSize)?mh.defaultSliderProps.stepSize:r,null==n?ht.countDecimalPlaces(i):n),tickSize:0,tickSizeRatio:0},o.handleElements=[],o.trackElement=null,o.addHandleRef=function(e){null!=e&&o.handleElements.push(e)},o.maybeHandleTrackClick=function(e){if(o.canHandleTrackEvent(e)){var t=o.nearestHandleForValue(o.handleElements,function(t){return t.mouseEventClientOffset(e)});t&&t.beginHandleMovement(e)}},o.maybeHandleTrackTouch=function(e){if(o.canHandleTrackEvent(e)){var t=o.nearestHandleForValue(o.handleElements,function(t){return t.touchEventClientOffset(e)});t&&t.beginHandleTouchMovement(e)}},o.canHandleTrackEvent=function(e){var t=e.target;return!o.props.disabled&&null==t.closest(".".concat(lz.SLIDER_HANDLE))},o.getHandlerForIndex=function(e,t){return function(n){null==t||t(o.getNewHandleValues(n,e))}},o.handleChange=function(e){var t,n,r=mf(o.props),i=r.map(function(e){return e.value});ht.arraysEqual(e,i)||(null===(n=(t=o.props).onChange)||void 0===n||n.call(t,e),r.forEach(function(t,n){var r;i[n]!==e[n]&&(null===(r=t.onChange)||void 0===r||r.call(t,e[n]))}))},o.handleRelease=function(e){var t,n,r=mf(o.props);null===(n=(t=o.props).onRelease)||void 0===n||n.call(t,e),r.forEach(function(t,n){var r;null===(r=t.onRelease)||void 0===r||r.call(t,e[n])})},o}return(0,lD.__extends)(t,e),t.getDerivedStateFromProps=function(e){return{labelPrecision:t.getLabelPrecision(e)}},t.getLabelPrecision=function(e){var t=e.labelPrecision,n=e.stepSize;return null==t?ht.countDecimalPlaces(n):t},t.prototype.getSnapshotBeforeUpdate=function(e){var t=mf(e);return mf(this.props).length!==t.length&&(this.handleElements=[]),null},t.prototype.render=function(){var e,t=this,n=l(lF)(lz.SLIDER,((e={})[lz.DISABLED]=this.props.disabled,e["".concat(lz.SLIDER,"-unlabeled")]=!1===this.props.labelRenderer,e[lz.VERTICAL]=this.props.vertical,e),this.props.className);return v.createElement("div",{className:n,onMouseDown:this.maybeHandleTrackClick,onTouchStart:this.maybeHandleTrackTouch},v.createElement("div",{className:lz.SLIDER_TRACK,ref:function(e){return t.trackElement=e}},this.renderTracks()),v.createElement("div",{className:lz.SLIDER_AXIS},this.renderLabels()),this.renderHandles())},t.prototype.componentDidMount=function(){this.updateTickSize()},t.prototype.componentDidUpdate=function(t,n){e.prototype.componentDidUpdate.call(this,t,n),this.updateTickSize()},t.prototype.validateProps=function(e){if(e.stepSize<=0)throw Error(hV);if(void 0!==e.labelStepSize&&void 0!==e.labelValues)throw Error(hK);if(void 0!==e.labelStepSize&&e.labelStepSize<=0)throw Error(hq);if(void 0!==e.min&&!isFinite(e.min))throw Error(hG);if(void 0!==e.max&&!isFinite(e.max))throw Error(hW);var n=!1;if(v.Children.forEach(e.children,function(e){e&&!ht.isElementOfType(e,t.Handle)&&(n=!0)}),n)throw Error(h$)},t.prototype.formatLabel=function(e,t){void 0===t&&(t=!1);var n=this.props.labelRenderer;return!1===n?void 0:ht.isFunction(n)?n(e,{isHandleTooltip:t}):e.toFixed(this.state.labelPrecision)},t.prototype.renderLabels=function(){var e=this;if(!1===this.props.labelRenderer)return null;var t=this.getLabelValues(),n=this.props,r=n.max,i=n.min;return t.map(function(t,n){var o=mo((t-i)/(r-i)),a=e.props.vertical?{bottom:o}:{left:o};return v.createElement("div",{className:lz.SLIDER_LABEL,key:n,style:a},e.formatLabel(t))})},t.prototype.renderTracks=function(){var e=mp(this.props);e.push({value:this.props.max});for(var t={value:this.props.min},n=[],r=0;r<e.length;r++){var i=e[r];n.push(this.renderTrackFill(r,t,i)),t=i}return n},t.prototype.renderTrackFill=function(e,t,n){var r=[this.getOffsetRatio(t.value),this.getOffsetRatio(n.value)].sort(function(e,t){return e-t}),i=r[0],o=r[1],a=mo(i),s=mo(1-o),u=this.props.vertical?{bottom:a,top:s,left:0}:{left:a,right:s,top:0},c=(0,lD.__assign)((0,lD.__assign)({},u),t.trackStyleAfter||n.trackStyleBefore||{}),d=l(lF)(lz.SLIDER_PROGRESS,lz.intentClass(this.getTrackIntent(t,n)));return v.createElement("div",{key:"track-".concat(e),className:d,style:c})},t.prototype.renderHandles=function(){var e=this,t=this.props,n=t.disabled,r=t.max,i=t.min,o=t.stepSize,a=t.vertical,s=mf(this.props);return 0===s.length?null:s.map(function(t,u){var c,d=t.value,h=t.type,f=t.className,p=t.htmlProps;return v.createElement(ms,{htmlProps:p,className:l(lF)(((c={})[lz.START]=h===mu.START,c[lz.END]=h===mu.END,c),f),disabled:n,key:"".concat(u,"-").concat(s.length),label:e.formatLabel(d,!0),max:r,min:i,onChange:e.getHandlerForIndex(u,e.handleChange),onRelease:e.getHandlerForIndex(u,e.handleRelease),ref:e.addHandleRef,stepSize:o,tickSize:e.state.tickSize,tickSizeRatio:e.state.tickSizeRatio,value:d,vertical:a})})},t.prototype.nearestHandleForValue=function(e,t){return function(e,t){if(0!==e.length){for(var n=e[0],r=t(n),i=1;i<e.length;i++){var o=e[i],a=t(o);a<r&&(n=o,r=a)}return n}}(e,function(e){var n=t(e);return Math.abs(e.clientToValue(n)-e.props.value)})},t.prototype.getNewHandleValues=function(e,t){var n=mf(this.props).map(function(e){return e.value}),r=n.slice();r[t]=e,r.sort(function(e,t){return e-t});var i=r.indexOf(e),o=this.findFirstLockedHandleIndex(t,i);if(-1===o)ma(r,t,i,e);else{var a=n[o];return ma(n,t,o,a),n}return r},t.prototype.findFirstLockedHandleIndex=function(e,t){for(var n=e<t?1:-1,r=mf(this.props),i=e+n;i!==t+n;i+=n)if(r[i].interactionKind!==mc.PUSH)return i;return -1},t.prototype.getLabelValues=function(){var e=this.props,t=e.labelStepSize,n=e.labelValues,r=e.min,i=e.max,o=[];if(void 0!==n)o=n.slice();else for(var a=r;a<i||ht.approxEqual(a,i);a+=null!=t?t:1)o.push(a);return o},t.prototype.getOffsetRatio=function(e){return ht.clamp((e-this.props.min)*this.state.tickSizeRatio,0,1)},t.prototype.getTrackIntent=function(e,t){return this.props.showTrackFill?void 0!==e.intentAfter?e.intentAfter:void 0!==t&&void 0!==t.intentBefore?t.intentBefore:this.props.defaultTrackIntent:lH.NONE},t.prototype.updateTickSize=function(){if(null!=this.trackElement){var e=this.props.vertical?this.trackElement.clientHeight:this.trackElement.clientWidth,t=1/(this.props.max-this.props.min);this.setState({tickSize:e*t,tickSizeRatio:t})}},t.defaultSliderProps={disabled:!1,max:10,min:0,showTrackFill:!0,stepSize:1,vertical:!1},t.defaultProps=(0,lD.__assign)((0,lD.__assign)({},t.defaultSliderProps),{defaultTrackIntent:lH.NONE}),t.displayName="".concat(fl,".MultiSlider"),t.Handle=md,t}(fO);function mf(e){return mp(e,function(e){return e.interactionKind!==mc.NONE})}function mp(e,t){var n=e.children;void 0===t&&(t=function(){return!0});var r=v.Children.map(n,function(e){return ht.isElementOfType(e,mh.Handle)&&t(e.props)?e.props:null}),i=null!=r?r:[];return(i=i.filter(function(e){return null!==e})).sort(function(e,t){return e.value-t.value}),i}var mg=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,lD.__extends)(t,e),t.prototype.render=function(){var e=this.props,t=e.initialValue,n=e.intent,r=e.value,i=e.onChange,o=e.onRelease,a=e.handleHtmlProps,l=(0,lD.__rest)(e,["initialValue","intent","value","onChange","onRelease","handleHtmlProps"]);return v.createElement(mh,(0,lD.__assign)({},l),v.createElement(mh.Handle,{value:r,intentAfter:r<t?n:void 0,intentBefore:r>=t?n:void 0,onChange:i,onRelease:o,htmlProps:a}),v.createElement(mh.Handle,{value:t,interactionKind:"none"}))},t.defaultProps=(0,lD.__assign)((0,lD.__assign)({},mh.defaultSliderProps),{initialValue:0,intent:lH.PRIMARY,value:0}),t.displayName="".concat(fl,".Slider"),t}(fO),mm=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function mv(e,t){if(e.length!==t.length)return!1;for(var n,r,i=0;i<e.length;i++)if(!((n=e[i])===(r=t[i])||mm(n)&&mm(r)))return!1;return!0}var my=function(e,t){void 0===t&&(t=mv);var n,r,i=[],o=!1;return function(){for(var a=[],l=0;l<arguments.length;l++)a[l]=arguments[l];return o&&n===this&&t(a,i)||(r=e.apply(this,a),o=!0,n=this,i=a),r}},v=h("8NFma"),mb="object"==typeof performance&&"function"==typeof performance.now?function(){return performance.now()}:function(){return Date.now()};function mw(e){cancelAnimationFrame(e.id)}var mx=-1;function m_(e){if(void 0===e&&(e=!1),-1===mx||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",document.body.appendChild(t),mx=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return mx}var mE=null;function mS(e){if(void 0===e&&(e=!1),null===mE||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",n.direction="rtl";var r=document.createElement("div"),i=r.style;i.width="100px",i.height="100px",t.appendChild(r),document.body.appendChild(t),t.scrollLeft>0?mE="positive-descending":(t.scrollLeft=1,mE=0===t.scrollLeft?"negative":"positive-ascending"),document.body.removeChild(t)}return mE}var mC=function(e,t,n,r){var i,o,a;if("column"===e?(i=r.columnMetadataMap,o=t.columnWidth,a=r.lastMeasuredColumnIndex):(i=r.rowMetadataMap,o=t.rowHeight,a=r.lastMeasuredRowIndex),n>a){var l=0;if(a>=0){var s=i[a];l=s.offset+s.size}for(var u=a+1;u<=n;u++){var c=o(u);i[u]={offset:l,size:c},l+=c}"column"===e?r.lastMeasuredColumnIndex=n:r.lastMeasuredRowIndex=n}return i[n]},mO=function(e,t){return e},mk=function(e,t){e.children,e.direction,e.height,e.layout,e.innerTagName,e.outerTagName,e.width,t.instance},mP=function(e,t,n){var r=e.itemSize,i=n.itemMetadataMap,o=n.lastMeasuredIndex;if(t>o){var a=0;if(o>=0){var l=i[o];a=l.offset+l.size}for(var s=o+1;s<=t;s++){var u=r(s);i[s]={offset:a,size:u},a+=u}n.lastMeasuredIndex=t}return i[t]},mT=(kd=(ku={getItemOffset:function(e,t){return t*e.itemSize},getItemSize:function(e,t){return e.itemSize},getEstimatedTotalSize:function(e){var t=e.itemCount;return e.itemSize*t},getOffsetForIndexAndAlignment:function(e,t,n,r,i,o){var a=e.direction,l=e.height,s=e.itemCount,u=e.itemSize,c=e.layout,d=e.width,h="horizontal"===a||"horizontal"===c?d:l,f=Math.max(0,s*u-h),p=Math.min(f,t*u),g=Math.max(0,t*u-h+u+o);switch("smart"===n&&(n=r>=g-h&&r<=p+h?"auto":"center"),n){case"start":return p;case"end":return g;case"center":var m=Math.round(g+(p-g)/2);if(m<Math.ceil(h/2))return 0;if(m>f+Math.floor(h/2))return f;return m;default:if(r>=g&&r<=p)return r;if(r<g)return g;return p}},getStartIndexForOffset:function(e,t){return Math.max(0,Math.min(e.itemCount-1,Math.floor(t/e.itemSize)))},getStopIndexForStartIndex:function(e,t,n){var r=e.direction,i=e.height,o=e.itemCount,a=e.itemSize,l=e.layout,s=e.width,u=Math.ceil((("horizontal"===r||"horizontal"===l?s:i)+n-t*a)/a);return Math.max(0,Math.min(o-1,t+u-1))},initInstanceProps:function(e){},shouldResetStyleCacheOnItemSizeChange:!0,validateProps:function(e){e.itemSize}}).getItemOffset,kh=ku.getEstimatedTotalSize,kf=ku.getItemSize,kp=ku.getOffsetForIndexAndAlignment,kg=ku.getStartIndexForOffset,km=ku.getStopIndexForStartIndex,kv=ku.initInstanceProps,ky=ku.shouldResetStyleCacheOnItemSizeChange,kb=ku.validateProps,(kc=function(e){function t(t){var n;return(n=e.call(this,t)||this)._instanceProps=kv(n.props,p7(n)),n._outerRef=void 0,n._resetIsScrollingTimeoutId=null,n.state={instance:p7(n),isScrolling:!1,scrollDirection:"forward",scrollOffset:"number"==typeof n.props.initialScrollOffset?n.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},n._callOnItemsRendered=void 0,n._callOnItemsRendered=my(function(e,t,r,i){return n.props.onItemsRendered({overscanStartIndex:e,overscanStopIndex:t,visibleStartIndex:r,visibleStopIndex:i})}),n._callOnScroll=void 0,n._callOnScroll=my(function(e,t,r){return n.props.onScroll({scrollDirection:e,scrollOffset:t,scrollUpdateWasRequested:r})}),n._getItemStyle=void 0,n._getItemStyle=function(e){var t,r=n.props,i=r.direction,o=r.itemSize,a=r.layout,l=n._getItemStyleCache(ky&&o,ky&&a,ky&&i);if(l.hasOwnProperty(e))t=l[e];else{var s=kd(n.props,e,n._instanceProps),u=kf(n.props,e,n._instanceProps),c="horizontal"===i||"horizontal"===a,d="rtl"===i,h=c?s:0;l[e]=t={position:"absolute",left:d?void 0:h,right:d?h:void 0,top:c?0:s,height:c?"100%":u,width:c?u:"100%"}}return t},n._getItemStyleCache=void 0,n._getItemStyleCache=my(function(e,t,n){return{}}),n._onScrollHorizontal=function(e){var t=e.currentTarget,r=t.clientWidth,i=t.scrollLeft,o=t.scrollWidth;n.setState(function(e){if(e.scrollOffset===i)return null;var t=n.props.direction,a=i;if("rtl"===t)switch(mS()){case"negative":a=-i;break;case"positive-descending":a=o-r-i}return a=Math.max(0,Math.min(a,o-r)),{isScrolling:!0,scrollDirection:e.scrollOffset<a?"forward":"backward",scrollOffset:a,scrollUpdateWasRequested:!1}},n._resetIsScrollingDebounced)},n._onScrollVertical=function(e){var t=e.currentTarget,r=t.clientHeight,i=t.scrollHeight,o=t.scrollTop;n.setState(function(e){if(e.scrollOffset===o)return null;var t=Math.max(0,Math.min(o,i-r));return{isScrolling:!0,scrollDirection:e.scrollOffset<t?"forward":"backward",scrollOffset:t,scrollUpdateWasRequested:!1}},n._resetIsScrollingDebounced)},n._outerRefSetter=function(e){var t=n.props.outerRef;n._outerRef=e,"function"==typeof t?t(e):null!=t&&"object"==typeof t&&t.hasOwnProperty("current")&&(t.current=e)},n._resetIsScrollingDebounced=function(){var e,t,r;null!==n._resetIsScrollingTimeoutId&&mw(n._resetIsScrollingTimeoutId),n._resetIsScrollingTimeoutId=(e=n._resetIsScrolling,t=mb(),r={id:requestAnimationFrame(function n(){mb()-t>=150?e.call(null):r.id=requestAnimationFrame(n)})})},n._resetIsScrolling=function(){n._resetIsScrollingTimeoutId=null,n.setState({isScrolling:!1},function(){n._getItemStyleCache(-1,null)})},n}pY(t,e),t.getDerivedStateFromProps=function(e,t){return mk(e,t),kb(e),null};var n=t.prototype;return n.scrollTo=function(e){e=Math.max(0,e),this.setState(function(t){return t.scrollOffset===e?null:{scrollDirection:t.scrollOffset<e?"forward":"backward",scrollOffset:e,scrollUpdateWasRequested:!0}},this._resetIsScrollingDebounced)},n.scrollToItem=function(e,t){void 0===t&&(t="auto");var n=this.props,r=n.itemCount,i=n.layout,o=this.state.scrollOffset;e=Math.max(0,Math.min(e,r-1));var a=0;if(this._outerRef){var l=this._outerRef;a="vertical"===i?l.scrollWidth>l.clientWidth?m_():0:l.scrollHeight>l.clientHeight?m_():0}this.scrollTo(kp(this.props,e,t,o,this._instanceProps,a))},n.componentDidMount=function(){var e=this.props,t=e.direction,n=e.initialScrollOffset,r=e.layout;if("number"==typeof n&&null!=this._outerRef){var i=this._outerRef;"horizontal"===t||"horizontal"===r?i.scrollLeft=n:i.scrollTop=n}this._callPropsCallbacks()},n.componentDidUpdate=function(){var e=this.props,t=e.direction,n=e.layout,r=this.state,i=r.scrollOffset;if(r.scrollUpdateWasRequested&&null!=this._outerRef){var o=this._outerRef;if("horizontal"===t||"horizontal"===n){if("rtl"===t)switch(mS()){case"negative":o.scrollLeft=-i;break;case"positive-ascending":o.scrollLeft=i;break;default:var a=o.clientWidth,l=o.scrollWidth;o.scrollLeft=l-a-i}else o.scrollLeft=i}else o.scrollTop=i}this._callPropsCallbacks()},n.componentWillUnmount=function(){null!==this._resetIsScrollingTimeoutId&&mw(this._resetIsScrollingTimeoutId)},n.render=function(){var e=this.props,t=e.children,n=e.className,r=e.direction,i=e.height,o=e.innerRef,a=e.innerElementType,l=e.innerTagName,s=e.itemCount,u=e.itemData,c=e.itemKey,d=void 0===c?mO:c,h=e.layout,f=e.outerElementType,p=e.outerTagName,g=e.style,m=e.useIsScrolling,y=e.width,b=this.state.isScrolling,w="horizontal"===r||"horizontal"===h,x=w?this._onScrollHorizontal:this._onScrollVertical,_=this._getRangeToRender(),E=_[0],S=_[1],C=[];if(s>0)for(var O=E;O<=S;O++)C.push((0,v.createElement)(t,{data:u,key:d(O,u),index:O,isScrolling:m?b:void 0,style:this._getItemStyle(O)}));var k=kh(this.props,this._instanceProps);return(0,v.createElement)(f||p||"div",{className:n,onScroll:x,ref:this._outerRefSetter,style:pW({position:"relative",height:i,width:y,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:r},g)},(0,v.createElement)(a||l||"div",{children:C,ref:o,style:{height:w?"100%":k,pointerEvents:b?"none":void 0,width:w?k:"100%"}}))},n._callPropsCallbacks=function(){if("function"==typeof this.props.onItemsRendered&&this.props.itemCount>0){var e=this._getRangeToRender(),t=e[0],n=e[1],r=e[2],i=e[3];this._callOnItemsRendered(t,n,r,i)}if("function"==typeof this.props.onScroll){var o=this.state,a=o.scrollDirection,l=o.scrollOffset,s=o.scrollUpdateWasRequested;this._callOnScroll(a,l,s)}},n._getRangeToRender=function(){var e=this.props,t=e.itemCount,n=e.overscanCount,r=this.state,i=r.isScrolling,o=r.scrollDirection,a=r.scrollOffset;if(0===t)return[0,0,0,0];var l=kg(this.props,a,this._instanceProps),s=km(this.props,l,a,this._instanceProps);return[Math.max(0,l-(i&&"backward"!==o?1:Math.max(1,n))),Math.max(0,Math.min(t-1,s+(i&&"forward"!==o?1:Math.max(1,n)))),l,s]},t}(v.PureComponent)).defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},kc),v=(h("8NFma"),h("8NFma"));let mA=()=>{},mN=mA(),mj=Object,mR=e=>e===mN,mI=e=>"function"==typeof e,mL=(e,t)=>({...e,...t}),mM=e=>mI(e.then),mD=new WeakMap,mF=0,mz=e=>{let t,n;let r=typeof e,i=e&&e.constructor,o=i==Date;if(mj(e)!==e||o||i==RegExp)t=o?e.toJSON():"symbol"==r?e.toString():"string"==r?JSON.stringify(e):""+e;else{if(t=mD.get(e))return t;if(t=++mF+"~",mD.set(e,t),i==Array){for(n=0,t="@";n<e.length;n++)t+=mz(e[n])+",";mD.set(e,t)}if(i==mj){t="#";let r=mj.keys(e).sort();for(;!mR(n=r.pop());)mR(e[n])||(t+=n+":"+mz(e[n])+",");mD.set(e,t)}}return t},mB=new WeakMap,mU={},mH={},mV="undefined",mq=typeof window!=mV,mG=typeof document!=mV,mW=()=>mq&&typeof window.requestAnimationFrame!=mV,m$=(e,t)=>{let n=mB.get(e);return[()=>!mR(t)&&e.get(t)||mU,r=>{if(!mR(t)){let i=e.get(t);t in mH||(mH[t]=i),n[5](t,mL(i,r),i||mU)}},n[6],()=>!mR(t)&&t in mH?mH[t]:!mR(t)&&e.get(t)||mU]},mK=!0,[mY,mX]=mq&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[mA,mA],mZ={initFocus:e=>(mG&&document.addEventListener("visibilitychange",e),mY("focus",e),()=>{mG&&document.removeEventListener("visibilitychange",e),mX("focus",e)}),initReconnect:e=>{let t=()=>{mK=!0,e()},n=()=>{mK=!1};return mY("online",t),mY("offline",n),()=>{mX("online",t),mX("offline",n)}}},mQ=!l(v).useId,mJ=!mq||"Deno"in window,m0=e=>mW()?window.requestAnimationFrame(e):setTimeout(e,1),m1=mJ?v.useEffect:v.useLayoutEffect,m2="undefined"!=typeof navigator&&navigator.connection,m3=!mJ&&m2&&(["slow-2g","2g"].includes(m2.effectiveType)||m2.saveData),m5=e=>{if(mI(e))try{e=e()}catch(t){e=""}let t=e;return[e="string"==typeof e?e:(Array.isArray(e)?e.length:e)?mz(e):"",t]},m6=0,m4=()=>++m6;var m8={ERROR_REVALIDATE_EVENT:3,FOCUS_EVENT:0,MUTATE_EVENT:2,RECONNECT_EVENT:1};async function m9(...e){let[t,n,r,i]=e,o=mL({populateCache:!0,throwOnError:!0},"boolean"==typeof i?{revalidate:i}:i||{}),a=o.populateCache,l=o.rollbackOnError,s=o.optimisticData,u=!1!==o.revalidate,c=e=>"function"==typeof l?l(e):!1!==l,d=o.throwOnError;if(mI(n)){let e=[];for(let r of t.keys())!/^\$(inf|sub)\$/.test(r)&&n(t.get(r)._k)&&e.push(r);return Promise.all(e.map(h))}return h(n);async function h(n){let i;let[o]=m5(n);if(!o)return;let[l,h]=m$(t,o),[f,p,g,m]=mB.get(t),v=()=>{let e=f[o];return u&&(delete g[o],delete m[o],e&&e[0])?e[0](2).then(()=>l().data):l().data};if(e.length<3)return v();let y=r,b=m4();p[o]=[b,0];let w=!mR(s),x=l(),_=x.data,E=x._c,S=mR(E)?_:E;if(w&&h({data:s=mI(s)?s(S,_):s,_c:S}),mI(y))try{y=y(S)}catch(e){i=e}if(y&&mM(y)){if(y=await y.catch(e=>{i=e}),b!==p[o][0]){if(i)throw i;return y}i&&w&&c(i)&&(a=!0,h({data:S,_c:mN}))}if(a&&!i&&(mI(a)?h({data:a(y,S),error:mN,_c:mN}):h({data:y,error:mN,_c:mN})),p[o][1]=m4(),Promise.resolve(v()).then(()=>{h({_c:mN})}),i){if(d)throw i;return}return y}}let m7=(e,t)=>{for(let n in e)e[n][0]&&e[n][0](t)},ve=(e,t)=>{if(!mB.has(e)){let n=mL(mZ,t),r={},i=m9.bind(mN,e),o=mA,a={},l=(e,t)=>{let n=a[e]||[];return a[e]=n,n.push(t),()=>n.splice(n.indexOf(t),1)},s=(t,n,r)=>{e.set(t,n);let i=a[t];if(i)for(let e of i)e(n,r)},u=()=>{if(!mB.has(e)&&(mB.set(e,[r,{},{},{},i,s,l]),!mJ)){let t=n.initFocus(setTimeout.bind(mN,m7.bind(mN,r,0))),i=n.initReconnect(setTimeout.bind(mN,m7.bind(mN,r,1)));o=()=>{t&&t(),i&&i(),mB.delete(e)}}};return u(),[e,i,u,o]}return[e,mB.get(e)[4]]},[vt,vn]=ve(new Map),vr=mL({onLoadingSlow:mA,onSuccess:mA,onError:mA,onErrorRetry:(e,t,n,r,i)=>{let o=n.errorRetryCount,a=i.retryCount,l=~~((Math.random()+.5)*(1<<(a<8?a:8)))*n.errorRetryInterval;(mR(o)||!(a>o))&&setTimeout(r,l,i)},onDiscarded:mA,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:m3?1e4:5e3,focusThrottleInterval:5e3,dedupingInterval:2e3,loadingTimeout:m3?5e3:3e3,compare:(e,t)=>mz(e)==mz(t),isPaused:()=>!1,cache:vt,mutate:vn,fallback:{}},{isOnline:()=>mK,isVisible:()=>{let e=mG&&document.visibilityState;return mR(e)||"hidden"!==e}}),vi=(e,t)=>{let n=mL(e,t);if(t){let{use:r,fallback:i}=e,{use:o,fallback:a}=t;r&&o&&(n.use=r.concat(o)),i&&a&&(n.fallback=mL(i,a))}return n},vo=(0,v.createContext)({}),va="$inf$",vl=mq&&window.__SWR_DEVTOOLS_USE__,vs=vl?window.__SWR_DEVTOOLS_USE__:[],vu=e=>mI(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(null===e[1]?e[2]:e[1])||{}],vc=()=>mL(vr,(0,v.useContext)(vo)),vd=vs.concat(e=>(t,n,r)=>{let i=n&&((...e)=>{let[r]=m5(t),[,,,i]=mB.get(vt);if(r.startsWith(va))return n(...e);let o=i[r];return mR(o)?n(...e):(delete i[r],o)});return e(t,i,r)}),vh=(e,t,n)=>{let r=t[e]||(t[e]=[]);return r.push(n),()=>{let e=r.indexOf(n);e>=0&&(r[e]=r[r.length-1],r.pop())}};vl&&(window.__SWR_DEVTOOLS_REACT__=l(v));let vf=l(v).use||(e=>{if("pending"===e.status)throw e;if("fulfilled"===e.status)return e.value;if("rejected"===e.status)throw e.reason;throw e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}),e}),vp={dedupe:!0};mj.defineProperty(e=>{let{value:t}=e,n=(0,v.useContext)(vo),r=mI(t),i=(0,v.useMemo)(()=>r?t(n):t,[r,n,t]),o=(0,v.useMemo)(()=>r?i:vi(n,i),[r,n,i]),a=i&&i.provider,l=(0,v.useRef)(mN);a&&!l.current&&(l.current=ve(a(o.cache||vt),i));let s=l.current;return s&&(o.cache=s[0],o.mutate=s[1]),m1(()=>{if(s)return s[2]&&s[2](),s[3]},[]),(0,v.createElement)(vo.Provider,mL(e,{value:o}))},"defaultValue",{value:vr});let vg=(kw=(e,t,n)=>{let{cache:r,compare:i,suspense:o,fallbackData:a,revalidateOnMount:l,revalidateIfStale:s,refreshInterval:u,refreshWhenHidden:c,refreshWhenOffline:d,keepPreviousData:h}=n,[f,p,g,m]=mB.get(r),[y,b]=m5(e),w=(0,v.useRef)(!1),x=(0,v.useRef)(!1),E=(0,v.useRef)(y),S=(0,v.useRef)(t),C=(0,v.useRef)(n),O=()=>C.current,k=()=>O().isVisible()&&O().isOnline(),[P,T,A,N]=m$(r,y),j=(0,v.useRef)({}).current,R=mR(a)?n.fallback[y]:a,I=(e,t)=>{for(let n in j)if("data"===n){if(!i(e[n],t[n])&&(!mR(e[n])||!i(V,t[n])))return!1}else if(t[n]!==e[n])return!1;return!0},L=(0,v.useMemo)(()=>{let e=!!y&&!!t&&(mR(l)?!O().isPaused()&&!o&&(!!mR(s)||s):l),n=t=>{let n=mL(t);return(delete n._k,e)?{isValidating:!0,isLoading:!0,...n}:n},r=P(),i=N(),a=n(r),u=r===i?a:n(i),c=a;return[()=>{let e=n(P());return I(e,c)?(c.data=e.data,c.isLoading=e.isLoading,c.isValidating=e.isValidating,c.error=e.error,c):(c=e,e)},()=>u]},[r,y]),M=(0,_.useSyncExternalStore)((0,v.useCallback)(e=>A(y,(t,n)=>{I(n,t)||e()}),[r,y]),L[0],L[1]),D=!w.current,F=f[y]&&f[y].length>0,z=M.data,B=mR(z)?R:z,U=M.error,H=(0,v.useRef)(B),V=h?mR(z)?H.current:z:B,q=(!F||!!mR(U))&&(D&&!mR(l)?l:!O().isPaused()&&(o?!mR(B)&&s:mR(B)||s)),G=!!(y&&t&&D&&q),W=mR(M.isValidating)?G:M.isValidating,$=mR(M.isLoading)?G:M.isLoading,K=(0,v.useCallback)(async e=>{let t,r;let o=S.current;if(!y||!o||x.current||O().isPaused())return!1;let a=!0,l=e||{},s=!g[y]||!l.dedupe,u=()=>mQ?!x.current&&y===E.current&&w.current:y===E.current,c={isValidating:!1,isLoading:!1},d=()=>{T(c)},h=()=>{let e=g[y];e&&e[1]===r&&delete g[y]},m={isValidating:!0};mR(P().data)&&(m.isLoading=!0);try{if(s&&(T(m),n.loadingTimeout&&mR(P().data)&&setTimeout(()=>{a&&u()&&O().onLoadingSlow(y,n)},n.loadingTimeout),g[y]=[o(b),m4()]),[t,r]=g[y],t=await t,s&&setTimeout(h,n.dedupingInterval),!g[y]||g[y][1]!==r)return s&&u()&&O().onDiscarded(y),!1;c.error=mN;let e=p[y];if(!mR(e)&&(r<=e[0]||r<=e[1]||0===e[1]))return d(),s&&u()&&O().onDiscarded(y),!1;let l=P().data;c.data=i(l,t)?l:t,s&&u()&&O().onSuccess(t,y,n)}catch(n){h();let e=O(),{shouldRetryOnError:t}=e;!e.isPaused()&&(c.error=n,s&&u()&&(e.onError(n,y,e),(!0===t||mI(t)&&t(n))&&k()&&e.onErrorRetry(n,y,e,e=>{let t=f[y];t&&t[0]&&t[0](m8.ERROR_REVALIDATE_EVENT,e)},{retryCount:(l.retryCount||0)+1,dedupe:!0})))}return a=!1,d(),!0},[y,r]),Y=(0,v.useCallback)((...e)=>m9(r,E.current,...e),[]);if(m1(()=>{S.current=t,C.current=n,mR(z)||(H.current=z)}),m1(()=>{if(!y)return;let e=K.bind(mN,vp),t=0,n=vh(y,f,(n,r={})=>{if(n==m8.FOCUS_EVENT){let n=Date.now();O().revalidateOnFocus&&n>t&&k()&&(t=n+O().focusThrottleInterval,e())}else if(n==m8.RECONNECT_EVENT)O().revalidateOnReconnect&&k()&&e();else if(n==m8.MUTATE_EVENT)return K();else if(n==m8.ERROR_REVALIDATE_EVENT)return K(r)});return x.current=!1,E.current=y,w.current=!0,T({_k:b}),q&&(mR(B)||mJ?e():m0(e)),()=>{x.current=!0,n()}},[y]),m1(()=>{let e;function t(){let t=mI(u)?u(P().data):u;t&&-1!==e&&(e=setTimeout(n,t))}function n(){!P().error&&(c||O().isVisible())&&(d||O().isOnline())?K(vp).then(t):t()}return t(),()=>{e&&(clearTimeout(e),e=-1)}},[u,c,d,y]),(0,v.useDebugValue)(V),o&&mR(B)&&y){if(!mQ&&mJ)throw Error("Fallback data is required when using suspense in SSR.");S.current=t,C.current=n,x.current=!1;let e=m[y];if(mR(e)||vf(Y(e)),mR(U)){let e=K(vp);mR(V)||(e.status="fulfilled",e.value=!0),vf(e)}else throw U}return{mutate:Y,get data(){return j.data=!0,V},get error(){return j.error=!0,U},get isValidating(){return j.isValidating=!0,W},get isLoading(){return j.isLoading=!0,$}}},function(...e){let t=vc(),[n,r,i]=vu(e),o=vi(t,i),a=kw,{use:l}=o,s=(l||[]).concat(vd);for(let e=s.length;e--;)a=s[e](a);return a(n,r||o.fetcher||null,o)});var v=(h("8NFma"),h("8NFma"));let vm=e=>m5(e?e(0,null):null)[0],vv=Promise.resolve(),vy=(kx=e=>(t,n,r)=>{let i;let o=(0,v.useRef)(!1),{cache:a,initialSize:l=1,revalidateAll:s=!1,persistSize:u=!1,revalidateFirstPage:c=!0,revalidateOnMount:d=!1,parallel:h=!1}=r,[,,,f]=mB.get(vt);try{(i=vm(t))&&(i=va+i)}catch(e){}let[p,g,m]=m$(a,i),y=(0,v.useCallback)(()=>mR(p()._l)?l:p()._l,[a,i,l]);(0,_.useSyncExternalStore)((0,v.useCallback)(e=>i?m(i,()=>{e()}):()=>{},[a,i]),y,y);let b=(0,v.useCallback)(()=>{let e=p()._l;return mR(e)?l:e},[i,l]),w=(0,v.useRef)(b());m1(()=>{if(!o.current){o.current=!0;return}i&&g({_l:u?w.current:b()})},[i,a]);let x=d&&!o.current,E=e(i,async e=>{let i=p()._i,o=[],l=b(),[u]=m$(a,e),d=u().data,m=[],v=null;for(let e=0;e<l;++e){let[l,u]=m5(t(e,h?null:v));if(!l)break;let[p,g]=m$(a,l),y=p().data,b=s||i||mR(y)||c&&!e&&!mR(d)||x||d&&!mR(d[e])&&!r.compare(d[e],y);if(n&&b){let t=async()=>{if(l in f){let e=f[l];delete f[l],y=await e}else y=await n(u);g({data:y,_k:u}),o[e]=y};h?m.push(t):await t()}else o[e]=y;h||(v=y)}return h&&await Promise.all(m.map(e=>e())),g({_i:mN}),o},r),S=(0,v.useCallback)(function(e,t){let n="boolean"==typeof t?{revalidate:t}:t||{},r=!1!==n.revalidate;return i?(r&&(mR(e)?g({_i:!0}):g({_i:!1})),arguments.length?E.mutate(e,{...n,revalidate:r}):E.mutate()):vv},[i,a]),C=(0,v.useCallback)(e=>{let n;if(!i)return vv;let[,r]=m$(a,i);if(mI(e)?n=e(b()):"number"==typeof e&&(n=e),"number"!=typeof n)return vv;r({_l:n}),w.current=n;let o=[],[l]=m$(a,i),s=null;for(let e=0;e<n;++e){let[n]=m5(t(e,s)),[r]=m$(a,n),i=n?r().data:mN;if(mR(i))return S(l().data);o.push(i),s=i}return S(o)},[i,a,S,b]);return{size:b(),setSize:C,mutate:S,get data(){return E.data},get error(){return E.error},get isValidating(){return E.isValidating},get isLoading(){return E.isLoading}}},(...e)=>{let[t,n,r]=vu(e),i=(r.use||[]).concat(kx);return vg(t,n,{...r,use:i})}),vb=e=>fetch(e).then(e=>e.json()),vw=({defaultQuery:e="",timeout:t=100,getAPI:n,getSize:r=e=>e.total_pages,fetchFunc:i=vb})=>{let o=l(v).useRef(e),a=l(v).useRef(),{data:s,error:u,size:c,setSize:d,mutate:h}=vy(e=>n({query:o.current,page:e+1}),i,{revalidateAll:!1}),f=!s&&!u||!!(c>0&&s&&void 0===s[c-1]),p=s?.[0]?.length===0||s&&s[0]&&r(s[0])===c;return{setQuery:l(v).useCallback(e=>{o.current=e,clearTimeout(a.current),a.current=setTimeout(()=>{h()},t)},[t]),isLoading:f,loadMore:()=>{p||d(c+1)},isReachingEnd:p,data:s?.filter(e=>e),items:s?.reduce((e,t)=>e.concat(t),[]),hasMore:!p,reset:h,error:u}};var v=h("8NFma"),lD=h("gztBd"),v=h("8NFma"),vx=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,lD.__extends)(t,e),t.prototype.render=function(){var e=this.props,t=e.className,n=e.panel;return v.createElement("div",{className:l(lF)(lz.TAB_PANEL,t),role:"tablist"},n)},t.defaultProps={disabled:!1},t.displayName="".concat(fl,".Tab"),t}(fO),lD=h("gztBd"),v=h("8NFma"),lD=h("gztBd"),v=h("8NFma"),lD=h("gztBd"),v=h("8NFma"),fb=h("leH9B"),lD=h("gztBd"),v=h("8NFma"),fb=h("leH9B"),v_=v.forwardRef(function(e,t){var n=e.size>=fb.IconSize.LARGE,r=n?fb.IconSize.LARGE:fb.IconSize.STANDARD,i="".concat(-1*r/.05/2);return v.createElement(fS,(0,lD.__assign)({iconName:"small-cross",ref:t},e),v.createElement("path",{d:n?"M228.2 200L294 265.8C297.8 269.4 300 274.4 300 280C300 291 291 300 280 300C274.4000000000001 300 269.4000000000001 297.8 265.8 294.2L200 228.2L134.2 294.2C130.6 297.8 125.6 300 120 300C109 300 100 291 100 280C100 274.4 102.2 269.4 105.8 265.8L171.8 200L106 134.2000000000001C102.2 130.6 100 125.6 100 120C100 109 109 100 120 100C125.6 100 130.6 102.2 134.2 105.8L200 171.8L265.8 106C269.4000000000001 102.2 274.4000000000001 100 280 100C291 100 300 109 300 120C300 125.6 297.8 130.6 294.2000000000001 134.2000000000001L228.2 200z":"M188.2 160L234 205.8C237.8 209.4 240 214.4 240 220C240 231 231 240 220 240C214.4 240 209.4 237.8 205.8 234.2L160 188.2L114.2 234.2C110.6 237.8 105.6 240 100 240C89 240 80 231 80 220C80 214.4 82.2 209.4 85.8 205.8L131.8 160L86 114.2C82.2 110.6 80 105.6 80 100C80 89 89 80 100 80C105.6 80 110.6 82.2 114.2 85.8L160 131.8L205.8 86C209.4 82.2 214.4 80 220 80C231 80 240 89 240 100C240 105.6 237.8 110.6 234.2 114.2L188.2 160z",fillRule:"evenodd","transform-origin":"center",transform:"scale(0.05, -0.05) translate(".concat(i,", ").concat(i,")")}))});v_.defaultProps={size:fb.IconSize.STANDARD},v_.displayName="Blueprint5.Icon.SmallCross";var vE=v.forwardRef(function(e,t){var n,r=e.active,i=e.children,o=e.className,a=e.fill,s=e.icon,u=e.intent,c=e.interactive,d=e.large,h=e.minimal,f=e.multiline,p=e.onRemove,g=e.rightIcon,m=e.round,y=e.tabIndex,b=void 0===y?0:y,w=e.htmlTitle,x=(0,lD.__rest)(e,["active","children","className","fill","icon","intent","interactive","large","minimal","multiline","onRemove","rightIcon","round","tabIndex","htmlTitle"]),_=ht.isFunction(p),E=l(lF)(lz.TAG,lz.intentClass(u),((n={})[lz.ACTIVE]=r,n[lz.FILL]=a,n[lz.INTERACTIVE]=c,n[lz.LARGE]=d,n[lz.MINIMAL]=h,n[lz.ROUND]=m,n),o),S=d||E.indexOf(lz.LARGE)>=0,C=_?v.createElement("button",{"aria-label":"Remove tag",type:"button",className:lz.TAG_REMOVE,onClick:function(t){var n;null===(n=e.onRemove)||void 0===n||n.call(e,t,e)},tabIndex:b},v.createElement(v_,{size:S?fb.IconSize.LARGE:fb.IconSize.STANDARD})):null;return v.createElement("span",(0,lD.__assign)({},x,{className:E,tabIndex:c?b:void 0,ref:t}),v.createElement(fC,{icon:s}),!h4(i)&&v.createElement(fT,{className:lz.FILL,ellipsize:!f,tagName:"span",title:w},i),v.createElement(fC,{icon:g}),C)});vE.displayName="".concat(fl,".Tag");var vS=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleClick=function(e){return t.props.onClick(t.props.id,e)},t}return(0,lD.__extends)(t,e),t.prototype.render=function(){var e=this.props,t=e.className,n=e.children,r=e.disabled,i=e.id,o=e.parentId,a=e.selected,s=e.title,u=e.icon,c=e.tagContent,d=e.tagProps,h=(0,lD.__rest)(e,["className","children","disabled","id","parentId","selected","title","icon","tagContent","tagProps"]),f=a?lH.PRIMARY:lH.NONE;return v.createElement("div",(0,lD.__assign)({},fu(h),{"aria-controls":vC(o,i),"aria-disabled":r,"aria-expanded":a,"aria-selected":a,className:l(lF)(lz.TAB,t),"data-tab-id":i,id:vO(o,i),onClick:r?void 0:this.handleClick,role:"tab",tabIndex:r?void 0:a?0:-1}),null!=u&&v.createElement(fC,{icon:u,intent:f,className:lz.TAB_ICON}),s,n,null!=c&&v.createElement(vE,(0,lD.__assign)({minimal:!0,intent:f},d,{className:l(lF)(lz.TAB_TAG,null==d?void 0:d.className)}),c))},t.displayName="".concat(fl,".TabTitle"),t}(fO);function vC(e,t){return"".concat(lz.TAB_PANEL,"_").concat(e,"_").concat(t)}function vO(e,t){return"".concat(lz.TAB,"-title_").concat(e,"_").concat(t)}var vk=function(){return v.createElement("div",{className:lz.FLEX_EXPANDER})},vP=".".concat(lz.TAB),vT=function(e){function t(t){var n=e.call(this,t)||this;n.tablistElement=null,n.refHandlers={tablist:function(e){return n.tablistElement=e}},n.handleKeyDown=function(e){var t,r=null===(t=ht.getActiveElement(n.tablistElement))||void 0===t?void 0:t.closest(vP);if(null!=r){var i=n.getTabElements().filter(function(e){return"false"===e.getAttribute("aria-disabled")}),o=i.indexOf(r),a=n.getKeyCodeDirection(e);if(o>=0&&void 0!==a){e.preventDefault();var l=i.length;i[(o+a+l)%l].focus()}}},n.handleKeyPress=function(e){var t=e.target.closest(vP);null!=t&&ht.isKeyboardClick(e)&&(e.preventDefault(),t.click())},n.handleTabClick=function(e,t){var r,i;null===(i=(r=n.props).onChange)||void 0===i||i.call(r,e,n.state.selectedTabId,t),void 0===n.props.selectedTabId&&n.setState({selectedTabId:e})},n.renderTabPanel=function(e){var t=e.props,r=t.className,i=t.panel,o=t.id,a=t.panelClassName;if(void 0!==i)return v.createElement("div",{"aria-labelledby":vO(n.props.id,o),"aria-hidden":o!==n.state.selectedTabId,className:l(lF)(lz.TAB_PANEL,r,a),id:vC(n.props.id,o),key:o,role:"tabpanel"},i)},n.renderTabTitle=function(e){if(vA(e)){var t=e.props.id;return v.createElement(vS,(0,lD.__assign)({},e.props,{parentId:n.props.id,onClick:n.handleTabClick,selected:t===n.state.selectedTabId}))}return e};var r=n.getInitialSelectedTabId();return n.state={selectedTabId:r},n}return(0,lD.__extends)(t,e),t.getDerivedStateFromProps=function(e){var t=e.selectedTabId;return void 0!==t?{selectedTabId:t}:null},t.prototype.render=function(){var e,t,n=this.state,r=n.indicatorWrapperStyle,i=n.selectedTabId,o=v.Children.map(this.props.children,this.renderTabTitle),a=this.getTabChildren().filter(this.props.renderActiveTabPanelOnly?function(e){return e.props.id===i}:function(){return!0}).map(this.renderTabPanel),s=this.props.animate?v.createElement("div",{className:lz.TAB_INDICATOR_WRAPPER,style:r},v.createElement("div",{className:lz.TAB_INDICATOR})):null,u=l(lF)(lz.TABS,this.props.className,((e={})[lz.VERTICAL]=this.props.vertical,e[lz.FILL]=this.props.fill,e)),c=l(lF)(lz.TAB_LIST,((t={})[lz.LARGE]=this.props.large,t));return v.createElement("div",{className:u},v.createElement("div",{className:c,onKeyDown:this.handleKeyDown,onKeyPress:this.handleKeyPress,ref:this.refHandlers.tablist,role:"tablist"},s,o),a)},t.prototype.componentDidMount=function(){this.moveSelectionIndicator(!1)},t.prototype.componentDidUpdate=function(e,t){this.state.selectedTabId!==t.selectedTabId?this.moveSelectionIndicator():null==t.selectedTabId||ht.arraysEqual(this.getTabChildrenProps(e),this.getTabChildrenProps(),ht.shallowCompareKeys)||this.moveSelectionIndicator()},t.prototype.getInitialSelectedTabId=function(){var e=this.props,t=e.defaultSelectedTabId,n=e.selectedTabId;if(void 0!==n)return n;if(void 0!==t)return t;var r=this.getTabChildren();return 0===r.length?void 0:r[0].props.id},t.prototype.getKeyCodeDirection=function(e){return"ArrowLeft"===e.key||"ArrowUp"===e.key?-1:"ArrowRight"===e.key||"ArrowDown"===e.key?1:void 0},t.prototype.getTabChildrenProps=function(e){return void 0===e&&(e=this.props),this.getTabChildren(e).map(function(e){return e.props})},t.prototype.getTabChildren=function(e){return void 0===e&&(e=this.props),v.Children.toArray(e.children).filter(vA)},t.prototype.getTabElements=function(e){return(void 0===e&&(e=""),null==this.tablistElement)?[]:Array.from(this.tablistElement.querySelectorAll(vP+e))},t.prototype.moveSelectionIndicator=function(e){if(void 0===e&&(e=!0),null!=this.tablistElement&&this.props.animate){var t="".concat(vP,'[data-tab-id="').concat(this.state.selectedTabId,'"]'),n=this.tablistElement.querySelector(t),r={display:"none"};if(null!=n){var i=n.clientHeight,o=n.clientWidth,a=n.offsetLeft,l=n.offsetTop;r={height:i,transform:"translateX(".concat(Math.floor(a),"px) translateY(").concat(Math.floor(l),"px)"),width:o},e||(r.transition="none")}this.setState({indicatorWrapperStyle:r})}},t.Expander=vk,t.Tab=vx,t.defaultProps={animate:!0,fill:!1,large:!1,renderActiveTabPanelOnly:!1,vertical:!1},t.displayName="".concat(fl,".Tabs"),t}(fO);function vA(e){return ht.isElementOfType(e,vx)}var v=h("8NFma"),vN={};vN=h("6DzO8")();var vj={};Object.defineProperty(vj,"__esModule",{value:!0}),vj.ReactCSS=vj.loop=vj.handleActive=vj.handleHover=vj.hover=void 0;var vR={};Object.defineProperty(vR,"__esModule",{value:!0}),vR.flattenNames=void 0;var vI=h("h1l7t"),vL=h("5V8oz"),vM=h("hcK5n"),vD=we(function(e){return"string"==typeof e||!vL(e)&&vM(e)&&"[object String]"==vI(e)}),vF={},vz=h("4V1MN"),vB=h("4hKXW"),vU=we(vF=function(e,t){return e&&vz(e,vB(t))}),vH={},vI=h("h1l7t"),vV={};vV=h("blfKu")(Object.getPrototypeOf,Object);var vM=h("hcK5n"),vq=Object.prototype,vG=Function.prototype.toString,vW=vq.hasOwnProperty,v$=vG.call(Object),vK=we(vH=function(e){if(!vM(e)||"[object Object]"!=vI(e))return!1;var t=vV(e);if(null===t)return!0;var n=vW.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&vG.call(n)==v$}),vY={};vY=function(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i};var vX={},vZ={},vQ={},vJ={},v0={},v1={};v1=function(){this.__data__=[],this.size=0};var v2={},v3={},v5={};v5=function(e,t){return e===t||e!=e&&t!=t},v3=function(e,t){for(var n=e.length;n--;)if(v5(e[n][0],t))return n;return -1};var v6=Array.prototype.splice;v2=function(e){var t=this.__data__,n=v3(t,e);return!(n<0)&&(n==t.length-1?t.pop():v6.call(t,n,1),--this.size,!0)};var v4={};v4=function(e){var t=this.__data__,n=v3(t,e);return n<0?void 0:t[n][1]};var v8={};v8=function(e){return v3(this.__data__,e)>-1};var v9={};function v7(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}v9=function(e,t){var n=this.__data__,r=v3(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},v7.prototype.clear=v1,v7.prototype.delete=v2,v7.prototype.get=v4,v7.prototype.has=v8,v7.prototype.set=v9,v0=v7;var ye={};ye=function(){this.__data__=new v0,this.size=0};var yt={};yt=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n};var yn={};yn=function(e){return this.__data__.get(e)};var yr={};yr=function(e){return this.__data__.has(e)};var yi={},yo={},ya={},yl={},ys=h("1F4Th"),yu={},yc={},yd=h("eeOBM");yc=yd["__core-js_shared__"];var yh=(k_=/[^.]+$/.exec(yc&&yc.keys&&yc.keys.IE_PROTO||""))?"Symbol(src)_1."+k_:"";yu=function(e){return!!yh&&yh in e};var yf=h("kNSK3"),yp={},yg=Function.prototype.toString;yp=function(e){if(null!=e){try{return yg.call(e)}catch(e){}try{return e+""}catch(e){}}return""};var ym=/^\[object .+?Constructor\]$/,yv=Object.prototype,yy=Function.prototype.toString,yb=yv.hasOwnProperty,yw=RegExp("^"+yy.call(yb).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");yl=function(e){return!(!yf(e)||yu(e))&&(ys(e)?yw:ym).test(yp(e))};var yx={};yx=function(e,t){return null==e?void 0:e[t]},ya=function(e,t){var n=yx(e,t);return yl(n)?n:void 0};var yd=h("eeOBM");yo=ya(yd,"Map");var y_={},yE={},yS={},yC={},yO={};yO=ya(Object,"create"),yC=function(){this.__data__=yO?yO(null):{},this.size=0};var yk={};yk=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t};var yP={},yT=Object.prototype.hasOwnProperty;yP=function(e){var t=this.__data__;if(yO){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return yT.call(t,e)?t[e]:void 0};var yA={},yN=Object.prototype.hasOwnProperty;yA=function(e){var t=this.__data__;return yO?void 0!==t[e]:yN.call(t,e)};var yj={};function yR(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}yj=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=yO&&void 0===t?"__lodash_hash_undefined__":t,this},yR.prototype.clear=yC,yR.prototype.delete=yk,yR.prototype.get=yP,yR.prototype.has=yA,yR.prototype.set=yj,yS=yR,yE=function(){this.size=0,this.__data__={hash:new yS,map:new(yo||v0),string:new yS}};var yI={},yL={},yM={};yM=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e},yL=function(e,t){var n=e.__data__;return yM(t)?n["string"==typeof t?"string":"hash"]:n.map},yI=function(e){var t=yL(this,e).delete(e);return this.size-=t?1:0,t};var yD={};yD=function(e){return yL(this,e).get(e)};var yF={};yF=function(e){return yL(this,e).has(e)};var yz={};function yB(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function yU(e){var t=this.__data__=new v0(e);this.size=t.size}yz=function(e,t){var n=yL(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},yB.prototype.clear=yE,yB.prototype.delete=yI,yB.prototype.get=yD,yB.prototype.has=yF,yB.prototype.set=yz,y_=yB,yi=function(e,t){var n=this.__data__;if(n instanceof v0){var r=n.__data__;if(!yo||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new y_(r)}return n.set(e,t),this.size=n.size,this},yU.prototype.clear=ye,yU.prototype.delete=yt,yU.prototype.get=yn,yU.prototype.has=yr,yU.prototype.set=yi,vJ=yU;var yH={},yV={},yq={},yG={},yW={};yW=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this};var y$={};function yK(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new y_;++t<n;)this.add(e[t])}y$=function(e){return this.__data__.has(e)},yK.prototype.add=yK.prototype.push=yW,yK.prototype.has=y$,yG=yK;var yY={};yY=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1};var yX={};yX=function(e,t){return e.has(t)},yq=function(e,t,n,r,i,o){var a=1&n,l=e.length,s=t.length;if(l!=s&&!(a&&s>l))return!1;var u=o.get(e),c=o.get(t);if(u&&c)return u==t&&c==e;var d=-1,h=!0,f=2&n?new yG:void 0;for(o.set(e,t),o.set(t,e);++d<l;){var p=e[d],g=t[d];if(r)var m=a?r(g,p,d,t,e,o):r(p,g,d,e,t,o);if(void 0!==m){if(m)continue;h=!1;break}if(f){if(!yY(t,function(e,t){if(!yX(f,t)&&(p===e||i(p,e,n,r,o)))return f.push(t)})){h=!1;break}}else if(!(p===g||i(p,g,n,r,o))){h=!1;break}}return o.delete(e),o.delete(t),h};var yZ={},yQ=h("4Cb5x"),yJ={},yd=h("eeOBM");yJ=yd.Uint8Array;var y0={};y0=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n};var y1={};y1=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n};var y2=yQ?yQ.prototype:void 0,y3=y2?y2.valueOf:void 0;yZ=function(e,t,n,r,i,o,a){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)break;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":if(e.byteLength!=t.byteLength||!o(new yJ(e),new yJ(t)))break;return!0;case"[object Boolean]":case"[object Date]":case"[object Number]":return v5(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var l=y0;case"[object Set]":var s=1&r;if(l||(l=y1),e.size!=t.size&&!s)break;var u=a.get(e);if(u)return u==t;r|=2,a.set(e,t);var c=yq(l(e),l(t),r,i,o,a);return a.delete(e),c;case"[object Symbol]":if(y3)return y3.call(e)==y3.call(t)}return!1};var y5={},y6={},y4={},y8={};y8=function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e};var vL=h("5V8oz");y4=function(e,t,n){var r=t(e);return vL(e)?r:y8(r,n(e))};var y9={},y7={};y7=function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[i++]=a)}return o};var be={};be=function(){return[]};var bt=Object.prototype.propertyIsEnumerable,bn=Object.getOwnPropertySymbols;y9=bn?function(e){return null==e?[]:(e=Object(e),y7(bn(e),function(t){return bt.call(e,t)}))}:be;var br=h("8R54q");y6=function(e){return y4(e,br,y9)};var bi=Object.prototype.hasOwnProperty;y5=function(e,t,n,r,i,o){var a=1&n,l=y6(e),s=l.length;if(s!=y6(t).length&&!a)return!1;for(var u=s;u--;){var c=l[u];if(!(a?c in t:bi.call(t,c)))return!1}var d=o.get(e),h=o.get(t);if(d&&h)return d==t&&h==e;var f=!0;o.set(e,t),o.set(t,e);for(var p=a;++u<s;){var g=e[c=l[u]],m=t[c];if(r)var v=a?r(m,g,c,t,e,o):r(g,m,c,e,t,o);if(!(void 0===v?g===m||i(g,m,n,r,o):v)){f=!1;break}p||(p="constructor"==c)}if(f&&!p){var y=e.constructor,b=t.constructor;y!=b&&"constructor"in e&&"constructor"in t&&!("function"==typeof y&&y instanceof y&&"function"==typeof b&&b instanceof b)&&(f=!1)}return o.delete(e),o.delete(t),f};var bo={},ba={},yd=h("eeOBM");ba=ya(yd,"DataView");var bl={},yd=h("eeOBM");bl=ya(yd,"Promise");var bs={},yd=h("eeOBM");bs=ya(yd,"Set");var bu={},yd=h("eeOBM");bu=ya(yd,"WeakMap");var vI=h("h1l7t"),bc="[object Map]",bd="[object Promise]",bh="[object Set]",bf="[object WeakMap]",bp="[object DataView]",bg=yp(ba),bm=yp(yo),bv=yp(bl),by=yp(bs),bb=yp(bu),bw=vI;(ba&&bw(new ba(new ArrayBuffer(1)))!=bp||yo&&bw(new yo)!=bc||bl&&bw(bl.resolve())!=bd||bs&&bw(new bs)!=bh||bu&&bw(new bu)!=bf)&&(bw=function(e){var t=vI(e),n="[object Object]"==t?e.constructor:void 0,r=n?yp(n):"";if(r)switch(r){case bg:return bp;case bm:return bc;case bv:return bd;case by:return bh;case bb:return bf}return t}),bo=bw;var vL=h("5V8oz"),bx=h("9e2tS"),b_=h("fAXjB"),bE="[object Arguments]",bS="[object Array]",bC="[object Object]",bO=Object.prototype.hasOwnProperty;yV=function(e,t,n,r,i,o){var a=vL(e),l=vL(t),s=a?bS:bo(e),u=l?bS:bo(t);s=s==bE?bC:s,u=u==bE?bC:u;var c=s==bC,d=u==bC,h=s==u;if(h&&bx(e)){if(!bx(t))return!1;a=!0,c=!1}if(h&&!c)return o||(o=new vJ),a||b_(e)?yq(e,t,n,r,i,o):yZ(e,t,s,n,r,i,o);if(!(1&n)){var f=c&&bO.call(e,"__wrapped__"),p=d&&bO.call(t,"__wrapped__");if(f||p){var g=f?e.value():e,m=p?t.value():t;return o||(o=new vJ),i(g,m,n,r,o)}}return!!h&&(o||(o=new vJ),y5(e,t,n,r,i,o))};var vM=h("hcK5n");yH=function e(t,n,r,i,o){return t===n||(null!=t&&null!=n&&(vM(t)||vM(n))?yV(t,n,r,i,e,o):t!=t&&n!=n)},vQ=function(e,t,n,r){var i=n.length,o=i,a=!r;if(null==e)return!o;for(e=Object(e);i--;){var l=n[i];if(a&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++i<o;){var s=(l=n[i])[0],u=e[s],c=l[1];if(a&&l[2]){if(void 0===u&&!(s in e))return!1}else{var d=new vJ;if(r)var h=r(u,c,s,e,t,d);if(!(void 0===h?yH(c,u,3,r,d):h))return!1}}return!0};var bk={},bP={},yf=h("kNSK3");bP=function(e){return e==e&&!yf(e)};var br=h("8R54q");bk=function(e){for(var t=br(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,bP(i)]}return t};var bT={};bT=function(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in Object(n))}},vZ=function(e){var t=bk(e);return 1==t.length&&t[0][2]?bT(t[0][0],t[0][1]):function(n){return n===e||vQ(n,e,t)}};var bA={},bN={},bj={},bR={},vL=h("5V8oz"),bI={},vL=h("5V8oz"),bL={},vI=h("h1l7t"),vM=h("hcK5n");bL=function(e){return"symbol"==typeof e||vM(e)&&"[object Symbol]"==vI(e)};var bM=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,bD=/^\w*$/;bI=function(e,t){if(vL(e))return!1;var n=typeof e;return!!("number"==n||"symbol"==n||"boolean"==n||null==e||bL(e))||bD.test(e)||!bM.test(e)||null!=t&&e in Object(t)};var bF={},bz={};function bB(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw TypeError("Expected a function");var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(bB.Cache||y_),n}bB.Cache=y_;var bU=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,bH=/\\(\\)?/g;OQ=(OZ=(bz=bB)(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(bU,function(e,n,r,i){t.push(r?i.replace(bH,"$1"):n||e)}),t},function(e){return 500===OQ.size&&OQ.clear(),e})).cache,bF=OZ;var bV={},bq={},yQ=h("4Cb5x"),vL=h("5V8oz"),bG=1/0,bW=yQ?yQ.prototype:void 0,b$=bW?bW.toString:void 0;bq=function e(t){if("string"==typeof t)return t;if(vL(t))return vY(t,e)+"";if(bL(t))return b$?b$.call(t):"";var n=t+"";return"0"==n&&1/t==-bG?"-0":n},bV=function(e){return null==e?"":bq(e)},bR=function(e,t){return vL(e)?e:bI(e,t)?[e]:bF(bV(e))};var bK={},bY=1/0;bK=function(e){if("string"==typeof e||bL(e))return e;var t=e+"";return"0"==t&&1/e==-bY?"-0":t},bj=function(e,t){t=bR(t,e);for(var n=0,r=t.length;null!=e&&n<r;)e=e[bK(t[n++])];return n&&n==r?e:void 0},bN=function(e,t,n){var r=null==e?void 0:bj(e,t);return void 0===r?n:r};var bX={},bZ={};bZ=function(e,t){return null!=e&&t in Object(e)};var bQ={},bJ=h("4rbI4"),vL=h("5V8oz"),b0=h("74Ail"),b1=h("2zEBJ");bQ=function(e,t,n){t=bR(t,e);for(var r=-1,i=t.length,o=!1;++r<i;){var a=bK(t[r]);if(!(o=null!=e&&n(e,a)))break;e=e[a]}return o||++r!=i?o:!!(i=null==e?0:e.length)&&b1(i)&&b0(a,i)&&(vL(e)||bJ(e))},bX=function(e,t){return null!=e&&bQ(e,t,bZ)},bA=function(e,t){return bI(e)&&bP(t)?bT(bK(e),t):function(n){var r=bN(n,e);return void 0===r&&r===t?bX(n,e):yH(t,r,3)}};var b2=h("38wdc"),vL=h("5V8oz"),b3={},b5={};b5=function(e){return function(t){return null==t?void 0:t[e]}};var b6={};b6=function(e){return function(t){return bj(t,e)}},b3=function(e){return bI(e)?b5(bK(e)):b6(e)},vX=function(e){return"function"==typeof e?e:null==e?b2:"object"==typeof e?vL(e)?bA(e[0],e[1]):vZ(e):b3(e)};var b4={},b8=h("gl8yj"),b9=h("iiJxK");b4=function(e,t){var n=-1,r=b9(e)?Array(e.length):[];return b8(e,function(e,i,o){r[++n]=t(e,i,o)}),r};var vL=h("5V8oz"),b7=we(function(e,t){return(vL(e)?vY:b4)(e,vX(t,3))});function we(e){return e&&e.__esModule?e:{default:e}}var wt=vR.flattenNames=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=[];return(0,b7.default)(t,function(t){Array.isArray(t)?e(t).map(function(e){return n.push(e)}):(0,vK.default)(t)?(0,vU.default)(t,function(e,t){!0===e&&n.push(t),n.push(t+"-"+e)}):(0,vD.default)(t)&&n.push(t)}),n};vR.default=wt;var wn=xf(vR),wr={};Object.defineProperty(wr,"__esModule",{value:!0}),wr.mergeClasses=void 0;var wi=w0(vF),wo={},wa=h("eQpse"),wl={},ws={},wu={};wu=function(){try{var e=ya(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),ws=function(e,t,n){"__proto__"==t&&wu?wu(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n};var wc=Object.prototype.hasOwnProperty;wl=function(e,t,n){var r=e[t];wc.call(e,t)&&v5(r,n)&&(void 0!==n||t in e)||ws(e,t,n)};var wd={},wh={};wh=function(e,t,n,r){var i=!n;n||(n={});for(var o=-1,a=t.length;++o<a;){var l=t[o],s=r?r(n[l],e[l],l,n,e):void 0;void 0===s&&(s=e[l]),i?ws(n,l,s):wl(n,l,s)}return n};var br=h("8R54q");wd=function(e,t){return e&&wh(t,br(t),e)};var wf={},wp={},wg=h("hopFG"),wm={},yf=h("kNSK3"),wv=h("dWAd9"),wy={};wy=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t};var wb=Object.prototype.hasOwnProperty;wm=function(e){if(!yf(e))return wy(e);var t=wv(e),n=[];for(var r in e)"constructor"==r&&(t||!wb.call(e,r))||n.push(r);return n};var b9=h("iiJxK");wp=function(e){return b9(e)?wg(e,!0):wm(e)},wf=function(e,t){return e&&wh(t,wp(t),e)};var ww=h("lJ72B"),wx={};wx=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t};var w_={};w_=function(e,t){return wh(e,y9(e),t)};var wE={},wS={};wS=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)y8(t,y9(e)),e=vV(e);return t}:be,wE=function(e,t){return wh(e,wS(e),t)};var wC={};wC=function(e){return y4(e,wp,wS)};var wO={},wk=Object.prototype.hasOwnProperty;wO=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&wk.call(e,"index")&&(n.index=e.index,n.input=e.input),n};var wP={},wT={};wT=function(e){var t=new e.constructor(e.byteLength);return new yJ(t).set(new yJ(e)),t};var wA={};wA=function(e,t){var n=t?wT(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)};var wN={},wj=/\w*$/;wN=function(e){var t=new e.constructor(e.source,wj.exec(e));return t.lastIndex=e.lastIndex,t};var wR={},yQ=h("4Cb5x"),wI=yQ?yQ.prototype:void 0,wL=wI?wI.valueOf:void 0;wR=function(e){return wL?Object(wL.call(e)):{}};var wM={};wM=function(e,t){var n=t?wT(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)},wP=function(e,t,n){var r=e.constructor;switch(t){case"[object ArrayBuffer]":return wT(e);case"[object Boolean]":case"[object Date]":return new r(+e);case"[object DataView]":return wA(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return wM(e,n);case"[object Map]":case"[object Set]":return new r;case"[object Number]":case"[object String]":return new r(e);case"[object RegExp]":return wN(e);case"[object Symbol]":return wR(e)}};var wD={},wF={},yf=h("kNSK3"),wz=Object.create;wF=function(){function e(){}return function(t){if(!yf(t))return{};if(wz)return wz(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();var wv=h("dWAd9");wD=function(e){return"function"!=typeof e.constructor||wv(e)?{}:wF(vV(e))};var vL=h("5V8oz"),bx=h("9e2tS"),wB={},wU={},vM=h("hcK5n");wU=function(e){return vM(e)&&"[object Map]"==bo(e)};var wH=h("cLhdb"),wV=h("fwpsA"),wq=wV&&wV.isMap;wB=wq?wH(wq):wU;var yf=h("kNSK3"),wG={},wW={},vM=h("hcK5n");wW=function(e){return vM(e)&&"[object Set]"==bo(e)};var wH=h("cLhdb"),wV=h("fwpsA"),w$=wV&&wV.isSet;wG=w$?wH(w$):wW;var br=h("8R54q"),wK="[object Arguments]",wY="[object Function]",wX="[object Object]",wZ={};wZ[wK]=wZ["[object Array]"]=wZ["[object ArrayBuffer]"]=wZ["[object DataView]"]=wZ["[object Boolean]"]=wZ["[object Date]"]=wZ["[object Float32Array]"]=wZ["[object Float64Array]"]=wZ["[object Int8Array]"]=wZ["[object Int16Array]"]=wZ["[object Int32Array]"]=wZ["[object Map]"]=wZ["[object Number]"]=wZ[wX]=wZ["[object RegExp]"]=wZ["[object Set]"]=wZ["[object String]"]=wZ["[object Symbol]"]=wZ["[object Uint8Array]"]=wZ["[object Uint8ClampedArray]"]=wZ["[object Uint16Array]"]=wZ["[object Uint32Array]"]=!0,wZ["[object Error]"]=wZ[wY]=wZ["[object WeakMap]"]=!1,wo=function e(t,n,r,i,o,a){var l,s=1&n,u=2&n,c=4&n;if(r&&(l=o?r(t,i,o,a):r(t)),void 0!==l)return l;if(!yf(t))return t;var d=vL(t);if(d){if(l=wO(t),!s)return wx(t,l)}else{var h=bo(t),f=h==wY||"[object GeneratorFunction]"==h;if(bx(t))return ww(t,s);if(h==wX||h==wK||f&&!o){if(l=u||f?{}:wD(t),!s)return u?wE(t,wf(l,t)):w_(t,wd(l,t))}else{if(!wZ[h])return o?t:{};l=wP(t,h,s)}}a||(a=new vJ);var p=a.get(t);if(p)return p;a.set(t,l),wG(t)?t.forEach(function(i){l.add(e(i,n,r,i,t,a))}):wB(t)&&t.forEach(function(i,o){l.set(o,e(i,n,r,o,t,a))});var g=c?u?wC:y6:u?wp:br,m=d?void 0:g(t);return wa(m||t,function(i,o){m&&(i=t[o=i]),wl(l,o,e(i,n,r,o,t,a))}),l};var wQ=w0(function(e){return wo(e,5)}),wJ=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};function w0(e){return e&&e.__esModule?e:{default:e}}var w1=wr.mergeClasses=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=e.default&&(0,wQ.default)(e.default)||{};return t.map(function(t){var r=e[t];return r&&(0,wi.default)(r,function(e,t){n[t]||(n[t]={}),n[t]=wJ({},n[t],r[t])}),t}),n};wr.default=w1;var w2=xf(wr),w3={};Object.defineProperty(w3,"__esModule",{value:!0}),w3.autoprefix=void 0;var w5=(O3=vF)&&O3.__esModule?O3:{default:O3},w6=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},w4={borderRadius:function(e){return{msBorderRadius:e,MozBorderRadius:e,OBorderRadius:e,WebkitBorderRadius:e,borderRadius:e}},boxShadow:function(e){return{msBoxShadow:e,MozBoxShadow:e,OBoxShadow:e,WebkitBoxShadow:e,boxShadow:e}},userSelect:function(e){return{WebkitTouchCallout:e,KhtmlUserSelect:e,MozUserSelect:e,msUserSelect:e,WebkitUserSelect:e,userSelect:e}},flex:function(e){return{WebkitBoxFlex:e,MozBoxFlex:e,WebkitFlex:e,msFlex:e,flex:e}},flexBasis:function(e){return{WebkitFlexBasis:e,flexBasis:e}},justifyContent:function(e){return{WebkitJustifyContent:e,justifyContent:e}},transition:function(e){return{msTransition:e,MozTransition:e,OTransition:e,WebkitTransition:e,transition:e}},transform:function(e){return{msTransform:e,MozTransform:e,OTransform:e,WebkitTransform:e,transform:e}},absolute:function(e){var t=e&&e.split(" ");return{position:"absolute",top:t&&t[0],right:t&&t[1],bottom:t&&t[2],left:t&&t[3]}},extend:function(e,t){return t[e]||{extend:e}}},w8=w3.autoprefix=function(e){var t={};return(0,w5.default)(e,function(e,n){var r={};(0,w5.default)(e,function(e,t){var n=w4[t];n?r=w6({},r,n(e)):r[t]=e}),t[n]=r}),t};w3.default=w8;var w9=xf(w3),w7={};Object.defineProperty(w7,"__esModule",{value:!0}),w7.hover=void 0;var xe=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},v=h("8NFma"),xt=(O5=v)&&O5.__esModule?O5:{default:O5};function xn(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}var xr=w7.hover=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"span";return function(n){function r(){!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,r);for(var n,i,o,a=arguments.length,l=Array(a),s=0;s<a;s++)l[s]=arguments[s];return i=o=xn(this,(n=r.__proto__||Object.getPrototypeOf(r)).call.apply(n,[this].concat(l))),o.state={hover:!1},o.handleMouseOver=function(){return o.setState({hover:!0})},o.handleMouseOut=function(){return o.setState({hover:!1})},o.render=function(){return xt.default.createElement(t,{onMouseOver:o.handleMouseOver,onMouseOut:o.handleMouseOut},xt.default.createElement(e,xe({},o.props,o.state)))},xn(o,i)}return!function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(r,n),r}(xt.default.Component)};w7.default=xr;var xi=xf(w7),xo={};Object.defineProperty(xo,"__esModule",{value:!0}),xo.active=void 0;var xa=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},v=h("8NFma"),xl=(O6=v)&&O6.__esModule?O6:{default:O6};function xs(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}var xu=xo.active=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"span";return function(n){function r(){!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,r);for(var n,i,o,a=arguments.length,l=Array(a),s=0;s<a;s++)l[s]=arguments[s];return i=o=xs(this,(n=r.__proto__||Object.getPrototypeOf(r)).call.apply(n,[this].concat(l))),o.state={active:!1},o.handleMouseDown=function(){return o.setState({active:!0})},o.handleMouseUp=function(){return o.setState({active:!1})},o.render=function(){return xl.default.createElement(t,{onMouseDown:o.handleMouseDown,onMouseUp:o.handleMouseUp},xl.default.createElement(e,xa({},o.props,o.state)))},xs(o,i)}return!function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(r,n),r}(xl.default.Component)};xo.default=xu;var xc=xf(xo),xd={};Object.defineProperty(xd,"__esModule",{value:!0}),xd.default=function(e,t){var n={},r=function(e){var t=!(arguments.length>1)||void 0===arguments[1]||arguments[1];n[e]=t};return 0===e&&r("first-child"),e===t-1&&r("last-child"),(0===e||e%2==0)&&r("even"),1===Math.abs(e%2)&&r("odd"),r("nth-child",e),n};var xh=xf(xd);function xf(e){return e&&e.__esModule?e:{default:e}}vj.hover=xi.default,vj.handleHover=xi.default,vj.handleActive=xc.default,vj.loop=xh.default;var xp=vj.ReactCSS=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i=(0,wn.default)(n),o=(0,w2.default)(e,i);return(0,w9.default)(o)};vj.default=xp;var xg={},xm={},xv={};xv=function(e,t,n){(void 0===n||v5(e[t],n))&&(void 0!==n||t in e)||ws(e,t,n)};var xy=h("e3j3J"),xb={},ww=h("lJ72B"),bJ=h("4rbI4"),vL=h("5V8oz"),xw={},b9=h("iiJxK"),vM=h("hcK5n");xw=function(e){return vM(e)&&b9(e)};var bx=h("9e2tS"),ys=h("1F4Th"),yf=h("kNSK3"),b_=h("fAXjB"),xx={};xx=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]};var x_={};x_=function(e){return wh(e,wp(e))},xb=function(e,t,n,r,i,o,a){var l=xx(e,n),s=xx(t,n),u=a.get(s);if(u){xv(e,n,u);return}var c=o?o(l,s,n+"",e,t,a):void 0,d=void 0===c;if(d){var h=vL(s),f=!h&&bx(s),p=!h&&!f&&b_(s);c=s,h||f||p?vL(l)?c=l:xw(l)?c=wx(l):f?(d=!1,c=ww(s,!0)):p?(d=!1,c=wM(s,!0)):c=[]:vH(s)||bJ(s)?(c=l,bJ(l)?c=x_(l):(!yf(l)||ys(l))&&(c=wD(s))):d=!1}d&&(a.set(s,c),i(c,s,r,o,a),a.delete(s)),xv(e,n,c)};var yf=h("kNSK3");xm=function e(t,n,r,i,o){t!==n&&xy(n,function(a,l){if(o||(o=new vJ),yf(a))xb(t,n,l,r,e,i,o);else{var s=i?i(xx(t,l),a,l+"",t,n,o):void 0;void 0===s&&(s=a),xv(t,l,s)}},wp)};var xE={},b2=h("38wdc"),xS={},xC={};xC=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)};var xO=Math.max;xS=function(e,t,n){return t=xO(void 0===t?e.length-1:t,0),function(){for(var r=arguments,i=-1,o=xO(r.length-t,0),a=Array(o);++i<o;)a[i]=r[t+i];i=-1;for(var l=Array(t+1);++i<t;)l[i]=r[i];return l[t]=n(a),xC(e,this,l)}};var xk={},xP={},xT={};xT=function(e){return function(){return e}};var b2=h("38wdc"),xA=Date.now;OJ=wu?function(e,t){return wu(e,"toString",{configurable:!0,enumerable:!1,value:xT(t),writable:!0})}:b2,O0=0,O1=0,xk=function(){var e=xA(),t=16-(e-O1);if(O1=e,t>0){if(++O0>=800)return arguments[0]}else O0=0;return OJ.apply(void 0,arguments)},xE=function(e,t){return xk(xS(e,t,b2),e+"")};var xN={},b9=h("iiJxK"),b0=h("74Ail"),yf=h("kNSK3");xN=function(e,t,n){if(!yf(n))return!1;var r=typeof t;return("number"==r?!!(b9(n)&&b0(t,n.length)):"string"==r&&t in n)&&v5(n[t],e)},O2=function(e,t,n){xm(e,t,n)},xg=xE(function(e,t){var n=-1,r=t.length,i=r>1?t[r-1]:void 0,o=r>2?t[2]:void 0;for(i=O2.length>3&&"function"==typeof i?(r--,i):void 0,o&&xN(t[0],t[1],o)&&(i=r<3?void 0:i,r=1),e=Object(e);++n<r;){var a=t[n];a&&O2(e,a,n,i)}return e});var xj={},v=(h("8NFma"),h("8NFma")),xR={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},xI=v.createContext&&v.createContext(xR),xL=function(){return(xL=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},xM=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)0>t.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function xD(e){return function(t){return v.createElement(xF,xL({attr:xL({},e.attr)},t,{hasStrokes:function e(t){for(var n in t)if("_"!==n[0]){if("stroke"===n)return!0;if("object"==typeof t[n]){var r=e(t[n]);if(r)return r}else if("content"===n&&"style"===t.tag&&t[n].includes("stroke:"))return!0}return!1}(e)}),function e(t){return t&&t.map(function(t,n){return v.createElement(t.tag,xL({key:n},t.attr),e(t.child))})}(e.child))}}function xF(e){var t=function(t){var n,r=e.size||t.size||"1em";t.className&&(n=t.className),e.className&&(n=(n?n+" ":"")+e.className);var i=e.attr,o=e.fill,a=e.title,l=e.hasStrokes,s=xM(e,["attr","fill","title","hasStrokes"]);return v.createElement("svg",xL({stroke:"currentColor",fill:o},l?null:{strokeWidth:0},t.attr,i,s,{className:n,style:xL(xL({color:e.color||t.color},t.style),e.style),height:r,width:r,xmlns:"http://www.w3.org/2000/svg"}),a&&v.createElement("title",null,a),e.children)};return void 0!==xI?v.createElement(xI.Consumer,null,function(e){return t(e)}):t(xR)}xj=function(e){return xD({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none"},child:[{tag:"path",attr:{d:"M20.3847 2.87868C19.2132 1.70711 17.3137 1.70711 16.1421 2.87868L14.0202 5.00052L13.313 4.29332C12.9225 3.9028 12.2894 3.9028 11.8988 4.29332C11.5083 4.68385 11.5083 5.31701 11.8988 5.70754L17.5557 11.3644C17.9462 11.7549 18.5794 11.7549 18.9699 11.3644C19.3604 10.9739 19.3604 10.3407 18.9699 9.95018L18.2629 9.24316L20.3847 7.12132C21.5563 5.94975 21.5563 4.05025 20.3847 2.87868Z",fill:"currentColor"}},{tag:"path",attr:{fillRule:"evenodd",clipRule:"evenodd",d:"M11.9297 7.09116L4.1515 14.8693C3.22786 15.793 3.03239 17.169 3.5651 18.2842L1.99994 19.8493L3.41415 21.2635L4.97931 19.6984C6.09444 20.2311 7.4705 20.0356 8.39414 19.112L16.1723 11.3338L11.9297 7.09116ZM13.3439 11.3338L11.9297 9.91959L5.56571 16.2835C5.17518 16.6741 5.17518 17.3072 5.56571 17.6978C5.95623 18.0883 6.5894 18.0883 6.97992 17.6978L13.3439 11.3338Z",fill:"currentColor"}}],content:"\n"})(e)};var xz={};Object.defineProperty(xz,"__esModule",{value:!0});var xB={};Object.defineProperty(xB,"__esModule",{value:!0}),xB.Alpha=void 0;var xU=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},xH=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),v=h("8NFma"),xV=x5(v),xq=x5(vj),xG={};Object.defineProperty(xG,"__esModule",{value:!0}),xG.calculateChange=function(e,t,n,r,i){var o=i.clientWidth,a=i.clientHeight,l="number"==typeof e.pageX?e.pageX:e.touches[0].pageX,s="number"==typeof e.pageY?e.pageY:e.touches[0].pageY,u=l-(i.getBoundingClientRect().left+window.pageXOffset),c=s-(i.getBoundingClientRect().top+window.pageYOffset);if("vertical"===n){var d=void 0;if(d=c<0?0:c>a?1:Math.round(100*c/a)/100,t.a!==d)return{h:t.h,s:t.s,l:t.l,a:d,source:"rgb"}}else{var h=void 0;if(r!==(h=u<0?0:u>o?1:Math.round(100*u/o)/100))return{h:t.h,s:t.s,l:t.l,a:h,source:"rgb"}}return null};var xW=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(xG),x$={};Object.defineProperty(x$,"__esModule",{value:!0}),x$.Checkboard=void 0;var xK=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},v=h("8NFma"),xY=x1(v),xX=x1(vj),xZ={};Object.defineProperty(xZ,"__esModule",{value:!0});var xQ={},xJ=xZ.render=function(e,t,n,r){if("undefined"==typeof document&&!r)return null;var i=r?new r:document.createElement("canvas");i.width=2*n,i.height=2*n;var o=i.getContext("2d");return o?(o.fillStyle=e,o.fillRect(0,0,i.width,i.height),o.fillStyle=t,o.fillRect(0,0,n,n),o.translate(n,n),o.fillRect(0,0,n,n),i.toDataURL()):null};xZ.get=function(e,t,n,r){var i=e+"-"+t+"-"+n+(r?"-server":"");if(xQ[i])return xQ[i];var o=xJ(e,t,n,r);return xQ[i]=o,o};var x0=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(xZ);function x1(e){return e&&e.__esModule?e:{default:e}}var x2=x$.Checkboard=function(e){var t=e.white,n=e.grey,r=e.size,i=e.renderers,o=e.borderRadius,a=e.boxShadow,l=e.children,s=(0,xX.default)({default:{grid:{borderRadius:o,boxShadow:a,absolute:"0px 0px 0px 0px",background:"url("+x0.get(t,n,r,i.canvas)+") center left"}}});return(0,v.isValidElement)(l)?xY.default.cloneElement(l,xK({},l.props,{style:xK({},l.props.style,s.grid)})):xY.default.createElement("div",{style:s.grid})};x2.defaultProps={size:8,white:"transparent",grey:"rgba(0,0,0,.08)",renderers:{}},x$.default=x2;var x3=x5(x$);function x5(e){return e&&e.__esModule?e:{default:e}}function x6(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}var x4=xB.Alpha=function(e){function t(){!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,t);for(var e,n,r,i=arguments.length,o=Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=r=x6(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(o))),r.handleChange=function(e){var t=xW.calculateChange(e,r.props.hsl,r.props.direction,r.props.a,r.container);t&&"function"==typeof r.props.onChange&&r.props.onChange(t,e)},r.handleMouseDown=function(e){r.handleChange(e),window.addEventListener("mousemove",r.handleChange),window.addEventListener("mouseup",r.handleMouseUp)},r.handleMouseUp=function(){r.unbindEventListeners()},r.unbindEventListeners=function(){window.removeEventListener("mousemove",r.handleChange),window.removeEventListener("mouseup",r.handleMouseUp)},x6(r,n)}return!function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),xH(t,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"render",value:function(){var e=this,t=this.props.rgb,n=(0,xq.default)({default:{alpha:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius},checkboard:{absolute:"0px 0px 0px 0px",overflow:"hidden",borderRadius:this.props.radius},gradient:{absolute:"0px 0px 0px 0px",background:"linear-gradient(to right, rgba("+t.r+","+t.g+","+t.b+", 0) 0%,\n rgba("+t.r+","+t.g+","+t.b+", 1) 100%)",boxShadow:this.props.shadow,borderRadius:this.props.radius},container:{position:"relative",height:"100%",margin:"0 3px"},pointer:{position:"absolute",left:100*t.a+"%"},slider:{width:"4px",borderRadius:"1px",height:"8px",boxShadow:"0 0 2px rgba(0, 0, 0, .6)",background:"#fff",marginTop:"1px",transform:"translateX(-2px)"}},vertical:{gradient:{background:"linear-gradient(to bottom, rgba("+t.r+","+t.g+","+t.b+", 0) 0%,\n rgba("+t.r+","+t.g+","+t.b+", 1) 100%)"},pointer:{left:0,top:100*t.a+"%"}},overwrite:xU({},this.props.style)},{vertical:"vertical"===this.props.direction,overwrite:!0});return xV.default.createElement("div",{style:n.alpha},xV.default.createElement("div",{style:n.checkboard},xV.default.createElement(x3.default,{renderers:this.props.renderers})),xV.default.createElement("div",{style:n.gradient}),xV.default.createElement("div",{style:n.container,ref:function(t){return e.container=t},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},xV.default.createElement("div",{style:n.pointer},this.props.pointer?xV.default.createElement(this.props.pointer,this.props):xV.default.createElement("div",{style:n.slider}))))}}]),t}(v.PureComponent||v.Component);xB.default=x4,Object.defineProperty(xz,"Alpha",{enumerable:!0,get:function(){return Et(xB).default}}),Object.defineProperty(xz,"Checkboard",{enumerable:!0,get:function(){return Et(x$).default}});var x8={};Object.defineProperty(x8,"__esModule",{value:!0}),x8.EditableInput=void 0;var x9=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),v=h("8NFma"),x7=_t(v),_e=_t(vj);function _t(e){return e&&e.__esModule?e:{default:e}}var _n=[38,40],_r=1,_i=x8.EditableInput=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.handleBlur=function(){n.state.blurValue&&n.setState({value:n.state.blurValue,blurValue:null})},n.handleChange=function(e){n.setUpdatedValue(e.target.value,e)},n.handleKeyDown=function(e){var t,r=Number(String(e.target.value).replace(/%/g,""));if(!isNaN(r)&&(t=e.keyCode,_n.indexOf(t)>-1)){var i=n.getArrowOffset(),o=38===e.keyCode?r+i:r-i;n.setUpdatedValue(o,e)}},n.handleDrag=function(e){if(n.props.dragLabel){var t=Math.round(n.props.value+e.movementX);t>=0&&t<=n.props.dragMax&&n.props.onChange&&n.props.onChange(n.getValueObjectWithLabel(t),e)}},n.handleMouseDown=function(e){n.props.dragLabel&&(e.preventDefault(),n.handleDrag(e),window.addEventListener("mousemove",n.handleDrag),window.addEventListener("mouseup",n.handleMouseUp))},n.handleMouseUp=function(){n.unbindEventListeners()},n.unbindEventListeners=function(){window.removeEventListener("mousemove",n.handleDrag),window.removeEventListener("mouseup",n.handleMouseUp)},n.state={value:String(e.value).toUpperCase(),blurValue:String(e.value).toUpperCase()},n.inputId="rc-editable-input-"+_r++,n}return!function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),x9(t,[{key:"componentDidUpdate",value:function(e,t){this.props.value!==this.state.value&&(e.value!==this.props.value||t.value!==this.state.value)&&(this.input===document.activeElement?this.setState({blurValue:String(this.props.value).toUpperCase()}):this.setState({value:String(this.props.value).toUpperCase(),blurValue:!this.state.blurValue&&String(this.props.value).toUpperCase()}))}},{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"getValueObjectWithLabel",value:function(e){var t,n;return t={},(n=this.props.label)in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}},{key:"getArrowOffset",value:function(){return this.props.arrowOffset||1}},{key:"setUpdatedValue",value:function(e,t){var n=this.props.label?this.getValueObjectWithLabel(e):e;this.props.onChange&&this.props.onChange(n,t),this.setState({value:e})}},{key:"render",value:function(){var e=this,t=(0,_e.default)({default:{wrap:{position:"relative"}},"user-override":{wrap:this.props.style&&this.props.style.wrap?this.props.style.wrap:{},input:this.props.style&&this.props.style.input?this.props.style.input:{},label:this.props.style&&this.props.style.label?this.props.style.label:{}},"dragLabel-true":{label:{cursor:"ew-resize"}}},{"user-override":!0},this.props);return x7.default.createElement("div",{style:t.wrap},x7.default.createElement("input",{id:this.inputId,style:t.input,ref:function(t){return e.input=t},value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,onBlur:this.handleBlur,placeholder:this.props.placeholder,spellCheck:"false"}),this.props.label&&!this.props.hideLabel?x7.default.createElement("label",{htmlFor:this.inputId,style:t.label,onMouseDown:this.handleMouseDown},this.props.label):null)}}]),t}(v.PureComponent||v.Component);x8.default=_i,Object.defineProperty(xz,"EditableInput",{enumerable:!0,get:function(){return Et(x8).default}});var _o={};Object.defineProperty(_o,"__esModule",{value:!0}),_o.Hue=void 0;var _a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),v=h("8NFma"),_l=_d(v),_s=_d(vj),_u={};Object.defineProperty(_u,"__esModule",{value:!0}),_u.calculateChange=function(e,t,n,r){var i=r.clientWidth,o=r.clientHeight,a="number"==typeof e.pageX?e.pageX:e.touches[0].pageX,l="number"==typeof e.pageY?e.pageY:e.touches[0].pageY,s=a-(r.getBoundingClientRect().left+window.pageXOffset),u=l-(r.getBoundingClientRect().top+window.pageYOffset);if("vertical"===t){var c=void 0;if(c=u<0?359:u>o?0:360*(-(100*u/o)+100)/100,n.h!==c)return{h:c,s:n.s,l:n.l,a:n.a,source:"hsl"}}else{var d=void 0;if(d=s<0?0:s>i?359:100*s/i*360/100,n.h!==d)return{h:d,s:n.s,l:n.l,a:n.a,source:"hsl"}}return null};var _c=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(_u);function _d(e){return e&&e.__esModule?e:{default:e}}function _h(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}var _f=_o.Hue=function(e){function t(){!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,t);for(var e,n,r,i=arguments.length,o=Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=r=_h(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(o))),r.handleChange=function(e){var t=_c.calculateChange(e,r.props.direction,r.props.hsl,r.container);t&&"function"==typeof r.props.onChange&&r.props.onChange(t,e)},r.handleMouseDown=function(e){r.handleChange(e),window.addEventListener("mousemove",r.handleChange),window.addEventListener("mouseup",r.handleMouseUp)},r.handleMouseUp=function(){r.unbindEventListeners()},_h(r,n)}return!function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),_a(t,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"unbindEventListeners",value:function(){window.removeEventListener("mousemove",this.handleChange),window.removeEventListener("mouseup",this.handleMouseUp)}},{key:"render",value:function(){var e=this,t=this.props.direction,n=void 0===t?"horizontal":t,r=(0,_s.default)({default:{hue:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius,boxShadow:this.props.shadow},container:{padding:"0 2px",position:"relative",height:"100%",borderRadius:this.props.radius},pointer:{position:"absolute",left:100*this.props.hsl.h/360+"%"},slider:{marginTop:"1px",width:"4px",borderRadius:"1px",height:"8px",boxShadow:"0 0 2px rgba(0, 0, 0, .6)",background:"#fff",transform:"translateX(-2px)"}},vertical:{pointer:{left:"0px",top:-(100*this.props.hsl.h/360)+100+"%"}}},{vertical:"vertical"===n});return _l.default.createElement("div",{style:r.hue},_l.default.createElement("div",{className:"hue-"+n,style:r.container,ref:function(t){return e.container=t},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},_l.default.createElement("style",null,"\n .hue-horizontal {\n background: linear-gradient(to right, #f00 0%, #ff0 17%, #0f0\n 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\n background: -webkit-linear-gradient(to right, #f00 0%, #ff0\n 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\n }\n\n .hue-vertical {\n background: linear-gradient(to top, #f00 0%, #ff0 17%, #0f0 33%,\n #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\n background: -webkit-linear-gradient(to top, #f00 0%, #ff0 17%,\n #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\n }\n "),_l.default.createElement("div",{style:r.pointer},this.props.pointer?_l.default.createElement(this.props.pointer,this.props):_l.default.createElement("div",{style:r.slider}))))}}]),t}(v.PureComponent||v.Component);_o.default=_f,Object.defineProperty(xz,"Hue",{enumerable:!0,get:function(){return Et(_o).default}});var _p={};Object.defineProperty(_p,"__esModule",{value:!0}),_p.Raised=void 0;var v=h("8NFma"),_g=_b(v),_m=_b(vN),_v=_b(vj),_y=_b(xg);function _b(e){return e&&e.__esModule?e:{default:e}}var _w=_p.Raised=function(e){var t=e.zDepth,n=e.radius,r=e.background,i=e.children,o=e.styles,a=(0,_v.default)((0,_y.default)({default:{wrap:{position:"relative",display:"inline-block"},content:{position:"relative"},bg:{absolute:"0px 0px 0px 0px",boxShadow:"0 "+t+"px "+4*t+"px rgba(0,0,0,.24)",borderRadius:n,background:r}},"zDepth-0":{bg:{boxShadow:"none"}},"zDepth-1":{bg:{boxShadow:"0 2px 10px rgba(0,0,0,.12), 0 2px 5px rgba(0,0,0,.16)"}},"zDepth-2":{bg:{boxShadow:"0 6px 20px rgba(0,0,0,.19), 0 8px 17px rgba(0,0,0,.2)"}},"zDepth-3":{bg:{boxShadow:"0 17px 50px rgba(0,0,0,.19), 0 12px 15px rgba(0,0,0,.24)"}},"zDepth-4":{bg:{boxShadow:"0 25px 55px rgba(0,0,0,.21), 0 16px 28px rgba(0,0,0,.22)"}},"zDepth-5":{bg:{boxShadow:"0 40px 77px rgba(0,0,0,.22), 0 27px 24px rgba(0,0,0,.2)"}},square:{bg:{borderRadius:"0"}},circle:{bg:{borderRadius:"50%"}}},void 0===o?{}:o),{"zDepth-1":1===t});return _g.default.createElement("div",{style:a.wrap},_g.default.createElement("div",{style:a.bg}),_g.default.createElement("div",{style:a.content},i))};_w.propTypes={background:_m.default.string,zDepth:_m.default.oneOf([0,1,2,3,4,5]),radius:_m.default.number,styles:_m.default.object},_w.defaultProps={background:"#fff",zDepth:1,radius:2,styles:{}},_p.default=_w,Object.defineProperty(xz,"Raised",{enumerable:!0,get:function(){return Et(_p).default}});var _x={};Object.defineProperty(_x,"__esModule",{value:!0}),_x.Saturation=void 0;var __=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),v=h("8NFma"),_E=_H(v),_S=_H(vj),_C={},yf=h("kNSK3"),_O={},yd=h("eeOBM");_O=function(){return yd.Date.now()};var _k={},_P={},_T={},_A=/\s/;_T=function(e){for(var t=e.length;t--&&_A.test(e.charAt(t)););return t};var _N=/^\s+/;_P=function(e){return e?e.slice(0,_T(e)+1).replace(_N,""):e};var yf=h("kNSK3"),_j=0/0,_R=/^[-+]0x[0-9a-f]+$/i,_I=/^0b[01]+$/i,_L=/^0o[0-7]+$/i,_M=parseInt;_k=function(e){if("number"==typeof e)return e;if(bL(e))return _j;if(yf(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=yf(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=_P(e);var n=_I.test(e);return n||_L.test(e)?_M(e.slice(2),n?2:8):_R.test(e)?_j:+e};var _D=Math.max,_F=Math.min;_C=function(e,t,n){var r,i,o,a,l,s,u=0,c=!1,d=!1,h=!0;if("function"!=typeof e)throw TypeError("Expected a function");function f(t){var n=r,o=i;return r=i=void 0,u=t,a=e.apply(o,n)}function p(e){var n=e-s,r=e-u;return void 0===s||n>=t||n<0||d&&r>=o}function g(){var e,n,r,i=_O();if(p(i))return m(i);l=setTimeout(g,(e=i-s,n=i-u,r=t-e,d?_F(r,o-n):r))}function m(e){return(l=void 0,h&&r)?f(e):(r=i=void 0,a)}function v(){var e,n=_O(),o=p(n);if(r=arguments,i=this,s=n,o){if(void 0===l)return u=e=s,l=setTimeout(g,t),c?f(e):a;if(d)return clearTimeout(l),l=setTimeout(g,t),f(s)}return void 0===l&&(l=setTimeout(g,t)),a}return t=_k(t)||0,yf(n)&&(c=!!n.leading,o=(d="maxWait"in n)?_D(_k(n.maxWait)||0,t):o,h="trailing"in n?!!n.trailing:h),v.cancel=function(){void 0!==l&&clearTimeout(l),u=0,r=s=i=l=void 0},v.flush=function(){return void 0===l?a:m(_O())},v};var yf=h("kNSK3"),_z=_H(function(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw TypeError("Expected a function");return yf(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),_C(e,t,{leading:r,maxWait:t,trailing:i})}),_B={};Object.defineProperty(_B,"__esModule",{value:!0}),_B.calculateChange=function(e,t,n){var r=n.getBoundingClientRect(),i=r.width,o=r.height,a="number"==typeof e.pageX?e.pageX:e.touches[0].pageX,l="number"==typeof e.pageY?e.pageY:e.touches[0].pageY,s=a-(n.getBoundingClientRect().left+window.pageXOffset),u=l-(n.getBoundingClientRect().top+window.pageYOffset);s<0?s=0:s>i&&(s=i),u<0?u=0:u>o&&(u=o);var c=s/i,d=1-u/o;return{h:t.h,s:c,v:d,a:t.a,source:"hsv"}};var _U=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(_B);function _H(e){return e&&e.__esModule?e:{default:e}}var _V=_x.Saturation=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.handleChange=function(e){"function"==typeof n.props.onChange&&n.throttle(n.props.onChange,_U.calculateChange(e,n.props.hsl,n.container),e)},n.handleMouseDown=function(e){n.handleChange(e);var t=n.getContainerRenderWindow();t.addEventListener("mousemove",n.handleChange),t.addEventListener("mouseup",n.handleMouseUp)},n.handleMouseUp=function(){n.unbindEventListeners()},n.throttle=(0,_z.default)(function(e,t,n){e(t,n)},50),n}return!function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),__(t,[{key:"componentWillUnmount",value:function(){this.throttle.cancel(),this.unbindEventListeners()}},{key:"getContainerRenderWindow",value:function(){for(var e=this.container,t=window;!t.document.contains(e)&&t.parent!==t;)t=t.parent;return t}},{key:"unbindEventListeners",value:function(){var e=this.getContainerRenderWindow();e.removeEventListener("mousemove",this.handleChange),e.removeEventListener("mouseup",this.handleMouseUp)}},{key:"render",value:function(){var e=this,t=this.props.style||{},n=t.color,r=t.white,i=t.black,o=t.pointer,a=t.circle,l=(0,_S.default)({default:{color:{absolute:"0px 0px 0px 0px",background:"hsl("+this.props.hsl.h+",100%, 50%)",borderRadius:this.props.radius},white:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius},black:{absolute:"0px 0px 0px 0px",boxShadow:this.props.shadow,borderRadius:this.props.radius},pointer:{position:"absolute",top:-(100*this.props.hsv.v)+100+"%",left:100*this.props.hsv.s+"%",cursor:"default"},circle:{width:"4px",height:"4px",boxShadow:"0 0 0 1.5px #fff, inset 0 0 1px 1px rgba(0,0,0,.3),\n 0 0 1px 2px rgba(0,0,0,.4)",borderRadius:"50%",cursor:"hand",transform:"translate(-2px, -2px)"}},custom:{color:n,white:r,black:i,pointer:o,circle:a}},{custom:!!this.props.style});return _E.default.createElement("div",{style:l.color,ref:function(t){return e.container=t},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},_E.default.createElement("style",null,"\n .saturation-white {\n background: -webkit-linear-gradient(to right, #fff, rgba(255,255,255,0));\n background: linear-gradient(to right, #fff, rgba(255,255,255,0));\n }\n .saturation-black {\n background: -webkit-linear-gradient(to top, #000, rgba(0,0,0,0));\n background: linear-gradient(to top, #000, rgba(0,0,0,0));\n }\n "),_E.default.createElement("div",{style:l.white,className:"saturation-white"},_E.default.createElement("div",{style:l.black,className:"saturation-black"}),_E.default.createElement("div",{style:l.pointer},this.props.pointer?_E.default.createElement(this.props.pointer,this.props):_E.default.createElement("div",{style:l.circle}))))}}]),t}(v.PureComponent||v.Component);_x.default=_V,Object.defineProperty(xz,"Saturation",{enumerable:!0,get:function(){return Et(_x).default}});var _q={};Object.defineProperty(_q,"__esModule",{value:!0}),_q.ColorWrap=void 0;var _G=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_W=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),v=h("8NFma"),_$=_1(v),_K=_1(_C),_Y={};Object.defineProperty(_Y,"__esModule",{value:!0}),_Y.isvalidColorString=_Y.red=_Y.getContrastingColor=_Y.isValidHex=_Y.toState=_Y.simpleCheckForValidColor=void 0;var _X=_Q(h("2MeUa")),_Z=_Q(function(){function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}var t,n,r,i=/^\s+/,o=/\s+$/;function a(t,n){if(n=n||{},(t=t||"")instanceof a)return t;if(!(this instanceof a))return new a(t,n);var r,l,s,u,c,d,h,f,p,g,m,v,y,b,w,x,_,S,k,T,N=(l={r:0,g:0,b:0},s=1,u=null,c=null,d=null,h=!1,f=!1,"string"==typeof(r=t)&&(r=function(e){e=e.replace(i,"").replace(o,"").toLowerCase();var t,n=!1;if(E[e])e=E[e],n=!0;else if("transparent"==e)return{r:0,g:0,b:0,a:0,format:"name"};return(t=j.rgb.exec(e))?{r:t[1],g:t[2],b:t[3]}:(t=j.rgba.exec(e))?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=j.hsl.exec(e))?{h:t[1],s:t[2],l:t[3]}:(t=j.hsla.exec(e))?{h:t[1],s:t[2],l:t[3],a:t[4]}:(t=j.hsv.exec(e))?{h:t[1],s:t[2],v:t[3]}:(t=j.hsva.exec(e))?{h:t[1],s:t[2],v:t[3],a:t[4]}:(t=j.hex8.exec(e))?{r:P(t[1]),g:P(t[2]),b:P(t[3]),a:P(t[4])/255,format:n?"name":"hex8"}:(t=j.hex6.exec(e))?{r:P(t[1]),g:P(t[2]),b:P(t[3]),format:n?"name":"hex"}:(t=j.hex4.exec(e))?{r:P(t[1]+""+t[1]),g:P(t[2]+""+t[2]),b:P(t[3]+""+t[3]),a:P(t[4]+""+t[4])/255,format:n?"name":"hex8"}:!!(t=j.hex3.exec(e))&&{r:P(t[1]+""+t[1]),g:P(t[2]+""+t[2]),b:P(t[3]+""+t[3]),format:n?"name":"hex"}}(r)),"object"==e(r)&&(R(r.r)&&R(r.g)&&R(r.b)?(p=r.r,g=r.g,m=r.b,l={r:255*O(p,255),g:255*O(g,255),b:255*O(m,255)},h=!0,f="%"===String(r.r).substr(-1)?"prgb":"rgb"):R(r.h)&&R(r.s)&&R(r.v)?(u=A(r.s),c=A(r.v),v=r.h,y=u,b=c,v=6*O(v,360),y=O(y,100),b=O(b,100),w=Math.floor(v),x=v-w,_=b*(1-y),S=b*(1-x*y),k=b*(1-(1-x)*y),l={r:255*[b,S,_,_,k,b][T=w%6],g:255*[k,b,b,S,_,_][T],b:255*[_,_,k,b,b,S][T]},h=!0,f="hsv"):R(r.h)&&R(r.s)&&R(r.l)&&(u=A(r.s),d=A(r.l),l=function(e,t,n){var r,i,o;function a(e,t,n){return(n<0&&(n+=1),n>1&&(n-=1),n<1/6)?e+(t-e)*6*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}if(e=O(e,360),t=O(t,100),n=O(n,100),0===t)r=i=o=n;else{var l=n<.5?n*(1+t):n+t-n*t,s=2*n-l;r=a(s,l,e+1/3),i=a(s,l,e),o=a(s,l,e-1/3)}return{r:255*r,g:255*i,b:255*o}}(r.h,u,d),h=!0,f="hsl"),r.hasOwnProperty("a")&&(s=r.a)),s=C(s),{ok:h,format:r.format||f,r:Math.min(255,Math.max(l.r,0)),g:Math.min(255,Math.max(l.g,0)),b:Math.min(255,Math.max(l.b,0)),a:s});this._originalInput=t,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=n.format||N.format,this._gradientType=n.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}function l(e,t,n){var r,i,o=Math.max(e=O(e,255),t=O(t,255),n=O(n,255)),a=Math.min(e,t,n),l=(o+a)/2;if(o==a)r=i=0;else{var s=o-a;switch(i=l>.5?s/(2-o-a):s/(o+a),o){case e:r=(t-n)/s+(t<n?6:0);break;case t:r=(n-e)/s+2;break;case n:r=(e-t)/s+4}r/=6}return{h:r,s:i,l:l}}function s(e,t,n){var r,i=Math.max(e=O(e,255),t=O(t,255),n=O(n,255)),o=Math.min(e,t,n),a=i-o;if(i==o)r=0;else{switch(i){case e:r=(t-n)/a+(t<n?6:0);break;case t:r=(n-e)/a+2;break;case n:r=(e-t)/a+4}r/=6}return{h:r,s:0===i?0:a/i,v:i}}function u(e,t,n,r){var i=[T(Math.round(e).toString(16)),T(Math.round(t).toString(16)),T(Math.round(n).toString(16))];return r&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function c(e,t,n,r){return[T(N(r)),T(Math.round(e).toString(16)),T(Math.round(t).toString(16)),T(Math.round(n).toString(16))].join("")}function d(e,t){t=0===t?0:t||10;var n=a(e).toHsl();return n.s-=t/100,n.s=k(n.s),a(n)}function h(e,t){t=0===t?0:t||10;var n=a(e).toHsl();return n.s+=t/100,n.s=k(n.s),a(n)}function f(e){return a(e).desaturate(100)}function p(e,t){t=0===t?0:t||10;var n=a(e).toHsl();return n.l+=t/100,n.l=k(n.l),a(n)}function g(e,t){t=0===t?0:t||10;var n=a(e).toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(-(t/100*255)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(-(t/100*255)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(-(t/100*255)))),a(n)}function m(e,t){t=0===t?0:t||10;var n=a(e).toHsl();return n.l-=t/100,n.l=k(n.l),a(n)}function v(e,t){var n=a(e).toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,a(n)}function y(e){var t=a(e).toHsl();return t.h=(t.h+180)%360,a(t)}function b(e,t){if(isNaN(t)||t<=0)throw Error("Argument to polyad must be a positive number");for(var n=a(e).toHsl(),r=[a(e)],i=360/t,o=1;o<t;o++)r.push(a({h:(n.h+o*i)%360,s:n.s,l:n.l}));return r}function w(e){var t=a(e).toHsl(),n=t.h;return[a(e),a({h:(n+72)%360,s:t.s,l:t.l}),a({h:(n+216)%360,s:t.s,l:t.l})]}function x(e,t,n){t=t||6,n=n||30;var r=a(e).toHsl(),i=360/n,o=[a(e)];for(r.h=(r.h-(i*t>>1)+720)%360;--t;)r.h=(r.h+i)%360,o.push(a(r));return o}function _(e,t){t=t||6;for(var n=a(e).toHsv(),r=n.h,i=n.s,o=n.v,l=[],s=1/t;t--;)l.push(a({h:r,s:i,v:o})),o=(o+s)%1;return l}a.prototype={isDark:function(){return 128>this.getBrightness()},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 e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,n,r=this.toRgb();return e=r.r/255,.2126*(e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4))+.7152*((t=r.g/255)<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.0722*((n=r.b/255)<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4))},setAlpha:function(e){return this._a=C(e),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var e=s(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=s(this._r,this._g,this._b),t=Math.round(360*e.h),n=Math.round(100*e.s),r=Math.round(100*e.v);return 1==this._a?"hsv("+t+", "+n+"%, "+r+"%)":"hsva("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var e=l(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=l(this._r,this._g,this._b),t=Math.round(360*e.h),n=Math.round(100*e.s),r=Math.round(100*e.l);return 1==this._a?"hsl("+t+", "+n+"%, "+r+"%)":"hsla("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHex:function(e){return u(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){var t,n,r,i,o;return t=this._r,n=this._g,r=this._b,i=this._a,o=[T(Math.round(t).toString(16)),T(Math.round(n).toString(16)),T(Math.round(r).toString(16)),T(N(i))],e&&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[3].charAt(0)==o[3].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0):o.join("")},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"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(100*O(this._r,255))+"%",g:Math.round(100*O(this._g,255))+"%",b:Math.round(100*O(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+Math.round(100*O(this._r,255))+"%, "+Math.round(100*O(this._g,255))+"%, "+Math.round(100*O(this._b,255))+"%)":"rgba("+Math.round(100*O(this._r,255))+"%, "+Math.round(100*O(this._g,255))+"%, "+Math.round(100*O(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(S[u(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+c(this._r,this._g,this._b,this._a),n=t,r=this._gradientType?"GradientType = 1, ":"";if(e){var i=a(e);n="#"+c(i._r,i._g,i._b,i._a)}return"progid:DXImageTransform.Microsoft.gradient("+r+"startColorstr="+t+",endColorstr="+n+")"},toString:function(e){var t=!!e;e=e||this._format;var n=!1,r=this._a<1&&this._a>=0;return!t&&r&&("hex"===e||"hex6"===e||"hex3"===e||"hex4"===e||"hex8"===e||"name"===e)?"name"===e&&0===this._a?this.toName():this.toRgbString():("rgb"===e&&(n=this.toRgbString()),"prgb"===e&&(n=this.toPercentageRgbString()),("hex"===e||"hex6"===e)&&(n=this.toHexString()),"hex3"===e&&(n=this.toHexString(!0)),"hex4"===e&&(n=this.toHex8String(!0)),"hex8"===e&&(n=this.toHex8String()),"name"===e&&(n=this.toName()),"hsl"===e&&(n=this.toHslString()),"hsv"===e&&(n=this.toHsvString()),n||this.toHexString())},clone:function(){return a(this.toString())},_applyModification:function(e,t){var n=e.apply(null,[this].concat([].slice.call(t)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(p,arguments)},brighten:function(){return this._applyModification(g,arguments)},darken:function(){return this._applyModification(m,arguments)},desaturate:function(){return this._applyModification(d,arguments)},saturate:function(){return this._applyModification(h,arguments)},greyscale:function(){return this._applyModification(f,arguments)},spin:function(){return this._applyModification(v,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(x,arguments)},complement:function(){return this._applyCombination(y,arguments)},monochromatic:function(){return this._applyCombination(_,arguments)},splitcomplement:function(){return this._applyCombination(w,arguments)},triad:function(){return this._applyCombination(b,[3])},tetrad:function(){return this._applyCombination(b,[4])}},a.fromRatio=function(t,n){if("object"==e(t)){var r={};for(var i in t)t.hasOwnProperty(i)&&("a"===i?r[i]=t[i]:r[i]=A(t[i]));t=r}return a(t,n)},a.equals=function(e,t){return!!e&&!!t&&a(e).toRgbString()==a(t).toRgbString()},a.random=function(){return a.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})},a.mix=function(e,t,n){n=0===n?0:n||50;var r=a(e).toRgb(),i=a(t).toRgb(),o=n/100;return a({r:(i.r-r.r)*o+r.r,g:(i.g-r.g)*o+r.g,b:(i.b-r.b)*o+r.b,a:(i.a-r.a)*o+r.a})},a.readability=function(e,t){var n=a(e),r=a(t);return(Math.max(n.getLuminance(),r.getLuminance())+.05)/(Math.min(n.getLuminance(),r.getLuminance())+.05)},a.isReadable=function(e,t,n){var r,i,o,l,s,u=a.readability(e,t);switch(s=!1,(i=((r=(r=n)||{level:"AA",size:"small"}).level||"AA").toUpperCase(),o=(r.size||"small").toLowerCase(),"AA"!==i&&"AAA"!==i&&(i="AA"),"small"!==o&&"large"!==o&&(o="small"),l={level:i,size:o}).level+l.size){case"AAsmall":case"AAAlarge":s=u>=4.5;break;case"AAlarge":s=u>=3;break;case"AAAsmall":s=u>=7}return s},a.mostReadable=function(e,t,n){var r,i,o,l,s=null,u=0;i=(n=n||{}).includeFallbackColors,o=n.level,l=n.size;for(var c=0;c<t.length;c++)(r=a.readability(e,t[c]))>u&&(u=r,s=a(t[c]));return a.isReadable(e,s,{level:o,size:l})||!i?s:(n.includeFallbackColors=!1,a.mostReadable(e,["#fff","#000"],n))};var E=a.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"},S=a.hexNames=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}(E);function C(e){return(isNaN(e=parseFloat(e))||e<0||e>1)&&(e=1),e}function O(e,t){"string"==typeof(n=e)&&-1!=n.indexOf(".")&&1===parseFloat(n)&&(e="100%");var n,r,i="string"==typeof(r=e)&&-1!=r.indexOf("%");return(e=Math.min(t,Math.max(0,parseFloat(e))),i&&(e=parseInt(e*t,10)/100),1e-6>Math.abs(e-t))?1:e%t/parseFloat(t)}function k(e){return Math.min(1,Math.max(0,e))}function P(e){return parseInt(e,16)}function T(e){return 1==e.length?"0"+e:""+e}function A(e){return e<=1&&(e=100*e+"%"),e}function N(e){return Math.round(255*parseFloat(e)).toString(16)}var j=(n="[\\s|\\(]+("+(t="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+t+")[,|\\s]+("+t+")\\s*\\)?",r="[\\s|\\(]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")\\s*\\)?",{CSS_UNIT:new RegExp(t),rgb:RegExp("rgb"+n),rgba:RegExp("rgba"+r),hsl:RegExp("hsl"+n),hsla:RegExp("hsla"+r),hsv:RegExp("hsv"+n),hsva:RegExp("hsva"+r),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 R(e){return!!j.CSS_UNIT.exec(e)}return a}());function _Q(e){return e&&e.__esModule?e:{default:e}}_Y.simpleCheckForValidColor=function(e){var t=0,n=0;return(0,_X.default)(["r","g","b","a","h","s","l","v"],function(r){e[r]&&(t+=1,isNaN(e[r])||(n+=1),("s"===r||"l"===r)&&/^\d+%$/.test(e[r])&&(n+=1))}),t===n&&e};var _J=_Y.toState=function(e,t){var n=e.hex?(0,_Z.default)(e.hex):(0,_Z.default)(e),r=n.toHsl(),i=n.toHsv(),o=n.toRgb(),a=n.toHex();return 0===r.s&&(r.h=t||0,i.h=t||0),{hsl:r,hex:"000000"===a&&0===o.a?"transparent":"#"+a,rgb:o,hsv:i,oldHue:e.h||t||r.h,source:e.source}};_Y.isValidHex=function(e){if("transparent"===e)return!0;var t="#"===String(e).charAt(0)?1:0;return e.length!==4+t&&e.length<7+t&&(0,_Z.default)(e).isValid()},_Y.getContrastingColor=function(e){if(!e)return"#fff";var t=_J(e);return"transparent"===t.hex?"rgba(0,0,0,0.4)":(299*t.rgb.r+587*t.rgb.g+114*t.rgb.b)/1e3>=128?"#000":"#fff"},_Y.red={hsl:{a:1,h:0,l:.5,s:1},hex:"#ff0000",rgb:{r:255,g:0,b:0,a:1},hsv:{h:0,s:1,v:1,a:1}},_Y.isvalidColorString=function(e,t){var n=e.replace("°","");return(0,_Z.default)(t+" ("+n+")")._ok};var _0=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(_Y);function _1(e){return e&&e.__esModule?e:{default:e}}var _2=_q.ColorWrap=function(e){var t=function(t){function n(e){!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,n);var t=function(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this));return t.handleChange=function(e,n){if(_0.simpleCheckForValidColor(e)){var r=_0.toState(e,e.h||t.state.oldHue);t.setState(r),t.props.onChangeComplete&&t.debounce(t.props.onChangeComplete,r,n),t.props.onChange&&t.props.onChange(r,n)}},t.handleSwatchHover=function(e,n){if(_0.simpleCheckForValidColor(e)){var r=_0.toState(e,e.h||t.state.oldHue);t.props.onSwatchHover&&t.props.onSwatchHover(r,n)}},t.state=_G({},_0.toState(e.color,0)),t.debounce=(0,_K.default)(function(e,t,n){e(t,n)},100),t}return!function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,t),_W(n,[{key:"render",value:function(){var t={};return this.props.onSwatchHover&&(t.onSwatchHover=this.handleSwatchHover),_$.default.createElement(e,_G({},this.props,this.state,{onChange:this.handleChange},t))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return _G({},_0.toState(e.color,t.oldHue))}}]),n}(v.PureComponent||v.Component);return t.propTypes=_G({},e.propTypes),t.defaultProps=_G({},e.defaultProps,{color:{h:250,s:.5,l:.2,a:1}}),t};_q.default=_2,Object.defineProperty(xz,"ColorWrap",{enumerable:!0,get:function(){return Et(_q).default}});var _3={};Object.defineProperty(_3,"__esModule",{value:!0}),_3.Swatch=void 0;var _5=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},v=h("8NFma"),_6=_7(v),_4=_7(vj),_8=h("gxGlt"),_9=_7(x$);function _7(e){return e&&e.__esModule?e:{default:e}}var Ee=_3.Swatch=function(e){var t=e.color,n=e.style,r=e.onClick,i=void 0===r?function(){}:r,o=e.onHover,a=e.title,l=void 0===a?t:a,s=e.children,u=e.focus,c=e.focusStyle,d="transparent"===t,h=(0,_4.default)({default:{swatch:_5({background:t,height:"100%",width:"100%",cursor:"pointer",position:"relative",outline:"none"},n,u?void 0===c?{}:c:{})}}),f={};return o&&(f.onMouseOver=function(e){return o(t,e)}),_6.default.createElement("div",_5({style:h.swatch,onClick:function(e){return i(t,e)},title:l,tabIndex:0,onKeyDown:function(e){return 13===e.keyCode&&i(t,e)}},f),s,d&&_6.default.createElement(_9.default,{borderRadius:h.swatch.borderRadius,boxShadow:"inset 0 0 0 1px rgba(0,0,0,0.1)"}))};function Et(e){return e&&e.__esModule?e:{default:e}}_3.default=(0,_8.handleFocus)(Ee),Object.defineProperty(xz,"Swatch",{enumerable:!0,get:function(){return Et(_3).default}});var En={};Object.defineProperty(En,"__esModule",{value:!0}),En.SketchFields=void 0;var v=h("8NFma"),Er=Ea(v),Ei=Ea(vj),Eo=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(_Y);function Ea(e){return e&&e.__esModule?e:{default:e}}var El=En.SketchFields=function(e){var t=e.onChange,n=e.rgb,r=e.hsl,i=e.hex,o=e.disableAlpha,a=(0,Ei.default)({default:{fields:{display:"flex",paddingTop:"4px"},single:{flex:"1",paddingLeft:"6px"},alpha:{flex:"1",paddingLeft:"6px"},double:{flex:"2"},input:{width:"80%",padding:"4px 10% 3px",border:"none",boxShadow:"inset 0 0 0 1px #ccc",fontSize:"11px"},label:{display:"block",textAlign:"center",fontSize:"11px",color:"#222",paddingTop:"3px",paddingBottom:"4px",textTransform:"capitalize"}},disableAlpha:{alpha:{display:"none"}}},{disableAlpha:o}),l=function(e,i){e.hex?Eo.isValidHex(e.hex)&&t({hex:e.hex,source:"hex"},i):e.r||e.g||e.b?t({r:e.r||n.r,g:e.g||n.g,b:e.b||n.b,a:n.a,source:"rgb"},i):e.a&&(e.a<0?e.a=0:e.a>100&&(e.a=100),e.a/=100,t({h:r.h,s:r.s,l:r.l,a:e.a,source:"rgb"},i))};return Er.default.createElement("div",{style:a.fields,className:"flexbox-fix"},Er.default.createElement("div",{style:a.double},Er.default.createElement(xz.EditableInput,{style:{input:a.input,label:a.label},label:"hex",value:i.replace("#",""),onChange:l})),Er.default.createElement("div",{style:a.single},Er.default.createElement(xz.EditableInput,{style:{input:a.input,label:a.label},label:"r",value:n.r,onChange:l,dragLabel:"true",dragMax:"255"})),Er.default.createElement("div",{style:a.single},Er.default.createElement(xz.EditableInput,{style:{input:a.input,label:a.label},label:"g",value:n.g,onChange:l,dragLabel:"true",dragMax:"255"})),Er.default.createElement("div",{style:a.single},Er.default.createElement(xz.EditableInput,{style:{input:a.input,label:a.label},label:"b",value:n.b,onChange:l,dragLabel:"true",dragMax:"255"})),Er.default.createElement("div",{style:a.alpha},Er.default.createElement(xz.EditableInput,{style:{input:a.input,label:a.label},label:"a",value:Math.round(100*n.a),onChange:l,dragLabel:"true",dragMax:"100"})))};En.default=El;var Es={};Object.defineProperty(Es,"__esModule",{value:!0}),Es.SketchPresetColors=void 0;var Eu=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},v=h("8NFma"),Ec=Ef(v),Ed=Ef(vN),Eh=Ef(vj);function Ef(e){return e&&e.__esModule?e:{default:e}}var Ep=Es.SketchPresetColors=function(e){var t=e.colors,n=e.onClick,r=void 0===n?function(){}:n,i=e.onSwatchHover,o=(0,Eh.default)({default:{colors:{margin:"0 -10px",padding:"10px 0 0 10px",borderTop:"1px solid #eee",display:"flex",flexWrap:"wrap",position:"relative"},swatchWrap:{width:"16px",height:"16px",margin:"0 10px 10px 0"},swatch:{borderRadius:"3px",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15)"}},"no-presets":{colors:{display:"none"}}},{"no-presets":!t||!t.length}),a=function(e,t){r({hex:e,source:"hex"},t)};return Ec.default.createElement("div",{style:o.colors,className:"flexbox-fix"},t.map(function(e){var t="string"==typeof e?{color:e}:e,n=""+t.color+(t.title||"");return Ec.default.createElement("div",{key:n,style:o.swatchWrap},Ec.default.createElement(xz.Swatch,Eu({},t,{style:o.swatch,onClick:a,onHover:i,focusStyle:{boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15), 0 0 4px "+t.color}})))}))};Ep.propTypes={colors:Ed.default.arrayOf(Ed.default.oneOfType([Ed.default.string,Ed.default.shape({color:Ed.default.string,title:Ed.default.string})])).isRequired},Es.default=Ep;let Eg=e=>{let t=l(v).useRef(e);return t.current=e,l(v).useCallback((...e)=>t.current(...e),[])},Em=({width:e,rgb:t,hex:n,hsv:r,hsl:i,onChange:o,onSwatchHover:a,disableAlpha:s,presetColors:u,renderers:c,styles:d={},className:h=""})=>{let f=l(vj)(l(xg)({default:{picker:{width:e,padding:"10px 10px 0",boxSizing:"initial",background:"#fff",borderRadius:"4px",boxShadow:"0 0 0 1px rgba(0,0,0,.15), 0 8px 16px rgba(0,0,0,.15)"},saturation:{width:"100%",paddingBottom:"75%",position:"relative",overflow:"hidden"},Saturation:{radius:"3px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},controls:{display:"flex"},sliders:{padding:"4px 0",flex:"1"},color:{width:"24px",height:"24px",position:"relative",marginTop:"4px",marginLeft:"4px",borderRadius:"3px"},activeColor:{absolute:"0px 0px 0px 0px",borderRadius:"2px",background:`rgba(${t.r},${t.g},${t.b},${t.a})`,boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},hue:{position:"relative",height:"10px",overflow:"hidden"},Hue:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},alpha:{position:"relative",height:"10px",marginTop:"4px",overflow:"hidden"},Alpha:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},...d},disableAlpha:{color:{height:"10px"},hue:{height:"10px"},alpha:{display:"none"}}},d),{disableAlpha:s}),[g,m]=l(v).useState(!1),y=l(v).useRef(null),b=Eg(e=>{if(g){let t=y.current?.fill();t&&o(l(A).Util.colorToRGBA(t)),x(),!function(e,t){let n=e.target;for(;n;){if(n.classList.contains(t))return!0;n=n.parentElement}return!1}(e,"color-picker-button")&&m(!1),e.stopPropagation(),e.stopImmediatePropagation()}}),w=Eg(e=>{if(!g)return;let t=l(A).stages.find(t=>{let n=t.getContent().getBoundingClientRect();return n.left<e.clientX&&n.left+n.width>e.clientX&&n.top<e.clientY&&n.top+n.height>e.clientY});if(!t){x();return}let n=t.getContent().getBoundingClientRect(),r={x:e.clientX-n.left,y:e.clientY-n.top},i=t.children[0],o=i.getNativeCanvasElement(),a=i.getCanvas().getPixelRatio(),{data:s}=o.getContext("2d").getImageData(r.x*a,r.y*a,1,1),u=t.findOne(".line-guides");u.findOne(".picker")||(y.current&&y.current.destroy(),y.current=new(l(A)).Circle({name:"picker",radius:14,stroke:"black",strokeWidth:1}),u.add(y.current)),y.current.setAbsolutePosition({x:r.x-15,y:r.y-15}),y.current.fill("rgb("+s[0]+","+s[1]+","+s[2]+")")});l(v).useEffect(()=>(window.addEventListener("mousemove",w),window.addEventListener("mousedown",b,!0),window.addEventListener("touchstart",b,!0),()=>{window.removeEventListener("mousemove",w),window.removeEventListener("mousedown",b,!0),window.removeEventListener("touchstart",b,!0),x()}),[]),l(v).useEffect(()=>{g||x()},[g]),l(v).useEffect(()=>(g&&(document.body.style.cursor="crosshair"),()=>{document.body.style.cursor="default"}),[g]);let x=Eg(()=>{y.current&&(y.current.destroy(),y.current=null)});return(0,p.jsxs)("div",{style:f.picker,className:`sketch-picker ${h}`,children:[(0,p.jsx)("div",{style:f.saturation,children:(0,p.jsx)(xz.Saturation,{style:f.Saturation,hsl:i,hsv:r,onChange:o})}),(0,p.jsxs)("div",{style:f.controls,className:"flexbox-fix",children:[(0,p.jsxs)("div",{style:f.sliders,children:[(0,p.jsx)("div",{style:f.hue,children:(0,p.jsx)(xz.Hue,{style:f.Hue,hsl:i,onChange:o})}),(0,p.jsx)("div",{style:f.alpha,children:(0,p.jsx)(xz.Alpha,{style:f.Alpha,rgb:t,hsl:i,renderers:c,onChange:o})})]}),(0,p.jsxs)("div",{style:f.color,children:[(0,p.jsx)(xz.Checkboard,{}),(0,p.jsx)("div",{style:f.activeColor})]}),(0,p.jsx)("div",{style:f.color,children:(0,p.jsx)(fA,{icon:(0,p.jsx)(l(xj),{}),className:"color-picker-button",minimal:!0,style:{width:"24px",height:"24px",minWidth:"24px",minHeight:"24px",padding:0,margin:0},active:g,onClickCapture:e=>{m(e=>!e),e.stopPropagation()}})})]}),(0,p.jsx)(l(En),{rgb:t,hsl:i,hex:n,onChange:o,disableAlpha:s}),(0,p.jsx)(l(Es),{colors:u,onClick:o,onSwatchHover:a})]})};Em.propTypes={disableAlpha:l(vN).bool,width:l(vN).oneOfType([l(vN).string,l(vN).number]),styles:l(vN).object},Em.defaultProps={disableAlpha:!1,width:200,styles:{},presetColors:["#D0021B","#F5A623","#F8E71C","#8B572A","#7ED321","#417505","#BD10E0","#9013FE","#4A90E2","#50E3C2","#B8E986","#000000","#4A4A4A","#9B9B9B","#FFFFFF"]};var Ev=(0,xz.ColorWrap)(Em);let Ey=["#D0021B","#F5A623","#F8E71C","#8B572A","#7ED321","#417505","#BD10E0","#9013FE","#4A90E2","#50E3C2","#B8E986","#000000","#4A4A4A","#9B9B9B","#FFFFFF"].reverse(),Eb=e=>{let t=[];e.pages.forEach(e=>{e.children.forEach(e=>{"text"===e.type&&t.push(e.fill),"svg"===e.type&&t.push(...e.colorsReplace.values())})});let n=[];return t.forEach(e=>{if(iC(e)){let{stops:t}=ik(e);n.push(...t.map(e=>e.color))}else n.push(e)}),[...new Set(n)]},Ew=at("div")`
|
|
124
|
+
`,gM=({type:e,usedItems:t,components:n})=>{let r=[];return Object.keys(n).forEach(n=>{0!==n.toLowerCase().indexOf(e)||t.includes(n)||r.push(n)}),t.filter(e=>!!e).concat(r)},gD=({items:e,itemRender:t})=>{let[n,r]=l(v).useState(0),i=l(v).useRef(null),o=()=>{if(null===i.current)return;let e=i.current.parentElement,t=0;[...i.current.parentElement.children].forEach(e=>{e!==i.current&&(t+=e.offsetWidth)}),r(Math.max(20,e.offsetWidth-t-10))};return l(v).useLayoutEffect(()=>{o()}),l(v).useLayoutEffect(()=>{let e=i.current.parentElement.parentElement;if(window.ResizeObserver){let t=new ResizeObserver(o);return t.observe(e),()=>t.unobserve(e)}{let e=setInterval(o,100);return()=>clearInterval(e)}},[]),(0,p.jsx)(gL,{style:{width:n+"px"},ref:i,className:"bp5-navbar-group bp5-align-left",children:(0,p.jsx)(gj,{items:e,style:{width:"100%"},visibleItemRenderer:t,collapseFrom:gN.END,overflowRenderer:e=>(0,p.jsx)(gw,{content:(0,p.jsx)("div",{style:{padding:"10px",display:"flex"},children:e.map(t)}),position:lV.BOTTOM,children:(0,p.jsx)(fA,{icon:"more",minimal:!0,style:{marginLeft:"10px"}})})})})};h("8NFma");let gF=P(({store:e})=>{let t=e.selectedElements.length>0;return(0,p.jsx)(gC,{content:lT("toolbar.duplicateElements"),disabled:!t,position:"bottom",children:(0,p.jsx)(fA,{icon:"duplicate",minimal:!0,onClick:()=>{let t=[];e.selectedElements.forEach(e=>{let n=e.clone();"group"===e.type?n.children.forEach(e=>{e.set({x:e.x+50,y:e.y+50})}):n.set({x:e.x+50,y:e.y+50}),t.push(n.id)}),e.selectElements(t)},disabled:!t})})});h("8NFma");let gz=P(({store:e})=>{let t=e.selectedElements.filter(e=>e.removable);return(0,p.jsx)(gC,{content:lT("toolbar.removeElements"),disabled:!t.length,position:"bottom",children:(0,p.jsx)(fA,{icon:"trash",minimal:!0,onClick:()=>{e.deleteElements(t.map(e=>e.id))},disabled:!t.length,style:{marginLeft:"auto"}})})});h("8NFma");var lD=h("gztBd"),v=h("8NFma"),gB=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,lD.__extends)(t,e),t.prototype.render=function(){var e,t=this.props,n=t.className,r=t.children,i=t.large,o=t.small,a=t.ulRef,s=(0,lD.__rest)(t,["className","children","large","small","ulRef"]),u=l(lF)(n,lz.MENU,((e={})[lz.LARGE]=i,e[lz.SMALL]=o,e));return v.createElement("ul",(0,lD.__assign)({role:"menu"},s,{className:u,ref:a}),r)},t.displayName="".concat(fl,".Menu"),t}(fO),lD=h("gztBd"),v=h("8NFma"),lD=h("gztBd"),v=h("8NFma");function gU(e,t){return v.forwardRef(function(n,r){var i=n.className,o=n.children,a=(0,lD.__rest)(n,["className","children"]);return v.createElement(e,(0,lD.__assign)((0,lD.__assign)({},a),{className:l(lF)(t,i),ref:r}),o)})}gU("h1",sT),gU("h2",sT),gU("h3",sT),gU("h4",sT),gU("h5",sT);var gH=gU("h6",sT);gU("blockquote",sO),gU("code",sk),gU("pre",sP),gU("label",u3),gU("ol",sA),gU("ul",sA);var gV=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,lD.__extends)(t,e),t.prototype.render=function(){var e=this.props,t=e.className,n=e.title,r=e.titleId;return null==n?v.createElement("li",{className:l(lF)(lz.MENU_DIVIDER,t),role:"separator"}):v.createElement("li",{className:l(lF)(lz.MENU_HEADER,t),role:"separator"},v.createElement(gH,{id:r},n))},t.displayName="".concat(fl,".MenuDivider"),t}(v.Component),lD=h("gztBd"),v=h("8NFma"),lD=h("gztBd"),v=h("8NFma"),fb=h("leH9B"),gq=v.forwardRef(function(e,t){var n=e.size>=fb.IconSize.LARGE,r=n?fb.IconSize.LARGE:fb.IconSize.STANDARD,i="".concat(-1*r/.05/2);return v.createElement(fS,(0,lD.__assign)({iconName:"caret-right",ref:t},e),v.createElement("path",{d:n?"M280 200C280 206.2 277 211.4 272.6 215.2L272.8 215.4L152.8 315.4L152.6 315.2C149.2 318 144.8 320 140 320C129 320 120 311 120 300V100C120 89 129 80 140 80C144.8 80 149.2 82 152.6 84.8L152.8 84.6L272.8 184.6L272.6 184.8C277 188.6 280 193.8 280 200z":"M220 160C220 163 218.6 165.6 216.6 167.4L216.6 167.4L136.6 237.4L136.6 237.4C134.8 239 132.6 240 130 240C124.4 240 120 235.6 120 230V90C120 84.4 124.4 80 130 80C132.6 80 134.8 81 136.6 82.6C136.6 82.6 136.6 82.6 136.6 82.6L216.6 152.6L216.6 152.6C218.6 154.4 220 157 220 160z",fillRule:"evenodd","transform-origin":"center",transform:"scale(0.05, -0.05) translate(".concat(i,", ").concat(i,")")}))});gq.defaultProps={size:fb.IconSize.STANDARD},gq.displayName="Blueprint5.Icon.CaretRight";var lD=h("gztBd"),v=h("8NFma"),fb=h("leH9B"),gG=v.forwardRef(function(e,t){var n=e.size>=fb.IconSize.LARGE,r=n?fb.IconSize.LARGE:fb.IconSize.STANDARD,i="".concat(-1*r/.05/2);return v.createElement(fS,(0,lD.__assign)({iconName:"small-tick",ref:t},e),v.createElement("path",{d:n?"M300 300C294.4000000000001 300 289.4000000000001 297.8 285.8 294.2L160 168.2L114.2 214.2C110.6 217.8 105.6 220 100 220C89 220 80 211 80 200C80 194.4 82.2 189.4 85.8 185.8L145.8 125.8C149.4 122.2 154.4 120 160 120S170.6 122.2 174.2 125.8L314.2000000000001 265.8C317.8 269.4 320 274.4 320 280C320 291 311 300 300 300z":"M240 220C234.4 220 229.4 217.8 225.8 214.2L140 128.2L94.2 174.2C90.6 177.8 85.6 180 80 180C69 180 60 171 60 160C60 154.4 62.2 149.4 65.8 145.8L125.8 85.8C129.4 82.2 134.4 80 140 80S150.6 82.2 154.2 85.8L254.2 185.8C257.8 189.4 260 194.4 260 200C260 211 251 220 240 220z",fillRule:"evenodd","transform-origin":"center",transform:"scale(0.05, -0.05) translate(".concat(i,", ").concat(i,")")}))});gG.defaultProps={size:fb.IconSize.STANDARD},gG.displayName="Blueprint5.Icon.SmallTick";var gW=v.forwardRef(function(e,t){var n,r,i=e.active,o=e.className,a=e.children,s=e.disabled,u=e.icon,c=e.intent,d=e.labelClassName,h=e.labelElement,f=e.multiline,p=e.popoverProps,g=e.roleStructure,m=void 0===g?"menuitem":g,y=e.selected,b=e.shouldDismissPopover,w=e.submenuProps,x=e.text,_=e.textClassName,E=e.tagName,S=e.htmlTitle,C=(0,lD.__rest)(e,["active","className","children","disabled","icon","intent","labelClassName","labelElement","multiline","popoverProps","roleStructure","selected","shouldDismissPopover","submenuProps","text","textClassName","tagName","htmlTitle"]),O="listoption"===m?["option",void 0,!!y]:"menuitem"===m?["none","menuitem",void 0]:"none"===m?["none",void 0,void 0]:[void 0,void 0,void 0],k=O[0],P=O[1],T=O[2],A="listoption"===m,N=A&&y,j=null!=u,R=null!=a,I=lz.intentClass(c),L=l(lF)(lz.MENU_ITEM,I,((n={})[lz.ACTIVE]=i,n[lz.DISABLED]=s,n[lz.POPOVER_DISMISS]=b&&!s&&!R,n[lz.MENU_ITEM_IS_SELECTABLE]=A,n[lz.SELECTED]=N,n),o),M=null==e.label&&null==h?null:v.createElement("span",{className:l(lF)(lz.MENU_ITEM_LABEL,d)},e.label,h),D=v.createElement(void 0===E?"a":E,(0,lD.__assign)((0,lD.__assign)((0,lD.__assign)({onKeyDown:hy(["Enter"," "]),role:R?"none":P,tabIndex:R?-1:0},fu(C)),s?gK:{}),{className:L}),N?v.createElement(gG,{className:lz.MENU_ITEM_SELECTED_ICON}):void 0,j?v.createElement("span",{className:lz.MENU_ITEM_ICON},v.createElement(fC,{icon:u,"aria-hidden":!0,tabIndex:-1})):void 0,v.createElement(fT,{className:l(lF)(lz.FILL,_),ellipsize:!f,title:S},x),M,R?v.createElement(gq,{className:lz.MENU_SUBMENU_ICON,title:"Open sub menu"}):void 0),F=l(lF)(((r={})[lz.MENU_SUBMENU]=R,r));return v.createElement("li",{className:F,ref:t,role:k,"aria-selected":T},null==a?D:v.createElement(gw,(0,lD.__assign)({autoFocus:!1,captureDismiss:!1,disabled:s,enforceFocus:!1,hoverCloseDelay:0,interactionKind:"hover",modifiers:g$,targetProps:{role:P,tabIndex:0},placement:"right-start",usePortal:!1},p,{content:v.createElement(gB,(0,lD.__assign)({},w),a),minimal:!0,popoverClassName:l(lF)(lz.MENU_SUBMENU,null==p?void 0:p.popoverClassName)}),D))});gW.defaultProps={active:!1,disabled:!1,multiline:!1,popoverProps:{},selected:void 0,shouldDismissPopover:!0,text:""},gW.displayName="".concat(fl,".MenuItem");var g$={flip:{options:{rootBoundary:"viewport",padding:20},enabled:!0},offset:{options:{offset:[-5,0]},enabled:!0},preventOverflow:{options:{rootBoundary:"viewport",padding:20},enabled:!0}},gK={"aria-disabled":!0,href:void 0,onClick:void 0,onMouseDown:void 0,onMouseEnter:void 0,onMouseLeave:void 0,tabIndex:-1};let gY=P(({store:e})=>{let t=e.selectedElements.length>0,n=e.selectedElementsIds,r=e.selectedElements.every(e=>e.draggable),i=!e.selectedElements.some(e=>"group"===e.type)&&r;i&&e.selectedElements.length;let o=i&&e.selectedElements.length>1;return(0,p.jsx)(gw,{disabled:!t,content:(0,p.jsxs)(gB,{style:{width:"280px"},children:[(0,p.jsx)(gV,{title:lT("toolbar.layering")}),(0,p.jsxs)("div",{style:{display:"flex"},children:[(0,p.jsxs)("div",{style:{width:"50%"},children:[(0,p.jsx)(gW,{shouldDismissPopover:!1,icon:"chevron-up",text:lT("toolbar.up"),disabled:!e.activePage?.canMoveElementsUp(n),onClick:()=>{e.activePage?.moveElementsUp(n)}}),(0,p.jsx)(gW,{shouldDismissPopover:!1,icon:"double-chevron-up",text:lT("toolbar.toForward"),disabled:!e.activePage?.canMoveElementsTop(n),onClick:()=>{e.activePage?.moveElementsTop(n)}})]}),(0,p.jsxs)("div",{style:{width:"50%"},children:[(0,p.jsx)(gW,{shouldDismissPopover:!1,icon:"chevron-down",text:lT("toolbar.down"),disabled:!e.activePage?.canMoveElementsDown(n),onClick:()=>{e.activePage?.moveElementsDown(n)}}),(0,p.jsx)(gW,{shouldDismissPopover:!1,icon:"double-chevron-down",text:lT("toolbar.toBottom"),disabled:!e.activePage?.canMoveElementsBottom(n),onClick:()=>{e.activePage?.moveElementsBottom(n)}})]})]}),i&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(gV,{title:lT("toolbar.position")}),(0,p.jsxs)("div",{style:{display:"flex"},children:[(0,p.jsxs)("div",{style:{width:"50%"},children:[(0,p.jsx)(gW,{shouldDismissPopover:!1,icon:"alignment-left",text:lT("toolbar.alignLeft"),onClick:()=>{let t=e.activePage?.computedWidth;e.selectedElements.forEach(e=>{t=Math.min(t,ac(e).x)}),1===e.selectedElements.length&&(t=0),e.selectedElements.forEach(e=>{let n=ac(e);e.set({x:e.x-n.x+t})})}}),(0,p.jsx)(gW,{shouldDismissPopover:!1,icon:"alignment-vertical-center",text:lT("toolbar.alignCenter"),onClick:()=>{let t=e.activePage?.computedWidth,n=0;e.selectedElements.forEach(e=>{let r=ac(e);t=Math.min(t,r.x),n=Math.max(n,r.x+r.width)});let r=(n+t)/2;1===e.selectedElements.length&&(r=e.activePage?.computedWidth/2),e.selectedElements.forEach(e=>{let t=ac(e),n=e.x-t.x;e.set({x:r+n-t.width/2})})}}),(0,p.jsx)(gW,{shouldDismissPopover:!1,icon:"alignment-right",text:lT("toolbar.alignRight"),onClick:()=>{let t=0;e.selectedElements.forEach(e=>{let n=ac(e);t=Math.max(t,n.x+n.width)}),1===e.selectedElements.length&&(t=e.activePage?.computedWidth),e.selectedElements.forEach(e=>{let n=ac(e);e.set({x:e.x-n.x+t-n.width})})}})]}),(0,p.jsxs)("div",{style:{width:"50%"},children:[(0,p.jsx)(gW,{shouldDismissPopover:!1,icon:"alignment-top",text:lT("toolbar.alignTop"),onClick:()=>{let t=e.activePage?.computedHeight;e.selectedElements.forEach(e=>{t=Math.min(t,ac(e).y)}),1===e.selectedElements.length&&(t=0),e.selectedElements.forEach(e=>{let n=ac(e);e.set({y:e.y-n.y+t})})}}),(0,p.jsx)(gW,{shouldDismissPopover:!1,icon:"alignment-horizontal-center",text:lT("toolbar.alignMiddle"),onClick:()=>{let t=e.activePage?.computedHeight,n=0;e.selectedElements.forEach(e=>{let r=ac(e);t=Math.min(t,r.y),n=Math.max(n,r.y+r.height)});let r=(n+t)/2;1===e.selectedElements.length&&(r=e.activePage?.computedHeight/2),e.selectedElements.forEach(e=>{let t=ac(e),n=e.y-t.y;e.set({y:r+n-t.height/2})})}}),(0,p.jsx)(gW,{shouldDismissPopover:!1,icon:"alignment-bottom",text:lT("toolbar.alignBottom"),onClick:()=>{let t=0;e.selectedElements.forEach(e=>{let n=ac(e);t=Math.max(t,n.y+n.height)}),1===e.selectedElements.length&&(t=e.activePage?.computedHeight),e.selectedElements.forEach(e=>{let n=ac(e);e.set({y:e.y-n.y+t-n.height})})}})]})]})]}),o&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(gV,{title:lT("toolbar.spaceEvenly")}),(0,p.jsxs)("div",{style:{display:"flex"},children:[(0,p.jsxs)("div",{style:{width:"50%"},children:[" ",(0,p.jsx)(gW,{shouldDismissPopover:!1,icon:"vertical-distribution",text:lT("toolbar.verticalDistribution"),onClick:()=>{let t=e.activePage?.computedHeight,n=0,r=0;e.selectedElements.forEach(e=>{let i=ac(e);t=Math.min(t,i.y),n=Math.max(n,i.y+i.height),r+=i.height});let i=(n-t-r)/(e.selectedElements.length-1),o=e.selectedElements.slice().sort((e,t)=>{let n=ac(e),r=ac(t);return n.y-r.y}),a=0;o.forEach(e=>{let n=ac(e);e.set({y:e.y-n.y+t+a}),a+=n.height+i})}})]}),(0,p.jsx)("div",{style:{width:"50%"},children:(0,p.jsx)(gW,{shouldDismissPopover:!1,icon:"horizontal-distribution",text:lT("toolbar.horizontalDistribution"),onClick:()=>{let t=e.activePage?.computedWidth,n=0,r=0;e.selectedElements.forEach(e=>{let i=ac(e);t=Math.min(t,i.x),n=Math.max(n,i.x+i.width),r+=i.width});let i=(n-t-r)/(e.selectedElements.length-1),o=e.selectedElements.slice().sort((e,t)=>{let n=ac(e),r=ac(t);return n.x-r.x}),a=0;o.forEach(e=>{let n=ac(e);e.set({x:e.x-n.x+t+a}),a+=n.width+i})}})})]})]})]}),children:(0,p.jsx)(fA,{icon:"layers",minimal:!0,text:lT("toolbar.position"),disabled:!t})})});function gX(e,t){return e.classList.contains(t)?e:e.parentElement?gX(e.parentElement,t):null}let gZ=P(({store:e,page:t,components:n,stageRef:r})=>{let i=ad(e.selectedShapes),o=e.selectedShapes.every(e=>e.page===t),a=l(v).useRef(null),[s,u]=l(v).useState(!1),c=e.find(e=>"image"===e.type&&e._cropModeEnabled);l(v).useEffect(()=>{let e=()=>{u(!0)},t=()=>{u(!1)};r?.current?.on("dragstart",e),r?.current?.on("dragend",t);let n=r?.current?.findOne("Transformer");return n?.on("transformstart",e),n?.on("transformend",t),()=>{r?.current?.off("dragstart",e),r?.current?.off("dragend",t),n?.off("transformstart",e),n?.off("transformend",t)}},[]);let[d,h]=l(v).useState({fit:!0,needCalculate:!1,token:Math.random()});if(l(v).useEffect(()=>{0!==e.selectedElements.length&&h({fit:!0,needCalculate:!0,token:Math.random()})},[e.selectedElements,s]),l(v).useEffect(()=>{setTimeout(()=>{if(!a.current||!d.needCalculate)return;let e=gX(a.current,"polotno-workspace-container");if(!e)return;let t=e.getBoundingClientRect(),n=a.current.getBoundingClientRect();n.right,t.left;let r=n.top-t.top;n.left,t.left;let i=n.bottom-t.top;r<20&&d.fit&&h({fit:!1,needCalculate:!1,token:d.token}),i-t.height>-20&&!d.fit&&h({fit:!0,needCalculate:!1,token:d.token})},10)},[d.needCalculate,a.current,d.token]),l(v).useEffect(()=>{let t=gX(r.current.content,"polotno-workspace-inner"),n=()=>{e.selectedElements.length&&h({fit:!0,needCalculate:!0,token:Math.random()})};return t?.addEventListener("scroll",n),()=>{t?.removeEventListener("scroll",n)}},[]),0===e.selectedShapes.length||s||!o||e.activePage!==t||c)return null;let f=n?.Position||gY,g=n?.Duplicate||gF,m=n?.Remove||gz,y=gM({components:n,type:e.selectedElements[0].type,usedItems:[]}),b=r?.current?.findOne("Transformer")?.rotation()||0,w=30;return 5>Math.abs(b)&&d.fit&&(w=80),Math.abs(b)>160&&!d.fit&&(w=80),(0,p.jsx)(r3,{transformFunc:e=>{let t=i.x+i.width/2,n=d.fit?i.y*e.scaleY-w:i.y*e.scaleY+i.height*e.scaleY+w;return{...e,x:e.x+t*e.scaleX,y:e.y+n,scaleX:1,scaleY:1}},divProps:{style:{pointerEvents:"none"}},children:(0,p.jsx)("div",{ref:a,style:{pointerEvents:"none"},children:(0,p.jsx)(gA,{style:{padding:"2px",borderRadius:"5px",height:"34px",transform:"translate(-50%, -50%)",pointerEvents:"auto"},children:(0,p.jsxs)(gP,{style:{height:"30px"},children:[y.map(t=>{let r=n[t];return(0,p.jsx)(r,{elements:e.selectedElements,element:e.selectedElements[0],store:e},t)}),(0,p.jsx)(g,{store:e}),(0,p.jsx)(m,{store:e}),(0,p.jsx)(f,{store:e})]})})})})});var gQ=({components:e,...t})=>((e=e||{}).PageControls=e.PageControls??gO,e.Tooltip=e.Tooltip??gZ,(0,p.jsx)(lM,{...t,components:e})),v=h("8NFma"),lD=h("gztBd"),v=h("8NFma"),gJ=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,lD.__extends)(t,e),t.prototype.render=function(){var e=this.props,t=e.className,n=e.tagName,r=(0,lD.__rest)(e,["className","tagName"]),i=l(lF)(up,t);return v.createElement(void 0===n?"div":n,(0,lD.__assign)((0,lD.__assign)({},r),{className:i}))},t.displayName="".concat(fl,".Divider"),t}(fO);h("8NFma");let g0=P(({store:e})=>(0,p.jsxs)(gA.Group,{align:lB.LEFT,children:[(0,p.jsx)(fA,{icon:"undo",minimal:!0,onClick:()=>{e.history.undo()},disabled:!e.history.canUndo}),(0,p.jsx)(fA,{icon:"redo",minimal:!0,onClick:()=>{e.history.redo()},disabled:!e.history.canRedo})]}));var v=h("8NFma"),lD=h("gztBd"),v=h("8NFma"),g1=v.forwardRef(function(e,t){var n,r=e.alignText,i=e.className,o=e.fill,a=e.minimal,s=e.large,u=e.vertical,c=(0,lD.__rest)(e,["alignText","className","fill","minimal","large","vertical"]),d=l(lF)(lz.BUTTON_GROUP,((n={})[lz.FILL]=o,n[lz.LARGE]=s,n[lz.MINIMAL]=a,n[lz.VERTICAL]=u,n),lz.alignmentClass(r),i);return v.createElement("div",(0,lD.__assign)({},c,{ref:t,className:d}),e.children)});g1.displayName="".concat(fl,".ButtonGroup");var lD=h("gztBd"),v=h("8NFma"),lD=h("gztBd"),v=h("8NFma"),g2=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.state={hasPendingUpdate:!1,isComposing:!1,nextValue:n.props.value,value:n.props.value},n.cancelPendingCompositionEnd=null,n.handleCompositionStart=function(e){var t,r,i;null===(t=n.cancelPendingCompositionEnd)||void 0===t||t.call(n),n.setState({isComposing:!0}),null===(i=(r=n.props).onCompositionStart)||void 0===i||i.call(r,e)},n.handleCompositionEnd=function(e){var r,i;n.cancelPendingCompositionEnd=n.setTimeout(function(){return n.setState({isComposing:!1})},t.COMPOSITION_END_DELAY),null===(i=(r=n.props).onCompositionEnd)||void 0===i||i.call(r,e)},n.handleChange=function(e){var t,r,i=e.target.value;n.setState({nextValue:i}),null===(r=(t=n.props).onChange)||void 0===r||r.call(t,e)},n}return(0,lD.__extends)(t,e),t.getDerivedStateFromProps=function(e,t){return t.isComposing||void 0===e.value?null:t.nextValue!==t.value?e.value===t.nextValue?t.hasPendingUpdate?{value:e.value,hasPendingUpdate:!1}:{value:t.nextValue}:e.value===t.value?{hasPendingUpdate:!0}:{value:e.value,nextValue:e.value,hasPendingUpdate:!1}:{value:e.value,nextValue:e.value,hasPendingUpdate:!1}},t.prototype.render=function(){var e=this.state,t=e.isComposing,n=e.hasPendingUpdate,r=e.value,i=e.nextValue,o=this.props,a=o.inputRef,l=(0,lD.__rest)(o,["inputRef"]);return v.createElement("input",(0,lD.__assign)({},l,{ref:a,value:t||n?i:r,onCompositionStart:this.handleCompositionStart,onCompositionEnd:this.handleCompositionEnd,onChange:this.handleChange}))},t.displayName="".concat(fl,".AsyncControllableInput"),t.COMPOSITION_END_DELAY=10,t}(fO),g3=["onValueChange"],g5=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={},t.leftElement=null,t.rightElement=null,t.refHandlers={leftElement:function(e){return t.leftElement=e},rightElement:function(e){return t.rightElement=e}},t.handleInputChange=function(e){var n,r,i,o,a=e.target.value;null===(r=(n=t.props).onChange)||void 0===r||r.call(n,e),null===(o=(i=t.props).onValueChange)||void 0===o||o.call(i,a,e.target)},t}return(0,lD.__extends)(t,e),t.prototype.render=function(){var e,t=this.props,n=t.asyncControl,r=t.className,i=t.disabled,o=t.fill,a=t.inputClassName,s=t.inputRef,u=t.intent,c=t.large,d=t.readOnly,h=t.round,f=t.small,p=t.tagName,g=l(lF)(lz.INPUT_GROUP,lz.intentClass(u),((e={})[lz.DISABLED]=i,e[lz.READ_ONLY]=d,e[lz.FILL]=o,e[lz.LARGE]=c,e[lz.SMALL]=f,e[lz.ROUND]=h,e),r),m=(0,lD.__assign)((0,lD.__assign)({},this.props.style),{paddingLeft:this.state.leftElementWidth,paddingRight:this.state.rightElementWidth}),y=(0,lD.__assign)((0,lD.__assign)({type:"text"},fu(this.props,g3,!0)),{"aria-disabled":i,className:l(lF)(lz.INPUT,a),onChange:this.handleInputChange,style:m}),b=void 0!==n&&n?v.createElement(g2,(0,lD.__assign)({},y,{inputRef:s})):v.createElement("input",(0,lD.__assign)({},y,{ref:s}));return v.createElement(void 0===p?"div":p,{className:g},this.maybeRenderLeftElement(),b,this.maybeRenderRightElement())},t.prototype.componentDidMount=function(){this.updateInputWidth()},t.prototype.componentDidUpdate=function(e){var t=this.props,n=t.leftElement,r=t.rightElement;(e.leftElement!==n||e.rightElement!==r)&&this.updateInputWidth()},t.prototype.validateProps=function(e){null!=e.leftElement&&null!=e.leftIcon&&console.warn(hE)},t.prototype.maybeRenderLeftElement=function(){var e=this.props,t=e.leftElement,n=e.leftIcon;return null!=t?v.createElement("span",{className:lz.INPUT_LEFT_CONTAINER,ref:this.refHandlers.leftElement},t):null!=n?v.createElement(fC,{icon:n,"aria-hidden":!0,tabIndex:-1}):void 0},t.prototype.maybeRenderRightElement=function(){var e=this.props.rightElement;if(null!=e)return v.createElement("span",{className:lz.INPUT_ACTION,ref:this.refHandlers.rightElement},e)},t.prototype.updateInputWidth=function(){var e=this.state,t=e.leftElementWidth,n=e.rightElementWidth;if(null!=this.leftElement){var r=this.leftElement.clientWidth;(void 0===t||Math.abs(r-t)>2)&&this.setState({leftElementWidth:r})}else this.setState({leftElementWidth:void 0});if(null!=this.rightElement){var r=this.rightElement.clientWidth;(void 0===n||Math.abs(r-n)>2)&&this.setState({rightElementWidth:r})}else this.setState({rightElementWidth:void 0})},t.displayName="".concat(fl,".InputGroup"),t}(fO),lD=h("gztBd"),v=h("8NFma"),lD=h("gztBd"),v=h("8NFma"),fb=h("leH9B"),g6=v.forwardRef(function(e,t){var n=e.size>=fb.IconSize.LARGE,r=n?fb.IconSize.LARGE:fb.IconSize.STANDARD,i="".concat(-1*r/.05/2);return v.createElement(fS,(0,lD.__assign)({iconName:"chevron-down",ref:t},e),v.createElement("path",{d:n?"M320 280C314.4000000000001 280 309.4000000000001 277.8 305.8 274.2L200 168.2L94.2 274.2C90.6 277.8 85.6 280 80 280C69 280 60 271 60 260C60 254.4 62.2 249.4 65.8 245.8L185.8 125.8C189.4 122.2 194.4 120 200 120S210.6 122.2 214.2 125.8L334.2000000000001 245.8C337.8 249.4 340 254.4 340 260C340 271 331 280 320 280z":"M240 220C234.4 220 229.4 217.8 225.8 214.2L160 148.2L94.2 214.2C90.6 217.8 85.6 220 80 220C69 220 60 211 60 200C60 194.4 62.2 189.4 65.8 185.8L145.8 105.8C149.4 102.2 154.4 100 160 100S170.6 102.2 174.2 105.8L254.2 185.8C257.8 189.4 260 194.4 260 200C260 211 251 220 240 220z",fillRule:"evenodd","transform-origin":"center",transform:"scale(0.05, -0.05) translate(".concat(i,", ").concat(i,")")}))});g6.defaultProps={size:fb.IconSize.STANDARD},g6.displayName="Blueprint5.Icon.ChevronDown";var lD=h("gztBd"),v=h("8NFma"),fb=h("leH9B"),g4=v.forwardRef(function(e,t){var n=e.size>=fb.IconSize.LARGE,r=n?fb.IconSize.LARGE:fb.IconSize.STANDARD,i="".concat(-1*r/.05/2);return v.createElement(fS,(0,lD.__assign)({iconName:"chevron-up",ref:t},e),v.createElement("path",{d:n?"M334.2000000000001 154.2L214.2 274.2000000000001C210.6 277.8 205.6 280 200 280S189.4 277.8 185.8 274.2L65.8 154.2C62.2 150.6 60 145.6 60 140C60 129 69 120 80 120C85.6 120 90.6 122.2 94.2 125.8L200 231.8L305.8 126C309.4000000000001 122.2 314.4000000000001 120 320 120C331 120 340 129 340 140C340 145.6 337.8 150.6 334.2000000000001 154.2z":"M254.2 134.2L174.2 214.2C170.6 217.8 165.6 220 160 220S149.4 217.8 145.8 214.2L65.8 134.2C62.2 130.6 60 125.6 60 120C60 109 69 100 80 100C85.6 100 90.6 102.2 94.2 105.8L160 171.8L225.8 106C229.4 102.2 234.4 100 240 100C251 100 260 109 260 120C260 125.6 257.8 130.6 254.2 134.2z",fillRule:"evenodd","transform-origin":"center",transform:"scale(0.05, -0.05) translate(".concat(i,", ").concat(i,")")}))});g4.defaultProps={size:fb.IconSize.STANDARD},g4.displayName="Blueprint5.Icon.ChevronUp";var lD=h("gztBd"),v=h("8NFma"),g8=v.forwardRef(function(e,t){var n,r=e.children,i=e.className,o=e.fill,a=e.vertical,s=(0,lD.__rest)(e,["children","className","fill","vertical"]),u=l(lF)(lz.CONTROL_GROUP,((n={})[lz.FILL]=o,n[lz.VERTICAL]=a,n),i);return v.createElement("div",(0,lD.__assign)({},s,{ref:t,className:u}),r)});function g9(e){var t=1.9.toLocaleString(e),n=1..toLocaleString(e),r=9..toLocaleString(e),i=new RegExp("".concat(n,"(.+)").concat(r)).exec(t);return i&&i[1]||"."}function g7(e,t){return void 0===t&&(t="en-US"),mn(e.toLocaleString(t,{roundingPriority:"morePrecision"}),t)}function me(e,t){var n=""+e;if(parseFloat(n).toString()===e.toString())return e.toString();if(void 0!==t){var r=g9(t);return mn(n,t).split("").map(function(e){var n;return -1!==(n=[0,1,2,3,4,5,6,7,8,9].map(function(e){return e.toLocaleString(t)}).indexOf(e))?n:e}).join("").replace(r,".")}return e.toString()}function mt(e,t){if(void 0===t)return/^[Ee0-9\+\-\.]$/.test(e);var n=g9(t).replace(".","\\.");return RegExp("^[Ee"+[0,1,2,3,4,5,6,7,8,9].map(function(e){return e.toLocaleString(t)}).join("")+"\\+\\-"+n+"]$").test(e)}function mn(e,t){return e.replace(/[\uFF10-\uFF19]/g,function(e){return String.fromCharCode(e.charCodeAt(0)-65248)}).split("").filter(function(e){return mt(e,t)}).join("")}g8.displayName="".concat(fl,".ControlGroup"),(ks=kM||(kM={}))[ks.DOWN=-1]="DOWN",ks[ks.UP=1]="UP";var mr=["allowNumericCharactersOnly","buttonPosition","clampValueOnBlur","className","defaultValue","majorStepSize","minorStepSize","onButtonClick","onValueChange","selectAllOnFocus","selectAllOnIncrement","stepSize"],mi=function(e){function t(){var n,r,i=e.apply(this,arguments)||this;return i.numericInputId=ht.uniqueId("numericInput"),i.state={currentImeInputInvalid:!1,shouldSelectAfterUpdate:!1,stepMaxPrecision:t.getStepMaxPrecision(i.props),value:(void 0===(n=null!==(r=i.props.value)&&void 0!==r?r:i.props.defaultValue)&&(n=""),n.toString())},i.didPasteEventJustOccur=!1,i.delta=0,i.inputElement=null,i.inputRef=fa(i,"inputElement",i.props.inputRef),i.incrementButtonHandlers=i.getButtonEventHandlers(kM.UP),i.decrementButtonHandlers=i.getButtonEventHandlers(kM.DOWN),i.getCurrentValueAsNumber=function(){return Number(me(i.state.value,i.props.locale))},i.handleButtonClick=function(e,t){var n,r,o=i.updateDelta(t,e),a=i.incrementValue(o);null===(r=(n=i.props).onButtonClick)||void 0===r||r.call(n,Number(me(a,i.props.locale)),a)},i.stopContinuousChange=function(){i.delta=0,i.clearTimeouts(),clearInterval(i.intervalId),document.removeEventListener("mouseup",i.stopContinuousChange)},i.handleContinuousChange=function(){if(void 0!==i.props.min||void 0!==i.props.max){var e,t,n,r,o=null!==(e=i.props.min)&&void 0!==e?e:-1/0,a=null!==(t=i.props.max)&&void 0!==t?t:1/0,l=i.getCurrentValueAsNumber();if(l<=o||l>=a){i.stopContinuousChange();return}}var s=i.incrementValue(i.delta);null===(r=(n=i.props).onButtonClick)||void 0===r||r.call(n,Number(me(s,i.props.locale)),s)},i.handleInputFocus=function(e){var t,n;i.setState({shouldSelectAfterUpdate:i.props.selectAllOnFocus}),null===(n=(t=i.props).onFocus)||void 0===n||n.call(t,e)},i.handleInputBlur=function(e){var t,n;if(i.setState({shouldSelectAfterUpdate:!1}),i.props.clampValueOnBlur){var r=e.target.value;i.handleNextValue(i.roundAndClampValue(r))}null===(n=(t=i.props).onBlur)||void 0===n||n.call(t,e)},i.handleInputKeyDown=function(e){if(!i.props.disabled&&!i.props.readOnly){if("ArrowUp"===e.key?r=kM.UP:"ArrowDown"===e.key&&(r=kM.DOWN),void 0!==r){e.preventDefault();var t,n,r,o=i.updateDelta(r,e);i.incrementValue(o)}null===(n=(t=i.props).onKeyDown)||void 0===n||n.call(t,e)}},i.handleCompositionEnd=function(e){i.props.allowNumericCharactersOnly&&(i.handleNextValue(mn(e.data,i.props.locale)),i.setState({currentImeInputInvalid:!1}))},i.handleCompositionUpdate=function(e){if(i.props.allowNumericCharactersOnly){var t=e.data;0===mn(t,i.props.locale).length&&t.length>0?i.setState({currentImeInputInvalid:!0}):i.setState({currentImeInputInvalid:!1})}},i.handleInputKeyPress=function(e){var t,n,r;i.props.allowNumericCharactersOnly&&(r=i.props.locale,!(null==e.key||e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||mt(e.key,r)))&&e.preventDefault(),null===(n=(t=i.props).onKeyPress)||void 0===n||n.call(t,e)},i.handleInputPaste=function(e){var t,n;i.didPasteEventJustOccur=!0,null===(n=(t=i.props).onPaste)||void 0===n||n.call(t,e)},i.handleInputChange=function(e){var t=e;i.props.allowNumericCharactersOnly&&i.didPasteEventJustOccur&&(i.didPasteEventJustOccur=!1,t=mn(e,i.props.locale)),i.handleNextValue(t),i.setState({shouldSelectAfterUpdate:!1})},i}return(0,lD.__extends)(t,e),t.getDerivedStateFromProps=function(e,n){var r,i,o={prevMaxProp:e.max,prevMinProp:e.min},a=e.min!==n.prevMinProp,l=e.max!==n.prevMaxProp,s=null!==(i=null===(r=e.value)||void 0===r?void 0:r.toString())&&void 0!==i?i:n.value,u=t.getStepMaxPrecision(e),c=s!==t.VALUE_EMPTY?t.roundAndClampValue(s,u,e.min,e.max,0,e.locale):t.VALUE_EMPTY;return(a||l)&&c!==n.value?(0,lD.__assign)((0,lD.__assign)({},o),{stepMaxPrecision:u,value:c}):(0,lD.__assign)((0,lD.__assign)({},o),{stepMaxPrecision:u,value:s})},t.getStepMaxPrecision=function(e){return null!=e.minorStepSize?ht.countDecimalPlaces(e.minorStepSize):ht.countDecimalPlaces(e.stepSize)},t.roundAndClampValue=function(e,n,r,i,o,a){var l,s;return(void 0===o&&(o=0),l=me(e,a),null!=e&&l-parseFloat(l)+1>=0)?g7(h1(Math.round((Number(me(e,a))+o)*(s=Math.pow(10,n)))/s,null!=r?r:-1/0,null!=i?i:1/0),a):t.VALUE_EMPTY},t.prototype.render=function(){var e,t=this.props,n=t.buttonPosition,r=t.className,i=t.fill,o=t.large,a=t.small,s=l(lF)(lz.NUMERIC_INPUT,((e={})[lz.LARGE]=o,e[lz.SMALL]=a,e),r),u=this.renderButtons();return v.createElement(g8,{className:s,fill:i},n===lV.LEFT&&u,this.renderInput(),n===lV.RIGHT&&u)},t.prototype.componentDidUpdate=function(n,r){e.prototype.componentDidUpdate.call(this,n,r),n.inputRef!==this.props.inputRef&&(fr(n.inputRef,null),this.inputRef=fa(this,"inputElement",this.props.inputRef),fr(this.props.inputRef,this.inputElement)),this.state.shouldSelectAfterUpdate&&(null===(i=this.inputElement)||void 0===i||i.setSelectionRange(0,this.state.value.length));var i,o,a,l=this.props.min!==n.min,s=this.props.max!==n.max,u=this.props.locale!==n.locale,c=this.state.value!==r.value;if((l||s)&&c||u&&r.value!==t.VALUE_EMPTY){var d=me(u?r.value:this.state.value,n.locale),h=g7(+d,this.props.locale);null===(a=(o=this.props).onValueChange)||void 0===a||a.call(o,+d,h,this.inputElement)}},t.prototype.validateProps=function(e){var n=e.majorStepSize,r=e.max,i=e.min,o=e.minorStepSize,a=e.stepSize,l=e.value;if(null!=i&&null!=r&&i>r&&console.error(hS),a<=0&&console.error(hT),o&&o<=0&&console.error(hk),n&&n<=0&&console.error(hP),o&&o>a&&console.error(hC),n&&n<a&&console.error(hO),null!=l){var s=t.getStepMaxPrecision(e),u=t.roundAndClampValue(l.toString(),s,i,r,0,this.props.locale),c=u!==l.toString(),d=g7(Number(me(l,this.props.locale)),this.props.locale);c&&u!==d&&console.warn(hA)}},t.prototype.renderButtons=function(){var e=this.props,t=e.intent,n=e.max,r=e.min,i=e.locale,o=me(this.state.value,i),a=this.props.disabled||this.props.readOnly;return v.createElement(g1,{className:lz.FIXED,key:"button-group",vertical:!0},v.createElement(fA,(0,lD.__assign)({"aria-label":"increment","aria-controls":this.numericInputId,disabled:a||void 0!==n&&""!==o&&+o>=n,icon:v.createElement(g4,null),intent:t},this.incrementButtonHandlers)),v.createElement(fA,(0,lD.__assign)({"aria-label":"decrement","aria-controls":this.numericInputId,disabled:a||void 0!==r&&""!==o&&+o<=r,icon:v.createElement(g6,null),intent:t},this.decrementButtonHandlers)))},t.prototype.renderInput=function(){var e=fu(this.props,mr,!0),t=this.getCurrentValueAsNumber();return v.createElement(g5,(0,lD.__assign)({asyncControl:this.props.asyncControl,autoComplete:"off",id:this.numericInputId,role:this.props.allowNumericCharactersOnly?"spinbutton":void 0},e,{"aria-valuemax":this.props.max,"aria-valuemin":this.props.min,"aria-valuenow":t,intent:this.state.currentImeInputInvalid?lH.DANGER:this.props.intent,inputClassName:this.props.inputClassName,inputRef:this.inputRef,large:this.props.large,leftElement:this.props.leftElement,leftIcon:this.props.leftIcon,onFocus:this.handleInputFocus,onBlur:this.handleInputBlur,onCompositionEnd:this.handleCompositionEnd,onCompositionUpdate:this.handleCompositionUpdate,onKeyDown:this.handleInputKeyDown,onKeyPress:this.handleInputKeyPress,onPaste:this.handleInputPaste,onValueChange:this.handleInputChange,rightElement:this.props.rightElement,small:this.props.small,value:this.state.value}))},t.prototype.getButtonEventHandlers=function(e){var t=this;return{onKeyDown:function(n){!t.props.disabled&&ht.isKeyboardClick(n)&&t.handleButtonClick(n,e)},onMouseDown:function(n){t.props.disabled||(t.handleButtonClick(n,e),t.startContinuousChange())}}},t.prototype.startContinuousChange=function(){var e=this;document.addEventListener("mouseup",this.stopContinuousChange),this.setTimeout(function(){e.intervalId=window.setInterval(e.handleContinuousChange,t.CONTINUOUS_CHANGE_INTERVAL)},t.CONTINUOUS_CHANGE_DELAY)},t.prototype.handleNextValue=function(e){var t,n;null==this.props.value&&this.setState({value:e}),null===(n=(t=this.props).onValueChange)||void 0===n||n.call(t,Number(me(e,this.props.locale)),e,this.inputElement)},t.prototype.incrementValue=function(e){var n=this.state.value===t.VALUE_EMPTY?t.VALUE_ZERO:this.state.value,r=this.roundAndClampValue(n,e);return r!==this.state.value&&(this.handleNextValue(r),this.setState({shouldSelectAfterUpdate:this.props.selectAllOnIncrement})),r},t.prototype.getIncrementDelta=function(e,t,n){var r=this.props,i=r.majorStepSize,o=r.minorStepSize,a=r.stepSize;return t&&null!=i?e*i:n&&null!=o?e*o:e*a},t.prototype.roundAndClampValue=function(e,n){return void 0===n&&(n=0),t.roundAndClampValue(e,this.state.stepMaxPrecision,this.props.min,this.props.max,n,this.props.locale)},t.prototype.updateDelta=function(e,t){return this.delta=this.getIncrementDelta(e,t.shiftKey,t.altKey),this.delta},t.displayName="".concat(fl,".NumericInput"),t.VALUE_EMPTY="",t.VALUE_ZERO="0",t.defaultProps={allowNumericCharactersOnly:!0,buttonPosition:lV.RIGHT,clampValueOnBlur:!1,defaultValue:t.VALUE_EMPTY,large:!1,majorStepSize:10,minorStepSize:.1,selectAllOnFocus:!1,selectAllOnIncrement:!1,small:!1,stepSize:1},t.CONTINUOUS_CHANGE_DELAY=300,t.CONTINUOUS_CHANGE_INTERVAL=100,t}(fO),lD=h("gztBd"),v=h("8NFma"),lD=h("gztBd"),v=h("8NFma"),lD=h("gztBd"),v=h("8NFma");function mo(e){return"".concat((100*e).toFixed(2),"%")}function ma(e,t,n,r){for(var i=t<n?1:-1,o=t;o!==n+i;o+=i)e[o]=r}var ml=["max","min","stepSize","tickSize","value"],ms=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={isMoving:!1},t.handleElement=null,t.refHandlers={handle:function(e){return t.handleElement=e}},t.beginHandleMovement=function(e){document.addEventListener("mousemove",t.handleHandleMovement),document.addEventListener("mouseup",t.endHandleMovement),t.setState({isMoving:!0}),t.changeValue(t.clientToValue(t.mouseEventClientOffset(e)))},t.beginHandleTouchMovement=function(e){document.addEventListener("touchmove",t.handleHandleTouchMovement),document.addEventListener("touchend",t.endHandleTouchMovement),document.addEventListener("touchcancel",t.endHandleTouchMovement),t.setState({isMoving:!0}),t.changeValue(t.clientToValue(t.touchEventClientOffset(e)))},t.getStyleProperties=function(){if(null==t.handleElement)return{};var e=t.props,n=e.min,r=e.tickSizeRatio,i=e.value,o=e.vertical,a=t.getHandleMidpointAndOffset(t.handleElement,!0).handleMidpoint,l="calc(".concat(mo((i-(void 0===n?0:n))*r)," - ").concat(a,"px)");return o?{bottom:l}:{left:l}},t.endHandleMovement=function(e){t.handleMoveEndedAt(t.mouseEventClientOffset(e))},t.endHandleTouchMovement=function(e){t.handleMoveEndedAt(t.touchEventClientOffset(e))},t.handleMoveEndedAt=function(e){t.removeDocumentEventListeners(),t.setState({isMoving:!1});var n,r,i=t.changeValue(t.clientToValue(e));null===(r=(n=t.props).onRelease)||void 0===r||r.call(n,i)},t.handleHandleMovement=function(e){t.handleMovedTo(t.mouseEventClientOffset(e))},t.handleHandleTouchMovement=function(e){t.handleMovedTo(t.touchEventClientOffset(e))},t.handleMovedTo=function(e){t.state.isMoving&&!t.props.disabled&&t.changeValue(t.clientToValue(e))},t.handleKeyDown=function(e){var n=t.props,r=n.stepSize,i=n.value,o=e.key;"ArrowDown"===o||"ArrowLeft"===o?(t.changeValue(i-r),e.preventDefault()):("ArrowUp"===o||"ArrowRight"===o)&&(t.changeValue(i+r),e.preventDefault())},t.handleKeyUp=function(e){var n,r;ht.isArrowKey(e)&&(null===(r=(n=t.props).onRelease)||void 0===r||r.call(n,t.props.value))},t}return(0,lD.__extends)(t,e),t.prototype.componentDidMount=function(){this.forceUpdate()},t.prototype.render=function(){var e,t=this.props,n=t.className,r=t.disabled,i=t.label,o=t.min,a=t.max,s=t.value,u=t.vertical,c=t.htmlProps,d=this.state.isMoving;return v.createElement("span",(0,lD.__assign)({role:"slider",tabIndex:0},c,{className:l(lF)(lz.SLIDER_HANDLE,((e={})[lz.ACTIVE]=d,e),n),onKeyDown:r?void 0:this.handleKeyDown,onKeyUp:r?void 0:this.handleKeyUp,onMouseDown:r?void 0:this.beginHandleMovement,onTouchStart:r?void 0:this.beginHandleTouchMovement,ref:this.refHandlers.handle,style:this.getStyleProperties(),"aria-valuemin":o,"aria-valuemax":a,"aria-valuenow":s,"aria-disabled":r,"aria-orientation":u?"vertical":"horizontal"}),null==i?null:v.createElement("span",{className:lz.SLIDER_LABEL},i))},t.prototype.componentWillUnmount=function(){this.removeDocumentEventListeners()},t.prototype.clientToValue=function(e){var t=this.props,n=t.stepSize,r=t.tickSize,i=t.value,o=t.vertical;if(null==this.handleElement)return i;var a=(o?window.innerHeight-e:e)-this.getHandleElementCenterPixel(this.handleElement);return isNaN(a)?i:i+Math.round(a/(r*n))*n},t.prototype.mouseEventClientOffset=function(e){return this.props.vertical?e.clientY:e.clientX},t.prototype.touchEventClientOffset=function(e){var t=e.changedTouches[0];return this.props.vertical?t.clientY:t.clientX},t.prototype.validateProps=function(e){for(var t=0;t<ml.length;t++){var n=ml[t];if("number"!=typeof e[n])throw Error("[Blueprint] <Handle> requires number value for ".concat(n," prop"))}},t.prototype.changeValue=function(e,t){return void 0===t&&(t=this.props.onChange),isNaN(e=this.clamp(e))||this.props.value===e||null==t||t(e),e},t.prototype.clamp=function(e){return h1(e,this.props.min,this.props.max)},t.prototype.getHandleElementCenterPixel=function(e){var t=this.getHandleMidpointAndOffset(e),n=t.handleMidpoint;return t.handleOffset+n},t.prototype.getHandleMidpointAndOffset=function(e,t){if(void 0===t&&(t=!1),null==e)return{handleMidpoint:0,handleOffset:0};var n=this.props.vertical,r=e.getBoundingClientRect();r.width=e.offsetWidth,r.height=e.offsetHeight;var i=n?t?"width":"height":t?"height":"width",o=n?window.innerHeight-(r.top+r[i]):r.left;return{handleMidpoint:r[i]/2,handleOffset:o}},t.prototype.removeDocumentEventListeners=function(){document.removeEventListener("mousemove",this.handleHandleMovement),document.removeEventListener("mouseup",this.endHandleMovement),document.removeEventListener("touchmove",this.handleHandleTouchMovement),document.removeEventListener("touchend",this.endHandleTouchMovement),document.removeEventListener("touchcancel",this.endHandleTouchMovement)},t.displayName="".concat(fl,".SliderHandle"),t}(fO),mu={START:"start",END:"end"},mc={PUSH:"push",NONE:"none"},md=function(){return null};md.displayName="".concat(fl,".MultiSliderHandle");var mh=function(e){function t(){var t,n,r,i,o=null!==e&&e.apply(this,arguments)||this;return o.state={labelPrecision:(n=(t=o.props).labelPrecision,i=void 0===(r=t.stepSize)?mh.defaultSliderProps.stepSize:r,null==n?ht.countDecimalPlaces(i):n),tickSize:0,tickSizeRatio:0},o.handleElements=[],o.trackElement=null,o.addHandleRef=function(e){null!=e&&o.handleElements.push(e)},o.maybeHandleTrackClick=function(e){if(o.canHandleTrackEvent(e)){var t=o.nearestHandleForValue(o.handleElements,function(t){return t.mouseEventClientOffset(e)});t&&t.beginHandleMovement(e)}},o.maybeHandleTrackTouch=function(e){if(o.canHandleTrackEvent(e)){var t=o.nearestHandleForValue(o.handleElements,function(t){return t.touchEventClientOffset(e)});t&&t.beginHandleTouchMovement(e)}},o.canHandleTrackEvent=function(e){var t=e.target;return!o.props.disabled&&null==t.closest(".".concat(lz.SLIDER_HANDLE))},o.getHandlerForIndex=function(e,t){return function(n){null==t||t(o.getNewHandleValues(n,e))}},o.handleChange=function(e){var t,n,r=mf(o.props),i=r.map(function(e){return e.value});ht.arraysEqual(e,i)||(null===(n=(t=o.props).onChange)||void 0===n||n.call(t,e),r.forEach(function(t,n){var r;i[n]!==e[n]&&(null===(r=t.onChange)||void 0===r||r.call(t,e[n]))}))},o.handleRelease=function(e){var t,n,r=mf(o.props);null===(n=(t=o.props).onRelease)||void 0===n||n.call(t,e),r.forEach(function(t,n){var r;null===(r=t.onRelease)||void 0===r||r.call(t,e[n])})},o}return(0,lD.__extends)(t,e),t.getDerivedStateFromProps=function(e){return{labelPrecision:t.getLabelPrecision(e)}},t.getLabelPrecision=function(e){var t=e.labelPrecision,n=e.stepSize;return null==t?ht.countDecimalPlaces(n):t},t.prototype.getSnapshotBeforeUpdate=function(e){var t=mf(e);return mf(this.props).length!==t.length&&(this.handleElements=[]),null},t.prototype.render=function(){var e,t=this,n=l(lF)(lz.SLIDER,((e={})[lz.DISABLED]=this.props.disabled,e["".concat(lz.SLIDER,"-unlabeled")]=!1===this.props.labelRenderer,e[lz.VERTICAL]=this.props.vertical,e),this.props.className);return v.createElement("div",{className:n,onMouseDown:this.maybeHandleTrackClick,onTouchStart:this.maybeHandleTrackTouch},v.createElement("div",{className:lz.SLIDER_TRACK,ref:function(e){return t.trackElement=e}},this.renderTracks()),v.createElement("div",{className:lz.SLIDER_AXIS},this.renderLabels()),this.renderHandles())},t.prototype.componentDidMount=function(){this.updateTickSize()},t.prototype.componentDidUpdate=function(t,n){e.prototype.componentDidUpdate.call(this,t,n),this.updateTickSize()},t.prototype.validateProps=function(e){if(e.stepSize<=0)throw Error(hV);if(void 0!==e.labelStepSize&&void 0!==e.labelValues)throw Error(hK);if(void 0!==e.labelStepSize&&e.labelStepSize<=0)throw Error(hq);if(void 0!==e.min&&!isFinite(e.min))throw Error(hG);if(void 0!==e.max&&!isFinite(e.max))throw Error(hW);var n=!1;if(v.Children.forEach(e.children,function(e){e&&!ht.isElementOfType(e,t.Handle)&&(n=!0)}),n)throw Error(h$)},t.prototype.formatLabel=function(e,t){void 0===t&&(t=!1);var n=this.props.labelRenderer;return!1===n?void 0:ht.isFunction(n)?n(e,{isHandleTooltip:t}):e.toFixed(this.state.labelPrecision)},t.prototype.renderLabels=function(){var e=this;if(!1===this.props.labelRenderer)return null;var t=this.getLabelValues(),n=this.props,r=n.max,i=n.min;return t.map(function(t,n){var o=mo((t-i)/(r-i)),a=e.props.vertical?{bottom:o}:{left:o};return v.createElement("div",{className:lz.SLIDER_LABEL,key:n,style:a},e.formatLabel(t))})},t.prototype.renderTracks=function(){var e=mp(this.props);e.push({value:this.props.max});for(var t={value:this.props.min},n=[],r=0;r<e.length;r++){var i=e[r];n.push(this.renderTrackFill(r,t,i)),t=i}return n},t.prototype.renderTrackFill=function(e,t,n){var r=[this.getOffsetRatio(t.value),this.getOffsetRatio(n.value)].sort(function(e,t){return e-t}),i=r[0],o=r[1],a=mo(i),s=mo(1-o),u=this.props.vertical?{bottom:a,top:s,left:0}:{left:a,right:s,top:0},c=(0,lD.__assign)((0,lD.__assign)({},u),t.trackStyleAfter||n.trackStyleBefore||{}),d=l(lF)(lz.SLIDER_PROGRESS,lz.intentClass(this.getTrackIntent(t,n)));return v.createElement("div",{key:"track-".concat(e),className:d,style:c})},t.prototype.renderHandles=function(){var e=this,t=this.props,n=t.disabled,r=t.max,i=t.min,o=t.stepSize,a=t.vertical,s=mf(this.props);return 0===s.length?null:s.map(function(t,u){var c,d=t.value,h=t.type,f=t.className,p=t.htmlProps;return v.createElement(ms,{htmlProps:p,className:l(lF)(((c={})[lz.START]=h===mu.START,c[lz.END]=h===mu.END,c),f),disabled:n,key:"".concat(u,"-").concat(s.length),label:e.formatLabel(d,!0),max:r,min:i,onChange:e.getHandlerForIndex(u,e.handleChange),onRelease:e.getHandlerForIndex(u,e.handleRelease),ref:e.addHandleRef,stepSize:o,tickSize:e.state.tickSize,tickSizeRatio:e.state.tickSizeRatio,value:d,vertical:a})})},t.prototype.nearestHandleForValue=function(e,t){return function(e,t){if(0!==e.length){for(var n=e[0],r=t(n),i=1;i<e.length;i++){var o=e[i],a=t(o);a<r&&(n=o,r=a)}return n}}(e,function(e){var n=t(e);return Math.abs(e.clientToValue(n)-e.props.value)})},t.prototype.getNewHandleValues=function(e,t){var n=mf(this.props).map(function(e){return e.value}),r=n.slice();r[t]=e,r.sort(function(e,t){return e-t});var i=r.indexOf(e),o=this.findFirstLockedHandleIndex(t,i);if(-1===o)ma(r,t,i,e);else{var a=n[o];return ma(n,t,o,a),n}return r},t.prototype.findFirstLockedHandleIndex=function(e,t){for(var n=e<t?1:-1,r=mf(this.props),i=e+n;i!==t+n;i+=n)if(r[i].interactionKind!==mc.PUSH)return i;return -1},t.prototype.getLabelValues=function(){var e=this.props,t=e.labelStepSize,n=e.labelValues,r=e.min,i=e.max,o=[];if(void 0!==n)o=n.slice();else for(var a=r;a<i||ht.approxEqual(a,i);a+=null!=t?t:1)o.push(a);return o},t.prototype.getOffsetRatio=function(e){return ht.clamp((e-this.props.min)*this.state.tickSizeRatio,0,1)},t.prototype.getTrackIntent=function(e,t){return this.props.showTrackFill?void 0!==e.intentAfter?e.intentAfter:void 0!==t&&void 0!==t.intentBefore?t.intentBefore:this.props.defaultTrackIntent:lH.NONE},t.prototype.updateTickSize=function(){if(null!=this.trackElement){var e=this.props.vertical?this.trackElement.clientHeight:this.trackElement.clientWidth,t=1/(this.props.max-this.props.min);this.setState({tickSize:e*t,tickSizeRatio:t})}},t.defaultSliderProps={disabled:!1,max:10,min:0,showTrackFill:!0,stepSize:1,vertical:!1},t.defaultProps=(0,lD.__assign)((0,lD.__assign)({},t.defaultSliderProps),{defaultTrackIntent:lH.NONE}),t.displayName="".concat(fl,".MultiSlider"),t.Handle=md,t}(fO);function mf(e){return mp(e,function(e){return e.interactionKind!==mc.NONE})}function mp(e,t){var n=e.children;void 0===t&&(t=function(){return!0});var r=v.Children.map(n,function(e){return ht.isElementOfType(e,mh.Handle)&&t(e.props)?e.props:null}),i=null!=r?r:[];return(i=i.filter(function(e){return null!==e})).sort(function(e,t){return e.value-t.value}),i}var mg=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,lD.__extends)(t,e),t.prototype.render=function(){var e=this.props,t=e.initialValue,n=e.intent,r=e.value,i=e.onChange,o=e.onRelease,a=e.handleHtmlProps,l=(0,lD.__rest)(e,["initialValue","intent","value","onChange","onRelease","handleHtmlProps"]);return v.createElement(mh,(0,lD.__assign)({},l),v.createElement(mh.Handle,{value:r,intentAfter:r<t?n:void 0,intentBefore:r>=t?n:void 0,onChange:i,onRelease:o,htmlProps:a}),v.createElement(mh.Handle,{value:t,interactionKind:"none"}))},t.defaultProps=(0,lD.__assign)((0,lD.__assign)({},mh.defaultSliderProps),{initialValue:0,intent:lH.PRIMARY,value:0}),t.displayName="".concat(fl,".Slider"),t}(fO),mm=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function mv(e,t){if(e.length!==t.length)return!1;for(var n,r,i=0;i<e.length;i++)if(!((n=e[i])===(r=t[i])||mm(n)&&mm(r)))return!1;return!0}var my=function(e,t){void 0===t&&(t=mv);var n,r,i=[],o=!1;return function(){for(var a=[],l=0;l<arguments.length;l++)a[l]=arguments[l];return o&&n===this&&t(a,i)||(r=e.apply(this,a),o=!0,n=this,i=a),r}},v=h("8NFma"),mb="object"==typeof performance&&"function"==typeof performance.now?function(){return performance.now()}:function(){return Date.now()};function mw(e){cancelAnimationFrame(e.id)}var mx=-1;function m_(e){if(void 0===e&&(e=!1),-1===mx||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",document.body.appendChild(t),mx=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return mx}var mE=null;function mS(e){if(void 0===e&&(e=!1),null===mE||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",n.direction="rtl";var r=document.createElement("div"),i=r.style;i.width="100px",i.height="100px",t.appendChild(r),document.body.appendChild(t),t.scrollLeft>0?mE="positive-descending":(t.scrollLeft=1,mE=0===t.scrollLeft?"negative":"positive-ascending"),document.body.removeChild(t)}return mE}var mC=function(e,t,n,r){var i,o,a;if("column"===e?(i=r.columnMetadataMap,o=t.columnWidth,a=r.lastMeasuredColumnIndex):(i=r.rowMetadataMap,o=t.rowHeight,a=r.lastMeasuredRowIndex),n>a){var l=0;if(a>=0){var s=i[a];l=s.offset+s.size}for(var u=a+1;u<=n;u++){var c=o(u);i[u]={offset:l,size:c},l+=c}"column"===e?r.lastMeasuredColumnIndex=n:r.lastMeasuredRowIndex=n}return i[n]},mO=function(e,t){return e},mk=function(e,t){e.children,e.direction,e.height,e.layout,e.innerTagName,e.outerTagName,e.width,t.instance},mP=function(e,t,n){var r=e.itemSize,i=n.itemMetadataMap,o=n.lastMeasuredIndex;if(t>o){var a=0;if(o>=0){var l=i[o];a=l.offset+l.size}for(var s=o+1;s<=t;s++){var u=r(s);i[s]={offset:a,size:u},a+=u}n.lastMeasuredIndex=t}return i[t]},mT=(kd=(ku={getItemOffset:function(e,t){return t*e.itemSize},getItemSize:function(e,t){return e.itemSize},getEstimatedTotalSize:function(e){var t=e.itemCount;return e.itemSize*t},getOffsetForIndexAndAlignment:function(e,t,n,r,i,o){var a=e.direction,l=e.height,s=e.itemCount,u=e.itemSize,c=e.layout,d=e.width,h="horizontal"===a||"horizontal"===c?d:l,f=Math.max(0,s*u-h),p=Math.min(f,t*u),g=Math.max(0,t*u-h+u+o);switch("smart"===n&&(n=r>=g-h&&r<=p+h?"auto":"center"),n){case"start":return p;case"end":return g;case"center":var m=Math.round(g+(p-g)/2);if(m<Math.ceil(h/2))return 0;if(m>f+Math.floor(h/2))return f;return m;default:if(r>=g&&r<=p)return r;if(r<g)return g;return p}},getStartIndexForOffset:function(e,t){return Math.max(0,Math.min(e.itemCount-1,Math.floor(t/e.itemSize)))},getStopIndexForStartIndex:function(e,t,n){var r=e.direction,i=e.height,o=e.itemCount,a=e.itemSize,l=e.layout,s=e.width,u=Math.ceil((("horizontal"===r||"horizontal"===l?s:i)+n-t*a)/a);return Math.max(0,Math.min(o-1,t+u-1))},initInstanceProps:function(e){},shouldResetStyleCacheOnItemSizeChange:!0,validateProps:function(e){e.itemSize}}).getItemOffset,kh=ku.getEstimatedTotalSize,kf=ku.getItemSize,kp=ku.getOffsetForIndexAndAlignment,kg=ku.getStartIndexForOffset,km=ku.getStopIndexForStartIndex,kv=ku.initInstanceProps,ky=ku.shouldResetStyleCacheOnItemSizeChange,kb=ku.validateProps,(kc=function(e){function t(t){var n;return(n=e.call(this,t)||this)._instanceProps=kv(n.props,p7(n)),n._outerRef=void 0,n._resetIsScrollingTimeoutId=null,n.state={instance:p7(n),isScrolling:!1,scrollDirection:"forward",scrollOffset:"number"==typeof n.props.initialScrollOffset?n.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},n._callOnItemsRendered=void 0,n._callOnItemsRendered=my(function(e,t,r,i){return n.props.onItemsRendered({overscanStartIndex:e,overscanStopIndex:t,visibleStartIndex:r,visibleStopIndex:i})}),n._callOnScroll=void 0,n._callOnScroll=my(function(e,t,r){return n.props.onScroll({scrollDirection:e,scrollOffset:t,scrollUpdateWasRequested:r})}),n._getItemStyle=void 0,n._getItemStyle=function(e){var t,r=n.props,i=r.direction,o=r.itemSize,a=r.layout,l=n._getItemStyleCache(ky&&o,ky&&a,ky&&i);if(l.hasOwnProperty(e))t=l[e];else{var s=kd(n.props,e,n._instanceProps),u=kf(n.props,e,n._instanceProps),c="horizontal"===i||"horizontal"===a,d="rtl"===i,h=c?s:0;l[e]=t={position:"absolute",left:d?void 0:h,right:d?h:void 0,top:c?0:s,height:c?"100%":u,width:c?u:"100%"}}return t},n._getItemStyleCache=void 0,n._getItemStyleCache=my(function(e,t,n){return{}}),n._onScrollHorizontal=function(e){var t=e.currentTarget,r=t.clientWidth,i=t.scrollLeft,o=t.scrollWidth;n.setState(function(e){if(e.scrollOffset===i)return null;var t=n.props.direction,a=i;if("rtl"===t)switch(mS()){case"negative":a=-i;break;case"positive-descending":a=o-r-i}return a=Math.max(0,Math.min(a,o-r)),{isScrolling:!0,scrollDirection:e.scrollOffset<a?"forward":"backward",scrollOffset:a,scrollUpdateWasRequested:!1}},n._resetIsScrollingDebounced)},n._onScrollVertical=function(e){var t=e.currentTarget,r=t.clientHeight,i=t.scrollHeight,o=t.scrollTop;n.setState(function(e){if(e.scrollOffset===o)return null;var t=Math.max(0,Math.min(o,i-r));return{isScrolling:!0,scrollDirection:e.scrollOffset<t?"forward":"backward",scrollOffset:t,scrollUpdateWasRequested:!1}},n._resetIsScrollingDebounced)},n._outerRefSetter=function(e){var t=n.props.outerRef;n._outerRef=e,"function"==typeof t?t(e):null!=t&&"object"==typeof t&&t.hasOwnProperty("current")&&(t.current=e)},n._resetIsScrollingDebounced=function(){var e,t,r;null!==n._resetIsScrollingTimeoutId&&mw(n._resetIsScrollingTimeoutId),n._resetIsScrollingTimeoutId=(e=n._resetIsScrolling,t=mb(),r={id:requestAnimationFrame(function n(){mb()-t>=150?e.call(null):r.id=requestAnimationFrame(n)})})},n._resetIsScrolling=function(){n._resetIsScrollingTimeoutId=null,n.setState({isScrolling:!1},function(){n._getItemStyleCache(-1,null)})},n}pY(t,e),t.getDerivedStateFromProps=function(e,t){return mk(e,t),kb(e),null};var n=t.prototype;return n.scrollTo=function(e){e=Math.max(0,e),this.setState(function(t){return t.scrollOffset===e?null:{scrollDirection:t.scrollOffset<e?"forward":"backward",scrollOffset:e,scrollUpdateWasRequested:!0}},this._resetIsScrollingDebounced)},n.scrollToItem=function(e,t){void 0===t&&(t="auto");var n=this.props,r=n.itemCount,i=n.layout,o=this.state.scrollOffset;e=Math.max(0,Math.min(e,r-1));var a=0;if(this._outerRef){var l=this._outerRef;a="vertical"===i?l.scrollWidth>l.clientWidth?m_():0:l.scrollHeight>l.clientHeight?m_():0}this.scrollTo(kp(this.props,e,t,o,this._instanceProps,a))},n.componentDidMount=function(){var e=this.props,t=e.direction,n=e.initialScrollOffset,r=e.layout;if("number"==typeof n&&null!=this._outerRef){var i=this._outerRef;"horizontal"===t||"horizontal"===r?i.scrollLeft=n:i.scrollTop=n}this._callPropsCallbacks()},n.componentDidUpdate=function(){var e=this.props,t=e.direction,n=e.layout,r=this.state,i=r.scrollOffset;if(r.scrollUpdateWasRequested&&null!=this._outerRef){var o=this._outerRef;if("horizontal"===t||"horizontal"===n){if("rtl"===t)switch(mS()){case"negative":o.scrollLeft=-i;break;case"positive-ascending":o.scrollLeft=i;break;default:var a=o.clientWidth,l=o.scrollWidth;o.scrollLeft=l-a-i}else o.scrollLeft=i}else o.scrollTop=i}this._callPropsCallbacks()},n.componentWillUnmount=function(){null!==this._resetIsScrollingTimeoutId&&mw(this._resetIsScrollingTimeoutId)},n.render=function(){var e=this.props,t=e.children,n=e.className,r=e.direction,i=e.height,o=e.innerRef,a=e.innerElementType,l=e.innerTagName,s=e.itemCount,u=e.itemData,c=e.itemKey,d=void 0===c?mO:c,h=e.layout,f=e.outerElementType,p=e.outerTagName,g=e.style,m=e.useIsScrolling,y=e.width,b=this.state.isScrolling,w="horizontal"===r||"horizontal"===h,x=w?this._onScrollHorizontal:this._onScrollVertical,_=this._getRangeToRender(),E=_[0],S=_[1],C=[];if(s>0)for(var O=E;O<=S;O++)C.push((0,v.createElement)(t,{data:u,key:d(O,u),index:O,isScrolling:m?b:void 0,style:this._getItemStyle(O)}));var k=kh(this.props,this._instanceProps);return(0,v.createElement)(f||p||"div",{className:n,onScroll:x,ref:this._outerRefSetter,style:pW({position:"relative",height:i,width:y,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:r},g)},(0,v.createElement)(a||l||"div",{children:C,ref:o,style:{height:w?"100%":k,pointerEvents:b?"none":void 0,width:w?k:"100%"}}))},n._callPropsCallbacks=function(){if("function"==typeof this.props.onItemsRendered&&this.props.itemCount>0){var e=this._getRangeToRender(),t=e[0],n=e[1],r=e[2],i=e[3];this._callOnItemsRendered(t,n,r,i)}if("function"==typeof this.props.onScroll){var o=this.state,a=o.scrollDirection,l=o.scrollOffset,s=o.scrollUpdateWasRequested;this._callOnScroll(a,l,s)}},n._getRangeToRender=function(){var e=this.props,t=e.itemCount,n=e.overscanCount,r=this.state,i=r.isScrolling,o=r.scrollDirection,a=r.scrollOffset;if(0===t)return[0,0,0,0];var l=kg(this.props,a,this._instanceProps),s=km(this.props,l,a,this._instanceProps);return[Math.max(0,l-(i&&"backward"!==o?1:Math.max(1,n))),Math.max(0,Math.min(t-1,s+(i&&"forward"!==o?1:Math.max(1,n)))),l,s]},t}(v.PureComponent)).defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},kc),v=(h("8NFma"),h("8NFma"));let mA=()=>{},mN=mA(),mj=Object,mR=e=>e===mN,mI=e=>"function"==typeof e,mL=(e,t)=>({...e,...t}),mM=e=>mI(e.then),mD=new WeakMap,mF=0,mz=e=>{let t,n;let r=typeof e,i=e&&e.constructor,o=i==Date;if(mj(e)!==e||o||i==RegExp)t=o?e.toJSON():"symbol"==r?e.toString():"string"==r?JSON.stringify(e):""+e;else{if(t=mD.get(e))return t;if(t=++mF+"~",mD.set(e,t),i==Array){for(n=0,t="@";n<e.length;n++)t+=mz(e[n])+",";mD.set(e,t)}if(i==mj){t="#";let r=mj.keys(e).sort();for(;!mR(n=r.pop());)mR(e[n])||(t+=n+":"+mz(e[n])+",");mD.set(e,t)}}return t},mB=new WeakMap,mU={},mH={},mV="undefined",mq=typeof window!=mV,mG=typeof document!=mV,mW=()=>mq&&typeof window.requestAnimationFrame!=mV,m$=(e,t)=>{let n=mB.get(e);return[()=>!mR(t)&&e.get(t)||mU,r=>{if(!mR(t)){let i=e.get(t);t in mH||(mH[t]=i),n[5](t,mL(i,r),i||mU)}},n[6],()=>!mR(t)&&t in mH?mH[t]:!mR(t)&&e.get(t)||mU]},mK=!0,[mY,mX]=mq&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[mA,mA],mZ={initFocus:e=>(mG&&document.addEventListener("visibilitychange",e),mY("focus",e),()=>{mG&&document.removeEventListener("visibilitychange",e),mX("focus",e)}),initReconnect:e=>{let t=()=>{mK=!0,e()},n=()=>{mK=!1};return mY("online",t),mY("offline",n),()=>{mX("online",t),mX("offline",n)}}},mQ=!l(v).useId,mJ=!mq||"Deno"in window,m0=e=>mW()?window.requestAnimationFrame(e):setTimeout(e,1),m1=mJ?v.useEffect:v.useLayoutEffect,m2="undefined"!=typeof navigator&&navigator.connection,m3=!mJ&&m2&&(["slow-2g","2g"].includes(m2.effectiveType)||m2.saveData),m5=e=>{if(mI(e))try{e=e()}catch(t){e=""}let t=e;return[e="string"==typeof e?e:(Array.isArray(e)?e.length:e)?mz(e):"",t]},m6=0,m4=()=>++m6;var m8={ERROR_REVALIDATE_EVENT:3,FOCUS_EVENT:0,MUTATE_EVENT:2,RECONNECT_EVENT:1};async function m9(...e){let[t,n,r,i]=e,o=mL({populateCache:!0,throwOnError:!0},"boolean"==typeof i?{revalidate:i}:i||{}),a=o.populateCache,l=o.rollbackOnError,s=o.optimisticData,u=!1!==o.revalidate,c=e=>"function"==typeof l?l(e):!1!==l,d=o.throwOnError;if(mI(n)){let e=[];for(let r of t.keys())!/^\$(inf|sub)\$/.test(r)&&n(t.get(r)._k)&&e.push(r);return Promise.all(e.map(h))}return h(n);async function h(n){let i;let[o]=m5(n);if(!o)return;let[l,h]=m$(t,o),[f,p,g,m]=mB.get(t),v=()=>{let e=f[o];return u&&(delete g[o],delete m[o],e&&e[0])?e[0](2).then(()=>l().data):l().data};if(e.length<3)return v();let y=r,b=m4();p[o]=[b,0];let w=!mR(s),x=l(),_=x.data,E=x._c,S=mR(E)?_:E;if(w&&h({data:s=mI(s)?s(S,_):s,_c:S}),mI(y))try{y=y(S)}catch(e){i=e}if(y&&mM(y)){if(y=await y.catch(e=>{i=e}),b!==p[o][0]){if(i)throw i;return y}i&&w&&c(i)&&(a=!0,h({data:S,_c:mN}))}if(a&&!i&&(mI(a)?h({data:a(y,S),error:mN,_c:mN}):h({data:y,error:mN,_c:mN})),p[o][1]=m4(),Promise.resolve(v()).then(()=>{h({_c:mN})}),i){if(d)throw i;return}return y}}let m7=(e,t)=>{for(let n in e)e[n][0]&&e[n][0](t)},ve=(e,t)=>{if(!mB.has(e)){let n=mL(mZ,t),r={},i=m9.bind(mN,e),o=mA,a={},l=(e,t)=>{let n=a[e]||[];return a[e]=n,n.push(t),()=>n.splice(n.indexOf(t),1)},s=(t,n,r)=>{e.set(t,n);let i=a[t];if(i)for(let e of i)e(n,r)},u=()=>{if(!mB.has(e)&&(mB.set(e,[r,{},{},{},i,s,l]),!mJ)){let t=n.initFocus(setTimeout.bind(mN,m7.bind(mN,r,0))),i=n.initReconnect(setTimeout.bind(mN,m7.bind(mN,r,1)));o=()=>{t&&t(),i&&i(),mB.delete(e)}}};return u(),[e,i,u,o]}return[e,mB.get(e)[4]]},[vt,vn]=ve(new Map),vr=mL({onLoadingSlow:mA,onSuccess:mA,onError:mA,onErrorRetry:(e,t,n,r,i)=>{let o=n.errorRetryCount,a=i.retryCount,l=~~((Math.random()+.5)*(1<<(a<8?a:8)))*n.errorRetryInterval;(mR(o)||!(a>o))&&setTimeout(r,l,i)},onDiscarded:mA,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:m3?1e4:5e3,focusThrottleInterval:5e3,dedupingInterval:2e3,loadingTimeout:m3?5e3:3e3,compare:(e,t)=>mz(e)==mz(t),isPaused:()=>!1,cache:vt,mutate:vn,fallback:{}},{isOnline:()=>mK,isVisible:()=>{let e=mG&&document.visibilityState;return mR(e)||"hidden"!==e}}),vi=(e,t)=>{let n=mL(e,t);if(t){let{use:r,fallback:i}=e,{use:o,fallback:a}=t;r&&o&&(n.use=r.concat(o)),i&&a&&(n.fallback=mL(i,a))}return n},vo=(0,v.createContext)({}),va="$inf$",vl=mq&&window.__SWR_DEVTOOLS_USE__,vs=vl?window.__SWR_DEVTOOLS_USE__:[],vu=e=>mI(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(null===e[1]?e[2]:e[1])||{}],vc=()=>mL(vr,(0,v.useContext)(vo)),vd=vs.concat(e=>(t,n,r)=>{let i=n&&((...e)=>{let[r]=m5(t),[,,,i]=mB.get(vt);if(r.startsWith(va))return n(...e);let o=i[r];return mR(o)?n(...e):(delete i[r],o)});return e(t,i,r)}),vh=(e,t,n)=>{let r=t[e]||(t[e]=[]);return r.push(n),()=>{let e=r.indexOf(n);e>=0&&(r[e]=r[r.length-1],r.pop())}};vl&&(window.__SWR_DEVTOOLS_REACT__=l(v));let vf=l(v).use||(e=>{if("pending"===e.status)throw e;if("fulfilled"===e.status)return e.value;if("rejected"===e.status)throw e.reason;throw e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}),e}),vp={dedupe:!0};mj.defineProperty(e=>{let{value:t}=e,n=(0,v.useContext)(vo),r=mI(t),i=(0,v.useMemo)(()=>r?t(n):t,[r,n,t]),o=(0,v.useMemo)(()=>r?i:vi(n,i),[r,n,i]),a=i&&i.provider,l=(0,v.useRef)(mN);a&&!l.current&&(l.current=ve(a(o.cache||vt),i));let s=l.current;return s&&(o.cache=s[0],o.mutate=s[1]),m1(()=>{if(s)return s[2]&&s[2](),s[3]},[]),(0,v.createElement)(vo.Provider,mL(e,{value:o}))},"defaultValue",{value:vr});let vg=(kw=(e,t,n)=>{let{cache:r,compare:i,suspense:o,fallbackData:a,revalidateOnMount:l,revalidateIfStale:s,refreshInterval:u,refreshWhenHidden:c,refreshWhenOffline:d,keepPreviousData:h}=n,[f,p,g,m]=mB.get(r),[y,b]=m5(e),w=(0,v.useRef)(!1),x=(0,v.useRef)(!1),E=(0,v.useRef)(y),S=(0,v.useRef)(t),C=(0,v.useRef)(n),O=()=>C.current,k=()=>O().isVisible()&&O().isOnline(),[P,T,A,N]=m$(r,y),j=(0,v.useRef)({}).current,R=mR(a)?n.fallback[y]:a,I=(e,t)=>{for(let n in j)if("data"===n){if(!i(e[n],t[n])&&(!mR(e[n])||!i(V,t[n])))return!1}else if(t[n]!==e[n])return!1;return!0},L=(0,v.useMemo)(()=>{let e=!!y&&!!t&&(mR(l)?!O().isPaused()&&!o&&(!!mR(s)||s):l),n=t=>{let n=mL(t);return(delete n._k,e)?{isValidating:!0,isLoading:!0,...n}:n},r=P(),i=N(),a=n(r),u=r===i?a:n(i),c=a;return[()=>{let e=n(P());return I(e,c)?(c.data=e.data,c.isLoading=e.isLoading,c.isValidating=e.isValidating,c.error=e.error,c):(c=e,e)},()=>u]},[r,y]),M=(0,_.useSyncExternalStore)((0,v.useCallback)(e=>A(y,(t,n)=>{I(n,t)||e()}),[r,y]),L[0],L[1]),D=!w.current,F=f[y]&&f[y].length>0,z=M.data,B=mR(z)?R:z,U=M.error,H=(0,v.useRef)(B),V=h?mR(z)?H.current:z:B,q=(!F||!!mR(U))&&(D&&!mR(l)?l:!O().isPaused()&&(o?!mR(B)&&s:mR(B)||s)),G=!!(y&&t&&D&&q),W=mR(M.isValidating)?G:M.isValidating,$=mR(M.isLoading)?G:M.isLoading,K=(0,v.useCallback)(async e=>{let t,r;let o=S.current;if(!y||!o||x.current||O().isPaused())return!1;let a=!0,l=e||{},s=!g[y]||!l.dedupe,u=()=>mQ?!x.current&&y===E.current&&w.current:y===E.current,c={isValidating:!1,isLoading:!1},d=()=>{T(c)},h=()=>{let e=g[y];e&&e[1]===r&&delete g[y]},m={isValidating:!0};mR(P().data)&&(m.isLoading=!0);try{if(s&&(T(m),n.loadingTimeout&&mR(P().data)&&setTimeout(()=>{a&&u()&&O().onLoadingSlow(y,n)},n.loadingTimeout),g[y]=[o(b),m4()]),[t,r]=g[y],t=await t,s&&setTimeout(h,n.dedupingInterval),!g[y]||g[y][1]!==r)return s&&u()&&O().onDiscarded(y),!1;c.error=mN;let e=p[y];if(!mR(e)&&(r<=e[0]||r<=e[1]||0===e[1]))return d(),s&&u()&&O().onDiscarded(y),!1;let l=P().data;c.data=i(l,t)?l:t,s&&u()&&O().onSuccess(t,y,n)}catch(n){h();let e=O(),{shouldRetryOnError:t}=e;!e.isPaused()&&(c.error=n,s&&u()&&(e.onError(n,y,e),(!0===t||mI(t)&&t(n))&&k()&&e.onErrorRetry(n,y,e,e=>{let t=f[y];t&&t[0]&&t[0](m8.ERROR_REVALIDATE_EVENT,e)},{retryCount:(l.retryCount||0)+1,dedupe:!0})))}return a=!1,d(),!0},[y,r]),Y=(0,v.useCallback)((...e)=>m9(r,E.current,...e),[]);if(m1(()=>{S.current=t,C.current=n,mR(z)||(H.current=z)}),m1(()=>{if(!y)return;let e=K.bind(mN,vp),t=0,n=vh(y,f,(n,r={})=>{if(n==m8.FOCUS_EVENT){let n=Date.now();O().revalidateOnFocus&&n>t&&k()&&(t=n+O().focusThrottleInterval,e())}else if(n==m8.RECONNECT_EVENT)O().revalidateOnReconnect&&k()&&e();else if(n==m8.MUTATE_EVENT)return K();else if(n==m8.ERROR_REVALIDATE_EVENT)return K(r)});return x.current=!1,E.current=y,w.current=!0,T({_k:b}),q&&(mR(B)||mJ?e():m0(e)),()=>{x.current=!0,n()}},[y]),m1(()=>{let e;function t(){let t=mI(u)?u(P().data):u;t&&-1!==e&&(e=setTimeout(n,t))}function n(){!P().error&&(c||O().isVisible())&&(d||O().isOnline())?K(vp).then(t):t()}return t(),()=>{e&&(clearTimeout(e),e=-1)}},[u,c,d,y]),(0,v.useDebugValue)(V),o&&mR(B)&&y){if(!mQ&&mJ)throw Error("Fallback data is required when using suspense in SSR.");S.current=t,C.current=n,x.current=!1;let e=m[y];if(mR(e)||vf(Y(e)),mR(U)){let e=K(vp);mR(V)||(e.status="fulfilled",e.value=!0),vf(e)}else throw U}return{mutate:Y,get data(){return j.data=!0,V},get error(){return j.error=!0,U},get isValidating(){return j.isValidating=!0,W},get isLoading(){return j.isLoading=!0,$}}},function(...e){let t=vc(),[n,r,i]=vu(e),o=vi(t,i),a=kw,{use:l}=o,s=(l||[]).concat(vd);for(let e=s.length;e--;)a=s[e](a);return a(n,r||o.fetcher||null,o)});var v=(h("8NFma"),h("8NFma"));let vm=e=>m5(e?e(0,null):null)[0],vv=Promise.resolve(),vy=(kx=e=>(t,n,r)=>{let i;let o=(0,v.useRef)(!1),{cache:a,initialSize:l=1,revalidateAll:s=!1,persistSize:u=!1,revalidateFirstPage:c=!0,revalidateOnMount:d=!1,parallel:h=!1}=r,[,,,f]=mB.get(vt);try{(i=vm(t))&&(i=va+i)}catch(e){}let[p,g,m]=m$(a,i),y=(0,v.useCallback)(()=>mR(p()._l)?l:p()._l,[a,i,l]);(0,_.useSyncExternalStore)((0,v.useCallback)(e=>i?m(i,()=>{e()}):()=>{},[a,i]),y,y);let b=(0,v.useCallback)(()=>{let e=p()._l;return mR(e)?l:e},[i,l]),w=(0,v.useRef)(b());m1(()=>{if(!o.current){o.current=!0;return}i&&g({_l:u?w.current:b()})},[i,a]);let x=d&&!o.current,E=e(i,async e=>{let i=p()._i,o=[],l=b(),[u]=m$(a,e),d=u().data,m=[],v=null;for(let e=0;e<l;++e){let[l,u]=m5(t(e,h?null:v));if(!l)break;let[p,g]=m$(a,l),y=p().data,b=s||i||mR(y)||c&&!e&&!mR(d)||x||d&&!mR(d[e])&&!r.compare(d[e],y);if(n&&b){let t=async()=>{if(l in f){let e=f[l];delete f[l],y=await e}else y=await n(u);g({data:y,_k:u}),o[e]=y};h?m.push(t):await t()}else o[e]=y;h||(v=y)}return h&&await Promise.all(m.map(e=>e())),g({_i:mN}),o},r),S=(0,v.useCallback)(function(e,t){let n="boolean"==typeof t?{revalidate:t}:t||{},r=!1!==n.revalidate;return i?(r&&(mR(e)?g({_i:!0}):g({_i:!1})),arguments.length?E.mutate(e,{...n,revalidate:r}):E.mutate()):vv},[i,a]),C=(0,v.useCallback)(e=>{let n;if(!i)return vv;let[,r]=m$(a,i);if(mI(e)?n=e(b()):"number"==typeof e&&(n=e),"number"!=typeof n)return vv;r({_l:n}),w.current=n;let o=[],[l]=m$(a,i),s=null;for(let e=0;e<n;++e){let[n]=m5(t(e,s)),[r]=m$(a,n),i=n?r().data:mN;if(mR(i))return S(l().data);o.push(i),s=i}return S(o)},[i,a,S,b]);return{size:b(),setSize:C,mutate:S,get data(){return E.data},get error(){return E.error},get isValidating(){return E.isValidating},get isLoading(){return E.isLoading}}},(...e)=>{let[t,n,r]=vu(e),i=(r.use||[]).concat(kx);return vg(t,n,{...r,use:i})}),vb=e=>fetch(e).then(e=>e.json()),vw=({defaultQuery:e="",timeout:t=100,getAPI:n,getSize:r=e=>e.total_pages,fetchFunc:i=vb})=>{let o=l(v).useRef(e),a=l(v).useRef(),{data:s,error:u,size:c,setSize:d,mutate:h}=vy(e=>n({query:o.current,page:e+1}),i,{revalidateAll:!1}),f=!s&&!u||!!(c>0&&s&&void 0===s[c-1]),p=s?.[0]?.length===0||s&&s[0]&&r(s[0])===c;return{setQuery:l(v).useCallback(e=>{o.current=e,clearTimeout(a.current),a.current=setTimeout(()=>{h()},t)},[t]),isLoading:f,loadMore:()=>{p||d(c+1)},isReachingEnd:p,data:s?.filter(e=>e),items:s?.reduce((e,t)=>e.concat(t),[]),hasMore:!p,reset:h,error:u}};var v=h("8NFma"),lD=h("gztBd"),v=h("8NFma"),vx=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,lD.__extends)(t,e),t.prototype.render=function(){var e=this.props,t=e.className,n=e.panel;return v.createElement("div",{className:l(lF)(lz.TAB_PANEL,t),role:"tablist"},n)},t.defaultProps={disabled:!1},t.displayName="".concat(fl,".Tab"),t}(fO),lD=h("gztBd"),v=h("8NFma"),lD=h("gztBd"),v=h("8NFma"),lD=h("gztBd"),v=h("8NFma"),fb=h("leH9B"),lD=h("gztBd"),v=h("8NFma"),fb=h("leH9B"),v_=v.forwardRef(function(e,t){var n=e.size>=fb.IconSize.LARGE,r=n?fb.IconSize.LARGE:fb.IconSize.STANDARD,i="".concat(-1*r/.05/2);return v.createElement(fS,(0,lD.__assign)({iconName:"small-cross",ref:t},e),v.createElement("path",{d:n?"M228.2 200L294 265.8C297.8 269.4 300 274.4 300 280C300 291 291 300 280 300C274.4000000000001 300 269.4000000000001 297.8 265.8 294.2L200 228.2L134.2 294.2C130.6 297.8 125.6 300 120 300C109 300 100 291 100 280C100 274.4 102.2 269.4 105.8 265.8L171.8 200L106 134.2000000000001C102.2 130.6 100 125.6 100 120C100 109 109 100 120 100C125.6 100 130.6 102.2 134.2 105.8L200 171.8L265.8 106C269.4000000000001 102.2 274.4000000000001 100 280 100C291 100 300 109 300 120C300 125.6 297.8 130.6 294.2000000000001 134.2000000000001L228.2 200z":"M188.2 160L234 205.8C237.8 209.4 240 214.4 240 220C240 231 231 240 220 240C214.4 240 209.4 237.8 205.8 234.2L160 188.2L114.2 234.2C110.6 237.8 105.6 240 100 240C89 240 80 231 80 220C80 214.4 82.2 209.4 85.8 205.8L131.8 160L86 114.2C82.2 110.6 80 105.6 80 100C80 89 89 80 100 80C105.6 80 110.6 82.2 114.2 85.8L160 131.8L205.8 86C209.4 82.2 214.4 80 220 80C231 80 240 89 240 100C240 105.6 237.8 110.6 234.2 114.2L188.2 160z",fillRule:"evenodd","transform-origin":"center",transform:"scale(0.05, -0.05) translate(".concat(i,", ").concat(i,")")}))});v_.defaultProps={size:fb.IconSize.STANDARD},v_.displayName="Blueprint5.Icon.SmallCross";var vE=v.forwardRef(function(e,t){var n,r=e.active,i=e.children,o=e.className,a=e.fill,s=e.icon,u=e.intent,c=e.interactive,d=e.large,h=e.minimal,f=e.multiline,p=e.onRemove,g=e.rightIcon,m=e.round,y=e.tabIndex,b=void 0===y?0:y,w=e.htmlTitle,x=(0,lD.__rest)(e,["active","children","className","fill","icon","intent","interactive","large","minimal","multiline","onRemove","rightIcon","round","tabIndex","htmlTitle"]),_=ht.isFunction(p),E=l(lF)(lz.TAG,lz.intentClass(u),((n={})[lz.ACTIVE]=r,n[lz.FILL]=a,n[lz.INTERACTIVE]=c,n[lz.LARGE]=d,n[lz.MINIMAL]=h,n[lz.ROUND]=m,n),o),S=d||E.indexOf(lz.LARGE)>=0,C=_?v.createElement("button",{"aria-label":"Remove tag",type:"button",className:lz.TAG_REMOVE,onClick:function(t){var n;null===(n=e.onRemove)||void 0===n||n.call(e,t,e)},tabIndex:b},v.createElement(v_,{size:S?fb.IconSize.LARGE:fb.IconSize.STANDARD})):null;return v.createElement("span",(0,lD.__assign)({},x,{className:E,tabIndex:c?b:void 0,ref:t}),v.createElement(fC,{icon:s}),!h4(i)&&v.createElement(fT,{className:lz.FILL,ellipsize:!f,tagName:"span",title:w},i),v.createElement(fC,{icon:g}),C)});vE.displayName="".concat(fl,".Tag");var vS=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleClick=function(e){return t.props.onClick(t.props.id,e)},t}return(0,lD.__extends)(t,e),t.prototype.render=function(){var e=this.props,t=e.className,n=e.children,r=e.disabled,i=e.id,o=e.parentId,a=e.selected,s=e.title,u=e.icon,c=e.tagContent,d=e.tagProps,h=(0,lD.__rest)(e,["className","children","disabled","id","parentId","selected","title","icon","tagContent","tagProps"]),f=a?lH.PRIMARY:lH.NONE;return v.createElement("div",(0,lD.__assign)({},fu(h),{"aria-controls":vC(o,i),"aria-disabled":r,"aria-expanded":a,"aria-selected":a,className:l(lF)(lz.TAB,t),"data-tab-id":i,id:vO(o,i),onClick:r?void 0:this.handleClick,role:"tab",tabIndex:r?void 0:a?0:-1}),null!=u&&v.createElement(fC,{icon:u,intent:f,className:lz.TAB_ICON}),s,n,null!=c&&v.createElement(vE,(0,lD.__assign)({minimal:!0,intent:f},d,{className:l(lF)(lz.TAB_TAG,null==d?void 0:d.className)}),c))},t.displayName="".concat(fl,".TabTitle"),t}(fO);function vC(e,t){return"".concat(lz.TAB_PANEL,"_").concat(e,"_").concat(t)}function vO(e,t){return"".concat(lz.TAB,"-title_").concat(e,"_").concat(t)}var vk=function(){return v.createElement("div",{className:lz.FLEX_EXPANDER})},vP=".".concat(lz.TAB),vT=function(e){function t(t){var n=e.call(this,t)||this;n.tablistElement=null,n.refHandlers={tablist:function(e){return n.tablistElement=e}},n.handleKeyDown=function(e){var t,r=null===(t=ht.getActiveElement(n.tablistElement))||void 0===t?void 0:t.closest(vP);if(null!=r){var i=n.getTabElements().filter(function(e){return"false"===e.getAttribute("aria-disabled")}),o=i.indexOf(r),a=n.getKeyCodeDirection(e);if(o>=0&&void 0!==a){e.preventDefault();var l=i.length;i[(o+a+l)%l].focus()}}},n.handleKeyPress=function(e){var t=e.target.closest(vP);null!=t&&ht.isKeyboardClick(e)&&(e.preventDefault(),t.click())},n.handleTabClick=function(e,t){var r,i;null===(i=(r=n.props).onChange)||void 0===i||i.call(r,e,n.state.selectedTabId,t),void 0===n.props.selectedTabId&&n.setState({selectedTabId:e})},n.renderTabPanel=function(e){var t=e.props,r=t.className,i=t.panel,o=t.id,a=t.panelClassName;if(void 0!==i)return v.createElement("div",{"aria-labelledby":vO(n.props.id,o),"aria-hidden":o!==n.state.selectedTabId,className:l(lF)(lz.TAB_PANEL,r,a),id:vC(n.props.id,o),key:o,role:"tabpanel"},i)},n.renderTabTitle=function(e){if(vA(e)){var t=e.props.id;return v.createElement(vS,(0,lD.__assign)({},e.props,{parentId:n.props.id,onClick:n.handleTabClick,selected:t===n.state.selectedTabId}))}return e};var r=n.getInitialSelectedTabId();return n.state={selectedTabId:r},n}return(0,lD.__extends)(t,e),t.getDerivedStateFromProps=function(e){var t=e.selectedTabId;return void 0!==t?{selectedTabId:t}:null},t.prototype.render=function(){var e,t,n=this.state,r=n.indicatorWrapperStyle,i=n.selectedTabId,o=v.Children.map(this.props.children,this.renderTabTitle),a=this.getTabChildren().filter(this.props.renderActiveTabPanelOnly?function(e){return e.props.id===i}:function(){return!0}).map(this.renderTabPanel),s=this.props.animate?v.createElement("div",{className:lz.TAB_INDICATOR_WRAPPER,style:r},v.createElement("div",{className:lz.TAB_INDICATOR})):null,u=l(lF)(lz.TABS,this.props.className,((e={})[lz.VERTICAL]=this.props.vertical,e[lz.FILL]=this.props.fill,e)),c=l(lF)(lz.TAB_LIST,((t={})[lz.LARGE]=this.props.large,t));return v.createElement("div",{className:u},v.createElement("div",{className:c,onKeyDown:this.handleKeyDown,onKeyPress:this.handleKeyPress,ref:this.refHandlers.tablist,role:"tablist"},s,o),a)},t.prototype.componentDidMount=function(){this.moveSelectionIndicator(!1)},t.prototype.componentDidUpdate=function(e,t){this.state.selectedTabId!==t.selectedTabId?this.moveSelectionIndicator():null==t.selectedTabId||ht.arraysEqual(this.getTabChildrenProps(e),this.getTabChildrenProps(),ht.shallowCompareKeys)||this.moveSelectionIndicator()},t.prototype.getInitialSelectedTabId=function(){var e=this.props,t=e.defaultSelectedTabId,n=e.selectedTabId;if(void 0!==n)return n;if(void 0!==t)return t;var r=this.getTabChildren();return 0===r.length?void 0:r[0].props.id},t.prototype.getKeyCodeDirection=function(e){return"ArrowLeft"===e.key||"ArrowUp"===e.key?-1:"ArrowRight"===e.key||"ArrowDown"===e.key?1:void 0},t.prototype.getTabChildrenProps=function(e){return void 0===e&&(e=this.props),this.getTabChildren(e).map(function(e){return e.props})},t.prototype.getTabChildren=function(e){return void 0===e&&(e=this.props),v.Children.toArray(e.children).filter(vA)},t.prototype.getTabElements=function(e){return(void 0===e&&(e=""),null==this.tablistElement)?[]:Array.from(this.tablistElement.querySelectorAll(vP+e))},t.prototype.moveSelectionIndicator=function(e){if(void 0===e&&(e=!0),null!=this.tablistElement&&this.props.animate){var t="".concat(vP,'[data-tab-id="').concat(this.state.selectedTabId,'"]'),n=this.tablistElement.querySelector(t),r={display:"none"};if(null!=n){var i=n.clientHeight,o=n.clientWidth,a=n.offsetLeft,l=n.offsetTop;r={height:i,transform:"translateX(".concat(Math.floor(a),"px) translateY(").concat(Math.floor(l),"px)"),width:o},e||(r.transition="none")}this.setState({indicatorWrapperStyle:r})}},t.Expander=vk,t.Tab=vx,t.defaultProps={animate:!0,fill:!1,large:!1,renderActiveTabPanelOnly:!1,vertical:!1},t.displayName="".concat(fl,".Tabs"),t}(fO);function vA(e){return ht.isElementOfType(e,vx)}var v=h("8NFma"),vN={};vN=h("6DzO8")();var vj={};Object.defineProperty(vj,"__esModule",{value:!0}),vj.ReactCSS=vj.loop=vj.handleActive=vj.handleHover=vj.hover=void 0;var vR={};Object.defineProperty(vR,"__esModule",{value:!0}),vR.flattenNames=void 0;var vI=h("h1l7t"),vL=h("5V8oz"),vM=h("hcK5n"),vD=we(function(e){return"string"==typeof e||!vL(e)&&vM(e)&&"[object String]"==vI(e)}),vF={},vz=h("4V1MN"),vB=h("4hKXW"),vU=we(vF=function(e,t){return e&&vz(e,vB(t))}),vH={},vI=h("h1l7t"),vV={};vV=h("blfKu")(Object.getPrototypeOf,Object);var vM=h("hcK5n"),vq=Object.prototype,vG=Function.prototype.toString,vW=vq.hasOwnProperty,v$=vG.call(Object),vK=we(vH=function(e){if(!vM(e)||"[object Object]"!=vI(e))return!1;var t=vV(e);if(null===t)return!0;var n=vW.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&vG.call(n)==v$}),vY={};vY=function(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i};var vX={},vZ={},vQ={},vJ={},v0={},v1={};v1=function(){this.__data__=[],this.size=0};var v2={},v3={},v5={};v5=function(e,t){return e===t||e!=e&&t!=t},v3=function(e,t){for(var n=e.length;n--;)if(v5(e[n][0],t))return n;return -1};var v6=Array.prototype.splice;v2=function(e){var t=this.__data__,n=v3(t,e);return!(n<0)&&(n==t.length-1?t.pop():v6.call(t,n,1),--this.size,!0)};var v4={};v4=function(e){var t=this.__data__,n=v3(t,e);return n<0?void 0:t[n][1]};var v8={};v8=function(e){return v3(this.__data__,e)>-1};var v9={};function v7(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}v9=function(e,t){var n=this.__data__,r=v3(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},v7.prototype.clear=v1,v7.prototype.delete=v2,v7.prototype.get=v4,v7.prototype.has=v8,v7.prototype.set=v9,v0=v7;var ye={};ye=function(){this.__data__=new v0,this.size=0};var yt={};yt=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n};var yn={};yn=function(e){return this.__data__.get(e)};var yr={};yr=function(e){return this.__data__.has(e)};var yi={},yo={},ya={},yl={},ys=h("1F4Th"),yu={},yc={},yd=h("eeOBM");yc=yd["__core-js_shared__"];var yh=(k_=/[^.]+$/.exec(yc&&yc.keys&&yc.keys.IE_PROTO||""))?"Symbol(src)_1."+k_:"";yu=function(e){return!!yh&&yh in e};var yf=h("kNSK3"),yp={},yg=Function.prototype.toString;yp=function(e){if(null!=e){try{return yg.call(e)}catch(e){}try{return e+""}catch(e){}}return""};var ym=/^\[object .+?Constructor\]$/,yv=Object.prototype,yy=Function.prototype.toString,yb=yv.hasOwnProperty,yw=RegExp("^"+yy.call(yb).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");yl=function(e){return!(!yf(e)||yu(e))&&(ys(e)?yw:ym).test(yp(e))};var yx={};yx=function(e,t){return null==e?void 0:e[t]},ya=function(e,t){var n=yx(e,t);return yl(n)?n:void 0};var yd=h("eeOBM");yo=ya(yd,"Map");var y_={},yE={},yS={},yC={},yO={};yO=ya(Object,"create"),yC=function(){this.__data__=yO?yO(null):{},this.size=0};var yk={};yk=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t};var yP={},yT=Object.prototype.hasOwnProperty;yP=function(e){var t=this.__data__;if(yO){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return yT.call(t,e)?t[e]:void 0};var yA={},yN=Object.prototype.hasOwnProperty;yA=function(e){var t=this.__data__;return yO?void 0!==t[e]:yN.call(t,e)};var yj={};function yR(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}yj=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=yO&&void 0===t?"__lodash_hash_undefined__":t,this},yR.prototype.clear=yC,yR.prototype.delete=yk,yR.prototype.get=yP,yR.prototype.has=yA,yR.prototype.set=yj,yS=yR,yE=function(){this.size=0,this.__data__={hash:new yS,map:new(yo||v0),string:new yS}};var yI={},yL={},yM={};yM=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e},yL=function(e,t){var n=e.__data__;return yM(t)?n["string"==typeof t?"string":"hash"]:n.map},yI=function(e){var t=yL(this,e).delete(e);return this.size-=t?1:0,t};var yD={};yD=function(e){return yL(this,e).get(e)};var yF={};yF=function(e){return yL(this,e).has(e)};var yz={};function yB(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function yU(e){var t=this.__data__=new v0(e);this.size=t.size}yz=function(e,t){var n=yL(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},yB.prototype.clear=yE,yB.prototype.delete=yI,yB.prototype.get=yD,yB.prototype.has=yF,yB.prototype.set=yz,y_=yB,yi=function(e,t){var n=this.__data__;if(n instanceof v0){var r=n.__data__;if(!yo||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new y_(r)}return n.set(e,t),this.size=n.size,this},yU.prototype.clear=ye,yU.prototype.delete=yt,yU.prototype.get=yn,yU.prototype.has=yr,yU.prototype.set=yi,vJ=yU;var yH={},yV={},yq={},yG={},yW={};yW=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this};var y$={};function yK(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new y_;++t<n;)this.add(e[t])}y$=function(e){return this.__data__.has(e)},yK.prototype.add=yK.prototype.push=yW,yK.prototype.has=y$,yG=yK;var yY={};yY=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1};var yX={};yX=function(e,t){return e.has(t)},yq=function(e,t,n,r,i,o){var a=1&n,l=e.length,s=t.length;if(l!=s&&!(a&&s>l))return!1;var u=o.get(e),c=o.get(t);if(u&&c)return u==t&&c==e;var d=-1,h=!0,f=2&n?new yG:void 0;for(o.set(e,t),o.set(t,e);++d<l;){var p=e[d],g=t[d];if(r)var m=a?r(g,p,d,t,e,o):r(p,g,d,e,t,o);if(void 0!==m){if(m)continue;h=!1;break}if(f){if(!yY(t,function(e,t){if(!yX(f,t)&&(p===e||i(p,e,n,r,o)))return f.push(t)})){h=!1;break}}else if(!(p===g||i(p,g,n,r,o))){h=!1;break}}return o.delete(e),o.delete(t),h};var yZ={},yQ=h("4Cb5x"),yJ={},yd=h("eeOBM");yJ=yd.Uint8Array;var y0={};y0=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n};var y1={};y1=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n};var y2=yQ?yQ.prototype:void 0,y3=y2?y2.valueOf:void 0;yZ=function(e,t,n,r,i,o,a){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)break;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":if(e.byteLength!=t.byteLength||!o(new yJ(e),new yJ(t)))break;return!0;case"[object Boolean]":case"[object Date]":case"[object Number]":return v5(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var l=y0;case"[object Set]":var s=1&r;if(l||(l=y1),e.size!=t.size&&!s)break;var u=a.get(e);if(u)return u==t;r|=2,a.set(e,t);var c=yq(l(e),l(t),r,i,o,a);return a.delete(e),c;case"[object Symbol]":if(y3)return y3.call(e)==y3.call(t)}return!1};var y5={},y6={},y4={},y8={};y8=function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e};var vL=h("5V8oz");y4=function(e,t,n){var r=t(e);return vL(e)?r:y8(r,n(e))};var y9={},y7={};y7=function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[i++]=a)}return o};var be={};be=function(){return[]};var bt=Object.prototype.propertyIsEnumerable,bn=Object.getOwnPropertySymbols;y9=bn?function(e){return null==e?[]:(e=Object(e),y7(bn(e),function(t){return bt.call(e,t)}))}:be;var br=h("8R54q");y6=function(e){return y4(e,br,y9)};var bi=Object.prototype.hasOwnProperty;y5=function(e,t,n,r,i,o){var a=1&n,l=y6(e),s=l.length;if(s!=y6(t).length&&!a)return!1;for(var u=s;u--;){var c=l[u];if(!(a?c in t:bi.call(t,c)))return!1}var d=o.get(e),h=o.get(t);if(d&&h)return d==t&&h==e;var f=!0;o.set(e,t),o.set(t,e);for(var p=a;++u<s;){var g=e[c=l[u]],m=t[c];if(r)var v=a?r(m,g,c,t,e,o):r(g,m,c,e,t,o);if(!(void 0===v?g===m||i(g,m,n,r,o):v)){f=!1;break}p||(p="constructor"==c)}if(f&&!p){var y=e.constructor,b=t.constructor;y!=b&&"constructor"in e&&"constructor"in t&&!("function"==typeof y&&y instanceof y&&"function"==typeof b&&b instanceof b)&&(f=!1)}return o.delete(e),o.delete(t),f};var bo={},ba={},yd=h("eeOBM");ba=ya(yd,"DataView");var bl={},yd=h("eeOBM");bl=ya(yd,"Promise");var bs={},yd=h("eeOBM");bs=ya(yd,"Set");var bu={},yd=h("eeOBM");bu=ya(yd,"WeakMap");var vI=h("h1l7t"),bc="[object Map]",bd="[object Promise]",bh="[object Set]",bf="[object WeakMap]",bp="[object DataView]",bg=yp(ba),bm=yp(yo),bv=yp(bl),by=yp(bs),bb=yp(bu),bw=vI;(ba&&bw(new ba(new ArrayBuffer(1)))!=bp||yo&&bw(new yo)!=bc||bl&&bw(bl.resolve())!=bd||bs&&bw(new bs)!=bh||bu&&bw(new bu)!=bf)&&(bw=function(e){var t=vI(e),n="[object Object]"==t?e.constructor:void 0,r=n?yp(n):"";if(r)switch(r){case bg:return bp;case bm:return bc;case bv:return bd;case by:return bh;case bb:return bf}return t}),bo=bw;var vL=h("5V8oz"),bx=h("9e2tS"),b_=h("fAXjB"),bE="[object Arguments]",bS="[object Array]",bC="[object Object]",bO=Object.prototype.hasOwnProperty;yV=function(e,t,n,r,i,o){var a=vL(e),l=vL(t),s=a?bS:bo(e),u=l?bS:bo(t);s=s==bE?bC:s,u=u==bE?bC:u;var c=s==bC,d=u==bC,h=s==u;if(h&&bx(e)){if(!bx(t))return!1;a=!0,c=!1}if(h&&!c)return o||(o=new vJ),a||b_(e)?yq(e,t,n,r,i,o):yZ(e,t,s,n,r,i,o);if(!(1&n)){var f=c&&bO.call(e,"__wrapped__"),p=d&&bO.call(t,"__wrapped__");if(f||p){var g=f?e.value():e,m=p?t.value():t;return o||(o=new vJ),i(g,m,n,r,o)}}return!!h&&(o||(o=new vJ),y5(e,t,n,r,i,o))};var vM=h("hcK5n");yH=function e(t,n,r,i,o){return t===n||(null!=t&&null!=n&&(vM(t)||vM(n))?yV(t,n,r,i,e,o):t!=t&&n!=n)},vQ=function(e,t,n,r){var i=n.length,o=i,a=!r;if(null==e)return!o;for(e=Object(e);i--;){var l=n[i];if(a&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++i<o;){var s=(l=n[i])[0],u=e[s],c=l[1];if(a&&l[2]){if(void 0===u&&!(s in e))return!1}else{var d=new vJ;if(r)var h=r(u,c,s,e,t,d);if(!(void 0===h?yH(c,u,3,r,d):h))return!1}}return!0};var bk={},bP={},yf=h("kNSK3");bP=function(e){return e==e&&!yf(e)};var br=h("8R54q");bk=function(e){for(var t=br(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,bP(i)]}return t};var bT={};bT=function(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in Object(n))}},vZ=function(e){var t=bk(e);return 1==t.length&&t[0][2]?bT(t[0][0],t[0][1]):function(n){return n===e||vQ(n,e,t)}};var bA={},bN={},bj={},bR={},vL=h("5V8oz"),bI={},vL=h("5V8oz"),bL={},vI=h("h1l7t"),vM=h("hcK5n");bL=function(e){return"symbol"==typeof e||vM(e)&&"[object Symbol]"==vI(e)};var bM=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,bD=/^\w*$/;bI=function(e,t){if(vL(e))return!1;var n=typeof e;return!!("number"==n||"symbol"==n||"boolean"==n||null==e||bL(e))||bD.test(e)||!bM.test(e)||null!=t&&e in Object(t)};var bF={},bz={};function bB(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw TypeError("Expected a function");var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(bB.Cache||y_),n}bB.Cache=y_;var bU=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,bH=/\\(\\)?/g;OQ=(OZ=(bz=bB)(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(bU,function(e,n,r,i){t.push(r?i.replace(bH,"$1"):n||e)}),t},function(e){return 500===OQ.size&&OQ.clear(),e})).cache,bF=OZ;var bV={},bq={},yQ=h("4Cb5x"),vL=h("5V8oz"),bG=1/0,bW=yQ?yQ.prototype:void 0,b$=bW?bW.toString:void 0;bq=function e(t){if("string"==typeof t)return t;if(vL(t))return vY(t,e)+"";if(bL(t))return b$?b$.call(t):"";var n=t+"";return"0"==n&&1/t==-bG?"-0":n},bV=function(e){return null==e?"":bq(e)},bR=function(e,t){return vL(e)?e:bI(e,t)?[e]:bF(bV(e))};var bK={},bY=1/0;bK=function(e){if("string"==typeof e||bL(e))return e;var t=e+"";return"0"==t&&1/e==-bY?"-0":t},bj=function(e,t){t=bR(t,e);for(var n=0,r=t.length;null!=e&&n<r;)e=e[bK(t[n++])];return n&&n==r?e:void 0},bN=function(e,t,n){var r=null==e?void 0:bj(e,t);return void 0===r?n:r};var bX={},bZ={};bZ=function(e,t){return null!=e&&t in Object(e)};var bQ={},bJ=h("4rbI4"),vL=h("5V8oz"),b0=h("74Ail"),b1=h("2zEBJ");bQ=function(e,t,n){t=bR(t,e);for(var r=-1,i=t.length,o=!1;++r<i;){var a=bK(t[r]);if(!(o=null!=e&&n(e,a)))break;e=e[a]}return o||++r!=i?o:!!(i=null==e?0:e.length)&&b1(i)&&b0(a,i)&&(vL(e)||bJ(e))},bX=function(e,t){return null!=e&&bQ(e,t,bZ)},bA=function(e,t){return bI(e)&&bP(t)?bT(bK(e),t):function(n){var r=bN(n,e);return void 0===r&&r===t?bX(n,e):yH(t,r,3)}};var b2=h("38wdc"),vL=h("5V8oz"),b3={},b5={};b5=function(e){return function(t){return null==t?void 0:t[e]}};var b6={};b6=function(e){return function(t){return bj(t,e)}},b3=function(e){return bI(e)?b5(bK(e)):b6(e)},vX=function(e){return"function"==typeof e?e:null==e?b2:"object"==typeof e?vL(e)?bA(e[0],e[1]):vZ(e):b3(e)};var b4={},b8=h("gl8yj"),b9=h("iiJxK");b4=function(e,t){var n=-1,r=b9(e)?Array(e.length):[];return b8(e,function(e,i,o){r[++n]=t(e,i,o)}),r};var vL=h("5V8oz"),b7=we(function(e,t){return(vL(e)?vY:b4)(e,vX(t,3))});function we(e){return e&&e.__esModule?e:{default:e}}var wt=vR.flattenNames=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=[];return(0,b7.default)(t,function(t){Array.isArray(t)?e(t).map(function(e){return n.push(e)}):(0,vK.default)(t)?(0,vU.default)(t,function(e,t){!0===e&&n.push(t),n.push(t+"-"+e)}):(0,vD.default)(t)&&n.push(t)}),n};vR.default=wt;var wn=xf(vR),wr={};Object.defineProperty(wr,"__esModule",{value:!0}),wr.mergeClasses=void 0;var wi=w0(vF),wo={},wa=h("eQpse"),wl={},ws={},wu={};wu=function(){try{var e=ya(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),ws=function(e,t,n){"__proto__"==t&&wu?wu(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n};var wc=Object.prototype.hasOwnProperty;wl=function(e,t,n){var r=e[t];wc.call(e,t)&&v5(r,n)&&(void 0!==n||t in e)||ws(e,t,n)};var wd={},wh={};wh=function(e,t,n,r){var i=!n;n||(n={});for(var o=-1,a=t.length;++o<a;){var l=t[o],s=r?r(n[l],e[l],l,n,e):void 0;void 0===s&&(s=e[l]),i?ws(n,l,s):wl(n,l,s)}return n};var br=h("8R54q");wd=function(e,t){return e&&wh(t,br(t),e)};var wf={},wp={},wg=h("hopFG"),wm={},yf=h("kNSK3"),wv=h("dWAd9"),wy={};wy=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t};var wb=Object.prototype.hasOwnProperty;wm=function(e){if(!yf(e))return wy(e);var t=wv(e),n=[];for(var r in e)"constructor"==r&&(t||!wb.call(e,r))||n.push(r);return n};var b9=h("iiJxK");wp=function(e){return b9(e)?wg(e,!0):wm(e)},wf=function(e,t){return e&&wh(t,wp(t),e)};var ww=h("lJ72B"),wx={};wx=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t};var w_={};w_=function(e,t){return wh(e,y9(e),t)};var wE={},wS={};wS=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)y8(t,y9(e)),e=vV(e);return t}:be,wE=function(e,t){return wh(e,wS(e),t)};var wC={};wC=function(e){return y4(e,wp,wS)};var wO={},wk=Object.prototype.hasOwnProperty;wO=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&wk.call(e,"index")&&(n.index=e.index,n.input=e.input),n};var wP={},wT={};wT=function(e){var t=new e.constructor(e.byteLength);return new yJ(t).set(new yJ(e)),t};var wA={};wA=function(e,t){var n=t?wT(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)};var wN={},wj=/\w*$/;wN=function(e){var t=new e.constructor(e.source,wj.exec(e));return t.lastIndex=e.lastIndex,t};var wR={},yQ=h("4Cb5x"),wI=yQ?yQ.prototype:void 0,wL=wI?wI.valueOf:void 0;wR=function(e){return wL?Object(wL.call(e)):{}};var wM={};wM=function(e,t){var n=t?wT(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)},wP=function(e,t,n){var r=e.constructor;switch(t){case"[object ArrayBuffer]":return wT(e);case"[object Boolean]":case"[object Date]":return new r(+e);case"[object DataView]":return wA(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return wM(e,n);case"[object Map]":case"[object Set]":return new r;case"[object Number]":case"[object String]":return new r(e);case"[object RegExp]":return wN(e);case"[object Symbol]":return wR(e)}};var wD={},wF={},yf=h("kNSK3"),wz=Object.create;wF=function(){function e(){}return function(t){if(!yf(t))return{};if(wz)return wz(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();var wv=h("dWAd9");wD=function(e){return"function"!=typeof e.constructor||wv(e)?{}:wF(vV(e))};var vL=h("5V8oz"),bx=h("9e2tS"),wB={},wU={},vM=h("hcK5n");wU=function(e){return vM(e)&&"[object Map]"==bo(e)};var wH=h("cLhdb"),wV=h("fwpsA"),wq=wV&&wV.isMap;wB=wq?wH(wq):wU;var yf=h("kNSK3"),wG={},wW={},vM=h("hcK5n");wW=function(e){return vM(e)&&"[object Set]"==bo(e)};var wH=h("cLhdb"),wV=h("fwpsA"),w$=wV&&wV.isSet;wG=w$?wH(w$):wW;var br=h("8R54q"),wK="[object Arguments]",wY="[object Function]",wX="[object Object]",wZ={};wZ[wK]=wZ["[object Array]"]=wZ["[object ArrayBuffer]"]=wZ["[object DataView]"]=wZ["[object Boolean]"]=wZ["[object Date]"]=wZ["[object Float32Array]"]=wZ["[object Float64Array]"]=wZ["[object Int8Array]"]=wZ["[object Int16Array]"]=wZ["[object Int32Array]"]=wZ["[object Map]"]=wZ["[object Number]"]=wZ[wX]=wZ["[object RegExp]"]=wZ["[object Set]"]=wZ["[object String]"]=wZ["[object Symbol]"]=wZ["[object Uint8Array]"]=wZ["[object Uint8ClampedArray]"]=wZ["[object Uint16Array]"]=wZ["[object Uint32Array]"]=!0,wZ["[object Error]"]=wZ[wY]=wZ["[object WeakMap]"]=!1,wo=function e(t,n,r,i,o,a){var l,s=1&n,u=2&n,c=4&n;if(r&&(l=o?r(t,i,o,a):r(t)),void 0!==l)return l;if(!yf(t))return t;var d=vL(t);if(d){if(l=wO(t),!s)return wx(t,l)}else{var h=bo(t),f=h==wY||"[object GeneratorFunction]"==h;if(bx(t))return ww(t,s);if(h==wX||h==wK||f&&!o){if(l=u||f?{}:wD(t),!s)return u?wE(t,wf(l,t)):w_(t,wd(l,t))}else{if(!wZ[h])return o?t:{};l=wP(t,h,s)}}a||(a=new vJ);var p=a.get(t);if(p)return p;a.set(t,l),wG(t)?t.forEach(function(i){l.add(e(i,n,r,i,t,a))}):wB(t)&&t.forEach(function(i,o){l.set(o,e(i,n,r,o,t,a))});var g=c?u?wC:y6:u?wp:br,m=d?void 0:g(t);return wa(m||t,function(i,o){m&&(i=t[o=i]),wl(l,o,e(i,n,r,o,t,a))}),l};var wQ=w0(function(e){return wo(e,5)}),wJ=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};function w0(e){return e&&e.__esModule?e:{default:e}}var w1=wr.mergeClasses=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=e.default&&(0,wQ.default)(e.default)||{};return t.map(function(t){var r=e[t];return r&&(0,wi.default)(r,function(e,t){n[t]||(n[t]={}),n[t]=wJ({},n[t],r[t])}),t}),n};wr.default=w1;var w2=xf(wr),w3={};Object.defineProperty(w3,"__esModule",{value:!0}),w3.autoprefix=void 0;var w5=(O3=vF)&&O3.__esModule?O3:{default:O3},w6=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},w4={borderRadius:function(e){return{msBorderRadius:e,MozBorderRadius:e,OBorderRadius:e,WebkitBorderRadius:e,borderRadius:e}},boxShadow:function(e){return{msBoxShadow:e,MozBoxShadow:e,OBoxShadow:e,WebkitBoxShadow:e,boxShadow:e}},userSelect:function(e){return{WebkitTouchCallout:e,KhtmlUserSelect:e,MozUserSelect:e,msUserSelect:e,WebkitUserSelect:e,userSelect:e}},flex:function(e){return{WebkitBoxFlex:e,MozBoxFlex:e,WebkitFlex:e,msFlex:e,flex:e}},flexBasis:function(e){return{WebkitFlexBasis:e,flexBasis:e}},justifyContent:function(e){return{WebkitJustifyContent:e,justifyContent:e}},transition:function(e){return{msTransition:e,MozTransition:e,OTransition:e,WebkitTransition:e,transition:e}},transform:function(e){return{msTransform:e,MozTransform:e,OTransform:e,WebkitTransform:e,transform:e}},absolute:function(e){var t=e&&e.split(" ");return{position:"absolute",top:t&&t[0],right:t&&t[1],bottom:t&&t[2],left:t&&t[3]}},extend:function(e,t){return t[e]||{extend:e}}},w8=w3.autoprefix=function(e){var t={};return(0,w5.default)(e,function(e,n){var r={};(0,w5.default)(e,function(e,t){var n=w4[t];n?r=w6({},r,n(e)):r[t]=e}),t[n]=r}),t};w3.default=w8;var w9=xf(w3),w7={};Object.defineProperty(w7,"__esModule",{value:!0}),w7.hover=void 0;var xe=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},v=h("8NFma"),xt=(O5=v)&&O5.__esModule?O5:{default:O5};function xn(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}var xr=w7.hover=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"span";return function(n){function r(){!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,r);for(var n,i,o,a=arguments.length,l=Array(a),s=0;s<a;s++)l[s]=arguments[s];return i=o=xn(this,(n=r.__proto__||Object.getPrototypeOf(r)).call.apply(n,[this].concat(l))),o.state={hover:!1},o.handleMouseOver=function(){return o.setState({hover:!0})},o.handleMouseOut=function(){return o.setState({hover:!1})},o.render=function(){return xt.default.createElement(t,{onMouseOver:o.handleMouseOver,onMouseOut:o.handleMouseOut},xt.default.createElement(e,xe({},o.props,o.state)))},xn(o,i)}return!function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(r,n),r}(xt.default.Component)};w7.default=xr;var xi=xf(w7),xo={};Object.defineProperty(xo,"__esModule",{value:!0}),xo.active=void 0;var xa=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},v=h("8NFma"),xl=(O6=v)&&O6.__esModule?O6:{default:O6};function xs(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}var xu=xo.active=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"span";return function(n){function r(){!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,r);for(var n,i,o,a=arguments.length,l=Array(a),s=0;s<a;s++)l[s]=arguments[s];return i=o=xs(this,(n=r.__proto__||Object.getPrototypeOf(r)).call.apply(n,[this].concat(l))),o.state={active:!1},o.handleMouseDown=function(){return o.setState({active:!0})},o.handleMouseUp=function(){return o.setState({active:!1})},o.render=function(){return xl.default.createElement(t,{onMouseDown:o.handleMouseDown,onMouseUp:o.handleMouseUp},xl.default.createElement(e,xa({},o.props,o.state)))},xs(o,i)}return!function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(r,n),r}(xl.default.Component)};xo.default=xu;var xc=xf(xo),xd={};Object.defineProperty(xd,"__esModule",{value:!0}),xd.default=function(e,t){var n={},r=function(e){var t=!(arguments.length>1)||void 0===arguments[1]||arguments[1];n[e]=t};return 0===e&&r("first-child"),e===t-1&&r("last-child"),(0===e||e%2==0)&&r("even"),1===Math.abs(e%2)&&r("odd"),r("nth-child",e),n};var xh=xf(xd);function xf(e){return e&&e.__esModule?e:{default:e}}vj.hover=xi.default,vj.handleHover=xi.default,vj.handleActive=xc.default,vj.loop=xh.default;var xp=vj.ReactCSS=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i=(0,wn.default)(n),o=(0,w2.default)(e,i);return(0,w9.default)(o)};vj.default=xp;var xg={},xm={},xv={};xv=function(e,t,n){(void 0===n||v5(e[t],n))&&(void 0!==n||t in e)||ws(e,t,n)};var xy=h("e3j3J"),xb={},ww=h("lJ72B"),bJ=h("4rbI4"),vL=h("5V8oz"),xw={},b9=h("iiJxK"),vM=h("hcK5n");xw=function(e){return vM(e)&&b9(e)};var bx=h("9e2tS"),ys=h("1F4Th"),yf=h("kNSK3"),b_=h("fAXjB"),xx={};xx=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]};var x_={};x_=function(e){return wh(e,wp(e))},xb=function(e,t,n,r,i,o,a){var l=xx(e,n),s=xx(t,n),u=a.get(s);if(u){xv(e,n,u);return}var c=o?o(l,s,n+"",e,t,a):void 0,d=void 0===c;if(d){var h=vL(s),f=!h&&bx(s),p=!h&&!f&&b_(s);c=s,h||f||p?vL(l)?c=l:xw(l)?c=wx(l):f?(d=!1,c=ww(s,!0)):p?(d=!1,c=wM(s,!0)):c=[]:vH(s)||bJ(s)?(c=l,bJ(l)?c=x_(l):(!yf(l)||ys(l))&&(c=wD(s))):d=!1}d&&(a.set(s,c),i(c,s,r,o,a),a.delete(s)),xv(e,n,c)};var yf=h("kNSK3");xm=function e(t,n,r,i,o){t!==n&&xy(n,function(a,l){if(o||(o=new vJ),yf(a))xb(t,n,l,r,e,i,o);else{var s=i?i(xx(t,l),a,l+"",t,n,o):void 0;void 0===s&&(s=a),xv(t,l,s)}},wp)};var xE={},b2=h("38wdc"),xS={},xC={};xC=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)};var xO=Math.max;xS=function(e,t,n){return t=xO(void 0===t?e.length-1:t,0),function(){for(var r=arguments,i=-1,o=xO(r.length-t,0),a=Array(o);++i<o;)a[i]=r[t+i];i=-1;for(var l=Array(t+1);++i<t;)l[i]=r[i];return l[t]=n(a),xC(e,this,l)}};var xk={},xP={},xT={};xT=function(e){return function(){return e}};var b2=h("38wdc"),xA=Date.now;OJ=wu?function(e,t){return wu(e,"toString",{configurable:!0,enumerable:!1,value:xT(t),writable:!0})}:b2,O0=0,O1=0,xk=function(){var e=xA(),t=16-(e-O1);if(O1=e,t>0){if(++O0>=800)return arguments[0]}else O0=0;return OJ.apply(void 0,arguments)},xE=function(e,t){return xk(xS(e,t,b2),e+"")};var xN={},b9=h("iiJxK"),b0=h("74Ail"),yf=h("kNSK3");xN=function(e,t,n){if(!yf(n))return!1;var r=typeof t;return("number"==r?!!(b9(n)&&b0(t,n.length)):"string"==r&&t in n)&&v5(n[t],e)},O2=function(e,t,n){xm(e,t,n)},xg=xE(function(e,t){var n=-1,r=t.length,i=r>1?t[r-1]:void 0,o=r>2?t[2]:void 0;for(i=O2.length>3&&"function"==typeof i?(r--,i):void 0,o&&xN(t[0],t[1],o)&&(i=r<3?void 0:i,r=1),e=Object(e);++n<r;){var a=t[n];a&&O2(e,a,n,i)}return e});var xj={},v=(h("8NFma"),h("8NFma")),xR={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},xI=v.createContext&&v.createContext(xR),xL=function(){return(xL=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},xM=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)0>t.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function xD(e){return function(t){return v.createElement(xF,xL({attr:xL({},e.attr)},t,{hasStrokes:function e(t){for(var n in t)if("_"!==n[0]){if("stroke"===n)return!0;if("object"==typeof t[n]){var r=e(t[n]);if(r)return r}else if("content"===n&&"style"===t.tag&&t[n].includes("stroke:"))return!0}return!1}(e)}),function e(t){return t&&t.map(function(t,n){return v.createElement(t.tag,xL({key:n},t.attr),e(t.child))})}(e.child))}}function xF(e){var t=function(t){var n,r=e.size||t.size||"1em";t.className&&(n=t.className),e.className&&(n=(n?n+" ":"")+e.className);var i=e.attr,o=e.fill,a=e.title,l=e.hasStrokes,s=xM(e,["attr","fill","title","hasStrokes"]);return v.createElement("svg",xL({stroke:"currentColor",fill:o},l?null:{strokeWidth:0},t.attr,i,s,{className:n,style:xL(xL({color:e.color||t.color},t.style),e.style),height:r,width:r,xmlns:"http://www.w3.org/2000/svg"}),a&&v.createElement("title",null,a),e.children)};return void 0!==xI?v.createElement(xI.Consumer,null,function(e){return t(e)}):t(xR)}xj=function(e){return xD({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none"},child:[{tag:"path",attr:{d:"M20.3847 2.87868C19.2132 1.70711 17.3137 1.70711 16.1421 2.87868L14.0202 5.00052L13.313 4.29332C12.9225 3.9028 12.2894 3.9028 11.8988 4.29332C11.5083 4.68385 11.5083 5.31701 11.8988 5.70754L17.5557 11.3644C17.9462 11.7549 18.5794 11.7549 18.9699 11.3644C19.3604 10.9739 19.3604 10.3407 18.9699 9.95018L18.2629 9.24316L20.3847 7.12132C21.5563 5.94975 21.5563 4.05025 20.3847 2.87868Z",fill:"currentColor"}},{tag:"path",attr:{fillRule:"evenodd",clipRule:"evenodd",d:"M11.9297 7.09116L4.1515 14.8693C3.22786 15.793 3.03239 17.169 3.5651 18.2842L1.99994 19.8493L3.41415 21.2635L4.97931 19.6984C6.09444 20.2311 7.4705 20.0356 8.39414 19.112L16.1723 11.3338L11.9297 7.09116ZM13.3439 11.3338L11.9297 9.91959L5.56571 16.2835C5.17518 16.6741 5.17518 17.3072 5.56571 17.6978C5.95623 18.0883 6.5894 18.0883 6.97992 17.6978L13.3439 11.3338Z",fill:"currentColor"}}],content:"\n"})(e)};var xz={};Object.defineProperty(xz,"__esModule",{value:!0});var xB={};Object.defineProperty(xB,"__esModule",{value:!0}),xB.Alpha=void 0;var xU=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},xH=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),v=h("8NFma"),xV=x5(v),xq=x5(vj),xG={};Object.defineProperty(xG,"__esModule",{value:!0}),xG.calculateChange=function(e,t,n,r,i){var o=i.clientWidth,a=i.clientHeight,l="number"==typeof e.pageX?e.pageX:e.touches[0].pageX,s="number"==typeof e.pageY?e.pageY:e.touches[0].pageY,u=l-(i.getBoundingClientRect().left+window.pageXOffset),c=s-(i.getBoundingClientRect().top+window.pageYOffset);if("vertical"===n){var d=void 0;if(d=c<0?0:c>a?1:Math.round(100*c/a)/100,t.a!==d)return{h:t.h,s:t.s,l:t.l,a:d,source:"rgb"}}else{var h=void 0;if(r!==(h=u<0?0:u>o?1:Math.round(100*u/o)/100))return{h:t.h,s:t.s,l:t.l,a:h,source:"rgb"}}return null};var xW=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(xG),x$={};Object.defineProperty(x$,"__esModule",{value:!0}),x$.Checkboard=void 0;var xK=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},v=h("8NFma"),xY=x1(v),xX=x1(vj),xZ={};Object.defineProperty(xZ,"__esModule",{value:!0});var xQ={},xJ=xZ.render=function(e,t,n,r){if("undefined"==typeof document&&!r)return null;var i=r?new r:document.createElement("canvas");i.width=2*n,i.height=2*n;var o=i.getContext("2d");return o?(o.fillStyle=e,o.fillRect(0,0,i.width,i.height),o.fillStyle=t,o.fillRect(0,0,n,n),o.translate(n,n),o.fillRect(0,0,n,n),i.toDataURL()):null};xZ.get=function(e,t,n,r){var i=e+"-"+t+"-"+n+(r?"-server":"");if(xQ[i])return xQ[i];var o=xJ(e,t,n,r);return xQ[i]=o,o};var x0=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(xZ);function x1(e){return e&&e.__esModule?e:{default:e}}var x2=x$.Checkboard=function(e){var t=e.white,n=e.grey,r=e.size,i=e.renderers,o=e.borderRadius,a=e.boxShadow,l=e.children,s=(0,xX.default)({default:{grid:{borderRadius:o,boxShadow:a,absolute:"0px 0px 0px 0px",background:"url("+x0.get(t,n,r,i.canvas)+") center left"}}});return(0,v.isValidElement)(l)?xY.default.cloneElement(l,xK({},l.props,{style:xK({},l.props.style,s.grid)})):xY.default.createElement("div",{style:s.grid})};x2.defaultProps={size:8,white:"transparent",grey:"rgba(0,0,0,.08)",renderers:{}},x$.default=x2;var x3=x5(x$);function x5(e){return e&&e.__esModule?e:{default:e}}function x6(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}var x4=xB.Alpha=function(e){function t(){!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,t);for(var e,n,r,i=arguments.length,o=Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=r=x6(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(o))),r.handleChange=function(e){var t=xW.calculateChange(e,r.props.hsl,r.props.direction,r.props.a,r.container);t&&"function"==typeof r.props.onChange&&r.props.onChange(t,e)},r.handleMouseDown=function(e){r.handleChange(e),window.addEventListener("mousemove",r.handleChange),window.addEventListener("mouseup",r.handleMouseUp)},r.handleMouseUp=function(){r.unbindEventListeners()},r.unbindEventListeners=function(){window.removeEventListener("mousemove",r.handleChange),window.removeEventListener("mouseup",r.handleMouseUp)},x6(r,n)}return!function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),xH(t,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"render",value:function(){var e=this,t=this.props.rgb,n=(0,xq.default)({default:{alpha:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius},checkboard:{absolute:"0px 0px 0px 0px",overflow:"hidden",borderRadius:this.props.radius},gradient:{absolute:"0px 0px 0px 0px",background:"linear-gradient(to right, rgba("+t.r+","+t.g+","+t.b+", 0) 0%,\n rgba("+t.r+","+t.g+","+t.b+", 1) 100%)",boxShadow:this.props.shadow,borderRadius:this.props.radius},container:{position:"relative",height:"100%",margin:"0 3px"},pointer:{position:"absolute",left:100*t.a+"%"},slider:{width:"4px",borderRadius:"1px",height:"8px",boxShadow:"0 0 2px rgba(0, 0, 0, .6)",background:"#fff",marginTop:"1px",transform:"translateX(-2px)"}},vertical:{gradient:{background:"linear-gradient(to bottom, rgba("+t.r+","+t.g+","+t.b+", 0) 0%,\n rgba("+t.r+","+t.g+","+t.b+", 1) 100%)"},pointer:{left:0,top:100*t.a+"%"}},overwrite:xU({},this.props.style)},{vertical:"vertical"===this.props.direction,overwrite:!0});return xV.default.createElement("div",{style:n.alpha},xV.default.createElement("div",{style:n.checkboard},xV.default.createElement(x3.default,{renderers:this.props.renderers})),xV.default.createElement("div",{style:n.gradient}),xV.default.createElement("div",{style:n.container,ref:function(t){return e.container=t},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},xV.default.createElement("div",{style:n.pointer},this.props.pointer?xV.default.createElement(this.props.pointer,this.props):xV.default.createElement("div",{style:n.slider}))))}}]),t}(v.PureComponent||v.Component);xB.default=x4,Object.defineProperty(xz,"Alpha",{enumerable:!0,get:function(){return Et(xB).default}}),Object.defineProperty(xz,"Checkboard",{enumerable:!0,get:function(){return Et(x$).default}});var x8={};Object.defineProperty(x8,"__esModule",{value:!0}),x8.EditableInput=void 0;var x9=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),v=h("8NFma"),x7=_t(v),_e=_t(vj);function _t(e){return e&&e.__esModule?e:{default:e}}var _n=[38,40],_r=1,_i=x8.EditableInput=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.handleBlur=function(){n.state.blurValue&&n.setState({value:n.state.blurValue,blurValue:null})},n.handleChange=function(e){n.setUpdatedValue(e.target.value,e)},n.handleKeyDown=function(e){var t,r=Number(String(e.target.value).replace(/%/g,""));if(!isNaN(r)&&(t=e.keyCode,_n.indexOf(t)>-1)){var i=n.getArrowOffset(),o=38===e.keyCode?r+i:r-i;n.setUpdatedValue(o,e)}},n.handleDrag=function(e){if(n.props.dragLabel){var t=Math.round(n.props.value+e.movementX);t>=0&&t<=n.props.dragMax&&n.props.onChange&&n.props.onChange(n.getValueObjectWithLabel(t),e)}},n.handleMouseDown=function(e){n.props.dragLabel&&(e.preventDefault(),n.handleDrag(e),window.addEventListener("mousemove",n.handleDrag),window.addEventListener("mouseup",n.handleMouseUp))},n.handleMouseUp=function(){n.unbindEventListeners()},n.unbindEventListeners=function(){window.removeEventListener("mousemove",n.handleDrag),window.removeEventListener("mouseup",n.handleMouseUp)},n.state={value:String(e.value).toUpperCase(),blurValue:String(e.value).toUpperCase()},n.inputId="rc-editable-input-"+_r++,n}return!function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),x9(t,[{key:"componentDidUpdate",value:function(e,t){this.props.value!==this.state.value&&(e.value!==this.props.value||t.value!==this.state.value)&&(this.input===document.activeElement?this.setState({blurValue:String(this.props.value).toUpperCase()}):this.setState({value:String(this.props.value).toUpperCase(),blurValue:!this.state.blurValue&&String(this.props.value).toUpperCase()}))}},{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"getValueObjectWithLabel",value:function(e){var t,n;return t={},(n=this.props.label)in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}},{key:"getArrowOffset",value:function(){return this.props.arrowOffset||1}},{key:"setUpdatedValue",value:function(e,t){var n=this.props.label?this.getValueObjectWithLabel(e):e;this.props.onChange&&this.props.onChange(n,t),this.setState({value:e})}},{key:"render",value:function(){var e=this,t=(0,_e.default)({default:{wrap:{position:"relative"}},"user-override":{wrap:this.props.style&&this.props.style.wrap?this.props.style.wrap:{},input:this.props.style&&this.props.style.input?this.props.style.input:{},label:this.props.style&&this.props.style.label?this.props.style.label:{}},"dragLabel-true":{label:{cursor:"ew-resize"}}},{"user-override":!0},this.props);return x7.default.createElement("div",{style:t.wrap},x7.default.createElement("input",{id:this.inputId,style:t.input,ref:function(t){return e.input=t},value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,onBlur:this.handleBlur,placeholder:this.props.placeholder,spellCheck:"false"}),this.props.label&&!this.props.hideLabel?x7.default.createElement("label",{htmlFor:this.inputId,style:t.label,onMouseDown:this.handleMouseDown},this.props.label):null)}}]),t}(v.PureComponent||v.Component);x8.default=_i,Object.defineProperty(xz,"EditableInput",{enumerable:!0,get:function(){return Et(x8).default}});var _o={};Object.defineProperty(_o,"__esModule",{value:!0}),_o.Hue=void 0;var _a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),v=h("8NFma"),_l=_d(v),_s=_d(vj),_u={};Object.defineProperty(_u,"__esModule",{value:!0}),_u.calculateChange=function(e,t,n,r){var i=r.clientWidth,o=r.clientHeight,a="number"==typeof e.pageX?e.pageX:e.touches[0].pageX,l="number"==typeof e.pageY?e.pageY:e.touches[0].pageY,s=a-(r.getBoundingClientRect().left+window.pageXOffset),u=l-(r.getBoundingClientRect().top+window.pageYOffset);if("vertical"===t){var c=void 0;if(c=u<0?359:u>o?0:360*(-(100*u/o)+100)/100,n.h!==c)return{h:c,s:n.s,l:n.l,a:n.a,source:"hsl"}}else{var d=void 0;if(d=s<0?0:s>i?359:100*s/i*360/100,n.h!==d)return{h:d,s:n.s,l:n.l,a:n.a,source:"hsl"}}return null};var _c=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(_u);function _d(e){return e&&e.__esModule?e:{default:e}}function _h(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}var _f=_o.Hue=function(e){function t(){!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,t);for(var e,n,r,i=arguments.length,o=Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=r=_h(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(o))),r.handleChange=function(e){var t=_c.calculateChange(e,r.props.direction,r.props.hsl,r.container);t&&"function"==typeof r.props.onChange&&r.props.onChange(t,e)},r.handleMouseDown=function(e){r.handleChange(e),window.addEventListener("mousemove",r.handleChange),window.addEventListener("mouseup",r.handleMouseUp)},r.handleMouseUp=function(){r.unbindEventListeners()},_h(r,n)}return!function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),_a(t,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"unbindEventListeners",value:function(){window.removeEventListener("mousemove",this.handleChange),window.removeEventListener("mouseup",this.handleMouseUp)}},{key:"render",value:function(){var e=this,t=this.props.direction,n=void 0===t?"horizontal":t,r=(0,_s.default)({default:{hue:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius,boxShadow:this.props.shadow},container:{padding:"0 2px",position:"relative",height:"100%",borderRadius:this.props.radius},pointer:{position:"absolute",left:100*this.props.hsl.h/360+"%"},slider:{marginTop:"1px",width:"4px",borderRadius:"1px",height:"8px",boxShadow:"0 0 2px rgba(0, 0, 0, .6)",background:"#fff",transform:"translateX(-2px)"}},vertical:{pointer:{left:"0px",top:-(100*this.props.hsl.h/360)+100+"%"}}},{vertical:"vertical"===n});return _l.default.createElement("div",{style:r.hue},_l.default.createElement("div",{className:"hue-"+n,style:r.container,ref:function(t){return e.container=t},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},_l.default.createElement("style",null,"\n .hue-horizontal {\n background: linear-gradient(to right, #f00 0%, #ff0 17%, #0f0\n 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\n background: -webkit-linear-gradient(to right, #f00 0%, #ff0\n 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\n }\n\n .hue-vertical {\n background: linear-gradient(to top, #f00 0%, #ff0 17%, #0f0 33%,\n #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\n background: -webkit-linear-gradient(to top, #f00 0%, #ff0 17%,\n #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\n }\n "),_l.default.createElement("div",{style:r.pointer},this.props.pointer?_l.default.createElement(this.props.pointer,this.props):_l.default.createElement("div",{style:r.slider}))))}}]),t}(v.PureComponent||v.Component);_o.default=_f,Object.defineProperty(xz,"Hue",{enumerable:!0,get:function(){return Et(_o).default}});var _p={};Object.defineProperty(_p,"__esModule",{value:!0}),_p.Raised=void 0;var v=h("8NFma"),_g=_b(v),_m=_b(vN),_v=_b(vj),_y=_b(xg);function _b(e){return e&&e.__esModule?e:{default:e}}var _w=_p.Raised=function(e){var t=e.zDepth,n=e.radius,r=e.background,i=e.children,o=e.styles,a=(0,_v.default)((0,_y.default)({default:{wrap:{position:"relative",display:"inline-block"},content:{position:"relative"},bg:{absolute:"0px 0px 0px 0px",boxShadow:"0 "+t+"px "+4*t+"px rgba(0,0,0,.24)",borderRadius:n,background:r}},"zDepth-0":{bg:{boxShadow:"none"}},"zDepth-1":{bg:{boxShadow:"0 2px 10px rgba(0,0,0,.12), 0 2px 5px rgba(0,0,0,.16)"}},"zDepth-2":{bg:{boxShadow:"0 6px 20px rgba(0,0,0,.19), 0 8px 17px rgba(0,0,0,.2)"}},"zDepth-3":{bg:{boxShadow:"0 17px 50px rgba(0,0,0,.19), 0 12px 15px rgba(0,0,0,.24)"}},"zDepth-4":{bg:{boxShadow:"0 25px 55px rgba(0,0,0,.21), 0 16px 28px rgba(0,0,0,.22)"}},"zDepth-5":{bg:{boxShadow:"0 40px 77px rgba(0,0,0,.22), 0 27px 24px rgba(0,0,0,.2)"}},square:{bg:{borderRadius:"0"}},circle:{bg:{borderRadius:"50%"}}},void 0===o?{}:o),{"zDepth-1":1===t});return _g.default.createElement("div",{style:a.wrap},_g.default.createElement("div",{style:a.bg}),_g.default.createElement("div",{style:a.content},i))};_w.propTypes={background:_m.default.string,zDepth:_m.default.oneOf([0,1,2,3,4,5]),radius:_m.default.number,styles:_m.default.object},_w.defaultProps={background:"#fff",zDepth:1,radius:2,styles:{}},_p.default=_w,Object.defineProperty(xz,"Raised",{enumerable:!0,get:function(){return Et(_p).default}});var _x={};Object.defineProperty(_x,"__esModule",{value:!0}),_x.Saturation=void 0;var __=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),v=h("8NFma"),_E=_H(v),_S=_H(vj),_C={},yf=h("kNSK3"),_O={},yd=h("eeOBM");_O=function(){return yd.Date.now()};var _k={},_P={},_T={},_A=/\s/;_T=function(e){for(var t=e.length;t--&&_A.test(e.charAt(t)););return t};var _N=/^\s+/;_P=function(e){return e?e.slice(0,_T(e)+1).replace(_N,""):e};var yf=h("kNSK3"),_j=0/0,_R=/^[-+]0x[0-9a-f]+$/i,_I=/^0b[01]+$/i,_L=/^0o[0-7]+$/i,_M=parseInt;_k=function(e){if("number"==typeof e)return e;if(bL(e))return _j;if(yf(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=yf(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=_P(e);var n=_I.test(e);return n||_L.test(e)?_M(e.slice(2),n?2:8):_R.test(e)?_j:+e};var _D=Math.max,_F=Math.min;_C=function(e,t,n){var r,i,o,a,l,s,u=0,c=!1,d=!1,h=!0;if("function"!=typeof e)throw TypeError("Expected a function");function f(t){var n=r,o=i;return r=i=void 0,u=t,a=e.apply(o,n)}function p(e){var n=e-s,r=e-u;return void 0===s||n>=t||n<0||d&&r>=o}function g(){var e,n,r,i=_O();if(p(i))return m(i);l=setTimeout(g,(e=i-s,n=i-u,r=t-e,d?_F(r,o-n):r))}function m(e){return(l=void 0,h&&r)?f(e):(r=i=void 0,a)}function v(){var e,n=_O(),o=p(n);if(r=arguments,i=this,s=n,o){if(void 0===l)return u=e=s,l=setTimeout(g,t),c?f(e):a;if(d)return clearTimeout(l),l=setTimeout(g,t),f(s)}return void 0===l&&(l=setTimeout(g,t)),a}return t=_k(t)||0,yf(n)&&(c=!!n.leading,o=(d="maxWait"in n)?_D(_k(n.maxWait)||0,t):o,h="trailing"in n?!!n.trailing:h),v.cancel=function(){void 0!==l&&clearTimeout(l),u=0,r=s=i=l=void 0},v.flush=function(){return void 0===l?a:m(_O())},v};var yf=h("kNSK3"),_z=_H(function(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw TypeError("Expected a function");return yf(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),_C(e,t,{leading:r,maxWait:t,trailing:i})}),_B={};Object.defineProperty(_B,"__esModule",{value:!0}),_B.calculateChange=function(e,t,n){var r=n.getBoundingClientRect(),i=r.width,o=r.height,a="number"==typeof e.pageX?e.pageX:e.touches[0].pageX,l="number"==typeof e.pageY?e.pageY:e.touches[0].pageY,s=a-(n.getBoundingClientRect().left+window.pageXOffset),u=l-(n.getBoundingClientRect().top+window.pageYOffset);s<0?s=0:s>i&&(s=i),u<0?u=0:u>o&&(u=o);var c=s/i,d=1-u/o;return{h:t.h,s:c,v:d,a:t.a,source:"hsv"}};var _U=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(_B);function _H(e){return e&&e.__esModule?e:{default:e}}var _V=_x.Saturation=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.handleChange=function(e){"function"==typeof n.props.onChange&&n.throttle(n.props.onChange,_U.calculateChange(e,n.props.hsl,n.container),e)},n.handleMouseDown=function(e){n.handleChange(e);var t=n.getContainerRenderWindow();t.addEventListener("mousemove",n.handleChange),t.addEventListener("mouseup",n.handleMouseUp)},n.handleMouseUp=function(){n.unbindEventListeners()},n.throttle=(0,_z.default)(function(e,t,n){e(t,n)},50),n}return!function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),__(t,[{key:"componentWillUnmount",value:function(){this.throttle.cancel(),this.unbindEventListeners()}},{key:"getContainerRenderWindow",value:function(){for(var e=this.container,t=window;!t.document.contains(e)&&t.parent!==t;)t=t.parent;return t}},{key:"unbindEventListeners",value:function(){var e=this.getContainerRenderWindow();e.removeEventListener("mousemove",this.handleChange),e.removeEventListener("mouseup",this.handleMouseUp)}},{key:"render",value:function(){var e=this,t=this.props.style||{},n=t.color,r=t.white,i=t.black,o=t.pointer,a=t.circle,l=(0,_S.default)({default:{color:{absolute:"0px 0px 0px 0px",background:"hsl("+this.props.hsl.h+",100%, 50%)",borderRadius:this.props.radius},white:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius},black:{absolute:"0px 0px 0px 0px",boxShadow:this.props.shadow,borderRadius:this.props.radius},pointer:{position:"absolute",top:-(100*this.props.hsv.v)+100+"%",left:100*this.props.hsv.s+"%",cursor:"default"},circle:{width:"4px",height:"4px",boxShadow:"0 0 0 1.5px #fff, inset 0 0 1px 1px rgba(0,0,0,.3),\n 0 0 1px 2px rgba(0,0,0,.4)",borderRadius:"50%",cursor:"hand",transform:"translate(-2px, -2px)"}},custom:{color:n,white:r,black:i,pointer:o,circle:a}},{custom:!!this.props.style});return _E.default.createElement("div",{style:l.color,ref:function(t){return e.container=t},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},_E.default.createElement("style",null,"\n .saturation-white {\n background: -webkit-linear-gradient(to right, #fff, rgba(255,255,255,0));\n background: linear-gradient(to right, #fff, rgba(255,255,255,0));\n }\n .saturation-black {\n background: -webkit-linear-gradient(to top, #000, rgba(0,0,0,0));\n background: linear-gradient(to top, #000, rgba(0,0,0,0));\n }\n "),_E.default.createElement("div",{style:l.white,className:"saturation-white"},_E.default.createElement("div",{style:l.black,className:"saturation-black"}),_E.default.createElement("div",{style:l.pointer},this.props.pointer?_E.default.createElement(this.props.pointer,this.props):_E.default.createElement("div",{style:l.circle}))))}}]),t}(v.PureComponent||v.Component);_x.default=_V,Object.defineProperty(xz,"Saturation",{enumerable:!0,get:function(){return Et(_x).default}});var _q={};Object.defineProperty(_q,"__esModule",{value:!0}),_q.ColorWrap=void 0;var _G=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_W=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),v=h("8NFma"),_$=_1(v),_K=_1(_C),_Y={};Object.defineProperty(_Y,"__esModule",{value:!0}),_Y.isvalidColorString=_Y.red=_Y.getContrastingColor=_Y.isValidHex=_Y.toState=_Y.simpleCheckForValidColor=void 0;var _X=_Q(h("2MeUa")),_Z=_Q(function(){function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}var t,n,r,i=/^\s+/,o=/\s+$/;function a(t,n){if(n=n||{},(t=t||"")instanceof a)return t;if(!(this instanceof a))return new a(t,n);var r,l,s,u,c,d,h,f,p,g,m,v,y,b,w,x,_,S,k,T,N=(l={r:0,g:0,b:0},s=1,u=null,c=null,d=null,h=!1,f=!1,"string"==typeof(r=t)&&(r=function(e){e=e.replace(i,"").replace(o,"").toLowerCase();var t,n=!1;if(E[e])e=E[e],n=!0;else if("transparent"==e)return{r:0,g:0,b:0,a:0,format:"name"};return(t=j.rgb.exec(e))?{r:t[1],g:t[2],b:t[3]}:(t=j.rgba.exec(e))?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=j.hsl.exec(e))?{h:t[1],s:t[2],l:t[3]}:(t=j.hsla.exec(e))?{h:t[1],s:t[2],l:t[3],a:t[4]}:(t=j.hsv.exec(e))?{h:t[1],s:t[2],v:t[3]}:(t=j.hsva.exec(e))?{h:t[1],s:t[2],v:t[3],a:t[4]}:(t=j.hex8.exec(e))?{r:P(t[1]),g:P(t[2]),b:P(t[3]),a:P(t[4])/255,format:n?"name":"hex8"}:(t=j.hex6.exec(e))?{r:P(t[1]),g:P(t[2]),b:P(t[3]),format:n?"name":"hex"}:(t=j.hex4.exec(e))?{r:P(t[1]+""+t[1]),g:P(t[2]+""+t[2]),b:P(t[3]+""+t[3]),a:P(t[4]+""+t[4])/255,format:n?"name":"hex8"}:!!(t=j.hex3.exec(e))&&{r:P(t[1]+""+t[1]),g:P(t[2]+""+t[2]),b:P(t[3]+""+t[3]),format:n?"name":"hex"}}(r)),"object"==e(r)&&(R(r.r)&&R(r.g)&&R(r.b)?(p=r.r,g=r.g,m=r.b,l={r:255*O(p,255),g:255*O(g,255),b:255*O(m,255)},h=!0,f="%"===String(r.r).substr(-1)?"prgb":"rgb"):R(r.h)&&R(r.s)&&R(r.v)?(u=A(r.s),c=A(r.v),v=r.h,y=u,b=c,v=6*O(v,360),y=O(y,100),b=O(b,100),w=Math.floor(v),x=v-w,_=b*(1-y),S=b*(1-x*y),k=b*(1-(1-x)*y),l={r:255*[b,S,_,_,k,b][T=w%6],g:255*[k,b,b,S,_,_][T],b:255*[_,_,k,b,b,S][T]},h=!0,f="hsv"):R(r.h)&&R(r.s)&&R(r.l)&&(u=A(r.s),d=A(r.l),l=function(e,t,n){var r,i,o;function a(e,t,n){return(n<0&&(n+=1),n>1&&(n-=1),n<1/6)?e+(t-e)*6*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}if(e=O(e,360),t=O(t,100),n=O(n,100),0===t)r=i=o=n;else{var l=n<.5?n*(1+t):n+t-n*t,s=2*n-l;r=a(s,l,e+1/3),i=a(s,l,e),o=a(s,l,e-1/3)}return{r:255*r,g:255*i,b:255*o}}(r.h,u,d),h=!0,f="hsl"),r.hasOwnProperty("a")&&(s=r.a)),s=C(s),{ok:h,format:r.format||f,r:Math.min(255,Math.max(l.r,0)),g:Math.min(255,Math.max(l.g,0)),b:Math.min(255,Math.max(l.b,0)),a:s});this._originalInput=t,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=n.format||N.format,this._gradientType=n.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}function l(e,t,n){var r,i,o=Math.max(e=O(e,255),t=O(t,255),n=O(n,255)),a=Math.min(e,t,n),l=(o+a)/2;if(o==a)r=i=0;else{var s=o-a;switch(i=l>.5?s/(2-o-a):s/(o+a),o){case e:r=(t-n)/s+(t<n?6:0);break;case t:r=(n-e)/s+2;break;case n:r=(e-t)/s+4}r/=6}return{h:r,s:i,l:l}}function s(e,t,n){var r,i=Math.max(e=O(e,255),t=O(t,255),n=O(n,255)),o=Math.min(e,t,n),a=i-o;if(i==o)r=0;else{switch(i){case e:r=(t-n)/a+(t<n?6:0);break;case t:r=(n-e)/a+2;break;case n:r=(e-t)/a+4}r/=6}return{h:r,s:0===i?0:a/i,v:i}}function u(e,t,n,r){var i=[T(Math.round(e).toString(16)),T(Math.round(t).toString(16)),T(Math.round(n).toString(16))];return r&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function c(e,t,n,r){return[T(N(r)),T(Math.round(e).toString(16)),T(Math.round(t).toString(16)),T(Math.round(n).toString(16))].join("")}function d(e,t){t=0===t?0:t||10;var n=a(e).toHsl();return n.s-=t/100,n.s=k(n.s),a(n)}function h(e,t){t=0===t?0:t||10;var n=a(e).toHsl();return n.s+=t/100,n.s=k(n.s),a(n)}function f(e){return a(e).desaturate(100)}function p(e,t){t=0===t?0:t||10;var n=a(e).toHsl();return n.l+=t/100,n.l=k(n.l),a(n)}function g(e,t){t=0===t?0:t||10;var n=a(e).toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(-(t/100*255)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(-(t/100*255)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(-(t/100*255)))),a(n)}function m(e,t){t=0===t?0:t||10;var n=a(e).toHsl();return n.l-=t/100,n.l=k(n.l),a(n)}function v(e,t){var n=a(e).toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,a(n)}function y(e){var t=a(e).toHsl();return t.h=(t.h+180)%360,a(t)}function b(e,t){if(isNaN(t)||t<=0)throw Error("Argument to polyad must be a positive number");for(var n=a(e).toHsl(),r=[a(e)],i=360/t,o=1;o<t;o++)r.push(a({h:(n.h+o*i)%360,s:n.s,l:n.l}));return r}function w(e){var t=a(e).toHsl(),n=t.h;return[a(e),a({h:(n+72)%360,s:t.s,l:t.l}),a({h:(n+216)%360,s:t.s,l:t.l})]}function x(e,t,n){t=t||6,n=n||30;var r=a(e).toHsl(),i=360/n,o=[a(e)];for(r.h=(r.h-(i*t>>1)+720)%360;--t;)r.h=(r.h+i)%360,o.push(a(r));return o}function _(e,t){t=t||6;for(var n=a(e).toHsv(),r=n.h,i=n.s,o=n.v,l=[],s=1/t;t--;)l.push(a({h:r,s:i,v:o})),o=(o+s)%1;return l}a.prototype={isDark:function(){return 128>this.getBrightness()},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 e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,n,r=this.toRgb();return e=r.r/255,.2126*(e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4))+.7152*((t=r.g/255)<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.0722*((n=r.b/255)<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4))},setAlpha:function(e){return this._a=C(e),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var e=s(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=s(this._r,this._g,this._b),t=Math.round(360*e.h),n=Math.round(100*e.s),r=Math.round(100*e.v);return 1==this._a?"hsv("+t+", "+n+"%, "+r+"%)":"hsva("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var e=l(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=l(this._r,this._g,this._b),t=Math.round(360*e.h),n=Math.round(100*e.s),r=Math.round(100*e.l);return 1==this._a?"hsl("+t+", "+n+"%, "+r+"%)":"hsla("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHex:function(e){return u(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){var t,n,r,i,o;return t=this._r,n=this._g,r=this._b,i=this._a,o=[T(Math.round(t).toString(16)),T(Math.round(n).toString(16)),T(Math.round(r).toString(16)),T(N(i))],e&&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[3].charAt(0)==o[3].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0):o.join("")},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"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(100*O(this._r,255))+"%",g:Math.round(100*O(this._g,255))+"%",b:Math.round(100*O(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+Math.round(100*O(this._r,255))+"%, "+Math.round(100*O(this._g,255))+"%, "+Math.round(100*O(this._b,255))+"%)":"rgba("+Math.round(100*O(this._r,255))+"%, "+Math.round(100*O(this._g,255))+"%, "+Math.round(100*O(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(S[u(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+c(this._r,this._g,this._b,this._a),n=t,r=this._gradientType?"GradientType = 1, ":"";if(e){var i=a(e);n="#"+c(i._r,i._g,i._b,i._a)}return"progid:DXImageTransform.Microsoft.gradient("+r+"startColorstr="+t+",endColorstr="+n+")"},toString:function(e){var t=!!e;e=e||this._format;var n=!1,r=this._a<1&&this._a>=0;return!t&&r&&("hex"===e||"hex6"===e||"hex3"===e||"hex4"===e||"hex8"===e||"name"===e)?"name"===e&&0===this._a?this.toName():this.toRgbString():("rgb"===e&&(n=this.toRgbString()),"prgb"===e&&(n=this.toPercentageRgbString()),("hex"===e||"hex6"===e)&&(n=this.toHexString()),"hex3"===e&&(n=this.toHexString(!0)),"hex4"===e&&(n=this.toHex8String(!0)),"hex8"===e&&(n=this.toHex8String()),"name"===e&&(n=this.toName()),"hsl"===e&&(n=this.toHslString()),"hsv"===e&&(n=this.toHsvString()),n||this.toHexString())},clone:function(){return a(this.toString())},_applyModification:function(e,t){var n=e.apply(null,[this].concat([].slice.call(t)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(p,arguments)},brighten:function(){return this._applyModification(g,arguments)},darken:function(){return this._applyModification(m,arguments)},desaturate:function(){return this._applyModification(d,arguments)},saturate:function(){return this._applyModification(h,arguments)},greyscale:function(){return this._applyModification(f,arguments)},spin:function(){return this._applyModification(v,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(x,arguments)},complement:function(){return this._applyCombination(y,arguments)},monochromatic:function(){return this._applyCombination(_,arguments)},splitcomplement:function(){return this._applyCombination(w,arguments)},triad:function(){return this._applyCombination(b,[3])},tetrad:function(){return this._applyCombination(b,[4])}},a.fromRatio=function(t,n){if("object"==e(t)){var r={};for(var i in t)t.hasOwnProperty(i)&&("a"===i?r[i]=t[i]:r[i]=A(t[i]));t=r}return a(t,n)},a.equals=function(e,t){return!!e&&!!t&&a(e).toRgbString()==a(t).toRgbString()},a.random=function(){return a.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})},a.mix=function(e,t,n){n=0===n?0:n||50;var r=a(e).toRgb(),i=a(t).toRgb(),o=n/100;return a({r:(i.r-r.r)*o+r.r,g:(i.g-r.g)*o+r.g,b:(i.b-r.b)*o+r.b,a:(i.a-r.a)*o+r.a})},a.readability=function(e,t){var n=a(e),r=a(t);return(Math.max(n.getLuminance(),r.getLuminance())+.05)/(Math.min(n.getLuminance(),r.getLuminance())+.05)},a.isReadable=function(e,t,n){var r,i,o,l,s,u=a.readability(e,t);switch(s=!1,(i=((r=(r=n)||{level:"AA",size:"small"}).level||"AA").toUpperCase(),o=(r.size||"small").toLowerCase(),"AA"!==i&&"AAA"!==i&&(i="AA"),"small"!==o&&"large"!==o&&(o="small"),l={level:i,size:o}).level+l.size){case"AAsmall":case"AAAlarge":s=u>=4.5;break;case"AAlarge":s=u>=3;break;case"AAAsmall":s=u>=7}return s},a.mostReadable=function(e,t,n){var r,i,o,l,s=null,u=0;i=(n=n||{}).includeFallbackColors,o=n.level,l=n.size;for(var c=0;c<t.length;c++)(r=a.readability(e,t[c]))>u&&(u=r,s=a(t[c]));return a.isReadable(e,s,{level:o,size:l})||!i?s:(n.includeFallbackColors=!1,a.mostReadable(e,["#fff","#000"],n))};var E=a.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"},S=a.hexNames=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}(E);function C(e){return(isNaN(e=parseFloat(e))||e<0||e>1)&&(e=1),e}function O(e,t){"string"==typeof(n=e)&&-1!=n.indexOf(".")&&1===parseFloat(n)&&(e="100%");var n,r,i="string"==typeof(r=e)&&-1!=r.indexOf("%");return(e=Math.min(t,Math.max(0,parseFloat(e))),i&&(e=parseInt(e*t,10)/100),1e-6>Math.abs(e-t))?1:e%t/parseFloat(t)}function k(e){return Math.min(1,Math.max(0,e))}function P(e){return parseInt(e,16)}function T(e){return 1==e.length?"0"+e:""+e}function A(e){return e<=1&&(e=100*e+"%"),e}function N(e){return Math.round(255*parseFloat(e)).toString(16)}var j=(n="[\\s|\\(]+("+(t="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+t+")[,|\\s]+("+t+")\\s*\\)?",r="[\\s|\\(]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")\\s*\\)?",{CSS_UNIT:new RegExp(t),rgb:RegExp("rgb"+n),rgba:RegExp("rgba"+r),hsl:RegExp("hsl"+n),hsla:RegExp("hsla"+r),hsv:RegExp("hsv"+n),hsva:RegExp("hsva"+r),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 R(e){return!!j.CSS_UNIT.exec(e)}return a}());function _Q(e){return e&&e.__esModule?e:{default:e}}_Y.simpleCheckForValidColor=function(e){var t=0,n=0;return(0,_X.default)(["r","g","b","a","h","s","l","v"],function(r){e[r]&&(t+=1,isNaN(e[r])||(n+=1),("s"===r||"l"===r)&&/^\d+%$/.test(e[r])&&(n+=1))}),t===n&&e};var _J=_Y.toState=function(e,t){var n=e.hex?(0,_Z.default)(e.hex):(0,_Z.default)(e),r=n.toHsl(),i=n.toHsv(),o=n.toRgb(),a=n.toHex();return 0===r.s&&(r.h=t||0,i.h=t||0),{hsl:r,hex:"000000"===a&&0===o.a?"transparent":"#"+a,rgb:o,hsv:i,oldHue:e.h||t||r.h,source:e.source}};_Y.isValidHex=function(e){if("transparent"===e)return!0;var t="#"===String(e).charAt(0)?1:0;return e.length!==4+t&&e.length<7+t&&(0,_Z.default)(e).isValid()},_Y.getContrastingColor=function(e){if(!e)return"#fff";var t=_J(e);return"transparent"===t.hex?"rgba(0,0,0,0.4)":(299*t.rgb.r+587*t.rgb.g+114*t.rgb.b)/1e3>=128?"#000":"#fff"},_Y.red={hsl:{a:1,h:0,l:.5,s:1},hex:"#ff0000",rgb:{r:255,g:0,b:0,a:1},hsv:{h:0,s:1,v:1,a:1}},_Y.isvalidColorString=function(e,t){var n=e.replace("°","");return(0,_Z.default)(t+" ("+n+")")._ok};var _0=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(_Y);function _1(e){return e&&e.__esModule?e:{default:e}}var _2=_q.ColorWrap=function(e){var t=function(t){function n(e){!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,n);var t=function(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this));return t.handleChange=function(e,n){if(_0.simpleCheckForValidColor(e)){var r=_0.toState(e,e.h||t.state.oldHue);t.setState(r),t.props.onChangeComplete&&t.debounce(t.props.onChangeComplete,r,n),t.props.onChange&&t.props.onChange(r,n)}},t.handleSwatchHover=function(e,n){if(_0.simpleCheckForValidColor(e)){var r=_0.toState(e,e.h||t.state.oldHue);t.props.onSwatchHover&&t.props.onSwatchHover(r,n)}},t.state=_G({},_0.toState(e.color,0)),t.debounce=(0,_K.default)(function(e,t,n){e(t,n)},100),t}return!function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,t),_W(n,[{key:"render",value:function(){var t={};return this.props.onSwatchHover&&(t.onSwatchHover=this.handleSwatchHover),_$.default.createElement(e,_G({},this.props,this.state,{onChange:this.handleChange},t))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return _G({},_0.toState(e.color,t.oldHue))}}]),n}(v.PureComponent||v.Component);return t.propTypes=_G({},e.propTypes),t.defaultProps=_G({},e.defaultProps,{color:{h:250,s:.5,l:.2,a:1}}),t};_q.default=_2,Object.defineProperty(xz,"ColorWrap",{enumerable:!0,get:function(){return Et(_q).default}});var _3={};Object.defineProperty(_3,"__esModule",{value:!0}),_3.Swatch=void 0;var _5=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},v=h("8NFma"),_6=_7(v),_4=_7(vj),_8=h("gxGlt"),_9=_7(x$);function _7(e){return e&&e.__esModule?e:{default:e}}var Ee=_3.Swatch=function(e){var t=e.color,n=e.style,r=e.onClick,i=void 0===r?function(){}:r,o=e.onHover,a=e.title,l=void 0===a?t:a,s=e.children,u=e.focus,c=e.focusStyle,d="transparent"===t,h=(0,_4.default)({default:{swatch:_5({background:t,height:"100%",width:"100%",cursor:"pointer",position:"relative",outline:"none"},n,u?void 0===c?{}:c:{})}}),f={};return o&&(f.onMouseOver=function(e){return o(t,e)}),_6.default.createElement("div",_5({style:h.swatch,onClick:function(e){return i(t,e)},title:l,tabIndex:0,onKeyDown:function(e){return 13===e.keyCode&&i(t,e)}},f),s,d&&_6.default.createElement(_9.default,{borderRadius:h.swatch.borderRadius,boxShadow:"inset 0 0 0 1px rgba(0,0,0,0.1)"}))};function Et(e){return e&&e.__esModule?e:{default:e}}_3.default=(0,_8.handleFocus)(Ee),Object.defineProperty(xz,"Swatch",{enumerable:!0,get:function(){return Et(_3).default}});var En={};Object.defineProperty(En,"__esModule",{value:!0}),En.SketchFields=void 0;var v=h("8NFma"),Er=Ea(v),Ei=Ea(vj),Eo=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(_Y);function Ea(e){return e&&e.__esModule?e:{default:e}}var El=En.SketchFields=function(e){var t=e.onChange,n=e.rgb,r=e.hsl,i=e.hex,o=e.disableAlpha,a=(0,Ei.default)({default:{fields:{display:"flex",paddingTop:"4px"},single:{flex:"1",paddingLeft:"6px"},alpha:{flex:"1",paddingLeft:"6px"},double:{flex:"2"},input:{width:"80%",padding:"4px 10% 3px",border:"none",boxShadow:"inset 0 0 0 1px #ccc",fontSize:"11px"},label:{display:"block",textAlign:"center",fontSize:"11px",color:"#222",paddingTop:"3px",paddingBottom:"4px",textTransform:"capitalize"}},disableAlpha:{alpha:{display:"none"}}},{disableAlpha:o}),l=function(e,i){e.hex?Eo.isValidHex(e.hex)&&t({hex:e.hex,source:"hex"},i):e.r||e.g||e.b?t({r:e.r||n.r,g:e.g||n.g,b:e.b||n.b,a:n.a,source:"rgb"},i):e.a&&(e.a<0?e.a=0:e.a>100&&(e.a=100),e.a/=100,t({h:r.h,s:r.s,l:r.l,a:e.a,source:"rgb"},i))};return Er.default.createElement("div",{style:a.fields,className:"flexbox-fix"},Er.default.createElement("div",{style:a.double},Er.default.createElement(xz.EditableInput,{style:{input:a.input,label:a.label},label:"hex",value:i.replace("#",""),onChange:l})),Er.default.createElement("div",{style:a.single},Er.default.createElement(xz.EditableInput,{style:{input:a.input,label:a.label},label:"r",value:n.r,onChange:l,dragLabel:"true",dragMax:"255"})),Er.default.createElement("div",{style:a.single},Er.default.createElement(xz.EditableInput,{style:{input:a.input,label:a.label},label:"g",value:n.g,onChange:l,dragLabel:"true",dragMax:"255"})),Er.default.createElement("div",{style:a.single},Er.default.createElement(xz.EditableInput,{style:{input:a.input,label:a.label},label:"b",value:n.b,onChange:l,dragLabel:"true",dragMax:"255"})),Er.default.createElement("div",{style:a.alpha},Er.default.createElement(xz.EditableInput,{style:{input:a.input,label:a.label},label:"a",value:Math.round(100*n.a),onChange:l,dragLabel:"true",dragMax:"100"})))};En.default=El;var Es={};Object.defineProperty(Es,"__esModule",{value:!0}),Es.SketchPresetColors=void 0;var Eu=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},v=h("8NFma"),Ec=Ef(v),Ed=Ef(vN),Eh=Ef(vj);function Ef(e){return e&&e.__esModule?e:{default:e}}var Ep=Es.SketchPresetColors=function(e){var t=e.colors,n=e.onClick,r=void 0===n?function(){}:n,i=e.onSwatchHover,o=(0,Eh.default)({default:{colors:{margin:"0 -10px",padding:"10px 0 0 10px",borderTop:"1px solid #eee",display:"flex",flexWrap:"wrap",position:"relative"},swatchWrap:{width:"16px",height:"16px",margin:"0 10px 10px 0"},swatch:{borderRadius:"3px",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15)"}},"no-presets":{colors:{display:"none"}}},{"no-presets":!t||!t.length}),a=function(e,t){r({hex:e,source:"hex"},t)};return Ec.default.createElement("div",{style:o.colors,className:"flexbox-fix"},t.map(function(e){var t="string"==typeof e?{color:e}:e,n=""+t.color+(t.title||"");return Ec.default.createElement("div",{key:n,style:o.swatchWrap},Ec.default.createElement(xz.Swatch,Eu({},t,{style:o.swatch,onClick:a,onHover:i,focusStyle:{boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15), 0 0 4px "+t.color}})))}))};Ep.propTypes={colors:Ed.default.arrayOf(Ed.default.oneOfType([Ed.default.string,Ed.default.shape({color:Ed.default.string,title:Ed.default.string})])).isRequired},Es.default=Ep;let Eg=e=>{let t=l(v).useRef(e);return t.current=e,l(v).useCallback((...e)=>t.current(...e),[])},Em=({width:e,rgb:t,hex:n,hsv:r,hsl:i,onChange:o,onSwatchHover:a,disableAlpha:s,presetColors:u,renderers:c,styles:d={},className:h=""})=>{let f=l(vj)(l(xg)({default:{picker:{width:e,padding:"10px 10px 0",boxSizing:"initial",background:"#fff",borderRadius:"4px",boxShadow:"0 0 0 1px rgba(0,0,0,.15), 0 8px 16px rgba(0,0,0,.15)"},saturation:{width:"100%",paddingBottom:"75%",position:"relative",overflow:"hidden"},Saturation:{radius:"3px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},controls:{display:"flex"},sliders:{padding:"4px 0",flex:"1"},color:{width:"24px",height:"24px",position:"relative",marginTop:"4px",marginLeft:"4px",borderRadius:"3px"},activeColor:{absolute:"0px 0px 0px 0px",borderRadius:"2px",background:`rgba(${t.r},${t.g},${t.b},${t.a})`,boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},hue:{position:"relative",height:"10px",overflow:"hidden"},Hue:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},alpha:{position:"relative",height:"10px",marginTop:"4px",overflow:"hidden"},Alpha:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},...d},disableAlpha:{color:{height:"10px"},hue:{height:"10px"},alpha:{display:"none"}}},d),{disableAlpha:s}),[g,m]=l(v).useState(!1),y=l(v).useRef(null),b=Eg(e=>{if(g){let t=y.current?.fill();t&&o(l(A).Util.colorToRGBA(t)),x(),!function(e,t){let n=e.target;for(;n;){if(n.classList.contains(t))return!0;n=n.parentElement}return!1}(e,"color-picker-button")&&m(!1),e.stopPropagation(),e.stopImmediatePropagation()}}),w=Eg(e=>{if(!g)return;let t=l(A).stages.find(t=>{let n=t.getContent().getBoundingClientRect();return n.left<e.clientX&&n.left+n.width>e.clientX&&n.top<e.clientY&&n.top+n.height>e.clientY});if(!t){x();return}let n=t.getContent().getBoundingClientRect(),r={x:e.clientX-n.left,y:e.clientY-n.top},i=t.children[0],o=i.getNativeCanvasElement(),a=i.getCanvas().getPixelRatio(),{data:s}=o.getContext("2d").getImageData(r.x*a,r.y*a,1,1),u=t.findOne(".line-guides");u.findOne(".picker")||(y.current&&y.current.destroy(),y.current=new(l(A)).Circle({name:"picker",radius:14,stroke:"black",strokeWidth:1}),u.add(y.current)),y.current.setAbsolutePosition({x:r.x-15,y:r.y-15}),y.current.fill("rgb("+s[0]+","+s[1]+","+s[2]+")")});l(v).useEffect(()=>(window.addEventListener("mousemove",w),window.addEventListener("mousedown",b,!0),window.addEventListener("touchstart",b,!0),()=>{window.removeEventListener("mousemove",w),window.removeEventListener("mousedown",b,!0),window.removeEventListener("touchstart",b,!0),x()}),[]),l(v).useEffect(()=>{g||x()},[g]),l(v).useEffect(()=>(g&&(document.body.style.cursor="crosshair"),()=>{document.body.style.cursor="default"}),[g]);let x=Eg(()=>{y.current&&(y.current.destroy(),y.current=null)});return(0,p.jsxs)("div",{style:f.picker,className:`sketch-picker ${h}`,children:[(0,p.jsx)("div",{style:f.saturation,children:(0,p.jsx)(xz.Saturation,{style:f.Saturation,hsl:i,hsv:r,onChange:o})}),(0,p.jsxs)("div",{style:f.controls,className:"flexbox-fix",children:[(0,p.jsxs)("div",{style:f.sliders,children:[(0,p.jsx)("div",{style:f.hue,children:(0,p.jsx)(xz.Hue,{style:f.Hue,hsl:i,onChange:o})}),(0,p.jsx)("div",{style:f.alpha,children:(0,p.jsx)(xz.Alpha,{style:f.Alpha,rgb:t,hsl:i,renderers:c,onChange:o})})]}),(0,p.jsxs)("div",{style:f.color,children:[(0,p.jsx)(xz.Checkboard,{}),(0,p.jsx)("div",{style:f.activeColor})]}),(0,p.jsx)("div",{style:f.color,children:(0,p.jsx)(fA,{icon:(0,p.jsx)(l(xj),{}),className:"color-picker-button",minimal:!0,style:{width:"24px",height:"24px",minWidth:"24px",minHeight:"24px",padding:0,margin:0},active:g,onClickCapture:e=>{m(e=>!e),e.stopPropagation()}})})]}),(0,p.jsx)(l(En),{rgb:t,hsl:i,hex:n,onChange:o,disableAlpha:s}),(0,p.jsx)(l(Es),{colors:u,onClick:o,onSwatchHover:a})]})};Em.propTypes={disableAlpha:l(vN).bool,width:l(vN).oneOfType([l(vN).string,l(vN).number]),styles:l(vN).object},Em.defaultProps={disableAlpha:!1,width:200,styles:{},presetColors:["#D0021B","#F5A623","#F8E71C","#8B572A","#7ED321","#417505","#BD10E0","#9013FE","#4A90E2","#50E3C2","#B8E986","#000000","#4A4A4A","#9B9B9B","#FFFFFF"]};var Ev=(0,xz.ColorWrap)(Em);let Ey=["#D0021B","#F5A623","#F8E71C","#8B572A","#7ED321","#417505","#BD10E0","#9013FE","#4A90E2","#50E3C2","#B8E986","#000000","#4A4A4A","#9B9B9B","#FFFFFF"].reverse(),Eb=e=>{let t=[];e.pages.forEach(e=>{e.children.forEach(e=>{"text"===e.type&&t.push(e.fill),"svg"===e.type&&t.push(...e.colorsReplace.values())})});let n=[];return t.forEach(e=>{if(ir(e)){let{stops:t}=io(e);n.push(...t.map(e=>e.color))}else n.push(e)}),[...new Set(n)]},Ew=at("div")`
|
|
125
125
|
& .sketch-picker {
|
|
126
126
|
padding: 0px !important;
|
|
127
127
|
box-shadow: none !important;
|
|
@@ -139,16 +139,16 @@ For simpler debugging here is the log of the parent element:`,lj=(e,t,n,r,i,o)=>
|
|
|
139
139
|
.bp5-dark & .sketch-picker label {
|
|
140
140
|
color: #f5f8fa !important;
|
|
141
141
|
}
|
|
142
|
-
`,Ex=({style:e,color:t,onChange:n,...r})=>{let[i,o]=l(v).useState(t);l(v).useEffect(()=>{o(t)},[t]);let a=l(v).useRef(),s=l(v).useRef();return(0,p.jsx)(Ew,{style:e,onMouseDown:e=>{"INPUT"!==e.target.tagName&&e.preventDefault()},children:(0,p.jsx)(Ev,{color:i,...r,onChange:e=>{let{r:t,g:r,b:i,a:l}=e.rgb,u=`rgba(${t},${r},${i},${l})`;o(u),s.current=u,a.current||(a.current=window.setTimeout(()=>{a.current=0,n(u)},50))}})})},E_=e=>e.map(e=>`${e.color} ${100*e.offset}%`).join(","),EE=({value:e,onChange:t,store:n,preset:r})=>{let{rotation:i,stops:o}=ik(e),a=l(v).useRef(o);a.current=o;let s=l(v).useRef(i);s.current=i;let[u,c]=l(v).useState(0),d=l(v).useRef(null),h=l(v).useRef(!1),f=()=>{h.current=!0};return l(v).useEffect(()=>{let e=e=>{if(h.current){let n=d.current.getBoundingClientRect(),r=e.clientX-n.left,i=r/n.width;if(o.length>2&&(i<-.5||i>1.5)){c(0),h.current=!1,a.current.splice(u,1),t(`linear-gradient(${s.current}deg, ${E_(a.current)})`);return}let l=Math.min(1,Math.max(0,r/n.width)),f=[...a.current];f[u].offset=l,t(`linear-gradient(${s.current}deg, ${E_(f)})`)}},n=()=>{h.current=!1};return window.addEventListener("mousemove",e),window.addEventListener("mouseup",n),()=>{window.removeEventListener("mousemove",e),window.removeEventListener("mouseup",n)}},[u,a]),(0,p.jsxs)("div",{children:[(0,p.jsxs)("div",{style:{width:"calc(100% - 35px)",height:"60px",position:"relative"},children:[(0,p.jsx)("div",{ref:d,style:{position:"absolute",top:0,left:0,width:"100%",marginLeft:"15px",height:"100%",zIndex:0},onMouseDown:e=>{let n=e.currentTarget.getBoundingClientRect(),r=Math.min(1,Math.max(0,(e.clientX-n.left)/n.width)),a=o[0].color;o.push({color:a,offset:r}),o.sort((e,t)=>e.offset-t.offset),c(o.findIndex(e=>e.offset===r)),f(),t(`linear-gradient(${i}deg, ${E_(o)})`)}}),o.map(({offset:e,color:t},n)=>(0,p.jsx)("div",{style:{position:"absolute",top:"10px",left:`${100*e}%`,border:n===u?"2px solid rgb(0, 161, 255)":"2px solid rgb(0, 0, 0, 0)",padding:"2px"},onMouseDown:e=>{e.stopPropagation(),c(n),f(e)},children:(0,p.jsx)(EC,{background:t,style:{margin:0}})},n))]}),(0,p.jsx)("div",{style:{width:"calc(100% - 30px)",height:"10px",marginLeft:"15px",background:`linear-gradient(90deg,${E_(o)})`}}),(0,p.jsx)("div",{style:{padding:"10px"},children:(0,p.jsx)(mg,{min:0,max:360,value:i,showTrackFill:!1,labelRenderer:!1,onChange:e=>{t(`linear-gradient(${e}deg,${E_(o)})`)}})}),(0,p.jsx)(Ex,{color:o[u].color,presetColors:r,onChange:e=>{let n=[...o];n[u].color=e,t(`linear-gradient(${i}deg, ${E_(n)})`)}})]})},ES=({value:e,onChange:t,preset:n,store:r})=>{let[i,o]=l(v).useState(iC(e)?"gradient":"solid");return(0,p.jsx)("div",{style:{padding:"5px"},children:(0,p.jsxs)(vT,{id:"TabsExample",selectedTabId:i,onChange:e=>o(e),children:[(0,p.jsx)(vx,{id:"solid",title:"Solid",panel:(0,p.jsx)(Ex,{color:e,onChange:t,presetColors:n,style:{padding:"0"}})}),(0,p.jsx)(vx,{id:"gradient",title:"Linear",panel:(0,p.jsx)(EE,{value:e,onChange:t,store:r,preset:n}),panelClassName:"ember-panel"})]})})},EC=({size:e=30,background:t,style:n={},children:r=null,...i})=>(0,p.jsx)("div",{onMouseDown:e=>e.preventDefault(),style:{width:e+"px",height:e+"px",background:"url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 8 8'%3E%3Cg fill='rgba(112, 112, 116, 1)' fill-opacity='1'%3E%3Cpath fill-rule='evenodd' d='M0 0h4v4H0V0zm4 4h4v4H4V4z'/%3E%3C/g%3E%3C/svg%3E\")",borderRadius:"2px",boxShadow:"0 0 2px grey",marginBottom:"-4px",...n},...i,children:(0,p.jsx)("div",{style:{width:e+"px",height:e+"px",background:t},children:r})}),EO=e=>{let t=Eb(e).slice(0,8).filter(e=>!Ey.find(t=>iQ(t,e)));return t.concat(Ey.slice(0,16-t.length).reverse())},Ek=({value:e,onChange:t,size:n,store:r,gradientEnabled:i,children:o,style:a})=>{let l=EO(r);return(0,p.jsx)(gw,{autoFocus:!1,enforceFocus:!0,interactionKind:"click",hasBackdrop:!0,content:i?(0,p.jsx)(ES,{preset:l,value:e,onChange:t,store:r}):(0,p.jsx)("div",{style:{padding:"5px"},children:(0,p.jsx)(Ex,{color:e,onChange:t,presetColors:l})}),children:(0,p.jsx)(EC,{size:n,background:e,style:a,children:o})})};var v=h("8NFma"),lD=h("gztBd"),v=h("8NFma"),EP=v.forwardRef(function(e,t){var n,r=e.alignIndicator,i=e.children,o=e.className,a=e.indicatorChildren,s=e.inline,u=e.inputRef,c=e.label,d=e.labelElement,h=e.large,f=e.style,p=e.type,g=e.typeClassName,m=e.tagName,y=(0,lD.__rest)(e,["alignIndicator","children","className","indicatorChildren","inline","inputRef","label","labelElement","large","style","type","typeClassName","tagName"]),b=l(lF)(lz.CONTROL,g,((n={})[lz.DISABLED]=y.disabled,n[lz.INLINE]=s,n[lz.LARGE]=h,n),lz.alignmentClass(r),o);return v.createElement(void 0===m?"label":m,{className:b,style:f,ref:t},v.createElement("input",(0,lD.__assign)({},y,{ref:u,type:p})),v.createElement("span",{className:lz.CONTROL_INDICATOR},a),c,d,i)});EP.displayName="".concat(fl,".Control");var ET=v.forwardRef(function(e,t){var n=e.innerLabelChecked,r=e.innerLabel,i=(0,lD.__rest)(e,["innerLabelChecked","innerLabel"]),o=r||n?[v.createElement("div",{key:"checked",className:lz.CONTROL_INDICATOR_CHILD},v.createElement("div",{className:lz.SWITCH_INNER_TEXT},n||r)),v.createElement("div",{key:"unchecked",className:lz.CONTROL_INDICATOR_CHILD},v.createElement("div",{className:lz.SWITCH_INNER_TEXT},r))]:null;return v.createElement(EP,(0,lD.__assign)({},i,{indicatorChildren:o,ref:t,type:"checkbox",typeClassName:lz.SWITCH}))});ET.displayName="".concat(fl,".Switch"),v.forwardRef(function(e,t){return v.createElement(EP,(0,lD.__assign)({},e,{ref:t,type:"radio",typeClassName:lz.RADIO}))}).displayName="".concat(fl,".Radio"),v.forwardRef(function(e,t){var n=e.defaultIndeterminate,r=e.indeterminate,i=e.onChange,o=(0,lD.__rest)(e,["defaultIndeterminate","indeterminate","onChange"]),a=v.useState(r||n||!1),l=a[0],s=a[1],u=v.useRef(null),c=void 0===e.inputRef?u:fi(e.inputRef,u),d=v.useCallback(function(e){void 0===r&&s(e.target.indeterminate),null==i||i(e)},[r,i]);return v.useEffect(function(){void 0!==r&&s(r)},[r]),v.useEffect(function(){null!=u.current&&(u.current.indeterminate=l)},[u,l]),v.createElement(EP,(0,lD.__assign)({},o,{inputRef:c,onChange:d,ref:t,type:"checkbox",typeClassName:lz.CHECKBOX}))}).displayName="".concat(fl,".Checkbox");let EA=(e,t,n)=>Math.max(t,Math.min(n,e)),EN=({value:e,onValueChange:t,...n})=>{let[r,i]=l(v).useState(e.toString());return l(v).useEffect(()=>{i(e.toString())},[e]),(0,p.jsx)(mi,{value:r,onValueChange:(e,n)=>{i(n),Number.isNaN(e)||t(e)},...n})},Ej=P(({element:e,store:t,elements:n})=>{let r=n||[e],i=r[0],o="text"===i.type,a="image"===i.type,s="svg"===i.type,u=e=>{t.history.transaction(()=>{r.forEach(t=>{t.set(e)})})};return(0,p.jsx)(gw,{content:(0,p.jsxs)("div",{style:{padding:"15px",paddingTop:"25px",width:"230px"},children:[(0,p.jsx)(ET,{checked:i.blurEnabled,label:lT("toolbar.blur"),onChange:e=>{u({blurEnabled:e.target.checked})},alignIndicator:lB.RIGHT}),i.blurEnabled&&(0,p.jsx)(mg,{value:i.blurRadius,labelStepSize:5,onChange:e=>{u({blurRadius:e})},min:0,max:20,showTrackFill:!1}),!o&&(0,p.jsx)(ET,{checked:i.brightnessEnabled,label:lT("toolbar.brightness"),onChange:e=>{u({brightnessEnabled:e.target.checked})},alignIndicator:lB.RIGHT,style:{marginTop:"20px"}}),i.brightnessEnabled&&(0,p.jsx)(mg,{value:100*i.brightness+100,onChange:e=>{u({brightness:(e-100)/100})},min:0,max:200,showTrackFill:!1,labelStepSize:50}),!o&&(0,p.jsx)(ET,{checked:i.sepiaEnabled,label:lT("toolbar.sepia"),onChange:e=>{u({sepiaEnabled:e.target.checked})},alignIndicator:lB.RIGHT,style:{marginTop:"20px"}}),!o&&(0,p.jsx)(ET,{checked:i.grayscaleEnabled,label:lT("toolbar.grayscale"),onChange:e=>{u({grayscaleEnabled:e.target.checked})},alignIndicator:lB.RIGHT,style:{marginTop:"20px"}}),o&&(0,p.jsx)(ET,{checked:!!i.strokeWidth,label:lT("toolbar.textStroke"),onChange:e=>{u({strokeWidth:e.target.checked?2:0})},alignIndicator:lB.RIGHT,style:{marginTop:"20px"}}),!!i.strokeWidth&&(0,p.jsx)(l(v).Fragment,{children:(0,p.jsxs)("div",{style:{display:"flex",justifyContent:"space-between"},children:[(0,p.jsx)(Ek,{value:i.stroke,size:30,onChange:e=>{u({stroke:e})},store:t}),(0,p.jsx)(mi,{defaultValue:i.strokeWidth,onValueChange:e=>{u({strokeWidth:EA(e,1,30)})},style:{width:"80px"},min:1,max:Math.round(i.fontSize/2)})]})}),o&&(0,p.jsx)(ET,{checked:!!i.backgroundEnabled,label:lT("toolbar.textBackground"),onChange:e=>{u({backgroundEnabled:e.target.checked})},alignIndicator:lB.RIGHT,style:{marginTop:"20px"}}),!!i.backgroundEnabled&&(0,p.jsxs)(l(v).Fragment,{children:[(0,p.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",paddingTop:"5px",paddingBottom:"5px"},children:[(0,p.jsx)("div",{children:lT("toolbar.backgroundCornerRadius")}),(0,p.jsx)("div",{children:(0,p.jsx)(EN,{value:100*i.backgroundCornerRadius,onValueChange:e=>{u({backgroundCornerRadius:EA(e,0,100)/100})},style:{width:"50px"},min:0,max:100,buttonPosition:"none"})})]}),(0,p.jsx)(mg,{value:100*i.backgroundCornerRadius,onChange:e=>{u({backgroundCornerRadius:EA(e,0,100)/100})},min:0,max:100,labelRenderer:!1}),(0,p.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",paddingTop:"5px",paddingBottom:"5px"},children:[(0,p.jsx)("div",{children:lT("toolbar.backgroundPadding")}),(0,p.jsx)("div",{children:(0,p.jsx)(EN,{value:Math.round(100*i.backgroundPadding),onValueChange:e=>{u({backgroundPadding:EA(e,0,100)/100})},style:{width:"50px"},min:0,max:100,buttonPosition:"none"})})]}),(0,p.jsx)(mg,{value:Math.round(100*i.backgroundPadding),onChange:e=>{u({backgroundPadding:EA(e,0,100)/100})},min:0,max:100,labelRenderer:!1}),(0,p.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",paddingTop:"5px",paddingBottom:"5px"},children:[(0,p.jsx)("div",{children:lT("toolbar.opacity")}),(0,p.jsx)("div",{children:(0,p.jsx)(EN,{value:Math.round(100*i.backgroundOpacity),onValueChange:e=>{u({backgroundOpacity:e/100})},style:{width:"50px"},min:0,max:100,buttonPosition:"none"})})]}),(0,p.jsx)(mg,{value:100*i.backgroundOpacity,onChange:e=>{u({backgroundOpacity:e/100})},min:0,max:100,labelRenderer:!1}),(0,p.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",paddingTop:"5px",paddingBottom:"5px"},children:[(0,p.jsx)("div",{style:{lineHeight:"30px"},children:lT("toolbar.color")}),(0,p.jsx)(Ek,{value:i.backgroundColor,size:30,onChange:e=>{u({backgroundColor:e})},store:t})]})]}),(a||s)&&(0,p.jsx)(ET,{checked:!!i.borderSize,label:lT("toolbar.border"),onChange:e=>{u({borderSize:e.target.checked?2:0})},alignIndicator:lB.RIGHT,style:{marginTop:"20px"}}),!!i.borderSize&&(0,p.jsx)(l(v).Fragment,{children:(0,p.jsxs)("div",{style:{display:"flex",justifyContent:"space-between"},children:[(0,p.jsx)(Ek,{value:i.borderColor,size:30,onChange:e=>{u({borderColor:e})},store:t}),(0,p.jsx)(mi,{defaultValue:i.borderSize,onValueChange:e=>{u({borderSize:EA(e,1,Math.min(i.width,i.height)/2)})},style:{width:"80px"},min:1,max:Math.min(i.width,i.height)/2})]})}),!o&&(0,p.jsx)(ET,{checked:!!i.cornerRadius,label:lT("toolbar.cornerRadius"),onChange:e=>{u({cornerRadius:e.target.checked?Math.min(i.width/4,i.height/4):0})},alignIndicator:lB.RIGHT,style:{marginTop:"20px"}}),!o&&!!i.cornerRadius&&(0,p.jsxs)("div",{style:{display:"flex",width:"100%",justifyContent:"space-between"},children:[(0,p.jsx)("div",{style:{width:"150px",paddingTop:"7px"},children:(0,p.jsx)(mg,{value:Math.min(i.cornerRadius,Math.round(Math.min(i.width/2,i.height/2))),onChange:e=>{u({cornerRadius:e})},min:1,max:Math.round(Math.min(i.width/2,i.height/2)),labelStepSize:50,showTrackFill:!1,labelRenderer:!1})}),(0,p.jsx)(mi,{value:i.cornerRadius,onValueChange:e=>{u({cornerRadius:EA(e,1,Math.min(i.width,i.height)/2)})},buttonPosition:"none",style:{width:"45px",padding:"0 5px"},min:1,max:Math.round(Math.min(i.width/2,i.height/2))})]}),(0,p.jsx)(ET,{checked:i.shadowEnabled,label:lT("toolbar.shadow"),onChange:e=>{u({shadowEnabled:e.target.checked})},alignIndicator:lB.RIGHT,style:{marginTop:"20px"}}),i.shadowEnabled&&(0,p.jsxs)(l(v).Fragment,{children:[(0,p.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",paddingTop:"5px",paddingBottom:"5px"},children:[(0,p.jsx)("div",{children:lT("toolbar.blur")}),(0,p.jsx)("div",{children:(0,p.jsx)(EN,{value:i.shadowBlur,onValueChange:e=>{u({shadowBlur:EA(e,-50,50)})},style:{width:"50px"},min:0,max:50,buttonPosition:"none"})})]}),(0,p.jsx)(mg,{value:i.shadowBlur,onChange:e=>{u({shadowBlur:e})},min:0,max:50,showTrackFill:!1,labelRenderer:!1}),(0,p.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",paddingTop:"5px",paddingBottom:"5px"},children:[(0,p.jsx)("div",{children:lT("toolbar.offsetX")}),(0,p.jsx)("div",{children:(0,p.jsx)(EN,{value:i.shadowOffsetX,onValueChange:e=>{u({shadowOffsetX:EA(e,-50,50)})},style:{width:"50px"},min:-50,max:50,buttonPosition:"none"})})]}),(0,p.jsx)(mg,{value:i.shadowOffsetX,onChange:e=>{u({shadowOffsetX:e})},min:-50,max:50,showTrackFill:!1,labelRenderer:!1}),(0,p.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",paddingTop:"5px",paddingBottom:"5px"},children:[(0,p.jsx)("div",{children:lT("toolbar.offsetY")}),(0,p.jsx)("div",{children:(0,p.jsx)(EN,{value:i.shadowOffsetY,onValueChange:e=>{u({shadowOffsetY:EA(e,-50,50)})},style:{width:"50px"},min:-50,max:50,buttonPosition:"none"})})]}),(0,p.jsx)(mg,{value:i.shadowOffsetY,onChange:e=>{u({shadowOffsetY:e})},min:-50,max:50,showTrackFill:!1,labelRenderer:!1}),(0,p.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",paddingTop:"5px",paddingBottom:"5px"},children:[(0,p.jsx)("div",{children:lT("toolbar.opacity")}),(0,p.jsx)("div",{children:(0,p.jsx)(EN,{value:Math.round(100*i.shadowOpacity),onValueChange:e=>{u({shadowOpacity:e/100})},style:{width:"50px"},min:0,max:100,buttonPosition:"none"})})]}),(0,p.jsx)(mg,{value:100*i.shadowOpacity,onChange:e=>{u({shadowOpacity:e/100})},min:0,max:100,labelRenderer:!1}),(0,p.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",paddingTop:"5px",paddingBottom:"5px"},children:[(0,p.jsx)("div",{style:{lineHeight:"30px"},children:lT("toolbar.color")}),(0,p.jsx)(Ek,{value:i.shadowColor,size:30,onChange:e=>{u({shadowColor:e})},store:t})]})]})]}),position:lV.BOTTOM,children:(0,p.jsx)(fA,{icon:"left-join",text:lT("toolbar.effects"),minimal:!0})})});var v=h("8NFma"),lD=h("gztBd"),v=h("8NFma");(kE=kD||(kD={})).MENU="menu",kE.LISTBOX="listbox",kE.TREE="tree",kE.GRID="grid",kE.DIALOG="dialog";var lD=h("gztBd"),v=h("8NFma"),fb=h("leH9B"),ER=v.forwardRef(function(e,t){var n=e.size>=fb.IconSize.LARGE,r=n?fb.IconSize.LARGE:fb.IconSize.STANDARD,i="".concat(-1*r/.05/2);return v.createElement(fS,(0,lD.__assign)({iconName:"cross",ref:t},e),v.createElement("path",{d:n?"M228.2 200L314 285.8C317.8 289.4 320 294.4 320 300C320 311 311 320 300 320C294.4000000000001 320 289.4000000000001 317.8 285.8 314.2L200 228.2L114.2 314.2C110.6 317.8 105.6 320 100 320C89 320 80 311 80 300C80 294.4 82.2 289.4 85.8 285.8L171.8 200L86 114.2000000000001C82.2 110.6 80 105.6 80 100C80 89 89 80 100 80C105.6 80 110.6 82.2 114.2 85.8L200 171.8L285.8 86C289.4000000000001 82.2 294.4000000000001 80 300 80C311 80 320 89 320 100C320 105.6 317.8 110.6 314.2000000000001 114.2000000000001L228.2 200z":"M188.2 160L254 225.8C257.8 229.4 260 234.4 260 240C260 251 251 260 240 260C234.4 260 229.4 257.8 225.8 254.2L160 188.2L94.2 254.2C90.6 257.8 85.6 260 80 260C69 260 60 251 60 240C60 234.4 62.2 229.4 65.8 225.8L131.8 160L66 94.2C62.2 90.6 60 85.6 60 80C60 69 69 60 80 60C85.6 60 90.6 62.2 94.2 65.8L160 131.8L225.8 66C229.4 62.2 234.4 60 240 60C251 60 260 69 260 80C260 85.6 257.8 90.6 254.2 94.2L188.2 160z",fillRule:"evenodd","transform-origin":"center",transform:"scale(0.05, -0.05) translate(".concat(i,", ").concat(i,")")}))});ER.defaultProps={size:fb.IconSize.STANDARD},ER.displayName="Blueprint5.Icon.Cross";var lD=h("gztBd"),v=h("8NFma"),fb=h("leH9B"),EI=v.forwardRef(function(e,t){var n=e.size>=fb.IconSize.LARGE,r=n?fb.IconSize.LARGE:fb.IconSize.STANDARD,i="".concat(-1*r/.05/2);return v.createElement(fS,(0,lD.__assign)({iconName:"search",ref:t},e),v.createElement("path",{d:n?"M391.2 51.2L292.4 150C309.8 175.8 320 206.6 320 240C320 328.4 248.4 400 160 400S0 328.4 0 240S71.6 80 160 80C193.4 80 224.2 90.2 250 107.6L348.8 8.8C354.2000000000001 3.4 361.8 0 370 0C386.6 0 400 13.4 400 30C400 38.2 396.6 45.8 391.2 51.2zM160 120C93.8 120 40 173.8 40 240S93.8 360 160 360S280 306.2000000000001 280 240S226.2 120 160 120z":"M311 51.4L257.6 105C271.6 126.8 279.8 152.6 279.8 180.2C279.8 257.6 217.2 320.2 139.8 320.2S-0.2 257.6 -0.2 180.2S62.4 40.2 139.8 40.2C167.6 40.2 193.4 48.6 215 62.4L268.6 9C274 3.6 281.6 0.2 289.8 0.2C306.4 0.2 319.8 13.6 319.8 30.2C319.8 38.4 316.4 46 311 51.4zM139.8 80.2C84.6 80.2 39.8 125 39.8 180.2S84.6 280.2 139.8 280.2S239.8 235.4 239.8 180.2S195 80.2 139.8 80.2z",fillRule:"evenodd","transform-origin":"center",transform:"scale(0.05, -0.05) translate(".concat(i,", ").concat(i,")")}))});EI.defaultProps={size:fb.IconSize.STANDARD},EI.displayName="Blueprint5.Icon.Search";var EL={};i(EL,"MULTISELECT",()=>ED),i(EL,"MULTISELECT_POPOVER",()=>EF),i(EL,"MULTISELECT_TAG_INPUT_INPUT",()=>Ez),i(EL,"OMNIBAR",()=>EB),i(EL,"OMNIBAR_OVERLAY",()=>EU),i(EL,"SELECT_POPOVER",()=>EH),i(EL,"SUGGEST_POPOVER",()=>EV);var EM=lz.getClassNamespace(),ED="".concat(EM,"-multi-select"),EF="".concat(ED,"-popover"),Ez="".concat(ED,"-tag-input-input"),EB="".concat(EM,"-omnibar"),EU="".concat(EB,"-overlay"),EH="".concat(EM,"-select-popover"),EV="".concat(EM,"-suggest-popover"),lD=h("gztBd"),v=h("8NFma"),lD=h("gztBd"),v=h("8NFma");function Eq(e,t,n){return void 0===e||null==t||null==n?t===n:ht.isFunction(e)?e(t,n):t[e]===n[e]}function EG(){return{__blueprintCreateNewItemBrand:"blueprint-create-new-item"}}function EW(e){if(null==e)return!1;var t=Object.keys(e);return 1===t.length&&"__blueprintCreateNewItemBrand"===t[0]&&"blueprint-create-new-item"===e.__blueprintCreateNewItemBrand}function E$(e){return null==e||EW(e)?null:e}var EK=function(e){function t(t){var n,r,i=e.call(this,t)||this;i.itemRefs=new Map,i.refHandlers={itemsParent:function(e){return i.itemsParentRef=e}},i.shouldCheckActiveItemInViewport=!1,i.expectedNextActiveItem=null,i.isEnterKeyPressed=!1,i.renderItemList=function(e){var t=i.props,n=t.initialContent,r=t.noResults,o=e.renderCreateItem(),a=function(e,t,n){if(0===e.query.length&&void 0!==n)return n;var r=e.filteredItems.map(e.renderItem).filter(function(e){return null!=e});return r.length>0?r:t}(e,null!=o?null:r,n);if(null==a&&null==o)return null;var l=i.isCreateItemFirst();return v.createElement(gB,(0,lD.__assign)({role:"listbox"},e.menuProps,{ulRef:e.itemsParentRef}),l&&o,a,!l&&o)},i.renderItem=function(e,t){if(!0!==i.props.disabled){var n=i.state,r=n.activeItem,o=n.query,a=n.filteredItems,l={active:Eq(i.props.itemsEqual,E$(r),e),disabled:EZ(e,t,i.props.itemDisabled),matchesPredicate:a.indexOf(e)>=0};return i.props.itemRenderer(e,{handleClick:function(t){return i.handleItemSelect(e,t)},handleFocus:function(){return i.setActiveItem(e)},index:t,modifiers:l,query:o,ref:function(e){e?i.itemRefs.set(t,e):i.itemRefs.delete(t)}})}return null},i.renderCreateItemMenuItem=function(){if(i.isCreateItemRendered(i.state.createNewItem)){var e=i.state,t=e.activeItem,n=e.query.trim(),r=EW(t);return i.props.createNewItemRenderer(n,r,function(e){i.handleItemCreate(n,e)})}return null},i.handleItemCreate=function(e,t){var n,r,o,a,l=null===(r=(n=i.props).createNewItemFromQuery)||void 0===r?void 0:r.call(n,e);if(null!=l){for(var s=Array.isArray(l)?l:[l],u=0;u<s.length;u++){var c=s[u];null===(a=(o=i.props).onItemSelect)||void 0===a||a.call(o,c,t)}i.maybeResetQuery()}},i.handleItemSelect=function(e,t){var n,r;i.setActiveItem(e),null===(r=(n=i.props).onItemSelect)||void 0===r||r.call(n,e,t),i.maybeResetQuery()},i.handlePaste=function(e){for(var t,n=i.props,r=n.createNewItemFromQuery,o=n.onItemsPaste,a=[],l=[],s=0;s<e.length;s++){var u=e[s],c=function(e,t){var n=t.items,r=t.itemPredicate;if(ht.isFunction(r))for(var i=0;i<n.length;i++){var o=n[i];if(r(e,o,i,!0))return o}}(u,i.props);if(void 0!==c)t=c,l.push(c);else if(i.canCreateItems()){var d=null==r?void 0:r(u);if(void 0!==d){var h=Array.isArray(d)?d:[d];l.push.apply(l,h)}}else a.push(u)}i.setQuery(a.join(", "),!1),void 0!==t&&i.setActiveItem(t),null==o||o(l)},i.handleKeyDown=function(e){var t,n,r=e.key;if("ArrowUp"===r||"ArrowDown"===r){e.preventDefault();var o=i.getNextActiveItem("ArrowUp"===r?-1:1);null!=o&&i.setActiveItem(o)}else"Enter"===r&&(i.isEnterKeyPressed=!0);null===(n=(t=i.props).onKeyDown)||void 0===n||n.call(t,e)},i.handleKeyUp=function(e){var t=i.props.onKeyUp,n=i.state.activeItem;"Enter"===e.key&&i.isEnterKeyPressed&&(e.preventDefault(),null==n||EW(n)?i.handleItemCreate(i.state.query,e):i.handleItemSelect(n,e),i.isEnterKeyPressed=!1),null==t||t(e)},i.handleInputQueryChange=function(e){var t,n,r=null==e?"":e.target.value;i.setQuery(r),null===(n=(t=i.props).onQueryChange)||void 0===n||n.call(t,r,e)};var o=t.query,a=void 0===o?"":o,l=null===(n=t.createNewItemFromQuery)||void 0===n?void 0:n.call(t,a),s=EX(a,t);return i.state={activeItem:void 0!==t.activeItem?t.activeItem:null!==(r=t.initialActiveItem)&&void 0!==r?r:EQ(s,t.itemDisabled),createNewItem:l,filteredItems:s,query:a},i}return(0,lD.__extends)(t,e),t.ofType=function(){return t},t.prototype.render=function(){var e=this.props,t=e.className,n=e.items,r=e.renderer,i=e.itemListRenderer,o=void 0===i?this.renderItemList:i,a=e.menuProps,l=this.state,s=(l.createNewItem,(0,lD.__rest)(l,["createNewItem"]));return r((0,lD.__assign)((0,lD.__assign)({},s),{className:t,handleItemSelect:this.handleItemSelect,handleKeyDown:this.handleKeyDown,handleKeyUp:this.handleKeyUp,handlePaste:this.handlePaste,handleQueryChange:this.handleInputQueryChange,itemList:o((0,lD.__assign)((0,lD.__assign)({},s),{items:n,itemsParentRef:this.refHandlers.itemsParent,menuProps:a,renderCreateItem:this.renderCreateItemMenuItem,renderItem:this.renderItem}))}))},t.prototype.componentDidUpdate=function(e){var t=this;void 0!==this.props.activeItem&&this.props.activeItem!==this.state.activeItem&&(this.shouldCheckActiveItemInViewport=!0,this.setState({activeItem:this.props.activeItem})),null!=this.props.query&&this.props.query!==e.query?this.setQuery(this.props.query,this.props.resetOnQuery,this.props):ht.shallowCompareKeys(this.props,e,{include:["items","itemListPredicate","itemPredicate"]})||this.setQuery(this.state.query),this.shouldCheckActiveItemInViewport&&(this.requestAnimationFrame(function(){return t.scrollActiveItemIntoView()}),this.shouldCheckActiveItemInViewport=!1)},t.prototype.scrollActiveItemIntoView=function(){var e=!1!==this.props.scrollToActiveItem,t=!Eq(this.props.itemsEqual,E$(this.expectedNextActiveItem),E$(this.props.activeItem));if(this.expectedNextActiveItem=null,e||!t){var n=this.getActiveElement();if(null!=this.itemsParentRef&&null!=n){var r=n.offsetTop,i=n.offsetHeight,o=this.itemsParentRef,a=o.offsetTop,l=o.scrollTop,s=o.clientHeight,u=this.getItemsParentPadding(),c=u.paddingTop,d=r+i+u.paddingBottom-a,h=r-c-a;d>=l+s?this.itemsParentRef.scrollTop=d+i-s:h<=l&&(this.itemsParentRef.scrollTop=h-i)}}},t.prototype.setQuery=function(e,t,n){void 0===t&&(t=this.props.resetOnQuery),void 0===n&&(n=this.props);var r,i=n.createNewItemFromQuery;this.shouldCheckActiveItemInViewport=!0,e!==this.state.query&&(null===(r=n.onQueryChange)||void 0===r||r.call(n,e));var o=e.trim(),a=EX(o,n),l=null!=i&&""!==o?i(o):void 0;this.setState({createNewItem:l,filteredItems:a,query:e});var s=this.getActiveIndex(a);(t||s<0||EZ(E$(this.state.activeItem),s,n.itemDisabled))&&(this.isCreateItemRendered(l)&&this.isCreateItemFirst()?this.setActiveItem(EG()):this.setActiveItem(EQ(a,n.itemDisabled)))},t.prototype.setActiveItem=function(e){var t,n,r,i;this.expectedNextActiveItem=e,void 0===this.props.activeItem&&(this.shouldCheckActiveItemInViewport=!0,this.setState({activeItem:e})),EW(e)?null===(n=(t=this.props).onActiveItemChange)||void 0===n||n.call(t,null,!0):null===(i=(r=this.props).onActiveItemChange)||void 0===i||i.call(r,e,!1)},t.prototype.getActiveElement=function(){var e,t=this.state.activeItem;if(null!=this.itemsParentRef){if(EW(t)){var n=this.isCreateItemFirst()?0:this.state.filteredItems.length;return this.itemsParentRef.children.item(n)}var r=this.getActiveIndex();return null!==(e=this.itemRefs.get(r))&&void 0!==e?e:this.itemsParentRef.children.item(r)}},t.prototype.getActiveIndex=function(e){void 0===e&&(e=this.state.filteredItems);var t=this.state.activeItem;if(null==t||EW(t))return -1;for(var n=0;n<e.length;++n)if(Eq(this.props.itemsEqual,e[n],t))return n;return -1},t.prototype.getItemsParentPadding=function(){var e=getComputedStyle(this.itemsParentRef),t=e.paddingTop;return{paddingBottom:EY(e.paddingBottom),paddingTop:EY(t)}},t.prototype.getNextActiveItem=function(e,t){return(void 0===t&&(t=this.getActiveIndex()),this.isCreateItemRendered(this.state.createNewItem)&&(0===t&&-1===e||t===this.state.filteredItems.length-1&&1===e))?EG():EQ(this.state.filteredItems,this.props.itemDisabled,e,t)},t.prototype.isCreateItemRendered=function(e){return this.canCreateItems()&&""!==this.state.query&&!this.wouldCreatedItemMatchSomeExistingItem(e)},t.prototype.isCreateItemFirst=function(){return"first"===this.props.createNewItemPosition},t.prototype.canCreateItems=function(){return null!=this.props.createNewItemFromQuery&&null!=this.props.createNewItemRenderer},t.prototype.wouldCreatedItemMatchSomeExistingItem=function(e){var t=this;return this.state.filteredItems.some(function(n){return(Array.isArray(e)?e:[e]).some(function(e){return Eq(t.props.itemsEqual,n,e)})})},t.prototype.maybeResetQuery=function(){this.props.resetOnSelect&&this.setQuery("",!0)},t.displayName="".concat(fl,".QueryList"),t.defaultProps={disabled:!1,resetOnQuery:!0},t}(function(e){function t(t){var n=e.call(this,t)||this;return n.timeoutIds=[],n.requestIds=[],n.clearTimeouts=function(){if(n.timeoutIds.length>0){for(var e=0,t=n.timeoutIds;e<t.length;e++){var r=t[e];window.clearTimeout(r)}n.timeoutIds=[]}},n.cancelAnimationFrames=function(){if(n.requestIds.length>0){for(var e=0,t=n.requestIds;e<t.length;e++){var r=t[e];window.cancelAnimationFrame(r)}n.requestIds=[]}},hQ("production")||n.validateProps(n.props),n}return(0,lD.__extends)(t,e),t.prototype.componentDidUpdate=function(e,t,n){hQ("production")||this.validateProps(this.props)},t.prototype.componentWillUnmount=function(){this.clearTimeouts(),this.cancelAnimationFrames()},t.prototype.requestAnimationFrame=function(e){var t=window.requestAnimationFrame(e);return this.requestIds.push(t),function(){return window.cancelAnimationFrame(t)}},t.prototype.setTimeout=function(e,t){var n=window.setTimeout(e,t);return this.timeoutIds.push(n),function(){return window.clearTimeout(n)}},t.prototype.validateProps=function(e){},t}(v.Component));function EY(e){return null==e?0:parseInt(e.slice(0,-2),10)}function EX(e,t){var n=t.items,r=t.itemPredicate,i=t.itemListPredicate;return ht.isFunction(i)?i(e,n):ht.isFunction(r)?n.filter(function(t,n){return r(e,t,n)}):n}function EZ(e,t,n){return null!=n&&null!=e&&(ht.isFunction(n)?n(e,t):!!e[n])}function EQ(e,t,n,r){if(void 0===n&&(n=1),void 0===r&&(r=e.length-1),0===e.length)return null;var i,o=r,a=e.length-1;do if(!EZ(e[o=(i=o+n)<0?a:i>a?0:i],o,t))return e[o];while(o!==r&&-1!==r)return null}var EJ=function(e){function t(){var t,n=e.apply(this,arguments)||this;return n.state={isOpen:!1},n.inputElement=null,n.queryList=null,n.handleInputRef=fa(n,"inputElement",null===(t=n.props.inputProps)||void 0===t?void 0:t.inputRef),n.handleQueryListRef=function(e){return n.queryList=e},n.listboxId=ht.uniqueId("listbox"),n.renderQueryList=function(e){var t=n.props,r=t.filterable,i=t.disabled,o=t.inputProps,a=t.popoverContentProps,s=t.popoverProps,u=void 0===s?{}:s,c=t.popoverRef,d=v.createElement(g5,(0,lD.__assign)({"aria-autocomplete":"list",leftIcon:v.createElement(EI,null),placeholder:"Filter...",rightElement:n.maybeRenderClearButton(e.query)},void 0===o?{}:o,{inputRef:n.handleInputRef,onChange:e.handleQueryChange,value:e.query})),h=e.handleKeyDown,f=e.handleKeyUp;return v.createElement(gw,(0,lD.__assign)({autoFocus:!1,enforceFocus:!1,isOpen:n.state.isOpen,disabled:void 0!==i&&i,placement:u.position||u.placement?void 0:"bottom-start"},u,{className:l(lF)(e.className,u.className),content:v.createElement("div",(0,lD.__assign)({},void 0===a?{}:a,{onKeyDown:h,onKeyUp:f}),void 0===r||r?d:void 0,e.itemList),onClosing:n.handlePopoverClosing,onInteraction:n.handlePopoverInteraction,onOpened:n.handlePopoverOpened,onOpening:n.handlePopoverOpening,popoverClassName:l(lF)(EL.SELECT_POPOVER,u.popoverClassName),popupKind:kD.LISTBOX,ref:c,renderTarget:n.getPopoverTargetRenderer(e,n.state.isOpen)}))},n.getPopoverTargetRenderer=function(e,t){return function(r){r.isOpen;var i,o=r.ref,a=(0,lD.__rest)(r,["isOpen","ref"]),s=n.props,u=s.disabled,c=s.popoverProps,d=s.popoverTargetProps,h=e.handleKeyDown,f=e.handleKeyUp,p=(void 0===c?{}:c).targetTagName;return v.createElement(void 0===p?"div":p,(0,lD.__assign)((0,lD.__assign)((0,lD.__assign)({"aria-controls":n.listboxId},d),a),{"aria-disabled":u,"aria-expanded":t,className:l(lF)(a.className,null==d?void 0:d.className,((i={})[lz.FILL]=n.props.fill,i)),onKeyDown:n.withPopoverTargetPropsHandler("keydown",t?h:n.handleTargetKeyDown),onKeyUp:n.withPopoverTargetPropsHandler("keyup",t?f:void 0),ref:o,role:"combobox"}),n.props.children)}},n.withPopoverTargetPropsHandler=function(e,t){switch(e){case"keydown":return function(e){var r,i;null==t||t(e),null===(i=null===(r=n.props.popoverTargetProps)||void 0===r?void 0:r.onKeyDown)||void 0===i||i.call(r,e)};case"keyup":return function(e){var r,i;null==t||t(e),null===(i=null===(r=n.props.popoverTargetProps)||void 0===r?void 0:r.onKeyUp)||void 0===i||i.call(r,e)}}},n.handleTargetKeyDown=function(e){"ArrowUp"===e.key||"ArrowDown"===e.key?(e.preventDefault(),n.setState({isOpen:!0})):ht.isKeyboardClick(e)&&n.setState({isOpen:!0})},n.handleItemSelect=function(e,t){var r,i,o=null==t?void 0:t.target,a=null==o?void 0:o.closest(".".concat(lz.MENU_ITEM)),l=null==a?void 0:a.matches(".".concat(lz.POPOVER_DISMISS));n.setState({isOpen:!(null==l||l)}),null===(i=(r=n.props).onItemSelect)||void 0===i||i.call(r,e,t)},n.handlePopoverInteraction=function(e,t){var r,i;n.setState({isOpen:e}),null===(i=null===(r=n.props.popoverProps)||void 0===r?void 0:r.onInteraction)||void 0===i||i.call(r,e,t)},n.handlePopoverOpening=function(e){var t,r,i;n.previousFocusedElement=null!==(t=ht.getActiveElement(n.inputElement))&&void 0!==t?t:void 0,n.props.resetOnClose&&n.resetQuery(),null===(i=null===(r=n.props.popoverProps)||void 0===r?void 0:r.onOpening)||void 0===i||i.call(r,e)},n.handlePopoverOpened=function(e){var t,r;null!=n.queryList&&n.queryList.scrollActiveItemIntoView(),n.requestAnimationFrame(function(){var e,t=n.props.inputProps;!1!==(void 0===t?{}:t).autoFocus&&(null===(e=n.inputElement)||void 0===e||e.focus())}),null===(r=null===(t=n.props.popoverProps)||void 0===t?void 0:t.onOpened)||void 0===r||r.call(t,e)},n.handlePopoverClosing=function(e){var t,r;n.requestAnimationFrame(function(){void 0!==n.previousFocusedElement&&(n.previousFocusedElement.focus(),n.previousFocusedElement=void 0)}),null===(r=null===(t=n.props.popoverProps)||void 0===t?void 0:t.onClosing)||void 0===r||r.call(t,e)},n.resetQuery=function(){return n.queryList&&n.queryList.setQuery("",!0)},n}return(0,lD.__extends)(t,e),t.ofType=function(){return t},t.prototype.render=function(){var e=this.props,t=(e.filterable,e.inputProps,e.menuProps),n=(e.popoverProps,(0,lD.__rest)(e,["filterable","inputProps","menuProps","popoverProps"]));return v.createElement(EK,(0,lD.__assign)({},n,{menuProps:(0,lD.__assign)((0,lD.__assign)({"aria-label":"selectable options"},t),{id:this.listboxId}),onItemSelect:this.handleItemSelect,ref:this.handleQueryListRef,renderer:this.renderQueryList}))},t.prototype.componentDidUpdate=function(e,t){var n,r,i,o,a;(null===(n=e.inputProps)||void 0===n?void 0:n.inputRef)!==(null===(r=this.props.inputProps)||void 0===r?void 0:r.inputRef)&&(fr(null===(i=e.inputProps)||void 0===i?void 0:i.inputRef,null),this.handleInputRef=fa(this,"inputElement",null===(o=this.props.inputProps)||void 0===o?void 0:o.inputRef),fr(null===(a=this.props.inputProps)||void 0===a?void 0:a.inputRef,this.inputElement)),this.state.isOpen&&!t.isOpen&&null!=this.queryList&&this.queryList.scrollActiveItemIntoView()},t.prototype.maybeRenderClearButton=function(e){return e.length>0?v.createElement(fA,{"aria-label":"Clear filter query",icon:v.createElement(ER,null),minimal:!0,onClick:this.resetQuery,title:"Clear filter query"}):void 0},t.displayName="".concat(fl,".Select"),t}(fO);let E0=({value:e,onValueChange:t,...n})=>{let[r,i]=l(v).useState(e.toString());return l(v).useEffect(()=>{i(e.toString())},[e]),(0,p.jsx)(mi,{value:r,onValueChange:(e,n)=>{i(n),Number.isNaN(e)||t(e)},...n})},E1=P(({element:e,store:t,enabled:n})=>{let r=e.animations.find(e=>"enter"===e.type),i=e.animations.find(e=>"exit"===e.type);return n?(0,p.jsxs)(g1,{style:{width:"100%"},children:[(0,p.jsx)(fA,{fill:!0,active:r?.enabled&&!i?.enabled,onClick:()=>{t.history.transaction(()=>{e.setAnimation("enter",{enabled:!0}),e.setAnimation("exit",{enabled:!1})})},children:"Enter"}),(0,p.jsx)(fA,{fill:!0,active:r?.enabled&&i?.enabled,onClick:()=>{t.history.transaction(()=>{e.setAnimation("enter",{enabled:!0}),e.setAnimation("exit",{enabled:!0})})},children:"Both"}),(0,p.jsx)(fA,{fill:!0,active:i?.enabled&&!r?.enabled,onClick:()=>{t.history.transaction(()=>{e.setAnimation("enter",{enabled:!1}),e.setAnimation("exit",{enabled:!0})})},children:"Exit"})]}):null}),E2=(e,{handleClick:t,handleFocus:n,modifiers:r,query:i})=>r.matchesPredicate?(0,p.jsx)(gW,{active:r.active,disabled:r.disabled,onClick:t,icon:"arrow-"+e,onFocus:n,roleStructure:"listoption",text:e,shouldDismissPopover:!1},e):null,E3=["right","left","up","down","bottom-right","bottom-left","top-right","top-left"],E5=P(({value:e,onChange:t})=>(0,p.jsx)("div",{style:{paddingTop:"10px"},children:(0,p.jsx)(EJ,{items:E3,itemRenderer:E2,filterable:!1,activeItem:e,onItemSelect:e=>{t(e)},children:(0,p.jsx)(fA,{text:e,icon:"arrow-"+e,fill:!0})})})),E6=P(({element:e,store:t})=>{let n=e.animations.find(e=>"enter"===e.type);return(0,p.jsxs)("div",{style:{padding:"10px"},children:[(0,p.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",paddingTop:"5px",paddingBottom:"5px"},children:[(0,p.jsx)("div",{children:"Delay"}),(0,p.jsx)("div",{children:(0,p.jsx)(E0,{value:parseFloat((n.delay/1e3).toFixed(2)),onValueChange:t=>{e.setAnimation("enter",{delay:1e3*t})},style:{width:"50px"},minorStepSize:.01,stepSize:.01,min:0,max:2.5,buttonPosition:"none"})})]}),(0,p.jsx)(mg,{min:0,max:1e3,value:n.delay,showTrackFill:!1,labelRenderer:!1,onChange:t=>{e.setAnimation("enter",{delay:t})}})]})}),E4=P(({element:e,store:t})=>{let n=e.animations.find(e=>"enter"===e.type);return(0,p.jsxs)("div",{style:{padding:"10px"},children:[(0,p.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",paddingTop:"5px",paddingBottom:"5px"},children:[(0,p.jsx)("div",{children:"Duration"}),(0,p.jsx)("div",{children:(0,p.jsx)(E0,{value:parseFloat((n.duration/1e3).toFixed(2)),onValueChange:t=>{e.setAnimation("enter",{duration:1e3*t}),e.setAnimation("exit",{duration:1e3*t})},style:{width:"50px"},minorStepSize:.01,stepSize:.01,min:0,max:2.5,buttonPosition:"none"})})]}),(0,p.jsx)(mg,{min:0,max:2500,value:n.duration,showTrackFill:!1,labelRenderer:!1,onChange:t=>{e.setAnimation("enter",{duration:t}),e.setAnimation("exit",{duration:t})}})]})}),E8=P(({element:e,store:t,elements:n})=>{let r=n||[e],i=r[0];i.type,i.type,i.type;let o=(e,n)=>{t.history.transaction(()=>{r.forEach(t=>{t.setAnimation("enter",{name:e,...n}),t.setAnimation("exit",{name:e,...n,from:n.to,to:n.from})})}),n.enabled&&(t.play({animatedElementsIds:r.map(e=>e.id),currentTime:i.page.startTime}),setTimeout(()=>{t.stop()},1e3))},a=e=>!!((e?i.animations?.filter(t=>t.name===e):i.animations)||[]).find(e=>e.enabled);return(0,p.jsx)(gw,{hasBackdrop:!1,autoFocus:!1,content:(0,p.jsxs)("div",{style:{padding:"15px",paddingTop:"25px",width:"230px"},children:[(0,p.jsx)(ET,{checked:a("fade"),label:lT("toolbar.fade"),onChange:e=>{o("fade",{enabled:e.target.checked})},alignIndicator:lB.RIGHT}),(0,p.jsx)(ET,{checked:a("move"),label:lT("toolbar.move"),onChange:e=>{o("move",{enabled:e.target.checked})},alignIndicator:lB.RIGHT}),(0,p.jsx)(ET,{checked:a("zoom"),label:lT("toolbar.zoom"),onChange:e=>{o("zoom",{enabled:e.target.checked})},alignIndicator:lB.RIGHT}),(0,p.jsx)(E1,{element:i,store:t,name:"move",enabled:a()}),a("move")&&(0,p.jsx)(E5,{value:i.animations.find(e=>"move"===e.name)?.data?.direction||"right",onChange:e=>{o("move",{data:{direction:e},enabled:!0})}}),a()&&(0,p.jsx)(E6,{store:t,element:e}),a()&&(0,p.jsx)(E4,{store:t,element:e})]}),position:lV.BOTTOM,children:(0,p.jsx)(fA,{text:lT("toolbar.animate"),minimal:!0})})});var E9={};E9=function(e){return xD({tag:"svg",attr:{version:"1.1",id:"mdi-format-line-spacing",viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M10,13H22V11H10M10,19H22V17H10M10,7H22V5H10M6,7H8.5L5,3.5L1.5,7H4V17H1.5L5,20.5L8.5,17H6V7Z"}}]})(e)};var E7={};E7=function(e){return xD({tag:"svg",attr:{version:"1.1",id:"mdi-format-vertical-align-top",viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M8,11H11V21H13V11H16L12,7L8,11M4,3V5H20V3H4Z"}}]})(e)};var Se={};Se=function(e){return xD({tag:"svg",attr:{version:"1.1",id:"mdi-format-vertical-align-center",viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M8,19H11V23H13V19H16L12,15L8,19M16,5H13V1H11V5H8L12,9L16,5M4,11V13H20V11H4Z"}}]})(e)};var St={};St=function(e){return xD({tag:"svg",attr:{version:"1.1",id:"mdi-format-vertical-align-bottom",viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M16,13H13V3H11V13H8L12,17L16,13M4,19V21H20V19H4Z"}}]})(e)};let Sn=at("img")`
|
|
142
|
+
`,Ex=({style:e,color:t,onChange:n,...r})=>{let[i,o]=l(v).useState(t);l(v).useEffect(()=>{o(t)},[t]);let a=l(v).useRef(),s=l(v).useRef();return(0,p.jsx)(Ew,{style:e,onMouseDown:e=>{"INPUT"!==e.target.tagName&&e.preventDefault()},children:(0,p.jsx)(Ev,{color:i,...r,onChange:e=>{let{r:t,g:r,b:i,a:l}=e.rgb,u=`rgba(${t},${r},${i},${l})`;o(u),s.current=u,a.current||(a.current=window.setTimeout(()=>{a.current=0,n(u)},50))}})})},E_=e=>e.map(e=>`${e.color} ${100*e.offset}%`).join(","),EE=({value:e,onChange:t,store:n,preset:r})=>{let{rotation:i,stops:o}=io(e),a=l(v).useRef(o);a.current=o;let s=l(v).useRef(i);s.current=i;let[u,c]=l(v).useState(0),d=l(v).useRef(null),h=l(v).useRef(!1),f=()=>{h.current=!0};return l(v).useEffect(()=>{let e=e=>{if(h.current){let n=d.current.getBoundingClientRect(),r=e.clientX-n.left,i=r/n.width;if(o.length>2&&(i<-.5||i>1.5)){c(0),h.current=!1,a.current.splice(u,1),t(`linear-gradient(${s.current}deg, ${E_(a.current)})`);return}let l=Math.min(1,Math.max(0,r/n.width)),f=[...a.current];f[u].offset=l,t(`linear-gradient(${s.current}deg, ${E_(f)})`)}},n=()=>{h.current=!1};return window.addEventListener("mousemove",e),window.addEventListener("mouseup",n),()=>{window.removeEventListener("mousemove",e),window.removeEventListener("mouseup",n)}},[u,a]),(0,p.jsxs)("div",{children:[(0,p.jsxs)("div",{style:{width:"calc(100% - 35px)",height:"60px",position:"relative"},children:[(0,p.jsx)("div",{ref:d,style:{position:"absolute",top:0,left:0,width:"100%",marginLeft:"15px",height:"100%",zIndex:0},onMouseDown:e=>{let n=e.currentTarget.getBoundingClientRect(),r=Math.min(1,Math.max(0,(e.clientX-n.left)/n.width)),a=o[0].color;o.push({color:a,offset:r}),o.sort((e,t)=>e.offset-t.offset),c(o.findIndex(e=>e.offset===r)),f(),t(`linear-gradient(${i}deg, ${E_(o)})`)}}),o.map(({offset:e,color:t},n)=>(0,p.jsx)("div",{style:{position:"absolute",top:"10px",left:`${100*e}%`,border:n===u?"2px solid rgb(0, 161, 255)":"2px solid rgb(0, 0, 0, 0)",padding:"2px"},onMouseDown:e=>{e.stopPropagation(),c(n),f(e)},children:(0,p.jsx)(EC,{background:t,style:{margin:0}})},n))]}),(0,p.jsx)("div",{style:{width:"calc(100% - 30px)",height:"10px",marginLeft:"15px",background:`linear-gradient(90deg,${E_(o)})`}}),(0,p.jsx)("div",{style:{padding:"10px"},children:(0,p.jsx)(mg,{min:0,max:360,value:i,showTrackFill:!1,labelRenderer:!1,onChange:e=>{t(`linear-gradient(${e}deg,${E_(o)})`)}})}),(0,p.jsx)(Ex,{color:o[u].color,presetColors:r,onChange:e=>{let n=[...o];n[u].color=e,t(`linear-gradient(${i}deg, ${E_(n)})`)}})]})},ES=({value:e,onChange:t,preset:n,store:r})=>{let[i,o]=l(v).useState(ir(e)?"gradient":"solid");return(0,p.jsx)("div",{style:{padding:"5px"},children:(0,p.jsxs)(vT,{id:"TabsExample",selectedTabId:i,onChange:e=>o(e),children:[(0,p.jsx)(vx,{id:"solid",title:"Solid",panel:(0,p.jsx)(Ex,{color:e,onChange:t,presetColors:n,style:{padding:"0"}})}),(0,p.jsx)(vx,{id:"gradient",title:"Linear",panel:(0,p.jsx)(EE,{value:e,onChange:t,store:r,preset:n}),panelClassName:"ember-panel"})]})})},EC=({size:e=30,background:t,style:n={},children:r=null,...i})=>(0,p.jsx)("div",{onMouseDown:e=>e.preventDefault(),style:{width:e+"px",height:e+"px",background:"url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 8 8'%3E%3Cg fill='rgba(112, 112, 116, 1)' fill-opacity='1'%3E%3Cpath fill-rule='evenodd' d='M0 0h4v4H0V0zm4 4h4v4H4V4z'/%3E%3C/g%3E%3C/svg%3E\")",borderRadius:"2px",boxShadow:"0 0 2px grey",marginBottom:"-4px",...n},...i,children:(0,p.jsx)("div",{style:{width:e+"px",height:e+"px",background:t},children:r})}),EO=e=>{let t=Eb(e).slice(0,8).filter(e=>!Ey.find(t=>iQ(t,e)));return t.concat(Ey.slice(0,16-t.length).reverse())},Ek=({value:e,onChange:t,size:n,store:r,gradientEnabled:i,children:o,style:a})=>{let l=EO(r);return(0,p.jsx)(gw,{autoFocus:!1,enforceFocus:!0,interactionKind:"click",hasBackdrop:!0,content:i?(0,p.jsx)(ES,{preset:l,value:e,onChange:t,store:r}):(0,p.jsx)("div",{style:{padding:"5px"},children:(0,p.jsx)(Ex,{color:e,onChange:t,presetColors:l})}),children:(0,p.jsx)(EC,{size:n,background:e,style:a,children:o})})};var v=h("8NFma"),lD=h("gztBd"),v=h("8NFma"),EP=v.forwardRef(function(e,t){var n,r=e.alignIndicator,i=e.children,o=e.className,a=e.indicatorChildren,s=e.inline,u=e.inputRef,c=e.label,d=e.labelElement,h=e.large,f=e.style,p=e.type,g=e.typeClassName,m=e.tagName,y=(0,lD.__rest)(e,["alignIndicator","children","className","indicatorChildren","inline","inputRef","label","labelElement","large","style","type","typeClassName","tagName"]),b=l(lF)(lz.CONTROL,g,((n={})[lz.DISABLED]=y.disabled,n[lz.INLINE]=s,n[lz.LARGE]=h,n),lz.alignmentClass(r),o);return v.createElement(void 0===m?"label":m,{className:b,style:f,ref:t},v.createElement("input",(0,lD.__assign)({},y,{ref:u,type:p})),v.createElement("span",{className:lz.CONTROL_INDICATOR},a),c,d,i)});EP.displayName="".concat(fl,".Control");var ET=v.forwardRef(function(e,t){var n=e.innerLabelChecked,r=e.innerLabel,i=(0,lD.__rest)(e,["innerLabelChecked","innerLabel"]),o=r||n?[v.createElement("div",{key:"checked",className:lz.CONTROL_INDICATOR_CHILD},v.createElement("div",{className:lz.SWITCH_INNER_TEXT},n||r)),v.createElement("div",{key:"unchecked",className:lz.CONTROL_INDICATOR_CHILD},v.createElement("div",{className:lz.SWITCH_INNER_TEXT},r))]:null;return v.createElement(EP,(0,lD.__assign)({},i,{indicatorChildren:o,ref:t,type:"checkbox",typeClassName:lz.SWITCH}))});ET.displayName="".concat(fl,".Switch"),v.forwardRef(function(e,t){return v.createElement(EP,(0,lD.__assign)({},e,{ref:t,type:"radio",typeClassName:lz.RADIO}))}).displayName="".concat(fl,".Radio"),v.forwardRef(function(e,t){var n=e.defaultIndeterminate,r=e.indeterminate,i=e.onChange,o=(0,lD.__rest)(e,["defaultIndeterminate","indeterminate","onChange"]),a=v.useState(r||n||!1),l=a[0],s=a[1],u=v.useRef(null),c=void 0===e.inputRef?u:fi(e.inputRef,u),d=v.useCallback(function(e){void 0===r&&s(e.target.indeterminate),null==i||i(e)},[r,i]);return v.useEffect(function(){void 0!==r&&s(r)},[r]),v.useEffect(function(){null!=u.current&&(u.current.indeterminate=l)},[u,l]),v.createElement(EP,(0,lD.__assign)({},o,{inputRef:c,onChange:d,ref:t,type:"checkbox",typeClassName:lz.CHECKBOX}))}).displayName="".concat(fl,".Checkbox");let EA=(e,t,n)=>Math.max(t,Math.min(n,e)),EN=({value:e,onValueChange:t,...n})=>{let[r,i]=l(v).useState(e.toString());return l(v).useEffect(()=>{i(e.toString())},[e]),(0,p.jsx)(mi,{value:r,onValueChange:(e,n)=>{i(n),Number.isNaN(e)||t(e)},...n})},Ej=P(({element:e,store:t,elements:n})=>{let r=n||[e],i=r[0],o="text"===i.type,a="image"===i.type,s="svg"===i.type,u=e=>{t.history.transaction(()=>{r.forEach(t=>{t.set(e)})})};return(0,p.jsx)(gw,{content:(0,p.jsxs)("div",{style:{padding:"15px",paddingTop:"25px",width:"230px"},children:[(0,p.jsx)(ET,{checked:i.blurEnabled,label:lT("toolbar.blur"),onChange:e=>{u({blurEnabled:e.target.checked})},alignIndicator:lB.RIGHT}),i.blurEnabled&&(0,p.jsx)(mg,{value:i.blurRadius,labelStepSize:5,onChange:e=>{u({blurRadius:e})},min:0,max:20,showTrackFill:!1}),!o&&(0,p.jsx)(ET,{checked:i.brightnessEnabled,label:lT("toolbar.brightness"),onChange:e=>{u({brightnessEnabled:e.target.checked})},alignIndicator:lB.RIGHT,style:{marginTop:"20px"}}),i.brightnessEnabled&&(0,p.jsx)(mg,{value:100*i.brightness+100,onChange:e=>{u({brightness:(e-100)/100})},min:0,max:200,showTrackFill:!1,labelStepSize:50}),!o&&(0,p.jsx)(ET,{checked:i.sepiaEnabled,label:lT("toolbar.sepia"),onChange:e=>{u({sepiaEnabled:e.target.checked})},alignIndicator:lB.RIGHT,style:{marginTop:"20px"}}),!o&&(0,p.jsx)(ET,{checked:i.grayscaleEnabled,label:lT("toolbar.grayscale"),onChange:e=>{u({grayscaleEnabled:e.target.checked})},alignIndicator:lB.RIGHT,style:{marginTop:"20px"}}),o&&(0,p.jsx)(ET,{checked:!!i.strokeWidth,label:lT("toolbar.textStroke"),onChange:e=>{u({strokeWidth:e.target.checked?2:0})},alignIndicator:lB.RIGHT,style:{marginTop:"20px"}}),!!i.strokeWidth&&(0,p.jsx)(l(v).Fragment,{children:(0,p.jsxs)("div",{style:{display:"flex",justifyContent:"space-between"},children:[(0,p.jsx)(Ek,{value:i.stroke,size:30,onChange:e=>{u({stroke:e})},store:t}),(0,p.jsx)(mi,{defaultValue:i.strokeWidth,onValueChange:e=>{u({strokeWidth:EA(e,1,30)})},style:{width:"80px"},min:1,max:Math.round(i.fontSize/2)})]})}),o&&(0,p.jsx)(ET,{checked:!!i.backgroundEnabled,label:lT("toolbar.textBackground"),onChange:e=>{u({backgroundEnabled:e.target.checked})},alignIndicator:lB.RIGHT,style:{marginTop:"20px"}}),!!i.backgroundEnabled&&(0,p.jsxs)(l(v).Fragment,{children:[(0,p.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",paddingTop:"5px",paddingBottom:"5px"},children:[(0,p.jsx)("div",{children:lT("toolbar.backgroundCornerRadius")}),(0,p.jsx)("div",{children:(0,p.jsx)(EN,{value:100*i.backgroundCornerRadius,onValueChange:e=>{u({backgroundCornerRadius:EA(e,0,100)/100})},style:{width:"50px"},min:0,max:100,buttonPosition:"none"})})]}),(0,p.jsx)(mg,{value:100*i.backgroundCornerRadius,onChange:e=>{u({backgroundCornerRadius:EA(e,0,100)/100})},min:0,max:100,labelRenderer:!1}),(0,p.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",paddingTop:"5px",paddingBottom:"5px"},children:[(0,p.jsx)("div",{children:lT("toolbar.backgroundPadding")}),(0,p.jsx)("div",{children:(0,p.jsx)(EN,{value:Math.round(100*i.backgroundPadding),onValueChange:e=>{u({backgroundPadding:EA(e,0,100)/100})},style:{width:"50px"},min:0,max:100,buttonPosition:"none"})})]}),(0,p.jsx)(mg,{value:Math.round(100*i.backgroundPadding),onChange:e=>{u({backgroundPadding:EA(e,0,100)/100})},min:0,max:100,labelRenderer:!1}),(0,p.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",paddingTop:"5px",paddingBottom:"5px"},children:[(0,p.jsx)("div",{children:lT("toolbar.opacity")}),(0,p.jsx)("div",{children:(0,p.jsx)(EN,{value:Math.round(100*i.backgroundOpacity),onValueChange:e=>{u({backgroundOpacity:e/100})},style:{width:"50px"},min:0,max:100,buttonPosition:"none"})})]}),(0,p.jsx)(mg,{value:100*i.backgroundOpacity,onChange:e=>{u({backgroundOpacity:e/100})},min:0,max:100,labelRenderer:!1}),(0,p.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",paddingTop:"5px",paddingBottom:"5px"},children:[(0,p.jsx)("div",{style:{lineHeight:"30px"},children:lT("toolbar.color")}),(0,p.jsx)(Ek,{value:i.backgroundColor,size:30,onChange:e=>{u({backgroundColor:e})},store:t})]})]}),(a||s)&&(0,p.jsx)(ET,{checked:!!i.borderSize,label:lT("toolbar.border"),onChange:e=>{u({borderSize:e.target.checked?2:0})},alignIndicator:lB.RIGHT,style:{marginTop:"20px"}}),!!i.borderSize&&(0,p.jsx)(l(v).Fragment,{children:(0,p.jsxs)("div",{style:{display:"flex",justifyContent:"space-between"},children:[(0,p.jsx)(Ek,{value:i.borderColor,size:30,onChange:e=>{u({borderColor:e})},store:t}),(0,p.jsx)(mi,{defaultValue:i.borderSize,onValueChange:e=>{u({borderSize:EA(e,1,Math.min(i.width,i.height)/2)})},style:{width:"80px"},min:1,max:Math.min(i.width,i.height)/2})]})}),!o&&(0,p.jsx)(ET,{checked:!!i.cornerRadius,label:lT("toolbar.cornerRadius"),onChange:e=>{u({cornerRadius:e.target.checked?Math.min(i.width/4,i.height/4):0})},alignIndicator:lB.RIGHT,style:{marginTop:"20px"}}),!o&&!!i.cornerRadius&&(0,p.jsxs)("div",{style:{display:"flex",width:"100%",justifyContent:"space-between"},children:[(0,p.jsx)("div",{style:{width:"150px",paddingTop:"7px"},children:(0,p.jsx)(mg,{value:Math.min(i.cornerRadius,Math.round(Math.min(i.width/2,i.height/2))),onChange:e=>{u({cornerRadius:e})},min:1,max:Math.round(Math.min(i.width/2,i.height/2)),labelStepSize:50,showTrackFill:!1,labelRenderer:!1})}),(0,p.jsx)(mi,{value:i.cornerRadius,onValueChange:e=>{u({cornerRadius:EA(e,1,Math.min(i.width,i.height)/2)})},buttonPosition:"none",style:{width:"45px",padding:"0 5px"},min:1,max:Math.round(Math.min(i.width/2,i.height/2))})]}),(0,p.jsx)(ET,{checked:i.shadowEnabled,label:lT("toolbar.shadow"),onChange:e=>{u({shadowEnabled:e.target.checked})},alignIndicator:lB.RIGHT,style:{marginTop:"20px"}}),i.shadowEnabled&&(0,p.jsxs)(l(v).Fragment,{children:[(0,p.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",paddingTop:"5px",paddingBottom:"5px"},children:[(0,p.jsx)("div",{children:lT("toolbar.blur")}),(0,p.jsx)("div",{children:(0,p.jsx)(EN,{value:i.shadowBlur,onValueChange:e=>{u({shadowBlur:EA(e,-50,50)})},style:{width:"50px"},min:0,max:50,buttonPosition:"none"})})]}),(0,p.jsx)(mg,{value:i.shadowBlur,onChange:e=>{u({shadowBlur:e})},min:0,max:50,showTrackFill:!1,labelRenderer:!1}),(0,p.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",paddingTop:"5px",paddingBottom:"5px"},children:[(0,p.jsx)("div",{children:lT("toolbar.offsetX")}),(0,p.jsx)("div",{children:(0,p.jsx)(EN,{value:i.shadowOffsetX,onValueChange:e=>{u({shadowOffsetX:EA(e,-50,50)})},style:{width:"50px"},min:-50,max:50,buttonPosition:"none"})})]}),(0,p.jsx)(mg,{value:i.shadowOffsetX,onChange:e=>{u({shadowOffsetX:e})},min:-50,max:50,showTrackFill:!1,labelRenderer:!1}),(0,p.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",paddingTop:"5px",paddingBottom:"5px"},children:[(0,p.jsx)("div",{children:lT("toolbar.offsetY")}),(0,p.jsx)("div",{children:(0,p.jsx)(EN,{value:i.shadowOffsetY,onValueChange:e=>{u({shadowOffsetY:EA(e,-50,50)})},style:{width:"50px"},min:-50,max:50,buttonPosition:"none"})})]}),(0,p.jsx)(mg,{value:i.shadowOffsetY,onChange:e=>{u({shadowOffsetY:e})},min:-50,max:50,showTrackFill:!1,labelRenderer:!1}),(0,p.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",paddingTop:"5px",paddingBottom:"5px"},children:[(0,p.jsx)("div",{children:lT("toolbar.opacity")}),(0,p.jsx)("div",{children:(0,p.jsx)(EN,{value:Math.round(100*i.shadowOpacity),onValueChange:e=>{u({shadowOpacity:e/100})},style:{width:"50px"},min:0,max:100,buttonPosition:"none"})})]}),(0,p.jsx)(mg,{value:100*i.shadowOpacity,onChange:e=>{u({shadowOpacity:e/100})},min:0,max:100,labelRenderer:!1}),(0,p.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",paddingTop:"5px",paddingBottom:"5px"},children:[(0,p.jsx)("div",{style:{lineHeight:"30px"},children:lT("toolbar.color")}),(0,p.jsx)(Ek,{value:i.shadowColor,size:30,onChange:e=>{u({shadowColor:e})},store:t})]})]})]}),position:lV.BOTTOM,children:(0,p.jsx)(fA,{icon:"left-join",text:lT("toolbar.effects"),minimal:!0})})});var v=h("8NFma"),lD=h("gztBd"),v=h("8NFma");(kE=kD||(kD={})).MENU="menu",kE.LISTBOX="listbox",kE.TREE="tree",kE.GRID="grid",kE.DIALOG="dialog";var lD=h("gztBd"),v=h("8NFma"),fb=h("leH9B"),ER=v.forwardRef(function(e,t){var n=e.size>=fb.IconSize.LARGE,r=n?fb.IconSize.LARGE:fb.IconSize.STANDARD,i="".concat(-1*r/.05/2);return v.createElement(fS,(0,lD.__assign)({iconName:"cross",ref:t},e),v.createElement("path",{d:n?"M228.2 200L314 285.8C317.8 289.4 320 294.4 320 300C320 311 311 320 300 320C294.4000000000001 320 289.4000000000001 317.8 285.8 314.2L200 228.2L114.2 314.2C110.6 317.8 105.6 320 100 320C89 320 80 311 80 300C80 294.4 82.2 289.4 85.8 285.8L171.8 200L86 114.2000000000001C82.2 110.6 80 105.6 80 100C80 89 89 80 100 80C105.6 80 110.6 82.2 114.2 85.8L200 171.8L285.8 86C289.4000000000001 82.2 294.4000000000001 80 300 80C311 80 320 89 320 100C320 105.6 317.8 110.6 314.2000000000001 114.2000000000001L228.2 200z":"M188.2 160L254 225.8C257.8 229.4 260 234.4 260 240C260 251 251 260 240 260C234.4 260 229.4 257.8 225.8 254.2L160 188.2L94.2 254.2C90.6 257.8 85.6 260 80 260C69 260 60 251 60 240C60 234.4 62.2 229.4 65.8 225.8L131.8 160L66 94.2C62.2 90.6 60 85.6 60 80C60 69 69 60 80 60C85.6 60 90.6 62.2 94.2 65.8L160 131.8L225.8 66C229.4 62.2 234.4 60 240 60C251 60 260 69 260 80C260 85.6 257.8 90.6 254.2 94.2L188.2 160z",fillRule:"evenodd","transform-origin":"center",transform:"scale(0.05, -0.05) translate(".concat(i,", ").concat(i,")")}))});ER.defaultProps={size:fb.IconSize.STANDARD},ER.displayName="Blueprint5.Icon.Cross";var lD=h("gztBd"),v=h("8NFma"),fb=h("leH9B"),EI=v.forwardRef(function(e,t){var n=e.size>=fb.IconSize.LARGE,r=n?fb.IconSize.LARGE:fb.IconSize.STANDARD,i="".concat(-1*r/.05/2);return v.createElement(fS,(0,lD.__assign)({iconName:"search",ref:t},e),v.createElement("path",{d:n?"M391.2 51.2L292.4 150C309.8 175.8 320 206.6 320 240C320 328.4 248.4 400 160 400S0 328.4 0 240S71.6 80 160 80C193.4 80 224.2 90.2 250 107.6L348.8 8.8C354.2000000000001 3.4 361.8 0 370 0C386.6 0 400 13.4 400 30C400 38.2 396.6 45.8 391.2 51.2zM160 120C93.8 120 40 173.8 40 240S93.8 360 160 360S280 306.2000000000001 280 240S226.2 120 160 120z":"M311 51.4L257.6 105C271.6 126.8 279.8 152.6 279.8 180.2C279.8 257.6 217.2 320.2 139.8 320.2S-0.2 257.6 -0.2 180.2S62.4 40.2 139.8 40.2C167.6 40.2 193.4 48.6 215 62.4L268.6 9C274 3.6 281.6 0.2 289.8 0.2C306.4 0.2 319.8 13.6 319.8 30.2C319.8 38.4 316.4 46 311 51.4zM139.8 80.2C84.6 80.2 39.8 125 39.8 180.2S84.6 280.2 139.8 280.2S239.8 235.4 239.8 180.2S195 80.2 139.8 80.2z",fillRule:"evenodd","transform-origin":"center",transform:"scale(0.05, -0.05) translate(".concat(i,", ").concat(i,")")}))});EI.defaultProps={size:fb.IconSize.STANDARD},EI.displayName="Blueprint5.Icon.Search";var EL={};i(EL,"MULTISELECT",()=>ED),i(EL,"MULTISELECT_POPOVER",()=>EF),i(EL,"MULTISELECT_TAG_INPUT_INPUT",()=>Ez),i(EL,"OMNIBAR",()=>EB),i(EL,"OMNIBAR_OVERLAY",()=>EU),i(EL,"SELECT_POPOVER",()=>EH),i(EL,"SUGGEST_POPOVER",()=>EV);var EM=lz.getClassNamespace(),ED="".concat(EM,"-multi-select"),EF="".concat(ED,"-popover"),Ez="".concat(ED,"-tag-input-input"),EB="".concat(EM,"-omnibar"),EU="".concat(EB,"-overlay"),EH="".concat(EM,"-select-popover"),EV="".concat(EM,"-suggest-popover"),lD=h("gztBd"),v=h("8NFma"),lD=h("gztBd"),v=h("8NFma");function Eq(e,t,n){return void 0===e||null==t||null==n?t===n:ht.isFunction(e)?e(t,n):t[e]===n[e]}function EG(){return{__blueprintCreateNewItemBrand:"blueprint-create-new-item"}}function EW(e){if(null==e)return!1;var t=Object.keys(e);return 1===t.length&&"__blueprintCreateNewItemBrand"===t[0]&&"blueprint-create-new-item"===e.__blueprintCreateNewItemBrand}function E$(e){return null==e||EW(e)?null:e}var EK=function(e){function t(t){var n,r,i=e.call(this,t)||this;i.itemRefs=new Map,i.refHandlers={itemsParent:function(e){return i.itemsParentRef=e}},i.shouldCheckActiveItemInViewport=!1,i.expectedNextActiveItem=null,i.isEnterKeyPressed=!1,i.renderItemList=function(e){var t=i.props,n=t.initialContent,r=t.noResults,o=e.renderCreateItem(),a=function(e,t,n){if(0===e.query.length&&void 0!==n)return n;var r=e.filteredItems.map(e.renderItem).filter(function(e){return null!=e});return r.length>0?r:t}(e,null!=o?null:r,n);if(null==a&&null==o)return null;var l=i.isCreateItemFirst();return v.createElement(gB,(0,lD.__assign)({role:"listbox"},e.menuProps,{ulRef:e.itemsParentRef}),l&&o,a,!l&&o)},i.renderItem=function(e,t){if(!0!==i.props.disabled){var n=i.state,r=n.activeItem,o=n.query,a=n.filteredItems,l={active:Eq(i.props.itemsEqual,E$(r),e),disabled:EZ(e,t,i.props.itemDisabled),matchesPredicate:a.indexOf(e)>=0};return i.props.itemRenderer(e,{handleClick:function(t){return i.handleItemSelect(e,t)},handleFocus:function(){return i.setActiveItem(e)},index:t,modifiers:l,query:o,ref:function(e){e?i.itemRefs.set(t,e):i.itemRefs.delete(t)}})}return null},i.renderCreateItemMenuItem=function(){if(i.isCreateItemRendered(i.state.createNewItem)){var e=i.state,t=e.activeItem,n=e.query.trim(),r=EW(t);return i.props.createNewItemRenderer(n,r,function(e){i.handleItemCreate(n,e)})}return null},i.handleItemCreate=function(e,t){var n,r,o,a,l=null===(r=(n=i.props).createNewItemFromQuery)||void 0===r?void 0:r.call(n,e);if(null!=l){for(var s=Array.isArray(l)?l:[l],u=0;u<s.length;u++){var c=s[u];null===(a=(o=i.props).onItemSelect)||void 0===a||a.call(o,c,t)}i.maybeResetQuery()}},i.handleItemSelect=function(e,t){var n,r;i.setActiveItem(e),null===(r=(n=i.props).onItemSelect)||void 0===r||r.call(n,e,t),i.maybeResetQuery()},i.handlePaste=function(e){for(var t,n=i.props,r=n.createNewItemFromQuery,o=n.onItemsPaste,a=[],l=[],s=0;s<e.length;s++){var u=e[s],c=function(e,t){var n=t.items,r=t.itemPredicate;if(ht.isFunction(r))for(var i=0;i<n.length;i++){var o=n[i];if(r(e,o,i,!0))return o}}(u,i.props);if(void 0!==c)t=c,l.push(c);else if(i.canCreateItems()){var d=null==r?void 0:r(u);if(void 0!==d){var h=Array.isArray(d)?d:[d];l.push.apply(l,h)}}else a.push(u)}i.setQuery(a.join(", "),!1),void 0!==t&&i.setActiveItem(t),null==o||o(l)},i.handleKeyDown=function(e){var t,n,r=e.key;if("ArrowUp"===r||"ArrowDown"===r){e.preventDefault();var o=i.getNextActiveItem("ArrowUp"===r?-1:1);null!=o&&i.setActiveItem(o)}else"Enter"===r&&(i.isEnterKeyPressed=!0);null===(n=(t=i.props).onKeyDown)||void 0===n||n.call(t,e)},i.handleKeyUp=function(e){var t=i.props.onKeyUp,n=i.state.activeItem;"Enter"===e.key&&i.isEnterKeyPressed&&(e.preventDefault(),null==n||EW(n)?i.handleItemCreate(i.state.query,e):i.handleItemSelect(n,e),i.isEnterKeyPressed=!1),null==t||t(e)},i.handleInputQueryChange=function(e){var t,n,r=null==e?"":e.target.value;i.setQuery(r),null===(n=(t=i.props).onQueryChange)||void 0===n||n.call(t,r,e)};var o=t.query,a=void 0===o?"":o,l=null===(n=t.createNewItemFromQuery)||void 0===n?void 0:n.call(t,a),s=EX(a,t);return i.state={activeItem:void 0!==t.activeItem?t.activeItem:null!==(r=t.initialActiveItem)&&void 0!==r?r:EQ(s,t.itemDisabled),createNewItem:l,filteredItems:s,query:a},i}return(0,lD.__extends)(t,e),t.ofType=function(){return t},t.prototype.render=function(){var e=this.props,t=e.className,n=e.items,r=e.renderer,i=e.itemListRenderer,o=void 0===i?this.renderItemList:i,a=e.menuProps,l=this.state,s=(l.createNewItem,(0,lD.__rest)(l,["createNewItem"]));return r((0,lD.__assign)((0,lD.__assign)({},s),{className:t,handleItemSelect:this.handleItemSelect,handleKeyDown:this.handleKeyDown,handleKeyUp:this.handleKeyUp,handlePaste:this.handlePaste,handleQueryChange:this.handleInputQueryChange,itemList:o((0,lD.__assign)((0,lD.__assign)({},s),{items:n,itemsParentRef:this.refHandlers.itemsParent,menuProps:a,renderCreateItem:this.renderCreateItemMenuItem,renderItem:this.renderItem}))}))},t.prototype.componentDidUpdate=function(e){var t=this;void 0!==this.props.activeItem&&this.props.activeItem!==this.state.activeItem&&(this.shouldCheckActiveItemInViewport=!0,this.setState({activeItem:this.props.activeItem})),null!=this.props.query&&this.props.query!==e.query?this.setQuery(this.props.query,this.props.resetOnQuery,this.props):ht.shallowCompareKeys(this.props,e,{include:["items","itemListPredicate","itemPredicate"]})||this.setQuery(this.state.query),this.shouldCheckActiveItemInViewport&&(this.requestAnimationFrame(function(){return t.scrollActiveItemIntoView()}),this.shouldCheckActiveItemInViewport=!1)},t.prototype.scrollActiveItemIntoView=function(){var e=!1!==this.props.scrollToActiveItem,t=!Eq(this.props.itemsEqual,E$(this.expectedNextActiveItem),E$(this.props.activeItem));if(this.expectedNextActiveItem=null,e||!t){var n=this.getActiveElement();if(null!=this.itemsParentRef&&null!=n){var r=n.offsetTop,i=n.offsetHeight,o=this.itemsParentRef,a=o.offsetTop,l=o.scrollTop,s=o.clientHeight,u=this.getItemsParentPadding(),c=u.paddingTop,d=r+i+u.paddingBottom-a,h=r-c-a;d>=l+s?this.itemsParentRef.scrollTop=d+i-s:h<=l&&(this.itemsParentRef.scrollTop=h-i)}}},t.prototype.setQuery=function(e,t,n){void 0===t&&(t=this.props.resetOnQuery),void 0===n&&(n=this.props);var r,i=n.createNewItemFromQuery;this.shouldCheckActiveItemInViewport=!0,e!==this.state.query&&(null===(r=n.onQueryChange)||void 0===r||r.call(n,e));var o=e.trim(),a=EX(o,n),l=null!=i&&""!==o?i(o):void 0;this.setState({createNewItem:l,filteredItems:a,query:e});var s=this.getActiveIndex(a);(t||s<0||EZ(E$(this.state.activeItem),s,n.itemDisabled))&&(this.isCreateItemRendered(l)&&this.isCreateItemFirst()?this.setActiveItem(EG()):this.setActiveItem(EQ(a,n.itemDisabled)))},t.prototype.setActiveItem=function(e){var t,n,r,i;this.expectedNextActiveItem=e,void 0===this.props.activeItem&&(this.shouldCheckActiveItemInViewport=!0,this.setState({activeItem:e})),EW(e)?null===(n=(t=this.props).onActiveItemChange)||void 0===n||n.call(t,null,!0):null===(i=(r=this.props).onActiveItemChange)||void 0===i||i.call(r,e,!1)},t.prototype.getActiveElement=function(){var e,t=this.state.activeItem;if(null!=this.itemsParentRef){if(EW(t)){var n=this.isCreateItemFirst()?0:this.state.filteredItems.length;return this.itemsParentRef.children.item(n)}var r=this.getActiveIndex();return null!==(e=this.itemRefs.get(r))&&void 0!==e?e:this.itemsParentRef.children.item(r)}},t.prototype.getActiveIndex=function(e){void 0===e&&(e=this.state.filteredItems);var t=this.state.activeItem;if(null==t||EW(t))return -1;for(var n=0;n<e.length;++n)if(Eq(this.props.itemsEqual,e[n],t))return n;return -1},t.prototype.getItemsParentPadding=function(){var e=getComputedStyle(this.itemsParentRef),t=e.paddingTop;return{paddingBottom:EY(e.paddingBottom),paddingTop:EY(t)}},t.prototype.getNextActiveItem=function(e,t){return(void 0===t&&(t=this.getActiveIndex()),this.isCreateItemRendered(this.state.createNewItem)&&(0===t&&-1===e||t===this.state.filteredItems.length-1&&1===e))?EG():EQ(this.state.filteredItems,this.props.itemDisabled,e,t)},t.prototype.isCreateItemRendered=function(e){return this.canCreateItems()&&""!==this.state.query&&!this.wouldCreatedItemMatchSomeExistingItem(e)},t.prototype.isCreateItemFirst=function(){return"first"===this.props.createNewItemPosition},t.prototype.canCreateItems=function(){return null!=this.props.createNewItemFromQuery&&null!=this.props.createNewItemRenderer},t.prototype.wouldCreatedItemMatchSomeExistingItem=function(e){var t=this;return this.state.filteredItems.some(function(n){return(Array.isArray(e)?e:[e]).some(function(e){return Eq(t.props.itemsEqual,n,e)})})},t.prototype.maybeResetQuery=function(){this.props.resetOnSelect&&this.setQuery("",!0)},t.displayName="".concat(fl,".QueryList"),t.defaultProps={disabled:!1,resetOnQuery:!0},t}(function(e){function t(t){var n=e.call(this,t)||this;return n.timeoutIds=[],n.requestIds=[],n.clearTimeouts=function(){if(n.timeoutIds.length>0){for(var e=0,t=n.timeoutIds;e<t.length;e++){var r=t[e];window.clearTimeout(r)}n.timeoutIds=[]}},n.cancelAnimationFrames=function(){if(n.requestIds.length>0){for(var e=0,t=n.requestIds;e<t.length;e++){var r=t[e];window.cancelAnimationFrame(r)}n.requestIds=[]}},hQ("production")||n.validateProps(n.props),n}return(0,lD.__extends)(t,e),t.prototype.componentDidUpdate=function(e,t,n){hQ("production")||this.validateProps(this.props)},t.prototype.componentWillUnmount=function(){this.clearTimeouts(),this.cancelAnimationFrames()},t.prototype.requestAnimationFrame=function(e){var t=window.requestAnimationFrame(e);return this.requestIds.push(t),function(){return window.cancelAnimationFrame(t)}},t.prototype.setTimeout=function(e,t){var n=window.setTimeout(e,t);return this.timeoutIds.push(n),function(){return window.clearTimeout(n)}},t.prototype.validateProps=function(e){},t}(v.Component));function EY(e){return null==e?0:parseInt(e.slice(0,-2),10)}function EX(e,t){var n=t.items,r=t.itemPredicate,i=t.itemListPredicate;return ht.isFunction(i)?i(e,n):ht.isFunction(r)?n.filter(function(t,n){return r(e,t,n)}):n}function EZ(e,t,n){return null!=n&&null!=e&&(ht.isFunction(n)?n(e,t):!!e[n])}function EQ(e,t,n,r){if(void 0===n&&(n=1),void 0===r&&(r=e.length-1),0===e.length)return null;var i,o=r,a=e.length-1;do if(!EZ(e[o=(i=o+n)<0?a:i>a?0:i],o,t))return e[o];while(o!==r&&-1!==r)return null}var EJ=function(e){function t(){var t,n=e.apply(this,arguments)||this;return n.state={isOpen:!1},n.inputElement=null,n.queryList=null,n.handleInputRef=fa(n,"inputElement",null===(t=n.props.inputProps)||void 0===t?void 0:t.inputRef),n.handleQueryListRef=function(e){return n.queryList=e},n.listboxId=ht.uniqueId("listbox"),n.renderQueryList=function(e){var t=n.props,r=t.filterable,i=t.disabled,o=t.inputProps,a=t.popoverContentProps,s=t.popoverProps,u=void 0===s?{}:s,c=t.popoverRef,d=v.createElement(g5,(0,lD.__assign)({"aria-autocomplete":"list",leftIcon:v.createElement(EI,null),placeholder:"Filter...",rightElement:n.maybeRenderClearButton(e.query)},void 0===o?{}:o,{inputRef:n.handleInputRef,onChange:e.handleQueryChange,value:e.query})),h=e.handleKeyDown,f=e.handleKeyUp;return v.createElement(gw,(0,lD.__assign)({autoFocus:!1,enforceFocus:!1,isOpen:n.state.isOpen,disabled:void 0!==i&&i,placement:u.position||u.placement?void 0:"bottom-start"},u,{className:l(lF)(e.className,u.className),content:v.createElement("div",(0,lD.__assign)({},void 0===a?{}:a,{onKeyDown:h,onKeyUp:f}),void 0===r||r?d:void 0,e.itemList),onClosing:n.handlePopoverClosing,onInteraction:n.handlePopoverInteraction,onOpened:n.handlePopoverOpened,onOpening:n.handlePopoverOpening,popoverClassName:l(lF)(EL.SELECT_POPOVER,u.popoverClassName),popupKind:kD.LISTBOX,ref:c,renderTarget:n.getPopoverTargetRenderer(e,n.state.isOpen)}))},n.getPopoverTargetRenderer=function(e,t){return function(r){r.isOpen;var i,o=r.ref,a=(0,lD.__rest)(r,["isOpen","ref"]),s=n.props,u=s.disabled,c=s.popoverProps,d=s.popoverTargetProps,h=e.handleKeyDown,f=e.handleKeyUp,p=(void 0===c?{}:c).targetTagName;return v.createElement(void 0===p?"div":p,(0,lD.__assign)((0,lD.__assign)((0,lD.__assign)({"aria-controls":n.listboxId},d),a),{"aria-disabled":u,"aria-expanded":t,className:l(lF)(a.className,null==d?void 0:d.className,((i={})[lz.FILL]=n.props.fill,i)),onKeyDown:n.withPopoverTargetPropsHandler("keydown",t?h:n.handleTargetKeyDown),onKeyUp:n.withPopoverTargetPropsHandler("keyup",t?f:void 0),ref:o,role:"combobox"}),n.props.children)}},n.withPopoverTargetPropsHandler=function(e,t){switch(e){case"keydown":return function(e){var r,i;null==t||t(e),null===(i=null===(r=n.props.popoverTargetProps)||void 0===r?void 0:r.onKeyDown)||void 0===i||i.call(r,e)};case"keyup":return function(e){var r,i;null==t||t(e),null===(i=null===(r=n.props.popoverTargetProps)||void 0===r?void 0:r.onKeyUp)||void 0===i||i.call(r,e)}}},n.handleTargetKeyDown=function(e){"ArrowUp"===e.key||"ArrowDown"===e.key?(e.preventDefault(),n.setState({isOpen:!0})):ht.isKeyboardClick(e)&&n.setState({isOpen:!0})},n.handleItemSelect=function(e,t){var r,i,o=null==t?void 0:t.target,a=null==o?void 0:o.closest(".".concat(lz.MENU_ITEM)),l=null==a?void 0:a.matches(".".concat(lz.POPOVER_DISMISS));n.setState({isOpen:!(null==l||l)}),null===(i=(r=n.props).onItemSelect)||void 0===i||i.call(r,e,t)},n.handlePopoverInteraction=function(e,t){var r,i;n.setState({isOpen:e}),null===(i=null===(r=n.props.popoverProps)||void 0===r?void 0:r.onInteraction)||void 0===i||i.call(r,e,t)},n.handlePopoverOpening=function(e){var t,r,i;n.previousFocusedElement=null!==(t=ht.getActiveElement(n.inputElement))&&void 0!==t?t:void 0,n.props.resetOnClose&&n.resetQuery(),null===(i=null===(r=n.props.popoverProps)||void 0===r?void 0:r.onOpening)||void 0===i||i.call(r,e)},n.handlePopoverOpened=function(e){var t,r;null!=n.queryList&&n.queryList.scrollActiveItemIntoView(),n.requestAnimationFrame(function(){var e,t=n.props.inputProps;!1!==(void 0===t?{}:t).autoFocus&&(null===(e=n.inputElement)||void 0===e||e.focus())}),null===(r=null===(t=n.props.popoverProps)||void 0===t?void 0:t.onOpened)||void 0===r||r.call(t,e)},n.handlePopoverClosing=function(e){var t,r;n.requestAnimationFrame(function(){void 0!==n.previousFocusedElement&&(n.previousFocusedElement.focus(),n.previousFocusedElement=void 0)}),null===(r=null===(t=n.props.popoverProps)||void 0===t?void 0:t.onClosing)||void 0===r||r.call(t,e)},n.resetQuery=function(){return n.queryList&&n.queryList.setQuery("",!0)},n}return(0,lD.__extends)(t,e),t.ofType=function(){return t},t.prototype.render=function(){var e=this.props,t=(e.filterable,e.inputProps,e.menuProps),n=(e.popoverProps,(0,lD.__rest)(e,["filterable","inputProps","menuProps","popoverProps"]));return v.createElement(EK,(0,lD.__assign)({},n,{menuProps:(0,lD.__assign)((0,lD.__assign)({"aria-label":"selectable options"},t),{id:this.listboxId}),onItemSelect:this.handleItemSelect,ref:this.handleQueryListRef,renderer:this.renderQueryList}))},t.prototype.componentDidUpdate=function(e,t){var n,r,i,o,a;(null===(n=e.inputProps)||void 0===n?void 0:n.inputRef)!==(null===(r=this.props.inputProps)||void 0===r?void 0:r.inputRef)&&(fr(null===(i=e.inputProps)||void 0===i?void 0:i.inputRef,null),this.handleInputRef=fa(this,"inputElement",null===(o=this.props.inputProps)||void 0===o?void 0:o.inputRef),fr(null===(a=this.props.inputProps)||void 0===a?void 0:a.inputRef,this.inputElement)),this.state.isOpen&&!t.isOpen&&null!=this.queryList&&this.queryList.scrollActiveItemIntoView()},t.prototype.maybeRenderClearButton=function(e){return e.length>0?v.createElement(fA,{"aria-label":"Clear filter query",icon:v.createElement(ER,null),minimal:!0,onClick:this.resetQuery,title:"Clear filter query"}):void 0},t.displayName="".concat(fl,".Select"),t}(fO);let E0=({value:e,onValueChange:t,...n})=>{let[r,i]=l(v).useState(e.toString());return l(v).useEffect(()=>{i(e.toString())},[e]),(0,p.jsx)(mi,{value:r,onValueChange:(e,n)=>{i(n),Number.isNaN(e)||t(e)},...n})},E1=P(({element:e,store:t,enabled:n})=>{let r=e.animations.find(e=>"enter"===e.type),i=e.animations.find(e=>"exit"===e.type);return n?(0,p.jsxs)(g1,{style:{width:"100%"},children:[(0,p.jsx)(fA,{fill:!0,active:r?.enabled&&!i?.enabled,onClick:()=>{t.history.transaction(()=>{e.setAnimation("enter",{enabled:!0}),e.setAnimation("exit",{enabled:!1})})},children:"Enter"}),(0,p.jsx)(fA,{fill:!0,active:r?.enabled&&i?.enabled,onClick:()=>{t.history.transaction(()=>{e.setAnimation("enter",{enabled:!0}),e.setAnimation("exit",{enabled:!0})})},children:"Both"}),(0,p.jsx)(fA,{fill:!0,active:i?.enabled&&!r?.enabled,onClick:()=>{t.history.transaction(()=>{e.setAnimation("enter",{enabled:!1}),e.setAnimation("exit",{enabled:!0})})},children:"Exit"})]}):null}),E2=(e,{handleClick:t,handleFocus:n,modifiers:r,query:i})=>r.matchesPredicate?(0,p.jsx)(gW,{active:r.active,disabled:r.disabled,onClick:t,icon:"arrow-"+e,onFocus:n,roleStructure:"listoption",text:e,shouldDismissPopover:!1},e):null,E3=["right","left","up","down","bottom-right","bottom-left","top-right","top-left"],E5=P(({value:e,onChange:t})=>(0,p.jsx)("div",{style:{paddingTop:"10px"},children:(0,p.jsx)(EJ,{items:E3,itemRenderer:E2,filterable:!1,activeItem:e,onItemSelect:e=>{t(e)},children:(0,p.jsx)(fA,{text:e,icon:"arrow-"+e,fill:!0})})})),E6=P(({element:e,store:t})=>{let n=e.animations.find(e=>"enter"===e.type);return(0,p.jsxs)("div",{style:{padding:"10px"},children:[(0,p.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",paddingTop:"5px",paddingBottom:"5px"},children:[(0,p.jsx)("div",{children:"Delay"}),(0,p.jsx)("div",{children:(0,p.jsx)(E0,{value:parseFloat((n.delay/1e3).toFixed(2)),onValueChange:t=>{e.setAnimation("enter",{delay:1e3*t})},style:{width:"50px"},minorStepSize:.01,stepSize:.01,min:0,max:2.5,buttonPosition:"none"})})]}),(0,p.jsx)(mg,{min:0,max:1e3,value:n.delay,showTrackFill:!1,labelRenderer:!1,onChange:t=>{e.setAnimation("enter",{delay:t})}})]})}),E4=P(({element:e,store:t})=>{let n=e.animations.find(e=>"enter"===e.type);return(0,p.jsxs)("div",{style:{padding:"10px"},children:[(0,p.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",paddingTop:"5px",paddingBottom:"5px"},children:[(0,p.jsx)("div",{children:"Duration"}),(0,p.jsx)("div",{children:(0,p.jsx)(E0,{value:parseFloat((n.duration/1e3).toFixed(2)),onValueChange:t=>{e.setAnimation("enter",{duration:1e3*t}),e.setAnimation("exit",{duration:1e3*t})},style:{width:"50px"},minorStepSize:.01,stepSize:.01,min:0,max:2.5,buttonPosition:"none"})})]}),(0,p.jsx)(mg,{min:0,max:2500,value:n.duration,showTrackFill:!1,labelRenderer:!1,onChange:t=>{e.setAnimation("enter",{duration:t}),e.setAnimation("exit",{duration:t})}})]})}),E8=P(({element:e,store:t,elements:n})=>{let r=n||[e],i=r[0];i.type,i.type,i.type;let o=(e,n)=>{t.history.transaction(()=>{r.forEach(t=>{t.setAnimation("enter",{name:e,...n}),t.setAnimation("exit",{name:e,...n,from:n.to,to:n.from})})}),n.enabled&&(t.play({animatedElementsIds:r.map(e=>e.id),currentTime:i.page.startTime}),setTimeout(()=>{t.stop()},1e3))},a=e=>!!((e?i.animations?.filter(t=>t.name===e):i.animations)||[]).find(e=>e.enabled);return(0,p.jsx)(gw,{hasBackdrop:!1,autoFocus:!1,content:(0,p.jsxs)("div",{style:{padding:"15px",paddingTop:"25px",width:"230px"},children:[(0,p.jsx)(ET,{checked:a("fade"),label:lT("toolbar.fade"),onChange:e=>{o("fade",{enabled:e.target.checked})},alignIndicator:lB.RIGHT}),(0,p.jsx)(ET,{checked:a("move"),label:lT("toolbar.move"),onChange:e=>{o("move",{enabled:e.target.checked})},alignIndicator:lB.RIGHT}),(0,p.jsx)(ET,{checked:a("zoom"),label:lT("toolbar.zoom"),onChange:e=>{o("zoom",{enabled:e.target.checked})},alignIndicator:lB.RIGHT}),(0,p.jsx)(E1,{element:i,store:t,name:"move",enabled:a()}),a("move")&&(0,p.jsx)(E5,{value:i.animations.find(e=>"move"===e.name)?.data?.direction||"right",onChange:e=>{o("move",{data:{direction:e},enabled:!0})}}),a()&&(0,p.jsx)(E6,{store:t,element:e}),a()&&(0,p.jsx)(E4,{store:t,element:e})]}),position:lV.BOTTOM,children:(0,p.jsx)(fA,{text:lT("toolbar.animate"),minimal:!0})})});var E9={};E9=function(e){return xD({tag:"svg",attr:{version:"1.1",id:"mdi-format-line-spacing",viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M10,13H22V11H10M10,19H22V17H10M10,7H22V5H10M6,7H8.5L5,3.5L1.5,7H4V17H1.5L5,20.5L8.5,17H6V7Z"}}]})(e)};var E7={};E7=function(e){return xD({tag:"svg",attr:{version:"1.1",id:"mdi-format-vertical-align-top",viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M8,11H11V21H13V11H16L12,7L8,11M4,3V5H20V3H4Z"}}]})(e)};var Se={};Se=function(e){return xD({tag:"svg",attr:{version:"1.1",id:"mdi-format-vertical-align-center",viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M8,19H11V23H13V19H16L12,15L8,19M16,5H13V1H11V5H8L12,9L16,5M4,11V13H20V11H4Z"}}]})(e)};var St={};St=function(e){return xD({tag:"svg",attr:{version:"1.1",id:"mdi-format-vertical-align-bottom",viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M16,13H13V3H11V13H8L12,17L16,13M4,19V21H20V19H4Z"}}]})(e)};let Sn=at("img")`
|
|
143
143
|
height: 20px;
|
|
144
144
|
|
|
145
145
|
.bp5-dark & {
|
|
146
146
|
filter: invert(1);
|
|
147
147
|
}
|
|
148
|
-
`,Sr=({fontFamily:e,handleClick:t,modifiers:n,store:r,isCustom:i})=>{let[o,a]=l(v).useState(!i);if(l(v).useEffect(()=>{o||r.loadFont(e)},[e,o]),"_divider"===e)return(0,p.jsx)("div",{style:{paddingTop:"10px"},children:(0,p.jsx)(gV,{})});let s=o?(0,p.jsx)(Sn,{src:aK(e),alt:e,onError:()=>{a(!1)}}):e;return(0,p.jsx)(gW,{text:s,active:n.active,disabled:n.disabled,onClick:t,style:{fontFamily:'"'+e+'"'}})},Si=({onChange:e,defaultValue:t})=>{let n=l(v).useRef(null);return l(v).useEffect(()=>{n.current&&n.current.focus()},[]),(0,p.jsx)(g5,{leftIcon:"search",inputRef:n,defaultValue:t,onChange:t=>e(t.target.value)})},So=({store:e,fonts:t,activeFont:n,activeFontLabel:r,onFontSelect:i})=>{let[o,a]=l(v).useState(""),s=t.filter(e=>e.toLowerCase().indexOf(o.toLowerCase())>=0);return(0,p.jsx)(gw,{content:(0,p.jsxs)("div",{children:[(0,p.jsx)(Si,{onChange:e=>a(e),defaultValue:o}),(0,p.jsx)("div",{style:{paddingTop:"5px"},children:(0,p.jsx)(mT,{innerElementType:l(v).forwardRef((e,t)=>(0,p.jsx)(gB,{ref:t,...e})),height:Math.min(400,30*s.length)+10,width:210,itemCount:s.length,itemSize:30,children:({index:t,style:r})=>{let o=s[t];return(0,p.jsx)("div",{style:r,children:(0,p.jsx)(Sr,{fontFamily:o,modifiers:{active:n===o},handleClick:()=>i(o),store:e,isCustom:e.fonts.find(e=>e.fontFamily===o)||ih.find(e=>e.fontFamily===o)},o)})}})})]}),children:(0,p.jsx)(fA,{text:r,rightIcon:"caret-down",minimal:!0,style:{marginRight:"5px",fontFamily:'"'+n+'"',overflow:"hidden",whiteSpace:"nowrap",maxHeight:"30px"}})})},Sa=P(({elements:e,store:t})=>{let{data:n,mutate:r}=vg(a$(),vb,{isPaused:()=>id(),fallbackData:[]});l(v).useEffect(()=>{r()},[id()]);let i=t.fonts.concat(ih).map(e=>e.fontFamily).concat(n?.length&&!id()?n:iu),o=e[0].fontFamily;o.length>15&&(o=o.slice(0,15)+"...");let a=[];t.find(e=>("text"===e.type&&a.push(e.fontFamily),!1));let s=[...new Set(a.concat("_divider").concat(i))];return(0,p.jsx)(So,{fonts:s,activeFont:e[0].fontFamily,activeFontLabel:o,store:t,onFontSelect:n=>{t.history.transaction(()=>{e.forEach(e=>{e.set({fontFamily:n})})})}})}),Sl=P(({elements:e,store:t})=>(0,p.jsx)(mi,{onValueChange:n=>{t.history.transaction(()=>{e.forEach(e=>{e.set({fontSize:n,width:Math.max(n,e.width)})})})},value:Math.round(e[0].fontSize),style:{width:"50px"},min:5,max:4*t.height})),Ss=["left","center","right","justify"],Su=["top","middle","bottom"],Sc={top:(0,p.jsx)("span",{className:"bp5-icon",children:(0,p.jsx)(l(E7),{})}),middle:(0,p.jsx)("span",{className:"bp5-icon",children:(0,p.jsx)(l(Se),{})}),bottom:(0,p.jsx)("span",{className:"bp5-icon",children:(0,p.jsx)(l(St),{})})},Sd={TextFontFamily:Sa,TextFontSize:Sl,TextFontVariant:P(({elements:e,store:t})=>{let n=e[0];return(0,p.jsxs)(g1,{children:[(0,p.jsx)(fA,{minimal:!0,icon:"align-"+n.align,onClick:()=>{let r=(Ss.indexOf(n.align)+1+Ss.length)%Ss.length,i=Ss[r];t.history.transaction(()=>{e.forEach(e=>{e.set({align:i})})})}}),ix.textVerticalResizeEnabled&&(0,p.jsx)(fA,{minimal:!0,icon:Sc[n.verticalAlign],onClick:()=>{let r=(Su.indexOf(n.verticalAlign)+1+Su.length)%Su.length,i=Su[r];t.history.transaction(()=>{e.forEach(e=>{e.set({verticalAlign:i})})})}}),(0,p.jsx)(fA,{minimal:!0,icon:"bold",active:"bold"===n.fontWeight||"700"===n.fontWeight,onClick:()=>{let r="bold"===n.fontWeight||"700"===n.fontWeight;t.history.transaction(()=>{e.forEach(e=>{r?e.set({fontWeight:"normal"}):e.set({fontWeight:"bold"})})})}}),(0,p.jsx)(fA,{minimal:!0,icon:"italic",active:"italic"===n.fontStyle,onClick:()=>{let r="italic"===n.fontStyle;t.history.transaction(()=>{e.forEach(e=>{r?e.set({fontStyle:"normal"}):e.set({fontStyle:"italic"})})})}}),(0,p.jsx)(fA,{minimal:!0,icon:"underline",active:n.textDecoration.indexOf("underline")>=0,onClick:()=>{let r=n.textDecoration.split(" ");r.indexOf("underline")>=0?r=r.filter(e=>"underline"!==e):r.push("underline"),t.history.transaction(()=>{e.forEach(e=>{e.set({textDecoration:r.join(" ")})})})}}),(0,p.jsx)(fA,{minimal:!0,icon:"strikethrough",active:n.textDecoration.indexOf("line-through")>=0,onClick:()=>{let r=n.textDecoration.split(" ");r.indexOf("line-through")>=0?r=r.filter(e=>"line-through"!==e):r.push("line-through"),t.history.transaction(()=>{e.forEach(e=>{e.set({textDecoration:r.join(" ")})})})}})]})}),TextFill:P(({elements:e,store:t})=>(0,p.jsx)(Ek,{value:e[0].fill,style:{marginRight:"5px"},gradientEnabled:!0,onChange:n=>t.history.transaction(()=>{e.forEach(e=>{e.set({fill:n})})}),store:t})),TextSpacing:P(({elements:e,store:t})=>{let n=e[0];return(0,p.jsx)(gw,{content:(0,p.jsxs)("div",{style:{padding:"15px 25px",width:"200px"},children:[(0,p.jsx)("p",{children:lT("toolbar.lineHeight")}),(0,p.jsx)(mg,{value:"number"==typeof n.lineHeight?100*n.lineHeight:120,labelStepSize:50,onChange:n=>{t.history.transaction(()=>{e.forEach(e=>{e.set({lineHeight:n/100})})})},min:50,max:250,stepSize:10,showTrackFill:!0}),(0,p.jsx)("p",{children:lT("toolbar.letterSpacing")}),(0,p.jsx)(mg,{value:100*n.letterSpacing,labelStepSize:50,onChange:n=>{t.history.transaction(()=>{e.forEach(e=>{e.set({letterSpacing:n/100})})})},min:-50,max:250,stepSize:10,showTrackFill:!1})]}),position:lV.BOTTOM,children:(0,p.jsx)(fA,{icon:(0,p.jsx)(l(E9),{className:"bp5-icon",style:{fontSize:"20px"}}),minimal:!0})})}),TextFilters:Ej,TextAnimations:E8},Sh=P(({store:e,components:t})=>{let n=e.selectedElements,r=gM({type:"text",usedItems:["TextFill","TextFontFamily","TextFontSize","TextFontVariant","TextSpacing","TextFilters",ix.animationsEnabled&&"TextAnimations"],components:t});return(0,p.jsx)(gD,{items:r,itemRender:r=>{let i=t[r]||Sd[r];return(0,p.jsx)(i,{elements:n,element:n[0],store:e},r)}})});h("8NFma");var Sf={};Sf=function(e){return xD({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M10 10v5h2V4h2v11h2V4h2V2h-8C7.79 2 6 3.79 6 6s1.79 4 4 4zm-2 7v-3l-4 4 4 4v-3h12v-2H8z"}}]})(e)};var Sp={};Sp=function(e){return xD({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M9 10v5h2V4h2v11h2V4h2V2H9C6.79 2 5 3.79 5 6s1.79 4 4 4zm12 8l-4-4v3H5v2h12v3l4-4z"}}]})(e)};let Sg=P(({element:e})=>(0,p.jsx)(mi,{onValueChange:t=>{e.set({fontSize:t})},value:Math.round(e.fontSize),style:{width:"50px"},min:5})),Sm=["left","center","right","justify"],Sv=["top","middle","bottom"],Sy={top:(0,p.jsx)("span",{className:"bp5-icon",children:(0,p.jsx)(l(E7),{})}),middle:(0,p.jsx)("span",{className:"bp5-icon",children:(0,p.jsx)(l(Se),{})}),bottom:(0,p.jsx)("span",{className:"bp5-icon",children:(0,p.jsx)(l(St),{})})},Sb=P(({element:e,store:t})=>(0,p.jsxs)(g1,{children:[(0,p.jsx)(fA,{minimal:!0,icon:"align-"+e.align,onClick:()=>{let t=(Sm.indexOf(e.align)+1+Sm.length)%Sm.length,n=Sm[t];e.set({align:n})}}),ix.textVerticalResizeEnabled&&(0,p.jsx)(fA,{minimal:!0,icon:Sy[e.verticalAlign],onClick:()=>{let n=(Sv.indexOf(e.verticalAlign)+1+Sv.length)%Sv.length,r=Sv[n];t.history.transaction(()=>{e.set({verticalAlign:r})})}}),(0,p.jsx)(fA,{minimal:!0,icon:"bold",active:an.currentFormat.bold||"bold"===e.fontWeight||"700"===e.fontWeight,onMouseDown:e=>{e.preventDefault()},onClick:t=>{let n=window.__polotnoQuill;if(n){let e=n.getSelection();n.formatText(e.index,e.length,"bold",!an.currentFormat.bold,"user");return}"bold"===e.fontWeight||"700"===e.fontWeight?e.set({fontWeight:"normal"}):e.set({fontWeight:"bold"})}}),(0,p.jsx)(fA,{minimal:!0,icon:"italic",onMouseDown:e=>{e.preventDefault()},active:an.currentFormat.italic||"italic"===e.fontStyle,onClick:()=>{let t=window.__polotnoQuill;if(t){let e=t.getSelection();t.formatText(e.index,e.length,"italic",!an.currentFormat.italic,"user");return}"italic"===e.fontStyle?e.set({fontStyle:"normal"}):e.set({fontStyle:"italic"})}}),(0,p.jsx)(fA,{minimal:!0,icon:"underline",active:an.currentFormat.underline||e.textDecoration.indexOf("underline")>=0,onMouseDown:e=>{e.preventDefault()},onClick:()=>{let t=window.__polotnoQuill;if(t){let e=t.getSelection();t.formatText(e.index,e.length,"underline",!an.currentFormat.underline,"user");return}let n=e.textDecoration.split(" ");n.indexOf("underline")>=0?n=n.filter(e=>"underline"!==e):n.push("underline"),e.set({textDecoration:n.join(" ")})}}),(0,p.jsx)(fA,{minimal:!0,icon:"strikethrough",active:an.currentFormat.strike||e.textDecoration.indexOf("line-through")>=0,onMouseDown:e=>{e.preventDefault()},onClick:()=>{let t=window.__polotnoQuill;if(t){let e=t.getSelection();t.formatText(e.index,e.length,"strike",!an.currentFormat.strike,"user");return}let n=e.textDecoration.split(" ");n.indexOf("line-through")>=0?n=n.filter(e=>"line-through"!==e):n.push("line-through"),e.set({textDecoration:n.join(" ")})}})]})),Sw={TextFontFamily:Sa,TextFontSize:Sg,TextFontVariant:Sb,TextFilters:Ej,TextFill:P(({element:e,store:t})=>(0,p.jsx)(Ek,{value:an.currentFormat.color||e.fill,onChange:t=>{let n=window.__polotnoQuill,r=n?.getSelection(),i=r?.length>=n?.getLength()-1;if(n&&!i&&r?.length)n.formatText(r.index,r.length,"color",t,"user");else{var o=e.text.replace(/style=".*?"/g,"");e.set({fill:t,text:o})}},store:t})),TextSpacing:P(({element:e})=>(0,p.jsx)(gw,{content:(0,p.jsxs)("div",{style:{padding:"15px 25px",width:"200px"},children:[(0,p.jsx)("p",{children:"Line height"}),(0,p.jsx)(mg,{value:"number"==typeof e.lineHeight?100*e.lineHeight:120,labelStepSize:50,onChange:t=>{e.set({lineHeight:t/100})},min:50,max:250,stepSize:10,showTrackFill:!0}),(0,p.jsx)("p",{children:"Letter spacing"}),(0,p.jsx)(mg,{value:100*e.letterSpacing,labelStepSize:50,onChange:t=>{e.set({letterSpacing:t/100})},min:-50,max:250,stepSize:10,showTrackFill:!1})]}),position:lV.BOTTOM,children:(0,p.jsx)(fA,{icon:(0,p.jsx)(l(E9),{className:"bp5-icon",style:{fontSize:"20px"}}),minimal:!0})})),TextDirection:P(({element:e})=>{let t="rtl"===e.dir?l(Sf):l(Sp);return(0,p.jsx)(fA,{icon:(0,p.jsx)(t,{className:"bp5-icon",style:{fontSize:"20px"}}),minimal:!0,onClick:()=>{e.set({dir:"rtl"===e.dir?"ltr":"rtl"})}})}),TextAnimations:E8},Sx=P(({store:e,components:t})=>{let n=e.selectedElements,r=e.selectedElements[0],i=gM({type:"text",usedItems:["TextFill","TextFontFamily","TextFontSize","TextFontVariant","TextSpacing","TextFilters",ix.animationsEnabled&&"TextAnimations"],components:t});return(0,p.jsx)(gD,{items:i,itemRender:i=>{let o=t[i]||Sw[i];return(0,p.jsx)(o,{element:r,elements:n,store:e},i)}})});var v=h("8NFma");h("8NFma");var S_=({element:e})=>(0,p.jsx)(gw,{content:(0,p.jsxs)(gB,{children:[(0,p.jsx)(gW,{shouldDismissPopover:!1,icon:"arrows-horizontal",text:lT("toolbar.flipHorizontally"),onClick:()=>{e.set({flipX:!e.flipX})}}),(0,p.jsx)(gW,{shouldDismissPopover:!1,text:lT("toolbar.flipVertically"),icon:"arrows-vertical",onClick:()=>{e.set({flipY:!e.flipY})}})]}),position:lV.BOTTOM,children:(0,p.jsx)(fA,{text:lT("toolbar.flip"),minimal:!0})}),v=h("8NFma"),lD=h("gztBd"),v=h("8NFma"),fb=h("leH9B"),SE=function(e){function t(t){var n=e.call(this,t)||this,r=h5("bp-dialog");return n.titleId="title-".concat(r),n}return(0,lD.__extends)(t,e),t.prototype.render=function(){return v.createElement(gc,(0,lD.__assign)({},this.props,{className:lz.OVERLAY_SCROLL_CONTAINER,hasBackdrop:!0}),v.createElement("div",{className:lz.DIALOG_CONTAINER,ref:this.props.containerRef},v.createElement("div",{className:l(lF)(lz.DIALOG,this.props.className),role:"dialog","aria-labelledby":this.props["aria-labelledby"]||(this.props.title?this.titleId:void 0),"aria-describedby":this.props["aria-describedby"],style:this.props.style},this.maybeRenderHeader(),this.props.children)))},t.prototype.validateProps=function(e){null==e.title&&(null!=e.icon&&console.warn(hX),null!=e.isCloseButtonShown&&console.warn(hZ))},t.prototype.maybeRenderCloseButton=function(){return!1!==this.props.isCloseButtonShown?v.createElement(fA,{"aria-label":"Close",className:lz.DIALOG_CLOSE_BUTTON,icon:v.createElement(v_,{size:fb.IconSize.STANDARD}),minimal:!0,onClick:this.props.onClose}):void 0},t.prototype.maybeRenderHeader=function(){var e=this.props,t=e.icon,n=e.title;if(null!=n)return v.createElement("div",{className:lz.DIALOG_HEADER},v.createElement(fC,{icon:t,size:fb.IconSize.STANDARD,"aria-hidden":!0,tabIndex:-1}),v.createElement(gH,{id:this.titleId},n),this.maybeRenderCloseButton())},t.defaultProps={canOutsideClickClose:!0,isOpen:!1},t.displayName="".concat(fl,".Dialog"),t}(fO);let SS=async e=>{let t=await fetch(aY(),{method:"POST",body:JSON.stringify({url:e})});return 200!==t.status?(alert(lT("error.removeBackground")),e):(await t.json()).url},SC=P(({isOpen:e,onClose:t,element:n})=>{let[r,i]=l(v).useState(n.src);l(v).useEffect(()=>{i(n.src)},[n.src]);let[o,a]=l(v).useState(!1),s=async()=>{a(!0);try{i(await SS(n.src))}catch(e){console.error(e)}a(!1)},u=r!==n.src;return(0,p.jsxs)(SE,{onClose:t,title:lT("toolbar.removeBackgroundTitle"),isOpen:e,style:{width:"80%",maxWidth:"700px"},children:[(0,p.jsx)("div",{className:lz.DIALOG_BODY,children:(0,p.jsx)("img",{src:r,style:{width:"100%",maxHeight:"400px",objectFit:"contain"}})}),(0,p.jsxs)("div",{className:lz.DIALOG_FOOTER,style:{position:"relative"},children:[(0,p.jsxs)("div",{style:{position:"absolute",top:"5px"},children:["Powered by"," ",(0,p.jsx)("a",{href:"https://hotpot.ai/",target:"_blank",children:"hotpot.ai"})]}),(0,p.jsxs)("div",{className:lz.DIALOG_FOOTER_ACTIONS,children:[!u&&(0,p.jsx)(fA,{onClick:s,loading:o,children:lT("toolbar.removeBackground")}),u&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(fA,{onClick:()=>{i(n.src),t()},loading:o,children:lT("toolbar.cancelRemoveBackground")}),(0,p.jsx)(fA,{onClick:()=>{n.set({src:r}),t()},loading:o,intent:"primary",children:lT("toolbar.confirmRemoveBackground")})]})]})]})]})}),SO={ImageFlip:S_,ImageFilters:Ej,ImageFitToBackground:({element:e})=>(0,p.jsx)(fA,{text:lT("toolbar.fitToBackground"),minimal:!0,onClick:()=>{let{page:t}=e;e.set({x:-t.bleed,y:-t.bleed,width:t.computedWidth+2*t.bleed,height:t.computedHeight+2*t.bleed,rotation:0,cropX:0,cropY:0,cropWidth:1,cropHeight:1})}}),ImageCrop:({element:e,store:t})=>e.contentEditable?(0,p.jsx)(fA,{text:lT("toolbar.crop"),minimal:!0,onClickCapture:t=>{t.stopPropagation(),e.toggleCropMode(!0)}}):null,ImageRemoveClip:P(({element:e,store:t})=>e.clipSrc?(0,p.jsx)(fA,{text:lT("toolbar.removeClip"),minimal:!0,onClickCapture:t=>{e.set({clipSrc:""})}}):null),ImageRemoveBackground:({element:e})=>{let[t,n]=l(v).useState(!1);return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(fA,{text:lT("toolbar.removeBackground"),minimal:!0,onClick:e=>{n(!0)}}),(0,p.jsx)(SC,{isOpen:t,onClose:()=>{n(!1)},element:e})]})},ImageAnimations:E8},Sk=P(({store:e,components:t})=>{let n=e.selectedElements[0],r=n._cropModeEnabled,i=l(v).useRef({});l(v).useEffect(()=>{r&&(i.current={x:n.x,y:n.y,width:n.width,height:n.height,cropX:n.cropX,cropY:n.cropY,cropWidth:n.cropWidth,cropHeight:n.cropHeight})},[r]);let o=gM({type:"image",usedItems:["ImageFlip","ImageFilters","ImageFitToBackground","ImageCrop",ix.animationsEnabled&&"ImageAnimations","ImageRemoveClip",ix.removeBackgroundEnabled&&"ImageRemoveBackground"],components:t});return(0,p.jsxs)(p.Fragment,{children:[!r&&(0,p.jsx)(gD,{items:o,itemRender:r=>{let i=t[r]||SO[r];return(0,p.jsx)(i,{element:n,store:e},r)}}),r&&(0,p.jsxs)(gA.Group,{children:[(0,p.jsx)(fA,{text:lT("toolbar.cropDone"),minimal:!0,icon:"tick",onClickCapture:e=>{n.toggleCropMode(!1)}}),(0,p.jsx)(fA,{text:lT("toolbar.cropCancel"),minimal:!0,icon:"cross",onClickCapture:e=>{n.set({...i.current}),n.toggleCropMode(!1)}})]})]})});h("8NFma");let SP=(e,t)=>Array.from(e.keys()).find(e=>iQ(e,t)),ST=(e,t)=>{let n=SP(e,t);return e.get(n||"")||t},SA={SvgFlip:S_,SvgFilters:Ej,SvgColors:P(({element:e,elements:t,store:n})=>{let r=i0(e.src);return(0,p.jsx)(p.Fragment,{children:!e.maskSrc&&r.slice(0,5).map(t=>(0,p.jsx)(Ek,{value:ST(e.colorsReplace,t),style:{marginLeft:"5px"},onChange:n=>{let r=SP(e.colorsReplace,t)||t;e.replaceColor(r,n)},store:n,gradientEnabled:!0},t))})}),SvgAnimations:E8},SN=P(({store:e,hideSvgEffects:t,components:n})=>{let r=e.selectedElements,i=gM({type:"svg",usedItems:["SvgFlip",!t&&"SvgFilters","SvgColors",ix.animationsEnabled&&"SvgAnimations"].filter(e=>!!e),components:n});return(0,p.jsx)(gD,{items:i,itemRender:t=>{let i=n[t]||SA[t];return(0,p.jsx)(i,{elements:r,element:r[0],store:e},t)}})});h("8NFma");let Sj=P(({store:e,elements:t})=>{let n=n=>{e.history.transaction(()=>{t.forEach(e=>{e.set(n)})})},r=n=>{e.history.transaction(()=>{t.forEach(e=>{let{middleLeft:t,middleRight:r}=ap(e),{x:i,y:o,rotation:a}=ag(t,r,n);e.set({x:i,y:o,rotation:a,height:n})})})};return(0,p.jsx)(gw,{content:(0,p.jsxs)("div",{style:{padding:"15px",paddingTop:"15px",width:"230px"},children:[(0,p.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",paddingBottom:"5px"},children:[(0,p.jsx)("div",{children:lT("toolbar.lineSize")}),(0,p.jsx)("div",{children:(0,p.jsx)(EN,{value:t[0].height,onValueChange:e=>{r(e)},style:{width:"50px"},min:1,max:100,buttonPosition:"none"})})]}),(0,p.jsx)(mg,{value:t[0].height,onChange:e=>{r(e)},min:1,max:100,labelRenderer:!1}),(0,p.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",paddingBottom:"5px",paddingTop:"15px"},children:[(0,p.jsx)(fA,{onClick:()=>{n({dash:[]})},active:0===t[0].dash.length,children:(0,p.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,p.jsx)("line",{x2:"24",y1:"50%",y2:"50%",stroke:"currentColor",strokeWidth:"2"})})}),(0,p.jsx)(fA,{onClick:()=>{n({dash:[4,1]})},active:4===t[0].dash[0],children:(0,p.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,p.jsx)("line",{x1:"-1",x2:"25",y1:"50%",y2:"50%",stroke:"currentColor",strokeDasharray:"12 2",strokeWidth:"2"})})}),(0,p.jsx)(fA,{onClick:()=>{n({dash:[2,1]})},active:2===t[0].dash[0],children:(0,p.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,p.jsx)("line",{x1:"1",x2:"23",y1:"50%",y2:"50%",stroke:"currentColor",strokeDasharray:"6 2",strokeWidth:"2"})})}),(0,p.jsx)(fA,{onClick:()=>{n({dash:[1,1]})},active:1===t[0].dash[0],children:(0,p.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,p.jsx)("line",{x1:"1",x2:"23",y1:"50%",y2:"50%",stroke:"currentColor",strokeDasharray:"2 2",strokeWidth:"2"})})})]})]}),position:lV.BOTTOM,children:(0,p.jsx)(fA,{icon:"settings",minimal:!0})})}),SR=P(({elements:e,store:t})=>(0,p.jsx)(Ek,{value:e[0].color,style:{marginRight:"5px"},gradientEnabled:!1,onChange:n=>t.history.transaction(()=>{e.forEach(e=>{e.set({color:n})})}),store:t})),SI=(0,p.jsx)("span",{"aria-hidden":"true",className:"bp5-icon",children:(0,p.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",children:(0,p.jsx)("path",{stroke:"currentColor",strokeWidth:"2",d:"M 1 8 L 16 8"})})}),SL=(0,p.jsx)("span",{"aria-hidden":"true",className:"bp5-icon",children:(0,p.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",children:[(0,p.jsx)("path",{stroke:"currentColor",strokeWidth:"2",d:"M 8 3 L 1 8 L 8 13",fill:"none",strokeLinejoin:"round",strokeLinecap:"round"}),(0,p.jsx)("path",{stroke:"currentColor",strokeWidth:"2",d:"M 1 8 L 15 8",strokeLinejoin:"round",strokeLinecap:"round"})]})}),SM=(0,p.jsx)("span",{"aria-hidden":"true",className:"bp5-icon",children:(0,p.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",children:[(0,p.jsx)("path",{stroke:"currentColor",strokeWidth:"2",d:"M 8 3 L 1 8 L 8 13 Z",fill:"currentColor",strokeLinejoin:"round",strokeLinecap:"round"}),(0,p.jsx)("path",{stroke:"currentColor",strokeWidth:"2",d:"M 1 8 L 15 8",strokeLinejoin:"round",strokeLinecap:"round"})]})}),SD={"":SI,arrow:SL,triangle:SM,bar:(0,p.jsx)("span",{"aria-hidden":"true",className:"bp5-icon",children:(0,p.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",children:[(0,p.jsx)("path",{stroke:"currentColor",strokeWidth:"2",d:"M 1 3 L 1 13",strokeLinejoin:"round",strokeLinecap:"round"}),(0,p.jsx)("path",{stroke:"currentColor",strokeWidth:"2",d:"M 1 8 L 15 8",strokeLinejoin:"round",strokeLinecap:"round"})]})}),square:(0,p.jsx)("span",{"aria-hidden":"true",className:"bp5-icon",children:(0,p.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",children:[(0,p.jsx)("path",{stroke:"currentColor",strokeWidth:"2",d:"M 1 4 L 9 4 L 9 12 L 1 12 Z",fill:"currentColor",strokeLinejoin:"round",strokeLinecap:"round"}),(0,p.jsx)("path",{stroke:"currentColor",strokeWidth:"2",d:"M 1 8 L 15 8",strokeLinejoin:"round",strokeLinecap:"round"})]})}),circle:(0,p.jsx)("span",{"aria-hidden":"true",className:"bp5-icon",children:(0,p.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",children:[(0,p.jsx)("circle",{cx:"4",cy:"8",r:"4",fill:"currentColor"}),(0,p.jsx)("path",{stroke:"currentColor",strokeWidth:"2",d:"M 1 8 L 15 8",strokeLinejoin:"round",strokeLinecap:"round"})]})})},SF=({type:e,active:t,onClick:n,flipped:r})=>{let i=SD[e];return(0,p.jsx)(fA,{icon:r?(0,p.jsx)("span",{style:{transform:"scaleX(-1)"},children:i}):i,minimal:!0,onClick:n,active:t})},Sz=P(({elements:e,store:t,property:n})=>{let r="endHead"===n,i=SD[e[0][n]],o=r?(0,p.jsx)("span",{style:{transform:"scaleX(-1)"},children:i}):i,a=r=>{t.history.transaction(()=>{e.forEach(e=>{e.set({[n]:r})})})};return(0,p.jsx)(p.Fragment,{children:(0,p.jsx)(gw,{content:(0,p.jsxs)("div",{style:{width:"150px",padding:"10px"},children:[(0,p.jsx)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:["","arrow","triangle"].map(t=>(0,p.jsx)(SF,{type:t,active:e[0][n]===t,onClick:()=>{a(t)},flipped:r},t))}),(0,p.jsx)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:["bar","square","circle"].map(t=>(0,p.jsx)(SF,{type:t,active:e[0][n]===t,onClick:()=>{a(t)},flipped:r},t))})]}),position:lV.BOTTOM,children:(0,p.jsx)(fA,{icon:o,minimal:!0})})})}),SB={LineSettings:Sj,LineColor:SR,LineHeads:P(({elements:e,store:t})=>(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(Sz,{elements:e,store:t,property:"startHead"}),(0,p.jsx)(Sz,{elements:e,store:t,property:"endHead"})]})),LineAnimations:E8},SU=P(({store:e,components:t})=>{let n=e.selectedElements[0],r=gM({type:"line",usedItems:["LineColor","LineSettings","LineHeads",ix.animationsEnabled&&"LineAnimations"].filter(e=>!!e),components:t});return(0,p.jsx)(gD,{items:r,itemRender:r=>{let i=t[r]||SB[r];return(0,p.jsx)(i,{element:n,store:e,elements:e.selectedElements},r)}})});var v=h("8NFma");async function SH(e){let t=document.createElement("video");t.crossOrigin="anonymous",t.src=e,await t.play(),t.pause();let{videoWidth:n,videoHeight:r}=t;return{width:n,height:r}}async function SV(e){let t=document.createElement("video");t.crossOrigin="anonymous",t.src=e,await t.play(),t.pause();let{duration:n}=t;return n}async function Sq(e,t=5){return new Promise((n,r)=>{var i=document.createElement("video"),o=document.createElement("canvas");o.width=480,o.height=360;var a=o.getContext("2d");i.crossOrigin="anonymous",i.src=e,i.addEventListener("error",e=>{r(e)}),i.addEventListener("loadeddata",function(){let e=i.videoWidth/i.videoHeight;o.width=480,o.height=480/e,i.currentTime=t}),i.addEventListener("seeked",function(){a.drawImage(i,0,0,o.width,o.height);try{var e=o.toDataURL();n(e)}catch(e){r(e)}})})}async function SG(e,t,n){return new Promise((r,i)=>{let o=t.getContext("2d"),a=()=>{try{o.drawImage(e,0,0,t.width,t.height);let n=t.toDataURL();r(n),e.removeEventListener("seeked",a)}catch(t){i(t),e.removeEventListener("seeked",a)}};e.addEventListener("seeked",a),e.currentTime=n})}let SW={VideoTrim:P(({store:e,components:t,element:n})=>{let r=l(v).useRef(null),[i,o]=l(v).useState([]);l(v).useEffect(()=>{o([])},[n.src]);let a=async()=>{if(!n.src||i.length)return;let{width:e,height:t}=await SH(n.src),{src:a}=n,l=r.current.offsetHeight,s=Math.ceil(r.current.offsetWidth/(e/t*l)),u=await SV(a),c=document.createElement("video");c.crossOrigin="anonymous",c.src=a;let d=document.createElement("canvas");d.width=480;try{await new Promise((e,t)=>{c.addEventListener("loadeddata",()=>{let t=c.videoWidth/c.videoHeight;d.height=480/t,e()}),c.addEventListener("error",t)}),o([]);for(let e=0;e<s;e++){let t=e*u/s,n=await SG(c,d,t);o(e=>e.concat(n))}}catch(e){console.error("Error generating previews:",e)}},s=(e,t)=>{e.preventDefault();let i=e=>{e.preventDefault();let{clientX:i}=e,{left:o,width:a}=r.current.getBoundingClientRect(),{src:l}=n,s=(i-o)/a;"start"===t?n.set({startTime:Math.min(n.endTime,Math.max(0,s))}):"end"===t&&n.set({endTime:Math.min(1,Math.max(n.startTime,s))})};window.addEventListener("mousemove",i),window.addEventListener("mouseup",()=>{window.removeEventListener("mousemove",i)})};return(0,p.jsx)(gw,{position:"bottom",onOpened:a,content:(0,p.jsx)(gA,{style:{boxShadow:"none",backgroundColor:"transparent",width:"calc(100vw - 300px)"},children:(0,p.jsxs)(gP,{children:[(0,p.jsx)(mi,{style:{width:"80px"},value:parseFloat((n.duration*(n.endTime-n.startTime)/1e3).toFixed(2)),minorStepSize:.01,stepSize:.1,buttonPosition:"none",readOnly:!0}),(0,p.jsxs)("div",{style:{width:"calc(100vw - 420px)",height:"30px",display:"flex",position:"relative",overflow:"hidden",marginLeft:"10px"},ref:r,children:[i.map((e,t)=>(0,p.jsx)("img",{src:e,style:{width:"auto",height:"100%",objectFit:"cover"}},t)),(0,p.jsx)("div",{style:{position:"absolute",top:"0",left:0,width:100*n.startTime+"%",height:"30px",backgroundColor:"rgb(0, 0, 0, 0.5)"}}),(0,p.jsx)("div",{style:{position:"absolute",top:"0",right:"0%",width:100-100*n.endTime+"%",height:"30px",backgroundColor:"rgb(0, 0, 0, 0.5)"}}),(0,p.jsx)("div",{style:{position:"absolute",top:"0",left:100*n.startTime+"%",width:"10px",height:"30px",borderRadius:"0px",backgroundColor:"rgb(0, 161, 255, 0.9)",cursor:"ew-resize"},onMouseDown:e=>{s(e,"start")}}),(0,p.jsx)("div",{style:{position:"absolute",top:"0",right:100-100*n.endTime+"%",width:"10px",height:"30px",borderRadius:"0px",backgroundColor:"rgb(0, 161, 255, 0.9)",cursor:"ew-resize"},onMouseDown:e=>{s(e,"end")}})]})]})}),children:(0,p.jsx)(fA,{icon:"cut",minimal:!0,children:"Trim"})})}),VideoAnimations:E8},S$=P(({store:e,components:t})=>{let n=e.selectedElements,r=gM({type:"video",usedItems:["VideoTrim",ix.animationsEnabled&&"VideoAnimations"].filter(e=>!!e),components:t});return(0,p.jsx)(gD,{items:r,itemRender:r=>{let i=t[r]||SW[r];return(0,p.jsx)(i,{elements:n,element:n[0],store:e},r)}})});h("8NFma");var SK={};SK=function(e){return xD({tag:"svg",attr:{viewBox:"0 0 20 20",fill:"currentColor"},child:[{tag:"path",attr:{d:"M0 0h20v5H0V0zm0 7h20v4H0V7zm0 6h20v3H0v-3zm0 5h20v2H0v-2z"}}]})(e)};let SY=P(({elements:e,store:t})=>(0,p.jsx)(Ek,{value:e[0].fill,style:{marginRight:"5px"},gradientEnabled:!1,onChange:n=>t.history.transaction(()=>{e.forEach(e=>{e.set({fill:n})})}),store:t})),SX=P(({store:e,elements:t,element:n})=>{let r=n=>{e.history.transaction(()=>{t.forEach(e=>{e.set(n)})})};return(0,p.jsx)(gw,{content:(0,p.jsxs)("div",{style:{padding:"15px",paddingTop:"15px",width:"230px"},children:[(0,p.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",paddingBottom:"15px"},children:[(0,p.jsx)(fA,{onClick:()=>{r({dash:[]})},active:0===t[0].dash.length,children:(0,p.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,p.jsx)("line",{x2:"24",y1:"50%",y2:"50%",stroke:"currentColor",strokeWidth:"2"})})}),(0,p.jsx)(fA,{onClick:()=>{r({dash:[4,1]})},active:4===t[0].dash[0],children:(0,p.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,p.jsx)("line",{x1:"-1",x2:"25",y1:"50%",y2:"50%",stroke:"currentColor",strokeDasharray:"12 2",strokeWidth:"2"})})}),(0,p.jsx)(fA,{onClick:()=>{r({dash:[2,1]})},active:2===t[0].dash[0],children:(0,p.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,p.jsx)("line",{x1:"1",x2:"23",y1:"50%",y2:"50%",stroke:"currentColor",strokeDasharray:"6 2",strokeWidth:"2"})})}),(0,p.jsx)(fA,{onClick:()=>{r({dash:[1,1]})},active:1===t[0].dash[0],children:(0,p.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,p.jsx)("line",{x1:"1",x2:"23",y1:"50%",y2:"50%",stroke:"currentColor",strokeDasharray:"2 2",strokeWidth:"2"})})})]}),(0,p.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",paddingBottom:"5px"},children:[(0,p.jsx)("div",{children:lT("toolbar.strokeWidth")}),(0,p.jsx)("div",{children:(0,p.jsx)(EN,{value:t[0].strokeWidth,onValueChange:e=>{r({strokeWidth:e})},style:{width:"50px"},min:0,max:Math.round(Math.min(n.width,n.height)/2),buttonPosition:"none"})})]}),(0,p.jsx)(mg,{value:t[0].strokeWidth,onChange:e=>{r({strokeWidth:e})},min:0,max:Math.round(Math.min(n.width,n.height)/2),labelRenderer:!1}),"rect"===n.subType&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",paddingTop:"15px",paddingBottom:"5px"},children:[(0,p.jsx)("div",{children:lT("toolbar.cornerRadius")}),(0,p.jsx)("div",{children:(0,p.jsx)(EN,{value:t[0].cornerRadius,onValueChange:e=>{r({cornerRadius:e})},style:{width:"50px"},min:0,max:Math.round(Math.max(n.width,n.height)/2),buttonPosition:"none"})})]}),(0,p.jsx)(mg,{value:t[0].cornerRadius,onChange:e=>{r({cornerRadius:e})},min:0,max:Math.round(Math.max(n.width,n.height)/2),labelRenderer:!1})]})]}),position:lV.BOTTOM,children:(0,p.jsx)(fA,{icon:(0,p.jsx)(l(SK),{}),minimal:!0})})}),SZ={FigureFill:SY,FigureStroke:P(({elements:e,store:t})=>e.find(e=>e.strokeWidth)?(0,p.jsx)(Ek,{value:e[0].stroke,style:{marginRight:"5px"},gradientEnabled:!1,onChange:n=>t.history.transaction(()=>{e.forEach(e=>{e.set({stroke:n})})}),store:t}):null),FigureSettings:SX,FigureAnimations:E8},SQ=P(({store:e,components:t})=>{let n=e.selectedElements[0],r=gM({type:"line",usedItems:["FigureFill","FigureStroke","FigureSettings",ix.animationsEnabled&&"FigureAnimations"].filter(e=>!!e),components:t});return(0,p.jsx)(gD,{items:r,itemRender:r=>{let i=t[r]||SZ[r];return(0,p.jsx)(i,{element:n,store:e,elements:e.selectedElements},r)}})});h("8NFma");let SJ={ManyAnimations:E8},S0=P(({store:e,components:t})=>{let n=e.selectedElements,r=gM({type:"many",usedItems:[ix.animationsEnabled&&"ManyAnimations"],components:t});return(0,p.jsx)(gD,{items:r,itemRender:r=>{let i=t[r]||SJ[r];return(0,p.jsx)(i,{elements:n,element:n[0],store:e},r)}})});var v=h("8NFma");let S1=({value:e,onValueChange:t,...n})=>{let[r,i]=l(v).useState(e.toString());return l(v).useEffect(()=>{i(e.toString())},[e]),(0,p.jsx)(mi,{value:r,onValueChange:(e,n)=>{i(n),Number.isNaN(e)||t(e)},...n})},S2={PageDuration:P(({store:e})=>{if(!e.activePage)return null;let{duration:t}=e.activePage;return(0,p.jsx)(gw,{position:"bottom",content:(0,p.jsxs)("div",{style:{padding:"15px",paddingTop:"15px",width:"230px"},children:[(0,p.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",paddingTop:"5px",paddingBottom:"5px"},children:[(0,p.jsx)("div",{children:lT("toolbar.duration")}),(0,p.jsx)("div",{children:(0,p.jsx)(S1,{value:t/1e3,onValueChange:t=>{e.activePage.set({duration:1e3*t})},style:{width:"50px"},min:0,buttonPosition:"none"})})]}),(0,p.jsx)(mg,{value:Math.min(t/1e3,50),onChange:t=>{e.activePage.set({duration:1e3*t})},min:0,max:50,showTrackFill:!1,labelRenderer:!1})]}),children:(0,p.jsxs)(fA,{icon:"time",minimal:!0,children:[(e.activePage.duration/1e3).toFixed(1),"s"]})})})},S3=P(({store:e,components:t})=>{let n=gM({type:"page",usedItems:[ix.animationsEnabled&&"PageDuration"].filter(e=>!!e),components:t});return(0,p.jsx)(gD,{items:n,itemRender:n=>{let r=t[n]||S2[n];return(0,p.jsx)(r,{store:e},n)}})});var v=h("8NFma");let S5=({store:e})=>{let[t,n]=l(v).useState(!1);return(0,p.jsx)(gw,{content:(0,p.jsxs)(gB,{children:[(0,p.jsx)(gW,{icon:"media",text:lT("toolbar.saveAsImage"),onClick:async()=>{e.pages.forEach(t=>{e.saveAsImage({pageId:t.id})})}}),(0,p.jsx)(gW,{icon:"document",text:lT("toolbar.saveAsPDF"),onClick:async()=>{n(!0),await e.saveAsPDF(),n(!1)}})]}),position:lV.BOTTOM,children:(0,p.jsx)(fA,{icon:"import",text:lT("toolbar.download"),minimal:!0,loading:t})})};h("8NFma");let S6=P(({store:e})=>{let t=e.selectedShapes.length>0,n=e.selectedShapes[0],r=n?.locked,i=r?"lock":"unlock",o=r?lT("toolbar.lockedDescription"):lT("toolbar.unlockedDescription");return(0,p.jsx)(gC,{content:o,disabled:!t,position:"bottom",children:(0,p.jsx)(fA,{minimal:!0,disabled:!t,icon:i,onClick:()=>{e.selectedShapes.forEach(e=>e.set({draggable:r,contentEditable:r,styleEditable:r,resizable:r}))}})})});h("8NFma");var S4={};S4=function(e){return xD({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M17.66 8L12 2.35 6.34 8C4.78 9.56 4 11.64 4 13.64s.78 4.11 2.34 5.67 3.61 2.35 5.66 2.35 4.1-.79 5.66-2.35S20 15.64 20 13.64 19.22 9.56 17.66 8zM6 14c.01-2 .62-3.27 1.76-4.4L12 5.27l4.24 4.38C17.38 10.77 17.99 12 18 14H6z"}}]})(e)};let S8=P(({store:e})=>{let t=e.selectedShapes.length>0,n=t=>{t=Math.max(0,Math.min(t,100)),e.selectedShapes.forEach(e=>{e.set({opacity:t/100})})},r=Math.round(e.selectedShapes[0]?.opacity*100);return(0,p.jsx)(gw,{disabled:!t,minimal:!1,content:(0,p.jsxs)("div",{style:{padding:"10px 20px"},children:[(0,p.jsx)("div",{style:{textAlign:"center"},children:lT("toolbar.transparency")}),(0,p.jsxs)("div",{style:{display:"flex"},children:[(0,p.jsx)("div",{style:{paddingTop:"8px",paddingRight:"20px"},children:(0,p.jsx)(mg,{value:r,labelRenderer:!1,onChange:n,min:0,max:100})}),(0,p.jsx)(mi,{value:r,onValueChange:n,min:0,max:100,buttonPosition:"none",style:{width:"50px"},selectAllOnFocus:!0})]})]}),position:lV.BOTTOM,children:(0,p.jsx)(gC,{content:lT("toolbar.transparency"),disabled:!t,position:lV.BOTTOM,children:(0,p.jsx)(fA,{minimal:!0,disabled:!t,children:(0,p.jsx)(l(S4),{className:"bp5-icon",style:{fontSize:"20px"}})})})})});h("8NFma");let S9=P(({store:e})=>{let t=e.selectedElements.length>0,n=e.selectedElements[0]||{},r=t=>{e.selectedElements.forEach(e=>{e.set(t)})};return(0,p.jsx)(gw,{disabled:!t,minimal:!1,content:(0,p.jsxs)("div",{style:{padding:"15px",paddingTop:"25px",width:"220px"},children:[(0,p.jsx)(ET,{checked:n.selectable,label:lT("toolbar.selectable"),onChange:e=>{r({selectable:e.target.checked})},alignIndicator:lB.RIGHT}),(0,p.jsx)(ET,{checked:n.draggable,label:lT("toolbar.draggable"),onChange:e=>{r({draggable:e.target.checked})},alignIndicator:lB.RIGHT}),(0,p.jsx)(ET,{checked:n.removable,label:lT("toolbar.removable"),onChange:e=>{r({removable:e.target.checked})},alignIndicator:lB.RIGHT}),(0,p.jsx)(ET,{checked:n.resizable,label:lT("toolbar.resizable"),onChange:e=>{r({resizable:e.target.checked})},alignIndicator:lB.RIGHT}),(0,p.jsx)(ET,{checked:n.contentEditable,label:lT("toolbar.contentEditable"),onChange:e=>{r({contentEditable:e.target.checked})},alignIndicator:lB.RIGHT}),(0,p.jsx)(ET,{checked:n.styleEditable,label:lT("toolbar.styleEditable"),onChange:e=>{r({styleEditable:e.target.checked})},alignIndicator:lB.RIGHT}),(0,p.jsx)(ET,{checked:n.alwaysOnTop,label:lT("toolbar.alwaysOnTop"),onChange:e=>{r({alwaysOnTop:e.target.checked})},alignIndicator:lB.RIGHT,style:{marginTop:"20px"}}),(0,p.jsx)(ET,{checked:n.showInExport,label:lT("toolbar.showInExport"),onChange:e=>{r({showInExport:e.target.checked})},alignIndicator:lB.RIGHT,style:{marginTop:"20px"}})]}),position:lV.BOTTOM,children:(0,p.jsx)(fA,{icon:"cog",minimal:!0,disabled:!t})})});h("8NFma");let S7=P(({store:e})=>{let t=e.selectedElements.length>1,n=1===e.selectedElements.length&&"group"===e.selectedElements[0].type;return(0,p.jsxs)(p.Fragment,{children:[t&&(0,p.jsx)(fA,{minimal:!0,onClick:()=>{e.groupElements(e.selectedElements.map(e=>e.id))},style:{marginLeft:"auto"},children:lT("toolbar.groupElements")}),n&&(0,p.jsx)(fA,{minimal:!0,onClick:()=>{e.ungroupElements([e.selectedElements[0].id])},style:{marginLeft:"auto"},children:lT("toolbar.ungroupElements")})]})}),Ce={text:Sh,image:Sk,svg:SN,many:S0,line:SU,video:S$,figure:SQ,page:S3},Ct=at("div")`
|
|
148
|
+
`,Sr=({fontFamily:e,handleClick:t,modifiers:n,store:r,isCustom:i})=>{let[o,a]=l(v).useState(!i);if(l(v).useEffect(()=>{o||r.loadFont(e)},[e,o]),"_divider"===e)return(0,p.jsx)("div",{style:{paddingTop:"10px"},children:(0,p.jsx)(gV,{})});let s=o?(0,p.jsx)(Sn,{src:aK(e),alt:e,onError:()=>{a(!1)}}):e;return(0,p.jsx)(gW,{text:s,active:n.active,disabled:n.disabled,onClick:t,style:{fontFamily:'"'+e+'"'}})},Si=({onChange:e,defaultValue:t})=>{let n=l(v).useRef(null);return l(v).useEffect(()=>{n.current&&n.current.focus()},[]),(0,p.jsx)(g5,{leftIcon:"search",inputRef:n,defaultValue:t,onChange:t=>e(t.target.value)})},So=({store:e,fonts:t,activeFont:n,activeFontLabel:r,onFontSelect:i})=>{let[o,a]=l(v).useState(""),s=t.filter(e=>e.toLowerCase().indexOf(o.toLowerCase())>=0);return(0,p.jsx)(gw,{content:(0,p.jsxs)("div",{children:[(0,p.jsx)(Si,{onChange:e=>a(e),defaultValue:o}),(0,p.jsx)("div",{style:{paddingTop:"5px"},children:(0,p.jsx)(mT,{innerElementType:l(v).forwardRef((e,t)=>(0,p.jsx)(gB,{ref:t,...e})),height:Math.min(400,30*s.length)+10,width:210,itemCount:s.length,itemSize:30,children:({index:t,style:r})=>{let o=s[t];return(0,p.jsx)("div",{style:r,children:(0,p.jsx)(Sr,{fontFamily:o,modifiers:{active:n===o},handleClick:()=>i(o),store:e,isCustom:e.fonts.find(e=>e.fontFamily===o)||ib.find(e=>e.fontFamily===o)},o)})}})})]}),children:(0,p.jsx)(fA,{text:r,rightIcon:"caret-down",minimal:!0,style:{marginRight:"5px",fontFamily:'"'+n+'"',overflow:"hidden",whiteSpace:"nowrap",maxHeight:"30px"}})})},Sa=P(({elements:e,store:t})=>{let{data:n,mutate:r}=vg(a$(),vb,{isPaused:()=>iy(),fallbackData:[]});l(v).useEffect(()=>{r()},[iy()]);let i=t.fonts.concat(ib).map(e=>e.fontFamily).concat(n?.length&&!iy()?n:im),o=e[0].fontFamily;o.length>15&&(o=o.slice(0,15)+"...");let a=[];t.find(e=>("text"===e.type&&a.push(e.fontFamily),!1));let s=[...new Set(a.concat("_divider").concat(i))];return(0,p.jsx)(So,{fonts:s,activeFont:e[0].fontFamily,activeFontLabel:o,store:t,onFontSelect:n=>{t.history.transaction(()=>{e.forEach(e=>{e.set({fontFamily:n})})})}})}),Sl=P(({elements:e,store:t})=>(0,p.jsx)(mi,{onValueChange:n=>{t.history.transaction(()=>{e.forEach(e=>{e.set({fontSize:n,width:Math.max(n,e.width)})})})},value:Math.round(e[0].fontSize),style:{width:"50px"},min:5,max:4*t.height})),Ss=["left","center","right","justify"],Su=["top","middle","bottom"],Sc={top:(0,p.jsx)("span",{className:"bp5-icon",children:(0,p.jsx)(l(E7),{})}),middle:(0,p.jsx)("span",{className:"bp5-icon",children:(0,p.jsx)(l(Se),{})}),bottom:(0,p.jsx)("span",{className:"bp5-icon",children:(0,p.jsx)(l(St),{})})},Sd={TextFontFamily:Sa,TextFontSize:Sl,TextFontVariant:P(({elements:e,store:t})=>{let n=e[0];return(0,p.jsxs)(g1,{children:[(0,p.jsx)(fA,{minimal:!0,icon:"align-"+n.align,onClick:()=>{let r=(Ss.indexOf(n.align)+1+Ss.length)%Ss.length,i=Ss[r];t.history.transaction(()=>{e.forEach(e=>{e.set({align:i})})})}}),ik.textVerticalResizeEnabled&&(0,p.jsx)(fA,{minimal:!0,icon:Sc[n.verticalAlign],onClick:()=>{let r=(Su.indexOf(n.verticalAlign)+1+Su.length)%Su.length,i=Su[r];t.history.transaction(()=>{e.forEach(e=>{e.set({verticalAlign:i})})})}}),(0,p.jsx)(fA,{minimal:!0,icon:"bold",active:"bold"===n.fontWeight||"700"===n.fontWeight,onClick:()=>{let r="bold"===n.fontWeight||"700"===n.fontWeight;t.history.transaction(()=>{e.forEach(e=>{r?e.set({fontWeight:"normal"}):e.set({fontWeight:"bold"})})})}}),(0,p.jsx)(fA,{minimal:!0,icon:"italic",active:"italic"===n.fontStyle,onClick:()=>{let r="italic"===n.fontStyle;t.history.transaction(()=>{e.forEach(e=>{r?e.set({fontStyle:"normal"}):e.set({fontStyle:"italic"})})})}}),(0,p.jsx)(fA,{minimal:!0,icon:"underline",active:n.textDecoration.indexOf("underline")>=0,onClick:()=>{let r=n.textDecoration.split(" ");r.indexOf("underline")>=0?r=r.filter(e=>"underline"!==e):r.push("underline"),t.history.transaction(()=>{e.forEach(e=>{e.set({textDecoration:r.join(" ")})})})}}),(0,p.jsx)(fA,{minimal:!0,icon:"strikethrough",active:n.textDecoration.indexOf("line-through")>=0,onClick:()=>{let r=n.textDecoration.split(" ");r.indexOf("line-through")>=0?r=r.filter(e=>"line-through"!==e):r.push("line-through"),t.history.transaction(()=>{e.forEach(e=>{e.set({textDecoration:r.join(" ")})})})}})]})}),TextFill:P(({elements:e,store:t})=>(0,p.jsx)(Ek,{value:e[0].fill,style:{marginRight:"5px"},gradientEnabled:!0,onChange:n=>t.history.transaction(()=>{e.forEach(e=>{e.set({fill:n})})}),store:t})),TextSpacing:P(({elements:e,store:t})=>{let n=e[0];return(0,p.jsx)(gw,{content:(0,p.jsxs)("div",{style:{padding:"15px 25px",width:"200px"},children:[(0,p.jsx)("p",{children:lT("toolbar.lineHeight")}),(0,p.jsx)(mg,{value:"number"==typeof n.lineHeight?100*n.lineHeight:120,labelStepSize:50,onChange:n=>{t.history.transaction(()=>{e.forEach(e=>{e.set({lineHeight:n/100})})})},min:50,max:250,stepSize:10,showTrackFill:!0}),(0,p.jsx)("p",{children:lT("toolbar.letterSpacing")}),(0,p.jsx)(mg,{value:100*n.letterSpacing,labelStepSize:50,onChange:n=>{t.history.transaction(()=>{e.forEach(e=>{e.set({letterSpacing:n/100})})})},min:-50,max:250,stepSize:10,showTrackFill:!1})]}),position:lV.BOTTOM,children:(0,p.jsx)(fA,{icon:(0,p.jsx)(l(E9),{className:"bp5-icon",style:{fontSize:"20px"}}),minimal:!0})})}),TextFilters:Ej,TextAnimations:E8},Sh=P(({store:e,components:t})=>{let n=e.selectedElements,r=gM({type:"text",usedItems:["TextFill","TextFontFamily","TextFontSize","TextFontVariant","TextSpacing","TextFilters",ik.animationsEnabled&&"TextAnimations"],components:t});return(0,p.jsx)(gD,{items:r,itemRender:r=>{let i=t[r]||Sd[r];return(0,p.jsx)(i,{elements:n,element:n[0],store:e},r)}})});h("8NFma");var Sf={};Sf=function(e){return xD({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M10 10v5h2V4h2v11h2V4h2V2h-8C7.79 2 6 3.79 6 6s1.79 4 4 4zm-2 7v-3l-4 4 4 4v-3h12v-2H8z"}}]})(e)};var Sp={};Sp=function(e){return xD({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M9 10v5h2V4h2v11h2V4h2V2H9C6.79 2 5 3.79 5 6s1.79 4 4 4zm12 8l-4-4v3H5v2h12v3l4-4z"}}]})(e)};let Sg=P(({element:e})=>(0,p.jsx)(mi,{onValueChange:t=>{e.set({fontSize:t})},value:Math.round(e.fontSize),style:{width:"50px"},min:5})),Sm=["left","center","right","justify"],Sv=["top","middle","bottom"],Sy={top:(0,p.jsx)("span",{className:"bp5-icon",children:(0,p.jsx)(l(E7),{})}),middle:(0,p.jsx)("span",{className:"bp5-icon",children:(0,p.jsx)(l(Se),{})}),bottom:(0,p.jsx)("span",{className:"bp5-icon",children:(0,p.jsx)(l(St),{})})},Sb=P(({element:e,store:t})=>(0,p.jsxs)(g1,{children:[(0,p.jsx)(fA,{minimal:!0,icon:"align-"+e.align,onClick:()=>{let t=(Sm.indexOf(e.align)+1+Sm.length)%Sm.length,n=Sm[t];e.set({align:n})}}),ik.textVerticalResizeEnabled&&(0,p.jsx)(fA,{minimal:!0,icon:Sy[e.verticalAlign],onClick:()=>{let n=(Sv.indexOf(e.verticalAlign)+1+Sv.length)%Sv.length,r=Sv[n];t.history.transaction(()=>{e.set({verticalAlign:r})})}}),(0,p.jsx)(fA,{minimal:!0,icon:"bold",active:an.currentFormat.bold||"bold"===e.fontWeight||"700"===e.fontWeight,onMouseDown:e=>{e.preventDefault()},onClick:t=>{let n=window.__polotnoQuill;if(n){let e=n.getSelection();n.formatText(e.index,e.length,"bold",!an.currentFormat.bold,"user");return}"bold"===e.fontWeight||"700"===e.fontWeight?e.set({fontWeight:"normal"}):e.set({fontWeight:"bold"})}}),(0,p.jsx)(fA,{minimal:!0,icon:"italic",onMouseDown:e=>{e.preventDefault()},active:an.currentFormat.italic||"italic"===e.fontStyle,onClick:()=>{let t=window.__polotnoQuill;if(t){let e=t.getSelection();t.formatText(e.index,e.length,"italic",!an.currentFormat.italic,"user");return}"italic"===e.fontStyle?e.set({fontStyle:"normal"}):e.set({fontStyle:"italic"})}}),(0,p.jsx)(fA,{minimal:!0,icon:"underline",active:an.currentFormat.underline||e.textDecoration.indexOf("underline")>=0,onMouseDown:e=>{e.preventDefault()},onClick:()=>{let t=window.__polotnoQuill;if(t){let e=t.getSelection();t.formatText(e.index,e.length,"underline",!an.currentFormat.underline,"user");return}let n=e.textDecoration.split(" ");n.indexOf("underline")>=0?n=n.filter(e=>"underline"!==e):n.push("underline"),e.set({textDecoration:n.join(" ")})}}),(0,p.jsx)(fA,{minimal:!0,icon:"strikethrough",active:an.currentFormat.strike||e.textDecoration.indexOf("line-through")>=0,onMouseDown:e=>{e.preventDefault()},onClick:()=>{let t=window.__polotnoQuill;if(t){let e=t.getSelection();t.formatText(e.index,e.length,"strike",!an.currentFormat.strike,"user");return}let n=e.textDecoration.split(" ");n.indexOf("line-through")>=0?n=n.filter(e=>"line-through"!==e):n.push("line-through"),e.set({textDecoration:n.join(" ")})}})]})),Sw={TextFontFamily:Sa,TextFontSize:Sg,TextFontVariant:Sb,TextFilters:Ej,TextFill:P(({element:e,store:t})=>(0,p.jsx)(Ek,{value:an.currentFormat.color||e.fill,onChange:t=>{let n=window.__polotnoQuill,r=n?.getSelection(),i=r?.length>=n?.getLength()-1;if(n&&!i&&r?.length)n.formatText(r.index,r.length,"color",t,"user");else{var o=e.text.replace(/style=".*?"/g,"");e.set({fill:t,text:o})}},store:t})),TextSpacing:P(({element:e})=>(0,p.jsx)(gw,{content:(0,p.jsxs)("div",{style:{padding:"15px 25px",width:"200px"},children:[(0,p.jsx)("p",{children:"Line height"}),(0,p.jsx)(mg,{value:"number"==typeof e.lineHeight?100*e.lineHeight:120,labelStepSize:50,onChange:t=>{e.set({lineHeight:t/100})},min:50,max:250,stepSize:10,showTrackFill:!0}),(0,p.jsx)("p",{children:"Letter spacing"}),(0,p.jsx)(mg,{value:100*e.letterSpacing,labelStepSize:50,onChange:t=>{e.set({letterSpacing:t/100})},min:-50,max:250,stepSize:10,showTrackFill:!1})]}),position:lV.BOTTOM,children:(0,p.jsx)(fA,{icon:(0,p.jsx)(l(E9),{className:"bp5-icon",style:{fontSize:"20px"}}),minimal:!0})})),TextDirection:P(({element:e})=>{let t="rtl"===e.dir?l(Sf):l(Sp);return(0,p.jsx)(fA,{icon:(0,p.jsx)(t,{className:"bp5-icon",style:{fontSize:"20px"}}),minimal:!0,onClick:()=>{e.set({dir:"rtl"===e.dir?"ltr":"rtl"})}})}),TextAnimations:E8},Sx=P(({store:e,components:t})=>{let n=e.selectedElements,r=e.selectedElements[0],i=gM({type:"text",usedItems:["TextFill","TextFontFamily","TextFontSize","TextFontVariant","TextSpacing","TextFilters",ik.animationsEnabled&&"TextAnimations"],components:t});return(0,p.jsx)(gD,{items:i,itemRender:i=>{let o=t[i]||Sw[i];return(0,p.jsx)(o,{element:r,elements:n,store:e},i)}})});var v=h("8NFma");h("8NFma");var S_=({element:e})=>(0,p.jsx)(gw,{content:(0,p.jsxs)(gB,{children:[(0,p.jsx)(gW,{shouldDismissPopover:!1,icon:"arrows-horizontal",text:lT("toolbar.flipHorizontally"),onClick:()=>{e.set({flipX:!e.flipX})}}),(0,p.jsx)(gW,{shouldDismissPopover:!1,text:lT("toolbar.flipVertically"),icon:"arrows-vertical",onClick:()=>{e.set({flipY:!e.flipY})}})]}),position:lV.BOTTOM,children:(0,p.jsx)(fA,{text:lT("toolbar.flip"),minimal:!0})}),v=h("8NFma"),lD=h("gztBd"),v=h("8NFma"),fb=h("leH9B"),SE=function(e){function t(t){var n=e.call(this,t)||this,r=h5("bp-dialog");return n.titleId="title-".concat(r),n}return(0,lD.__extends)(t,e),t.prototype.render=function(){return v.createElement(gc,(0,lD.__assign)({},this.props,{className:lz.OVERLAY_SCROLL_CONTAINER,hasBackdrop:!0}),v.createElement("div",{className:lz.DIALOG_CONTAINER,ref:this.props.containerRef},v.createElement("div",{className:l(lF)(lz.DIALOG,this.props.className),role:"dialog","aria-labelledby":this.props["aria-labelledby"]||(this.props.title?this.titleId:void 0),"aria-describedby":this.props["aria-describedby"],style:this.props.style},this.maybeRenderHeader(),this.props.children)))},t.prototype.validateProps=function(e){null==e.title&&(null!=e.icon&&console.warn(hX),null!=e.isCloseButtonShown&&console.warn(hZ))},t.prototype.maybeRenderCloseButton=function(){return!1!==this.props.isCloseButtonShown?v.createElement(fA,{"aria-label":"Close",className:lz.DIALOG_CLOSE_BUTTON,icon:v.createElement(v_,{size:fb.IconSize.STANDARD}),minimal:!0,onClick:this.props.onClose}):void 0},t.prototype.maybeRenderHeader=function(){var e=this.props,t=e.icon,n=e.title;if(null!=n)return v.createElement("div",{className:lz.DIALOG_HEADER},v.createElement(fC,{icon:t,size:fb.IconSize.STANDARD,"aria-hidden":!0,tabIndex:-1}),v.createElement(gH,{id:this.titleId},n),this.maybeRenderCloseButton())},t.defaultProps={canOutsideClickClose:!0,isOpen:!1},t.displayName="".concat(fl,".Dialog"),t}(fO);let SS=async e=>{let t=await fetch(aY(),{method:"POST",body:JSON.stringify({url:e})});return 200!==t.status?(alert(lT("error.removeBackground")),e):(await t.json()).url},SC=P(({isOpen:e,onClose:t,element:n})=>{let[r,i]=l(v).useState(n.src);l(v).useEffect(()=>{i(n.src)},[n.src]);let[o,a]=l(v).useState(!1),s=async()=>{a(!0);try{i(await SS(n.src))}catch(e){console.error(e)}a(!1)},u=r!==n.src;return(0,p.jsxs)(SE,{onClose:t,title:lT("toolbar.removeBackgroundTitle"),isOpen:e,style:{width:"80%",maxWidth:"700px"},children:[(0,p.jsx)("div",{className:lz.DIALOG_BODY,children:(0,p.jsx)("img",{src:r,style:{width:"100%",maxHeight:"400px",objectFit:"contain"}})}),(0,p.jsxs)("div",{className:lz.DIALOG_FOOTER,style:{position:"relative"},children:[(0,p.jsxs)("div",{style:{position:"absolute",top:"5px"},children:["Powered by"," ",(0,p.jsx)("a",{href:"https://hotpot.ai/",target:"_blank",children:"hotpot.ai"})]}),(0,p.jsxs)("div",{className:lz.DIALOG_FOOTER_ACTIONS,children:[!u&&(0,p.jsx)(fA,{onClick:s,loading:o,children:lT("toolbar.removeBackground")}),u&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(fA,{onClick:()=>{i(n.src),t()},loading:o,children:lT("toolbar.cancelRemoveBackground")}),(0,p.jsx)(fA,{onClick:()=>{n.set({src:r}),t()},loading:o,intent:"primary",children:lT("toolbar.confirmRemoveBackground")})]})]})]})]})}),SO={ImageFlip:S_,ImageFilters:Ej,ImageFitToBackground:({element:e})=>(0,p.jsx)(fA,{text:lT("toolbar.fitToBackground"),minimal:!0,onClick:()=>{let{page:t}=e;e.set({x:-t.bleed,y:-t.bleed,width:t.computedWidth+2*t.bleed,height:t.computedHeight+2*t.bleed,rotation:0,cropX:0,cropY:0,cropWidth:1,cropHeight:1})}}),ImageCrop:({element:e,store:t})=>e.contentEditable?(0,p.jsx)(fA,{text:lT("toolbar.crop"),minimal:!0,onClickCapture:t=>{t.stopPropagation(),e.toggleCropMode(!0)}}):null,ImageRemoveClip:P(({element:e,store:t})=>e.clipSrc?(0,p.jsx)(fA,{text:lT("toolbar.removeClip"),minimal:!0,onClickCapture:t=>{e.set({clipSrc:""})}}):null),ImageRemoveBackground:({element:e})=>{let[t,n]=l(v).useState(!1);return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(fA,{text:lT("toolbar.removeBackground"),minimal:!0,onClick:e=>{n(!0)}}),(0,p.jsx)(SC,{isOpen:t,onClose:()=>{n(!1)},element:e})]})},ImageAnimations:E8},Sk=P(({store:e,components:t})=>{let n=e.selectedElements[0],r=n._cropModeEnabled,i=l(v).useRef({});l(v).useEffect(()=>{r&&(i.current={x:n.x,y:n.y,width:n.width,height:n.height,cropX:n.cropX,cropY:n.cropY,cropWidth:n.cropWidth,cropHeight:n.cropHeight})},[r]);let o=gM({type:"image",usedItems:["ImageFlip","ImageFilters","ImageFitToBackground","ImageCrop",ik.animationsEnabled&&"ImageAnimations","ImageRemoveClip",ik.removeBackgroundEnabled&&"ImageRemoveBackground"],components:t});return(0,p.jsxs)(p.Fragment,{children:[!r&&(0,p.jsx)(gD,{items:o,itemRender:r=>{let i=t[r]||SO[r];return(0,p.jsx)(i,{element:n,store:e},r)}}),r&&(0,p.jsxs)(gA.Group,{children:[(0,p.jsx)(fA,{text:lT("toolbar.cropDone"),minimal:!0,icon:"tick",onClickCapture:e=>{n.toggleCropMode(!1)}}),(0,p.jsx)(fA,{text:lT("toolbar.cropCancel"),minimal:!0,icon:"cross",onClickCapture:e=>{n.set({...i.current}),n.toggleCropMode(!1)}})]})]})});h("8NFma");let SP=(e,t)=>Array.from(e.keys()).find(e=>iQ(e,t)),ST=(e,t)=>{let n=SP(e,t);return e.get(n||"")||t},SA={SvgFlip:S_,SvgFilters:Ej,SvgColors:P(({element:e,elements:t,store:n})=>{let r=i0(e.src);return(0,p.jsx)(p.Fragment,{children:!e.maskSrc&&r.slice(0,5).map(t=>(0,p.jsx)(Ek,{value:ST(e.colorsReplace,t),style:{marginLeft:"5px"},onChange:n=>{let r=SP(e.colorsReplace,t)||t;e.replaceColor(r,n)},store:n,gradientEnabled:!0},t))})}),SvgAnimations:E8},SN=P(({store:e,hideSvgEffects:t,components:n})=>{let r=e.selectedElements,i=gM({type:"svg",usedItems:["SvgFlip",!t&&"SvgFilters","SvgColors",ik.animationsEnabled&&"SvgAnimations"].filter(e=>!!e),components:n});return(0,p.jsx)(gD,{items:i,itemRender:t=>{let i=n[t]||SA[t];return(0,p.jsx)(i,{elements:r,element:r[0],store:e},t)}})});h("8NFma");let Sj=P(({store:e,elements:t})=>{let n=n=>{e.history.transaction(()=>{t.forEach(e=>{e.set(n)})})},r=n=>{e.history.transaction(()=>{t.forEach(e=>{let{middleLeft:t,middleRight:r}=ap(e),{x:i,y:o,rotation:a}=ag(t,r,n);e.set({x:i,y:o,rotation:a,height:n})})})};return(0,p.jsx)(gw,{content:(0,p.jsxs)("div",{style:{padding:"15px",paddingTop:"15px",width:"230px"},children:[(0,p.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",paddingBottom:"5px"},children:[(0,p.jsx)("div",{children:lT("toolbar.lineSize")}),(0,p.jsx)("div",{children:(0,p.jsx)(EN,{value:t[0].height,onValueChange:e=>{r(e)},style:{width:"50px"},min:1,max:100,buttonPosition:"none"})})]}),(0,p.jsx)(mg,{value:t[0].height,onChange:e=>{r(e)},min:1,max:100,labelRenderer:!1}),(0,p.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",paddingBottom:"5px",paddingTop:"15px"},children:[(0,p.jsx)(fA,{onClick:()=>{n({dash:[]})},active:0===t[0].dash.length,children:(0,p.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,p.jsx)("line",{x2:"24",y1:"50%",y2:"50%",stroke:"currentColor",strokeWidth:"2"})})}),(0,p.jsx)(fA,{onClick:()=>{n({dash:[4,1]})},active:4===t[0].dash[0],children:(0,p.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,p.jsx)("line",{x1:"-1",x2:"25",y1:"50%",y2:"50%",stroke:"currentColor",strokeDasharray:"12 2",strokeWidth:"2"})})}),(0,p.jsx)(fA,{onClick:()=>{n({dash:[2,1]})},active:2===t[0].dash[0],children:(0,p.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,p.jsx)("line",{x1:"1",x2:"23",y1:"50%",y2:"50%",stroke:"currentColor",strokeDasharray:"6 2",strokeWidth:"2"})})}),(0,p.jsx)(fA,{onClick:()=>{n({dash:[1,1]})},active:1===t[0].dash[0],children:(0,p.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,p.jsx)("line",{x1:"1",x2:"23",y1:"50%",y2:"50%",stroke:"currentColor",strokeDasharray:"2 2",strokeWidth:"2"})})})]})]}),position:lV.BOTTOM,children:(0,p.jsx)(fA,{icon:"settings",minimal:!0})})}),SR=P(({elements:e,store:t})=>(0,p.jsx)(Ek,{value:e[0].color,style:{marginRight:"5px"},gradientEnabled:!1,onChange:n=>t.history.transaction(()=>{e.forEach(e=>{e.set({color:n})})}),store:t})),SI=(0,p.jsx)("span",{"aria-hidden":"true",className:"bp5-icon",children:(0,p.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",children:(0,p.jsx)("path",{stroke:"currentColor",strokeWidth:"2",d:"M 1 8 L 16 8"})})}),SL=(0,p.jsx)("span",{"aria-hidden":"true",className:"bp5-icon",children:(0,p.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",children:[(0,p.jsx)("path",{stroke:"currentColor",strokeWidth:"2",d:"M 8 3 L 1 8 L 8 13",fill:"none",strokeLinejoin:"round",strokeLinecap:"round"}),(0,p.jsx)("path",{stroke:"currentColor",strokeWidth:"2",d:"M 1 8 L 15 8",strokeLinejoin:"round",strokeLinecap:"round"})]})}),SM=(0,p.jsx)("span",{"aria-hidden":"true",className:"bp5-icon",children:(0,p.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",children:[(0,p.jsx)("path",{stroke:"currentColor",strokeWidth:"2",d:"M 8 3 L 1 8 L 8 13 Z",fill:"currentColor",strokeLinejoin:"round",strokeLinecap:"round"}),(0,p.jsx)("path",{stroke:"currentColor",strokeWidth:"2",d:"M 1 8 L 15 8",strokeLinejoin:"round",strokeLinecap:"round"})]})}),SD={"":SI,arrow:SL,triangle:SM,bar:(0,p.jsx)("span",{"aria-hidden":"true",className:"bp5-icon",children:(0,p.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",children:[(0,p.jsx)("path",{stroke:"currentColor",strokeWidth:"2",d:"M 1 3 L 1 13",strokeLinejoin:"round",strokeLinecap:"round"}),(0,p.jsx)("path",{stroke:"currentColor",strokeWidth:"2",d:"M 1 8 L 15 8",strokeLinejoin:"round",strokeLinecap:"round"})]})}),square:(0,p.jsx)("span",{"aria-hidden":"true",className:"bp5-icon",children:(0,p.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",children:[(0,p.jsx)("path",{stroke:"currentColor",strokeWidth:"2",d:"M 1 4 L 9 4 L 9 12 L 1 12 Z",fill:"currentColor",strokeLinejoin:"round",strokeLinecap:"round"}),(0,p.jsx)("path",{stroke:"currentColor",strokeWidth:"2",d:"M 1 8 L 15 8",strokeLinejoin:"round",strokeLinecap:"round"})]})}),circle:(0,p.jsx)("span",{"aria-hidden":"true",className:"bp5-icon",children:(0,p.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",children:[(0,p.jsx)("circle",{cx:"4",cy:"8",r:"4",fill:"currentColor"}),(0,p.jsx)("path",{stroke:"currentColor",strokeWidth:"2",d:"M 1 8 L 15 8",strokeLinejoin:"round",strokeLinecap:"round"})]})})},SF=({type:e,active:t,onClick:n,flipped:r})=>{let i=SD[e];return(0,p.jsx)(fA,{icon:r?(0,p.jsx)("span",{style:{transform:"scaleX(-1)"},children:i}):i,minimal:!0,onClick:n,active:t})},Sz=P(({elements:e,store:t,property:n})=>{let r="endHead"===n,i=SD[e[0][n]],o=r?(0,p.jsx)("span",{style:{transform:"scaleX(-1)"},children:i}):i,a=r=>{t.history.transaction(()=>{e.forEach(e=>{e.set({[n]:r})})})};return(0,p.jsx)(p.Fragment,{children:(0,p.jsx)(gw,{content:(0,p.jsxs)("div",{style:{width:"150px",padding:"10px"},children:[(0,p.jsx)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:["","arrow","triangle"].map(t=>(0,p.jsx)(SF,{type:t,active:e[0][n]===t,onClick:()=>{a(t)},flipped:r},t))}),(0,p.jsx)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:["bar","square","circle"].map(t=>(0,p.jsx)(SF,{type:t,active:e[0][n]===t,onClick:()=>{a(t)},flipped:r},t))})]}),position:lV.BOTTOM,children:(0,p.jsx)(fA,{icon:o,minimal:!0})})})}),SB={LineSettings:Sj,LineColor:SR,LineHeads:P(({elements:e,store:t})=>(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(Sz,{elements:e,store:t,property:"startHead"}),(0,p.jsx)(Sz,{elements:e,store:t,property:"endHead"})]})),LineAnimations:E8},SU=P(({store:e,components:t})=>{let n=e.selectedElements[0],r=gM({type:"line",usedItems:["LineColor","LineSettings","LineHeads",ik.animationsEnabled&&"LineAnimations"].filter(e=>!!e),components:t});return(0,p.jsx)(gD,{items:r,itemRender:r=>{let i=t[r]||SB[r];return(0,p.jsx)(i,{element:n,store:e,elements:e.selectedElements},r)}})});var v=h("8NFma");async function SH(e){let t=document.createElement("video");t.crossOrigin="anonymous",t.src=e,await t.play(),t.pause();let{videoWidth:n,videoHeight:r}=t;return{width:n,height:r}}async function SV(e){let t=document.createElement("video");t.crossOrigin="anonymous",t.src=e,await t.play(),t.pause();let{duration:n}=t;return n}async function Sq(e,t=5){return new Promise((n,r)=>{var i=document.createElement("video"),o=document.createElement("canvas");o.width=480,o.height=360;var a=o.getContext("2d");i.crossOrigin="anonymous",i.src=e,i.addEventListener("error",e=>{r(e)}),i.addEventListener("loadeddata",function(){let e=i.videoWidth/i.videoHeight;o.width=480,o.height=480/e,i.currentTime=t}),i.addEventListener("seeked",function(){a.drawImage(i,0,0,o.width,o.height);try{var e=o.toDataURL();n(e)}catch(e){r(e)}})})}async function SG(e,t,n){return new Promise((r,i)=>{let o=t.getContext("2d"),a=()=>{try{o.drawImage(e,0,0,t.width,t.height);let n=t.toDataURL();r(n),e.removeEventListener("seeked",a)}catch(t){i(t),e.removeEventListener("seeked",a)}};e.addEventListener("seeked",a),e.currentTime=n})}let SW={VideoTrim:P(({store:e,components:t,element:n})=>{let r=l(v).useRef(null),[i,o]=l(v).useState([]);l(v).useEffect(()=>{o([])},[n.src]);let a=async()=>{if(!n.src||i.length)return;let{width:e,height:t}=await SH(n.src),{src:a}=n,l=r.current.offsetHeight,s=Math.ceil(r.current.offsetWidth/(e/t*l)),u=await SV(a),c=document.createElement("video");c.crossOrigin="anonymous",c.src=a;let d=document.createElement("canvas");d.width=480;try{await new Promise((e,t)=>{c.addEventListener("loadeddata",()=>{let t=c.videoWidth/c.videoHeight;d.height=480/t,e()}),c.addEventListener("error",t)}),o([]);for(let e=0;e<s;e++){let t=e*u/s,n=await SG(c,d,t);o(e=>e.concat(n))}}catch(e){console.error("Error generating previews:",e)}},s=(e,t)=>{e.preventDefault();let i=e=>{e.preventDefault();let{clientX:i}=e,{left:o,width:a}=r.current.getBoundingClientRect(),{src:l}=n,s=(i-o)/a;"start"===t?n.set({startTime:Math.min(n.endTime,Math.max(0,s))}):"end"===t&&n.set({endTime:Math.min(1,Math.max(n.startTime,s))})};window.addEventListener("mousemove",i),window.addEventListener("mouseup",()=>{window.removeEventListener("mousemove",i)})};return(0,p.jsx)(gw,{position:"bottom",onOpened:a,content:(0,p.jsx)(gA,{style:{boxShadow:"none",backgroundColor:"transparent",width:"calc(100vw - 300px)"},children:(0,p.jsxs)(gP,{children:[(0,p.jsx)(mi,{style:{width:"80px"},value:parseFloat((n.duration*(n.endTime-n.startTime)/1e3).toFixed(2)),minorStepSize:.01,stepSize:.1,buttonPosition:"none",readOnly:!0}),(0,p.jsxs)("div",{style:{width:"calc(100vw - 420px)",height:"30px",display:"flex",position:"relative",overflow:"hidden",marginLeft:"10px"},ref:r,children:[i.map((e,t)=>(0,p.jsx)("img",{src:e,style:{width:"auto",height:"100%",objectFit:"cover"}},t)),(0,p.jsx)("div",{style:{position:"absolute",top:"0",left:0,width:100*n.startTime+"%",height:"30px",backgroundColor:"rgb(0, 0, 0, 0.5)"}}),(0,p.jsx)("div",{style:{position:"absolute",top:"0",right:"0%",width:100-100*n.endTime+"%",height:"30px",backgroundColor:"rgb(0, 0, 0, 0.5)"}}),(0,p.jsx)("div",{style:{position:"absolute",top:"0",left:100*n.startTime+"%",width:"10px",height:"30px",borderRadius:"0px",backgroundColor:"rgb(0, 161, 255, 0.9)",cursor:"ew-resize"},onMouseDown:e=>{s(e,"start")}}),(0,p.jsx)("div",{style:{position:"absolute",top:"0",right:100-100*n.endTime+"%",width:"10px",height:"30px",borderRadius:"0px",backgroundColor:"rgb(0, 161, 255, 0.9)",cursor:"ew-resize"},onMouseDown:e=>{s(e,"end")}})]})]})}),children:(0,p.jsx)(fA,{icon:"cut",minimal:!0,children:"Trim"})})}),VideoAnimations:E8},S$=P(({store:e,components:t})=>{let n=e.selectedElements,r=gM({type:"video",usedItems:["VideoTrim",ik.animationsEnabled&&"VideoAnimations"].filter(e=>!!e),components:t});return(0,p.jsx)(gD,{items:r,itemRender:r=>{let i=t[r]||SW[r];return(0,p.jsx)(i,{elements:n,element:n[0],store:e},r)}})});h("8NFma");var SK={};SK=function(e){return xD({tag:"svg",attr:{viewBox:"0 0 20 20",fill:"currentColor"},child:[{tag:"path",attr:{d:"M0 0h20v5H0V0zm0 7h20v4H0V7zm0 6h20v3H0v-3zm0 5h20v2H0v-2z"}}]})(e)};let SY=P(({elements:e,store:t})=>(0,p.jsx)(Ek,{value:e[0].fill,style:{marginRight:"5px"},gradientEnabled:!0,onChange:n=>t.history.transaction(()=>{e.forEach(e=>{e.set({fill:n})})}),store:t})),SX=P(({store:e,elements:t,element:n})=>{let r=n=>{e.history.transaction(()=>{t.forEach(e=>{e.set(n)})})};return(0,p.jsx)(gw,{content:(0,p.jsxs)("div",{style:{padding:"15px",paddingTop:"15px",width:"230px"},children:[(0,p.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",paddingBottom:"15px"},children:[(0,p.jsx)(fA,{onClick:()=>{r({dash:[]})},active:0===t[0].dash.length,children:(0,p.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,p.jsx)("line",{x2:"24",y1:"50%",y2:"50%",stroke:"currentColor",strokeWidth:"2"})})}),(0,p.jsx)(fA,{onClick:()=>{r({dash:[4,1]})},active:4===t[0].dash[0],children:(0,p.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,p.jsx)("line",{x1:"-1",x2:"25",y1:"50%",y2:"50%",stroke:"currentColor",strokeDasharray:"12 2",strokeWidth:"2"})})}),(0,p.jsx)(fA,{onClick:()=>{r({dash:[2,1]})},active:2===t[0].dash[0],children:(0,p.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,p.jsx)("line",{x1:"1",x2:"23",y1:"50%",y2:"50%",stroke:"currentColor",strokeDasharray:"6 2",strokeWidth:"2"})})}),(0,p.jsx)(fA,{onClick:()=>{r({dash:[1,1]})},active:1===t[0].dash[0],children:(0,p.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,p.jsx)("line",{x1:"1",x2:"23",y1:"50%",y2:"50%",stroke:"currentColor",strokeDasharray:"2 2",strokeWidth:"2"})})})]}),(0,p.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",paddingBottom:"5px"},children:[(0,p.jsx)("div",{children:lT("toolbar.strokeWidth")}),(0,p.jsx)("div",{children:(0,p.jsx)(EN,{value:t[0].strokeWidth,onValueChange:e=>{r({strokeWidth:e})},style:{width:"50px"},min:0,max:Math.round(Math.min(n.width,n.height)/2),buttonPosition:"none"})})]}),(0,p.jsx)(mg,{value:t[0].strokeWidth,onChange:e=>{r({strokeWidth:e})},min:0,max:Math.round(Math.min(n.width,n.height)/2),labelRenderer:!1}),"rect"===n.subType&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",paddingTop:"15px",paddingBottom:"5px"},children:[(0,p.jsx)("div",{children:lT("toolbar.cornerRadius")}),(0,p.jsx)("div",{children:(0,p.jsx)(EN,{value:t[0].cornerRadius,onValueChange:e=>{r({cornerRadius:e})},style:{width:"50px"},min:0,max:Math.round(Math.max(n.width,n.height)/2),buttonPosition:"none"})})]}),(0,p.jsx)(mg,{value:t[0].cornerRadius,onChange:e=>{r({cornerRadius:e})},min:0,max:Math.round(Math.max(n.width,n.height)/2),labelRenderer:!1})]})]}),position:lV.BOTTOM,children:(0,p.jsx)(fA,{icon:(0,p.jsx)(l(SK),{}),minimal:!0})})}),SZ={FigureFill:SY,FigureStroke:P(({elements:e,store:t})=>e.find(e=>e.strokeWidth)?(0,p.jsx)(Ek,{value:e[0].stroke,style:{marginRight:"5px"},gradientEnabled:!0,onChange:n=>t.history.transaction(()=>{e.forEach(e=>{e.set({stroke:n})})}),store:t}):null),FigureSettings:SX,FigureAnimations:E8},SQ=P(({store:e,components:t})=>{let n=e.selectedElements[0],r=gM({type:"line",usedItems:["FigureFill","FigureStroke","FigureSettings",ik.animationsEnabled&&"FigureAnimations"].filter(e=>!!e),components:t});return(0,p.jsx)(gD,{items:r,itemRender:r=>{let i=t[r]||SZ[r];return(0,p.jsx)(i,{element:n,store:e,elements:e.selectedElements},r)}})});h("8NFma");let SJ={ManyAnimations:E8},S0=P(({store:e,components:t})=>{let n=e.selectedElements,r=gM({type:"many",usedItems:[ik.animationsEnabled&&"ManyAnimations"],components:t});return(0,p.jsx)(gD,{items:r,itemRender:r=>{let i=t[r]||SJ[r];return(0,p.jsx)(i,{elements:n,element:n[0],store:e},r)}})});var v=h("8NFma");let S1=({value:e,onValueChange:t,...n})=>{let[r,i]=l(v).useState(e.toString());return l(v).useEffect(()=>{i(e.toString())},[e]),(0,p.jsx)(mi,{value:r,onValueChange:(e,n)=>{i(n),Number.isNaN(e)||t(e)},...n})},S2={PageDuration:P(({store:e})=>{if(!e.activePage)return null;let{duration:t}=e.activePage;return(0,p.jsx)(gw,{position:"bottom",content:(0,p.jsxs)("div",{style:{padding:"15px",paddingTop:"15px",width:"230px"},children:[(0,p.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",paddingTop:"5px",paddingBottom:"5px"},children:[(0,p.jsx)("div",{children:lT("toolbar.duration")}),(0,p.jsx)("div",{children:(0,p.jsx)(S1,{value:t/1e3,onValueChange:t=>{e.activePage.set({duration:1e3*t})},style:{width:"50px"},min:0,buttonPosition:"none"})})]}),(0,p.jsx)(mg,{value:Math.min(t/1e3,50),onChange:t=>{e.activePage.set({duration:1e3*t})},min:0,max:50,showTrackFill:!1,labelRenderer:!1})]}),children:(0,p.jsxs)(fA,{icon:"time",minimal:!0,children:[(e.activePage.duration/1e3).toFixed(1),"s"]})})})},S3=P(({store:e,components:t})=>{let n=gM({type:"page",usedItems:[ik.animationsEnabled&&"PageDuration"].filter(e=>!!e),components:t});return(0,p.jsx)(gD,{items:n,itemRender:n=>{let r=t[n]||S2[n];return(0,p.jsx)(r,{store:e},n)}})});var v=h("8NFma");let S5=({store:e})=>{let[t,n]=l(v).useState(!1);return(0,p.jsx)(gw,{content:(0,p.jsxs)(gB,{children:[(0,p.jsx)(gW,{icon:"media",text:lT("toolbar.saveAsImage"),onClick:async()=>{e.pages.forEach(t=>{e.saveAsImage({pageId:t.id})})}}),(0,p.jsx)(gW,{icon:"document",text:lT("toolbar.saveAsPDF"),onClick:async()=>{n(!0),await e.saveAsPDF(),n(!1)}})]}),position:lV.BOTTOM,children:(0,p.jsx)(fA,{icon:"import",text:lT("toolbar.download"),minimal:!0,loading:t})})};h("8NFma");let S6=P(({store:e})=>{let t=e.selectedShapes.length>0,n=e.selectedShapes[0],r=n?.locked,i=r?"lock":"unlock",o=r?lT("toolbar.lockedDescription"):lT("toolbar.unlockedDescription");return(0,p.jsx)(gC,{content:o,disabled:!t,position:"bottom",children:(0,p.jsx)(fA,{minimal:!0,disabled:!t,icon:i,onClick:()=>{e.selectedShapes.forEach(e=>e.set({draggable:r,contentEditable:r,styleEditable:r,resizable:r}))}})})});h("8NFma");var S4={};S4=function(e){return xD({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M17.66 8L12 2.35 6.34 8C4.78 9.56 4 11.64 4 13.64s.78 4.11 2.34 5.67 3.61 2.35 5.66 2.35 4.1-.79 5.66-2.35S20 15.64 20 13.64 19.22 9.56 17.66 8zM6 14c.01-2 .62-3.27 1.76-4.4L12 5.27l4.24 4.38C17.38 10.77 17.99 12 18 14H6z"}}]})(e)};let S8=P(({store:e})=>{let t=e.selectedShapes.length>0,n=t=>{t=Math.max(0,Math.min(t,100)),e.selectedShapes.forEach(e=>{e.set({opacity:t/100})})},r=Math.round(e.selectedShapes[0]?.opacity*100);return(0,p.jsx)(gw,{disabled:!t,minimal:!1,content:(0,p.jsxs)("div",{style:{padding:"10px 20px"},children:[(0,p.jsx)("div",{style:{textAlign:"center"},children:lT("toolbar.transparency")}),(0,p.jsxs)("div",{style:{display:"flex"},children:[(0,p.jsx)("div",{style:{paddingTop:"8px",paddingRight:"20px"},children:(0,p.jsx)(mg,{value:r,labelRenderer:!1,onChange:n,min:0,max:100})}),(0,p.jsx)(mi,{value:r,onValueChange:n,min:0,max:100,buttonPosition:"none",style:{width:"50px"},selectAllOnFocus:!0})]})]}),position:lV.BOTTOM,children:(0,p.jsx)(gC,{content:lT("toolbar.transparency"),disabled:!t,position:lV.BOTTOM,children:(0,p.jsx)(fA,{minimal:!0,disabled:!t,children:(0,p.jsx)(l(S4),{className:"bp5-icon",style:{fontSize:"20px"}})})})})});h("8NFma");let S9=P(({store:e})=>{let t=e.selectedElements.length>0,n=e.selectedElements[0]||{},r=t=>{e.selectedElements.forEach(e=>{e.set(t)})};return(0,p.jsx)(gw,{disabled:!t,minimal:!1,content:(0,p.jsxs)("div",{style:{padding:"15px",paddingTop:"25px",width:"220px"},children:[(0,p.jsx)(ET,{checked:n.selectable,label:lT("toolbar.selectable"),onChange:e=>{r({selectable:e.target.checked})},alignIndicator:lB.RIGHT}),(0,p.jsx)(ET,{checked:n.draggable,label:lT("toolbar.draggable"),onChange:e=>{r({draggable:e.target.checked})},alignIndicator:lB.RIGHT}),(0,p.jsx)(ET,{checked:n.removable,label:lT("toolbar.removable"),onChange:e=>{r({removable:e.target.checked})},alignIndicator:lB.RIGHT}),(0,p.jsx)(ET,{checked:n.resizable,label:lT("toolbar.resizable"),onChange:e=>{r({resizable:e.target.checked})},alignIndicator:lB.RIGHT}),(0,p.jsx)(ET,{checked:n.contentEditable,label:lT("toolbar.contentEditable"),onChange:e=>{r({contentEditable:e.target.checked})},alignIndicator:lB.RIGHT}),(0,p.jsx)(ET,{checked:n.styleEditable,label:lT("toolbar.styleEditable"),onChange:e=>{r({styleEditable:e.target.checked})},alignIndicator:lB.RIGHT}),(0,p.jsx)(ET,{checked:n.alwaysOnTop,label:lT("toolbar.alwaysOnTop"),onChange:e=>{r({alwaysOnTop:e.target.checked})},alignIndicator:lB.RIGHT,style:{marginTop:"20px"}}),(0,p.jsx)(ET,{checked:n.showInExport,label:lT("toolbar.showInExport"),onChange:e=>{r({showInExport:e.target.checked})},alignIndicator:lB.RIGHT,style:{marginTop:"20px"}})]}),position:lV.BOTTOM,children:(0,p.jsx)(fA,{icon:"cog",minimal:!0,disabled:!t})})});h("8NFma");let S7=P(({store:e})=>{let t=e.selectedElements.length>1,n=1===e.selectedElements.length&&"group"===e.selectedElements[0].type;return(0,p.jsxs)(p.Fragment,{children:[t&&(0,p.jsx)(fA,{minimal:!0,onClick:()=>{e.groupElements(e.selectedElements.map(e=>e.id))},style:{marginLeft:"auto"},children:lT("toolbar.groupElements")}),n&&(0,p.jsx)(fA,{minimal:!0,onClick:()=>{e.ungroupElements([e.selectedElements[0].id])},style:{marginLeft:"auto"},children:lT("toolbar.ungroupElements")})]})}),Ce={text:Sh,image:Sk,svg:SN,many:S0,line:SU,video:S$,figure:SQ,page:S3},Ct=at("div")`
|
|
149
149
|
white-space: nowrap;
|
|
150
150
|
|
|
151
|
-
${
|
|
151
|
+
${iR(`
|
|
152
152
|
max-width: 100vw;
|
|
153
153
|
overflow-x: auto;
|
|
154
154
|
overflow-y: hidden;
|
|
@@ -156,10 +156,10 @@ For simpler debugging here is the log of the parent element:`,lj=(e,t,n,r,i,o)=>
|
|
|
156
156
|
`,Cn=at("div")`
|
|
157
157
|
width: 100%;
|
|
158
158
|
height: 100%;
|
|
159
|
-
${
|
|
159
|
+
${iR(`
|
|
160
160
|
display: flex;
|
|
161
161
|
`)}
|
|
162
|
-
`,Cr=P(({store:e,downloadButtonEnabled:t,components:n={}})=>{let r=1===new Set(e.selectedElements.map(e=>e.type)).size,i=1===e.selectedElements.length,o=e.selectedElements[0],a=e.selectedElements.every(e=>e.styleEditable),s=a&&i&&Ce[o.type];r&&o?.type==="text"?s=Ce[o.type]:e.selectedElements.length>1&&(s=Ce.many),0===e.selectedElements.length&&(s=Ce.page),i&&"text"===o.type&&
|
|
162
|
+
`,Cr=P(({store:e,downloadButtonEnabled:t,components:n={}})=>{let r=1===new Set(e.selectedElements.map(e=>e.type)).size,i=1===e.selectedElements.length,o=e.selectedElements[0],a=e.selectedElements.every(e=>e.styleEditable),s=a&&i&&Ce[o.type];r&&o?.type==="text"?s=Ce[o.type]:e.selectedElements.length>1&&(s=Ce.many),0===e.selectedElements.length&&(s=Ce.page),i&&"text"===o.type&&ik.htmlRenderEnabled&&(s=Sx);let u=i&&o._cropModeEnabled,c=n?.ActionControls||(t?S5:null),d=n?.Position||gY,h=n?.Opacity||S8,f=n?.Lock||S6,g=n?.Duplicate||gF,m=n?.Remove||gz,y=n?.Group||S7,b=n?.History||g0,w=n?.Admin||S9;return(0,p.jsx)(Ct,{className:"bp5-navbar",children:(0,p.jsxs)(Cn,{children:[!u&&(0,p.jsx)(b,{store:e}),s&&a&&(0,p.jsx)(s,{store:e,components:n}),!u&&(0,p.jsxs)(gA.Group,{align:lB.RIGHT,children:["admin"===e.role&&(0,p.jsx)(w,{store:e}),(0,p.jsx)(y,{store:e}),(0,p.jsx)(d,{store:e}),a&&(0,p.jsx)(h,{store:e}),(0,p.jsx)(f,{store:e}),(0,p.jsx)(g,{store:e}),(0,p.jsx)(m,{store:e}),c&&(0,p.jsxs)(l(v).Fragment,{children:[(0,p.jsx)(gJ,{style:{height:"100%",margin:"0 15px"}}),(0,p.jsx)(c,{store:e})]})]})]})})});var v=h("8NFma"),Ci={};Ci=function(e){return xD({tag:"svg",attr:{viewBox:"0 0 512 512",fill:"currentColor"},child:[{tag:"path",attr:{d:"M128,256A128,128,0,1,0,256,384,128,128,0,0,0,128,256Zm379-54.86L400.07,18.29a37.26,37.26,0,0,0-64.14,0L229,201.14C214.76,225.52,232.58,256,261.09,256H474.91C503.42,256,521.24,225.52,507,201.14ZM480,288H320a32,32,0,0,0-32,32V480a32,32,0,0,0,32,32H480a32,32,0,0,0,32-32V320A32,32,0,0,0,480,288Z"}}]})(e)};var Co={};Co=function(e){return xD({tag:"svg",attr:{version:"1.1",id:"Layer_1",x:"0px",y:"0px",viewBox:"0 0 100 100",enableBackground:"new 0 0 100 100",fill:"currentColor"},child:[{tag:"g",attr:{},child:[{tag:"path",attr:{d:"M86.45,23.27h-3.475V90.18c0,0.835-0.677,1.513-1.513,1.513H31.987v3.475c0,0.836,0.677,1.513,1.513,1.513l0.001,0v0h52.95\n c0.836,0,1.513-0.677,1.513-1.513V24.782C87.963,23.946,87.286,23.27,86.45,23.27z"}},{tag:"path",attr:{d:"M77.988,85.193V14.807c0-0.836-0.677-1.513-1.513-1.513h-3.475v66.911c0,0.836-0.677,1.513-1.513,1.513H22.011v3.475\n c0,0.836,0.677,1.513,1.513,1.513c0,0,0,0,0,0h52.951C77.311,86.706,77.988,86.029,77.988,85.193z"}},{tag:"path",attr:{d:"M68.013,75.218V4.832c0-0.836-0.677-1.513-1.513-1.513H13.55c-0.836,0-1.513,0.677-1.513,1.513v70.386\n c0,0.836,0.677,1.513,1.513,1.513H66.5C67.336,76.731,68.013,76.054,68.013,75.218z"}}],content:"\n"}],content:"\n"})(e)},h("8NFma");let Ca=at("div")`
|
|
163
163
|
width: 100%;
|
|
164
164
|
height: 72px;
|
|
165
165
|
padding-top: 15px;
|
|
@@ -177,7 +177,7 @@ For simpler debugging here is the log of the parent element:`,lj=(e,t,n,r,i,o)=>
|
|
|
177
177
|
background-color: rgba(19, 124, 189, 0.2);
|
|
178
178
|
}
|
|
179
179
|
|
|
180
|
-
${
|
|
180
|
+
${iR(`
|
|
181
181
|
height: 54px;
|
|
182
182
|
padding-top: 9px;
|
|
183
183
|
width: 72px;
|
|
@@ -194,7 +194,7 @@ For simpler debugging here is the log of the parent element:`,lj=(e,t,n,r,i,o)=>
|
|
|
194
194
|
&:hover .credit {
|
|
195
195
|
opacity: 1;
|
|
196
196
|
}
|
|
197
|
-
${
|
|
197
|
+
${iR(`
|
|
198
198
|
.credit {
|
|
199
199
|
opacity: 1;
|
|
200
200
|
}
|
|
@@ -254,7 +254,7 @@ For simpler debugging here is the log of the parent element:`,lj=(e,t,n,r,i,o)=>
|
|
|
254
254
|
text-align: center;
|
|
255
255
|
color: white;
|
|
256
256
|
margin-bottom: 10px;
|
|
257
|
-
`,Cb=e=>new Promise((t,n)=>{let r=new FileReader;r.readAsDataURL(e),r.onload=()=>t(r.result),r.onerror=e=>n(e)}),Cw=P(({onSelect:e,onRemove:t,font:n})=>(0,p.jsxs)(Cy,{style:{fontFamily:n.fontFamily},className:"polotno-font-item",onClick:e,children:[n.fontFamily," text",(0,p.jsx)(fA,{style:{position:"absolute",right:0,bottom:0},minimal:!0,icon:"trash",onClick:e=>{e.stopPropagation(),t()}})]})),Cx=({onSelect:e,...t})=>(0,p.jsx)(fA,{...t,draggable:!0,className:"polotno-close-panel",onClick:()=>e(),onDragStart:()=>{lm(({x:t,y:n})=>{e({x:t,y:n})})},onDragEnd:e=>{lm(null)}}),C_=P(({store:e})=>{l(v).useEffect(()=>{e.loadFont("Roboto")},[]);let t=t=>{let n=t.width||e.width/2,r=(t?.x||e.width/2)-n/2,i=(t?.y||e.height/2)-t.fontSize/2,o=e.width+e.height,a=e.activePage?.addElement({type:"text",fontFamily:"Roboto",...t,x:r,y:i,width:n,fontSize:t.fontSize*(o/2160)});iN()||a?.toggleEditMode(!0)},n=async t=>{let{target:n}=t;for(let t of n.files){let n=await Cb(t),r=t.name.split(".")[0];e.addFont({fontFamily:r,url:n})}n.value=null};l(v).useEffect(()=>{e.fonts.forEach(t=>e.loadFont(t.fontFamily))},[e.fonts]);let{data:r,error:i}=vg(aZ(),vb),[o,a]=l(v).useState("text");return(0,p.jsxs)("div",{style:{height:"100%",display:"flex",flexDirection:"column"},children:[(0,p.jsxs)(vT,{large:!0,onChange:e=>a(e),children:[(0,p.jsx)(vx,{id:"text",children:lT("sidePanel.text")}),(0,p.jsx)(vx,{id:"font",children:lT("sidePanel.myFonts")})]}),"text"===o&&(0,p.jsxs)(Cv,{children:[(0,p.jsx)(Cx,{style:{marginBottom:"5px",width:"100%",fontSize:"25px",fontFamily:"Roboto"},minimal:!0,onSelect:e=>{t({...e,fontSize:76,text:lT("sidePanel.headerText"),fontFamily:"Roboto"})},children:lT("sidePanel.createHeader")}),(0,p.jsx)(Cx,{style:{marginBottom:"5px",width:"100%",fontSize:"18px",fontFamily:"Roboto"},minimal:!0,onSelect:e=>{t({...e,fontSize:44,text:lT("sidePanel.subHeaderText"),fontFamily:"Roboto"})},children:lT("sidePanel.createSubHeader")}),(0,p.jsx)(Cx,{style:{marginBottom:"5px",width:"100%",fontSize:"14px",fontFamily:"Roboto"},minimal:!0,onSelect:e=>{t({...e,fontSize:30,text:lT("sidePanel.bodyText"),fontFamily:"Roboto"})},children:lT("sidePanel.createBody")}),(0,p.jsx)(Cm,{shadowEnabled:!1,images:r?.items,getPreview:e=>e.preview,getImageClassName:e=>e.json.indexOf("plain")>=0?"polotno-text-preview-plain":"",isLoading:!r,error:i,onSelect:async(t,n)=>{let r=await fetch(t.json),i=await r.json();if(!e.activePage)return;let o=(e.width+e.height)/2160,a=n?n.x-i.width/2*o:e.width/2-i.width/2*o,l=n?n.y-i.height/2*o:e.height/2-i.height/2*o;e.history.transaction(()=>{let t=i.pages[0].children,n=[];t.forEach(t=>{delete t.id;let{id:r}=e.activePage?.addElement({...t,fontSize:t.fontSize*o,x:t.x*o+a,y:t.y*o+l,width:t.width*o,height:t.height*o});n.push(r)}),e.selectElements(n)})}})]}),"font"===o&&(0,p.jsxs)("div",{style:{display:"flex",flexDirection:"column",height:"calc(100% - 50px)"},children:[(0,p.jsxs)("label",{htmlFor:"polotno-font-upload",children:[(0,p.jsx)(fA,{icon:"upload",style:{width:"100%"},onClick:()=>{document.querySelector("#polotno-font-upload")?.click()},children:lT("sidePanel.uploadFont")}),(0,p.jsx)("input",{type:"file",accept:".ttf, .otf, .woff, .woff2, .eot",id:"polotno-font-upload",style:{display:"none"},onChange:n})]}),(0,p.jsx)("div",{style:{paddingTop:"20px",overflow:"auto",height:"100%"},children:e.fonts.map((n,r)=>(0,p.jsx)(Cw,{font:n,onSelect:()=>{t({fontSize:80,text:"Cool text",fontFamily:n.fontFamily})},onRemove:()=>{e.removeFont(n.fontFamily)}},r))})]})]})});var v=h("8NFma"),CE={};CE=function(e){return xD({tag:"svg",attr:{className:"icon",viewBox:"0 0 1024 1024",fill:"currentColor"},child:[{tag:"path",attr:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-32 736H663.9V602.2h104l15.6-120.7H663.9v-77.1c0-35 9.7-58.8 59.8-58.8h63.9v-108c-11.1-1.5-49-4.8-93.2-4.8-92.2 0-155.3 56.3-155.3 159.6v89H434.9v120.7h104.3V848H176V176h672v672z"}}],content:"\n"})(e)};var CS={};CS=function(e){return xD({tag:"svg",attr:{className:"icon",viewBox:"0 0 1024 1024",fill:"currentColor"},child:[{tag:"path",attr:{d:"M512 306.9c-113.5 0-205.1 91.6-205.1 205.1S398.5 717.1 512 717.1 717.1 625.5 717.1 512 625.5 306.9 512 306.9zm0 338.4c-73.4 0-133.3-59.9-133.3-133.3S438.6 378.7 512 378.7 645.3 438.6 645.3 512 585.4 645.3 512 645.3zm213.5-394.6c-26.5 0-47.9 21.4-47.9 47.9s21.4 47.9 47.9 47.9 47.9-21.3 47.9-47.9a47.84 47.84 0 0 0-47.9-47.9zM911.8 512c0-55.2.5-109.9-2.6-165-3.1-64-17.7-120.8-64.5-167.6-46.9-46.9-103.6-61.4-167.6-64.5-55.2-3.1-109.9-2.6-165-2.6-55.2 0-109.9-.5-165 2.6-64 3.1-120.8 17.7-167.6 64.5C132.6 226.3 118.1 283 115 347c-3.1 55.2-2.6 109.9-2.6 165s-.5 109.9 2.6 165c3.1 64 17.7 120.8 64.5 167.6 46.9 46.9 103.6 61.4 167.6 64.5 55.2 3.1 109.9 2.6 165 2.6 55.2 0 109.9.5 165-2.6 64-3.1 120.8-17.7 167.6-64.5 46.9-46.9 61.4-103.6 64.5-167.6 3.2-55.1 2.6-109.8 2.6-165zm-88 235.8c-7.3 18.2-16.1 31.8-30.2 45.8-14.1 14.1-27.6 22.9-45.8 30.2C695.2 844.7 570.3 840 512 840c-58.3 0-183.3 4.7-235.9-16.1-18.2-7.3-31.8-16.1-45.8-30.2-14.1-14.1-22.9-27.6-30.2-45.8C179.3 695.2 184 570.3 184 512c0-58.3-4.7-183.3 16.1-235.9 7.3-18.2 16.1-31.8 30.2-45.8s27.6-22.9 45.8-30.2C328.7 179.3 453.7 184 512 184s183.3-4.7 235.9 16.1c18.2 7.3 31.8 16.1 45.8 30.2 14.1 14.1 22.9 27.6 30.2 45.8C844.7 328.7 840 453.7 840 512c0 58.3 4.7 183.2-16.2 235.8z"}}],content:"\n"})(e)};var CC={};CC=function(e){return xD({tag:"svg",attr:{className:"icon",viewBox:"0 0 1024 1024",fill:"currentColor"},child:[{tag:"path",attr:{d:"M960 509.2c0-2.2 0-4.7-.1-7.6-.1-8.1-.3-17.2-.5-26.9-.8-27.9-2.2-55.7-4.4-81.9-3-36.1-7.4-66.2-13.4-88.8a139.52 139.52 0 0 0-98.3-98.5c-28.3-7.6-83.7-12.3-161.7-15.2-37.1-1.4-76.8-2.3-116.5-2.8-13.9-.2-26.8-.3-38.4-.4h-29.4c-11.6.1-24.5.2-38.4.4-39.7.5-79.4 1.4-116.5 2.8-78 3-133.5 7.7-161.7 15.2A139.35 139.35 0 0 0 82.4 304C76.3 326.6 72 356.7 69 392.8c-2.2 26.2-3.6 54-4.4 81.9-.3 9.7-.4 18.8-.5 26.9 0 2.9-.1 5.4-.1 7.6v5.6c0 2.2 0 4.7.1 7.6.1 8.1.3 17.2.5 26.9.8 27.9 2.2 55.7 4.4 81.9 3 36.1 7.4 66.2 13.4 88.8 12.8 47.9 50.4 85.7 98.3 98.5 28.2 7.6 83.7 12.3 161.7 15.2 37.1 1.4 76.8 2.3 116.5 2.8 13.9.2 26.8.3 38.4.4h29.4c11.6-.1 24.5-.2 38.4-.4 39.7-.5 79.4-1.4 116.5-2.8 78-3 133.5-7.7 161.7-15.2 47.9-12.8 85.5-50.5 98.3-98.5 6.1-22.6 10.4-52.7 13.4-88.8 2.2-26.2 3.6-54 4.4-81.9.3-9.7.4-18.8.5-26.9 0-2.9.1-5.4.1-7.6v-5.6zm-72 5.2c0 2.1 0 4.4-.1 7.1-.1 7.8-.3 16.4-.5 25.7-.7 26.6-2.1 53.2-4.2 77.9-2.7 32.2-6.5 58.6-11.2 76.3-6.2 23.1-24.4 41.4-47.4 47.5-21 5.6-73.9 10.1-145.8 12.8-36.4 1.4-75.6 2.3-114.7 2.8-13.7.2-26.4.3-37.8.3h-28.6l-37.8-.3c-39.1-.5-78.2-1.4-114.7-2.8-71.9-2.8-124.9-7.2-145.8-12.8-23-6.2-41.2-24.4-47.4-47.5-4.7-17.7-8.5-44.1-11.2-76.3-2.1-24.7-3.4-51.3-4.2-77.9-.3-9.3-.4-18-.5-25.7 0-2.7-.1-5.1-.1-7.1v-4.8c0-2.1 0-4.4.1-7.1.1-7.8.3-16.4.5-25.7.7-26.6 2.1-53.2 4.2-77.9 2.7-32.2 6.5-58.6 11.2-76.3 6.2-23.1 24.4-41.4 47.4-47.5 21-5.6 73.9-10.1 145.8-12.8 36.4-1.4 75.6-2.3 114.7-2.8 13.7-.2 26.4-.3 37.8-.3h28.6l37.8.3c39.1.5 78.2 1.4 114.7 2.8 71.9 2.8 124.9 7.2 145.8 12.8 23 6.2 41.2 24.4 47.4 47.5 4.7 17.7 8.5 44.1 11.2 76.3 2.1 24.7 3.4 51.3 4.2 77.9.3 9.3.4 18 .5 25.7 0 2.7.1 5.1.1 7.1v4.8zM423 646l232-135-232-133z"}}],content:"\n"})(e)};var CO={};CO=function(e){return xD({tag:"svg",attr:{className:"icon",viewBox:"0 0 1024 1024",fill:"currentColor"},child:[{tag:"path",attr:{d:"M912 302.3L784 376V224c0-35.3-28.7-64-64-64H128c-35.3 0-64 28.7-64 64v576c0 35.3 28.7 64 64 64h592c35.3 0 64-28.7 64-64V648l128 73.7c21.3 12.3 48-3.1 48-27.6V330c0-24.6-26.7-40-48-27.7zM712 792H136V232h576v560zm176-167l-104-59.8V458.9L888 399v226zM208 360h112c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H208c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z"}}],content:"\n"})(e)};var Ck={};Ck=function(e){return xD({tag:"svg",attr:{viewBox:"0 0 20 20",fill:"currentColor"},child:[{tag:"path",attr:{d:"M4 18h12V6h-4V2H4v16zm-2 1V0h12l4 4v16H2v-1z"}}]})(e)};var CP={};CP=function(e){return xD({tag:"svg",attr:{className:"icon",viewBox:"0 0 1024 1024",fill:"currentColor"},child:[{tag:"path",attr:{d:"M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 632H136V232h752v560zM610.3 476h123.4c1.3 0 2.3-3.6 2.3-8v-48c0-4.4-1-8-2.3-8H610.3c-1.3 0-2.3 3.6-2.3 8v48c0 4.4 1 8 2.3 8zm4.8 144h185.7c3.9 0 7.1-3.6 7.1-8v-48c0-4.4-3.2-8-7.1-8H615.1c-3.9 0-7.1 3.6-7.1 8v48c0 4.4 3.2 8 7.1 8zM224 673h43.9c4.2 0 7.6-3.3 7.9-7.5 3.8-50.5 46-90.5 97.2-90.5s93.4 40 97.2 90.5c.3 4.2 3.7 7.5 7.9 7.5H522a8 8 0 0 0 8-8.4c-2.8-53.3-32-99.7-74.6-126.1a111.8 111.8 0 0 0 29.1-75.5c0-61.9-49.9-112-111.4-112s-111.4 50.1-111.4 112c0 29.1 11 55.5 29.1 75.5a158.09 158.09 0 0 0-74.6 126.1c-.4 4.6 3.2 8.4 7.8 8.4zm149-262c28.5 0 51.7 23.3 51.7 52s-23.2 52-51.7 52-51.7-23.3-51.7-52 23.2-52 51.7-52z"}}],content:"\n"})(e)};let CT=[["Instagram Post",1080,1080,"px",(0,p.jsx)(l(CS),{})],["Instagram Story",1080,1920,"px",(0,p.jsx)(l(CS),{})],["Instagram Ad",1080,1080,"px",(0,p.jsx)(l(CS),{})],["Facebook Post",940,788,"px",(0,p.jsx)(l(CE),{})],["Facebook Cover",851,315,"px",(0,p.jsx)(l(CE),{})],["Facebook Ad",1200,628,"px",(0,p.jsx)(l(CE),{})],["Youtube Thumbnail",1280,720,"px",(0,p.jsx)(l(CC),{})],["Youtube Channel",2560,1440,"px",(0,p.jsx)(l(CC),{})],["Full HD",1920,1080,"px",(0,p.jsx)(l(CO),{})],["Invitation",14,14,"cm",(0,p.jsx)(l(Ck),{})],["A4",21,29.7,"cm",(0,p.jsx)(l(Ck),{})],["Business card",3.5,2,"in",(0,p.jsx)(l(CP),{})]],CA=({value:e,onChange:t,...n})=>{let[r,i]=l(v).useState(e),o=l(v).useRef(e);o.current=r;let a=()=>{t(Math.max(10,o.current))};return l(v).useEffect(()=>{i(e)},[e]),(0,p.jsx)(mi,{...n,value:r,onValueChange:e=>{Number.isNaN(e)||i(e)},onBlur:a,onKeyDown:e=>{"Enter"===e.key&&a()}})},CN=P(({store:e})=>{let[t,n]=l(v).useState(!0),[r,i]=l(v).useState(e.width),[o,a]=l(v).useState(e.height),s=e.activePage?.computedWidth||e.width;l(v).useEffect(()=>{i(lt({px:s,unit:e.unit,dpi:e.dpi}))},[s,e.unit,e.dpi]);let u=e.activePage?.computedHeight||e.height;return l(v).useEffect(()=>{a(lt({px:u,unit:e.unit,dpi:e.dpi}))},[u,e.unit,e.dpi]),(0,p.jsxs)("div",{style:{height:"100%",overflow:"auto",paddingRight:"3px"},children:[(0,p.jsxs)("div",{style:{paddingBottom:"15px"},children:[(0,p.jsxs)(ET,{checked:t,onChange:e=>{n(e.target.checked)},alignIndicator:lB.RIGHT,style:{marginTop:"8px",marginBottom:"25px"},children:[lT("sidePanel.useMagicResize")," ",(0,p.jsx)(gC,{content:lT("sidePanel.magicResizeDescription"),position:lV.BOTTOM,children:(0,p.jsx)(fC,{icon:"help"})})]}),(0,p.jsxs)("div",{style:{width:"50%",display:"inline-block"},children:[lT("sidePanel.width")," (",e.unit,")"]}),(0,p.jsx)("div",{style:{width:"50%",display:"inline-block"},children:(0,p.jsx)(CA,{fill:!0,value:r,onChange:e=>{e||(e=10),i(e)},min:10,max:1e4,selectAllOnFocus:!0,minorStepSize:.01})})]}),(0,p.jsxs)("div",{style:{paddingBottom:"15px"},children:[(0,p.jsxs)("div",{style:{width:"50%",display:"inline-block"},children:[lT("sidePanel.height")," (",e.unit,")"]}),(0,p.jsx)("div",{style:{width:"50%",display:"inline-block"},children:(0,p.jsx)(CA,{fill:!0,value:o,onChange:e=>{e||(e=10),a(e)},min:10,max:1e4,selectAllOnFocus:!0,minorStepSize:.01})})]}),(0,p.jsx)("div",{style:{paddingBottom:"15px"},children:(0,p.jsx)(fA,{fill:!0,intent:"primary",onClick:()=>{let n=ln({unitVal:r,dpi:e.dpi,unit:e.unit}),i=ln({unitVal:o,dpi:e.dpi,unit:e.unit});e.setSize(n,i,t),e.activePage?.width!=="auto"&&e.activePage?.set({width:n}),e.activePage?.height!=="auto"&&e.activePage?.set({height:i})},children:lT("sidePanel.resize")})}),CT.map(([n,r,i,o,a])=>(0,p.jsxs)(fA,{style:{width:"100%",paddingTop:"10px",paddingBottom:"10px",fontSize:"16px"},minimal:!0,onClick:()=>{let n=ln({unitVal:r,dpi:e.dpi,unit:o}),a=ln({unitVal:i,dpi:e.dpi,unit:o});e.setUnit({unit:o,dpi:e.dpi}),e.setSize(n,a,t),e.activePage?.width!=="auto"&&e.activePage?.set({width:n}),e.activePage?.height!=="auto"&&e.activePage?.set({height:a})},icon:a,alignText:"left",children:[n,(0,p.jsxs)("span",{style:{fontSize:"0.7rem",paddingLeft:"20px",float:"right",lineHeight:"1.1rem"},children:[r," x ",i," ",o]})]},n))]})});var v=h("8NFma");function Cj(e){return new Promise(t=>{let n=document.createElement("img");n.onload=async()=>{0===n.width||0===n.height?t(await iX(e)):t({width:n.width,height:n.height})},n.crossOrigin="anonymous",n.src=e})}function CR(e){return new Promise((t,n)=>{let r=document.createElement("img");r.onload=()=>{t(r)},r.onerror=e=>{n(e)},r.crossOrigin="anonymous",r.src=e})}async function CI(e,t){let n,r;let i=await CR(e),o=document.createElement("canvas");o.width=2*i.width,o.height=2*i.height,o.getContext("2d").drawImage(i,0,0,o.width,o.height);let a=document.createElement("canvas");a.width=t.width,a.height=t.height;let l=a.getContext("2d"),{cropX:s,cropY:u}=t,c=o.width*t.cropWidth,d=o.height*t.cropHeight,h=t.width/t.height,f=c/d;return"svg"===t.type?(n=c,r=d):h>=f?(n=c,r=c/h):(n=d*h,r=d),l.drawImage(o,s*o.width,u*o.height,n,r,0,0,a.width,a.height),a.toDataURL("image/png")}function CL(e,t){let n,r;let{width:i,height:o}=e,a=i/o;a>=t.width/t.height?(n=t.width,r=t.width/a):(n=t.height*a,r=t.height);let l=(t.width-n)/2,s=(t.height-r)/2;return{cropX:l/t.width,cropY:s/t.height,cropWidth:n/t.width,cropHeight:r/t.height}}async function CM(e){return new Promise((t,n)=>{let r=new FileReader;r.readAsDataURL(e),r.onload=()=>t(r.result),r.onerror=e=>n(e)})}let CD=async e=>CM(e),CF=[],Cz=({store:e})=>{let[t,n]=l(v).useState(CF),[r,i]=l(v).useState(!1),o=l(v).useRef(null),a=async e=>{let{target:t}=e;for(let e of(i(!0),t.files)){let t=await CD(e),r=function(e){let{type:t}=e;return t.indexOf("svg")>=0?"svg":t.indexOf("image")>=0?"image":t.indexOf("video")>=0?"video":"image"}(e),i=t;"video"===r&&(i=await Sq(t)),n(e=>e.concat([{url:t,type:r,preview:i}]))}i(!1),t.value=""};return l(v).useEffect(()=>{CF=t},[t]),(0,p.jsxs)("div",{style:{height:"100%",display:"flex",flexDirection:"column"},children:[(0,p.jsx)("div",{style:{height:"45px",paddingTop:"5px"},children:lT("sidePanel.uploadTip")}),(0,p.jsx)("div",{style:{marginBottom:"20px"},children:(0,p.jsxs)("label",{htmlFor:"input-file",children:[(0,p.jsx)(fA,{icon:"upload",style:{width:"100%"},onClick:()=>{o.current?.click()},children:lT("sidePanel.uploadImage")}),(0,p.jsx)("input",{type:"file",ref:o,style:{display:"none"},onChange:a,multiple:!0})]})}),(0,p.jsx)(Cm,{images:t,isLoading:r,getPreview:e=>e.preview,onSelect:async(t,n,r)=>{let i=t.url,o=t.type,{width:a,height:l}=await ("video"===o?SH:Cj)(i);if(r&&"svg"===r.type&&r.contentEditable&&"image"===o){r.set({maskSrc:i});return}if(r&&"image"===r.type&&r.contentEditable&&"image"==o){let e=CL(r,{width:a,height:l});r.set({src:i,...e});return}let s=Math.min(e.width/a,e.height/l,1);a*=s,l*=s;let u=(n?.x||e.width/2)-a/2,c=(n?.y||e.height/2)-l/2;e.activePage?.addElement({type:o,src:i,x:u,y:c,width:a,height:l})}})]})};h("8NFma");let CB=({store:e})=>{let{setQuery:t,loadMore:n,isReachingEnd:r,data:i,isLoading:o,error:a}=vw({defaultQuery:"",getAPI:({page:e,query:t})=>aQ({page:e,query:t})});return(0,p.jsxs)("div",{style:{height:"100%",display:"flex",flexDirection:"column"},children:[(0,p.jsx)(g5,{leftIcon:"search",placeholder:lT("sidePanel.searchPlaceholder"),onChange:e=>{t(e.target.value)},type:"search",style:{marginBottom:"20px"}}),(0,p.jsxs)("p",{style:{textAlign:"center"},children:["Photos by"," ",(0,p.jsx)("a",{href:"https://unsplash.com/",target:"_blank",children:"Unsplash"})]}),(0,p.jsx)(Cm,{images:i?.map(e=>e.results).flat().filter(Boolean),getPreview:e=>e.urls.small,onSelect:async(t,n,r)=>{if(fetch(aJ(t.id)),r&&"svg"===r.type&&r.contentEditable){r.set({maskSrc:t.urls.regular});return}let{width:i,height:o}=await Cj(t.urls.small);if(r&&"image"===r.type&&r.contentEditable){let e=CL(r,{width:i,height:o});r.set({src:t.urls.regular,...e});return}let a=(n?.x||e.width/2)-i/2,l=(n?.y||e.height/2)-o/2;e.activePage?.addElement({type:"image",src:t.urls.regular,width:i,height:o,x:a,y:l})},isLoading:o,error:a,loadMore:!r&&n,getCredit:e=>(0,p.jsxs)("span",{children:["Photo by"," ",(0,p.jsx)("a",{href:`https://unsplash.com/@${e.user.username}?utm_source=polotno&utm_medium=referral`,target:"_blank",children:e.user.name})," ","on"," ",(0,p.jsx)("a",{href:"https://unsplash.com/?utm_source=polotno&utm_medium=referral",target:"_blank",children:"Unsplash"})]})})]})};h("8NFma");var CU={};CU=function(e){return xD({tag:"svg",attr:{viewBox:"0 0 512 512",fill:"currentColor"},child:[{tag:"path",attr:{d:"M430.1 347.9c-6.6-6.1-16.3-7.6-24.6-9-11.5-1.9-15.9-4-22.6-10-14.3-12.7-14.3-31.1 0-43.8l30.3-26.9c46.4-41 46.4-108.2 0-149.2-34.2-30.1-80.1-45-127.8-45-55.7 0-113.9 20.3-158.8 60.1-83.5 73.8-83.5 194.7 0 268.5 41.5 36.7 97.5 55 152.9 55.4h1.7c55.4 0 110-17.9 148.8-52.4 14.4-12.7 12-36.6.1-47.7zM120 216c0-17.7 14.3-32 32-32s32 14.3 32 32-14.3 32-32 32-32-14.3-32-32zm40 126c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm64-161c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm72 219c-26.5 0-48-21.5-48-48s21.5-48 48-48 48 21.5 48 48-21.5 48-48 48zm24-208c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32z"}}]})(e)};let CH=["white","rgb(82, 113, 255)","rgb(255, 145, 77)","rgb(126, 217, 87)","rgb(255, 222, 89)","rgb(203, 108, 230)","rgb(0, 0, 0, 0)"],CV=at("div")`
|
|
257
|
+
`,Cb=e=>new Promise((t,n)=>{let r=new FileReader;r.readAsDataURL(e),r.onload=()=>t(r.result),r.onerror=e=>n(e)}),Cw=P(({onSelect:e,onRemove:t,font:n})=>(0,p.jsxs)(Cy,{style:{fontFamily:n.fontFamily},className:"polotno-font-item",onClick:e,children:[n.fontFamily," text",(0,p.jsx)(fA,{style:{position:"absolute",right:0,bottom:0},minimal:!0,icon:"trash",onClick:e=>{e.stopPropagation(),t()}})]})),Cx=({onSelect:e,...t})=>(0,p.jsx)(fA,{...t,draggable:!0,className:"polotno-close-panel",onClick:()=>e(),onDragStart:()=>{lm(({x:t,y:n})=>{e({x:t,y:n})})},onDragEnd:e=>{lm(null)}}),C_=P(({store:e})=>{l(v).useEffect(()=>{e.loadFont("Roboto")},[]);let t=t=>{let n=t.width||e.width/2,r=(t?.x||e.width/2)-n/2,i=(t?.y||e.height/2)-t.fontSize/2,o=e.width+e.height,a=e.activePage?.addElement({type:"text",fontFamily:"Roboto",...t,x:r,y:i,width:n,fontSize:t.fontSize*(o/2160)});ij()||a?.toggleEditMode(!0)},n=async t=>{let{target:n}=t;for(let t of n.files){let n=await Cb(t),r=t.name.split(".")[0];e.addFont({fontFamily:r,url:n})}n.value=null};l(v).useEffect(()=>{e.fonts.forEach(t=>e.loadFont(t.fontFamily))},[e.fonts]);let{data:r,error:i}=vg(aZ(),vb),[o,a]=l(v).useState("text");return(0,p.jsxs)("div",{style:{height:"100%",display:"flex",flexDirection:"column"},children:[(0,p.jsxs)(vT,{large:!0,onChange:e=>a(e),children:[(0,p.jsx)(vx,{id:"text",children:lT("sidePanel.text")}),(0,p.jsx)(vx,{id:"font",children:lT("sidePanel.myFonts")})]}),"text"===o&&(0,p.jsxs)(Cv,{children:[(0,p.jsx)(Cx,{style:{marginBottom:"5px",width:"100%",fontSize:"25px",fontFamily:"Roboto"},minimal:!0,onSelect:e=>{t({...e,fontSize:76,text:lT("sidePanel.headerText"),fontFamily:"Roboto"})},children:lT("sidePanel.createHeader")}),(0,p.jsx)(Cx,{style:{marginBottom:"5px",width:"100%",fontSize:"18px",fontFamily:"Roboto"},minimal:!0,onSelect:e=>{t({...e,fontSize:44,text:lT("sidePanel.subHeaderText"),fontFamily:"Roboto"})},children:lT("sidePanel.createSubHeader")}),(0,p.jsx)(Cx,{style:{marginBottom:"5px",width:"100%",fontSize:"14px",fontFamily:"Roboto"},minimal:!0,onSelect:e=>{t({...e,fontSize:30,text:lT("sidePanel.bodyText"),fontFamily:"Roboto"})},children:lT("sidePanel.createBody")}),(0,p.jsx)(Cm,{shadowEnabled:!1,images:r?.items,getPreview:e=>e.preview,getImageClassName:e=>e.json.indexOf("plain")>=0?"polotno-text-preview-plain":"",isLoading:!r,error:i,onSelect:async(t,n)=>{let r=await fetch(t.json),i=await r.json();if(!e.activePage)return;let o=(e.width+e.height)/2160,a=n?n.x-i.width/2*o:e.width/2-i.width/2*o,l=n?n.y-i.height/2*o:e.height/2-i.height/2*o;e.history.transaction(()=>{let t=i.pages[0].children,n=[];t.forEach(t=>{delete t.id;let{id:r}=e.activePage?.addElement({...t,fontSize:t.fontSize*o,x:t.x*o+a,y:t.y*o+l,width:t.width*o,height:t.height*o});n.push(r)}),e.selectElements(n)})}})]}),"font"===o&&(0,p.jsxs)("div",{style:{display:"flex",flexDirection:"column",height:"calc(100% - 50px)"},children:[(0,p.jsxs)("label",{htmlFor:"polotno-font-upload",children:[(0,p.jsx)(fA,{icon:"upload",style:{width:"100%"},onClick:()=>{document.querySelector("#polotno-font-upload")?.click()},children:lT("sidePanel.uploadFont")}),(0,p.jsx)("input",{type:"file",accept:".ttf, .otf, .woff, .woff2, .eot",id:"polotno-font-upload",style:{display:"none"},onChange:n})]}),(0,p.jsx)("div",{style:{paddingTop:"20px",overflow:"auto",height:"100%"},children:e.fonts.map((n,r)=>(0,p.jsx)(Cw,{font:n,onSelect:()=>{t({fontSize:80,text:"Cool text",fontFamily:n.fontFamily})},onRemove:()=>{e.removeFont(n.fontFamily)}},r))})]})]})});var v=h("8NFma"),CE={};CE=function(e){return xD({tag:"svg",attr:{className:"icon",viewBox:"0 0 1024 1024",fill:"currentColor"},child:[{tag:"path",attr:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-32 736H663.9V602.2h104l15.6-120.7H663.9v-77.1c0-35 9.7-58.8 59.8-58.8h63.9v-108c-11.1-1.5-49-4.8-93.2-4.8-92.2 0-155.3 56.3-155.3 159.6v89H434.9v120.7h104.3V848H176V176h672v672z"}}],content:"\n"})(e)};var CS={};CS=function(e){return xD({tag:"svg",attr:{className:"icon",viewBox:"0 0 1024 1024",fill:"currentColor"},child:[{tag:"path",attr:{d:"M512 306.9c-113.5 0-205.1 91.6-205.1 205.1S398.5 717.1 512 717.1 717.1 625.5 717.1 512 625.5 306.9 512 306.9zm0 338.4c-73.4 0-133.3-59.9-133.3-133.3S438.6 378.7 512 378.7 645.3 438.6 645.3 512 585.4 645.3 512 645.3zm213.5-394.6c-26.5 0-47.9 21.4-47.9 47.9s21.4 47.9 47.9 47.9 47.9-21.3 47.9-47.9a47.84 47.84 0 0 0-47.9-47.9zM911.8 512c0-55.2.5-109.9-2.6-165-3.1-64-17.7-120.8-64.5-167.6-46.9-46.9-103.6-61.4-167.6-64.5-55.2-3.1-109.9-2.6-165-2.6-55.2 0-109.9-.5-165 2.6-64 3.1-120.8 17.7-167.6 64.5C132.6 226.3 118.1 283 115 347c-3.1 55.2-2.6 109.9-2.6 165s-.5 109.9 2.6 165c3.1 64 17.7 120.8 64.5 167.6 46.9 46.9 103.6 61.4 167.6 64.5 55.2 3.1 109.9 2.6 165 2.6 55.2 0 109.9.5 165-2.6 64-3.1 120.8-17.7 167.6-64.5 46.9-46.9 61.4-103.6 64.5-167.6 3.2-55.1 2.6-109.8 2.6-165zm-88 235.8c-7.3 18.2-16.1 31.8-30.2 45.8-14.1 14.1-27.6 22.9-45.8 30.2C695.2 844.7 570.3 840 512 840c-58.3 0-183.3 4.7-235.9-16.1-18.2-7.3-31.8-16.1-45.8-30.2-14.1-14.1-22.9-27.6-30.2-45.8C179.3 695.2 184 570.3 184 512c0-58.3-4.7-183.3 16.1-235.9 7.3-18.2 16.1-31.8 30.2-45.8s27.6-22.9 45.8-30.2C328.7 179.3 453.7 184 512 184s183.3-4.7 235.9 16.1c18.2 7.3 31.8 16.1 45.8 30.2 14.1 14.1 22.9 27.6 30.2 45.8C844.7 328.7 840 453.7 840 512c0 58.3 4.7 183.2-16.2 235.8z"}}],content:"\n"})(e)};var CC={};CC=function(e){return xD({tag:"svg",attr:{className:"icon",viewBox:"0 0 1024 1024",fill:"currentColor"},child:[{tag:"path",attr:{d:"M960 509.2c0-2.2 0-4.7-.1-7.6-.1-8.1-.3-17.2-.5-26.9-.8-27.9-2.2-55.7-4.4-81.9-3-36.1-7.4-66.2-13.4-88.8a139.52 139.52 0 0 0-98.3-98.5c-28.3-7.6-83.7-12.3-161.7-15.2-37.1-1.4-76.8-2.3-116.5-2.8-13.9-.2-26.8-.3-38.4-.4h-29.4c-11.6.1-24.5.2-38.4.4-39.7.5-79.4 1.4-116.5 2.8-78 3-133.5 7.7-161.7 15.2A139.35 139.35 0 0 0 82.4 304C76.3 326.6 72 356.7 69 392.8c-2.2 26.2-3.6 54-4.4 81.9-.3 9.7-.4 18.8-.5 26.9 0 2.9-.1 5.4-.1 7.6v5.6c0 2.2 0 4.7.1 7.6.1 8.1.3 17.2.5 26.9.8 27.9 2.2 55.7 4.4 81.9 3 36.1 7.4 66.2 13.4 88.8 12.8 47.9 50.4 85.7 98.3 98.5 28.2 7.6 83.7 12.3 161.7 15.2 37.1 1.4 76.8 2.3 116.5 2.8 13.9.2 26.8.3 38.4.4h29.4c11.6-.1 24.5-.2 38.4-.4 39.7-.5 79.4-1.4 116.5-2.8 78-3 133.5-7.7 161.7-15.2 47.9-12.8 85.5-50.5 98.3-98.5 6.1-22.6 10.4-52.7 13.4-88.8 2.2-26.2 3.6-54 4.4-81.9.3-9.7.4-18.8.5-26.9 0-2.9.1-5.4.1-7.6v-5.6zm-72 5.2c0 2.1 0 4.4-.1 7.1-.1 7.8-.3 16.4-.5 25.7-.7 26.6-2.1 53.2-4.2 77.9-2.7 32.2-6.5 58.6-11.2 76.3-6.2 23.1-24.4 41.4-47.4 47.5-21 5.6-73.9 10.1-145.8 12.8-36.4 1.4-75.6 2.3-114.7 2.8-13.7.2-26.4.3-37.8.3h-28.6l-37.8-.3c-39.1-.5-78.2-1.4-114.7-2.8-71.9-2.8-124.9-7.2-145.8-12.8-23-6.2-41.2-24.4-47.4-47.5-4.7-17.7-8.5-44.1-11.2-76.3-2.1-24.7-3.4-51.3-4.2-77.9-.3-9.3-.4-18-.5-25.7 0-2.7-.1-5.1-.1-7.1v-4.8c0-2.1 0-4.4.1-7.1.1-7.8.3-16.4.5-25.7.7-26.6 2.1-53.2 4.2-77.9 2.7-32.2 6.5-58.6 11.2-76.3 6.2-23.1 24.4-41.4 47.4-47.5 21-5.6 73.9-10.1 145.8-12.8 36.4-1.4 75.6-2.3 114.7-2.8 13.7-.2 26.4-.3 37.8-.3h28.6l37.8.3c39.1.5 78.2 1.4 114.7 2.8 71.9 2.8 124.9 7.2 145.8 12.8 23 6.2 41.2 24.4 47.4 47.5 4.7 17.7 8.5 44.1 11.2 76.3 2.1 24.7 3.4 51.3 4.2 77.9.3 9.3.4 18 .5 25.7 0 2.7.1 5.1.1 7.1v4.8zM423 646l232-135-232-133z"}}],content:"\n"})(e)};var CO={};CO=function(e){return xD({tag:"svg",attr:{className:"icon",viewBox:"0 0 1024 1024",fill:"currentColor"},child:[{tag:"path",attr:{d:"M912 302.3L784 376V224c0-35.3-28.7-64-64-64H128c-35.3 0-64 28.7-64 64v576c0 35.3 28.7 64 64 64h592c35.3 0 64-28.7 64-64V648l128 73.7c21.3 12.3 48-3.1 48-27.6V330c0-24.6-26.7-40-48-27.7zM712 792H136V232h576v560zm176-167l-104-59.8V458.9L888 399v226zM208 360h112c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H208c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z"}}],content:"\n"})(e)};var Ck={};Ck=function(e){return xD({tag:"svg",attr:{viewBox:"0 0 20 20",fill:"currentColor"},child:[{tag:"path",attr:{d:"M4 18h12V6h-4V2H4v16zm-2 1V0h12l4 4v16H2v-1z"}}]})(e)};var CP={};CP=function(e){return xD({tag:"svg",attr:{className:"icon",viewBox:"0 0 1024 1024",fill:"currentColor"},child:[{tag:"path",attr:{d:"M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 632H136V232h752v560zM610.3 476h123.4c1.3 0 2.3-3.6 2.3-8v-48c0-4.4-1-8-2.3-8H610.3c-1.3 0-2.3 3.6-2.3 8v48c0 4.4 1 8 2.3 8zm4.8 144h185.7c3.9 0 7.1-3.6 7.1-8v-48c0-4.4-3.2-8-7.1-8H615.1c-3.9 0-7.1 3.6-7.1 8v48c0 4.4 3.2 8 7.1 8zM224 673h43.9c4.2 0 7.6-3.3 7.9-7.5 3.8-50.5 46-90.5 97.2-90.5s93.4 40 97.2 90.5c.3 4.2 3.7 7.5 7.9 7.5H522a8 8 0 0 0 8-8.4c-2.8-53.3-32-99.7-74.6-126.1a111.8 111.8 0 0 0 29.1-75.5c0-61.9-49.9-112-111.4-112s-111.4 50.1-111.4 112c0 29.1 11 55.5 29.1 75.5a158.09 158.09 0 0 0-74.6 126.1c-.4 4.6 3.2 8.4 7.8 8.4zm149-262c28.5 0 51.7 23.3 51.7 52s-23.2 52-51.7 52-51.7-23.3-51.7-52 23.2-52 51.7-52z"}}],content:"\n"})(e)};let CT=[["Instagram Post",1080,1080,"px",(0,p.jsx)(l(CS),{})],["Instagram Story",1080,1920,"px",(0,p.jsx)(l(CS),{})],["Instagram Ad",1080,1080,"px",(0,p.jsx)(l(CS),{})],["Facebook Post",940,788,"px",(0,p.jsx)(l(CE),{})],["Facebook Cover",851,315,"px",(0,p.jsx)(l(CE),{})],["Facebook Ad",1200,628,"px",(0,p.jsx)(l(CE),{})],["Youtube Thumbnail",1280,720,"px",(0,p.jsx)(l(CC),{})],["Youtube Channel",2560,1440,"px",(0,p.jsx)(l(CC),{})],["Full HD",1920,1080,"px",(0,p.jsx)(l(CO),{})],["Invitation",14,14,"cm",(0,p.jsx)(l(Ck),{})],["A4",21,29.7,"cm",(0,p.jsx)(l(Ck),{})],["Business card",3.5,2,"in",(0,p.jsx)(l(CP),{})]],CA=({value:e,onChange:t,...n})=>{let[r,i]=l(v).useState(e),o=l(v).useRef(e);o.current=r;let a=()=>{t(Math.max(10,o.current))};return l(v).useEffect(()=>{i(e)},[e]),(0,p.jsx)(mi,{...n,value:r,onValueChange:e=>{Number.isNaN(e)||i(e)},onBlur:a,onKeyDown:e=>{"Enter"===e.key&&a()}})},CN=P(({store:e})=>{let[t,n]=l(v).useState(!0),[r,i]=l(v).useState(e.width),[o,a]=l(v).useState(e.height),s=e.activePage?.computedWidth||e.width;l(v).useEffect(()=>{i(lt({px:s,unit:e.unit,dpi:e.dpi}))},[s,e.unit,e.dpi]);let u=e.activePage?.computedHeight||e.height;return l(v).useEffect(()=>{a(lt({px:u,unit:e.unit,dpi:e.dpi}))},[u,e.unit,e.dpi]),(0,p.jsxs)("div",{style:{height:"100%",overflow:"auto",paddingRight:"3px"},children:[(0,p.jsxs)("div",{style:{paddingBottom:"15px"},children:[(0,p.jsxs)(ET,{checked:t,onChange:e=>{n(e.target.checked)},alignIndicator:lB.RIGHT,style:{marginTop:"8px",marginBottom:"25px"},children:[lT("sidePanel.useMagicResize")," ",(0,p.jsx)(gC,{content:lT("sidePanel.magicResizeDescription"),position:lV.BOTTOM,children:(0,p.jsx)(fC,{icon:"help"})})]}),(0,p.jsxs)("div",{style:{width:"50%",display:"inline-block"},children:[lT("sidePanel.width")," (",e.unit,")"]}),(0,p.jsx)("div",{style:{width:"50%",display:"inline-block"},children:(0,p.jsx)(CA,{fill:!0,value:r,onChange:e=>{e||(e=10),i(e)},min:10,max:1e4,selectAllOnFocus:!0,minorStepSize:.01})})]}),(0,p.jsxs)("div",{style:{paddingBottom:"15px"},children:[(0,p.jsxs)("div",{style:{width:"50%",display:"inline-block"},children:[lT("sidePanel.height")," (",e.unit,")"]}),(0,p.jsx)("div",{style:{width:"50%",display:"inline-block"},children:(0,p.jsx)(CA,{fill:!0,value:o,onChange:e=>{e||(e=10),a(e)},min:10,max:1e4,selectAllOnFocus:!0,minorStepSize:.01})})]}),(0,p.jsx)("div",{style:{paddingBottom:"15px"},children:(0,p.jsx)(fA,{fill:!0,intent:"primary",onClick:()=>{let n=ln({unitVal:r,dpi:e.dpi,unit:e.unit}),i=ln({unitVal:o,dpi:e.dpi,unit:e.unit});e.setSize(n,i,t),e.activePage?.width!=="auto"&&e.activePage?.set({width:n}),e.activePage?.height!=="auto"&&e.activePage?.set({height:i})},children:lT("sidePanel.resize")})}),CT.map(([n,r,i,o,a])=>(0,p.jsxs)(fA,{style:{width:"100%",paddingTop:"10px",paddingBottom:"10px",fontSize:"16px"},minimal:!0,onClick:()=>{let n=ln({unitVal:r,dpi:e.dpi,unit:o}),a=ln({unitVal:i,dpi:e.dpi,unit:o});e.setUnit({unit:o,dpi:e.dpi}),e.setSize(n,a,t),e.activePage?.width!=="auto"&&e.activePage?.set({width:n}),e.activePage?.height!=="auto"&&e.activePage?.set({height:a})},icon:a,alignText:"left",children:[n,(0,p.jsxs)("span",{style:{fontSize:"0.7rem",paddingLeft:"20px",float:"right",lineHeight:"1.1rem"},children:[r," x ",i," ",o]})]},n))]})});var v=h("8NFma");function Cj(e){return new Promise(t=>{let n=document.createElement("img");n.onload=async()=>{0===n.width||0===n.height?t(await iX(e)):t({width:n.width,height:n.height})},n.crossOrigin="anonymous",n.src=e})}function CR(e){return new Promise((t,n)=>{let r=document.createElement("img");r.onload=()=>{t(r)},r.onerror=e=>{n(e)},r.crossOrigin="anonymous",r.src=e})}async function CI(e,t){let n,r;let i=await CR(e),o=document.createElement("canvas");o.width=2*i.width,o.height=2*i.height,o.getContext("2d").drawImage(i,0,0,o.width,o.height);let a=document.createElement("canvas");a.width=t.width,a.height=t.height;let l=a.getContext("2d"),{cropX:s,cropY:u}=t,c=o.width*t.cropWidth,d=o.height*t.cropHeight,h=t.width/t.height,f=c/d;return"svg"===t.type?(n=c,r=d):h>=f?(n=c,r=c/h):(n=d*h,r=d),l.drawImage(o,s*o.width,u*o.height,n,r,0,0,a.width,a.height),a.toDataURL("image/png")}function CL(e,t){let n,r;let{width:i,height:o}=e,a=i/o;a>=t.width/t.height?(n=t.width,r=t.width/a):(n=t.height*a,r=t.height);let l=(t.width-n)/2,s=(t.height-r)/2;return{cropX:l/t.width,cropY:s/t.height,cropWidth:n/t.width,cropHeight:r/t.height}}async function CM(e){return new Promise((t,n)=>{let r=new FileReader;r.readAsDataURL(e),r.onload=()=>t(r.result),r.onerror=e=>n(e)})}let CD=async e=>CM(e),CF=[],Cz=({store:e})=>{let[t,n]=l(v).useState(CF),[r,i]=l(v).useState(!1),o=l(v).useRef(null),a=async e=>{let{target:t}=e;for(let e of(i(!0),t.files)){let t=await CD(e),r=function(e){let{type:t}=e;return t.indexOf("svg")>=0?"svg":t.indexOf("image")>=0?"image":t.indexOf("video")>=0?"video":"image"}(e),i=t;"video"===r&&(i=await Sq(t)),n(e=>e.concat([{url:t,type:r,preview:i}]))}i(!1),t.value=""};return l(v).useEffect(()=>{CF=t},[t]),(0,p.jsxs)("div",{style:{height:"100%",display:"flex",flexDirection:"column"},children:[(0,p.jsx)("div",{style:{height:"45px",paddingTop:"5px"},children:lT("sidePanel.uploadTip")}),(0,p.jsx)("div",{style:{marginBottom:"20px"},children:(0,p.jsxs)("label",{htmlFor:"input-file",children:[(0,p.jsx)(fA,{icon:"upload",style:{width:"100%"},onClick:()=>{o.current?.click()},children:lT("sidePanel.uploadImage")}),(0,p.jsx)("input",{type:"file",ref:o,style:{display:"none"},onChange:a,multiple:!0})]})}),(0,p.jsx)(Cm,{images:t,isLoading:r,getPreview:e=>e.preview,onSelect:async(t,n,r)=>{let i=t.url,o=t.type,{width:a,height:l}=await ("video"===o?SH:Cj)(i);if(r&&"svg"===r.type&&r.contentEditable&&"image"===o){r.set({maskSrc:i});return}if(r&&"image"===r.type&&r.contentEditable&&"image"==o){let e=CL(r,{width:a,height:l});r.set({src:i,...e});return}let s=Math.min(e.width/a,e.height/l,1);a*=s,l*=s;let u=(n?.x||e.width/2)-a/2,c=(n?.y||e.height/2)-l/2;e.activePage?.addElement({type:o,src:i,x:u,y:c,width:a,height:l})}})]})};h("8NFma");let CB=({store:e})=>{let{setQuery:t,loadMore:n,isReachingEnd:r,data:i,isLoading:o,error:a}=vw({defaultQuery:"",getAPI:({page:e,query:t})=>aQ({page:e,query:t})});return(0,p.jsxs)("div",{style:{height:"100%",display:"flex",flexDirection:"column"},children:[(0,p.jsx)(g5,{leftIcon:"search",placeholder:lT("sidePanel.searchPlaceholder"),onChange:e=>{t(e.target.value)},type:"search",style:{marginBottom:"20px"}}),(0,p.jsxs)("p",{style:{textAlign:"center"},children:["Photos by"," ",(0,p.jsx)("a",{href:"https://unsplash.com/",target:"_blank",children:"Unsplash"})]}),(0,p.jsx)(Cm,{images:i?.map(e=>e.results).flat().filter(Boolean),getPreview:e=>e.urls.small,onSelect:async(t,n,r)=>{if(fetch(aJ(t.id)),r&&"svg"===r.type&&r.contentEditable){r.set({maskSrc:t.urls.regular});return}let{width:i,height:o}=await Cj(t.urls.small);if(r&&"image"===r.type&&r.contentEditable){let e=CL(r,{width:i,height:o});r.set({src:t.urls.regular,...e});return}let a=(n?.x||e.width/2)-i/2,l=(n?.y||e.height/2)-o/2;e.activePage?.addElement({type:"image",src:t.urls.regular,width:i,height:o,x:a,y:l})},isLoading:o,error:a,loadMore:!r&&n,getCredit:e=>(0,p.jsxs)("span",{children:["Photo by"," ",(0,p.jsx)("a",{href:`https://unsplash.com/@${e.user.username}?utm_source=polotno&utm_medium=referral`,target:"_blank",children:e.user.name})," ","on"," ",(0,p.jsx)("a",{href:"https://unsplash.com/?utm_source=polotno&utm_medium=referral",target:"_blank",children:"Unsplash"})]})})]})};h("8NFma");var CU={};CU=function(e){return xD({tag:"svg",attr:{viewBox:"0 0 512 512",fill:"currentColor"},child:[{tag:"path",attr:{d:"M430.1 347.9c-6.6-6.1-16.3-7.6-24.6-9-11.5-1.9-15.9-4-22.6-10-14.3-12.7-14.3-31.1 0-43.8l30.3-26.9c46.4-41 46.4-108.2 0-149.2-34.2-30.1-80.1-45-127.8-45-55.7 0-113.9 20.3-158.8 60.1-83.5 73.8-83.5 194.7 0 268.5 41.5 36.7 97.5 55 152.9 55.4h1.7c55.4 0 110-17.9 148.8-52.4 14.4-12.7 12-36.6.1-47.7zM120 216c0-17.7 14.3-32 32-32s32 14.3 32 32-14.3 32-32 32-32-14.3-32-32zm40 126c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm64-161c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm72 219c-26.5 0-48-21.5-48-48s21.5-48 48-48 48 21.5 48 48-21.5 48-48 48zm24-208c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32z"}}]})(e)};let CH=["white","rgb(82, 113, 255)","rgb(255, 145, 77)","rgb(126, 217, 87)","rgb(255, 222, 89)","rgb(203, 108, 230)","rgb(0, 0, 0, 0)"],CV=at("div")`
|
|
258
258
|
display: inline-block;
|
|
259
259
|
width: 30px;
|
|
260
260
|
height: 30px;
|
|
@@ -362,13 +362,13 @@ For simpler debugging here is the log of the parent element:`,lj=(e,t,n,r,i,o)=>
|
|
|
362
362
|
Plugins prop is no longer supported.
|
|
363
363
|
Instead, mount it with "Sortable.mount(new MultiDrag())"
|
|
364
364
|
Please read the updated README.md at https://github.com/SortableJS/react-sortablejs.
|
|
365
|
-
`)}componentDidMount(){if(null===this.ref.current)return;let e=this.makeOptions();P6(Oo).create(this.ref.current,e)}componentDidUpdate(e){e.disabled!==this.props.disabled&&this.sortable&&this.sortable.option("disabled",this.props.disabled)}render(){let{tag:e,style:t,className:n,id:r}=this.props;return(0,v.createElement)(e&&null!==e?e:"div",{ref:this.ref,style:t,className:n,id:r},this.getChildren())}getChildren(){let{children:e,dataIdAttr:t,selectedClass:n="sortable-selected",chosenClass:r="sortable-chosen",dragClass:i="sortable-drag",fallbackClass:o="sortable-falback",ghostClass:a="sortable-ghost",swapClass:l="sortable-swap-highlight",filter:s="sortable-filter",list:u}=this.props;if(!e||null==e)return null;let c=t||"data-id";return(0,v.Children).map(e,(e,t)=>{if(void 0===e)return;let i=u[t]||{},{className:o}=e.props,a="string"==typeof s&&{[s.replace(".","")]:!!i.filtered},l=P6(P2)(o,{[n]:i.selected,[r]:i.chosen,...a});return(0,v.cloneElement)(e,{[c]:e.key,className:l})})}get sortable(){let e=this.ref.current;if(null===e)return null;let t=Object.keys(e).find(e=>e.includes("Sortable"));return t?e[t]:null}makeOptions(){let e=function(e){let{list:t,setList:n,children:r,tag:i,style:o,className:a,clone:l,onAdd:s,onChange:u,onChoose:c,onClone:d,onEnd:h,onFilter:f,onRemove:p,onSort:g,onStart:m,onUnchoose:v,onUpdate:y,onMove:b,onSpill:w,onSelect:x,onDeselect:_,...E}=e;return E}(this.props);return["onAdd","onChoose","onDeselect","onEnd","onRemove","onSelect","onSpill","onStart","onUnchoose","onUpdate"].forEach(t=>e[t]=this.prepareOnHandlerPropAndDOM(t)),["onChange","onClone","onFilter","onSort"].forEach(t=>e[t]=this.prepareOnHandlerProp(t)),{...e,onMove:(e,t)=>{let{onMove:n}=this.props,r=e.willInsertAfter||-1;if(!n)return r;let i=n(e,t,this.sortable,Ti);return void 0!==i&&i}}}prepareOnHandlerPropAndDOM(e){return t=>{this.callOnHandlerProp(t,e),this[e](t)}}prepareOnHandlerProp(e){return t=>{this.callOnHandlerProp(t,e)}}callOnHandlerProp(e,t){let n=this.props[t];n&&n(e,this.sortable,Ti)}onAdd(e){let{list:t,setList:n,clone:r}=this.props,i=Te(e,[...Ti.dragging.props.list]);P9(i),n(Tn(i,t,e,r).map(e=>Object.assign(e,{selected:!1})),this.sortable,Ti)}onRemove(e){let{list:t,setList:n}=this.props,r=Tr(e),i=Te(e,t);P7(i);let o=[...t];if("clone"!==e.pullMode)o=Tt(i,o);else{let t=i;switch(r){case"multidrag":t=i.map((t,n)=>({...t,element:e.clones[n]}));break;case"normal":t=i.map(t=>({...t,element:e.clone}));break;default:P6(P3)(!0,`mode "${r}" cannot clone. Please remove "props.clone" from <ReactSortable/> when using the "${r}" plugin`)}P9(t),i.forEach(t=>{let n=t.oldIndex,r=this.props.clone(t.item,e);o.splice(n,1,r)})}n(o=o.map(e=>Object.assign(e,{selected:!1})),this.sortable,Ti)}onUpdate(e){let{list:t,setList:n}=this.props,r=Te(e,t);return P9(r),P7(r),n(function(e,t){let n=Tt(e,t);return Tn(e,n)}(r,t),this.sortable,Ti)}onStart(){Ti.dragging=this}onEnd(){Ti.dragging=null}onChoose(e){let{list:t,setList:n}=this.props;n(t.map((t,n)=>{let r=t;return n===e.oldIndex&&(r=Object.assign(t,{chosen:!0})),r}),this.sortable,Ti)}onUnchoose(e){let{list:t,setList:n}=this.props;n(t.map((t,n)=>{let r=t;return n===e.oldIndex&&(r=Object.assign(r,{chosen:!1})),r}),this.sortable,Ti)}onSpill(e){let{removeOnSpill:t,revertOnSpill:n}=this.props;t&&!n&&P8(e.item)}onSelect(e){let{list:t,setList:n}=this.props,r=t.map(e=>Object.assign(e,{selected:!1}));e.newIndicies.forEach(t=>{let n=t.index;if(-1===n){console.log(`"${e.type}" had indice of "${t.index}", which is probably -1 and doesn't usually happen here.`),console.log(e);return}r[n].selected=!0}),n(r,this.sortable,Ti)}onDeselect(e){let{list:t,setList:n}=this.props,r=t.map(e=>Object.assign(e,{selected:!1}));e.newIndicies.forEach(e=>{let t=e.index;-1!==t&&(r[t].selected=!0)}),n(r,this.sortable,Ti)}}Object.keys(o={}).forEach(function(e){"default"===e||"__esModule"===e||Oi.hasOwnProperty(e)||Object.defineProperty(Oi,e,{enumerable:!0,get:function(){return o[e]}})});let Ta=P(({element:e,store:t})=>{let n=t.selectedElements.indexOf(e)>=0,[r,i]=l(v).useState(!1),o=()=>i(!1),a=r?e.name:e.name||
|
|
365
|
+
`)}componentDidMount(){if(null===this.ref.current)return;let e=this.makeOptions();P6(Oo).create(this.ref.current,e)}componentDidUpdate(e){e.disabled!==this.props.disabled&&this.sortable&&this.sortable.option("disabled",this.props.disabled)}render(){let{tag:e,style:t,className:n,id:r}=this.props;return(0,v.createElement)(e&&null!==e?e:"div",{ref:this.ref,style:t,className:n,id:r},this.getChildren())}getChildren(){let{children:e,dataIdAttr:t,selectedClass:n="sortable-selected",chosenClass:r="sortable-chosen",dragClass:i="sortable-drag",fallbackClass:o="sortable-falback",ghostClass:a="sortable-ghost",swapClass:l="sortable-swap-highlight",filter:s="sortable-filter",list:u}=this.props;if(!e||null==e)return null;let c=t||"data-id";return(0,v.Children).map(e,(e,t)=>{if(void 0===e)return;let i=u[t]||{},{className:o}=e.props,a="string"==typeof s&&{[s.replace(".","")]:!!i.filtered},l=P6(P2)(o,{[n]:i.selected,[r]:i.chosen,...a});return(0,v.cloneElement)(e,{[c]:e.key,className:l})})}get sortable(){let e=this.ref.current;if(null===e)return null;let t=Object.keys(e).find(e=>e.includes("Sortable"));return t?e[t]:null}makeOptions(){let e=function(e){let{list:t,setList:n,children:r,tag:i,style:o,className:a,clone:l,onAdd:s,onChange:u,onChoose:c,onClone:d,onEnd:h,onFilter:f,onRemove:p,onSort:g,onStart:m,onUnchoose:v,onUpdate:y,onMove:b,onSpill:w,onSelect:x,onDeselect:_,...E}=e;return E}(this.props);return["onAdd","onChoose","onDeselect","onEnd","onRemove","onSelect","onSpill","onStart","onUnchoose","onUpdate"].forEach(t=>e[t]=this.prepareOnHandlerPropAndDOM(t)),["onChange","onClone","onFilter","onSort"].forEach(t=>e[t]=this.prepareOnHandlerProp(t)),{...e,onMove:(e,t)=>{let{onMove:n}=this.props,r=e.willInsertAfter||-1;if(!n)return r;let i=n(e,t,this.sortable,Ti);return void 0!==i&&i}}}prepareOnHandlerPropAndDOM(e){return t=>{this.callOnHandlerProp(t,e),this[e](t)}}prepareOnHandlerProp(e){return t=>{this.callOnHandlerProp(t,e)}}callOnHandlerProp(e,t){let n=this.props[t];n&&n(e,this.sortable,Ti)}onAdd(e){let{list:t,setList:n,clone:r}=this.props,i=Te(e,[...Ti.dragging.props.list]);P9(i),n(Tn(i,t,e,r).map(e=>Object.assign(e,{selected:!1})),this.sortable,Ti)}onRemove(e){let{list:t,setList:n}=this.props,r=Tr(e),i=Te(e,t);P7(i);let o=[...t];if("clone"!==e.pullMode)o=Tt(i,o);else{let t=i;switch(r){case"multidrag":t=i.map((t,n)=>({...t,element:e.clones[n]}));break;case"normal":t=i.map(t=>({...t,element:e.clone}));break;default:P6(P3)(!0,`mode "${r}" cannot clone. Please remove "props.clone" from <ReactSortable/> when using the "${r}" plugin`)}P9(t),i.forEach(t=>{let n=t.oldIndex,r=this.props.clone(t.item,e);o.splice(n,1,r)})}n(o=o.map(e=>Object.assign(e,{selected:!1})),this.sortable,Ti)}onUpdate(e){let{list:t,setList:n}=this.props,r=Te(e,t);return P9(r),P7(r),n(function(e,t){let n=Tt(e,t);return Tn(e,n)}(r,t),this.sortable,Ti)}onStart(){Ti.dragging=this}onEnd(){Ti.dragging=null}onChoose(e){let{list:t,setList:n}=this.props;n(t.map((t,n)=>{let r=t;return n===e.oldIndex&&(r=Object.assign(t,{chosen:!0})),r}),this.sortable,Ti)}onUnchoose(e){let{list:t,setList:n}=this.props;n(t.map((t,n)=>{let r=t;return n===e.oldIndex&&(r=Object.assign(r,{chosen:!1})),r}),this.sortable,Ti)}onSpill(e){let{removeOnSpill:t,revertOnSpill:n}=this.props;t&&!n&&P8(e.item)}onSelect(e){let{list:t,setList:n}=this.props,r=t.map(e=>Object.assign(e,{selected:!1}));e.newIndicies.forEach(t=>{let n=t.index;if(-1===n){console.log(`"${e.type}" had indice of "${t.index}", which is probably -1 and doesn't usually happen here.`),console.log(e);return}r[n].selected=!0}),n(r,this.sortable,Ti)}onDeselect(e){let{list:t,setList:n}=this.props,r=t.map(e=>Object.assign(e,{selected:!1}));e.newIndicies.forEach(e=>{let t=e.index;-1!==t&&(r[t].selected=!0)}),n(r,this.sortable,Ti)}}Object.keys(o={}).forEach(function(e){"default"===e||"__esModule"===e||Oi.hasOwnProperty(e)||Object.defineProperty(Oi,e,{enumerable:!0,get:function(){return o[e]}})});let Ta=P(({element:e,store:t})=>{let n=t.selectedElements.indexOf(e)>=0,[r,i]=l(v).useState(!1),o=()=>i(!1),a=r?e.name:e.name||iP(e.text)||`#${e.id}`;return(0,p.jsx)(Ot,{onMouseDown:n=>{let r=n.ctrlKey||n.metaKey||n.shiftKey?[...t.selectedElementsIds]:[];0>r.indexOf(e.id)&&r.push(e.id),t.selectElements(r)},style:{padding:"5px",margin:"0px 1px 5px 1px",backgroundColor:n?"rgb(0, 161, 255, 0.2)":"",display:e.selectable||"admin"===t.role?"auto":"none"},children:(0,p.jsxs)("div",{style:{display:"flex",justifyContent:"space-between"},children:[(0,p.jsxs)("div",{style:{lineHeight:"30px",display:"flex"},children:[(0,p.jsx)("div",{className:"drag-handle",style:{display:"flex",justifyContent:"center",alignItems:"center",cursor:"move",height:"30px"},children:(0,p.jsx)(fC,{icon:"drag-handle-vertical"})}),(0,p.jsx)("div",{style:{padding:"0 7px",opacity:.5,width:"55px"},children:lT("sidePanel.layerTypes."+e.type)}),(0,p.jsx)("div",{style:{maxWidth:"142px"},children:(0,p.jsx)(On,{minWidth:130,placeholder:lT("sidePanel.namePlaceholder"),value:a,maxLines:1,onEdit:()=>i(!0),onCancel:o,onConfirm:o,onChange:t=>{e.set({name:t})}})})]}),(0,p.jsxs)("div",{children:[(0,p.jsx)(fA,{minimal:!0,icon:e?.visible?"eye-open":"eye-off",onClick:()=>{e.set({visible:!e.visible})}}),(0,p.jsx)(fA,{minimal:!0,icon:e?.locked?"lock":"unlock",onClick:()=>{e.set({draggable:e.locked,contentEditable:e.locked,styleEditable:e.locked,resizable:e.locked})}}),(0,p.jsx)(fA,{icon:"trash",minimal:!0,disabled:!e.removable,onClick:()=>{t.deleteElements([e.id])},style:{marginLeft:"auto"}})]})]})})}),Tl=P(({store:e})=>{let t=e.activePage?.children.map(e=>({id:e.id}))||[];return t.reverse(),(0,p.jsxs)("div",{style:{height:"100%",overflow:"auto"},children:[(0,p.jsx)("div",{style:{height:"40px",paddingTop:"5px"},children:lT("sidePanel.layersTip")}),(0,p.jsxs)("div",{children:[0===t.length?(0,p.jsx)("div",{children:lT("sidePanel.noLayers")}):null,(0,p.jsx)(Oi.ReactSortable,{list:t,setList:t=>{t.forEach(({id:n},r)=>{let i=t.length-r-1,o=e.getElementById(n);e.activePage?.children.indexOf(o)!==i&&e.activePage?.setElementZIndex(o.id,i)})},direction:"horizontal",children:t.map(({id:t})=>{let n=e.getElementById(t);return(0,p.jsx)(Ta,{element:n,store:e},t)})})]})]})}),Ts={name:"templates",Tab:P(e=>(0,p.jsx)(Cl,{name:lT("sidePanel.templates"),...e,children:(0,p.jsx)(fC,{icon:"control"})})),Panel:({store:e})=>(0,p.jsx)(Oe,{store:e})},Tu={name:"text",Tab:P(e=>(0,p.jsx)(Cl,{name:lT("sidePanel.text"),...e,children:(0,p.jsx)(fC,{icon:"new-text-box"})})),Panel:({store:e})=>(0,p.jsx)(C_,{store:e})},Tc={name:"photos",Tab:P(e=>(0,p.jsx)(Cl,{name:lT("sidePanel.photos"),...e,children:(0,p.jsx)(fC,{icon:"media"})})),Panel:({store:e})=>(0,p.jsx)(CB,{store:e})},Td={name:"elements",Tab:P(e=>(0,p.jsx)(Cl,{name:lT("sidePanel.elements"),iconSize:16,...e,children:(0,p.jsx)("span",{className:"bp5-icon",children:(0,p.jsx)(l(Ci),{})})})),Panel:({store:e})=>(0,p.jsx)(C6,{store:e})},Th={name:"upload",Tab:P(e=>(0,p.jsx)(Cl,{name:lT("sidePanel.upload"),...e,children:(0,p.jsx)(fC,{icon:"cloud-upload"})})),Panel:({store:e})=>(0,p.jsx)(Cz,{store:e})},Tf={name:"background",Tab:P(e=>(0,p.jsx)(Cl,{name:lT("sidePanel.background"),...e,children:(0,p.jsx)(fC,{icon:"layout-grid"})})),Panel:({store:e})=>(0,p.jsx)(CG,{store:e})};P(e=>(0,p.jsx)(Cl,{name:lT("sidePanel.pages"),...e,children:(0,p.jsx)(l(Co),{})})),({store:e})=>(0,p.jsx)(C4,{store:e});let Tp={name:"layers",Tab:P(e=>(0,p.jsx)(Cl,{name:lT("sidePanel.layers"),...e,children:(0,p.jsx)(fC,{icon:"layers"})})),Panel:({store:e})=>(0,p.jsx)(Tl,{store:e})},Tg={name:"size",Tab:P(e=>(0,p.jsx)(Cl,{name:lT("sidePanel.resize"),...e,children:(0,p.jsx)(fC,{icon:"fullscreen"})})),Panel:({store:e})=>(0,p.jsx)(CN,{store:e})};P(e=>(0,p.jsx)(Cl,{name:lT("sidePanel.more"),...e,children:(0,p.jsx)(fC,{icon:"more"})}));let Tm=[Ts,Tu,Tc,Td,Th,Tf,Tp,Tg],Tv=at("div")`
|
|
366
366
|
display: flex;
|
|
367
367
|
height: 100% !important;
|
|
368
368
|
padding: 0px !important;
|
|
369
369
|
position: relative;
|
|
370
370
|
|
|
371
|
-
${
|
|
371
|
+
${iR(`
|
|
372
372
|
height: auto !important;
|
|
373
373
|
width: 100%;
|
|
374
374
|
position: relative;
|
|
@@ -379,7 +379,7 @@ Please read the updated README.md at https://github.com/SortableJS/react-sortabl
|
|
|
379
379
|
overflow-x: hidden;
|
|
380
380
|
min-width: 72px;
|
|
381
381
|
}
|
|
382
|
-
${
|
|
382
|
+
${iR(`
|
|
383
383
|
width: 100%;
|
|
384
384
|
overflow: auto;
|
|
385
385
|
`)}
|
|
@@ -387,7 +387,7 @@ Please read the updated README.md at https://github.com/SortableJS/react-sortabl
|
|
|
387
387
|
display: flex;
|
|
388
388
|
flex-direction: column;
|
|
389
389
|
|
|
390
|
-
${
|
|
390
|
+
${iR(`
|
|
391
391
|
flex-direction: row;
|
|
392
392
|
min-width: min-content;
|
|
393
393
|
`)}
|
|
@@ -403,7 +403,7 @@ Please read the updated README.md at https://github.com/SortableJS/react-sortabl
|
|
|
403
403
|
width: 0px;
|
|
404
404
|
}
|
|
405
405
|
|
|
406
|
-
${
|
|
406
|
+
${iR(`
|
|
407
407
|
&.bp5-navbar {
|
|
408
408
|
position: absolute;
|
|
409
409
|
bottom: 54px;
|
|
@@ -415,7 +415,7 @@ Please read the updated README.md at https://github.com/SortableJS/react-sortabl
|
|
|
415
415
|
`,Tx=at("div")`
|
|
416
416
|
display: none;
|
|
417
417
|
|
|
418
|
-
${
|
|
418
|
+
${iR(`
|
|
419
419
|
position: absolute;
|
|
420
420
|
bottom: 72px;
|
|
421
421
|
display: block;
|
|
@@ -471,10 +471,10 @@ Please read the updated README.md at https://github.com/SortableJS/react-sortabl
|
|
|
471
471
|
color: white;
|
|
472
472
|
}
|
|
473
473
|
|
|
474
|
-
${
|
|
474
|
+
${iR(`
|
|
475
475
|
display: none;
|
|
476
476
|
`)}
|
|
477
|
-
`,TE=({onClick:e})=>(0,p.jsxs)(T_,{onClick:e,children:[(0,p.jsx)("svg",{width:"15",height:"96",viewBox:"0 0 16 96",xmlns:"http://www.w3.org/2000/svg",children:(0,p.jsx)("path",{className:"fill stroke",d:"M 1 7 C 2 9 4 10 7.2 13.28 C 7.45 13.4625 7.6 13.6 7.7 13.8048 L 7.8 13.8 C 9.8 15.8 11.6 17.6 12.9 19.7 C 14 21.6 14.7 23.9 14.9 27 H 15 V 68 C 15 71.7 14.3 74.3 13 76.6 C 11.7 78.8 9.9 80.5 7.8 82.6344 L 7.79 82.6 C 7.6 82.8 7.4507 83 7.2729 83.2127 C 3.9102 86.5228 2 87 1 90"})}),(0,p.jsx)("div",{className:"pointer",children:"<"})]}),TS=P(({store:e,sections:t,defaultSection:n})=>{l(v).useLayoutEffect(()=>{e.openSidePanel(n||"photos")},[]);let r=t||Tm,i=r.filter(e=>e.visibleInList??!0),o=r.find(t=>t.name===e.openedSidePanel)?.Panel,a=
|
|
477
|
+
`,TE=({onClick:e})=>(0,p.jsxs)(T_,{onClick:e,children:[(0,p.jsx)("svg",{width:"15",height:"96",viewBox:"0 0 16 96",xmlns:"http://www.w3.org/2000/svg",children:(0,p.jsx)("path",{className:"fill stroke",d:"M 1 7 C 2 9 4 10 7.2 13.28 C 7.45 13.4625 7.6 13.6 7.7 13.8048 L 7.8 13.8 C 9.8 15.8 11.6 17.6 12.9 19.7 C 14 21.6 14.7 23.9 14.9 27 H 15 V 68 C 15 71.7 14.3 74.3 13 76.6 C 11.7 78.8 9.9 80.5 7.8 82.6344 L 7.79 82.6 C 7.6 82.8 7.4507 83 7.2729 83.2127 C 3.9102 86.5228 2 87 1 90"})}),(0,p.jsx)("div",{className:"pointer",children:"<"})]}),TS=P(({store:e,sections:t,defaultSection:n})=>{l(v).useLayoutEffect(()=>{e.openSidePanel(n||"photos")},[]);let r=t||Tm,i=r.filter(e=>e.visibleInList??!0),o=r.find(t=>t.name===e.openedSidePanel)?.Panel,a=iI();l(v).useLayoutEffect(()=>{a?e.openSidePanel(""):e.openSidePanel(n||"photos")},[a]);let s=l(v).useRef(null);return(0,p.jsxs)(Tv,{className:"bp5-navbar polotno-side-panel"+(e.openedSidePanel?"":" collapsed"),children:[(0,p.jsx)(Ty,{ref:s,className:"polotno-side-tabs-container",children:(0,p.jsx)(Tb,{className:"polotno-side-tabs-inner",children:i.map(({name:t,Tab:n})=>(0,p.jsx)(n,{active:t===e.openedSidePanel,onClick:()=>{e.openSidePanel(t)}},t))})}),o&&(0,p.jsx)(Tw,{className:"bp5-navbar polotno-panel-container",onClick:t=>{let n=t.target.closest(".polotno-close-panel"),r=t.target.closest(".polotno-mobile"),i=a||r;n&&i&&e.openSidePanel("")},children:(0,p.jsx)(o,{store:e})}),e.openedSidePanel&&(0,p.jsx)(Tx,{onClick:()=>e.openSidePanel("")}),e.openedSidePanel&&(0,p.jsx)(TE,{onClick:()=>e.openSidePanel("")})]})});h("8NFma");let TC=at("div")`
|
|
478
478
|
position: absolute;
|
|
479
479
|
bottom: 5px;
|
|
480
480
|
width: auto;
|
|
@@ -489,26 +489,26 @@ Please read the updated README.md at https://github.com/SortableJS/react-sortabl
|
|
|
489
489
|
opacity: 1;
|
|
490
490
|
}
|
|
491
491
|
|
|
492
|
-
${
|
|
492
|
+
${iR(`
|
|
493
493
|
display: none;
|
|
494
494
|
`)}
|
|
495
495
|
`,TO=[.1,.25,.5,.75,1,1.5,2,3],Tk=TO[TO.length-1],TP=TO[0],TT=P(({store:e})=>{let t=Math.max(Tk,e.scaleToFit),n=Math.min(TP,e.scaleToFit),r=e.scale<t,i=e.scale>n;return(0,p.jsxs)(gA.Group,{align:lB.LEFT,style:{height:"35px"},children:[(0,p.jsx)(fA,{icon:"zoom-out",minimal:!0,onClick:()=>{e.setScale(e.scale/1.2)},disabled:!i}),(0,p.jsx)(gw,{content:(0,p.jsxs)(gB,{style:{minWidth:"80px"},children:[TO.map(t=>(0,p.jsx)(gW,{text:Math.round(100*t)+"%",onClick:async()=>{e.setScale(t)}},t)),(0,p.jsx)(gW,{text:lT("scale.reset"),onClick:async()=>{e.setScale(e.scaleToFit)}})]}),children:(0,p.jsx)(fA,{minimal:!0,children:Math.round(100*e.scale)+"%"})}),(0,p.jsx)(fA,{icon:"zoom-in",minimal:!0,onClick:()=>{e.setScale(1.2*e.scale)},disabled:!r})]})}),TA=P(({store:e})=>(0,p.jsx)(TC,{children:(0,p.jsx)(gA,{style:{height:"35px",padding:"0 5px"},children:(0,p.jsx)(TT,{store:e})})}));var CW=(h("58B0H"),h("58B0H"));let TN=function(e,t){if(e===t)return!0;if("object"!=typeof e||null==e||"object"!=typeof t||null==t||Object.keys(e).length!=Object.keys(t).length)return!1;for(var n in e)if(!t.hasOwnProperty(n)||!TN(e[n],t[n]))return!1;return!0};Object.assign(CW.types);let Tj=(0,CW.types).model("UndoManager",{history:(0,CW.types).array((0,CW.types).frozen()),undoIdx:-1,targetPath:""}).views(e=>({get canUndo(){return e.undoIdx>0},get canRedo(){return e.undoIdx<e.history.length-1}})).actions(e=>{let t,n;let r=!1,i=null,o=0,a=0,l=()=>a>0;function s(){let e=(0,CW.getSnapshot)(t);return{pages:e.pages,width:e.width,height:e.height}}function u(e){TN(t.pages.map(e=>e.id),e.pages.map(e=>e.id))?t.pages.forEach((t,n)=>{(0,CW.applySnapshot)(t,e.pages[n])}):(0,CW.applySnapshot)(t.pages,e.pages),t.setSize(e.width,e.height)}return{startTransaction(){a++},endTransaction(e){a--,e||this.requestAddState(s())},async ignore(t,n=!1,r=!1){r&&await new Promise(e=>setTimeout(e,10)),o&&e.addUndoState();let i=l();e.startTransaction();let s=a;try{await t()}catch(e){setTimeout(()=>{throw e})}let u=s!==a;e.endTransaction(!u),n||i||e.replaceState(),u||(clearTimeout(o),o=0)},async transaction(t){await e.ignore(t,!0),this.addUndoState()},requestAddState(e){if(i=e,!o&&!l()){if(r){r=!1;return}o=setTimeout(()=>{clearTimeout(o=0),l()||this.addUndoState()},100)}},addUndoState(){if(r){r=!1;return}let t=e.history[e.undoIdx];TN(i,t)||(clearTimeout(o),o=0,e.history.splice(e.undoIdx+1),e.history.push(i),e.undoIdx=e.history.length-1)},afterCreate(){if(!(t=(0,CW.resolvePath)(e,"..")))throw Error("Failed to find target store for UndoManager. Please provide `targetPath` property, or a `targetStore` in the environment");n=(0,CW.onSnapshot)(t,()=>{this.requestAddState(s())}),0===e.history.length&&this.requestAddState(s())},clear(){clearTimeout(o),o=0,e.history.splice(0,e.history.length),e.undoIdx=-1,e.addUndoState(s())},beforeDestroy(){n()},undo(){if(o&&this.addUndoState(),!e.canUndo){console.warn("No undo history. Please check `store.history.canUndo` before calling undo action.");return}e.undoIdx--,r=!0,u(e.history[e.undoIdx])},redo(){if(o&&this.addUndoState(),!e.canRedo){console.warn("No redo history. Please check `store.history.canRedo` before calling redo action.");return}e.undoIdx++,r=!0,u(e.history[e.undoIdx])},replaceState(){e.history[e.undoIdx]=s()}}});async function TR(e,t){let n=await (await fetch(e)).blob(),r=document.createElement("a"),i=URL.createObjectURL(n);r.href=i,r.download=t,document.body.appendChild(r),r.click(),setTimeout(function(){document.body.removeChild(r),window.URL.revokeObjectURL(i)},0)}async function TI({width:e,height:t}){return new(await (window.GIF?Promise.resolve(window.GIF):new Promise(e=>{var t=document.createElement("script");t.onload=function(){e(window.GIF)},t.src="https://cdnjs.cloudflare.com/ajax/libs/gif.js/0.2.0/gif.js",document.head.appendChild(t)})))({workers:4,width:e,height:t,workerScript:URL.createObjectURL(new Blob([`// gif.worker.js 0.2.0 - https://github.com/jnordberg/gif.js
|
|
496
496
|
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){var NeuQuant=require("./TypedNeuQuant.js");var LZWEncoder=require("./LZWEncoder.js");function ByteArray(){this.page=-1;this.pages=[];this.newPage()}ByteArray.pageSize=4096;ByteArray.charMap={};for(var i=0;i<256;i++)ByteArray.charMap[i]=String.fromCharCode(i);ByteArray.prototype.newPage=function(){this.pages[++this.page]=new Uint8Array(ByteArray.pageSize);this.cursor=0};ByteArray.prototype.getData=function(){var rv="";for(var p=0;p<this.pages.length;p++){for(var i=0;i<ByteArray.pageSize;i++){rv+=ByteArray.charMap[this.pages[p][i]]}}return rv};ByteArray.prototype.writeByte=function(val){if(this.cursor>=ByteArray.pageSize)this.newPage();this.pages[this.page][this.cursor++]=val};ByteArray.prototype.writeUTFBytes=function(string){for(var l=string.length,i=0;i<l;i++)this.writeByte(string.charCodeAt(i))};ByteArray.prototype.writeBytes=function(array,offset,length){for(var l=length||array.length,i=offset||0;i<l;i++)this.writeByte(array[i])};function GIFEncoder(width,height){this.width=~~width;this.height=~~height;this.transparent=null;this.transIndex=0;this.repeat=-1;this.delay=0;this.image=null;this.pixels=null;this.indexedPixels=null;this.colorDepth=null;this.colorTab=null;this.neuQuant=null;this.usedEntry=new Array;this.palSize=7;this.dispose=-1;this.firstFrame=true;this.sample=10;this.dither=false;this.globalPalette=false;this.out=new ByteArray}GIFEncoder.prototype.setDelay=function(milliseconds){this.delay=Math.round(milliseconds/10)};GIFEncoder.prototype.setFrameRate=function(fps){this.delay=Math.round(100/fps)};GIFEncoder.prototype.setDispose=function(disposalCode){if(disposalCode>=0)this.dispose=disposalCode};GIFEncoder.prototype.setRepeat=function(repeat){this.repeat=repeat};GIFEncoder.prototype.setTransparent=function(color){this.transparent=color};GIFEncoder.prototype.addFrame=function(imageData){this.image=imageData;this.colorTab=this.globalPalette&&this.globalPalette.slice?this.globalPalette:null;this.getImagePixels();this.analyzePixels();if(this.globalPalette===true)this.globalPalette=this.colorTab;if(this.firstFrame){this.writeLSD();this.writePalette();if(this.repeat>=0){this.writeNetscapeExt()}}this.writeGraphicCtrlExt();this.writeImageDesc();if(!this.firstFrame&&!this.globalPalette)this.writePalette();this.writePixels();this.firstFrame=false};GIFEncoder.prototype.finish=function(){this.out.writeByte(59)};GIFEncoder.prototype.setQuality=function(quality){if(quality<1)quality=1;this.sample=quality};GIFEncoder.prototype.setDither=function(dither){if(dither===true)dither="FloydSteinberg";this.dither=dither};GIFEncoder.prototype.setGlobalPalette=function(palette){this.globalPalette=palette};GIFEncoder.prototype.getGlobalPalette=function(){return this.globalPalette&&this.globalPalette.slice&&this.globalPalette.slice(0)||this.globalPalette};GIFEncoder.prototype.writeHeader=function(){this.out.writeUTFBytes("GIF89a")};GIFEncoder.prototype.analyzePixels=function(){if(!this.colorTab){this.neuQuant=new NeuQuant(this.pixels,this.sample);this.neuQuant.buildColormap();this.colorTab=this.neuQuant.getColormap()}if(this.dither){this.ditherPixels(this.dither.replace("-serpentine",""),this.dither.match(/-serpentine/)!==null)}else{this.indexPixels()}this.pixels=null;this.colorDepth=8;this.palSize=7;if(this.transparent!==null){this.transIndex=this.findClosest(this.transparent,true)}};GIFEncoder.prototype.indexPixels=function(imgq){var nPix=this.pixels.length/3;this.indexedPixels=new Uint8Array(nPix);var k=0;for(var j=0;j<nPix;j++){var index=this.findClosestRGB(this.pixels[k++]&255,this.pixels[k++]&255,this.pixels[k++]&255);this.usedEntry[index]=true;this.indexedPixels[j]=index}};GIFEncoder.prototype.ditherPixels=function(kernel,serpentine){var kernels={FalseFloydSteinberg:[[3/8,1,0],[3/8,0,1],[2/8,1,1]],FloydSteinberg:[[7/16,1,0],[3/16,-1,1],[5/16,0,1],[1/16,1,1]],Stucki:[[8/42,1,0],[4/42,2,0],[2/42,-2,1],[4/42,-1,1],[8/42,0,1],[4/42,1,1],[2/42,2,1],[1/42,-2,2],[2/42,-1,2],[4/42,0,2],[2/42,1,2],[1/42,2,2]],Atkinson:[[1/8,1,0],[1/8,2,0],[1/8,-1,1],[1/8,0,1],[1/8,1,1],[1/8,0,2]]};if(!kernel||!kernels[kernel]){throw"Unknown dithering kernel: "+kernel}var ds=kernels[kernel];var index=0,height=this.height,width=this.width,data=this.pixels;var direction=serpentine?-1:1;this.indexedPixels=new Uint8Array(this.pixels.length/3);for(var y=0;y<height;y++){if(serpentine)direction=direction*-1;for(var x=direction==1?0:width-1,xend=direction==1?width:0;x!==xend;x+=direction){index=y*width+x;var idx=index*3;var r1=data[idx];var g1=data[idx+1];var b1=data[idx+2];idx=this.findClosestRGB(r1,g1,b1);this.usedEntry[idx]=true;this.indexedPixels[index]=idx;idx*=3;var r2=this.colorTab[idx];var g2=this.colorTab[idx+1];var b2=this.colorTab[idx+2];var er=r1-r2;var eg=g1-g2;var eb=b1-b2;for(var i=direction==1?0:ds.length-1,end=direction==1?ds.length:0;i!==end;i+=direction){var x1=ds[i][1];var y1=ds[i][2];if(x1+x>=0&&x1+x<width&&y1+y>=0&&y1+y<height){var d=ds[i][0];idx=index+x1+y1*width;idx*=3;data[idx]=Math.max(0,Math.min(255,data[idx]+er*d));data[idx+1]=Math.max(0,Math.min(255,data[idx+1]+eg*d));data[idx+2]=Math.max(0,Math.min(255,data[idx+2]+eb*d))}}}}};GIFEncoder.prototype.findClosest=function(c,used){return this.findClosestRGB((c&16711680)>>16,(c&65280)>>8,c&255,used)};GIFEncoder.prototype.findClosestRGB=function(r,g,b,used){if(this.colorTab===null)return-1;if(this.neuQuant&&!used){return this.neuQuant.lookupRGB(r,g,b)}var c=b|g<<8|r<<16;var minpos=0;var dmin=256*256*256;var len=this.colorTab.length;for(var i=0,index=0;i<len;index++){var dr=r-(this.colorTab[i++]&255);var dg=g-(this.colorTab[i++]&255);var db=b-(this.colorTab[i++]&255);var d=dr*dr+dg*dg+db*db;if((!used||this.usedEntry[index])&&d<dmin){dmin=d;minpos=index}}return minpos};GIFEncoder.prototype.getImagePixels=function(){var w=this.width;var h=this.height;this.pixels=new Uint8Array(w*h*3);var data=this.image;var srcPos=0;var count=0;for(var i=0;i<h;i++){for(var j=0;j<w;j++){this.pixels[count++]=data[srcPos++];this.pixels[count++]=data[srcPos++];this.pixels[count++]=data[srcPos++];srcPos++}}};GIFEncoder.prototype.writeGraphicCtrlExt=function(){this.out.writeByte(33);this.out.writeByte(249);this.out.writeByte(4);var transp,disp;if(this.transparent===null){transp=0;disp=0}else{transp=1;disp=2}if(this.dispose>=0){disp=dispose&7}disp<<=2;this.out.writeByte(0|disp|0|transp);this.writeShort(this.delay);this.out.writeByte(this.transIndex);this.out.writeByte(0)};GIFEncoder.prototype.writeImageDesc=function(){this.out.writeByte(44);this.writeShort(0);this.writeShort(0);this.writeShort(this.width);this.writeShort(this.height);if(this.firstFrame||this.globalPalette){this.out.writeByte(0)}else{this.out.writeByte(128|0|0|0|this.palSize)}};GIFEncoder.prototype.writeLSD=function(){this.writeShort(this.width);this.writeShort(this.height);this.out.writeByte(128|112|0|this.palSize);this.out.writeByte(0);this.out.writeByte(0)};GIFEncoder.prototype.writeNetscapeExt=function(){this.out.writeByte(33);this.out.writeByte(255);this.out.writeByte(11);this.out.writeUTFBytes("NETSCAPE2.0");this.out.writeByte(3);this.out.writeByte(1);this.writeShort(this.repeat);this.out.writeByte(0)};GIFEncoder.prototype.writePalette=function(){this.out.writeBytes(this.colorTab);var n=3*256-this.colorTab.length;for(var i=0;i<n;i++)this.out.writeByte(0)};GIFEncoder.prototype.writeShort=function(pValue){this.out.writeByte(pValue&255);this.out.writeByte(pValue>>8&255)};GIFEncoder.prototype.writePixels=function(){var enc=new LZWEncoder(this.width,this.height,this.indexedPixels,this.colorDepth);enc.encode(this.out)};GIFEncoder.prototype.stream=function(){return this.out};module.exports=GIFEncoder},{"./LZWEncoder.js":2,"./TypedNeuQuant.js":3}],2:[function(require,module,exports){var EOF=-1;var BITS=12;var HSIZE=5003;var masks=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535];function LZWEncoder(width,height,pixels,colorDepth){var initCodeSize=Math.max(2,colorDepth);var accum=new Uint8Array(256);var htab=new Int32Array(HSIZE);var codetab=new Int32Array(HSIZE);var cur_accum,cur_bits=0;var a_count;var free_ent=0;var maxcode;var clear_flg=false;var g_init_bits,ClearCode,EOFCode;function char_out(c,outs){accum[a_count++]=c;if(a_count>=254)flush_char(outs)}function cl_block(outs){cl_hash(HSIZE);free_ent=ClearCode+2;clear_flg=true;output(ClearCode,outs)}function cl_hash(hsize){for(var i=0;i<hsize;++i)htab[i]=-1}function compress(init_bits,outs){var fcode,c,i,ent,disp,hsize_reg,hshift;g_init_bits=init_bits;clear_flg=false;n_bits=g_init_bits;maxcode=MAXCODE(n_bits);ClearCode=1<<init_bits-1;EOFCode=ClearCode+1;free_ent=ClearCode+2;a_count=0;ent=nextPixel();hshift=0;for(fcode=HSIZE;fcode<65536;fcode*=2)++hshift;hshift=8-hshift;hsize_reg=HSIZE;cl_hash(hsize_reg);output(ClearCode,outs);outer_loop:while((c=nextPixel())!=EOF){fcode=(c<<BITS)+ent;i=c<<hshift^ent;if(htab[i]===fcode){ent=codetab[i];continue}else if(htab[i]>=0){disp=hsize_reg-i;if(i===0)disp=1;do{if((i-=disp)<0)i+=hsize_reg;if(htab[i]===fcode){ent=codetab[i];continue outer_loop}}while(htab[i]>=0)}output(ent,outs);ent=c;if(free_ent<1<<BITS){codetab[i]=free_ent++;htab[i]=fcode}else{cl_block(outs)}}output(ent,outs);output(EOFCode,outs)}function encode(outs){outs.writeByte(initCodeSize);remaining=width*height;curPixel=0;compress(initCodeSize+1,outs);outs.writeByte(0)}function flush_char(outs){if(a_count>0){outs.writeByte(a_count);outs.writeBytes(accum,0,a_count);a_count=0}}function MAXCODE(n_bits){return(1<<n_bits)-1}function nextPixel(){if(remaining===0)return EOF;--remaining;var pix=pixels[curPixel++];return pix&255}function output(code,outs){cur_accum&=masks[cur_bits];if(cur_bits>0)cur_accum|=code<<cur_bits;else cur_accum=code;cur_bits+=n_bits;while(cur_bits>=8){char_out(cur_accum&255,outs);cur_accum>>=8;cur_bits-=8}if(free_ent>maxcode||clear_flg){if(clear_flg){maxcode=MAXCODE(n_bits=g_init_bits);clear_flg=false}else{++n_bits;if(n_bits==BITS)maxcode=1<<BITS;else maxcode=MAXCODE(n_bits)}}if(code==EOFCode){while(cur_bits>0){char_out(cur_accum&255,outs);cur_accum>>=8;cur_bits-=8}flush_char(outs)}}this.encode=encode}module.exports=LZWEncoder},{}],3:[function(require,module,exports){var ncycles=100;var netsize=256;var maxnetpos=netsize-1;var netbiasshift=4;var intbiasshift=16;var intbias=1<<intbiasshift;var gammashift=10;var gamma=1<<gammashift;var betashift=10;var beta=intbias>>betashift;var betagamma=intbias<<gammashift-betashift;var initrad=netsize>>3;var radiusbiasshift=6;var radiusbias=1<<radiusbiasshift;var initradius=initrad*radiusbias;var radiusdec=30;var alphabiasshift=10;var initalpha=1<<alphabiasshift;var alphadec;var radbiasshift=8;var radbias=1<<radbiasshift;var alpharadbshift=alphabiasshift+radbiasshift;var alpharadbias=1<<alpharadbshift;var prime1=499;var prime2=491;var prime3=487;var prime4=503;var minpicturebytes=3*prime4;function NeuQuant(pixels,samplefac){var network;var netindex;var bias;var freq;var radpower;function init(){network=[];netindex=new Int32Array(256);bias=new Int32Array(netsize);freq=new Int32Array(netsize);radpower=new Int32Array(netsize>>3);var i,v;for(i=0;i<netsize;i++){v=(i<<netbiasshift+8)/netsize;network[i]=new Float64Array([v,v,v,0]);freq[i]=intbias/netsize;bias[i]=0}}function unbiasnet(){for(var i=0;i<netsize;i++){network[i][0]>>=netbiasshift;network[i][1]>>=netbiasshift;network[i][2]>>=netbiasshift;network[i][3]=i}}function altersingle(alpha,i,b,g,r){network[i][0]-=alpha*(network[i][0]-b)/initalpha;network[i][1]-=alpha*(network[i][1]-g)/initalpha;network[i][2]-=alpha*(network[i][2]-r)/initalpha}function alterneigh(radius,i,b,g,r){var lo=Math.abs(i-radius);var hi=Math.min(i+radius,netsize);var j=i+1;var k=i-1;var m=1;var p,a;while(j<hi||k>lo){a=radpower[m++];if(j<hi){p=network[j++];p[0]-=a*(p[0]-b)/alpharadbias;p[1]-=a*(p[1]-g)/alpharadbias;p[2]-=a*(p[2]-r)/alpharadbias}if(k>lo){p=network[k--];p[0]-=a*(p[0]-b)/alpharadbias;p[1]-=a*(p[1]-g)/alpharadbias;p[2]-=a*(p[2]-r)/alpharadbias}}}function contest(b,g,r){var bestd=~(1<<31);var bestbiasd=bestd;var bestpos=-1;var bestbiaspos=bestpos;var i,n,dist,biasdist,betafreq;for(i=0;i<netsize;i++){n=network[i];dist=Math.abs(n[0]-b)+Math.abs(n[1]-g)+Math.abs(n[2]-r);if(dist<bestd){bestd=dist;bestpos=i}biasdist=dist-(bias[i]>>intbiasshift-netbiasshift);if(biasdist<bestbiasd){bestbiasd=biasdist;bestbiaspos=i}betafreq=freq[i]>>betashift;freq[i]-=betafreq;bias[i]+=betafreq<<gammashift}freq[bestpos]+=beta;bias[bestpos]-=betagamma;return bestbiaspos}function inxbuild(){var i,j,p,q,smallpos,smallval,previouscol=0,startpos=0;for(i=0;i<netsize;i++){p=network[i];smallpos=i;smallval=p[1];for(j=i+1;j<netsize;j++){q=network[j];if(q[1]<smallval){smallpos=j;smallval=q[1]}}q=network[smallpos];if(i!=smallpos){j=q[0];q[0]=p[0];p[0]=j;j=q[1];q[1]=p[1];p[1]=j;j=q[2];q[2]=p[2];p[2]=j;j=q[3];q[3]=p[3];p[3]=j}if(smallval!=previouscol){netindex[previouscol]=startpos+i>>1;for(j=previouscol+1;j<smallval;j++)netindex[j]=i;previouscol=smallval;startpos=i}}netindex[previouscol]=startpos+maxnetpos>>1;for(j=previouscol+1;j<256;j++)netindex[j]=maxnetpos}function inxsearch(b,g,r){var a,p,dist;var bestd=1e3;var best=-1;var i=netindex[g];var j=i-1;while(i<netsize||j>=0){if(i<netsize){p=network[i];dist=p[1]-g;if(dist>=bestd)i=netsize;else{i++;if(dist<0)dist=-dist;a=p[0]-b;if(a<0)a=-a;dist+=a;if(dist<bestd){a=p[2]-r;if(a<0)a=-a;dist+=a;if(dist<bestd){bestd=dist;best=p[3]}}}}if(j>=0){p=network[j];dist=g-p[1];if(dist>=bestd)j=-1;else{j--;if(dist<0)dist=-dist;a=p[0]-b;if(a<0)a=-a;dist+=a;if(dist<bestd){a=p[2]-r;if(a<0)a=-a;dist+=a;if(dist<bestd){bestd=dist;best=p[3]}}}}}return best}function learn(){var i;var lengthcount=pixels.length;var alphadec=30+(samplefac-1)/3;var samplepixels=lengthcount/(3*samplefac);var delta=~~(samplepixels/ncycles);var alpha=initalpha;var radius=initradius;var rad=radius>>radiusbiasshift;if(rad<=1)rad=0;for(i=0;i<rad;i++)radpower[i]=alpha*((rad*rad-i*i)*radbias/(rad*rad));var step;if(lengthcount<minpicturebytes){samplefac=1;step=3}else if(lengthcount%prime1!==0){step=3*prime1}else if(lengthcount%prime2!==0){step=3*prime2}else if(lengthcount%prime3!==0){step=3*prime3}else{step=3*prime4}var b,g,r,j;var pix=0;i=0;while(i<samplepixels){b=(pixels[pix]&255)<<netbiasshift;g=(pixels[pix+1]&255)<<netbiasshift;r=(pixels[pix+2]&255)<<netbiasshift;j=contest(b,g,r);altersingle(alpha,j,b,g,r);if(rad!==0)alterneigh(rad,j,b,g,r);pix+=step;if(pix>=lengthcount)pix-=lengthcount;i++;if(delta===0)delta=1;if(i%delta===0){alpha-=alpha/alphadec;radius-=radius/radiusdec;rad=radius>>radiusbiasshift;if(rad<=1)rad=0;for(j=0;j<rad;j++)radpower[j]=alpha*((rad*rad-j*j)*radbias/(rad*rad))}}}function buildColormap(){init();learn();unbiasnet();inxbuild()}this.buildColormap=buildColormap;function getColormap(){var map=[];var index=[];for(var i=0;i<netsize;i++)index[network[i][3]]=i;var k=0;for(var l=0;l<netsize;l++){var j=index[l];map[k++]=network[j][0];map[k++]=network[j][1];map[k++]=network[j][2]}return map}this.getColormap=getColormap;this.lookupRGB=inxsearch}module.exports=NeuQuant},{}],4:[function(require,module,exports){var GIFEncoder,renderFrame;GIFEncoder=require("./GIFEncoder.js");renderFrame=function(frame){var encoder,page,stream,transfer;encoder=new GIFEncoder(frame.width,frame.height);if(frame.index===0){encoder.writeHeader()}else{encoder.firstFrame=false}encoder.setTransparent(frame.transparent);encoder.setRepeat(frame.repeat);encoder.setDelay(frame.delay);encoder.setQuality(frame.quality);encoder.setDither(frame.dither);encoder.setGlobalPalette(frame.globalPalette);encoder.addFrame(frame.data);if(frame.last){encoder.finish()}if(frame.globalPalette===true){frame.globalPalette=encoder.getGlobalPalette()}stream=encoder.stream();frame.data=stream.pages;frame.cursor=stream.cursor;frame.pageSize=stream.constructor.pageSize;if(frame.canTransfer){transfer=function(){var i,len,ref,results;ref=frame.data;results=[];for(i=0,len=ref.length;i<len;i++){page=ref[i];results.push(page.buffer)}return results}();return self.postMessage(frame,transfer)}else{return self.postMessage(frame)}};self.onmessage=function(event){return renderFrame(event.data)}},{"./GIFEncoder.js":1}]},{},[4]);
|
|
497
497
|
`],{type:"application/javascript"}))})}async function TL(e){for(let t=0;t<30;t++){let t=await e();if(t)return t;await new Promise(e=>setTimeout(e,50))}}let TM=(e,t,...n)=>({type:e,props:t,children:n||[]}),TD=async({element:e,page:t,store:n})=>{let r,i,{src:o}=e;"svg"===e.type&&Object.keys(e.colorsReplace).length&&(o=iJ(await iK(o),new Map(Object.entries(e.colorsReplace))));let a="";e.flipX&&(a+="scaleX(-1)"),e.flipY&&(a+="scaleY(-1)"),a||(a="none");let l={};if(e.clipSrc){let t=await i$(e.clipSrc);l["clip-path"]=`url(${t})`}let s=await CR(o),u=s.width*e.cropWidth,c=s.height*e.cropHeight,d=e.width/e.height;"svg"===e.type?(r=u,i=c):d>=u/c?(r=u,i=u/d):(r=c*d,i=c);let h=r/s.width,f=i/s.height,p=r/i>e.width/e.height?e.height/i:e.width/r,g=r*p/h,m=i*p/f,v=e.cropX*p*s.width,y=e.cropY*p*s.height;return TM("div",{style:{...l,width:"100%",height:"100%","border-radius":e.cornerRadius+"px",border:e.borderSize?`${e.borderSize}px solid ${e.borderColor}`:"none",background:`url(${o})`,transform:a,"background-size":`${Math.round(g)}px ${Math.round(m)}px`,"background-position-x":`${-Math.round(v)}px`,"background-position-y":`${-Math.round(y)}px`}})},TF=({element:e,type:t})=>{let n={"stroke-width":e.height,stroke:e.color,"line-cap":"round","stroke-linejoin":"round",opacity:e.opacity};return"arrow"===t||"triangle"===t?TM("polyline",{points:`${3*e.height},${-(2*e.height)} 0,0 ${3*e.height},${2*e.height}`,...n}):"bar"===t?TM("polyline",{points:`0,${-(2*e.height)} 0,${2*e.height}`,...n}):"circle"===t?TM("circle",{r:e.height,...n}):"square"===t?TM("polyline",{points:`${-e.height},${-e.height} ${-e.height},${e.height} ${e.height},${e.height} ${e.height},${-e.height}`,...n}):null},Tz={image:TD,svg:TD,text:async({element:e,page:t,store:n})=>{let r={};e.fill.indexOf("gradient")>=0&&(r={...r,"background-color":e.fill,"background-image":e.fill,"background-clip":"text","text-fill-color":"transparent","-webkit-background-clip":"text","-webkit-text-fill-color":"transparent"});let i=e.backgroundPadding*(e.fontSize*e.lineHeight),o=TM("div",{style:{position:"absolute",top:-i/2+"px",left:-i/2+"px",display:e.backgroundEnabled?"block":"none",width:e.width+i+"px",height:e.height+i+"px","background-color":e.backgroundColor,"border-radius":e.backgroundCornerRadius*(e.fontSize*e.lineHeight*.5)+"px"}}),a=TM("div",{style:{...r,position:"absolute",top:0,left:0,width:e.width+"px",color:e.fill,"white-space":"pre-wrap","font-size":e.fontSize+"px","text-align":e.align,"font-family":e.fontFamily,"text-decoration":e.textDecoration||"none","line-height":e.lineHeight,"letter-spacing":e.letterSpacing+"em","font-style":e.fontStyle,"font-weight":e.fontWeight,"-webkit-text-stroke":`${e.strokeWidth}px ${e.stroke}`,"text-stroke":`${e.strokeWidth}px ${e.stroke}`}},e.text.split("\n").join("<br />"));return TM("div",{style:{position:"relative"}},o,a)},line:async({element:e,page:t,store:n})=>TM("svg",{style:{width:"100%",height:"100%",contain:"layout style size",overflow:"visible"}},TM("rect",{x:0,y:0,width:e.width,height:e.height,fill:e.color}),TM("g",{transform:`translate(0 ${e.height/2})`},TF({element:e,type:e.startHead})),TM("g",{transform:`translate(${e.width} ${e.height/2}) rotate(180)`},TF({element:e,type:e.endHead}))),figure:async({element:e,page:t,store:n,elementHook:r})=>{let i=TM("div",{innerHTML:aL(e)});return r&&r({dom:i,element:e})||i},group:async({element:e,page:t,store:n,elementHook:r})=>{let i=await Promise.all(e.children.map(e=>TB({element:e,page:t,store:n,elementHook:r}))),o=TM("div",{style:{"transform-origin":"top left",opacity:e.opacity}},...i);return r&&r({dom:o,element:e})||o}};async function TB({element:e,page:t,store:n,elementHook:r}){let i=await Tz[e.type];i||(i=()=>TM("div",{}),console.error(`HTML export does not support ${e.type} type...`));let o=await i({element:e,page:t,store:n}),a=[];e.blurEnabled&&a.push(`blur(${e.blurRadius/2}px)`),e.brightnessEnabled&&a.push(`brightness(${100*e.brightness+100}%)`),e.sepiaEnabled&&a.push("sepia()"),e.grayscaleEnabled&&a.push("grayscale()"),e.shadowEnabled&&a.push(`drop-shadow(${e.shadowOffsetX}px ${e.shadowOffsetY}px ${e.shadowBlur}px ${e.shadowColor})`);let l=TM("div",{style:{position:"absolute",left:e.x+"px",top:e.y+"px",width:e.width+"px",height:e.height+"px",transform:`rotate(${e.rotation}deg)`,"transform-origin":"top left",opacity:e.opacity,filter:a.join(" ")||"none"}},o);return r&&r({dom:l,element:e})||l}async function TU({page:e,store:t,elementHook:n}){let r=await Promise.all(e.children.map(r=>TB({element:r,page:e,store:t,elementHook:n}))),i={};if(e.background.indexOf("url")>=0||e.background.indexOf("http")>=0||e.background.indexOf(".jpg")>=0||e.background.indexOf(".png")>=0||e.background.indexOf(".jpeg")>=0){let{width:n,height:i}=await CR(e.background),o=await TD({element:{x:0,y:0,width:t.width,height:t.height,src:e.background,cornerRadius:0,...CL({width:t.width,height:t.height},{width:n,height:i})},page:e,store:t});r.unshift(o)}else i={...i,"background-color":e.background};return TM("div",{className:"page",style:{...i,width:t.width+"px",height:t.height+"px",border:"1px solid grey",overflow:"hidden",position:"relative"}},...r)}async function TH({json:e,elementHook:t}){let n=await Promise.all(e.pages.map(n=>TU({page:n,store:e,elementHook:t}))),r=[];e.pages.forEach(e=>{e.children.forEach(e=>{"text"===e.type&&-1===r.indexOf(e.fontFamily)&&r.push(e.fontFamily)})});let i=r.map(t=>e.fonts.find(e=>e.fontFamily===t)?TM("style",{},""):TM("link",{href:`https://fonts.googleapis.com/css?family=${t}`,rel:"stylesheet"}));return TM("div",{className:"design"},...i,...n)}let TV=(e,t)=>"object"==typeof t?`${e}="${Object.keys(t).map(e=>`${e}:${t[e]};`).join(" ")}"`:`${e}="${t}"`,Tq=({dom:e})=>{if("string"==typeof e)return e;if(!e)return"";let{innerHTML:t,...n}=e.props;return`<${e.type} ${Object.keys(n).map(t=>TV(t,e.props[t])).join(" ")}>${t||e.children.map(e=>Tq({dom:e})).join("")}</${e.type}>`};async function TG({json:e,elementHook:t}){return Tq({dom:await TH({json:e,elementHook:t})})}let TW=(e,t,...n)=>({type:e,props:t,children:n||[]}),T$=async e=>{let t=await CR(e),n=document.createElement("canvas");return n.width=t.width,n.height=t.height,n.getContext("2d").drawImage(t,0,0),n.toDataURL("image/png")},TK=async({element:e,page:t,store:n})=>{let r,i,{src:o}=e;"svg"===e.type&&(o=iJ(await iK(o),new Map(Object.entries(e.colorsReplace))));let a="";e.flipX&&(a+="scaleX(-1)"),e.flipY&&(a+="scaleY(-1)");let l={};if(e.clipSrc){let t=await i$(e.clipSrc);l["clip-path"]=`url(${t})`}let s=await CR(o),u=s.width*e.cropWidth,c=s.height*e.cropHeight,d=e.width/e.height;"svg"===e.type?(r=u,i=c):d>=u/c?(r=u,i=u/d):(r=c*d,i=c);let h=r/s.width,f=i/s.height,p=r/i>e.width/e.height?e.height/i:e.width/r,g=r*p/h,m=i*p/f,v=e.cropX*p*s.width,y=e.cropY*p*s.height,b=`clip-${Math.random()}`;return TW("g",{style:{"clip-path":l["clip-path"],transform:a}},TW("defs",{},TW("clipPath",{id:b},TW("rect",{x:v,y:y,width:g,height:m}))),TW("image",{"xlink:href":await T$(o),width:e.width,height:e.height,preserveAspectRatio:"none","clip-path":`url(#${b})`}))},TY=({element:e,type:t})=>{let n={"stroke-width":e.height,stroke:e.color,"line-cap":"round","stroke-linejoin":"round",opacity:e.opacity};return"arrow"===t||"triangle"===t?TW("polyline",{points:`${3*e.height},${-(2*e.height)} 0,0 ${3*e.height},${2*e.height}`,...n}):"bar"===t?TW("polyline",{points:`0,${-(2*e.height)} 0,${2*e.height}`,...n}):"circle"===t?TW("circle",{r:e.height,...n}):"square"===t?TW("polyline",{points:`${-e.height},${-e.height} ${-e.height},${e.height} ${e.height},${e.height} ${e.height},${-e.height}`,...n}):null},TX={image:TK,svg:TK,text:async({element:e,page:t,store:n})=>{let r={};e.fill.indexOf("gradient")>=0&&(r={...r,"background-color":e.fill,"background-image":e.fill,"background-clip":"text","text-fill-color":"transparent","-webkit-background-clip":"text","-webkit-text-fill-color":"transparent"});let i=e.backgroundPadding*(e.fontSize*e.lineHeight),o=TW("div",{style:{position:"absolute",top:-i/2+"px",left:-i/2+"px",display:e.backgroundEnabled?"block":"none",width:e.width+i+"px",height:e.height+i+"px","background-color":e.backgroundColor,"border-radius":e.backgroundCornerRadius*(e.fontSize*e.lineHeight*.5)+"px"}}),a=TW("div",{style:{...r,position:"absolute",top:0,left:0,width:e.width+"px",color:e.fill,"white-space":"pre-wrap","font-size":e.fontSize+"px","text-align":e.align,"font-family":e.fontFamily,"text-decoration":e.textDecoration||"none","line-height":e.lineHeight,"letter-spacing":e.letterSpacing+"em","font-style":e.fontStyle,"font-weight":e.fontWeight,"-webkit-text-stroke":`${e.strokeWidth}px ${e.stroke}`,"text-stroke":`${e.strokeWidth}px ${e.stroke}`}},e.text.split("\n").join("<br />"));return TW("foreignObject",{width:e.width,height:e.height},TW("div",{style:{position:"relative"},xmlns:"http://www.w3.org/1999/xhtml"},o,a))},line:async({element:e,page:t,store:n})=>TW("svg",{style:{width:"100%",height:"100%",contain:"layout style size",overflow:"visible"}},TW("rect",{x:0,y:0,width:e.width,height:e.height,fill:e.color}),TW("g",{transform:`translate(0 ${e.height/2})`},TY({element:e,type:e.startHead})),TW("g",{transform:`translate(${e.width} ${e.height/2}) rotate(180)`},TY({element:e,type:e.endHead}))),group:async({element:e,page:t,store:n,elementHook:r})=>{let i=await Promise.all(e.children.map(e=>TZ({element:e,page:t,store:n,elementHook:r}))),o=TW("g",{opacity:e.opacity,style:{"transform-origin":"top left"}},...i);return r&&r({dom:o,element:e})||o}};async function TZ({element:e,page:t,store:n,elementHook:r}){let i=await TX[e.type];i||(i=()=>TW("div",{}),console.error(`HTML export does not support ${e.type} type...`));let o=await i({element:e,page:t,store:n}),a=[];e.blurEnabled&&a.push(`blur(${e.blurRadius/2}px)`),e.brightnessEnabled&&a.push(`brightness(${100*e.brightness+100}%)`),e.sepiaEnabled&&a.push("sepia()"),e.grayscaleEnabled&&a.push("grayscale()"),e.shadowEnabled&&a.push(`drop-shadow(${e.shadowOffsetX}px ${e.shadowOffsetY}px ${e.shadowBlur}px ${e.shadowColor})`);let l=TW("g",{transform:`translate(${e.x}, ${e.y}) rotate(${e.rotation})`,rotation:e.rotation,width:e.width,height:e.height,opacity:e.opacity,style:{"transform-origin":"top left",filter:a.join(" ")}},o);return r&&r({dom:l,element:e})||l}async function TQ({page:e,store:t,elementHook:n}){let r=await Promise.all(e.children.map(r=>TZ({element:r,page:e,store:t,elementHook:n}))),i={};if(e.background.indexOf("url")>=0||e.background.indexOf("http")>=0||e.background.indexOf(".jpg")>=0||e.background.indexOf(".png")>=0||e.background.indexOf(".jpeg")>=0){let n=await CR(e.background),r=await CI(e.background,{width:t.width,height:t.height,x:0,y:0,...CL({width:t.width,height:t.height},{width:n.width,height:n.height})});i={...i,"background-image":`url(${r})`}}return TW("g",{className:"page",style:{...i,background:e.background}},TW("rect",{x:0,y:0,width:t.width,height:t.height,fill:e.background}),...r)}async function TJ({json:e,elementHook:t}){let n=await Promise.all(e.pages.map(n=>TQ({page:n,store:e,elementHook:t}))),r=[];e.pages.forEach(e=>{e.children.forEach(e=>{"text"===e.type&&-1===r.indexOf(e.fontFamily)&&r.push(e.fontFamily)})});let i=r.map(t=>e.fonts.find(e=>e.fontFamily===t)?TW("style",{},""):TW("link",{href:`https://fonts.googleapis.com/css?family=${t}`,rel:"stylesheet"}));return TW("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:`0 0 ${e.width} ${e.height}`,preserveAspectRatio:"xMidYMin slice"},...i,...n)}let T0=(e,t)=>"object"==typeof t?`${e}="${Object.keys(t).map(e=>`${e}:${t[e]};`).join(" ")}"`:`${e}="${t}"`,T1=({dom:e})=>"string"==typeof e?e:e?`<${e.type} ${Object.keys(e.props).map(t=>T0(t,e.props[t])).join(" ")}>${e.children.map(e=>T1({dom:e})).join("")}</${e.type}>
|
|
498
|
-
`:"";async function T2({json:e,elementHook:t}){return T1({dom:await TJ({json:e,elementHook:t})})}var CW=(h("58B0H"),h("58B0H"),h("58B0H"));let T3=(0,CW.types).model("Node",{id:CW.types.identifier,type:"none",name:"",opacity:1,custom:(0,CW.types).frozen(),visible:!0,selectable:!0,removable:!0,alwaysOnTop:!1,showInExport:!0}).preProcessSnapshot(e=>{for(var t in e)null===e[t]&&(e[t]=void 0);return e}).postProcessSnapshot(e=>{let t={...e},n={};for(var r in t)"_"!==r[0]&&(n[r]=e[r]);return n}).views(e=>({get locked(){return!e.draggable&&!e.contentEditable&&!e.styleEditable&&!e.resizable},get page(){return(0,CW.getParentOfType)(e,Ad)},get store(){return(0,CW.getParentOfType)(e,Af)},get top(){let t=e;for(;;){if(!(0,CW.hasParentOfType)(t,As))return t;t=(0,CW.getParentOfType)(t,As)}},get parent(){if((0,CW.hasParentOfType)(e,As))return(0,CW.getParentOfType)(e,As);if((0,CW.hasParentOfType)(e,Ad))return(0,CW.getParentOfType)(e,Ad);if((0,CW.hasParentOfType)(e,Af))return(0,CW.getParentOfType)(e,Af);return null}})).actions(e=>({toJSON:()=>({...(0,CW.getSnapshot)(e)})})).actions(e=>({clone(t={},{skipSelect:n=!1}={}){let r=JSON.parse(JSON.stringify(e.toJSON()));return t.id=t.id||C8(10),Ao(r,e=>{e.id=C8(10)}),Object.assign(r,t),e.page.addElement(r,{skipSelect:n})},set(t){Object.assign(e,t)},moveUp(){e.page.moveElementsUp([e.id])},moveTop(){e.page.moveElementsTop([e.id])},moveDown(){e.page.moveElementsDown([e.id])},moveBottom(){e.page.moveElementsBottom([e.id])},beforeDestroy(){}}));var CW=h("58B0H");let T5={right:{from:{x:-200},to:{x:0}},left:{from:{x:200},to:{x:0}},up:{from:{y:200},to:{y:0}},down:{from:{y:-200},to:{y:0}},"bottom-right":{from:{x:-200,y:-200},to:{x:0,y:0}},"bottom-left":{from:{x:200,y:-200},to:{x:0,y:0}},"top-right":{from:{x:-200,y:200},to:{x:0,y:0}},"top-left":{from:{x:200,y:200},to:{x:0,y:0}}},T6={fade:({dTime:e,element:t,animation:n})=>{let r=e/n.duration;return"enter"===n.type?{opacity:r*t.opacity}:{opacity:(1-r)*t.opacity}},move:({dTime:e,element:t,animation:n})=>{let r=T5[n.data.direction]||T5.right,i={};for(var o in r.from){let a=t[o]+r.from[o],l=t[o]+r.to[o];if("exit"===n.type){let e=a;a=l,l=-e}let s=l-a;i[o]=a+e/n.duration*s}return i},zoom:({dTime:e,element:t,animation:n})=>{let r={},i={x:t.x+t.width/3,y:t.y+t.height/3,width:t.width/3,height:t.height/3,fontSize:t.fontSize/3},o={x:t.x,y:t.y,width:t.width,height:t.height,fontSize:t.fontSize};for(var a in i){let t=i[a],l=o[a];if("exit"===n.type){let e=t;t=l,l=e}let s=l-t;r[a]=t+e/n.duration*s}return r}},T4=({element:e,dTime:t,animation:n})=>{let r=T6[n.name];return r?r({element:e,dTime:t,animation:n}):(console.error("Can not find animation type: "+n.name),{})},T8=(0,CW.types).model("Animation",{delay:0,duration:500,enabled:!0,type:(0,CW.types).enumeration("Type",["enter","exit"]),name:"none",data:(0,CW.types).frozen({})}),T9=T3.named("Shape").props({x:0,y:0,width:100,height:100,rotation:0,opacity:1,animations:(0,CW.types).array(T8),blurEnabled:!1,blurRadius:10,brightnessEnabled:!1,brightness:0,sepiaEnabled:!1,grayscaleEnabled:!1,shadowEnabled:!1,shadowBlur:5,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"black",shadowOpacity:1,visible:!0,draggable:!0,resizable:!0,selectable:!0,contentEditable:!0,styleEditable:!0,alwaysOnTop:!1,showInExport:!0}).preProcessSnapshot(e=>{let t={...e,x:e.x||0,y:e.y||0};return"width"in e&&(t.width=t.width||1),"height"in e&&(t.height=t.height||1),e.locked&&(t.draggable=!1,t.contentEditable=!1,t.styleEditable=!1,t.resizable=!1),t}).views(e=>({get a(){let{currentTime:t}=e.store,n={x:e.x,y:e.y,width:e.width,height:e.height,rotation:e.rotation,opacity:e.opacity,color:e.color,fontSize:e.fontSize};if(0===t)return n;let r=t-e.page.startTime;if(r>e.page.duration||r<0)return n;let i=e.store.animatedElementsIds;if(i.length&&!i.includes(e.id))return n;let o=e.animations.find(e=>"enter"===e.type);if(o?.enabled&&r<o.delay&&(n.opacity=0),o?.enabled&&r>=o.delay&&r<=o.delay+o.duration){let t=r-o.delay;Object.assign(n,T4({element:e,animation:o,dTime:t}))}let a=e.animations.find(e=>"exit"===e.type);if(a?.enabled&&r>=e.page.duration-a.duration){let t=r-(e.page.duration-a.duration);Object.assign(n,T4({element:e,animation:a,dTime:t}))}return n},animated:t=>e.a[t]})).actions(e=>({setAnimation(t,n){let r=e.animations.find(e=>e.type===t);r?Object.assign(r,n):e.animations.push({type:t,...n})}}));var CW=h("58B0H");let T7=T9.named("Text").props({type:"text",text:"",placeholder:"",fontSize:14,fontFamily:"Roboto",fontStyle:"normal",fontWeight:"normal",textDecoration:"",fill:"black",align:"center",width:100,height:0,verticalAlign:"top",strokeWidth:0,stroke:"black",lineHeight:(0,CW.types).optional((0,CW.types).union(CW.types.number,CW.types.string),1.2),letterSpacing:0,_editModeEnabled:!1,backgroundEnabled:!1,backgroundColor:"#7ED321",backgroundOpacity:1,backgroundCornerRadius:.5,backgroundPadding:.5}).preProcessSnapshot(e=>({...e})).actions(e=>({toggleEditMode(t){e._editModeEnabled=t??!e._editModeEnabled,e._editModeEnabled?e.store.history.startTransaction():e.store.history.endTransaction()}})),Ae=T9.named("Image").props({type:"image",width:100,height:100,src:"",cropX:0,cropY:0,cropWidth:1,cropHeight:1,cornerRadius:0,flipX:!1,flipY:!1,clipSrc:"",borderColor:"black",borderSize:0,keepRatio:!1,_cropModeEnabled:!1}).actions(e=>({toggleCropMode(t){e._cropModeEnabled=t??!e._cropModeEnabled,e._cropModeEnabled?e.store.history.startTransaction():e.store.history.endTransaction()},beforeDestroy(){e._cropModeEnabled&&e.store.history.endTransaction()}})),At=Ae.named("Video").props({type:"video",duration:0,startTime:0,endTime:1});var CW=h("58B0H");let An=T9.named("Line").props({type:"line",width:400,height:10,color:"black",dash:(0,CW.types).array(CW.types.number),startHead:"",endHead:""}).actions(e=>({}));var CW=h("58B0H");let Ar=T9.named("SVG").props({type:"svg",src:"",maskSrc:"",cropX:0,cropY:0,cropWidth:1,cropHeight:1,keepRatio:!0,flipX:!1,flipY:!1,width:100,height:100,borderColor:"black",borderSize:0,cornerRadius:0,colorsReplace:(0,CW.types).map(CW.types.string)}).preProcessSnapshot(e=>({...e,src:e.src||e.svgSource})).actions(e=>({replaceColor(t,n){e.colorsReplace.set(t,n)}}));var CW=h("58B0H");let Ai=T9.named("Figure").props({type:"figure",subType:"rect",fill:"rgb(0, 161, 255)",dash:(0,CW.types).array(CW.types.number),strokeWidth:0,stroke:"rgba(98, 197, 255, 1)",cornerRadius:0}),Ao=(e,t)=>{if(e.children)for(let n of e.children){if(t(n))break;Ao(n,t)}},Aa=[...Array(20)].map((e,t)=>(0,CW.types).late(()=>Au[t])),Al=(0,CW.types).union({dispatcher:e=>{let t=Ac[e.type];if(!t)throw Error(`Unknown element type: "${e.type}"`);return t}},Ar,T7,Ae,An,At,Ai,(0,CW.types).late(()=>As),...Aa),As=T3.named("Group").props({type:"group",children:(0,CW.types).array(Al)}).views(e=>({get draggable(){let t=!0;return Ao(e,e=>{e.draggable||(t=!1)}),t},get resizable(){let t=!0;return Ao(e,e=>{e.resizable||(t=!1)}),t},get contentEditable(){let t=!0;return Ao(e,e=>{e.contentEditable||(t=!1)}),t},get styleEditable(){let t=!0;return Ao(e,e=>{e.styleEditable||(t=!1)}),t},get locked(){let t=!0;return Ao(e,e=>{e.locked||(t=!1)}),t}})).actions(e=>({set({draggable:t,contentEditable:n,styleEditable:r,resizable:i,...o}){void 0!==t&&Ao(e,e=>{e.set({draggable:t})}),void 0!==n&&Ao(e,e=>{e.set({contentEditable:n})}),void 0!==r&&Ao(e,e=>{e.set({styleEditable:r})}),void 0!==i&&Ao(e,e=>{e.set({resizable:i})}),Object.assign(e,o)}})),Au=[],Ac={svg:Ar,text:T7,image:Ae,group:As,line:An,video:At,figure:Ai},Ad=(0,CW.types).model("Page",{id:CW.types.identifier,children:(0,CW.types).array((0,CW.types).late(()=>Al)),width:(0,CW.types).optional((0,CW.types).union(CW.types.number,(0,CW.types).literal("auto")),"auto"),height:(0,CW.types).optional((0,CW.types).union(CW.types.number,(0,CW.types).literal("auto")),"auto"),background:"white",bleed:0,custom:(0,CW.types).frozen(),duration:5e3,_exporting:!1,_rendering:!1}).postProcessSnapshot(e=>{let t={...e},n={};for(var r in t)"_"!==r[0]&&(n[r]=e[r]);return n}).views(e=>({get store(){return(0,CW.getParentOfType)(e,Af)},get startTime(){let t=0;for(let n of e.store.pages){if(n.id===e.id)break;t+=n.duration}return t}})).views(e=>({get computedWidth(){if("auto"===e.width)return e.store.width;return e.width},get computedHeight(){if("auto"===e.height)return e.store.height;return e.height}})).actions(e=>({toJSON:()=>JSON.parse(JSON.stringify((0,CW.getSnapshot)(e))),_forEachElementUp(t,n){let r=t.map(t=>({id:t,index:e.children.findIndex(e=>e.id===t)}));for(let{index:i}of(r.sort((e,t)=>t.index-e.index),r)){if(-1==i)continue;let r=i<e.children.length-1&&e.children[i+1],o=t.indexOf(r?.id)>=0;i===e.children.length-1||o||n(i)}},_forEachElementDown(t,n){let r=t.map(t=>({id:t,index:e.children.findIndex(e=>e.id===t)}));for(let{index:i}of(r.sort((e,t)=>e.index-t.index),r)){if(-1==i)continue;let r=i>0&&e.children[i-1],o=t.indexOf(r?.id)>=0;0===i||o||n(i)}return!1}})).actions(e=>({clone(t={}){let n=e.toJSON();n.children.forEach(e=>{e.id=C8(10),Ao(e,e=>{e.id=C8(10)})});let r={...n,id:C8(10),...t},i=e.store.addPage(r),o=e.store.pages.indexOf(e);i.setZIndex(o+1),i.select()},setZIndex(t){e.store.setPageZIndex(e.id,t)},set(t){Object.assign(e,t)},select(){e.store.selectPage(e.id)},addElement(t,{skipSelect:n=!1}={}){let r=Ac[t.type];if(!r){console.error("Can not find model with type "+t.type);return}t.children&&t.children.forEach(e=>{e.id=C8(10)});let i=r.create({id:C8(10),...t});return e.children.push(i),i.selectable&&!n&&e.store.selectElements([i.id]),i},canMoveElementsUp(t){let n=!1;return e._forEachElementUp(t,()=>{n=n||!0}),n},moveElementsUp(t){e._forEachElementUp(t,t=>{let n=e.children[t];(0,CW.detach)(n),e.children.splice(t+1,0,n)})},canMoveElementsTop(e){return this.canMoveElementsUp(e)},moveElementsTop(t){let n=[],r=[];e.children.forEach(e=>{t.indexOf(e.id)>=0?n.push(e):r.push(e)}),e.children.replace(r.concat(n))},canMoveElementsDown(t){let n=!1;return e._forEachElementDown(t,()=>{n=n||!0}),n},moveElementsDown(t){e._forEachElementDown(t,t=>{let n=e.children[t];(0,CW.detach)(n),e.children.splice(t-1,0,n)})},canMoveElementsBottom(e){return this.canMoveElementsDown(e)},moveElementsBottom(t){let n=[],r=[];e.children.forEach(e=>{t.indexOf(e.id)>=0?n.push(e):r.push(e)}),e.children.replace(n.concat(r))},setElementZIndex(t,n){let r=e.children.find(e=>e.id===t);r&&((0,CW.detach)(r),e.children.remove(r),e.children.splice(n,0,r))},setSize({width:t,height:n,useMagic:r,softChange:i}){if(r){let r=t/e.computedWidth,i=n/e.computedHeight,o=Math.min(r,i),a=Math.max(0,(t-e.computedWidth*o)/2),l=Math.max(0,(n-e.computedHeight*o)/2);Ao(e,async t=>{"group"!==t.type&&("image"===t.type&&t.x<1&&t.y<1&&t.width>=e.computedWidth-2&&t.height>=e.computedHeight-2?t.set({x:t.x*o,y:t.y*o,width:t.width*r,height:t.height*i,cropX:0,cropY:0,cropWidth:1,cropHeight:1}):(t.set({x:a+t.x*o,y:l+t.y*o,width:t.width*o,height:t.height*o}),"text"===t.type&&t.set({fontSize:t.fontSize*o})))})}i||(e.width=t),i||(e.height=n)}})).actions(e=>({moveElementUp(t){console.warn("page.moveElementUp(id) is deprecated. Please use page.moveElementsUp([id1, id2]) instead."),e.moveElementsUp([t])},moveElementDown(t){console.warn("page.moveElementDown(id) is deprecated. Please use page.moveElementsDown([id1, id2]) instead."),e.moveElementsDown([t])},moveElementTop(t){console.warn("page.moveElementTop(id) is deprecated. Please use page.moveElementsTop([id1, id2]) instead."),e.moveElementsTop([t])},moveElementBottom(t){console.warn("page.moveElementBottom(id) is deprecated. Please use page.moveElementsBottom([id1, id2]) instead."),e.moveElementsBottom([t])}}));(0,CW.setLivelinessChecking)("ignore");let Ah=(0,CW.types).model("Font",{fontFamily:CW.types.string,url:(0,CW.types).optional(CW.types.string,""),styles:(0,CW.types).frozen()}).preProcessSnapshot(e=>({...e,fontFamily:e.fontFamily||e.name})),Af=(0,CW.types).model("Store",{role:"",pages:(0,CW.types).array(Ad),fonts:(0,CW.types).array(Ah),width:1080,height:1080,currentTime:0,isPlaying:!1,scale:1,scaleToFit:1,unit:"px",dpi:72,bleedVisible:!1,rulesVisible:!1,openedSidePanel:"",selectedElementsIds:(0,CW.types).array(CW.types.string),animatedElementsIds:(0,CW.types).array(CW.types.string),history:(0,CW.types).optional(Tj,{targetPath:"../pages"}),_elementsPixelRatio:2,_activePageId:""}).views(e=>({get _bleedVisible(){return console.warn("store._bleedVisible is deprecated. Please use store.bleedVisible instead."),e.bleedVisible},get selectedElements(){return e.selectedElementsIds.map(t=>{for(let n of e.pages)for(let e of n.children)if(e.id===t)return e}).filter(e=>!!e)},get children(){return e.pages},get selectedShapes(){let t=[];return e.selectedElementsIds.forEach(n=>{for(let r of e.pages)for(let e of r.children)e.id===n&&"group"!==e.type&&t.push(e),"group"===e.type&&e.id===n&&t.push(...e.children)}),t},get activePage(){return e.pages.slice().find(t=>t.id===e._activePageId)||(e.pages.length?e.pages[0]:null)},get duration(){let t=0;return e.pages.forEach(e=>{t+=e.duration}),t},find(t){let n;return Ao({children:e.pages},e=>{if(!n&&t(e))return n=e,!0}),n},getElementById:t=>e.find(e=>e.id===t)})).actions(e=>{let t=0;return{afterCreate(){e.history.canUndo},setCurrentTime(t){e.currentTime=t},play({animatedElementsIds:n=[],currentTime:r=0}={}){e.animatedElementsIds=(0,CW.cast)(n),e.currentTime=r,e.isPlaying=!0,t=Date.now(),requestAnimationFrame(e.seek)},seek(){if(!e.isPlaying)return;let n=Date.now(),r=n-t;for(let i of(t=n,e.currentTime+=r,e.pages)){if(e.currentTime>=i.startTime&&e.currentTime<i.startTime+i.duration){e.selectPage(i.id);break}i.duration}e.isPlaying&&e.currentTime<e.duration?requestAnimationFrame(e.seek):e.stop()},stop(){e.isPlaying=!1,e.currentTime=0,e.animatedElementsIds=(0,CW.cast)([])}}}).actions(e=>({setUnit({unit:t,dpi:n}){e.unit=t||e.unit,e.dpi=n||e.dpi},setRole(t){e.role=t},addPage(t){let n=Ad.create({id:C8(10),...t});return e.pages.push(n),e._activePageId=n.id,n},selectPage(t){e._activePageId=t},selectElements(t){let n=t.map(t=>e.getElementById(t)).sort((e,t)=>e.page.children.indexOf(e)-e.page.children.indexOf(t)).filter(e=>!!e).map(e=>e.id);e.selectedElementsIds=(0,CW.cast)(n)},toggleBleed(t){e.bleedVisible=t??!e.bleedVisible},toggleRulers(t){e.rulesVisible=t??!e.rulesVisible},openSidePanel(t){e.openedSidePanel=t},setScale(t){e.scale=t},_setScaleToFit(t){e.scaleToFit=t},setElementsPixelRatio(t){e._elementsPixelRatio=t},setSize(t,n,r){e.pages.forEach(e=>{e.setSize({width:t,height:n,useMagic:r,softChange:!0})}),e.width=t,e.height=n},setPageZIndex(t,n){let r=e.pages.find(e=>e.id===t);r&&((0,CW.detach)(r),e.pages.remove(r),e.pages.splice(n,0,r))},deletePages(t){let n=e.pages.indexOf(e.activePage);t.forEach(t=>{let n=e.pages.find(e=>e.id===t);(0,CW.destroy)(n)});let r=Math.min(e.pages.length-1,n),i=e.pages[r];i&&(e._activePageId=i.id),e.selectedElementsIds=(0,CW.cast)(e.selectedElementsIds.filter(t=>e.getElementById(t)))},groupElements(t){let n=t.map(t=>e.getElementById(t));n.forEach(e=>{e&&(0,CW.detach)(e)});let r=e.activePage,i={id:C8(10),children:n,type:"group"};return r.children.push(i),e.selectedElementsIds=(0,CW.cast)([i.id]),i},ungroupElements(t){let n=t.map(t=>e.getElementById(t)),r=[];n.forEach(e=>{if(e&&"group"===e.type){let t=e.page,n=t.children.indexOf(e);e.children.forEach(e=>{r.push(e.id)}),e.children.forEach(e=>{(0,CW.detach)(e),t.children.push(e)}),t.children.splice(n,1)}}),e.selectedElementsIds=(0,CW.cast)(r)},deleteElements(t){t.forEach(t=>{e.pages.forEach(e=>{let n=e.children.find(e=>e.id===t);n&&(0,CW.destroy)(n)})}),e.selectedElementsIds=(0,CW.cast)(e.selectedElementsIds.filter(t=>e.getElementById(t)))},on(t,n){if("change"===t){let t=e.toJSON();return(0,CW.onSnapshot)(e,r=>{let i=e.toJSON();TN(t,i)||(t=i,n(i))})}},async _toCanvas({pixelRatio:t,ignoreBackground:n,pageId:r,mimeType:i,includeBleed:o}={}){let a=t||1;r=r||e.pages[0]?.id;let s=e.pages.find(e=>e.id===r);if(!s)throw Error(`No page for export with id ${r}`);s?.set({_exporting:!0});let u=await TL(()=>l(A).stages.find(e=>e.getAttr("pageId")===r));if(!u)throw Error(`Export is failed. Can not find stage for page ${r}. Looks like <Workspace /> component is not mounted, but it is required in order to process the export.`);let c=!!u.findOne(".page-container");await e.waitLoading();let d=u.findOne(".page-container");if(!d)throw Error(`Export is failed. Can't find page container. ${c}`);u.find("Transformer").forEach(e=>e.visible(!1)),d.find(".page-background").forEach(e=>e.shadowEnabled(!1)),d.find(".page-background").forEach(e=>e.strokeEnabled(!1)),d.find(".highlighter").forEach(e=>e.visible(!1));let h=d.findOne(".page-background-group"),f=h.clip();h.clip({x:null,y:null,width:null,height:null});let p=d.findOne(".elements-container"),g=p.clip();p.clip({x:null,y:null,width:null,height:null});let m=d.find(e=>e.getAttr("hideInExport"));m.forEach(e=>{e.setAttr("oldVisible",e.visible()),e.hide()});let v=d.find(e=>!e.visible()&&e.getAttr("editModeEnabled"));v.forEach(e=>{e.setAttr("oldVisible",e.visible()),e.show()}),n&&d.find(".page-background").forEach(e=>e.hide());let y=o?s.bleed:0,b=y;!e.bleedVisible&&o||(e.bleedVisible||o?e.bleedVisible&&o?b=0:e.bleedVisible&&!o&&(b=-s.bleed):b=0);let w=document.createElement("canvas");w.width=Math.round((s.computedWidth+2*y)*a),w.height=Math.round((s.computedHeight+2*y)*a);let x=w.getContext("2d");"image/jpeg"===i&&(x.fillStyle="white",x.fillRect(0,0,w.width,w.height));let _=d.scale();d.scale({x:1,y:1});let E=d.toCanvas({x:d.x()-b,y:d.y()-b,width:s.computedWidth+2*y,height:s.computedHeight+2*y,pixelRatio:a});return d.scale(_),x.drawImage(E,0,0,w.width,w.height),l(A).Util.releaseCanvas(E),n&&d.find(".page-background").forEach(e=>e.show()),m.forEach(e=>{e.visible(e.getAttr("oldVisible"))}),v.forEach(e=>{e.visible(e.getAttr("oldVisible"))}),d.find(".page-background").forEach(e=>e.shadowEnabled(!0)),d.find(".page-background").forEach(e=>e.strokeEnabled(!0)),u.find("Transformer").forEach(e=>e.visible(!0)),d.find(".highlighter").forEach(e=>e.visible(!0)),h.clip(f),p.clip(g),s?.set({_exporting:!1}),w},async toDataURL({pixelRatio:t,ignoreBackground:n,pageId:r,mimeType:i,includeBleed:o,quality:a}={}){let s=await e._toCanvas({pixelRatio:t,ignoreBackground:n,pageId:r,mimeType:i,includeBleed:o}),u=s.toDataURL(i,a);return l(A).Util.releaseCanvas(s),u},async toBlob({pixelRatio:t,ignoreBackground:n,pageId:r,mimeType:i,includeBleed:o,quality:a}={}){let s=await e._toCanvas({pixelRatio:t,ignoreBackground:n,pageId:r,mimeType:i,includeBleed:o}),u=new Promise(e=>{s.toBlob(e,i,a)});return l(A).Util.releaseCanvas(s),u},async saveAsImage({fileName:t,...n}={}){let r=n.mimeType||"image/png",i=r.split("/")[1];TR(await e.toDataURL(n),t||"polotno."+i,r)},async _toPDF(n){let r=n.dpi||e.dpi,i=n.parallel||1,o=n.unit||("px"===e.unit?"mm":e.unit),a=n.pixelRatio||1,l=n.pageIds||e.pages.map(e=>e.id),s=e.pages.filter(e=>l.includes(e.id)),u=await (t?Promise.resolve(t):new Promise(e=>{var n=document.createElement("script");n.onload=function(){e(t=window.jspdf.jsPDF)},n.src="https://unpkg.com/jspdf@2.2.0/dist/jspdf.umd.min.js",document.head.appendChild(n)})),c=e=>le({px:e,unit:o,dpi:r}),d=c(n.cropMarkSize||0),h=s[0]||{},f=n.includeBleed?h.bleed:0,p=c(h.computedWidth+2*f)+2*d,g=c(h.computedHeight+2*f)+2*d;var m=new u({unit:o,orientation:p>g?"landscape":"portrait",format:[p,g],compress:!0,putOnlyUsedFonts:!0});m.deletePage(1);let v=e._elementsPixelRatio;for(let t of(e.setElementsPixelRatio(a),await new Promise(e=>setTimeout(e)),((e,t)=>{for(var n=[],r=0;r<e.length;r+=t)n.push(e.slice(r,r+t));return n})(s,i))){let r=t.map(async t=>{let r=n.includeBleed?t.bleed:0,i=c(t.computedWidth+2*r)+2*d,o=c(t.computedHeight+2*r)+2*d,l=0,s=a;for(;l<10;){2===(l+=1)&&console.error("Polotno can not export PDF with current settings. Quality is automatically reduced.");let r=await e.toDataURL({...n,pageId:t.id,pixelRatio:s});if(r.length>20)return{url:r,width:i,height:o};s*=.8}});(await Promise.all(r)).forEach(({url:e,width:t,height:n})=>{m.addPage([t,n],t>n?"landscape":"portrait"),d&&(m.setLineWidth(c(1)),m.line(2*d,0,2*d,d),m.line(0,2*d,d,2*d),m.line(t-2*d,0,t-2*d,d),m.line(t,2*d,t-d,2*d),m.line(0,n-2*d,d,n-2*d),m.line(2*d,n,2*d,n-d),m.line(t,n-2*d,t-d,n-2*d),m.line(t-2*d,n,t-2*d,n-d)),m.addImage(e,d,d,t-2*d,n-2*d,void 0,"FAST")})}return e.setElementsPixelRatio(v),m},toPDFDataURL:async t=>(await e._toPDF({mimeType:"image/jpeg",...t})).output("datauristring"),async toGIFDataURL(t={}){let n=t.pixelRatio||1,r=await TI({width:e.width*n,height:e.height*n}),i=1e3/(t.fps||10),o=e.duration/i;for(let t=0;t<o-1;t++){let o=t*i||1;e.setCurrentTime(o);let a=0,l="";for(let t of e.pages)if(a+=t.duration,t.set({_rendering:a>o}),a>o){l=t.id;break}let s=await e._toCanvas({pixelRatio:n,pageId:l});r.addFrame(s.getContext("2d"),{delay:i,copy:!0})}for(let t of e.pages)t.set({_rendering:!1});return e.stop(),r.render(),new Promise(e=>{r.on("finished",function(t){var n;(n=new FileReader).onload=function(t){e(t.target.result)},n.readAsDataURL(t)})})},async saveAsGIF({fileName:t,...n}={}){TR(await e.toGIFDataURL(n),t||"polotno.gif")},toHTML:async()=>TG({json:e.toJSON()}),async saveAsHTML({fileName:t}={}){let n=await e.toHTML();TR("data:text/html;base64,"+window.btoa(unescape(encodeURIComponent(n))),t||"polotno.html")},toSVG:async()=>T2({json:e.toJSON()}),async saveAsSVG({fileName:t}={}){let n=await e.toSVG();TR("data:text/svg;base64,"+window.btoa(unescape(encodeURIComponent(n))),t||"polotno.svg")},async saveAsPDF({fileName:t,...n}={}){(await e._toPDF({mimeType:"image/jpeg",...n})).save(t||"polotno.pdf")},async waitLoading(){await new Promise(e=>setTimeout(e,50)),await new Promise(e=>{var t;return t=()=>{ie()?setTimeout(e,300):e(!0)},void(0===ir?t():ii.push(t))})},toJSON:()=>({width:e.width,height:e.height,fonts:(0,CW.getSnapshot)(e.fonts),pages:(0,CW.getSnapshot)(e.pages),unit:e.unit,dpi:e.dpi}),loadJSON(t,n=!1){let r={...t},i=e.pages.indexOf(e.activePage),o=(r.pages[i]||r.pages[0])?.id;r._activePageId=o;let a={...(0,CW.getSnapshot)(e)};Object.assign(a,r),n?a.history=e.history.toJSON():a.history={history:[],undoIdx:-1},(0,CW.applySnapshot)(e,a)},clear({keepHistory:t=!1}={}){let n=e.pages.map(e=>e.id);e.deletePages(n),t||e.history.clear()},addFont(t){e.removeFont(t.fontFamily),e.fonts.push(t),e.loadFont(t.fontFamily)},removeFont(t){e.fonts.filter(e=>e.fontFamily===t).forEach(e=>(0,CW.destroy)(e))},async loadFont(t){let n=e.fonts.find(e=>e.fontFamily===t)||ih.find(e=>e.fontFamily===t);n?function(e){let t=e.fontFamily;if(iw[t]||!e.url&&!e.styles)return;let n=document.createElement("style");n.type="text/css";let r=e.styles||(e.url?[{src:`url("${e.url}")`}]:[]),i="";r.forEach(e=>{i+=`
|
|
498
|
+
`:"";async function T2({json:e,elementHook:t}){return T1({dom:await TJ({json:e,elementHook:t})})}var CW=(h("58B0H"),h("58B0H"),h("58B0H"));let T3=(0,CW.types).model("Node",{id:CW.types.identifier,type:"none",name:"",opacity:1,custom:(0,CW.types).frozen(),visible:!0,selectable:!0,removable:!0,alwaysOnTop:!1,showInExport:!0}).preProcessSnapshot(e=>{for(var t in e)null===e[t]&&(e[t]=void 0);return e}).postProcessSnapshot(e=>{let t={...e},n={};for(var r in t)"_"!==r[0]&&(n[r]=e[r]);return n}).views(e=>({get locked(){return!e.draggable&&!e.contentEditable&&!e.styleEditable&&!e.resizable},get page(){return(0,CW.getParentOfType)(e,Ad)},get store(){return(0,CW.getParentOfType)(e,Af)},get top(){let t=e;for(;;){if(!(0,CW.hasParentOfType)(t,As))return t;t=(0,CW.getParentOfType)(t,As)}},get parent(){if((0,CW.hasParentOfType)(e,As))return(0,CW.getParentOfType)(e,As);if((0,CW.hasParentOfType)(e,Ad))return(0,CW.getParentOfType)(e,Ad);if((0,CW.hasParentOfType)(e,Af))return(0,CW.getParentOfType)(e,Af);return null}})).actions(e=>({toJSON:()=>({...(0,CW.getSnapshot)(e)})})).actions(e=>({clone(t={},{skipSelect:n=!1}={}){let r=JSON.parse(JSON.stringify(e.toJSON()));return t.id=t.id||C8(10),Ao(r,e=>{e.id=C8(10)}),Object.assign(r,t),e.page.addElement(r,{skipSelect:n})},set(t){Object.assign(e,t)},moveUp(){e.page.moveElementsUp([e.id])},moveTop(){e.page.moveElementsTop([e.id])},moveDown(){e.page.moveElementsDown([e.id])},moveBottom(){e.page.moveElementsBottom([e.id])},beforeDestroy(){}}));var CW=h("58B0H");let T5={right:{from:{x:-200},to:{x:0}},left:{from:{x:200},to:{x:0}},up:{from:{y:200},to:{y:0}},down:{from:{y:-200},to:{y:0}},"bottom-right":{from:{x:-200,y:-200},to:{x:0,y:0}},"bottom-left":{from:{x:200,y:-200},to:{x:0,y:0}},"top-right":{from:{x:-200,y:200},to:{x:0,y:0}},"top-left":{from:{x:200,y:200},to:{x:0,y:0}}},T6={fade:({dTime:e,element:t,animation:n})=>{let r=e/n.duration;return"enter"===n.type?{opacity:r*t.opacity}:{opacity:(1-r)*t.opacity}},move:({dTime:e,element:t,animation:n})=>{let r=T5[n.data.direction]||T5.right,i={};for(var o in r.from){let a=t[o]+r.from[o],l=t[o]+r.to[o];if("exit"===n.type){let e=a;a=l,l=-e}let s=l-a;i[o]=a+e/n.duration*s}return i},zoom:({dTime:e,element:t,animation:n})=>{let r={},i={x:t.x+t.width/3,y:t.y+t.height/3,width:t.width/3,height:t.height/3,fontSize:t.fontSize/3},o={x:t.x,y:t.y,width:t.width,height:t.height,fontSize:t.fontSize};for(var a in i){let t=i[a],l=o[a];if("exit"===n.type){let e=t;t=l,l=e}let s=l-t;r[a]=t+e/n.duration*s}return r}},T4=({element:e,dTime:t,animation:n})=>{let r=T6[n.name];return r?r({element:e,dTime:t,animation:n}):(console.error("Can not find animation type: "+n.name),{})},T8=(0,CW.types).model("Animation",{delay:0,duration:500,enabled:!0,type:(0,CW.types).enumeration("Type",["enter","exit"]),name:"none",data:(0,CW.types).frozen({})}),T9=T3.named("Shape").props({x:0,y:0,width:100,height:100,rotation:0,opacity:1,animations:(0,CW.types).array(T8),blurEnabled:!1,blurRadius:10,brightnessEnabled:!1,brightness:0,sepiaEnabled:!1,grayscaleEnabled:!1,shadowEnabled:!1,shadowBlur:5,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"black",shadowOpacity:1,visible:!0,draggable:!0,resizable:!0,selectable:!0,contentEditable:!0,styleEditable:!0,alwaysOnTop:!1,showInExport:!0}).preProcessSnapshot(e=>{let t={...e,x:e.x||0,y:e.y||0};return"width"in e&&(t.width=t.width||1),"height"in e&&(t.height=t.height||1),e.locked&&(t.draggable=!1,t.contentEditable=!1,t.styleEditable=!1,t.resizable=!1),t}).views(e=>({get a(){let{currentTime:t}=e.store,n={x:e.x,y:e.y,width:e.width,height:e.height,rotation:e.rotation,opacity:e.opacity,color:e.color,fontSize:e.fontSize};if(0===t)return n;let r=t-e.page.startTime;if(r>e.page.duration||r<0)return n;let i=e.store.animatedElementsIds;if(i.length&&!i.includes(e.id))return n;let o=e.animations.find(e=>"enter"===e.type);if(o?.enabled&&r<o.delay&&(n.opacity=0),o?.enabled&&r>=o.delay&&r<=o.delay+o.duration){let t=r-o.delay;Object.assign(n,T4({element:e,animation:o,dTime:t}))}let a=e.animations.find(e=>"exit"===e.type);if(a?.enabled&&r>=e.page.duration-a.duration){let t=r-(e.page.duration-a.duration);Object.assign(n,T4({element:e,animation:a,dTime:t}))}return n},animated:t=>e.a[t]})).actions(e=>({setAnimation(t,n){let r=e.animations.find(e=>e.type===t);r?Object.assign(r,n):e.animations.push({type:t,...n})}}));var CW=h("58B0H");let T7=T9.named("Text").props({type:"text",text:"",placeholder:"",fontSize:14,fontFamily:"Roboto",fontStyle:"normal",fontWeight:"normal",textDecoration:"",fill:"black",align:"center",width:100,height:0,verticalAlign:"top",strokeWidth:0,stroke:"black",lineHeight:(0,CW.types).optional((0,CW.types).union(CW.types.number,CW.types.string),1.2),letterSpacing:0,_editModeEnabled:!1,backgroundEnabled:!1,backgroundColor:"#7ED321",backgroundOpacity:1,backgroundCornerRadius:.5,backgroundPadding:.5}).preProcessSnapshot(e=>({...e})).actions(e=>({toggleEditMode(t){e._editModeEnabled=t??!e._editModeEnabled,e._editModeEnabled?e.store.history.startTransaction():e.store.history.endTransaction()}})),Ae=T9.named("Image").props({type:"image",width:100,height:100,src:"",cropX:0,cropY:0,cropWidth:1,cropHeight:1,cornerRadius:0,flipX:!1,flipY:!1,clipSrc:"",borderColor:"black",borderSize:0,keepRatio:!1,_cropModeEnabled:!1}).actions(e=>({toggleCropMode(t){e._cropModeEnabled=t??!e._cropModeEnabled,e._cropModeEnabled?e.store.history.startTransaction():e.store.history.endTransaction()},beforeDestroy(){e._cropModeEnabled&&e.store.history.endTransaction()}})),At=Ae.named("Video").props({type:"video",duration:0,startTime:0,endTime:1});var CW=h("58B0H");let An=T9.named("Line").props({type:"line",width:400,height:10,color:"black",dash:(0,CW.types).array(CW.types.number),startHead:"",endHead:""}).actions(e=>({}));var CW=h("58B0H");let Ar=T9.named("SVG").props({type:"svg",src:"",maskSrc:"",cropX:0,cropY:0,cropWidth:1,cropHeight:1,keepRatio:!0,flipX:!1,flipY:!1,width:100,height:100,borderColor:"black",borderSize:0,cornerRadius:0,colorsReplace:(0,CW.types).map(CW.types.string)}).preProcessSnapshot(e=>({...e,src:e.src||e.svgSource})).actions(e=>({replaceColor(t,n){e.colorsReplace.set(t,n)}}));var CW=h("58B0H");let Ai=T9.named("Figure").props({type:"figure",subType:"rect",fill:"rgb(0, 161, 255)",dash:(0,CW.types).array(CW.types.number),strokeWidth:0,stroke:"rgba(98, 197, 255, 1)",cornerRadius:0}),Ao=(e,t)=>{if(e.children)for(let n of e.children){if(t(n))break;Ao(n,t)}},Aa=[...Array(20)].map((e,t)=>(0,CW.types).late(()=>Au[t])),Al=(0,CW.types).union({dispatcher:e=>{let t=Ac[e.type];if(!t)throw Error(`Unknown element type: "${e.type}"`);return t}},Ar,T7,Ae,An,At,Ai,(0,CW.types).late(()=>As),...Aa),As=T3.named("Group").props({type:"group",children:(0,CW.types).array(Al)}).views(e=>({get draggable(){let t=!0;return Ao(e,e=>{e.draggable||(t=!1)}),t},get resizable(){let t=!0;return Ao(e,e=>{e.resizable||(t=!1)}),t},get contentEditable(){let t=!0;return Ao(e,e=>{e.contentEditable||(t=!1)}),t},get styleEditable(){let t=!0;return Ao(e,e=>{e.styleEditable||(t=!1)}),t},get locked(){let t=!0;return Ao(e,e=>{e.locked||(t=!1)}),t}})).actions(e=>({set({draggable:t,contentEditable:n,styleEditable:r,resizable:i,...o}){void 0!==t&&Ao(e,e=>{e.set({draggable:t})}),void 0!==n&&Ao(e,e=>{e.set({contentEditable:n})}),void 0!==r&&Ao(e,e=>{e.set({styleEditable:r})}),void 0!==i&&Ao(e,e=>{e.set({resizable:i})}),Object.assign(e,o)}})),Au=[],Ac={svg:Ar,text:T7,image:Ae,group:As,line:An,video:At,figure:Ai},Ad=(0,CW.types).model("Page",{id:CW.types.identifier,children:(0,CW.types).array((0,CW.types).late(()=>Al)),width:(0,CW.types).optional((0,CW.types).union(CW.types.number,(0,CW.types).literal("auto")),"auto"),height:(0,CW.types).optional((0,CW.types).union(CW.types.number,(0,CW.types).literal("auto")),"auto"),background:"white",bleed:0,custom:(0,CW.types).frozen(),duration:5e3,_exporting:!1,_rendering:!1}).postProcessSnapshot(e=>{let t={...e},n={};for(var r in t)"_"!==r[0]&&(n[r]=e[r]);return n}).views(e=>({get store(){return(0,CW.getParentOfType)(e,Af)},get startTime(){let t=0;for(let n of e.store.pages){if(n.id===e.id)break;t+=n.duration}return t}})).views(e=>({get computedWidth(){if("auto"===e.width)return e.store.width;return e.width},get computedHeight(){if("auto"===e.height)return e.store.height;return e.height}})).actions(e=>({toJSON:()=>JSON.parse(JSON.stringify((0,CW.getSnapshot)(e))),_forEachElementUp(t,n){let r=t.map(t=>({id:t,index:e.children.findIndex(e=>e.id===t)}));for(let{index:i}of(r.sort((e,t)=>t.index-e.index),r)){if(-1==i)continue;let r=i<e.children.length-1&&e.children[i+1],o=t.indexOf(r?.id)>=0;i===e.children.length-1||o||n(i)}},_forEachElementDown(t,n){let r=t.map(t=>({id:t,index:e.children.findIndex(e=>e.id===t)}));for(let{index:i}of(r.sort((e,t)=>e.index-t.index),r)){if(-1==i)continue;let r=i>0&&e.children[i-1],o=t.indexOf(r?.id)>=0;0===i||o||n(i)}return!1}})).actions(e=>({clone(t={}){let n=e.toJSON();n.children.forEach(e=>{e.id=C8(10),Ao(e,e=>{e.id=C8(10)})});let r={...n,id:C8(10),...t},i=e.store.addPage(r),o=e.store.pages.indexOf(e);i.setZIndex(o+1),i.select()},setZIndex(t){e.store.setPageZIndex(e.id,t)},set(t){Object.assign(e,t)},select(){e.store.selectPage(e.id)},addElement(t,{skipSelect:n=!1}={}){let r=Ac[t.type];if(!r){console.error("Can not find model with type "+t.type);return}t.children&&t.children.forEach(e=>{e.id=C8(10)});let i=r.create({id:C8(10),...t});return e.children.push(i),i.selectable&&!n&&e.store.selectElements([i.id]),i},canMoveElementsUp(t){let n=!1;return e._forEachElementUp(t,()=>{n=n||!0}),n},moveElementsUp(t){e._forEachElementUp(t,t=>{let n=e.children[t];(0,CW.detach)(n),e.children.splice(t+1,0,n)})},canMoveElementsTop(e){return this.canMoveElementsUp(e)},moveElementsTop(t){let n=[],r=[];e.children.forEach(e=>{t.indexOf(e.id)>=0?n.push(e):r.push(e)}),e.children.replace(r.concat(n))},canMoveElementsDown(t){let n=!1;return e._forEachElementDown(t,()=>{n=n||!0}),n},moveElementsDown(t){e._forEachElementDown(t,t=>{let n=e.children[t];(0,CW.detach)(n),e.children.splice(t-1,0,n)})},canMoveElementsBottom(e){return this.canMoveElementsDown(e)},moveElementsBottom(t){let n=[],r=[];e.children.forEach(e=>{t.indexOf(e.id)>=0?n.push(e):r.push(e)}),e.children.replace(n.concat(r))},setElementZIndex(t,n){let r=e.children.find(e=>e.id===t);r&&((0,CW.detach)(r),e.children.remove(r),e.children.splice(n,0,r))},setSize({width:t,height:n,useMagic:r,softChange:i}){if(r){let r=t/e.computedWidth,i=n/e.computedHeight,o=Math.min(r,i),a=Math.max(0,(t-e.computedWidth*o)/2),l=Math.max(0,(n-e.computedHeight*o)/2);Ao(e,async t=>{"group"!==t.type&&("image"===t.type&&t.x<1&&t.y<1&&t.width>=e.computedWidth-2&&t.height>=e.computedHeight-2?t.set({x:t.x*o,y:t.y*o,width:t.width*r,height:t.height*i,cropX:0,cropY:0,cropWidth:1,cropHeight:1}):(t.set({x:a+t.x*o,y:l+t.y*o,width:t.width*o,height:t.height*o}),"text"===t.type&&t.set({fontSize:t.fontSize*o})))})}i||(e.width=t),i||(e.height=n)}})).actions(e=>({moveElementUp(t){console.warn("page.moveElementUp(id) is deprecated. Please use page.moveElementsUp([id1, id2]) instead."),e.moveElementsUp([t])},moveElementDown(t){console.warn("page.moveElementDown(id) is deprecated. Please use page.moveElementsDown([id1, id2]) instead."),e.moveElementsDown([t])},moveElementTop(t){console.warn("page.moveElementTop(id) is deprecated. Please use page.moveElementsTop([id1, id2]) instead."),e.moveElementsTop([t])},moveElementBottom(t){console.warn("page.moveElementBottom(id) is deprecated. Please use page.moveElementsBottom([id1, id2]) instead."),e.moveElementsBottom([t])}}));(0,CW.setLivelinessChecking)("ignore");let Ah=(0,CW.types).model("Font",{fontFamily:CW.types.string,url:(0,CW.types).optional(CW.types.string,""),styles:(0,CW.types).frozen()}).preProcessSnapshot(e=>({...e,fontFamily:e.fontFamily||e.name})),Af=(0,CW.types).model("Store",{role:"",pages:(0,CW.types).array(Ad),fonts:(0,CW.types).array(Ah),width:1080,height:1080,currentTime:0,isPlaying:!1,scale:1,scaleToFit:1,unit:"px",dpi:72,bleedVisible:!1,rulesVisible:!1,openedSidePanel:"",selectedElementsIds:(0,CW.types).array(CW.types.string),animatedElementsIds:(0,CW.types).array(CW.types.string),history:(0,CW.types).optional(Tj,{targetPath:"../pages"}),_elementsPixelRatio:2,_activePageId:""}).views(e=>({get _bleedVisible(){return console.warn("store._bleedVisible is deprecated. Please use store.bleedVisible instead."),e.bleedVisible},get selectedElements(){return e.selectedElementsIds.map(t=>{for(let n of e.pages)for(let e of n.children)if(e.id===t)return e}).filter(e=>!!e)},get children(){return e.pages},get selectedShapes(){let t=[];return e.selectedElementsIds.forEach(n=>{for(let r of e.pages)for(let e of r.children)e.id===n&&"group"!==e.type&&t.push(e),"group"===e.type&&e.id===n&&t.push(...e.children)}),t},get activePage(){return e.pages.slice().find(t=>t.id===e._activePageId)||(e.pages.length?e.pages[0]:null)},get duration(){let t=0;return e.pages.forEach(e=>{t+=e.duration}),t},find(t){let n;return Ao({children:e.pages},e=>{if(!n&&t(e))return n=e,!0}),n},getElementById:t=>e.find(e=>e.id===t)})).actions(e=>{let t=0;return{afterCreate(){e.history.canUndo},setCurrentTime(t){e.currentTime=t},play({animatedElementsIds:n=[],currentTime:r=0}={}){e.animatedElementsIds=(0,CW.cast)(n),e.currentTime=r,e.isPlaying=!0,t=Date.now(),requestAnimationFrame(e.seek)},seek(){if(!e.isPlaying)return;let n=Date.now(),r=n-t;for(let i of(t=n,e.currentTime+=r,e.pages)){if(e.currentTime>=i.startTime&&e.currentTime<i.startTime+i.duration){e.selectPage(i.id);break}i.duration}e.isPlaying&&e.currentTime<e.duration?requestAnimationFrame(e.seek):e.stop()},stop(){e.isPlaying=!1,e.currentTime=0,e.animatedElementsIds=(0,CW.cast)([])}}}).actions(e=>({setUnit({unit:t,dpi:n}){e.unit=t||e.unit,e.dpi=n||e.dpi},setRole(t){e.role=t},addPage(t){let n=Ad.create({id:C8(10),...t});return e.pages.push(n),e._activePageId=n.id,n},selectPage(t){e._activePageId=t},selectElements(t){let n=t.map(t=>e.getElementById(t)).sort((e,t)=>e.page.children.indexOf(e)-e.page.children.indexOf(t)).filter(e=>!!e).map(e=>e.id);e.selectedElementsIds=(0,CW.cast)(n)},toggleBleed(t){e.bleedVisible=t??!e.bleedVisible},toggleRulers(t){e.rulesVisible=t??!e.rulesVisible},openSidePanel(t){e.openedSidePanel=t},setScale(t){e.scale=t},_setScaleToFit(t){e.scaleToFit=t},setElementsPixelRatio(t){e._elementsPixelRatio=t},setSize(t,n,r){e.pages.forEach(e=>{e.setSize({width:t,height:n,useMagic:r,softChange:!0})}),e.width=t,e.height=n},setPageZIndex(t,n){let r=e.pages.find(e=>e.id===t);r&&((0,CW.detach)(r),e.pages.remove(r),e.pages.splice(n,0,r))},deletePages(t){let n=e.pages.indexOf(e.activePage);t.forEach(t=>{let n=e.pages.find(e=>e.id===t);(0,CW.destroy)(n)});let r=Math.min(e.pages.length-1,n),i=e.pages[r];i&&(e._activePageId=i.id),e.selectedElementsIds=(0,CW.cast)(e.selectedElementsIds.filter(t=>e.getElementById(t)))},groupElements(t){let n=t.map(t=>e.getElementById(t));n.forEach(e=>{e&&(0,CW.detach)(e)});let r=e.activePage,i={id:C8(10),children:n,type:"group"};return r.children.push(i),e.selectedElementsIds=(0,CW.cast)([i.id]),i},ungroupElements(t){let n=t.map(t=>e.getElementById(t)),r=[];n.forEach(e=>{if(e&&"group"===e.type){let t=e.page,n=t.children.indexOf(e);e.children.forEach(e=>{r.push(e.id)}),e.children.forEach(e=>{(0,CW.detach)(e),t.children.push(e)}),t.children.splice(n,1)}}),e.selectedElementsIds=(0,CW.cast)(r)},deleteElements(t){t.forEach(t=>{e.pages.forEach(e=>{let n=e.children.find(e=>e.id===t);n&&(0,CW.destroy)(n)})}),e.selectedElementsIds=(0,CW.cast)(e.selectedElementsIds.filter(t=>e.getElementById(t)))},on(t,n){if("change"===t){let t=e.toJSON();return(0,CW.onSnapshot)(e,r=>{let i=e.toJSON();TN(t,i)||(t=i,n(i))})}},async _toCanvas({pixelRatio:t,ignoreBackground:n,pageId:r,mimeType:i,includeBleed:o}={}){let a=t||1;r=r||e.pages[0]?.id;let s=e.pages.find(e=>e.id===r);if(!s)throw Error(`No page for export with id ${r}`);s?.set({_exporting:!0});let u=await TL(()=>l(A).stages.find(e=>e.getAttr("pageId")===r));if(!u)throw Error(`Export is failed. Can not find stage for page ${r}. Looks like <Workspace /> component is not mounted, but it is required in order to process the export.`);let c=!!u.findOne(".page-container");await e.waitLoading();let d=u.findOne(".page-container");if(!d)throw Error(`Export is failed. Can't find page container. ${c}`);u.find("Transformer").forEach(e=>e.visible(!1)),d.find(".page-background").forEach(e=>e.shadowEnabled(!1)),d.find(".page-background").forEach(e=>e.strokeEnabled(!1)),d.find(".highlighter").forEach(e=>e.visible(!1));let h=d.findOne(".page-background-group"),f=h.clip();h.clip({x:null,y:null,width:null,height:null});let p=d.findOne(".elements-container"),g=p.clip();p.clip({x:null,y:null,width:null,height:null});let m=d.find(e=>e.getAttr("hideInExport"));m.forEach(e=>{e.setAttr("oldVisible",e.visible()),e.hide()});let v=d.find(e=>!e.visible()&&e.getAttr("editModeEnabled"));v.forEach(e=>{e.setAttr("oldVisible",e.visible()),e.show()}),n&&d.find(".page-background").forEach(e=>e.hide());let y=o?s.bleed:0,b=y;!e.bleedVisible&&o||(e.bleedVisible||o?e.bleedVisible&&o?b=0:e.bleedVisible&&!o&&(b=-s.bleed):b=0);let w=document.createElement("canvas");w.width=Math.round((s.computedWidth+2*y)*a),w.height=Math.round((s.computedHeight+2*y)*a);let x=w.getContext("2d");"image/jpeg"===i&&(x.fillStyle="white",x.fillRect(0,0,w.width,w.height));let _=d.scale();d.scale({x:1,y:1});let E=d.toCanvas({x:d.x()-b,y:d.y()-b,width:s.computedWidth+2*y,height:s.computedHeight+2*y,pixelRatio:a});return d.scale(_),x.drawImage(E,0,0,w.width,w.height),l(A).Util.releaseCanvas(E),n&&d.find(".page-background").forEach(e=>e.show()),m.forEach(e=>{e.visible(e.getAttr("oldVisible"))}),v.forEach(e=>{e.visible(e.getAttr("oldVisible"))}),d.find(".page-background").forEach(e=>e.shadowEnabled(!0)),d.find(".page-background").forEach(e=>e.strokeEnabled(!0)),u.find("Transformer").forEach(e=>e.visible(!0)),d.find(".highlighter").forEach(e=>e.visible(!0)),h.clip(f),p.clip(g),s?.set({_exporting:!1}),w},async toDataURL({pixelRatio:t,ignoreBackground:n,pageId:r,mimeType:i,includeBleed:o,quality:a}={}){let s=await e._toCanvas({pixelRatio:t,ignoreBackground:n,pageId:r,mimeType:i,includeBleed:o}),u=s.toDataURL(i,a);return l(A).Util.releaseCanvas(s),u},async toBlob({pixelRatio:t,ignoreBackground:n,pageId:r,mimeType:i,includeBleed:o,quality:a}={}){let s=await e._toCanvas({pixelRatio:t,ignoreBackground:n,pageId:r,mimeType:i,includeBleed:o}),u=new Promise(e=>{s.toBlob(e,i,a)});return l(A).Util.releaseCanvas(s),u},async saveAsImage({fileName:t,...n}={}){let r=n.mimeType||"image/png",i=r.split("/")[1];TR(await e.toDataURL(n),t||"polotno."+i,r)},async _toPDF(n){let r=n.dpi||e.dpi,i=n.parallel||1,o=n.unit||("px"===e.unit?"mm":e.unit),a=n.pixelRatio||1,l=n.pageIds||e.pages.map(e=>e.id),s=e.pages.filter(e=>l.includes(e.id)),u=await (t?Promise.resolve(t):new Promise(e=>{var n=document.createElement("script");n.onload=function(){e(t=window.jspdf.jsPDF)},n.src="https://unpkg.com/jspdf@2.2.0/dist/jspdf.umd.min.js",document.head.appendChild(n)})),c=e=>le({px:e,unit:o,dpi:r}),d=c(n.cropMarkSize||0),h=s[0]||{},f=n.includeBleed?h.bleed:0,p=c(h.computedWidth+2*f)+2*d,g=c(h.computedHeight+2*f)+2*d;var m=new u({unit:o,orientation:p>g?"landscape":"portrait",format:[p,g],compress:!0,putOnlyUsedFonts:!0});m.deletePage(1);let v=e._elementsPixelRatio;for(let t of(e.setElementsPixelRatio(a),await new Promise(e=>setTimeout(e)),((e,t)=>{for(var n=[],r=0;r<e.length;r+=t)n.push(e.slice(r,r+t));return n})(s,i))){let r=t.map(async t=>{let r=n.includeBleed?t.bleed:0,i=c(t.computedWidth+2*r)+2*d,o=c(t.computedHeight+2*r)+2*d,l=0,s=a;for(;l<10;){2===(l+=1)&&console.error("Polotno can not export PDF with current settings. Quality is automatically reduced.");let r=await e.toDataURL({...n,pageId:t.id,pixelRatio:s});if(r.length>20)return{url:r,width:i,height:o};s*=.8}});(await Promise.all(r)).forEach(({url:e,width:t,height:n})=>{m.addPage([t,n],t>n?"landscape":"portrait"),d&&(m.setLineWidth(c(1)),m.line(2*d,0,2*d,d),m.line(0,2*d,d,2*d),m.line(t-2*d,0,t-2*d,d),m.line(t,2*d,t-d,2*d),m.line(0,n-2*d,d,n-2*d),m.line(2*d,n,2*d,n-d),m.line(t,n-2*d,t-d,n-2*d),m.line(t-2*d,n,t-2*d,n-d)),m.addImage(e,d,d,t-2*d,n-2*d,void 0,"FAST")})}return e.setElementsPixelRatio(v),m},toPDFDataURL:async t=>(await e._toPDF({mimeType:"image/jpeg",...t})).output("datauristring"),async toGIFDataURL(t={}){let n=t.pixelRatio||1,r=await TI({width:e.width*n,height:e.height*n}),i=1e3/(t.fps||10),o=e.duration/i;for(let t=0;t<o-1;t++){let o=t*i||1;e.setCurrentTime(o);let a=0,l="";for(let t of e.pages)if(a+=t.duration,t.set({_rendering:a>o}),a>o){l=t.id;break}let s=await e._toCanvas({pixelRatio:n,pageId:l});r.addFrame(s.getContext("2d"),{delay:i,copy:!0})}for(let t of e.pages)t.set({_rendering:!1});return e.stop(),r.render(),new Promise(e=>{r.on("finished",function(t){var n;(n=new FileReader).onload=function(t){e(t.target.result)},n.readAsDataURL(t)})})},async saveAsGIF({fileName:t,...n}={}){TR(await e.toGIFDataURL(n),t||"polotno.gif")},toHTML:async()=>TG({json:e.toJSON()}),async saveAsHTML({fileName:t}={}){let n=await e.toHTML();TR("data:text/html;base64,"+window.btoa(unescape(encodeURIComponent(n))),t||"polotno.html")},toSVG:async()=>T2({json:e.toJSON()}),async saveAsSVG({fileName:t}={}){let n=await e.toSVG();TR("data:text/svg;base64,"+window.btoa(unescape(encodeURIComponent(n))),t||"polotno.svg")},async saveAsPDF({fileName:t,...n}={}){(await e._toPDF({mimeType:"image/jpeg",...n})).save(t||"polotno.pdf")},async waitLoading(){await new Promise(e=>setTimeout(e,50)),await new Promise(e=>{var t;return t=()=>{il()?setTimeout(e,300):e(!0)},void(0===iu?t():ic.push(t))})},toJSON:()=>({width:e.width,height:e.height,fonts:(0,CW.getSnapshot)(e.fonts),pages:(0,CW.getSnapshot)(e.pages),unit:e.unit,dpi:e.dpi}),loadJSON(t,n=!1){let r={...t},i=e.pages.indexOf(e.activePage),o=(r.pages[i]||r.pages[0])?.id;r._activePageId=o;let a={...(0,CW.getSnapshot)(e)};Object.assign(a,r),n?a.history=e.history.toJSON():a.history={history:[],undoIdx:-1},(0,CW.applySnapshot)(e,a)},clear({keepHistory:t=!1}={}){let n=e.pages.map(e=>e.id);e.deletePages(n),t||e.history.clear()},addFont(t){e.removeFont(t.fontFamily),e.fonts.push(t),e.loadFont(t.fontFamily)},removeFont(t){e.fonts.filter(e=>e.fontFamily===t).forEach(e=>(0,CW.destroy)(e))},async loadFont(t){let n=e.fonts.find(e=>e.fontFamily===t)||ib.find(e=>e.fontFamily===t);n?function(e){let t=e.fontFamily;if(iO[t]||!e.url&&!e.styles)return;let n=document.createElement("style");n.type="text/css";let r=e.styles||(e.url?[{src:`url("${e.url}")`}]:[]),i="";r.forEach(e=>{i+=`
|
|
499
499
|
@font-face {
|
|
500
500
|
font-family: '${t}';
|
|
501
501
|
src: ${e.src};
|
|
502
502
|
font-style: ${e.fontStyle||"normal"};
|
|
503
503
|
font-weight: ${e.fontWeight||"normal"};
|
|
504
504
|
}
|
|
505
|
-
`}),n.innerHTML=i,document.getElementsByTagName("head")[0].appendChild(n),
|
|
505
|
+
`}),n.innerHTML=i,document.getElementsByTagName("head")[0].appendChild(n),iO[e.fontFamily]=!0}(n):function(e){if(iC[e])return;let t=e.replace(/ /g,"+"),n=`https://fonts.googleapis.com/css?family=${t}:400,400italic,700,700italic`,r=document.createElement("link");r.type="text/css",r.href=n,r.rel="stylesheet",document.getElementsByTagName("head")[0].appendChild(r),iC[e]=!0}(t),await iS(t)},validate:e=>Af.validate(e,[{path:"",type:Af}]).map(e=>({path:"store"+e.context.map(e=>e.path).join("."),message:e.message}))})),Ap=at("div")`
|
|
506
506
|
display: flex;
|
|
507
507
|
height: 100%;
|
|
508
508
|
width: 100%;
|
|
509
509
|
max-height: 100vh;
|
|
510
510
|
|
|
511
|
-
${
|
|
511
|
+
${iR(`
|
|
512
512
|
flex-direction: column-reverse;
|
|
513
513
|
`)}
|
|
514
514
|
`,Ag=at("div")`
|
|
@@ -516,7 +516,7 @@ Please read the updated README.md at https://github.com/SortableJS/react-sortabl
|
|
|
516
516
|
width: auto;
|
|
517
517
|
max-height: 100vh;
|
|
518
518
|
|
|
519
|
-
${
|
|
519
|
+
${iR(`
|
|
520
520
|
height: auto;
|
|
521
521
|
width: 100vw;
|
|
522
522
|
`)}
|